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::displacementComponentLaplacianFvMotionSolver
29 Mesh motion solver for an fvMesh. Based on solving the cell-centre
30 Laplacian for the given component of the motion displacement.
33 displacementComponentLaplacianFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef displacementComponentLaplacianFvMotionSolver_H
38 #define displacementComponentLaplacianFvMotionSolver_H
40 #include "fvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51 Class displacementComponentLaplacianFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class displacementComponentLaplacianFvMotionSolver
60 //- The component name to solve for
63 //- The component to solve for
66 //- Reference point field for this component
69 //- Point motion field
70 mutable pointScalarField pointDisplacement_;
72 //- Cell-centre motion field
73 mutable volScalarField cellDisplacement_;
75 //- Optionally read point-position field. Used only for position
76 // boundary conditions.
77 mutable autoPtr<pointVectorField> pointLocation_;
79 //- Diffusivity used to control the motion
80 autoPtr<motionDiffusivity> diffusivityPtr_;
82 //- Frozen points (that are not on patches). -1 or points that are
83 // fixed to be at points0_ location
84 label frozenPointsZone_;
87 // Private Member Functions
89 //- Disallow default bitwise copy construct
90 displacementComponentLaplacianFvMotionSolver
92 const displacementComponentLaplacianFvMotionSolver&
95 //- Disallow default bitwise assignment
96 void operator=(const displacementComponentLaplacianFvMotionSolver&);
98 //- Return the component corresponding to the given component name
99 direction cmpt(const word& cmptName) const;
104 //- Runtime type information
105 TypeName("displacementComponentLaplacian");
110 //- Construct from polyMesh and data stream
111 displacementComponentLaplacianFvMotionSolver
120 ~displacementComponentLaplacianFvMotionSolver();
125 //- Return reference to the reference field
126 const scalarField& points0() const
131 //- Non-const access to the cellDisplacement in order to allow
132 // changes to the boundary motion
133 volScalarField& cellDisplacement()
135 return cellDisplacement_;
138 //- Return point location obtained from the current motion field
139 virtual tmp<pointField> curPoints() const;
142 virtual void solve();
145 virtual void updateMesh(const mapPolyMesh&);
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 // ************************************************************************* //