1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::movingBodyTopoFvMesh
28 Sample topoChangerFvMesh that moves a cell zone in a given direction,
29 introducing/removing layers around it.
31 Cells in the movingCells zone shall be moved given the prescribed velocity
32 and will be bounded in "front" and "back" by other cell zones.
33 Layer addition/removal interfaces are inserted at boundaries between the
34 moving zone and front and back, pointing outside of the moving cell zone
37 Hrvoje Jasak, Wikki Ltd.
40 movingBodyTopoFvMesh.C
42 \*---------------------------------------------------------------------------*/
44 #ifndef movingBodyTopoFvMesh_H
45 #define movingBodyTopoFvMesh_H
47 #include "topoChangerFvMesh.H"
48 #include "solidBodyMotionFunction.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class movingBodyTopoFvMesh Declaration
57 \*---------------------------------------------------------------------------*/
59 class movingBodyTopoFvMesh
61 public topoChangerFvMesh
65 //- Dynamic mesh dictionary
68 //- Moving cell zone name
69 word movingCellsName_;
71 //- Front face zone name
74 //- Back face zone name
77 //- Motion control function
78 autoPtr<solidBodyMotionFunction> SBMFPtr_;
80 //- Vertex motion mask
81 scalarField motionMask_;
84 // Private Member Functions
86 //- Disallow default bitwise copy construct
87 movingBodyTopoFvMesh(const movingBodyTopoFvMesh&);
89 //- Disallow default bitwise assignment
90 void operator=(const movingBodyTopoFvMesh&);
93 //- Add mixer zones and modifiers
94 void addZonesAndModifiers();
96 //- Mark motion vertices
97 tmp<scalarField> calcMotionMask() const;
102 //- Runtime type information
103 TypeName("movingBodyTopoFvMesh");
108 //- Construct from database
109 explicit movingBodyTopoFvMesh(const IOobject& io);
114 virtual ~movingBodyTopoFvMesh();
119 //- Update the mesh for both mesh motion and topology change
120 virtual bool update();
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 // ************************************************************************* //