1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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::displacementSBRStressFvMotionSolver
29 Mesh motion solver for an fvMesh. Based on solving the cell-centre
30 solid-body rotation stress equations for the motion displacement.
33 displacementSBRStressFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef displacementSBRStressFvMotionSolver_H
38 #define displacementSBRStressFvMotionSolver_H
40 #include "displacementFvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51 Class displacementSBRStressFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class displacementSBRStressFvMotionSolver
56 public displacementFvMotionSolver
60 //- Point motion field
61 mutable pointVectorField pointDisplacement_;
63 //- Cell-centre motion field
64 mutable volVectorField cellDisplacement_;
66 //- Diffusivity used to control the motion
67 autoPtr<motionDiffusivity> diffusivityPtr_;
70 // Private Member Functions
72 //- Disallow default bitwise copy construct
73 displacementSBRStressFvMotionSolver
75 const displacementSBRStressFvMotionSolver&
78 //- Disallow default bitwise assignment
79 void operator=(const displacementSBRStressFvMotionSolver&);
84 //- Runtime type information
85 TypeName("displacementSBRStress");
90 //- Construct from polyMesh and data stream
91 displacementSBRStressFvMotionSolver
100 ~displacementSBRStressFvMotionSolver();
105 //- Return reference to the point motion displacement field
106 pointVectorField& pointDisplacement()
108 return pointDisplacement_;
111 //- Return const reference to the point motion displacement field
112 const pointVectorField& pointDisplacement() const
114 return pointDisplacement_;
117 //- Return reference to the cell motion displacement field
118 volVectorField& cellDisplacement()
120 return cellDisplacement_;
123 //- Return const reference to the cell motion displacement field
124 const volVectorField& cellDisplacement() const
126 return cellDisplacement_;
129 //- Return point location obtained from the current motion field
130 virtual tmp<pointField> curPoints() const;
133 virtual void solve();
136 virtual void updateMesh(const mapPolyMesh&);
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //