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
60  dictionary motionDict_;
61 
62  //- Motion velocity amplitude
63  vector motionVelAmplitude_;
64 
65  //- Motion velocity period
66  scalar motionVelPeriod_;
67 
68  //- Motion velocity period
69  vector curMotionVel_;
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
81  scalarField motionMask_;
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
97  tmp<scalarField> vertexMarkup
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 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool update()
Update the mesh for both mesh motion and topology change.
Sample topoChangerFvMesh that moves an object in x direction and introduces/removes layers...
Abstract base class for a topology changing fvMesh.
TypeName("movingConeTopoFvMesh")
Runtime type information.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:54
virtual ~movingConeTopoFvMesh()
Destructor.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Namespace for OpenFOAM.