All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rotatingMotion.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::rotatingMotion
26 
27 Description
28  SolidBodyMotionFvMesh 6DoF motion function.
29 
30  The rotation is defined by an origin and axis of rotation and an angular
31  speed.
32 
33 SourceFiles
34  rotatingMotion.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef rotatingMotion_H
39 #define rotatingMotion_H
40 
42 #include "primitiveFields.H"
43 #include "point.H"
44 #include "Function1.H"
45 #include "autoPtr.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace solidBodyMotionFunctions
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class rotatingMotion Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class rotatingMotion
59 :
61 {
62  // Private Data
63 
64  //- Origin of the axis
65  const vector origin_;
66 
67  //- Axis vector
68  const vector axis_;
69 
70  //- Angular velocity (rad/sec)
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("rotatingMotion");
78 
79 
80  // Constructors
81 
82  //- Construct from components
84  (
85  const dictionary& SBMFCoeffs,
86  const Time& runTime
87  );
88 
89  //- Disallow default bitwise copy construction
91 
92 
93  //- Construct and return a clone
95  {
97  (
98  new rotatingMotion
99  (
100  SBMFCoeffs_,
101  time_
102  )
103  );
104  }
105 
106 
107  //- Destructor
108  virtual ~rotatingMotion();
109 
110 
111  // Member Functions
112 
113  //- Return the solid-body motion transformation septernion
114  virtual septernion transformation() const;
115 
116  //- Update properties from given dictionary
117  virtual bool read(const dictionary& SBMFCoeffs);
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const rotatingMotion&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace solidBodyMotionFunctions
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
SolidBodyMotionFvMesh 6DoF motion function.
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
engineTime & runTime
void operator=(const rotatingMotion &)=delete
Disallow default bitwise assignment.
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
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Base class for defining solid-body motions.
rotatingMotion(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
TypeName("rotatingMotion")
Runtime type information.
Specialisations of Field<T> for scalar, vector and tensor.
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.