displacementSBRStressFvMotionSolver.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::displacementSBRStressFvMotionSolver
28 
29 Group
30  grpMeshMotionSolvers
31 
32 Description
33  Mesh motion solver for an fvMesh. Based on solving the cell-centre
34  solid-body rotation stress equations for the motion displacement.
35 
36 SourceFiles
37  displacementSBRStressFvMotionSolver.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef displacementSBRStressFvMotionSolver_H
42 #define displacementSBRStressFvMotionSolver_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 displacementSBRStressFvMotionSolver Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
63  public fvMotionSolver
64 {
65  // Private data
66 
67  //- Cell-centre motion field
68  mutable volVectorField cellDisplacement_;
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=(const displacementSBRStressFvMotionSolver&) = delete;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("displacementSBRStress");
93 
94 
95  // Constructors
96 
97  //- Construct from polyMesh and IOdictionary
99  (
100  const polyMesh&,
101  const IOdictionary&
102  );
103 
104  //- Construct from components
106  (
107  const polyMesh& mesh,
108  const IOdictionary& dict,
110  const pointIOField& points0
111  );
112 
113 
114  //- Destructor
116 
117 
118  // Member Functions
119 
120  //- Return reference to the cell motion displacement field
122  {
123  return cellDisplacement_;
124  }
125 
126  //- Return const reference to the cell motion displacement field
127  const volVectorField& cellDisplacement() const
128  {
129  return cellDisplacement_;
130  }
131 
132  //- Return diffusivity
134  {
135  return *diffusivityPtr_;
136  }
137 
138  //- Return point location obtained from the current motion field
139  virtual tmp<pointField> curPoints() const;
140 
141  //- Solve for motion
142  virtual void solve();
143 
144  //- Update topology
145  virtual void updateMesh(const mapPolyMesh&);
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::displacementSBRStressFvMotionSolver::cellDisplacement
const volVectorField & cellDisplacement() const
Return const reference to the cell motion displacement field.
Definition: displacementSBRStressFvMotionSolver.H:126
Foam::displacementSBRStressFvMotionSolver::TypeName
TypeName("displacementSBRStress")
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:59
Foam::motionDiffusivity
Abstract base class for cell-centre mesh motion diffusivity.
Definition: motionDiffusivity.H:51
Foam::displacementSBRStressFvMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementSBRStressFvMotionSolver.C:174
Foam::displacementSBRStressFvMotionSolver::cellDisplacement
volVectorField & cellDisplacement()
Return reference to the cell motion displacement field.
Definition: displacementSBRStressFvMotionSolver.H:120
Foam::displacementSBRStressFvMotionSolver::~displacementSBRStressFvMotionSolver
~displacementSBRStressFvMotionSolver()
Destructor.
Definition: displacementSBRStressFvMotionSolver.C:148
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::displacementSBRStressFvMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update topology.
Definition: displacementSBRStressFvMotionSolver.C:251
Foam::displacementSBRStressFvMotionSolver::diffusivity
motionDiffusivity & diffusivity()
Return diffusivity.
Definition: displacementSBRStressFvMotionSolver.H:132
Foam::displacementSBRStressFvMotionSolver
Mesh motion solver for an fvMesh. Based on solving the cell-centre solid-body rotation stress equatio...
Definition: displacementSBRStressFvMotionSolver.H:59
Foam::displacementSBRStressFvMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementSBRStressFvMotionSolver.C:155
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::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:160
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::fvMotionSolver::mesh
const fvMesh & mesh() const
Return reference to the fvMesh to be moved.
Definition: fvMotionSolver.H:86