displacementComponentLaplacianFvMotionSolver.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::displacementComponentLaplacianFvMotionSolver
28
29Group
30 grpMeshMotionSolvers
31
32Description
33 Mesh motion solver for an fvMesh. Based on solving the cell-centre
34 Laplacian for the given component of the motion displacement.
35
36SourceFiles
37 displacementComponentLaplacianFvMotionSolver.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef displacementComponentLaplacianFvMotionSolver_H
42#define displacementComponentLaplacianFvMotionSolver_H
43
45#include "fvMotionSolver.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward class declarations
53class motionInterpolation;
54class motionDiffusivity;
55
56/*---------------------------------------------------------------------------*\
57 Class displacementComponentLaplacianFvMotionSolver Declaration
58\*---------------------------------------------------------------------------*/
61:
63 public fvMotionSolver
64{
65 // Private data
66
67 //- Cell-centre motion field
68 mutable volScalarField cellDisplacement_;
69
70 //- Optionally read point-position field. Used only for position
71 // boundary conditions.
72 mutable autoPtr<pointVectorField> pointLocation_;
73
74 //- Interpolation used to transfer cell displacement to the points
75 autoPtr<motionInterpolation> interpolationPtr_;
76
77 //- Diffusivity used to control the motion
78 autoPtr<motionDiffusivity> diffusivityPtr_;
79
80 //- Frozen points (that are not on patches). -1 or points that are
81 // fixed to be at points0_ location
82 label frozenPointsZone_;
83
84
85 // Private Member Functions
86
87 //- No copy construct
89 (
91 ) = delete;
92
93 //- No copy assignment
94 void operator=
95 (
97 ) = delete;
98
99 //- Return the component corresponding to the given component name
100 direction cmpt(const word& cmptName) const;
101
102
103public:
104
105 //- Runtime type information
106 TypeName("displacementComponentLaplacian");
107
108
109 // Constructors
110
111 //- Construct from polyMesh and IOdictionary
113 (
114 const polyMesh&,
115 const IOdictionary&
116 );
117
118
119 //- Destructor
121
122
123 // Member Functions
124
125 //- Non-const access to the cellDisplacement in order to allow
126 // changes to the boundary motion
128 {
129 return cellDisplacement_;
130 }
131
132 //- Return point location obtained from the current motion field
133 virtual tmp<pointField> curPoints() const;
134
135 //- Solve for motion
136 virtual void solve();
137
138 //- Update topology
139 virtual void updateMesh(const mapPolyMesh&);
140
141};
142
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Virtual base class for displacement motion solver.
Mesh motion solver for an fvMesh. Based on solving the cell-centre Laplacian for the given component ...
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
volScalarField & cellDisplacement()
Non-const access to the cellDisplacement in order to allow.
TypeName("displacementComponentLaplacian")
Runtime type information.
Base class for fvMesh based motionSolvers.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73