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 | 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::tabulated6DoFMotion
29
30Description
31 Tabulated 6DoF motion function.
32
33 Obtained by interpolating tabulated data for surge (x-translation),
34 sway (y-translation), heave (z-translation), roll (rotation about x),
35 pitch (rotation about y) and yaw (rotation about z).
36
37SourceFiles
38 tabulated6DoFMotion.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef tabulated6DoFMotion_H
43#define tabulated6DoFMotion_H
44
46#include "primitiveFields.H"
47#include "Vector2D.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53namespace solidBodyMotionFunctions
54{
55
56/*---------------------------------------------------------------------------*\
57 Class tabulated6DoFMotion Declaration
58\*---------------------------------------------------------------------------*/
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 //- No copy construct
86
87 //- No copy assignment
88 void operator=(const tabulated6DoFMotion&) = delete;
89
90
91public:
92
93 //- Runtime type information
94 TypeName("tabulated6DoFMotion");
95
96
97 // Constructors
98
99 //- Construct from components
101 (
102 const dictionary& SBMFCoeffs,
103 const Time& runTime
104 );
105
106 //- Construct and return a clone
108 {
110 (
112 (
114 time_
115 )
116 );
117 }
118
119
120 //- Destructor
121 virtual ~tabulated6DoFMotion() = default;
122
123
124 // Member Functions
125
126 //- Return the solid-body motion transformation septernion
127 virtual septernion transformation() const;
128
129 //- Update properties from given dictionary
130 virtual bool read(const dictionary& SBMFCoeffs);
131};
132
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136} // End namespace solidBodyMotionFunctions
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:58
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
A class for handling file names.
Definition: fileName.H:76
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:67
Base class for defining solid-body motions.
TypeName("tabulated6DoFMotion")
Runtime type information.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
virtual ~tabulated6DoFMotion()=default
Destructor.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
engineTime & runTime
Namespace for OpenFOAM.
Specialisations of Field<T> for scalar, vector and tensor.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73