rotatingMotion.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::solidBodyMotionFunctions::rotatingMotion
28 
29 Description
30  SolidBodyMotionFvMesh 6DoF motion function.
31 
32  The rotation is defined by an origin and axis of rotation and an angular
33  speed.
34 
35 SourceFiles
36  rotatingMotion.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef rotatingMotion_H
41 #define rotatingMotion_H
42 
44 #include "primitiveFields.H"
45 #include "point.H"
46 #include "Function1.H"
47 #include "autoPtr.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace solidBodyMotionFunctions
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class rotatingMotion Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class rotatingMotion
61 :
63 {
64  // Private data
65 
66  //- Origin of the axis
67  const vector origin_;
68 
69  //- Axis vector
70  const vector axis_;
71 
72  //- Angular velocity (rad/sec)
74 
75 
76  // Private Member Functions
77 
78  //- No copy construct
79  rotatingMotion(const rotatingMotion&) = delete;
80 
81  //- No copy assignment
82  void operator=(const rotatingMotion&) = delete;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("rotatingMotion");
89 
90 
91  // Constructors
92 
93  //- Construct from components
95  (
96  const dictionary& SBMFCoeffs,
97  const Time& runTime
98  );
99 
100  //- Construct and return a clone
102  {
104  (
105  new rotatingMotion
106  (
107  SBMFCoeffs_,
108  time_
109  )
110  );
111  }
112 
113 
114  //- Destructor
115  virtual ~rotatingMotion();
116 
117 
118  // Member Functions
119 
120  //- Return the solid-body motion transformation septernion
121  virtual septernion transformation() const;
122 
123  //- Update properties from given dictionary
124  virtual bool read(const dictionary& SBMFCoeffs);
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace solidBodyMotionFunctions
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
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::rotatingMotion::transformation
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: rotatingMotion.C:75
point.H
Function1.H
primitiveFields.H
Specialisations of Field<T> for scalar, vector and tensor.
Foam::solidBodyMotionFunctions::rotatingMotion::clone
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: rotatingMotion.H:100
Foam::solidBodyMotionFunctions::rotatingMotion::TypeName
TypeName("rotatingMotion")
Runtime type information.
Foam::solidBodyMotionFunction::SBMFCoeffs_
dictionary SBMFCoeffs_
Definition: solidBodyMotionFunction.H:68
Foam::solidBodyMotionFunction
Base class for defining solid-body motions.
Definition: solidBodyMotionFunction.H:62
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::solidBodyMotionFunctions::rotatingMotion
SolidBodyMotionFvMesh 6DoF motion function.
Definition: rotatingMotion.H:59
Foam::solidBodyMotionFunctions::rotatingMotion::read
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: rotatingMotion.C:92
Foam::Vector< scalar >
Foam::solidBodyMotionFunctions::rotatingMotion::~rotatingMotion
virtual ~rotatingMotion()
Destructor.
Definition: rotatingMotion.C:68
Foam::solidBodyMotionFunction::time_
const Time & time_
Definition: solidBodyMotionFunction.H:69
autoPtr.H