sixDoFRigidBodyMotion_pointMeshMover.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) 2013-2026 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::pointMeshMovers::sixDoFRigidBodyMotion
26 
27 Description
28  Single rigid body mesh motion in which movement of the bodies is
29  generated by Foam::sixDoFRigidBodyMotion.
30 
31  Applies distance weighted SLERP interpolation between the septernion
32  transformations of the body returned provided by the
33  Foam::sixDoFRigidBodyMotion solution and the static exterior of the region.
34 
35  The mesh patches for body must be specified and optionally pointZones that
36  move with the body. The motion of the mesh around the body may be
37  constrained by the optional \c innerDistance and \c outerDistance, the mesh
38  within the \c innerDistance moves with the body without distortion and the
39  mesh beyond the \c outerDistance does not move.
40 
41 See also
42  Foam::sixDoFRigidBodyMotion
43  Foam::pointMeshMovers::multiRigidBody
44 
45 SourceFiles
46  sixDoFRigidBodyMeshMotion.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef sixDoFRigidBodyMotion_pointMeshMover_H
51 #define sixDoFRigidBodyMotion_pointMeshMover_H
52 
54 #include "sixDoFRigidBodyMotion.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace pointMeshMovers
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class sixDoFRigidBodyMotion Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 :
71 {
72  // Private Data
73 
74  //- Switch for test-mode in which only the
75  // gravitational body-force is applied
76  Switch test_;
77 
78  //- Reference density required by the forces object for
79  // incompressible calculations, required if rho == rhoInf
80  scalar rhoInf_;
81 
82  //- Name of density field, optional unless used for an
83  // incompressible simulation, when this needs to be specified
84  // as rhoInf
85  word rhoName_;
86 
87  //- Optional acceleration due to gravity
89 
90  //- Current time index (used for updating)
91  label curTimeIndex_;
92 
93 
94  // Private Member Functions
95 
96  //- Return the list of transformation for each body from time 0
97  virtual List<septernion> transforms0() const;
98 
99  //- Move the bodies
100  virtual void moveBodies();
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("sixDoFRigidBodyMotion");
107 
108 
109  // Constructors
110 
111  //- Construct from polyMesh and dictionary
113 
114  //- Disallow default bitwise copy construction
116 
117 
118  //- Destructor
120 
121 
122  // Member Functions
123 
124  //- Write motion state information for restart
125  virtual bool write() const;
126 
127 
128  // Member Operators
129 
130  //- Disallow default bitwise assignment
131  void operator=(const sixDoFRigidBodyMotion&) = delete;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace pointMeshMovers
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Abstract base-class for multiple rigid body mesh motion.
Single rigid body mesh motion in which movement of the bodies is generated by Foam::sixDoFRigidBodyMo...
TypeName("sixDoFRigidBodyMotion")
Runtime type information.
void operator=(const sixDoFRigidBodyMotion &)=delete
Disallow default bitwise assignment.
virtual bool write() const
Write motion state information for restart.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
Six degree of freedom motion for a rigid body.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict