All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dynamicInterpolatedFvMesh.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) 2018-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::dynamicInterpolatedFvMesh
26 
27 Description
28  Interpolates pre-specified motion specified as a set of pointVectorFields.
29 
30  The motion can be provided either as a set of displacement or position
31  fields and the entry \c displacement specified accordingly.
32 
33 Usage
34  Example:
35  \verbatim
36  dynamicFvMesh dynamicInterpolatedFvMesh;
37 
38  displacementLaplacianCoeffs
39  {
40  field wantedDisplacement;
41  displacement yes;
42  interpolationScheme linear;
43  }
44  \endverbatim
45 
46  This will scan the case for \c wantedDisplacement \c pointVectorFields in
47  the time directories and interpolate those in time (using \c linear
48  interpolation) to obtain the current displacement. The advantage of
49  specifying displacement in this way is that it automatically works in
50  parallel using \c decomposePar to decompose the set of \c pointVectorFields
51  provided.
52 
53 SourceFiles
54  dynamicInterpolatedFvMesh.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef dynamicInterpolatedFvMesh_H
59 #define dynamicInterpolatedFvMesh_H
60 
61 #include "dynamicFvMesh.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class dynamicInterpolatedFvMesh Declaration
71 \*---------------------------------------------------------------------------*/
72 
74 :
75  public dynamicFvMesh
76 {
77  // Private Data
78 
79  dictionary dynamicMeshCoeffs_;
80 
81  dynamicMeshPointInterpolator pointInterpolator_;
82 
83  const Switch displacement_;
84 
85  //- Starting points
86  autoPtr<pointIOField> points0_;
87 
88  //- Optional list of vectorFields to update for mesh motion
89  // For modern solvers using Uf and correctPhi to update the flux
90  // after motion it is not necessary to specify a "velocityFields" list
91  velocityMotionCorrection velocityMotionCorrection_;
92 
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("dynamicInterpolatedFvMesh");
98 
99 
100  // Constructors
101 
102  //- Construct from IOobject
104 
105  //- Disallow default bitwise copy construction
107 
108 
109  //- Destructor
111 
112 
113  // Member Functions
114 
115  //- Update the mesh for both mesh motion and topology change
116  virtual bool update();
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const dynamicInterpolatedFvMesh&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
Interpolates pre-specified motion specified as a set of pointVectorFields.
void operator=(const dynamicInterpolatedFvMesh &)=delete
Disallow default bitwise assignment.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
Helper class to update the velocity boundary conditions.
Definition: dynamicFvMesh.H:85
dynamicInterpolatedFvMesh(const IOobject &io)
Construct from IOobject.
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:49
virtual bool update()
Update the mesh for both mesh motion and topology change.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
TypeName("dynamicInterpolatedFvMesh")
Runtime type information.
Namespace for OpenFOAM.