Free surface capturing two-phase free surface model considers two or more immiscible fluids in the domain, separated by a sharp and resolved free surface. The model can be seen as a special case of the multi-phase fluid model, sharing the mathematical basis. In contrast with the two-phase Eulerian model, multiple momentum equations collapse into one and fluid properties for a continuum are calculated assuming there is a sharp jump in the interface capturing equation.
Volume of Fluid (VoF)
Let’s start with alpha, 0 <= alpha <= 1 as the differential indicator function. Here, alpha can only take two values: say, 1 for water and 0 for air. Its shape, due to a sharp interface is always a step function and its derivative a Dirac function. Neither of the two is good for Finite-Volume-type discretisation.
Moving from the differential form of the phase indicator equation, we shall consider a control volume consisting both phases - and thus the interface. In this case, our continuous alpha function can take any cell value between zero and one, indicating how much of the cell is filled with Fluid 1 (water). Thus, 70% of water volume in a cell gives alpha = 0.7. A step-function has been relaxed to a continuous function, as it is now admissible to have values between 0 and 1 to indicate a partially filled cell. The exact position of the free surface can be identified by the iso-surface of alpha = 0.5.
The alpha, or Volume of Fluid (VOF) equation follows directly from phase (mass) conservation for a single phase: it is a natural property of the system. Thus, for a closed domain, domain integral of alpha remains constant, indicating that the total amount of water in the domain is conserved. Further, if one considers an arbitrary path through the domain, traversing a free surface only once, the VOF solution cannot be smeared. Accurate solution along the path will look as:
1 - 1 - 1 - 0.3 - 0 - 0 - 0
and not
1 - 1 - 1 - 0.8 - 0.2 - 0 - 0 - 0
In other words, going from alpha = 1 to alpha = 0, only a single cell needs to contain the interface. This is indicated by only a single cell with 0 < alpha 1. If two such cells exist (1 - 0.8 - 0.2 - 0), the interface is “smeared” and accuracy is lost. This is a catastrophic failing: physics of a free surface impacting the wall or falling on itself will be lost, since the mixture density field is calculated as
For a smeared alpha, rho is under-estimated and dynamic impact force prediction becomes meaningless. The figure below shows what a good alpha field looks like, together with the dynamic pressure field with interface jump conditions.
Moving step-profiles through a computational mesh is a hard job. A number of schemes exists, starting with various PLIC schemes of Hirt and Nichols, compressive numerics of Onno Ubbink, interface compression of Rusche and Weller, as well as level-set scheme bu Osher and Sethian. Here is a brief overview of the problem.
Advection problem described by
with divergence-free velocity field
is a simple advection problem. Conventional convection (and time derivative) discretisation smears out the interface, making it unusable.
Here is what “bad numerics” looks like on a dam break problem.
or, in a movie for a decent van Leer bounded convection discretisation scheme:
Note that it is essential to use a bounded convectiuon scheme to make sure alpha remains strictly bounded between 0 and 1 and conserved within a closed domain. This is quite a hard set of requirements we need to achieve.
My first step towards the solution used the compressive numerics. Introducing negative numerical diffusion, smeared profiles are numerically converted into step-profiles: while this is a bad idea in most situations, for free surface VoF this is exactly what the doctor ordered. Schemes such as CICSAM or mHRIC (of Star-CCM+) are a direct result of this approach.
Regrettably, compressive schemes tend to align the free surface with mesh faces, sometimes creating a zig-zag steps with high surface curvature and parasitic velocities. This is in nature of compressive schemes. To remedy this, Weller (approx 1995) starts with the Euler-Euler formulation of the phase continuity equation:
The problem is that we do not know the phase velocity u_alpha: we only know u, which is represented by volumetric flux and
In other words, the two velocities are only known together via the volumetric phase flux, since we only solve one continuity equation.
The stroke of genius is to rewrite the phase alpha equation as
Now, the convection term uses the velocity (and flux) we know; the additional term is very pretty. It only exists at the interface, where
and the velocity u_rel is the relative velocity between two phases
We can now postulate that the role of u_rel is to compress the interface - as it is active only where alpha*(1 - alpha) > 0 - and its direction will be surface-normal, ie u_rel is parallel with grad(alpha)/|grad(alpha)|.
Interface compression is now independent of the mesh and can be controlled numerically without creating parasitic velocities. This is the formulation we use in the NavPak: it is well validated, numerically benign, tunable, and capable of compressing even a stationary interface.
Level Set Equation
The VoF equation follows naturally from mathematical derivation, but it has serious drawbacks. The biggest one is its function shape: moving step-profiles around is hard! The most popular alternative is the level-set method, where alpha is replaced with a function calculated as the nearest distance to the free surface xi. The governing equation for the level-set variable xi remains
and VoF alpha can be recovered by
This always creates a perfectly sharp free surface - even too sharp for practical use. However, it simply replaces one type of numerical error (loss of step profile in alpha) for another. Mathematically, grad(xi) = 1, a property which will be lost due to discretisation error in advective transport. A standard solution to the problem is re-initialisation of xi, starting from the interface and marching in surface-normal direction. This is impractical, expensive and inaccurate.
When calculating mixture density rho or mixture viscosity nu, it helps to smoothen out the abrupt step of the level-set alpha: in practice, alpha will be smeared across one cell to help with the pressure-velocity numerics.
With the NavPak, we will use a derived form of level set equation with
where phi is the phase field variable and epsilon is the smearing parameter. This equation will be solved in incremental form, to help with incident wave modelling.
This gives us an advantage of the equation known to transport a tanh-shaped interface without deformation:
For those really really good in numerics, you will notice that all of the terms on the right-hand-side can be made fully implicit, effectively performing the equivalent of the level-set reinitialisation implictly together with the transport. What joy!
An overview of surface capturing variables is shown in the figure below.
Correction Formulation
One can think of this in the spirit of SWENSE decomposition by Pierre Ferrant of Ecole Central Nantes, where a variable is decomposed into the incident field and complementary (or correction) field. Thus:
When modelling waves, we seek xi_tot; xi_inc can be thought of as a description of incoming waves (or flat water, in steady resistance simulations). Since incident wave field typically comes from potential flow models (see the wave modelling blog), xi_corr can be thought of as the non-linear or viscous correction to the model.
The beauty of this approach is that we are only solving for xi_corr; in regions where xi_corr is zero, the flow solution matches the potential flow model whereas non-zero xi_corr indicates viscous or non-linear effects.
The equation NavPak solves for the free surface is in fact the phase field equation in correction form. Trick to its accuracy is in the fact that the right-hand-side terms of the phase field equations can be seen as re-formulated level-set method reinitialisation terms: they effectively see the same job.
This formulation is very accurate and robust. xi_corr will be non-zero only where the correction to potential flow exists, such as close to the hull or in the wake. Benchmarking experience shows that the incremental form - due to lower discretisation error - accumulates very low discretisation error.
The method naturally extends to simulations of incoming waves, which is a further benefit and eliminates any sensitivity on far-field boundary conditions.
There are many other topics to address here, including mass conservation, sharpness of the interface, Courant number limitations of various approaches, as well as the mother of them all: hull ventilation problem. Look for future posts for more information.
For more details on the free surface capturing equation and SWENSE decomposition, please refer to the following papers:
Vukcevic et al: Decomposition model for naval hydrodynamic applications, Part I: Computational method, Ocean Engineering, v 121 pp 37-46, 2016
https://doi.org/10.1016/j.oceaneng.2016.05.022
Vukcevic et al: Decomposition model for naval hydrodynamic applications, Part II: Verification and validation, Ocean Engineering v 121 pp 76-88, 2016
https://doi.org/10.1016/j.oceaneng.2016.05.021
All the results in this blog are produces using the NavPak and Naval Hydro Pack by Wikki. Contact me for further details at https://www.wikki.co.uk , by direct message or by E-mail.
For more information on Wikki’s naval hydrodynamics CFD products, please see our web page
and




Great update! I'm wondering about two things in the Level-Set part:
Reinitialization of Level Set is not necessarily mass conservative. Is that an issue?
You say for the Level Set equation that the "terms on the right-hand-side can be made fully implicit". Hmm, also the "tanh" term? Do you linearize it?