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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::displacementLayeredMotionMotionSolver
29 
30 Group
31  grpMeshMotionSolvers
32 
33 Description
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 
58 SourceFiles
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 
72 namespace Foam
73 {
74 
75 // Forward Declarations
76 class bitSet;
77 
78 
79 /*---------------------------------------------------------------------------*\
80  Class displacementLayeredMotionMotionSolver Declaration
81 \*---------------------------------------------------------------------------*/
82 
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
139  (
141  ) = delete;
142 
143  //- No copy assignment
144  void operator=(const displacementLayeredMotionMotionSolver&) = delete;
145 
146 
147 public:
148 
149  //- Runtime type information
150  TypeName("displacementLayeredMotion");
151 
152 
153  // Constructors
154 
155  //- Construct from polyMesh and IOdictionary
157  (
158  const polyMesh& mesh,
159  const IOdictionary& dict
160  );
161 
162  //- Construct from polyMesh, IOdictionary, displacement and
163  //- zero-time fields
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 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::displacementLayeredMotionMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementLayeredMotionMotionSolver.C:539
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:61
Foam::bitSet
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:63
Foam::displacementMotionSolver::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: displacementMotionSolver.H:141
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::displacementLayeredMotionMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &mpm)
Update topology.
Definition: displacementLayeredMotionMotionSolver.C:587
Foam::displacementLayeredMotionMotionSolver
Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the structure of the mesh blocks ...
Definition: displacementLayeredMotionMotionSolver.H:82
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::displacementLayeredMotionMotionSolver::TypeName
TypeName("displacementLayeredMotion")
Runtime type information.
Foam::Field< vector >
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:64
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::displacementLayeredMotionMotionSolver::~displacementLayeredMotionMotionSolver
~displacementLayeredMotionMotionSolver()=default
Destructor.
cylindricalCS.H
Foam::coordSystem::cylindrical
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians.
Definition: cylindricalCS.H:71
PtrMap.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementLayeredMotionMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementLayeredMotionMotionSolver.C:550
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::distance
scalar distance(const vector &p1, const vector &p2)
Definition: curveTools.C:12
displacementMotionSolver.H
Foam::points0MotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: points0MotionSolver.H:117
Foam::List< label >
Foam::motionSolver::mesh
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:144
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::GeometricField< vector, pointPatchField, pointMesh >
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:55
Foam::PtrMap
A HashTable of pointers to objects of type <T> with a label key.
Definition: HashTableFwd.H:48