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 | Copyright (C) 2011-2015 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 
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  //- Disallow default bitwise copy construct
116  (
118  );
119 
120  //- Disallow default bitwise assignment
122 
123 
124 public:
125 
126  //- Runtime type information
127  TypeName("displacementLayeredMotion");
128 
129 
130  // Constructors
131 
132  //- Construct from polyMesh and IOdictionary
134  (
135  const polyMesh&,
136  const IOdictionary&
137  );
138 
139  //- Construct from polyMesh, IOdictionary and displacement and
140  // zero-time fields
142  (
143  const polyMesh&,
144  const IOdictionary&,
145  const pointVectorField&,
146  const pointIOField&
147  );
148 
149 
150  //- Destructor
152 
153 
154  // Member Functions
155 
156  //- Return point location obtained from the current motion field
157  virtual tmp<pointField> curPoints() const;
158 
159  //- Solve for motion
160  virtual void solve();
161 
162  //- Update topology
163  virtual void updateMesh(const mapPolyMesh&);
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::displacementLayeredMotionMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementLayeredMotionMotionSolver.C:531
Foam::IOField< vector >
Foam::displacementLayeredMotionMotionSolver::displacementLayeredMotionMotionSolver
displacementLayeredMotionMotionSolver(const displacementLayeredMotionMotionSolver &)
Disallow default bitwise copy construct.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::displacementLayeredMotionMotionSolver::operator=
void operator=(const displacementLayeredMotionMotionSolver &)
Disallow default bitwise assignment.
Foam::displacementLayeredMotionMotionSolver
Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the structure of the mesh blocks ...
Definition: displacementLayeredMotionMotionSolver.H:73
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::displacementLayeredMotionMotionSolver::TypeName
TypeName("displacementLayeredMotion")
Runtime type information.
Foam::displacementLayeredMotionMotionSolver::walkStructured
void walkStructured(const label cellZoneI, const PackedBoolList &isZonePoint, const PackedBoolList &isZoneEdge, const labelList &seedPoints, const vectorField &seedData, scalarField &distance, vectorField &data) const
Definition: displacementLayeredMotionMotionSolver.C:136
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate
tmp< vectorField > faceZoneEvaluate(const faceZone &fz, const labelList &meshPoints, const dictionary &dict, const PtrList< pointVectorField > &patchDisp, const label patchI) const
Definition: displacementLayeredMotionMotionSolver.C:224
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:64
PackedBoolList.H
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementLayeredMotionMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementLayeredMotionMotionSolver.C:542
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:55
Foam::displacementLayeredMotionMotionSolver::calcZoneMask
void calcZoneMask(const label cellZoneI, PackedBoolList &isZonePoint, PackedBoolList &isZoneEdge) const
Definition: displacementLayeredMotionMotionSolver.C:61
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::distance
scalar distance(const vector &p1, const vector &p2)
Definition: curveTools.C:12
displacementMotionSolver.H
Foam::displacementLayeredMotionMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update topology.
Definition: displacementLayeredMotionMotionSolver.C:580
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::displacementLayeredMotionMotionSolver::cellZoneSolve
void cellZoneSolve(const label cellZoneI, const dictionary &zoneDict)
Definition: displacementLayeredMotionMotionSolver.C:286
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::displacementLayeredMotionMotionSolver::~displacementLayeredMotionMotionSolver
~displacementLayeredMotionMotionSolver()
Destructor.
Definition: displacementLayeredMotionMotionSolver.C:524
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:52