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-2024 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 private:
63 
64  // Private Data
65 
66  //- Center of gravity read from dictionary
67  vector CofG_;
68 
69  //- Translation function
70  autoPtr<Function1<vector>> translation_;
71 
72  //- Rotation function
73  autoPtr<Function1<vector>> rotation_;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("sixDoFMotion");
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const dictionary& SBMFCoeffs,
88  const Time& runTime
89  );
90 
91  //- Disallow default bitwise copy construction
92  sixDoFMotion(const sixDoFMotion&) = delete;
93 
94  //- Construct and return a clone
96  {
98  (
99  new sixDoFMotion
100  (
101  SBMFCoeffs_,
102  time_
103  )
104  );
105  }
106 
107 
108  //- Destructor
109  virtual ~sixDoFMotion();
110 
111 
112  // Member Functions
113 
114  //- Return the solid-body motion transformation septernion
115  virtual septernion transformation() const;
116 
117  //- Update properties from given dictionary
118  virtual bool read(const dictionary& SBMFCoeffs);
119 
120 
121  // Member Operators
122 
123  //- Disallow default bitwise assignment
124  void operator=(const sixDoFMotion&) = delete;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace solidBodyMotionFunctions
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:66
Base class for defining solid-body motions.
Tabulated 6DoF motion function.
Definition: sixDoFMotion.H:60
void operator=(const sixDoFMotion &)=delete
Disallow default bitwise assignment.
TypeName("sixDoFMotion")
Runtime type information.
sixDoFMotion(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
Definition: sixDoFMotion.C:51
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: sixDoFMotion.H:94
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: sixDoFMotion.C:71
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: sixDoFMotion.C:88
Namespace for OpenFOAM.
Specialisations of Field<T> for scalar, vector and tensor.