velocityComponentLaplacianFvMotionSolver.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 -------------------------------------------------------------------------------
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::velocityComponentLaplacianFvMotionSolver
28 
29 Group
30  grpMeshMotionSolvers
31 
32 Description
33  Mesh motion solver for an fvMesh. Based on solving the cell-centre
34  Laplacian for the given component of the motion velocity.
35 
36 SourceFiles
37  velocityComponentLaplacianFvMotionSolver.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef velocityComponentLaplacianFvMotionSolver_H
42 #define velocityComponentLaplacianFvMotionSolver_H
43 
45 #include "fvMotionSolver.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward class declarations
53 class motionInterpolation;
54 class motionDiffusivity;
55 
56 /*---------------------------------------------------------------------------*\
57  Class velocityComponentLaplacianFvMotionSolver Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
63  public fvMotionSolver
64 {
65  // Private data
66 
67  //- Cell-centre motion field
68  mutable volScalarField cellMotionU_;
69 
70  //- Interpolation used to transfer cell displacement to the points
71  autoPtr<motionInterpolation> interpolationPtr_;
72 
73  //- Diffusivity used to control the motion
74  autoPtr<motionDiffusivity> diffusivityPtr_;
75 
76 
77  // Private Member Functions
78 
79  //- No copy construct
81  (
83  ) = delete;
84 
85  //- No copy assignment
86  void operator=
87  (
89  ) = delete;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("velocityComponentLaplacian");
96 
97 
98  // Constructors
99 
100  //- Construct from polyMesh and IOdictionary
102  (
103  const polyMesh&,
104  const IOdictionary&
105  );
106 
107 
108  //- Destructor
110 
111 
112  // Member Functions
113 
114  //- Non-const access to the cellMotionU in order to allow changes
115  // to the boundary motion
117  {
118  return cellMotionU_;
119  }
120 
121  //- Return point location obtained from the current motion field
122  virtual tmp<pointField> curPoints() const;
123 
124  //- Solve for motion
125  virtual void solve();
126 
127  //- Update topology
128  virtual void updateMesh(const mapPolyMesh&);
129 };
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
Base class for fvMesh based motionSolvers.
Virtual base class for velocity motion solver.
volScalarField & cellMotionU()
Non-const access to the cellMotionU in order to allow changes.
TypeName("velocityComponentLaplacian")
Runtime type information.
virtual void updateMesh(const mapPolyMesh &)
Update topology.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Mesh motion solver for an fvMesh. Based on solving the cell-centre Laplacian for the given component ...
Namespace for OpenFOAM.