movingMesh.C
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) 2023-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 \*---------------------------------------------------------------------------*/
25 
26 #include "movingMesh.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace solvers
34 {
37 }
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
45  solver(mesh),
46  maxDeltaT_
47  (
48  runTime.controlDict().found("maxDeltaT")
49  ? runTime.controlDict().lookup<scalar>("maxDeltaT", runTime.userUnits())
50  : vGreat
51  )
52 {}
53 
54 
55 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
56 
58 {}
59 
60 
61 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
62 
64 {
65  return maxDeltaT_;
66 }
67 
68 
70 {
71  // Update the mesh for topology change, mesh to mesh mapping
72  mesh_.update();
73 }
74 
75 
77 {
78  if (pimple.firstIter() || pimple.moveMeshOuterCorrectors())
79  {
80  mesh_.move();
81  }
82 }
83 
84 
86 {}
87 
88 
90 {}
91 
92 
94 {}
95 
96 
98 {}
99 
100 
102 {}
103 
104 
106 {}
107 
108 
110 {}
111 
112 
113 // ************************************************************************* //
bool found
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Abstract base class for run-time selectable region solvers.
Definition: solver.H:56
Solver module to move the mesh.
Definition: movingMesh.H:56
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
Definition: movingMesh.C:97
movingMesh(fvMesh &mesh)
Construct from region mesh.
Definition: movingMesh.C:43
virtual void prePredictor()
Called at the beginning of the PIMPLE loop.
Definition: movingMesh.C:89
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
Definition: movingMesh.C:109
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
Definition: movingMesh.C:76
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
Definition: movingMesh.C:63
virtual void motionCorrector()
Corrections that follow mesh motion.
Definition: movingMesh.C:85
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
Definition: movingMesh.C:101
virtual void postCorrector()
Correct the thermophysical transport modelling.
Definition: movingMesh.C:105
virtual ~movingMesh()
Destructor.
Definition: movingMesh.C:57
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
Definition: movingMesh.C:93
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
Definition: movingMesh.C:69
pimpleControl pimple(mesh)
addToRunTimeSelectionTable(solver, compressibleMultiphaseVoF, fvMesh)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
Namespace for OpenFOAM.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep