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
29 Harmonic mesh motion: 6-DOF translation and rotation
30 with independent amplitudes, periods and phase lags
36 Hrvoje Jasak, Wikki Ltd. All rights reserved.
38 \*---------------------------------------------------------------------------*/
40 #ifndef harmonicSolidMotion_H
41 #define harmonicSolidMotion_H
43 #include "dynamicFvMesh.H"
44 #include "dimensionedTypes.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 /*---------------------------------------------------------------------------*\
54 Class harmonicSolidMotion Declaration
55 \*---------------------------------------------------------------------------*/
57 class harmonicSolidMotion
63 //- Moving mesh dictionary
66 //- Reference points from constant directory
67 pointIOField refPoints_;
75 //- Translation amplitude
78 //- Translation period
87 //- Rotation amplitude
97 // Private Member Functions
99 //- Disallow default bitwise copy construct
100 harmonicSolidMotion(const harmonicSolidMotion&);
102 //- Disallow default bitwise assignment
103 void operator=(const harmonicSolidMotion&);
106 // Return current position of centroid
107 vector centre() const;
109 //- Return current local-to-global transform
110 vector rotation() const;
112 //- Convert period to frequency
113 static vector periodToFreq(const vector deg);
118 //- Runtime type information
119 TypeName("harmonicSolidMotion");
124 //- Construct from IOobject
125 harmonicSolidMotion(const IOobject& io);
130 ~harmonicSolidMotion();
135 //- Update the mesh for both mesh motion and topology change
136 virtual bool update();
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //