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-2023 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 dictionary& SBMFCoeffs,
109  const Time& runTime
110  );
111 
112  //- Disallow default bitwise copy construction
113  SDA(const SDA&) = delete;
114 
115 
116  //- Construct and return a clone
118  {
120  (
121  new SDA
122  (
123  SBMFCoeffs_,
124  time_
125  )
126  );
127  }
128 
129 
130  //- Destructor
131  virtual ~SDA();
132 
133 
134  // Member Functions
135 
136  //- Return the solid-body motion transformation septernion
137  virtual septernion transformation() const;
138 
139  //- Update properties from given dictionary
140  virtual bool read(const dictionary& SBMFCoeffs);
141 
142 
143  // Member Operators
144 
145  //- Disallow default bitwise assignment
146  void operator=(const SDA&) = delete;
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace solidBodyMotionFunctions
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
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 keyword definitions, which are a keyword followed by any number of values (e....
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:61
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: SDA.H:116
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: SDA.C:67
SDA(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:102
Namespace for OpenFOAM.