All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
movingConeTopoFvMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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  //- Add mixer zones and modifiers
87  void addZonesAndModifiers();
88 
89  //- Markup motion vertices
90  tmp<scalarField> vertexMarkup
91  (
92  const pointField& p,
93  const scalar curLeft,
94  const scalar curRight
95  ) const;
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("movingConeTopoFvMesh");
102 
103 
104  // Constructors
105 
106  //- Construct from database
107  explicit movingConeTopoFvMesh(const IOobject& io);
108 
109  //- Disallow default bitwise copy construction
111 
112 
113  //- Destructor
114  virtual ~movingConeTopoFvMesh();
115 
116 
117  // Member Functions
118 
119  //- Update the mesh for both mesh motion and topology change
120  virtual bool update();
121 
122 
123  // Member Operators
124 
125  //- Disallow default bitwise assignment
126  void operator=(const movingConeTopoFvMesh&) = delete;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
movingConeTopoFvMesh(const IOobject &io)
Construct from database.
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.
void operator=(const movingConeTopoFvMesh &)=delete
Disallow default bitwise assignment.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
virtual ~movingConeTopoFvMesh()
Destructor.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.