1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::solidBodyMotionFunction::constantVelocity
29 Prescribed constant translational and angular velocity.
35 Vuko Vukcevic, FMENA Zagreb. All rights reserved.
37 \*---------------------------------------------------------------------------*/
39 #ifndef constantVelocity_H
40 #define constantVelocity_H
42 #include "solidBodyMotionFunction.H"
43 #include "primitiveFields.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace solidBodyMotionFunctions
53 /*---------------------------------------------------------------------------*\
54 Class constantVelocity Declaration
55 \*---------------------------------------------------------------------------*/
57 class constantVelocity
59 public solidBodyMotionFunction
66 //- Translational velocity vector
67 vector transVelocity_;
69 //- Rotational velocity vector
73 scalar startMotionTime_;
75 //- Is the rotational velocity given in degrees/sec
79 // Private Member Functions
81 //- Disallow copy construct
82 constantVelocity(const constantVelocity&);
84 //- Disallow default bitwise assignment
85 void operator=(const constantVelocity&);
87 //- Calculate tranformation
88 septernion calcTransformation(const scalar t) const;
93 //- Runtime type information
94 TypeName("constantVelocity");
99 //- Construct from components
102 const dictionary& SBMFCoeffs,
108 virtual ~constantVelocity()
114 //- Return the solid-body motion transformation septernion
115 virtual septernion transformation() const;
117 //- Return the solid-body motion velocity
118 virtual septernion velocity() const;
120 //- Update properties from given dictionary
121 virtual bool read(const dictionary& SBMFCoeffs);
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 } // End namespace solidBodyMotionFunctions
128 } // End namespace Foam
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 // ************************************************************************* //