1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
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::movingConeTopoFvMesh
28 Sample topoChangerFvMesh that moves an object in x direction
29 and introduces/removes layers.
32 movingConeTopoFvMesh.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef movingConeTopoFvMesh_H
37 #define movingConeTopoFvMesh_H
39 #include "topoChangerFvMesh.H"
40 #include "motionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declaration of classes
49 /*---------------------------------------------------------------------------*\
50 Class movingConeTopoFvMesh Declaration
51 \*---------------------------------------------------------------------------*/
53 class movingConeTopoFvMesh
55 public topoChangerFvMesh
60 dictionary motionDict_;
62 //- Motion velocity amplitude
63 vector motionVelAmplitude_;
65 //- Motion velocity period
66 scalar motionVelPeriod_;
68 //- Motion velocity period
74 //- Current left obstacle position
77 //- Current right obstacle position
80 //- Vertex motion mask
81 scalarField motionMask_;
84 // Private Member Functions
86 //- Disallow default bitwise copy construct
87 movingConeTopoFvMesh(const movingConeTopoFvMesh&);
89 //- Disallow default bitwise assignment
90 void operator=(const movingConeTopoFvMesh&);
93 //- Add mixer zones and modifiers
94 void addZonesAndModifiers();
96 //- Markup motion vertices
97 tmp<scalarField> vertexMarkup
100 const scalar curLeft,
101 const scalar curRight
107 //- Runtime type information
108 TypeName("movingConeTopoFvMesh");
113 //- Construct from database
114 explicit movingConeTopoFvMesh(const IOobject& io);
118 virtual ~movingConeTopoFvMesh();
123 //- Update the mesh for both mesh motion and topology change
124 virtual bool update();
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //