1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::displacementLayeredMotionFvMotionSolver
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.
31 Note: should not be an fvMotionSolver but just a motionSolver. Only here
32 so we can reuse displacementFvMotionSolver functionality (e.g. surface
33 following boundary conditions)
36 The displacementLayeredMotionCoeffs subdict of dynamicMeshDict specifies
37 per region (=cellZone) the boundary conditions on two opposing patches
38 (=faceZones). It then interpolates the boundary values using topological
39 walking so requires the cellZone to be a layered mesh.
41 The boundary conditions on faceZones are currently:
43 follow: the faceZone follows the overall mesh displacement.
44 Use this for faceZones on boundary faces (so it uses the
45 proper boundary conditions on the pointDisplacement).
47 fixedValue: fixed value.
49 timeVaryingUniformFixedValue: table-driven fixed value.
51 slip: the second of a pair of faceZones follows the tangential movement
52 specified by the first faceZone. (= removes the normal component).
55 displacementLayeredMotionFvMotionSolver.C
57 \*---------------------------------------------------------------------------*/
59 #ifndef displacementLayeredMotionFvMotionSolver_H
60 #define displacementLayeredMotionFvMotionSolver_H
62 #include "displacementFvMotionSolver.H"
63 #include "PackedBoolList.H"
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 // Forward class declarations
72 /*---------------------------------------------------------------------------*\
73 Class displacementLayeredMotionFvMotionSolver Declaration
74 \*---------------------------------------------------------------------------*/
76 class displacementLayeredMotionFvMotionSolver
78 public displacementFvMotionSolver
82 //- Point motion field
83 mutable pointVectorField pointDisplacement_;
86 // Private Member Functions
90 const label cellZoneI,
91 PackedBoolList& isZonePoint,
92 PackedBoolList& isZoneEdge
97 const label cellZoneI,
98 const PackedBoolList& isZonePoint,
99 const PackedBoolList& isZoneEdge,
100 const labelList& seedPoints,
101 const vectorField& seedData,
102 scalarField& distance,
106 tmp<vectorField> faceZoneEvaluate
109 const labelList& meshPoints,
110 const dictionary& dict,
111 const PtrList<pointVectorField>& patchDisp,
117 const label cellZoneI,
118 const dictionary& zoneDict
122 //- Disallow default bitwise copy construct
123 displacementLayeredMotionFvMotionSolver
125 const displacementLayeredMotionFvMotionSolver&
128 //- Disallow default bitwise assignment
129 void operator=(const displacementLayeredMotionFvMotionSolver&);
134 //- Runtime type information
135 TypeName("displacementLayeredMotion");
140 //- Construct from polyMesh and data stream
141 displacementLayeredMotionFvMotionSolver
144 Istream& msDataUnused
149 ~displacementLayeredMotionFvMotionSolver();
154 //- Return reference to the point motion displacement field
155 pointVectorField& pointDisplacement()
157 return pointDisplacement_;
160 //- Return const reference to the point motion displacement field
161 const pointVectorField& pointDisplacement() const
163 return pointDisplacement_;
166 //- Return point location obtained from the current motion field
167 virtual tmp<pointField> curPoints() const;
170 virtual void solve();
173 virtual void updateMesh(const mapPolyMesh&);
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 } // End namespace Foam
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 // ************************************************************************* //