multiphaseVoFSolver.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-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::multiphaseVoFSolver
26 
27 Description
28  Base solver module for the solution of multiple 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  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
37  pseudo-transient and steady simulations.
38 
39 SourceFiles
40  multiphaseVoFSolver.C
41 
42 See also
43  Foam::solvers::VoFSolver
44  Foam::solvers::incompressibleMultiphaseVoFSolver
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef multiphaseVoFSolver_H
49 #define multiphaseVoFSolver_H
50 
51 #include "VoFSolver.H"
52 #include "multiphaseVoFMixture.H"
53 #include "MULES.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace solvers
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class multiphaseVoFSolver Declaration
64 \*---------------------------------------------------------------------------*/
65 
67 :
68  public VoFSolver
69 {
70 
71 protected:
72 
73  // Phase properties
74 
75  //- Reference to the multiphaseVoFMixture
77 
78  //- Reference to the phases
80 
81  scalar cAlpha;
82 
83  //- Function to calculate the number of explicit MULES sub-cycles
84  // from the alpha Courant number
86 
87  //- MULES controls
89 
90 
91 private:
92 
93  // Private Member Functions
94 
95  //- Correct the cached Courant numbers
96  void correctCoNum();
97 
98 
99 protected:
100 
101  // Protected Member Functions
102 
103  //- Read controls
104  virtual bool read();
105 
106  //- Adjust the rDeltaT in the vicinity of the interface
107  virtual void setInterfaceRDeltaT(volScalarField& rDeltaT);
108 
109  //- Solve for the phase-fractions
110  virtual void alphaPredictor() = 0;
111 
112  //- Correct the interface properties following mesh-change
113  // and phase-fraction update
114  virtual void correctInterface();
115 
116  //- Return the interface surface tension force for the momentum equation
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("multiphaseVoFSolver");
124 
125 
126  // Constructors
127 
128  //- Construct from region mesh
130 
131  //- Disallow default bitwise copy construction
132  multiphaseVoFSolver(const multiphaseVoFSolver&) = delete;
133 
134 
135  //- Destructor
136  virtual ~multiphaseVoFSolver();
137 
138 
139  // Member Functions
140 
141  //- Called at the start of the time-step, before the PIMPLE loop
142  virtual void preSolve();
143 
144  //- Called at the start of the PIMPLE loop
145  virtual void prePredictor();
146 
147 
148  // Member Operators
149 
150  //- Disallow default bitwise assignment
151  void operator=(const multiphaseVoFSolver&) = delete;
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace solvers
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
MULES: Multidimensional universal limiter for explicit solution.
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
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Multiphase VoF mixture with support for interface properties.
const fvMesh & mesh
Region mesh.
Definition: solver.H:101
Base solver module base-class for the solution of immiscible fluids using a VOF (volume of fluid) pha...
Definition: VoFSolver.H:73
Base solver module for the solution of multiple immiscible fluids using a VOF (volume of fluid) phase...
PtrListDictionary< VoFphase > & phases
Reference to the phases.
virtual tmp< surfaceScalarField > surfaceTensionForce() const
Return the interface surface tension force for the momentum equation.
virtual void prePredictor()
Called at the start of the PIMPLE loop.
MULES::control MULEScontrols
MULES controls.
multiphaseVoFSolver(fvMesh &mesh, autoPtr< multiphaseVoFMixture >)
Construct from region mesh.
multiphaseVoFMixture & mixture
Reference to the multiphaseVoFMixture.
virtual void alphaPredictor()=0
Solve for the phase-fractions.
virtual void setInterfaceRDeltaT(volScalarField &rDeltaT)
Adjust the rDeltaT in the vicinity of the interface.
autoPtr< Function1< scalar > > nAlphaSubCyclesPtr
Function to calculate the number of explicit MULES sub-cycles.
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
virtual void correctInterface()
Correct the interface properties following mesh-change.
void operator=(const multiphaseVoFSolver &)=delete
Disallow default bitwise assignment.
TypeName("multiphaseVoFSolver")
Runtime type information.
virtual bool read()
Read controls.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.