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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::movingConeTopoFvMesh
28 
29 Description
30  Sample topoChangerFvMesh that moves an object in x direction
31  and introduces/removes layers.
32 
33 SourceFiles
34  movingConeTopoFvMesh.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef movingConeTopoFvMesh_H
39 #define movingConeTopoFvMesh_H
40 
41 #include "topoChangerFvMesh.H"
42 #include "motionSolver.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 
51 /*---------------------------------------------------------------------------*\
52  Class movingConeTopoFvMesh Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public topoChangerFvMesh
58 {
59  // Private data
60 
61  //- Motion dictionary
62  dictionary motionDict_;
63 
64  //- Motion velocity amplitude
65  vector motionVelAmplitude_;
66 
67  //- Motion velocity period
68  scalar motionVelPeriod_;
69 
70  //- Motion velocity period
71  vector curMotionVel_;
72 
73  //- Left edge
74  scalar leftEdge_;
75 
76  //- Current left obstacle position
77  scalar curLeft_;
78 
79  //- Current right obstacle position
80  scalar curRight_;
81 
82  //- Vertex motion mask
83  scalarField motionMask_;
84 
85 
86  // Private Member Functions
87 
88  //- No copy construct
90 
91  //- No copy assignment
92  void operator=(const movingConeTopoFvMesh&) = delete;
93 
94 
95  //- Add mixer zones and modifiers
96  void addZonesAndModifiers();
97 
98  //- Markup motion vertices
99  tmp<scalarField> vertexMarkup
100  (
101  const pointField& p,
102  const scalar curLeft,
103  const scalar curRight
104  ) const;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("movingConeTopoFvMesh");
111 
112 
113  // Constructors
114 
115  //- Construct from database
116  explicit movingConeTopoFvMesh(const IOobject& io);
117 
118 
119  //- Destructor
120  virtual ~movingConeTopoFvMesh();
121 
122 
123  // Member Functions
124 
125  //- Update the mesh for both mesh motion and topology change
126  virtual bool update();
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::movingConeTopoFvMesh
Sample topoChangerFvMesh that moves an object in x direction and introduces/removes layers.
Definition: movingConeTopoFvMesh.H:54
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::movingConeTopoFvMesh::~movingConeTopoFvMesh
virtual ~movingConeTopoFvMesh()
Destructor.
Definition: movingConeTopoFvMesh.C:302
motionSolver.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
topoChangerFvMesh.H
Foam::movingConeTopoFvMesh::update
virtual bool update()
Update the mesh for both mesh motion and topology change.
Definition: movingConeTopoFvMesh.C:308
Foam::Field< scalar >
Foam::movingConeTopoFvMesh::TypeName
TypeName("movingConeTopoFvMesh")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Vector< scalar >
Foam::topoChangerFvMesh
Abstract base class for a topology changing fvMesh.
Definition: topoChangerFvMesh.H:52