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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::displacementComponentLaplacianFvMotionSolver
26 
27 Description
28  Mesh motion solver for an fvMesh. Based on solving the cell-centre
29  Laplacian for the given component of the motion displacement.
30 
31 SourceFiles
32  displacementComponentLaplacianFvMotionSolver.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef displacementComponentLaplacianFvMotionSolver_H
37 #define displacementComponentLaplacianFvMotionSolver_H
38 
40 #include "fvMotionSolverCore.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward class declarations
48 class motionInterpolation;
49 class motionDiffusivity;
50 
51 /*---------------------------------------------------------------------------*\
52  Class displacementComponentLaplacianFvMotionSolver Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
58  public fvMotionSolverCore
59 {
60  // Private data
61 
62  //- Cell-centre motion field
64 
65  //- Optionally read point-position field. Used only for position
66  // boundary conditions.
68 
69  //- Interpolation used to transfer cell displacement to the points
71 
72  //- Diffusivity used to control the motion
74 
75  //- Frozen points (that are not on patches). -1 or points that are
76  // fixed to be at points0_ location
78 
79 
80  // Private Member Functions
81 
82  //- Disallow default bitwise copy construct
84  (
86  );
87 
88  //- Disallow default bitwise assignment
90 
91  //- Return the component corresponding to the given component name
92  direction cmpt(const word& cmptName) const;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("displacementComponentLaplacian");
99 
100 
101  // Constructors
102 
103  //- Construct from polyMesh and IOdictionary
105  (
106  const polyMesh&,
107  const IOdictionary&
108  );
109 
110 
111  //- Destructor
113 
114 
115  // Member Functions
116 
117  //- Non-const access to the cellDisplacement in order to allow
118  // changes to the boundary motion
120  {
121  return cellDisplacement_;
122  }
123 
124  //- Return point location obtained from the current motion field
125  virtual tmp<pointField> curPoints() const;
126 
127  //- Solve for motion
128  virtual void solve();
129 
130  //- Update topology
131  virtual void updateMesh(const mapPolyMesh&);
132 
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::displacementComponentLaplacianFvMotionSolver::displacementComponentLaplacianFvMotionSolver
displacementComponentLaplacianFvMotionSolver(const displacementComponentLaplacianFvMotionSolver &)
Disallow default bitwise copy construct.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::componentDisplacementMotionSolver
Virtual base class for displacement motion solver.
Definition: componentDisplacementMotionSolver.H:54
Foam::displacementComponentLaplacianFvMotionSolver
Mesh motion solver for an fvMesh. Based on solving the cell-centre Laplacian for the given component ...
Definition: displacementComponentLaplacianFvMotionSolver.H:54
Foam::displacementComponentLaplacianFvMotionSolver::operator=
void operator=(const displacementComponentLaplacianFvMotionSolver &)
Disallow default bitwise assignment.
Foam::displacementComponentLaplacianFvMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update topology.
Definition: displacementComponentLaplacianFvMotionSolver.C:246
componentDisplacementMotionSolver.H
Foam::displacementComponentLaplacianFvMotionSolver::cmpt
direction cmpt(const word &cmptName) const
Return the component corresponding to the given component name.
Foam::displacementComponentLaplacianFvMotionSolver::cellDisplacement_
volScalarField cellDisplacement_
Cell-centre motion field.
Definition: displacementComponentLaplacianFvMotionSolver.H:62
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::displacementComponentLaplacianFvMotionSolver::~displacementComponentLaplacianFvMotionSolver
~displacementComponentLaplacianFvMotionSolver()
Destructor.
Definition: displacementComponentLaplacianFvMotionSolver.C:140
Foam::displacementComponentLaplacianFvMotionSolver::TypeName
TypeName("displacementComponentLaplacian")
Runtime type information.
Foam::displacementComponentLaplacianFvMotionSolver::interpolationPtr_
autoPtr< motionInterpolation > interpolationPtr_
Interpolation used to transfer cell displacement to the points.
Definition: displacementComponentLaplacianFvMotionSolver.H:69
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::displacementComponentLaplacianFvMotionSolver::pointLocation_
autoPtr< pointVectorField > pointLocation_
Optionally read point-position field. Used only for position.
Definition: displacementComponentLaplacianFvMotionSolver.H:66
Foam::fvMotionSolverCore
Base class for fvMesh based motionSolvers.
Definition: fvMotionSolverCore.H:48
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::displacementComponentLaplacianFvMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementComponentLaplacianFvMotionSolver.C:147
fvMotionSolverCore.H
Foam::displacementComponentLaplacianFvMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementComponentLaplacianFvMotionSolver.C:224
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::displacementComponentLaplacianFvMotionSolver::cellDisplacement
volScalarField & cellDisplacement()
Non-const access to the cellDisplacement in order to allow.
Definition: displacementComponentLaplacianFvMotionSolver.H:118
Foam::displacementComponentLaplacianFvMotionSolver::frozenPointsZone_
label frozenPointsZone_
Frozen points (that are not on patches). -1 or points that are.
Definition: displacementComponentLaplacianFvMotionSolver.H:76
Foam::displacementComponentLaplacianFvMotionSolver::diffusivityPtr_
autoPtr< motionDiffusivity > diffusivityPtr_
Diffusivity used to control the motion.
Definition: displacementComponentLaplacianFvMotionSolver.H:72