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 | Copyright (C) 2011-2016 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 lamda_;
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  // Private Member Functions
98 
99  //- Disallow copy construct
100  SDA(const SDA&);
101 
102  //- Disallow default bitwise assignment
103  void operator=(const SDA&);
104 
105 
106 public:
107 
108  //- Runtime type information
109  TypeName("SDA");
110 
111 
112  // Constructors
113 
114  //- Construct from components
115  SDA
116  (
117  const dictionary& SBMFCoeffs,
118  const Time& runTime
119  );
120 
121  //- Construct and return a clone
123  {
125  (
126  new SDA
127  (
128  SBMFCoeffs_,
129  time_
130  )
131  );
132  }
133 
134 
135  //- Destructor
136  virtual ~SDA();
137 
138 
139  // Member Functions
140 
141  //- Return the solid-body motion transformation septernion
142  virtual septernion transformation() const;
143 
144  //- Update properties from given dictionary
145  virtual bool read(const dictionary& SBMFCoeffs);
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace solidBodyMotionFunctions
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~SDA()
Destructor.
Definition: SDA.C:61
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:65
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Base class for defining solid-body motions.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: SDA.C:102
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: SDA.H:121
TypeName("SDA")
Runtime type information.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: SDA.C:67
Ship design analysis (SDA) 3DoF motion function.
Definition: SDA.H:56
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Namespace for OpenFOAM.