incompressibleVoF.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) 2022-2025 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::incompressibleVoF
26 
27 Description
28  Solver module for 2 incompressible, isothermal immiscible fluids using a
29  VOF (volume of fluid) phase-fraction based interface capturing approach,
30  with optional mesh motion and mesh topology changes including adaptive
31  re-meshing.
32 
33  The momentum and other fluid properties are of the "mixture" and a single
34  momentum equation is solved.
35 
36  Either mixture or two-phase transport modelling may be selected. In the
37  mixture approach a single laminar, RAS or LES model is selected to model the
38  momentum stress. In the Euler-Euler two-phase approach separate laminar,
39  RAS or LES selected models are selected for each of the phases.
40 
41  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
42  pseudo-transient and steady simulations.
43 
44  Optional fvModels and fvConstraints are provided to enhance the simulation
45  in many ways including adding various sources, Lagrangian
46  particles, surface film etc. and constraining or limiting the solution.
47 
48 SourceFiles
49  incompressibleVoF.C
50 
51 See also
52  Foam::solvers::VoFSolver
53  Foam::solvers::twoPhaseVoFSolver
54  Foam::solvers::compressibleVoF
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef incompressibleVoF_H
59 #define incompressibleVoF_H
60 
61 #include "twoPhaseVoFSolver.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 namespace solvers
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class incompressibleVoF Declaration
74 \*---------------------------------------------------------------------------*/
75 
77 :
78  public twoPhaseVoFSolver
79 {
80 
81 protected:
82 
83  // Phase properties
84 
85  //- The compressible two-phase mixture
87 
88 
89  // Thermophysical properties
90 
91  //- Static pressure field
93 
94 
95  // Pressure reference
96 
97  //- Pressure reference
99 
100 
101  // Momentum transport
102 
103  //- Momentum transport model
105 
106 
107  // Protected Member Functions
108 
109  //- Return the pressure reference
110  virtual const Foam::pressureReference& pressureReference() const
111  {
112  return pressureReference_;
113  }
114 
115  //- The flow is incompressible
116  virtual bool incompressible() const
117  {
118  return true;
119  }
120 
121  //- Is the flow divergent?
122  // i.e. includes phase-fraction sources
123  virtual bool divergent() const
124  {
125  return
128  }
129 
130  //- Return the mixture compressibility/density
131  // Not required for incompressible fluids
132  virtual tmp<volScalarField> psiByRho() const
133  {
134  return tmp<volScalarField>(nullptr);
135  }
136 
137  //- Calculate the alpha equation sources
138  virtual void alphaSuSp
139  (
142  );
143 
144  //- Return the momentum equation stress term
146  {
147  return momentumTransport.divDevTau(rho, U);
148  }
149 
150 
151 public:
152 
153  //- Runtime type information
154  TypeName("incompressibleVoF");
155 
156 
157  // Constructors
158 
159  //- Construct from region mesh
161 
162  //- Disallow default bitwise copy construction
163  incompressibleVoF(const incompressibleVoF&) = delete;
164 
165 
166  //- Destructor
167  virtual ~incompressibleVoF();
168 
169 
170  // Member Functions
171 
172  //- Called at the start of the PIMPLE loop
173  virtual void prePredictor();
174 
175  //- Predict the momentum transport
176  virtual void momentumTransportPredictor();
177 
178  //- Predict thermophysical transport
179  virtual void thermophysicalTransportPredictor();
180 
181  //- Construct and solve the energy equation,
182  // convert to temperature
183  // and update thermophysical and transport properties
184  virtual void thermophysicalPredictor();
185 
186  //- Construct and solve the pressure equation in the PISO loop
187  virtual void pressureCorrector();
188 
189  //- Correct the momentum transport
190  virtual void momentumTransportCorrector();
191 
192  //- Correct the thermophysical transport
193  virtual void thermophysicalTransportCorrector();
194 
195 
196  // Member Operators
197 
198  //- Disallow default bitwise assignment
199  void operator=(const incompressibleVoF&) = delete;
200 };
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace solvers
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #endif
211 
212 // ************************************************************************* //
Generic GeometricField class.
const word & name() const
Return name.
Definition: IOobject.H:307
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
virtual bool addsSupToField(const word &fieldName) const
Return true if an fvModel adds a source term to the given.
Definition: fvModels.C:229
Transport model selection class for the interFoam family of solvers.
tmp< fvVectorMatrix > divDevTau(const volScalarField &rho, volVectorField &U) const
Return the effective momentum stress divergence.
Class to represent a mixture of two constant density phases.
Provides controls for the pressure reference in closed-volume simulations.
Foam::fvModels & fvModels() const
Return the fvModels that are created on demand.
Definition: solver.C:96
const fvMesh & mesh
Region mesh.
Definition: solver.H:101
const volVectorField & U
Reference to the velocity field.
Definition: VoFSolver.H:213
const volScalarField & rho
Reference to the mixture continuity density field.
Definition: VoFSolver.H:110
Solver module for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-...
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.
virtual void momentumTransportCorrector()
Correct the momentum transport.
void operator=(const incompressibleVoF &)=delete
Disallow default bitwise assignment.
virtual void prePredictor()
Called at the start of the PIMPLE loop.
incompressibleInterPhaseTransportModel momentumTransport
Momentum transport model.
virtual bool incompressible() const
The flow is incompressible.
virtual bool divergent() const
Is the flow divergent?
virtual void momentumTransportPredictor()
Predict the momentum transport.
virtual ~incompressibleVoF()
Destructor.
virtual void alphaSuSp(tmp< volScalarField::Internal > &Su, tmp< volScalarField::Internal > &Sp)
Calculate the alpha equation sources.
Definition: alphaSuSp.C:32
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
virtual void thermophysicalTransportCorrector()
Correct the thermophysical transport.
incompressibleVoF(fvMesh &mesh)
Construct from region mesh.
TypeName("incompressibleVoF")
Runtime type information.
Foam::pressureReference pressureReference_
Pressure reference.
volScalarField p
Static pressure field.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U)
Return the momentum equation stress term.
virtual void thermophysicalTransportPredictor()
Predict thermophysical transport.
incompressibleTwoPhaseVoFMixture & mixture
The compressible two-phase mixture.
volScalarField & alpha1
Reference to the phase1-fraction.
volScalarField & alpha2
Reference to the phase2-fraction.
Solver module base-class for 2 immiscible fluids using a VOF (volume of fluid) phase-fraction based i...
A class for managing temporary objects.
Definition: tmp.H:55
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
Definition: fvcSup.C:44
tmp< VolField< Type > > Sp(const volScalarField &sp, const VolField< Type > &vf)
Definition: fvcSup.C:67
Namespace for OpenFOAM.