1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::movingConeTopoFvMesh
29 Sample topoChangerFvMesh that moves an object in x direction
30 and introduces/removes layers.
33 movingConeTopoFvMesh.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef movingConeTopoFvMesh_H
38 #define movingConeTopoFvMesh_H
40 #include "topoChangerFvMesh.H"
41 #include "motionSolver.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // Forward declaration of classes
50 /*---------------------------------------------------------------------------*\
51 Class movingConeTopoFvMesh Declaration
52 \*---------------------------------------------------------------------------*/
54 class movingConeTopoFvMesh
56 public topoChangerFvMesh
61 dictionary motionDict_;
63 //- Motion velocity amplitude
64 vector motionVelAmplitude_;
66 //- Motion velocity period
67 scalar motionVelPeriod_;
69 //- Motion velocity period
75 //- Current left obstacle position
78 //- Current right obstacle position
81 //- Vertex motion mask
82 scalarField motionMask_;
85 // Private Member Functions
87 //- Disallow default bitwise copy construct
88 movingConeTopoFvMesh(const movingConeTopoFvMesh&);
90 //- Disallow default bitwise assignment
91 void operator=(const movingConeTopoFvMesh&);
94 //- Add mixer zones and modifiers
95 void addZonesAndModifiers();
97 //- Markup motion vertices
98 tmp<scalarField> vertexMarkup
101 const scalar& curLeft,
102 const scalar& curRight
108 //- Runtime type information
109 TypeName("movingConeTopoFvMesh");
114 //- Construct from database
115 explicit movingConeTopoFvMesh(const IOobject& io);
120 virtual ~movingConeTopoFvMesh();
125 //- Update the mesh for both mesh motion and topology change
126 virtual bool update();
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 // ************************************************************************* //