tabulated6DoFMotion.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-2013 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::tabulated6DoFMotion
26 
27 Description
28  Tabulated 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 SourceFiles
35  tabulated6DoFMotion.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef tabulated6DoFMotion_H
40 #define tabulated6DoFMotion_H
41 
43 #include "primitiveFields.H"
44 #include "Vector2D.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace solidBodyMotionFunctions
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class tabulated6DoFMotion Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
60 {
61  // Private data
62 
63  //- Time data file name read from dictionary
65 
66  //- Center of gravity read from dictionary
67  vector CofG_;
68 
69  //- Type used to read in the translation and rotation "vectors"
71 
72  //- Field of times
74 
75  //- Field of translation and rotation "vectors"
77 
78 
79  // Private Member Functions
80 
81  //- Disallow copy construct
83 
84  //- Disallow default bitwise assignment
85  void operator=(const tabulated6DoFMotion&);
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("tabulated6DoFMotion");
92 
93 
94  // Constructors
95 
96  //- Construct from components
98  (
99  const dictionary& SBMFCoeffs,
100  const Time& runTime
101  );
102 
103  //- Construct and return a clone
105  {
107  (
109  (
110  SBMFCoeffs_,
111  time_
112  )
113  );
114  }
115 
116 
117  //- Destructor
118  virtual ~tabulated6DoFMotion();
119 
120 
121  // Member Functions
122 
123  //- Return the solid-body motion transformation septernion
124  virtual septernion transformation() const;
125 
126  //- Update properties from given dictionary
127  virtual bool read(const dictionary& SBMFCoeffs);
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace solidBodyMotionFunctions
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
solidBodyMotionFunction.H
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::clone
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: tabulated6DoFMotion.H:103
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::septernion
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:64
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::times_
scalarField times_
Field of times.
Definition: tabulated6DoFMotion.H:72
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: tabulated6DoFMotion.C:118
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::~tabulated6DoFMotion
virtual ~tabulated6DoFMotion()
Destructor.
Definition: tabulated6DoFMotion.C:68
Foam::Vector2D
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:51
primitiveFields.H
Specialisations of Field<T> for scalar, vector and tensor.
Foam::solidBodyMotionFunctions::tabulated6DoFMotion
Tabulated 6DoF motion function.
Definition: tabulated6DoFMotion.H:56
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::translationRotationVectors
Vector2D< vector > translationRotationVectors
Type used to read in the translation and rotation "vectors".
Definition: tabulated6DoFMotion.H:69
Vector2D.H
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: tabulated6DoFMotion.C:75
Foam::solidBodyMotionFunction::SBMFCoeffs_
dictionary SBMFCoeffs_
Definition: solidBodyMotionFunction.H:66
Foam::solidBodyMotionFunction
Base class for defining solid-body motions.
Definition: solidBodyMotionFunction.H:60
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::timeDataFileName_
fileName timeDataFileName_
Time data file name read from dictionary.
Definition: tabulated6DoFMotion.H:63
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion
tabulated6DoFMotion(const tabulated6DoFMotion &)
Disallow copy construct.
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::operator=
void operator=(const tabulated6DoFMotion &)
Disallow default bitwise assignment.
Foam::Vector< scalar >
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::values_
Field< translationRotationVectors > values_
Field of translation and rotation "vectors".
Definition: tabulated6DoFMotion.H:75
Foam::solidBodyMotionFunction::time_
const Time & time_
Definition: solidBodyMotionFunction.H:67
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::TypeName
TypeName("tabulated6DoFMotion")
Runtime type information.
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::CofG_
vector CofG_
Center of gravity read from dictionary.
Definition: tabulated6DoFMotion.H:66