functionalRigidBody_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) 2018-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::functionalRigidBody
26 
27 Description
28  Multiple rigid body mesh motion in which movement is specified as a
29  solidBodyMotionFunction for each body and optionally for the exterior of the
30  region.
31 
32  Applies distance weighted SLERP interpolation between the septernions
33  returned by each of the body movement functions.
34 
35  The mesh patches for each body must be specified and optionally pointZones
36  that move with each body. The motion of the mesh around each 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 with body but may move by the
40  proximity of other bodies or by the optionally specified exterior motion.
41 
42  Example of the motion of a single body in a stationary region:
43  \verbatim
44  mover
45  {
46  type pointMeshMover;
47 
48  libs ("libpointMeshMovers.so");
49 
50  pointMeshMover
51  {
52  type functionalRigidBody;
53 
54  exterior
55  {
56  innerDistance 0.05;
57  outerDistance 0.35;
58  }
59 
60  patches (floatingObject);
61  innerDistance 0.05;
62  outerDistance 0.35;
63 
64  function
65  {
66  type oscillatingRotatingMotion;
67  origin (0.5 0.45 0.35);
68  amplitude (0 10 0);
69  omega 2;
70  }
71  }
72  }
73  \endverbatim
74 
75  Example of the motion of a two bodies in a moving region all of which
76  rotate around the same axis with an oscillatory manner:
77  \verbatim
78  mover
79  {
80  type pointMeshMover;
81 
82  libs ("libpointMeshMovers.so");
83 
84  pointMeshMover
85  {
86  type functionalRigidBody;
87 
88  exterior
89  {
90  innerDistance 0.05;
91  outerDistance 0.35;
92 
93  function
94  {
95  type oscillatingRotatingMotion;
96  origin (0.5 0.45 0.35);
97  amplitude (0 1 0);
98  omega 1;
99  }
100  }
101 
102  bodies
103  {
104  floatingObject1
105  {
106  patches (floatingObject1);
107  innerDistance 0.05;
108  outerDistance 0.3;
109 
110  function
111  {
112  type oscillatingRotatingMotion;
113  origin (0.5 0.45 0.35);
114  amplitude (0 5 0);
115  omega 2;
116  }
117  }
118 
119  floatingObject2
120  {
121  patches (floatingObject2);
122  innerDistance 0.05;
123  outerDistance 0.3;
124 
125  function
126  {
127  type oscillatingRotatingMotion;
128  origin (0.5 0.45 0.35);
129  amplitude (0 5 0);
130  omega -2;
131  }
132  }
133  }
134  }
135  }
136  \endverbatim
137 
138 See also
139  Foam::multiRigidBodyMeshMotion
140 
141 SourceFiles
142  functionalRigidBody.C
143 
144 \*---------------------------------------------------------------------------*/
145 
146 #ifndef functionalRigidBody_pointMeshMover_H
147 #define functionalRigidBody_pointMeshMover_H
148 
150 #include "solidBodyMotionFunction.H"
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 namespace Foam
155 {
156 namespace pointMeshMovers
157 {
158 
159 /*---------------------------------------------------------------------------*\
160  Class functionalRigidBody Declaration
161 \*---------------------------------------------------------------------------*/
162 
164 :
165  public multiRigidBody
166 {
167  // Private Data
168 
169  //- Body motion control functions
171 
172 
173  // Private Member Functions
174 
175  //- Return the list of transformation for each body from time 0
176  virtual List<septernion> transforms0() const;
177 
178  //- Move the bodies
179  virtual void moveBodies();
180 
181 
182 public:
183 
184  //- Runtime type information
185  TypeName("functionalRigidBody");
186 
187 
188  // Constructors
189 
190  //- Construct from polyMesh and dictionary
192 
193  //- Disallow default bitwise copy construction
194  functionalRigidBody(const functionalRigidBody&) = delete;
195 
196 
197  //- Destructor
199 
200 
201  // Member Operators
202 
203  //- Disallow default bitwise assignment
204  void operator=(const functionalRigidBody&) = delete;
205 };
206 
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace pointMeshMovers
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #endif
216 
217 // ************************************************************************* //
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 templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Multiple rigid body mesh motion in which movement is specified as a solidBodyMotionFunction for each ...
functionalRigidBody(const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
void operator=(const functionalRigidBody &)=delete
Disallow default bitwise assignment.
TypeName("functionalRigidBody")
Runtime type information.
Abstract base-class for multiple rigid body mesh motion.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
Namespace for OpenFOAM.
dictionary dict