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 threeDofMotionSubset.C
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
34 \*---------------------------------------------------------------------------*/
36 #ifndef threeDofMotionSubset_H
37 #define threeDofMotionSubset_H
39 #include "dynamicFvMesh.H"
40 #include "translationODE.H"
41 #include "polyPatchID.H"
42 #include "ODESolver.H"
43 #include "fvMeshSubset.H"
44 #include "uniformDimensionedFields.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 /*---------------------------------------------------------------------------*\
54 Class threeDofMotionSubset Declaration
55 \*---------------------------------------------------------------------------*/
57 class threeDofMotionSubset
67 translationODE equation_;
70 autoPtr<ODESolver> solver_;
72 //- ODE solver accuracy
77 fvMeshSubset subsetMesh_;
79 //- Mesh motion solver
80 autoPtr<motionSolver> motionPtr_;
82 //- Identifier of a hull patch
83 polyPatchID hullPatch_;
85 //- Identifier of a motion patch on a subset
91 //- Current time index
94 //- Force at the beginning of time-step
98 // Private Member Functions
100 //- Disallow default bitwise copy construct
101 threeDofMotionSubset(const threeDofMotionSubset&);
103 //- Disallow default bitwise assignment
104 void operator=(const threeDofMotionSubset&);
107 //- Return the effective viscous stress (laminar + turbulent).
108 tmp<volSymmTensorField> devRhoReff() const;
110 //- Return force on the hull
111 vector hullForce() const;
116 //- Runtime type information
117 TypeName("threeDofMotionSubset");
122 //- Construct from IOobject
123 threeDofMotionSubset(const IOobject& io);
128 virtual ~threeDofMotionSubset();
133 //- Return reference to subset mesh
134 const fvMeshSubset& subsetMesh() const;
136 //- Update the mesh for both mesh motion and topology change
137 virtual bool update();
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 // ************************************************************************* //