sixDoFMotion.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-2020 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::solidBodyMotionFunctions::sixDoFMotion
26 
27 Description
28  Tabulated 6DoF motion function.
29 
30  Obtained by interpolating tabulated data for surge (x-translation),
31  sway (y-translation), heave (z-translation), roll (rotation about x),
32  pitch (rotation about y) and yaw (rotation about z).
33 
34 SourceFiles
35  sixDoFMotion.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef sixDoFMotion_H
40 #define sixDoFMotion_H
41 
43 #include "Function1.H"
44 #include "Vector2D.H"
45 #include "primitiveFields.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace solidBodyMotionFunctions
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class sixDoFMotion Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class sixDoFMotion
59 :
61 {
62 public:
63 
64  //- Type used to read in the translation and rotation "vectors"
66 
67 
68 private:
69 
70  // Private Data
71 
72  //- Center of gravity read from dictionary
73  vector CofG_;
74 
75  //- Translation and rotation function
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("sixDoFMotion");
83 
84 
85  // Constructors
86 
87  //- Construct from components
89  (
90  const dictionary& SBMFCoeffs,
91  const Time& runTime
92  );
93 
94  //- Disallow default bitwise copy construction
95  sixDoFMotion(const sixDoFMotion&);
96 
97 
98  //- Construct and return a clone
100  {
102  (
103  new sixDoFMotion
104  (
105  SBMFCoeffs_,
106  time_
107  )
108  );
109  }
110 
111 
112  //- Destructor
113  virtual ~sixDoFMotion();
114 
115 
116  // Member Functions
117 
118  //- Return the solid-body motion transformation septernion
119  virtual septernion transformation() const;
120 
121  //- Update properties from given dictionary
122  virtual bool read(const dictionary& SBMFCoeffs);
123 
124 
125  // Member Operators
126 
127  //- Disallow default bitwise assignment
128  void operator=(const sixDoFMotion&) = delete;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace solidBodyMotionFunctions
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: sixDoFMotion.C:136
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:65
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
Tabulated 6DoF motion function.
Definition: sixDoFMotion.H:57
Vector2D< vector > translationRotationVectors
Type used to read in the translation and rotation "vectors".
Definition: sixDoFMotion.H:64
Base class for defining solid-body motions.
TypeName("sixDoFMotion")
Runtime type information.
Specialisations of Field<T> for scalar, vector and tensor.
void operator=(const sixDoFMotion &)=delete
Disallow default bitwise assignment.
sixDoFMotion(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
Definition: sixDoFMotion.C:116
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).
Definition: Vector2D.H:51
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: sixDoFMotion.C:155
Namespace for OpenFOAM.
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: sixDoFMotion.H:98