Volume of Fluid (Multiphase Flow)#
In this subsection, the parameters for multiphase flow simulation using the volume of fluid method (VOF) are specified.
In this method, the two fluids considered are given index of \(0\) and \(1\) respectively. The amount of fluid at any given quadrature point is represented by a phase fraction between \(0\) and \(1\). The interface is therefore considered located where the phase fraction \(= 0.5\). The interface between the two fluids is moved by a transport equation on the phase fraction.
Note
At the moment, a maximum of two fluids is supported. By convention, air is usually the fluid 0
and the other fluid of interest is the fluid 1
. See Initial Conditions for the definition of the VOF initial conditions and Physical properties - Two Phase Simulations for the definition of the physical properties of both fluids. Do not forget to set VOF = true
in the Multiphysics subsection of the .prm
.
The default values of the VOF parameters are given in the text box below.
subsection VOF
set viscous dissipative fluid = fluid 1
set diffusivity = 0
set compressible = false
subsection interface regularization method
set type = none
set frequency = 10
set verbosity = quiet
subsection projection-based interface sharpening
set interface sharpness = 2
set type = constant
# parameter for constant projection-based interface sharpening
set threshold = 0.5
# parameters for adaptive projection-based interface sharpening
set threshold max deviation = 0.20
set max iterations = 20
set tolerance = 1e-6
set monitored fluid = fluid 1
end
subsection algebraic interface reinitialization
set output reinitialization steps = false
set steady-state criterion = 1e-2
set max steps number = 5
set diffusivity multiplier = 1.0
set diffusivity power = 1.0
set reinitialization CFL = 1.0
end
end
subsection phase filtration
set type = none
set verbosity = quiet
# parameter for the tanh filter
set beta = 20
end
subsection surface tension force
set enable = false
set verbosity = quiet
set output auxiliary fields = false
set phase fraction gradient filter factor = 4
set curvature filter factor = 1
set enable marangoni effect = false
end
end
viscous dissipative fluid
: defines fluid(s) to which viscous dissipation is applied.Choices are:
fluid 0
,fluid 1
(default) orboth
, with the fluid IDs defined in Physical properties - Two Phase Simulations.Tip
Applying viscous dissipation in one of the fluids instead of both is particularly useful when one of the fluids is air. For numerical stability, the
kinematic viscosity
of the air is usually increased. However, we do not want to have viscous dissipation in the air, because it would result in an unrealistic increase in its temperature. This parameter is used only ifset heat transfer = true
andset viscous dissipation = true
in Multiphysics.diffusivity
: value of the diffusivity (diffusion coefficient) in the transport equation of the phase fraction. Default value is0
to have pure advection.compressible
: enables interface compression (\(\phi \nabla \cdot \mathbf{u}\)) in the VOF equation. This term should be kept to its default value offalse
except when compressible equations of state are used.
Interface Regularization Method#
The subsection interface regularization method
defines parameters to counter numerical diffusion of the VOF method and to avoid the interface between the two fluids becoming more and more blurry after each time-step.
type
: sets the method of regularization. There are three methods available:none
,projection-based interface sharpening
andalgebraic interface reinitialization
. Ifnone
is selected, the interface is not regularized. The two other types are described bellow along with their corresponding subsection.frequency
: indicates the frequency at which the regularization process is applied to the VOF phase fraction field. For instance, if the user specifiesfrequency = 2
, the interface will be regularized once every \(2\) time-steps.verbosity
: displays the solution process of the regularization method. The different levels of verbosity are:quiet
: default verbosity level; no information on the process is displayed.Warning
The verbosity of the algebraic interface reinitialization (
type = algebraic
) depends also on the verbosity level of the non-linear and linear solvers. If they are set toverbose
, the console outputs of the iteration progress (e.g., norms of the residual and Newton update) may remain.verbose
: displays regularization steps progression. For thealgebraic interface reinitialization
, it only indicates the details of the non-linear and linear iterations if the corresponding solvers are also set toverbose
.extra verbose
: for theprojection-based interface sharpening
, indicates the details of the linear iterations. For thealgebraic interface reinitialization
, in addition to what is displayed at theverbose
level, it displays the steady-state criterion progression through reinitialization steps. This may be used for debugging purposes.
Projection-Based Interface Sharpening#
The type = projection-based interface sharpening
corresponds to a projection-based regularization method in which the phase indicator is projected into a sharper space. The reader is referred to the Projection-Based Interface Sharpening section of The Volume of Fluid (VOF) Method theory guide for additional details on this regularization method. The subsection projection-based interface sharpening
defines the relevant parameters.
interface sharpness
: sharpness of the moving interface, denoted \(\alpha\) in the Interface Sharpening section of The Volume of Fluid (VOF) Method and \(a\) in the interface sharpening model paper. This parameter must be larger than 1 for interface sharpening. Choosing values less than 1 leads to interface smoothing instead of sharpening. A good value would be around 1.5.type
: defines the projection-based interface sharpening type, eitherconstant
oradaptive
set type = constant
: the sharpeningthreshold
is the same throughout the simulation. Thisthreshold
, between0
and1
(0.5
by default), corresponds to the phase fraction at which the interface is located.set type = adaptive
: the sharpening threshold is searched in the range \(\left[0.5-c_\text{dev} \; ; 0.5+c_\text{dev}\right]\), with \(c_\text{dev}\) thethreshold max deviation
(0.2
by default), to ensure mass conservation. The search algorithm will stop either if the mass conservationtolerance
is reached, or if the number of search steps reaches the number ofmax iterations
. If thetolerance
is not reached, a warning message will be printed.
Tip
Usually the first iterations with sharpening are the most at risk to reach the
max iterations
without thetolerance
being met, particularly if the mesh is quite coarse.As most of the other iterations converge in only one step (corresponding to a final threshold of \(0.5\)), increasing the sharpening search range through a higher
threshold max deviation
will relax the condition on the first iterations with a limited impact on the computational cost.monitored fluid
: Fluid in which the mass conservation is monitored to find the adaptive sharpening threshold. The choices arefluid 1
(default) orfluid 0
.tolerance
: Value of the tolerance on the mass conservation of the monitored fluid.For instance, with
set tolerance = 0.02
the sharpening threshold will be adapted so that the mass of themonitored fluid
varies less than \(\pm 2\%\) from the initial mass (at \(t = 0.0\) sec).
See also
The Dam-Break example discussed the interface sharperning mechanism.
Algebraic Interface Reinitialization#
The type = algebraic
corresponds to a PDE-based reinitialization method. Alike the projection-based interface sharpening, this aims to reduce numerical diffusion of the phase fraction and redefine the interface sharply by resolving a PDE. The reader is referred to the Algebraic Interface Reinitialization section of the Volume of Fluid method theory guide for additional details on this method. The subsection algebraic interface reinitialization
defines parameters used to reinitialize the interface in VOF simulations.
output reinitialization steps
: when set totrue
, it enables outputs in parallel vtu format of the algebraic reinitialization steps. The files are stored in a folder namedalgebraic-reinitialization-steps-output
located inside theoutput path
directory specified in the simulation control subsection.- Outputted quantities of interest are:
Reinitialized phase fraction scalar-field (
reinit_phase_fraction
);VOF phase fraction scalar-field (
vof_phase_fraction
);VOF projected phase gradient vector-field (
vof_phase_gradient
) and;VOF projected curvature scalar-field (
vof_curvature
).
Tip
This feature can be used for debugging purposes by observing how the reinitialization steps affect the phase fraction field.
The interface reinitialization process ends either when steady-state (steady-state criterion
) is reached or when an imposed maximum number of steps (max steps number
) is reached.
steady-state criterion
: one of the two stop criteria of the interface reinitialization process. This parameter \((\alpha_\text{ss})\) acts as a tolerance for reaching steady-state when solving the algebraic interface reinitialization partial differential equation (PDE).\[\alpha_\text{ss} \geq \frac{ \lVert \phi_\text{reinit}^{\tau + 1} - \phi_\text{reinit}^{\tau} \rVert_2}{\Delta \tau}\]where \(\tau\) is the pseudo-time used to solve the reinitialization PDE and \(\Delta \tau\) is the associated pseudo-time-step.
max steps number
: indicates the maximum number of interface reinitialization steps that can be applied before the process ends.
The algebraic interface reinitialization PDE contains a diffusion term. This term contains a diffusion coefficient \((\varepsilon)\) given by:
diffusivity multiplier
: factor \((C)\) multiplying the smallest cell-size value \((h_\text{min})\) in the evaluation of the diffusion coefficient of the PDE.diffusivity power
: power \((d)\) to which the smallest cell-size value \((h_\text{min})\) is elevated in the evaluation of the diffusion coefficient of the PDE.reinitialization CFL
: CFL condition of the interface reinitialization process. This is used to evaluate the pseudo-time-step \((\Delta\tau)\).\[\Delta \tau = C_\text{CFL} \, h_\text{min}\]where \(C_\text{CFL}\) is the imposed CFL condition and \(h_\text{min}\) is the size of the smallest cell.
Phase Filtration#
subsection phase filtration
: defines the filter applied to the phase fraction. This affects the definition of the interface.type
: defines the filter type, eithernone
ortanh
set type = none
: the phase fraction is not filteredset type = tanh
: the filter function described in the Interface filtration section of The Volume of Fluid (VOF) Method theory guide is applied.
beta
: value of the \(\beta\) parameter of thetanh
filterverbosity
: enables the display of filtered phase fraction values. Choices arequiet
(no output) andverbose
(displays values)
Surface Tension Force#
subsection surface tension force
: Surface tension is the tendency of a liquid to maintain the minimum possible surface area. This subsection defines parameters to ensure an accurate interface between the two phases, used when at least one phase is liquid.enable
: controls ifsurface tension force
is considered.Attention
When the surface tension force is enabled, a
fluid-fluid
material interaction and asurface tension model
with its parameters must be specified in the Physical Properties subsection.verbosity
: enables the display of the output from the surface tension force calculations. Choices are:quiet
(default, no output) andverbose
.output auxiliary fields
: enables the display of the filteredphase fraction gradient
and filteredcurvature
. Used for debugging purposes.phase fraction gradient filter factor
: value of the factor \(\alpha\) applied in the filter \(\eta_n = \alpha h^2\), where \(h\) is the cell size. This filter is used to apply a projection step to damp high frequency errors, that are magnified by differentiation, in the phase fraction gradient (\(\bf{\psi}\)), following the equation:\[\int_\Omega \left( {\bf{v}} \cdot {\bf{\psi}} + \eta_n \nabla {\bf{v}} \cdot \nabla {\bf{\psi}} \right) d\Omega = \int_\Omega \left( {\bf{v}} \cdot \nabla {\phi} \right) d\Omega\]where \(\bf{v}\) is a piecewise continuous vector-valued test function, \(\bf{\psi}\) is the filtered phase fraction gradient, and \(\phi\) is the phase fraction.
curvature filter factor
: value of the factor \(\beta\) applied in the filter \(\eta_\kappa = \beta h^2\), where \(h\) is the cell size. This filter is used to apply a projection step to damp high frequency errors, that are magnified by differentiation, in the curvature \(\kappa\), following the equation:\[\int_\Omega \left( v \kappa + \eta_\kappa \nabla v \cdot \nabla \kappa \right) d\Omega = \int_\Omega \left( \nabla v \cdot \frac{\bf{\psi}}{|\bf{\psi}|} \right) d\Omega\]where \(v\) is a test function, \(\kappa\) is the filtered curvature, and \(\bf{\psi}\) is the filtered phase fraction gradient.
Tip
Use the procedure suggested in: Choosing Values for the Surface Tension Force Filters.
enable marangoni effect
: Marangoni effect is a thermocapillary effect. It is considered in simulations if this parameter is set totrue
. Additionally, theheat transfer
auxiliary physics must be enabled (see: Multiphysics) and a non constantsurface tension model
with its parameters must be specified in thephysical properties
subsection (see: Physical Properties).
See also
The surface tension force is used in the Rising Bubble example.
Choosing Values for the Surface Tension Force Filters#
The following procedure is recommended to choose proper values for the phase fraction gradient filter factor
and curvature filter factor
:
Use
set output auxiliary fields = true
to write filtered phase fraction gradient and filtered curvature fields.Choose a value close to 1, for example, \(\alpha = 4\) and \(\beta = 1\).
Run the simulation and check whether the filtered phase fraction gradient field is smooth and without oscillation.
If the filtered phase fraction gradient and filtered curvature fields show oscillations, increase the value \(\alpha\) and \(\beta\) to larger values, and repeat this process until reaching smooth filtered phase fraction gradient and filtered curvature fields without oscillations.