movingConeTopoFvMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::movingConeTopoFvMesh
26 
27 Description
28  Sample topoChangerFvMesh that moves an object in x direction
29  and introduces/removes layers.
30 
31 SourceFiles
32  movingConeTopoFvMesh.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef movingConeTopoFvMesh_H
37 #define movingConeTopoFvMesh_H
38 
39 #include "topoChangerFvMesh.H"
40 #include "motionSolver.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 
49 /*---------------------------------------------------------------------------*\
50  Class movingConeTopoFvMesh Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public topoChangerFvMesh
56 {
57  // Private data
58 
59  //- Motion dictionary
61 
62  //- Motion velocity amplitude
64 
65  //- Motion velocity period
66  scalar motionVelPeriod_;
67 
68  //- Motion velocity period
70 
71  //- Left edge
72  scalar leftEdge_;
73 
74  //- Current left obstacle position
75  scalar curLeft_;
76 
77  //- Current right obstacle position
78  scalar curRight_;
79 
80  //- Vertex motion mask
82 
83 
84  // Private Member Functions
85 
86  //- Disallow default bitwise copy construct
88 
89  //- Disallow default bitwise assignment
90  void operator=(const movingConeTopoFvMesh&);
91 
92 
93  //- Add mixer zones and modifiers
94  void addZonesAndModifiers();
95 
96  //- Markup motion vertices
98  (
99  const pointField& p,
100  const scalar curLeft,
101  const scalar curRight
102  ) const;
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("movingConeTopoFvMesh");
109 
110 
111  // Constructors
112 
113  //- Construct from database
114  explicit movingConeTopoFvMesh(const IOobject& io);
115 
116 
117  //- Destructor
118  virtual ~movingConeTopoFvMesh();
119 
120 
121  // Member Functions
122 
123  //- Update the mesh for both mesh motion and topology change
124  virtual bool update();
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::movingConeTopoFvMesh
Sample topoChangerFvMesh that moves an object in x direction and introduces/removes layers.
Definition: movingConeTopoFvMesh.H:52
Foam::movingConeTopoFvMesh::~movingConeTopoFvMesh
virtual ~movingConeTopoFvMesh()
Destructor.
Definition: movingConeTopoFvMesh.C:310
p
p
Definition: pEqn.H:62
Foam::movingConeTopoFvMesh::movingConeTopoFvMesh
movingConeTopoFvMesh(const movingConeTopoFvMesh &)
Disallow default bitwise copy construct.
motionSolver.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
topoChangerFvMesh.H
Foam::movingConeTopoFvMesh::curMotionVel_
vector curMotionVel_
Motion velocity period.
Definition: movingConeTopoFvMesh.H:68
Foam::movingConeTopoFvMesh::update
virtual bool update()
Update the mesh for both mesh motion and topology change.
Definition: movingConeTopoFvMesh.C:316
Foam::movingConeTopoFvMesh::operator=
void operator=(const movingConeTopoFvMesh &)
Disallow default bitwise assignment.
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::movingConeTopoFvMesh::motionMask_
scalarField motionMask_
Vertex motion mask.
Definition: movingConeTopoFvMesh.H:80
Foam::movingConeTopoFvMesh::motionVelPeriod_
scalar motionVelPeriod_
Motion velocity period.
Definition: movingConeTopoFvMesh.H:65
Foam::movingConeTopoFvMesh::TypeName
TypeName("movingConeTopoFvMesh")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::movingConeTopoFvMesh::curLeft_
scalar curLeft_
Current left obstacle position.
Definition: movingConeTopoFvMesh.H:74
Foam::movingConeTopoFvMesh::addZonesAndModifiers
void addZonesAndModifiers()
Add mixer zones and modifiers.
Definition: movingConeTopoFvMesh.C:84
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::movingConeTopoFvMesh::motionVelAmplitude_
vector motionVelAmplitude_
Motion velocity amplitude.
Definition: movingConeTopoFvMesh.H:62
Foam::movingConeTopoFvMesh::vertexMarkup
tmp< scalarField > vertexMarkup(const pointField &p, const scalar curLeft, const scalar curRight) const
Markup motion vertices.
Definition: movingConeTopoFvMesh.C:52
Foam::Vector< scalar >
Foam::topoChangerFvMesh
Abstract base class for a topology changing fvMesh.
Definition: topoChangerFvMesh.H:50
Foam::movingConeTopoFvMesh::curRight_
scalar curRight_
Current right obstacle position.
Definition: movingConeTopoFvMesh.H:77
Foam::movingConeTopoFvMesh::motionDict_
dictionary motionDict_
Motion dictionary.
Definition: movingConeTopoFvMesh.H:59
Foam::movingConeTopoFvMesh::leftEdge_
scalar leftEdge_
Left edge.
Definition: movingConeTopoFvMesh.H:71