compressibleMultiphaseVoF.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) 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 Class
25  Foam::solvers::compressibleMultiphaseVoF
26 
27 Description
28  Solver module for the solution of multiple compressible, isothermal
29  immiscible fluids using a VOF (volume of fluid) phase-fraction based
30  interface capturing approach, with optional mesh motion and mesh topology
31  changes including adaptive re-meshing.
32 
33  The momentum and other fluid properties are of the "mixture" and a single
34  momentum equation is solved.
35 
36  A mixture approach for momentum transport is provided in which a single
37  laminar, RAS or LES model is selected to model the momentum stress.
38 
39  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
40  pseudo-transient and steady simulations.
41 
42 SourceFiles
43  compressibleMultiphaseVoF.C
44 
45 See also
46  Foam::solvers::VoFSolver
47  Foam::solvers::multiphaseVoFSolver
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef compressibleMultiphaseVoF_H
52 #define compressibleMultiphaseVoF_H
53 
54 #include "multiphaseVoFSolver.H"
57 #include "pressureReference.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace solvers
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class compressibleMultiphaseVoF Declaration
68 \*---------------------------------------------------------------------------*/
69 
71 :
72  public multiphaseVoFSolver
73 {
74 
75 protected:
76 
77  // Phase properties
78 
79  //- The compressible two-phase mixture
81 
82  //- Reference to the phases
84 
85 
86  // Thermophysical properties
87 
88  //- Reference to the mixture static pressure field
90 
91 
92  // Pressure reference
93 
94  //- Pressure reference
96 
97 
98  // Kinematic properties
99 
100  //- Kinetic energy field
101  // Used in the energy equation
103 
104 
105  // Momentum transport
106 
107  //- Momentum transport model pointer
109 
110  //- Momentum transport model
112 
113 
114  // Cached temporary fields
115 
116  //- Continuity error
118 
119 
120  // Protected Member Functions
121 
122  //- Return the pressure reference
123  virtual const Foam::pressureReference& pressureReference() const
124  {
125  return pressureReference_;
126  }
127 
128  //- The flow is incompressible if all phases are incompressible
129  virtual bool incompressible() const
130  {
131  return mixture.incompressible();
132  }
133 
134  //- The flow is divergent if it is not incompressible
135  // Mass sources are not currently supported
136  virtual bool divergent() const
137  {
138  return !incompressible();
139  }
140 
141  //- Return the mixture compressibility/density
142  // Used by CorrectPhi for compressible mixtures following mesh change
143  virtual tmp<volScalarField> psiByRho() const
144  {
145  return mixture.psiByRho();
146  }
147 
148  //- Return the momentum equation stress term
150 
151  //- Solve for the phase-fractions
152  virtual void alphaPredictor();
153 
154 
155 private:
156 
157  // Private Member Functions
158 
159  //- Solve for the phase-fractions
160  void alphaSolve(const dictionary& alphaControls);
161 
162 
163 public:
164 
165  //- Runtime type information
166  TypeName("compressibleMultiphaseVoF");
167 
168 
169  // Constructors
170 
171  //- Construct from region mesh
173 
174  //- Disallow default bitwise copy construction
176  (
178  ) = delete;
179 
180 
181  //- Destructor
182  virtual ~compressibleMultiphaseVoF();
183 
184 
185  // Member Functions
186 
187  //- Called at the start of the PIMPLE loop
188  virtual void prePredictor();
189 
190  //- Construct and optionally solve the momentum equation
191  virtual void momentumPredictor();
192 
193  //- Construct and solve the energy equation,
194  // convert to temperature
195  // and update thermophysical and transport properties
196  virtual void thermophysicalPredictor();
197 
198  //- Construct and solve the pressure equation in the PISO loop
199  virtual void pressureCorrector();
200 
201  //- Correct the momentum and thermophysical transport modelling
202  virtual void postCorrector();
203 
204 
205  // Member Operators
206 
207  //- Disallow default bitwise assignment
208  void operator=(const compressibleMultiphaseVoF&) = delete;
209 };
210 
211 
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 
214 } // End namespace solvers
215 } // End namespace Foam
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #endif
220 
221 // ************************************************************************* //
const dictionary & alphaControls
Definition: alphaControls.H:1
Generic GeometricField class.
Template dictionary class which manages the storage associated with it.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for single-phase compressible turbulence models.
Compressible multiphase mixture for interface-capturing simulations.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Provides controls for the pressure reference in closed-volume simulations.
const fvMesh & mesh
Region mesh.
Definition: solver.H:94
const volVectorField & U
Reference to the velocity field.
Definition: VoFSolver.H:209
Solver module for the solution of multiple compressible, isothermal immiscible fluids using a VOF (vo...
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
virtual tmp< volScalarField > psiByRho() const
Return the mixture compressibility/density.
virtual const Foam::pressureReference & pressureReference() const
Return the pressure reference.
UPtrListDictionary< compressibleVoFphase > & phases
Reference to the phases.
virtual void prePredictor()
Called at the start of the PIMPLE loop.
TypeName("compressibleMultiphaseVoF")
Runtime type information.
autoPtr< compressible::momentumTransportModel > momentumTransport_
Momentum transport model pointer.
virtual bool incompressible() const
The flow is incompressible if all phases are incompressible.
volScalarField & p
Reference to the mixture static pressure field.
virtual bool divergent() const
The flow is divergent if it is not incompressible.
virtual void alphaPredictor()
Solve for the phase-fractions.
compressible::momentumTransportModel & momentumTransport
Momentum transport model.
tmp< volScalarField::Internal > contErr
Continuity error.
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
compressibleMultiphaseVoF(fvMesh &mesh)
Construct from region mesh.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U)
Return the momentum equation stress term.
compressibleMultiphaseVoFMixture & mixture
The compressible two-phase mixture.
Foam::pressureReference pressureReference_
Pressure reference.
void operator=(const compressibleMultiphaseVoF &)=delete
Disallow default bitwise assignment.
Base solver module for the solution of multiple immiscible fluids using a VOF (volume of fluid) phase...
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.