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::velocityLaplacianFvMotionSolver
29 Mesh motion solver for an fvMesh. Based on solving the cell-centre
30 Laplacian for the motion velocity.
33 velocityLaplacianFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef velocityLaplacianFvMotionSolver_H
38 #define velocityLaplacianFvMotionSolver_H
40 #include "fvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51 Class velocityLaplacianFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class velocityLaplacianFvMotionSolver
60 //- Point motion field
61 mutable pointVectorField pointMotionU_;
63 //- Cell-centre motion field
64 mutable volVectorField cellMotionU_;
66 //- Diffusivity used to control the motion
67 autoPtr<motionDiffusivity> diffusivityPtr_;
70 // Private Member Functions
72 //- Disallow default bitwise copy construct
73 velocityLaplacianFvMotionSolver
75 const velocityLaplacianFvMotionSolver&
78 //- Disallow default bitwise assignment
79 void operator=(const velocityLaplacianFvMotionSolver&);
84 //- Runtime type information
85 TypeName("velocityLaplacian");
90 //- Construct from polyMesh and data stream
91 velocityLaplacianFvMotionSolver(const polyMesh& mesh, Istream& msData);
96 ~velocityLaplacianFvMotionSolver();
101 //- Return reference to the point motion velocity field
102 pointVectorField& pointMotionU()
104 return pointMotionU_;
107 //- Return const reference to the point motion velocity field
108 const pointVectorField& pointMotionU() const
110 return pointMotionU_;
113 //- Return reference to the cell motion velocity field
114 volVectorField& cellMotionU()
119 //- Return const reference to the cell motion velocity field
120 const volVectorField& cellMotionU() const
125 //- Return point location obtained from the current motion field
126 virtual tmp<pointField> curPoints() const;
129 virtual void solve();
132 virtual void updateMesh(const mapPolyMesh&);
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 // ************************************************************************* //