Loading...
Searching...
No Matches
displacementLayeredMotionMotionSolver.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::displacementLayeredMotionMotionSolver
29
30Group
31 grpMeshMotionSolvers
32
33Description
34 Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the
35 structure of the mesh blocks and boundary conditions on these blocks.
36
37 The displacementLayeredMotionCoeffs subdict of dynamicMeshDict specifies
38 per region (=cellZone) the boundary conditions on two opposing patches
39 (=faceZones). It then interpolates the boundary values using topological
40 walking so requires the cellZone to be a layered mesh.
41
42 The boundary conditions on faceZones are currently:
43
44 follow: the faceZone follows the overall mesh displacement.
45 Use this for faceZones on boundary faces (so it uses the
46 proper boundary conditions on the pointDisplacement).
47
48 uniformFollow: like 'follow' but takes the average value of
49 a specified 'patch' (which is not necessarily colocated)
50
51 fixedValue: fixed value.
52
53 timeVaryingUniformFixedValue: table-driven fixed value.
54
55 slip: the second of a pair of faceZones follows the tangential movement
56 specified by the first faceZone. (= removes the normal component).
57
58SourceFiles
59 displacementLayeredMotionMotionSolver.C
60
61\*---------------------------------------------------------------------------*/
62
63#ifndef displacementLayeredMotionMotionSolver_H
64#define displacementLayeredMotionMotionSolver_H
65
67#include "cylindricalCS.H"
68#include "PtrMap.H"
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
74
75// Forward Declarations
76class bitSet;
77
79/*---------------------------------------------------------------------------*\
80 Class displacementLayeredMotionMotionSolver Declaration
81\*---------------------------------------------------------------------------*/
82
83class displacementLayeredMotionMotionSolver
84:
86{
87 // Private Data
88
89 //- Cylindrical coordinate systems (per cellZone)
91
92
93 // Private Member Functions
94
95 //- Get existing or create new cylindrical system
96 const coordSystem::cylindrical& getCylindrical
97 (
98 const label cellZoneI,
99 const dictionary& zoneDict
100 );
101
102 void calcZoneMask
103 (
104 const label cellZoneI,
105 bitSet& isZonePoint,
106 bitSet& isZoneEdge
107 ) const;
108
109 void walkStructured
110 (
111 const label cellZoneI,
112 const bitSet& isZonePoint,
113 const bitSet& isZoneEdge,
114 const labelList& seedPoints,
115 const vectorField& seedData,
117 vectorField& data,
118 labelField& patchPoints
119 ) const;
120
121 tmp<vectorField> faceZoneEvaluate
122 (
123 const faceZone& fz,
124 const labelList& meshPoints,
125 const dictionary& dict,
126 const PtrList<pointVectorField>& patchDisp,
127 const label patchi
128 ) const;
129
130 void cellZoneSolve
131 (
132 const label cellZoneI,
133 const dictionary& zoneDict
134 );
135
136
137 //- No copy construct
138 displacementLayeredMotionMotionSolver
139 (
140 const displacementLayeredMotionMotionSolver&
141 ) = delete;
142
143 //- No copy assignment
144 void operator=(const displacementLayeredMotionMotionSolver&) = delete;
145
146
147public:
148
149 //- Runtime type information
150 TypeName("displacementLayeredMotion");
151
152
153 // Constructors
154
155 //- Construct from polyMesh and IOdictionary
156 displacementLayeredMotionMotionSolver
157 (
158 const polyMesh& mesh,
159 const IOdictionary& dict
160 );
161
162 //- Construct from polyMesh, IOdictionary, displacement and
163 //- zero-time fields
164 displacementLayeredMotionMotionSolver
165 (
166 const polyMesh& mesh,
167 const IOdictionary& dict,
169 const pointIOField& points0
170 );
171
172
173 //- Destructor
175
176
177 // Member Functions
178
179 //- Return point location obtained from the current motion field
180 virtual tmp<pointField> curPoints() const;
181
182 //- Solve for motion
183 virtual void solve();
184
185 //- Update topology
186 virtual void updateMesh(const mapPolyMesh& mpm);
187};
188
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192} // End namespace Foam
193
194// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195
196#endif
197
198// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
A HashTable of pointers to objects of type <T> with a label key.
Definition PtrMap.H:49
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition bitSet.H:61
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
~displacementLayeredMotionMotionSolver()=default
Destructor.
TypeName("displacementLayeredMotion")
Runtime type information.
virtual void updateMesh(const mapPolyMesh &mpm)
Update topology.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
displacementMotionSolver(const displacementMotionSolver &)=delete
No copy construct.
A subset of mesh faces organised as a primitive patch.
Definition faceZone.H:63
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyMesh & mesh() const
Return reference to mesh.
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
scalar distance(const vector &p1, const vector &p2)
Definition curveTools.C:12
List< label > labelList
A List of labels.
Definition List.H:62
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorIOField pointIOField
pointIOField is a vectorIOField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< label > labelField
Specialisation of Field<T> for label.
Definition labelField.H:48
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68