1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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::displacementLaplacianFvMotionSolver
29 Mesh motion solver for an fvMesh. Based on solving the cell-centre
30 Laplacian for the motion displacement.
33 displacementLaplacianFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef displacementLaplacianFvMotionSolver_H
38 #define displacementLaplacianFvMotionSolver_H
40 #include "fvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51 Class displacementLaplacianFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class displacementLaplacianFvMotionSolver
60 //- Reference point field
63 //- Point motion field
64 mutable pointVectorField pointDisplacement_;
66 //- Cell-centre motion field
67 mutable volVectorField cellDisplacement_;
69 //- Optionally read point-position field. Used only for position
70 // boundary conditions.
71 mutable autoPtr<pointVectorField> pointLocation_;
73 //- Diffusivity used to control the motion
74 autoPtr<motionDiffusivity> diffusivityPtr_;
76 //- Frozen points (that are not on patches). -1 or points that are
77 // fixed to be at points0_ location
78 label frozenPointsZone_;
81 // Private Member Functions
83 //- Disallow default bitwise copy construct
84 displacementLaplacianFvMotionSolver
86 const displacementLaplacianFvMotionSolver&
89 //- Disallow default bitwise assignment
90 void operator=(const displacementLaplacianFvMotionSolver&);
95 //- Runtime type information
96 TypeName("displacementLaplacian");
101 //- Construct from polyMesh and data stream
102 displacementLaplacianFvMotionSolver
104 const polyMesh& mesh,
111 ~displacementLaplacianFvMotionSolver();
117 //- Return reference to the reference field
118 const pointField& points0() const
123 //- Return reference to the point motion displacement field
124 pointVectorField& pointDisplacement()
126 return pointDisplacement_;
129 //- Return const reference to the point motion displacement field
130 const pointVectorField& pointDisplacement() const
132 return pointDisplacement_;
135 //- Return reference to the cell motion displacement field
136 volVectorField& cellDisplacement()
138 return cellDisplacement_;
141 //- Return const reference to the cell motion displacement field
142 const volVectorField& cellDisplacement() const
144 return cellDisplacement_;
147 //- Return point location obtained from the current motion field
148 virtual tmp<pointField> curPoints() const;
151 virtual void solve();
154 virtual void updateMesh(const mapPolyMesh&);
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace Foam
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 // ************************************************************************* //