1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::displacementComponentLaplacianFvMotionSolver
28 Mesh motion solver for an fvMesh. Based on solving the cell-centre
29 Laplacian for the given component of the motion displacement.
32 displacementComponentLaplacianFvMotionSolver.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef displacementComponentLaplacianFvMotionSolver_H
37 #define displacementComponentLaplacianFvMotionSolver_H
39 #include "fvMotionSolver.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Forward class declarations
47 class motionDiffusivity;
49 /*---------------------------------------------------------------------------*\
50 Class displacementComponentLaplacianFvMotionSolver Declaration
51 \*---------------------------------------------------------------------------*/
53 class displacementComponentLaplacianFvMotionSolver
59 //- The component name to solve for
62 //- The component to solve for
65 //- Reference point field for this component
68 //- Point motion field
69 mutable pointScalarField pointDisplacement_;
71 //- Cell-centre motion field
72 mutable volScalarField cellDisplacement_;
74 //- Optionally read point-position field. Used only for position
75 // boundary conditions.
76 mutable autoPtr<pointVectorField> pointLocation_;
78 //- Diffusivity used to control the motion
79 autoPtr<motionDiffusivity> diffusivityPtr_;
81 //- Frozen points (that are not on patches). -1 or points that are
82 // fixed to be at points0_ location
83 label frozenPointsZone_;
86 // Private Member Functions
88 //- Disallow default bitwise copy construct
89 displacementComponentLaplacianFvMotionSolver
91 const displacementComponentLaplacianFvMotionSolver&
94 //- Disallow default bitwise assignment
95 void operator=(const displacementComponentLaplacianFvMotionSolver&);
97 //- Return the component corresponding to the given component name
98 direction cmpt(const word& cmptName) const;
103 //- Runtime type information
104 TypeName("displacementComponentLaplacian");
109 //- Construct from polyMesh and data stream
110 displacementComponentLaplacianFvMotionSolver
118 ~displacementComponentLaplacianFvMotionSolver();
123 //- Return reference to the reference field
124 const scalarField& points0() const
129 //- Non-const access to the cellDisplacement in order to allow
130 // changes to the boundary motion
131 volScalarField& cellDisplacement()
133 return cellDisplacement_;
136 //- Return point location obtained from the current motion field
137 virtual tmp<pointField> curPoints() const;
140 virtual void solve();
143 virtual void updateMesh(const mapPolyMesh&);
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 } // End namespace Foam
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 // ************************************************************************* //