FreeFOAM The Cross-Platform CFD Toolkit
SKA.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) 1991-2010 OpenCFD Ltd.
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::SKA
26 
27 Description
28  Sea Keeping Analysis (SKA) 6DoF motion function.
29 
30  Obtained by interpolating tabulated data for surge (x-translation),
31  sway (y-translation), heave (z-translation), roll (rotation about x),
32  pitch (rotation about y) and yaw (rotation about z).
33 
34 See Also
35  SDA (Ship design analysis) for 3DoF motion.
36 
37 SourceFiles
38  SKA.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef SKA_H
43 #define SKA_H
44 
47 #include <OpenFOAM/Vector2D_.H>
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace solidBodyMotionFunctions
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class SKA Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class SKA
61 :
63 {
64  // Private data
65 
66  //- Time data file name read from dictionary
67  fileName timeDataFileName_;
68 
69  //- Center of gravity read from dictionary
70  vector CofG_;
71 
72  //- Type used to read in the translation and rotation "vectors"
74 
75  //- Field of times
76  scalarField times_;
77 
78  //- Field of translation and rotation "vectors"
80 
81 
82  // Private Member Functions
83 
84  //- Disallow copy construct
85  SKA(const SKA&);
86 
87  //- Disallow default bitwise assignment
88  void operator=(const SKA&);
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("SKA");
95 
96 
97  // Constructors
98 
99  //- Construct from components
100  SKA
101  (
102  const dictionary& SBMFCoeffs,
103  const Time& runTime
104  );
105 
106 
107  // Destructor
108 
109  virtual ~SKA();
110 
111 
112  // Member Functions
113 
114  //- Return the solid-body motion transformation septernion
115  virtual septernion transformation() const;
116 
117  //- Update properties from given dictionary
118  virtual bool read(const dictionary& SBMFCoeffs);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace solidBodyMotionFunctions
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************ vim: set sw=4 sts=4 et: ************************ //