incompressibleMultiphaseVoF.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::incompressibleMultiphaseVoF
26 
27 Description
28  Solver module for the solution of multiple incompressible, 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  incompressibleMultiphaseVoF.C
44 
45 See also
46  Foam::solvers::VoFSolver
47  Foam::solvers::multiphaseVoFSolver
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef incompressibleMultiphaseVoF_H
52 #define incompressibleMultiphaseVoF_H
53 
54 #include "multiphaseVoFSolver.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 namespace solvers
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class incompressibleMultiphaseVoF Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
71  public multiphaseVoFSolver
72 {
73 
74 protected:
75 
76  // Phase properties
77 
78  //- The compressible two-phase mixture
80 
81  //- Reference to the phases
83 
84 
85  // Thermophysical properties
86 
87  //- Static pressure field
89 
90 
91  // Pressure reference
92 
93  //- Pressure reference
95 
96 
97  // Momentum transport
98 
99  //- Momentum transport model pointer
101 
102  //- Momentum transport model
104 
105 
106  // Protected Member Functions
107 
108  //- Return the pressure reference
109  virtual const Foam::pressureReference& pressureReference() const
110  {
111  return pressureReference_;
112  }
113 
114  //- The flow is incompressible
115  virtual bool incompressible() const
116  {
117  return true;
118  }
119 
120  //- The flow is not incompressible and hence not divergent
121  // Mass sources are not currently supported
122  virtual bool divergent() const
123  {
124  return false;
125  }
126 
127  //- Return the mixture compressibility/density
128  // Not required for incompressible fluids
129  virtual tmp<volScalarField> psiByRho() const
130  {
131  return tmp<volScalarField>(nullptr);
132  }
133 
134  //- Return the momentum equation stress term
136  {
137  return momentumTransport.divDevTau(rho, U);
138  }
139 
140  //- Solve for the phase-fractions
141  virtual void alphaPredictor();
142 
143 
144 private:
145 
146  // Private Member Functions
147 
148  //- Solve for the phase-fractions
149  void alphaSolve(const dictionary& alphaControls);
150 
151 
152 public:
153 
154  //- Runtime type information
155  TypeName("incompressibleMultiphaseVoF");
156 
157 
158  // Constructors
159 
160  //- Construct from region mesh
162 
163  //- Disallow default bitwise copy construction
165  (
167  ) = delete;
168 
169 
170  //- Destructor
172 
173 
174  // Member Functions
175 
176  //- Called at the start of the PIMPLE loop
177  virtual void prePredictor();
178 
179  //- Construct and solve the energy equation,
180  // convert to temperature
181  // and update thermophysical and transport properties
182  virtual void thermophysicalPredictor();
183 
184  //- Construct and solve the pressure equation in the PISO loop
185  virtual void pressureCorrector();
186 
187  //- Correct the momentum and thermophysical transport modelling
188  virtual void postCorrector();
189 
190 
191  // Member Operators
192 
193  //- Disallow default bitwise assignment
194  void operator=(const incompressibleMultiphaseVoF&) = delete;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace solvers
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
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
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
Base class for single-phase incompressible turbulence models.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
Incompressible multiphase mixture for interface-capturing simulations.
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
const volScalarField & rho
Reference to the mixture continuity density field.
Definition: VoFSolver.H:110
Solver module for the solution of multiple incompressible, isothermal immiscible fluids using a VOF (...
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.
autoPtr< incompressible::momentumTransportModel > momentumTransport_
Momentum transport model pointer.
incompressible::momentumTransportModel & momentumTransport
Momentum transport model.
virtual void prePredictor()
Called at the start of the PIMPLE loop.
void operator=(const incompressibleMultiphaseVoF &)=delete
Disallow default bitwise assignment.
virtual bool incompressible() const
The flow is incompressible.
virtual bool divergent() const
The flow is not incompressible and hence not divergent.
virtual void alphaPredictor()
Solve for the phase-fractions.
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
UPtrListDictionary< incompressibleVoFphase > & phases
Reference to the phases.
TypeName("incompressibleMultiphaseVoF")
Runtime type information.
Foam::pressureReference pressureReference_
Pressure reference.
incompressibleMultiphaseVoFMixture & mixture
The compressible two-phase mixture.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U)
Return the momentum equation stress term.
incompressibleMultiphaseVoF(fvMesh &mesh)
Construct from region mesh.
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.