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 Dynamic mesh class accomodating solid body motion based on a
30 3-DOF translational solver.
36 Hrvoje Jasak, Wikki Ltd. All rights reserved
38 \*---------------------------------------------------------------------------*/
40 #ifndef threeDofMotion_H
41 #define threeDofMotion_H
43 #include "dynamicFvMesh.H"
44 #include "translationODE.H"
45 #include "polyPatchID.H"
46 #include "ODESolver.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class threeDofMotion Declaration
57 \*---------------------------------------------------------------------------*/
69 translationODE equation_;
72 autoPtr<ODESolver> solver_;
74 //- ODE solver accuracy
77 //- Mesh motion solver
78 autoPtr<motionSolver> motionPtr_;
80 //- Identifier of a hull patch
81 polyPatchID hullPatch_;
83 //- Current time index
86 //- Force at the beginning of time-step
90 // Private Member Functions
92 //- Disallow default bitwise copy construct
93 threeDofMotion(const threeDofMotion&);
95 //- Disallow default bitwise assignment
96 void operator=(const threeDofMotion&);
99 //- Return the effective viscous stress (laminar + turbulent).
100 tmp<volSymmTensorField> devRhoReff() const;
102 //- Return force on the hull
103 vector hullForce() const;
108 //- Runtime type information
109 TypeName("threeDofMotion");
114 //- Construct from IOobject
115 threeDofMotion(const IOobject& io);
120 virtual ~threeDofMotion();
125 //- Update the mesh for both mesh motion and topology change
126 virtual bool update();
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 // ************************************************************************* //