Loading...
Searching...
No Matches
edgeSlipDisplacementPointPatchVectorField.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2024 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::edgeSlipDisplacementPointPatchVectorField
28
29Description
30 Displacement follows an edgeMesh. Use in a displacementMotionSolver
31 as a bc on the pointDisplacement field.
32
33 Needs:
34 - file : name of edgeMesh. Either:
35 - .extendedFeatureEdgeMesh (read from constant/extendedFeatureEdgeMesh)
36 - or .eMesh in or a known format (read from constant/triSurface)
37 - frozenPointsZone : empty or name of pointZone containing points
38 that do not move
39 - velocity : maximum displacement velocity
40
41
42SourceFiles
43 edgeSlipDisplacementPointPatchVectorField.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef edgeSlipDisplacementPointPatchVectorField_H
48#define edgeSlipDisplacementPointPatchVectorField_H
49
50#include "pointPatchFields.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
58/*---------------------------------------------------------------------------*\
59 Class edgeSlipDisplacementPointPatchVectorField Declaration
60\*---------------------------------------------------------------------------*/
61
63:
65{
66private:
67
68 // Private data
69
70 //- Maximum velocity
71 const vector velocity_;
72
73 //- file
74 const fileName featFileName_;
75
76 //- pointZone with frozen points
77 const word frozenPointsZone_;
78
79 //- Edge searching
80 mutable autoPtr<indexedOctree<treeDataEdge>> edgeTreePtr_;
81
82
83 // Private Member Functions
84
85 //- Calculate displacement (w.r.t. points0()) to project onto surface
86 void calcProjection(vectorField& displacement) const;
87
88 //- No copy assignment
89 void operator=
90 (
92 ) = delete;
93
94
95protected:
96
98
99
100public:
101
102 //- Runtime type information
103 TypeName("edgeSlipDisplacement");
104
105
106 // Constructors
107
108 //- Construct from patch and internal field
110 (
111 const pointPatch&,
113 );
114
115 //- Construct from patch, internal field and dictionary
117 (
118 const pointPatch&,
120 const dictionary&
121 );
122
123 //- Construct by mapping given patch field onto a new patch
125 (
127 const pointPatch&,
130 );
131
132 //- Construct as copy
134 (
136 );
137
138 //- Construct and return a clone
140 {
142 (
144 (
145 *this
146 )
147 );
148 }
149
150 //- Construct as copy setting internal field reference
152 (
155 );
156
157 //- Construct and return a clone setting internal field reference
168 iF
169 )
170 );
171 }
172
173 // Member Functions
174
175 //- Update the coefficients associated with the patch field
176 virtual void updateCoeffs();
177
178 //- Read (& store) geometry. Exposed so point attraction can reuse it.
179 static void read
180 (
181 const objectRegistry& obr,
182 const dictionary& dict
183 );
184
185 //- Write
186 virtual void write(Ostream&) const;
187};
188
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192} // End namespace Foam
193
194// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195
196#endif
197
198// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Displacement follows an edgeMesh. Use in a displacementMotionSolver as a bc on the pointDisplacement ...
virtual autoPtr< pointPatchVectorField > clone(const DimensionedField< vector, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
static void read(const objectRegistry &obr, const dictionary &dict)
Read (& store) geometry. Exposed so point attraction can reuse it.
edgeSlipDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
TypeName("edgeSlipDisplacement")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual autoPtr< pointPatchVectorField > clone() const
Construct and return a clone.
A class for handling file names.
Definition fileName.H:75
Non-pointer based hierarchical recursive searching.
Registry of regIOobjects.
Foam::pointPatchFieldMapper.
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Field< vector > vectorField
Specialisation of Field<T> for vector.
pointPatchField< vector > pointPatchVectorField
Vector< scalar > vector
Definition vector.H:57
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68