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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::solidBodyMotionFunctions::SDA
29 
30 Description
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 
36 See also
37  Foam::solidBodyMotionFunctions::tabulated6DoFMotion
38 
39 SourceFiles
40  SDA.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef SDA_H
45 #define SDA_H
46 
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace solidBodyMotionFunctions
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class SDA Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class 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 
109 public:
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  (
131  SBMFCoeffs_,
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 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
solidBodyMotionFunction.H
Foam::septernion
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:66
Foam::solidBodyMotionFunctions::SDA::transformation
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: SDA.C:64
Foam::solidBodyMotionFunction::SBMFCoeffs_
dictionary SBMFCoeffs_
Definition: solidBodyMotionFunction.H:69
Foam::solidBodyMotionFunction
Base class for defining solid-body motions.
Definition: solidBodyMotionFunction.H:63
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::solidBodyMotionFunctions::SDA::clone
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: SDA.H:124
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
Foam::solidBodyMotionFunctions::SDA
Ship design analysis (SDA) 3DoF motion function.
Definition: SDA.H:59
Foam::solidBodyMotionFunction::time_
const Time & time_
Definition: solidBodyMotionFunction.H:71
Foam::solidBodyMotionFunctions::SDA::TypeName
TypeName("SDA")
Runtime type information.
Foam::solidBodyMotionFunctions::SDA::read
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: SDA.C:99
Foam::solidBodyMotionFunctions::SDA::~SDA
virtual ~SDA()=default
Destructor.