fvMeshMoversMotionSolver.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021-2024 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::fvMeshMovers::motionSolver
26 
27 Description
28 
29 SourceFiles
30  motionSolver.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef fvMeshMoversMotionSolver_H
35 #define fvMeshMoversMotionSolver_H
36 
37 #include "fvMeshMover.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 class motionSolver;
45 
46 namespace fvMeshMovers
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class motionSolver Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class motionSolver
54 :
55  public fvMeshMover
56 {
57  // Private Data
58 
59  autoPtr<Foam::motionSolver> motionPtr_;
60 
61  //- Optional list of vectorFields to update for mesh motion
62  // For modern solvers using Uf and correctPhi to update the flux
63  // after motion it is not necessary to specify a "velocityFields" list
64  velocityMotionCorrection velocityMotionCorrection_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("motionSolver");
71 
72 
73  // Constructors
74 
75  //- Construct from fvMesh
77 
78  //- Disallow default bitwise copy construction
79  motionSolver(const motionSolver&) = delete;
80 
81 
82  //- Destructor
83  ~motionSolver();
84 
85 
86  // Member Functions
87 
88  //- Return the motionSolver
89  const Foam::motionSolver& motion() const;
90 
91  //- Is this motion solid body? Delegate to the motion solver.
92  virtual bool solidBody() const;
93 
94  //- Update the mesh for both mesh motion and topology change
95  virtual bool update();
96 
97  //- Update corresponding to the given map
98  virtual void topoChange(const polyTopoChangeMap&);
99 
100  //- Update from another mesh using the given map
101  virtual void mapMesh(const polyMeshMap&);
102 
103  //- Update corresponding to the given distribution map
104  virtual void distribute(const polyDistributionMap&);
105 
106  //- Write the motion solver state
107  virtual bool write(const bool write = true) const;
108 
109 
110  // Member Operators
111 
112  //- Disallow default bitwise assignment
113  void operator=(const motionSolver&) = delete;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace fvMeshMovers
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Helper class to update the velocity boundary conditions.
Definition: fvMeshMover.H:84
Abstract base class for fvMesh movers.
Definition: fvMeshMover.H:53
fvMesh & mesh()
Return the fvMesh.
Definition: fvMeshMover.H:132
virtual bool solidBody() const
Is this motion solid body? Delegate to the motion solver.
void operator=(const motionSolver &)=delete
Disallow default bitwise assignment.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool write(const bool write=true) const
Write the motion solver state.
virtual bool update()
Update the mesh for both mesh motion and topology change.
TypeName("motionSolver")
Runtime type information.
motionSolver(fvMesh &mesh)
Construct from fvMesh.
const Foam::motionSolver & motion() const
Return the motionSolver.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Virtual base class for mesh motion solver.
Definition: motionSolver.H:57
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Namespace for OpenFOAM.