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/>.
28 Single moving body with layer addition/removal interfaces around it
31 Hrvoje Jasak, Wikki Ltd. All rights reserved.
36 \*---------------------------------------------------------------------------*/
42 #include "solidBodyMotionFunction.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // Forward declaration of classes
50 class polyTopoChanger;
52 /*---------------------------------------------------------------------------*\
53 Class topoBody Declaration
54 \*---------------------------------------------------------------------------*/
64 const polyMesh& mesh_;
66 //- Name of moving cell zone
67 const word movingCellsName_;
69 //- Name of layer face zone
70 const wordList layerFacesNames_;
72 //- Min layering thickness
73 const scalar minThickness_;
75 //- Max layering thickness
76 const scalar maxThickness_;
78 //- Motion control function
79 autoPtr<solidBodyMotionFunction> SBMFPtr_;
81 //- Invert motion mask: marked region is stationary and the rest
82 // of the domain is moving
83 const Switch invertMotionMask_;
85 //- Markup field for points. Moving points marked with 1
86 mutable scalarField* movingPointsMaskPtr_;
89 // Private Member Functions
91 //- Disallow default bitwise copy construct
92 topoBody(const topoBody&);
94 //- Disallow default bitwise assignment
95 void operator=(const topoBody&);
98 //- Calculate moving mask
99 void calcMovingMask() const;
101 //- Return moving points mask
102 const scalarField& movingPointsMask() const;
104 //- Clear moving points mask
105 void clearPointMask();
112 //- Construct from dictionary
116 const polyMesh& mesh,
117 const dictionary& dict
128 //- Return accumulative point motion
129 virtual tmp<vectorField> pointMotion() const;
131 //- Add layering zones
134 DynamicList<pointZone*>& pz,
135 DynamicList<faceZone*>& fz,
136 DynamicList<cellZone*>& cz
139 //- Add mixer rotor modifiers
147 void updateTopology();
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 // ************************************************************************* //