displacementLayeredMotionMotionSolver.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::displacementLayeredMotionMotionSolver
26 
27 Description
28  Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the
29  structure of the mesh blocks and boundary conditions on these blocks.
30 
31  The displacementLayeredMotionCoeffs subdict of dynamicMeshDict specifies
32  per region (=cellZone) the boundary conditions on two opposing patches
33  (=faceZones). It then interpolates the boundary values using topological
34  walking so requires the cellZone to be a layered mesh.
35 
36  The boundary conditions on faceZones are currently:
37 
38  follow: the faceZone follows the overall mesh displacement.
39  Use this for faceZones on boundary faces (so it uses the
40  proper boundary conditions on the pointDisplacement).
41 
42  uniformFollow: like 'follow' but takes the average value of
43  a specified 'patch' (which is not necessarily colocated)
44 
45  fixedValue: fixed value.
46 
47  timeVaryingUniformFixedValue: table-driven fixed value.
48 
49  slip: the second of a pair of faceZones follows the tangential movement
50  specified by the first faceZone. (= removes the normal component).
51 
52 SourceFiles
53  displacementLayeredMotionMotionSolver.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef displacementLayeredMotionMotionSolver_H
58 #define displacementLayeredMotionMotionSolver_H
59 
61 #include "PackedBoolList.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 
68 // Forward class declarations
69 
70 /*---------------------------------------------------------------------------*\
71  Class displacementLayeredMotionMotionSolver Declaration
72 \*---------------------------------------------------------------------------*/
73 
75 :
77 {
78  // Private Member Functions
79 
80  void calcZoneMask
81  (
82  const label cellZoneI,
83  PackedBoolList& isZonePoint,
84  PackedBoolList& isZoneEdge
85  ) const;
86 
87  void walkStructured
88  (
89  const label cellZoneI,
90  const PackedBoolList& isZonePoint,
91  const PackedBoolList& isZoneEdge,
92  const labelList& seedPoints,
93  const vectorField& seedData,
96  ) const;
97 
98  tmp<vectorField> faceZoneEvaluate
99  (
100  const faceZone& fz,
101  const labelList& meshPoints,
102  const dictionary& dict,
103  const PtrList<pointVectorField>& patchDisp,
104  const label patchi
105  ) const;
106 
107  void cellZoneSolve
108  (
109  const label cellZoneI,
110  const dictionary& zoneDict
111  );
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("displacementLayeredMotion");
118 
119 
120  // Constructors
121 
122  //- Construct from polyMesh and dictionary
124  (
125  const word& name,
126  const polyMesh&,
127  const dictionary&
128  );
129 
130  //- Disallow default bitwise copy construction
132  (
134  );
135 
136 
137  //- Destructor
139 
140 
141  // Member Functions
142 
143  //- Return point location obtained from the current motion field
144  virtual tmp<pointField> curPoints() const;
145 
146  //- Solve for motion
147  virtual void solve();
148 
149  //- Update topology
150  virtual void topoChange(const polyTopoChangeMap&);
151 
152 
153  // Member Operators
154 
155  //- Disallow default bitwise assignment
156  void operator=(const displacementLayeredMotionMotionSolver&) = delete;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
dictionary dict
Virtual base class for displacement motion solver.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual void topoChange(const polyTopoChangeMap &)
Update topology.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
scalar distance(const vector &p1, const vector &p2)
Definition: curveTools.C:12
A class for handling words, derived from string.
Definition: word.H:59
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const word & name() const
Return name.
Definition: motionSolver.H:125
Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the structure of the mesh blocks ...
Database for solution and other reduced data.
Definition: data.H:51
void operator=(const displacementLayeredMotionMotionSolver &)=delete
Disallow default bitwise assignment.
A bit-packed bool list.
label patchi
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
displacementLayeredMotionMotionSolver(const word &name, const polyMesh &, const dictionary &)
Construct from polyMesh and dictionary.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:65
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
TypeName("displacementLayeredMotion")
Runtime type information.