SDA.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::solidBodyMotionFunctions::SDA
29
30Description
31 Ship design analysis (SDA) 3DoF motion function.
32
33 Comprising sinusoidal roll (rotation about x), heave (z-translation)
34 and sway (y-translation) motions with changing amplitude and phase.
35
36See also
37 Foam::solidBodyMotionFunctions::tabulated6DoFMotion
38
39SourceFiles
40 SDA.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef SDA_H
45#define SDA_H
46
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53namespace solidBodyMotionFunctions
54{
55
56/*---------------------------------------------------------------------------*\
57 Class SDA Declaration
58\*---------------------------------------------------------------------------*/
60class SDA
61:
63{
64 // Private Data
65
66 //- Center of gravity
67 vector CofG_;
68
69 //- Model scale ratio
70 scalar lamda_;
71
72 //- Max roll amplitude [rad]
73 scalar rollAmax_;
74
75 //- Min roll amplitude [rad]
76 scalar rollAmin_;
77
78 //- Heave amplitude [m]
79 scalar heaveA_;
80
81 //- Sway amplitude [m]
82 scalar swayA_;
83
84 //- Damping Coefficient [-]
85 scalar Q_;
86
87 //- Time Period for liquid [sec]
88 scalar Tp_;
89
90 //- Natural Period of Ship [sec]
91 scalar Tpn_;
92
93 //- Reference time step [sec]
94 scalar dTi_;
95
96 //- Incr. in Tp/unit 'dTi'[-]
97 scalar dTp_;
98
99
100 // Private Member Functions
101
102 //- No copy construct
103 SDA(const SDA&) = delete;
104
105 //- No copy assignment
106 void operator=(const SDA&) = delete;
107
108
109public:
110
111 //- Runtime type information
112 TypeName("SDA");
113
114
115 // Constructors
116
117 //- Construct from components
118 SDA
119 (
120 const dictionary& SBMFCoeffs,
121 const Time& runTime
122 );
123
124 //- Construct and return a clone
126 {
128 (
129 new SDA
130 (
132 time_
133 )
134 );
135 }
136
137
138 //- Destructor
139 virtual ~SDA() = default;
140
141
142 // Member Functions
143
144 //- Return the solid-body motion transformation septernion
145 virtual septernion transformation() const;
146
147 //- Update properties from given dictionary
148 virtual bool read(const dictionary& SBMFCoeffs);
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:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:67
Base class for defining solid-body motions.
Ship design analysis (SDA) 3DoF motion function.
Definition: SDA.H:62
TypeName("SDA")
Runtime type information.
virtual ~SDA()=default
Destructor.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: SDA.C:64
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: SDA.H:124
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: SDA.C:99
engineTime & runTime
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73