solidBodyDisplacementLaplacianFvMotionSolver.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) 2016 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::solidBodyDisplacementLaplacianFvMotionSolver
28 
29 Group
30  grpMeshMotionSolvers
31 
32 Description
33  Applies Laplacian displacement solving on top of a transformation of
34  the initial points using a solid-body motion.
35 
36 See also
37  Foam::displacementLaplacian
38 
39 SourceFiles
40  solidBodyDisplacementLaplacianFvMotionSolver.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef solidBodyDisplacementLaplacianFvMotionSolver_H
45 #define solidBodyDisplacementLaplacianFvMotionSolver_H
46 
48 #include "fvMotionSolver.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 // Forward class declarations
56 class motionInterpolation;
57 class motionDiffusivity;
58 class solidBodyMotionFunction;
59 
60 /*---------------------------------------------------------------------------*\
61  Class solidBodyDisplacementLaplacianFvMotionSolver Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
67  public fvMotionSolver
68 {
69  // Private data
70 
71  //- Motion function
73 
74  //- Cell-centre motion field
75  mutable volVectorField cellDisplacement_;
76 
77  //- Optionally read point-position field. Used only for position
78  // boundary conditions.
79  mutable autoPtr<pointVectorField> pointLocation_;
80 
81  //- Interpolation used to transfer cell displacement to the points
82  autoPtr<motionInterpolation> interpolationPtr_;
83 
84  //- Diffusivity used to control the motion
85  autoPtr<motionDiffusivity> diffusivityPtr_;
86 
87  //- Frozen points (that are not on patches). -1 or points that are
88  // fixed to be at points0_ location
89  label frozenPointsZone_;
90 
91 
92  // Private Member Functions
93 
94  //- No copy construct
96  (
98  ) = delete;
99 
100  //- No copy assignment
101  void operator=
102  (
104  ) = delete;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("solidBodyDisplacementLaplacian");
111 
112 
113  // Constructors
114 
115  //- Construct from polyMesh and IOdictionary
117  (
118  const polyMesh&,
119  const IOdictionary&
120  );
121 
122  //- Construct from components
124  (
125  const polyMesh& mesh,
126  const IOdictionary& dict,
128  const pointIOField& points0
129  );
130 
131 
132  //- Destructor
134 
135 
136  // Member Functions
137 
138  //- Return reference to the diffusivity field
140 
141  //- Return point location obtained from the current motion field
142  virtual tmp<pointField> curPoints() const;
143 
144  //- Solve for motion
145  virtual void solve();
146 
147  //- Update topology
148  virtual void updateMesh(const mapPolyMesh&);
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::solidBodyDisplacementLaplacianFvMotionSolver::TypeName
TypeName("solidBodyDisplacementLaplacian")
Runtime type information.
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:61
Foam::displacementMotionSolver::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: displacementMotionSolver.H:141
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::motionDiffusivity
Abstract base class for cell-centre mesh motion diffusivity.
Definition: motionDiffusivity.H:51
Foam::solidBodyDisplacementLaplacianFvMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update topology.
Definition: solidBodyDisplacementLaplacianFvMotionSolver.C:368
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::fvMotionSolver
Base class for fvMesh based motionSolvers.
Definition: fvMotionSolver.H:50
Foam::solidBodyDisplacementLaplacianFvMotionSolver
Applies Laplacian displacement solving on top of a transformation of the initial points using a solid...
Definition: solidBodyDisplacementLaplacianFvMotionSolver.H:63
Foam::solidBodyDisplacementLaplacianFvMotionSolver::diffusivity
motionDiffusivity & diffusivity()
Return reference to the diffusivity field.
Definition: solidBodyDisplacementLaplacianFvMotionSolver.C:250
Foam::solidBodyDisplacementLaplacianFvMotionSolver::~solidBodyDisplacementLaplacianFvMotionSolver
~solidBodyDisplacementLaplacianFvMotionSolver()
Destructor.
Definition: solidBodyDisplacementLaplacianFvMotionSolver.C:243
Foam::solidBodyDisplacementLaplacianFvMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: solidBodyDisplacementLaplacianFvMotionSolver.C:266
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
displacementMotionSolver.H
Foam::solidBodyDisplacementLaplacianFvMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: solidBodyDisplacementLaplacianFvMotionSolver.C:337
Foam::points0MotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: points0MotionSolver.H:117
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
fvMotionSolver.H
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::fvMotionSolver::mesh
const fvMesh & mesh() const
Return reference to the fvMesh to be moved.
Definition: fvMotionSolver.H:86