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-2019 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 polyMesh&,
126  const dictionary&
127  );
128 
129  //- Disallow default bitwise copy construction
131  (
133  );
134 
135 
136  //- Destructor
138 
139 
140  // Member Functions
141 
142  //- Return point location obtained from the current motion field
143  virtual tmp<pointField> curPoints() const;
144 
145  //- Solve for motion
146  virtual void solve();
147 
148  //- Update topology
149  virtual void updateMesh(const mapPolyMesh&);
150 
151 
152  // Member Operators
153 
154  //- Disallow default bitwise assignment
155  void operator=(const displacementLayeredMotionMotionSolver&) = delete;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
dictionary dict
Virtual base class for displacement motion solver.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
displacementLayeredMotionMotionSolver(const polyMesh &, const dictionary &)
Construct from polyMesh and dictionary.
scalar distance(const vector &p1, const vector &p2)
Definition: curveTools.C:12
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
virtual void updateMesh(const mapPolyMesh &)
Update topology.
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
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:64
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
TypeName("displacementLayeredMotion")
Runtime type information.