SDA.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-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::solidBodyMotionFunctions::SDA
26 
27 Description
28  Ship design analysis (SDA) 3DoF motion function.
29 
30  Comprising sinusoidal roll (rotation about x), heave (z-translation)
31  and sway (y-translation) motions with changing amplitude and phase.
32 
33 See also
34  Foam::solidBodyMotionFunctions::tabulated6DoFMotion
35 
36 SourceFiles
37  SDA.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef SDA_H
42 #define SDA_H
43 
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace solidBodyMotionFunctions
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class SDA Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class SDA
58 :
60 {
61  // Private Data
62 
63  //- Center of gravity
64  vector CofG_;
65 
66  //- Model scale ratio
67  scalar lambda_;
68 
69  //- Max roll amplitude [rad]
70  scalar rollAmax_;
71 
72  //- Min roll amplitude [rad]
73  scalar rollAmin_;
74 
75  //- Heave amplitude [m]
76  scalar heaveA_;
77 
78  //- Sway amplitude [m]
79  scalar swayA_;
80 
81  //- Damping Coefficient [-]
82  scalar Q_;
83 
84  //- Time Period for liquid [sec]
85  scalar Tp_;
86 
87  //- Natural Period of Ship [sec]
88  scalar Tpn_;
89 
90  //- Reference time step [sec]
91  scalar dTi_;
92 
93  //- Incr. in Tp/unit 'dTi'[-]
94  scalar dTp_;
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("SDA");
101 
102 
103  // Constructors
104 
105  //- Construct from components
106  SDA
107  (
108  const word& name,
109  const dictionary& SBMFCoeffs,
110  const Time& runTime
111  );
112 
113  //- Disallow default bitwise copy construction
114  SDA(const SDA&) = delete;
115 
116 
117  //- Construct and return a clone
119  {
121  (
122  new SDA
123  (
124  name_,
125  SBMFCoeffs_,
126  time_
127  )
128  );
129  }
130 
131 
132  //- Destructor
133  virtual ~SDA();
134 
135 
136  // Member Functions
137 
138  //- Return the solid-body motion transformation septernion
139  virtual septernion transformation() const;
140 
141  //- Update properties from given dictionary
142  virtual bool read(const dictionary& SBMFCoeffs);
143 
144 
145  // Member Operators
146 
147  //- Disallow default bitwise assignment
148  void operator=(const SDA&) = delete;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace solidBodyMotionFunctions
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
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.
Ship design analysis (SDA) 3DoF motion function.
Definition: SDA.H:59
TypeName("SDA")
Runtime type information.
void operator=(const SDA &)=delete
Disallow default bitwise assignment.
virtual ~SDA()
Destructor.
Definition: SDA.C:62
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: SDA.H:117
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: SDA.C:68
SDA(const word &name, const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
Definition: SDA.C:47
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: SDA.C:103
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.