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 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().lookupOrDefault<scalar>("maxDeltaT", vGreat)
49  )
50 {}
51 
52 
53 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
54 
56 {}
57 
58 
59 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
60 
62 {
63  return maxDeltaT_;
64 }
65 
66 
68 {
69  // Update the mesh for topology change, mesh to mesh mapping
70  mesh_.update();
71 }
72 
73 
75 {
76  if (pimple.firstIter() || pimple.moveMeshOuterCorrectors())
77  {
78  mesh_.move();
79  }
80 }
81 
82 
84 {}
85 
86 
88 {}
89 
90 
92 {}
93 
94 
96 {}
97 
98 
100 {}
101 
102 
104 {}
105 
106 
107 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Abstract base class for run-time selectable region solvers.
Definition: solver.H:55
Solver module to move the mesh.
Definition: movingMesh.H:56
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
Definition: movingMesh.C:91
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:83
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
Definition: movingMesh.C:103
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
Definition: movingMesh.C:74
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
Definition: movingMesh.C:61
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
Definition: movingMesh.C:95
virtual void postCorrector()
Correct the thermophysical transport modelling.
Definition: movingMesh.C:99
virtual ~movingMesh()
Destructor.
Definition: movingMesh.C:55
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
Definition: movingMesh.C:87
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
Definition: movingMesh.C:67
pimpleControl pimple(mesh)
addToRunTimeSelectionTable(solver, compressibleMultiphaseVoF, fvMesh)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
Namespace for OpenFOAM.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep