betaFeedback

WorksPhysics and Astronomy

Enhanced Level-Set Method for free surface flow applications

Abstract

This paper presents a solver using the Level-Set method for incompressible two phase flows with surface tension. A one fluid approach is adopted where both phases share the same velocity and pressure field. The Level Set method has been coupled with the Ghost Fluid Method. An efficient and pragmatic solution is proposed to avoid interface displacement during the reinitialization of the level-Set fields. A solver called LSFoam has been implemented in the OpenFOAM framework with consistent Rhie & Chow interpolation. This solver has been tested on several test cases covering different scales and flow configurations: rising bubble test case, Rayleigh-Taylor instability simulations, Ogee spillway flow, 3D dambreak simulation with a square cylinder obstacle and KVLCC2 steady resistance calculations. Overall results are in excellent agreement with reference data and the present approach is very promising for moderate free surface deformations.

Introduction

When simulating free surface flows, both the Volume-of-Fluid method (VoF, Hirt and Nichols [ [18]) and the Level-Set method (LS, Sussman et al. [ [49]) can be used to capture interface between two phases. The Volume of Fluid (VoF) method is widely adopted in industry for multiphase flow simulations and is integrated into major commercial software such as Star-CCM+ (Simcenter [2020]), Fluent (Fluent [ [6]), and OpenFOAM (interFoam solver). In this work, the term "industrial" refers to a challenging context of various 3D flow configurations with different cell types, high maximal non-orthogonality (above 80°) and maximal Courant number higher than 50. The VoF method popularity stems from its inherent ability to conserve mass, making it a natural choice within industrial constraints. In contrast, the original Level-Set (LS) method, based on the function ψ\psi being the signed distance to the interface, has limited dissemination to commercial software and industrial applications. It is likely due to its lack of mass conservation property. However, the LS method offers numerical advantages such as more accurate and reliable curvature computations as well as a user controlled interface thickness. Additionally, with the LS approach, the distance to the interface is readily available, making it easy to combine with the Ghost Fluid Method (GFM), Fedkiw et al. [ [4]. To capture the interface motion, the LS function is advected in a velocity field. However, when the tangential component of the normal velocity gradient is non-zero, such a procedure will break the distance property of the Level-Set function (∣∇ψ∣≠1|\nabla\psi| \ne1). This behavior will generate unacceptable mass variations. Hence, a reinitialization procedure, Sussman et al. [ [49], is often used for recovering the signed distance property of the LS function. To limit mass variations, researchers traditionally use a combination of 5th order WENO spatial schemes Liu et al. [ [34], and Runge Kutta (RK2 or RK3) temporal scheme for the resolution of both transport and reinitialization equations Huang et al. [ [20]; ], Lalanne et al. [ [31]. Even with this numerical treatment, there is still no guarantee that mass will be conserved, Gu et al. [2018]. Moreover, even if WENO schemes have been promisingly used for unstructured grids Martin and Shevchuk [ [35]; ], Gärtner et al. [ [10], they remain complex to use for industrial applications. Indeed, WENO schemes require low Courant numbers (< 1/3 in 3D, Titarev and Toro [ [52]) which can be very restricting to decrease the calculation time when only the steady state regime is of interest (typically for ship resistance assessment). The sub-cell fix method, Hartmann et al. [2010], Russo and Smereka [ [45], has been developed to limit interface displacements during the reinitialization, but its application is limited to Cartesian grids. Moreover, Sun et al. [ [48] have shown that the zero Level-Set can be disturbed even with the sub-cell fix method. Applications of the original approach of Sussman et al. [ [49] for 3D industrial situations remain limited, Khosronejad et al. [ [28], Park et al. [ [37], Huang et al. [ [20], and restricted to structured grids. Hence, the approach efficiency, accuracy, robustness and range of applications for such situations remain unclear. Therefore, using the available literature, this work aims to develop an efficient Level-Set/GFM solver for arbitrary polyhedral cells, incorporating enhancements to the the Level-Set method while maintaining the simplicity of the original approach of Sussman et al. [ [49]. The solver, deployed within 2nd order finite volume OpenFOAM framework Weller et al. [ [58] and referred as LSFoam, is tested for various flow configurations:

  • Rising bubble (Hysing et al. [ [21]),

  • Rayleigh-Taylor instability simulations (Puckett et al. [ [42]),

  • Ogee spillway flow (Erpicum et al. [ [3]),

  • 3D dambreak simulation (Gomez-Gesteira [ [8]),

  • KVLCC2 steady resistance calculations (Larsson et al. [ [32])

Mathematical and numerical procedure

The Level-Set equation

The computational domain is divided into two pieces Ω+\Omega^{+} and Ω−\Omega^{-} separated by the interface Γ\Gamma. Where Ω+\Omega^{+} and Ω−\Omega^{-} represent respectively the domain of heavy and light phases. For a given point x\boldsymbol{x}, the Level-Set function ψ(x)\psi(\boldsymbol{x}) is defined by the shortest distance dd to the interface. It is signed depending on the point domains (1), so that both numerical transport and stability near the interface are improved by avoiding ∇ψ\nabla\psi discontinuities.

ψ(x)={0x∈Γd(x)x∈Ω+−d(x)x∈Ω−(1)\psi(\boldsymbol{x}) = \begin{cases} 0 & \boldsymbol{x} \in\Gamma\\ d(\boldsymbol{x}) & \boldsymbol{x} \in\Omega^{+} \\ -d(\boldsymbol{x}) & \boldsymbol{x} \in\Omega^{-} \end{cases} \tag*{(1)}

A consequence of this definition is that ∀x\forall\boldsymbol{x}, ∣∇ψ∣=1\lvert\nabla\psi\rvert= 1.

Illustration of the definition of the Level-Set function

Figure 1. Illustration of the definition of the Level-Set function. Each iso-contour {x∣ψ(x)=d}\{\boldsymbol{x} \mid\psi(\boldsymbol{x}) = d\} define all the points x\boldsymbol{x} at a distance dd from the interface Γ\Gamma.

Interface normal n\boldsymbol{n} and curvature κ\kappa can be computed as follow:

n=∇ψ∣∇ψ∣(2)\boldsymbol{n} = \frac{\nabla\psi}{\lvert\nabla\psi\rvert} \tag*{(2)}
κ=∇⋅n(3)\kappa= \nabla\cdot\boldsymbol{n} \tag*{(3)}

The Level-Set function ψ\psi is advected in a flow field u\boldsymbol{u} (assumed incompressible) using a transport equation:

∂ψ∂t+∇⋅(uψ)=0(4)\frac{\partial\psi}{\partial t}+\nabla\cdot(u\psi)=0 \tag*{(4)}

The resolution of the transport equation is done with a sub-cycling strategy, Leroyer et al. [ [33]. The time step is subdivided into NN sub-cycles enhancing mass conservation. However, the transport of the Level-Set function will breach the distance property and is likely to cause mass variations. To limit such consequences, a reinitialization procedure is adopted by solving the following (eikonal) equation (Sussman et al. [ [49]):

∂ψ∂τ=S(ψ0)(1−∣∇ψ∣)(5)\frac{\partial\psi}{\partial\tau}=S(\psi_0)(1-\lvert\nabla\psi\rvert) \tag*{(5)}

Where SS is the sign function, ψ0\psi_0 the initial value of the Level-Set function and τ\tau has the dimension of a length. The function SS is smoothed to improve the numerical resolution in the vicinity of the interface using the following expression Osher and Fedkiw [ [36]:

S(ψ0)=ψ0ψ02+∣∇ψ0∣2ϵ2(6)S(\psi_0)=\frac{\psi_0}{\sqrt{\psi_0^2+\lvert\nabla\psi_0\rvert^2\epsilon^2}} \tag*{(6)}

The term ∣∇ψ0∣\lvert\nabla\psi_0\rvert helps the reinitialization process when the initial field ψ0\psi_0 is away from the current Level-Set field. ϵ\epsilon can be a constant chosen as 2 or 3 the size of a user-defined reference cell. However, this can be prejudicial with non-uniform grids. To tackle this issue, ϵ(x)\epsilon(x) becomes a variable computed on the domain for each cell C(x)C(x):

ϵ(x)=kle(7)\epsilon(x)=kl_e \tag*{(7)}

with kk a user defined constant (usually k=2k=2) and le(x)l_e(x) the length of the cell edge that have the highest scalar product with the interface normal vector so that:

le⋅n=max⁡(lei⋅n),∀ei∈C(x)l_e\cdot n=\max(l_{e_i}\cdot n),\quad\forall e_i\in C(x)

Kim and Park [ [29] used an Euler explicit resolution of Equation (5) based on the code of Yamamoto et al. [ [59]. However, the explicit method has a limited range of applicability, especially for unstructured grids. Instead, Sussman et al. [ [50] defined:

w=S(ψ0)n(8)w=S(\psi_0)n \tag*{(8)}

which leads to the following form of the reinitialization equation:

∂ψ∂τ+∇⋅(wψ)−ψ∇⋅w=S(ψ0)(9)\frac{\partial\psi}{\partial\tau}+\nabla\cdot(w\psi)-\psi\nabla\cdot w=S(\psi_0) \tag*{(9)}

Equation (9) is more suitable for implicit finite volume discretization Vukcevic and Jasak [ [56], easing the use of unstructured meshes and improving the numerical stability. In this study, the reinitialization equation 9 is implicitly solved with the first order Euler scheme. The convective term ∇⋅(wψ)\nabla\cdot(w\psi) is discretized using 2nd order TVD MUSCL scheme, van Leer [ [54], and the third term of Equation (9) is treated implicitly. The reinitialization equation is solved for a user defined number of iteration with ii is the iteration counter. For a given cell PP with volume VPV_P, surrounded with neighboring cells NfN_f that share the face ff of cell PP, the discretization of Equation (9) can be expressed using Gauss’s theorem for divergence operators as follows:

ψPi−ψPi−1τVP+∑f[wi−1]f⋅Sfψfi−ψPi∑f[wi−1]f⋅Sf=ψP0(ψP0)2+∣∇ψP0∣2ϵP2VP(10)\frac{\psi_P^i-\psi_P^{i-1}}{\tau}V_P+\sum_f[\mathbf{w}^{i-1}]_f\cdot\mathbf{S}_f\psi_f^i-\psi_P^i\sum_f[\mathbf{w}^{i-1}]_f\cdot\mathbf{S}_f=\frac{\psi_P^0}{\sqrt{(\psi_P^0)^2+\lvert\nabla\psi_P^0\rvert^2\epsilon_P^2}}V_P \tag*{(10)}

Where, ψPi\psi_P^i represents the unknown cell-centered values, and ψP0\psi_P^0 is the signed distance function before the reinitialization procedure (i=0i=0) at cell PP. The bracket [⋅]f[\cdot]_f indicates a linear interpolation from cell center to face center. For the convective term, ψfi\psi_f^i is written as a linear function of ψPi\psi_P^i and ψNfi\psi_{N_f}^i using MUSCL scheme, van Leer [ [54]. The non-linearity in the divergence terms are handled by using previous values of ww at iteration i−1i-1. Authors generally use meshes with uniform cell size and define τ=0.5Δz\tau=0.5\Delta z where Δz\Delta z is the grid size. Nevertheless, for unstructured, highly distorted, or non-uniform meshes commonly used in industrial situations, this approach is not optimal as the cell size can vary significantly, from small near the walls to large in the far-field region. We define the reinitialization Courant number γ\gamma by mimicking the definition used for momentum equation:

γ(x)=τV(x)∑fwf⋅Sf(11)\gamma(x) = \frac{\tau}{V(x)} \sum_f \mathbf{w}_f \cdot\mathbf{S}_f \tag*{(11)}

Where V(x)V(x) is the volume cell size, wf\mathbf{w}_f the linear interpolation of w\mathbf{w} from cell to face and ∑f\sum_f the sum over cell faces face average operator. In practice, the magnitude of w\mathbf{w} is not always equal to 1, especially before reinitialization, due to numerical errors or when ψ\psi deviates significantly from the signed distance function. In this study, (9) is solved with a local time stepping approach (LTS) where the spatial time step τ\tau is manipulated locally based on a given maximal reinitialization Courant number γmax\gamma_{max}:

1τ(x)=max⁡(1Δz(x),∑fwf⋅SfγmaxV(x))(12)\frac{1}{\tau(x)} = \max\left(\frac{1}{\Delta z(x)}, \frac{\sum_f \mathbf{w}_f \cdot\mathbf{S}_f}{\gamma_{max} V(x)}\right) \tag*{(12)}

The above procedure allows to maximize the spatial time step for each cell based on γmax\gamma_{max} value. The spatial time step is limited by the local cell size Δz(x)\Delta z(x). In practice, interface displacements can occur during the reinitialization procedure leading to mass variations. If the reinitialization frequency and/or the number of iterations is too high, significant interface displacements will occur. Traditionally, authors solve the eikonal equation for a given reinitialization frequency and for a number of iterations [16, 26]. Hence, having to determine the optimal iteration number and frequency is the major drawback of this method. Moreover, these parameters are strongly case-dependent, which is limiting its use for a wide range of complex situations encountered under industrial context.

To tackle all this, a simple and pragmatic solution that avoids any interface displacements during the resolution of the eikonal equation is proposed. The set of cells (called anchoring cells) crossing the zero Level-Set contour are detected. The simplified algorithmic procedure is presented in algorithm 1. The detection is done by looping over the mesh faces and by marking all the cells that share the faces satisfying the criterion ψPψN<0\psi_P\psi_N < 0 (Equation (28)), where PP and NN the face owner and neighboring cells. The anchoring cells are distinguished using a boolean list. The corresponding Level-Set values are stored before the reinitialization procedure. Then, after each iteration of the eikonal equation resolution, the Level-Set values of the anchoring cells are restored so that the zero Level-Set contour remains undisturbed during the reinitialization. The efficiency of the present approach is demonstrated in chapter 3. This method is consistent with the GFM, that uses the same criterion to identify interface faces. The present approach is illustrated in Figure 2, where the anchoring cells are colored in red. Level-Set contours are also plotted after reinitialization.

Illustration of the anchoring cells and Level-Set contours

Figure 2. Illustration of the anchoring cells (coloured in red) used during the reinitialization procedure - Level-Set contours are also plotted after reinitialization.

#Starting reinitialisation
store ψ₀
compute S(ψ₀)
initialize list anchoringCell #False for all cells

#Looping over all mesh faces
for face in mesh:
    if ψPψN < 0: # P and N sharing face f
        anchoringCell[P] = True
        anchoringCell[N] = True

while reinitialization iteration:
    solve eikonal equation
    restore ψ = ψ₀ for anchoringCell = True

Listing 1: redistanciation procedure simplified algorithm

The Level-Set function is used to compute the phase fraction with an hyperbolic filtering function. The volume fraction α\alpha is calculated using the standard hyperbolic filtering function:

α=12(tanh⁡(πψϵ(x))+1)(13)\alpha= \frac{1}{2}\left(\tanh\left(\frac{\pi\psi}{\epsilon(x)}\right)+1\right) \tag*{(13)}

The phase fraction α\alpha is then used to calculate the mixture viscosity μ\mu as:

μ=αμ++(1−α)μ−(14)\mu= \alpha\mu^{+} + (1-\alpha)\mu^{-} \tag*{(14)}
{ρ=ρ+if ψ>0ρ=ρ−if ψ<0(15)\begin{cases} \rho= \rho^{+} & \text{if } \psi> 0 \\ \rho= \rho^{-} & \text{if } \psi< 0 \tag*{(15)} \end{cases}

Where μ+\mu^{+} and μ−\mu^{-} are the dynamic viscosity of heavy and light phases and ρ+\rho^{+} and ρ−\rho^{-} their density.

Consistent pressure-velocity coupling

The momentum equation in each phase is given as follows, Trujillo [2021]:

∂u∂t+∇⋅(u⊗u)=1ρ(−∇p+ρg+∇⋅[μeff(∇u+(∇u)T)−μeff23tr⁡((∇u)T)]+σκnδΓ)(16)\frac{\partial u}{\partial t}+\nabla\cdot(u\otimes u)=\frac{1}{\rho}\left(-\nabla p+\rho g+\nabla\cdot\left[\mu_{eff}\left(\nabla u+(\nabla u)^{T}\right)-\mu_{eff}\frac{2}{3}\operatorname{tr}\left((\nabla u)^{T}\right)\right]+\sigma\kappa n\delta_{\Gamma}\right) \tag*{(16)}

Where σ\sigma is the surface tension coefficient, nn the interface normal (Equation 2), δΓ\delta_{\Gamma} a surface Dirac function that equals one at the interface and zero elsewhere, and μeff\mu_{eff} the effective viscosity (sum of the molecular μ\mu and turbulent viscosity μt\mu_t). In Equation 16, the pressure pp is replaced by its decomposition into dynamic (or piezometric) pdp_d and hydrostatic parts:

p=pd+ρg⋅x(17)p=p_d+\rho g\cdot x \tag*{(17)}
∇p=∇pd+∇ρg⋅x+ρg(18)\nabla p=\nabla p_d+\nabla\rho g\cdot x+\rho g \tag*{(18)}

With xx the coordinate vector. The reason for using pdp_d is to avoid any sudden changes of the pressure field at the boundaries for hydrostatic problems, Rusche [ [44]. Then, assuming a piece-wise density field, the momentum balance takes the following form in each phase domain Ω+\Omega^{+} and Ω−\Omega^{-}:

∂u∂t+∇⋅(u⊗u)=1ρ(∇pd+∇⋅[μeff(∇u+(∇u)T)−μeff23tr⁡((∇u)T)]), in Ω+ or Ω−(19)\frac{\partial u}{\partial t}+\nabla\cdot(u\otimes u)=\frac{1}{\rho}\left(\nabla p_d+\nabla\cdot\left[\mu_{eff}\left(\nabla u+(\nabla u)^{T}\right)-\mu_{eff}\frac{2}{3}\operatorname{tr}\left((\nabla u)^{T}\right)\right]\right),\ \text{in }\Omega^{+}\text{ or }\Omega^{-} \tag*{(19)}

Having a continuous velocity and dynamic viscosity fields, Equation (19) is completed by the following set of jump conditions at the interface Γ\Gamma:

[∇pdρ]Γ=0(20)\left[\frac{\nabla p_d}{\rho}\right]_{\Gamma}=0 \tag*{(20)}
[pd]Γ=σκ+[ρ]Γg⋅xΓ≡H(21)[p_d]_{\Gamma}=\sigma\kappa+[\rho]_{\Gamma}\boldsymbol{g}\cdot\boldsymbol{x}_{\Gamma}\equiv\mathcal{H} \tag*{(21)}

Where xΓ\boldsymbol{x}_{\Gamma} is the interface coordinate vector. The bracket notation [.]Γ[.]_{\Gamma} indicates a jump value between both sides of the interface. The momentum equation 19 is discretized without the pressure gradient term. The remaining terms are treated implicitly, excepting the term 1ρ∇⋅[μeff(∇u)T−μeff23tr⁡(∇u)]\frac{1}{\rho}\nabla\cdot\left[\mu_{eff}(\nabla\boldsymbol{u})^{T}-\mu_{eff}\frac{2}{3}\operatorname{tr}(\nabla\boldsymbol{u})\right]. The semi-discretized momentum equation takes the following form:

aPuP=−∇pdρ−∑faNuN+s(uP)=−∇pdρ+H(uP)(22)a_P\boldsymbol{u}_P=-\frac{\nabla p_d}{\rho}-\sum_f a_N\boldsymbol{u}_N+s(\boldsymbol{u}_P)=-\frac{\nabla p_d}{\rho}+\boldsymbol{H}(\boldsymbol{u}_P) \tag*{(22)}

The coefficient aPa_P and aNa_N are respectively the diagonal and off-diagonal terms of the discretized momentum equations. Explicit contributions s(u)s(\boldsymbol{u}) are grouped in H(u)\boldsymbol{H}(\boldsymbol{u}). The summation stands for all the faces shared by the owner cell P and its neighboring cells N. To avoid checkerboard oscillations on collocated grids, the so-called Rhie and Chow [1983] interpolation is used to obtain the face velocity by mimicking Equation (22). In order to avoid relaxation factor and time step dependencies, the interpolation needs to be done in a consistent way. The approach of Cubero and Fueyo [2007] that has initially been developed for a single phase, is applied here for two-phase flows. The coefficient aPa_P is decomposed between its temporal ata_t and spatial asa_s parts. The old time contribution is taken out from H(u)\boldsymbol{H}(\boldsymbol{u}) (first order Euler scheme here as an example) and relaxation is applied to Equation (22), resulting in:

(at+as)uP=−αu∇pdρ+αuH(uP)+αuatuP0+(1−αu)(at+as)uPk−1(23)(a_t+a_s)\boldsymbol{u}_P=-\alpha_u\frac{\nabla p_d}{\rho}+\alpha_u\boldsymbol{H}(\boldsymbol{u}_P)+\alpha_u a_t\boldsymbol{u}_P^0+(1-\alpha_u)(a_t+a_s)\boldsymbol{u}_P^{k-1} \tag*{(23)}

Where αu\alpha_u is the relaxation factor, uPk−1\boldsymbol{u}_P^{k-1} the velocity field of the previous non linear iteration (PIMPLE loop), and uP0\boldsymbol{u}_P^0 the previous time step velocity field. In the case of 2nd order time discretization (backward scheme), the previous equation can be easily adapted by adding the old-old contribution uP00\boldsymbol{u}_P^{00} and the proper coefficients. The Equation (23) is re-arranged as follows:

uP=11+d(−αuas∇pdρ+αuasH(uP)+αuduP0)+(1−αu)uPk−1(24)\boldsymbol{u}_P=\frac{1}{1+d}\left(-\frac{\alpha_u}{a_s}\frac{\nabla p_d}{\rho}+\frac{\alpha_u}{a_s}\boldsymbol{H}(\boldsymbol{u}_P)+\alpha_u d\boldsymbol{u}_P^0\right)+(1-\alpha_u)\boldsymbol{u}_P^{k-1} \tag*{(24)}

Where d=atasd=\frac{a_t}{a_s}. The optional resolution of Equation (24), with an explicit pressure field, is the momentum predictor step. Following Rhie and Chow [1983], the face velocity equation is then obtained by mimicking Equation (24) at faces (written in term of flux ϕ\phi [m3/sm^3/s]).

ϕf=11+[d]f(−[αuas]f(∇pdρ)f⋅Sf+[αuH(uP)as]f⋅Sf+αu[d]fϕf0)+(1−αu)ϕfk−1(25)\phi_f=\frac{1}{1+[d]_f}\left(-\left[\frac{\alpha_u}{a_s}\right]_f\left(\frac{\nabla p_d}{\rho}\right)_f\cdot\boldsymbol{S}_f+\left[\frac{\alpha_u\boldsymbol{H}(\boldsymbol{u}_P)}{a_s}\right]_f\cdot\boldsymbol{S}_f+\alpha_u[d]_f\phi_f^0\right)+(1-\alpha_u)\phi_f^{k-1} \tag*{(25)}

Where [.][.] is the operator that linearly interpolates from cell center to face center. The continuity equation is then used on Equation (25) to obtain the pressure Poisson equation in its finite volume discretized form:

∑f[αuas]f1+[d]f(∇pdρ)f⋅Sf=∑f11+[d]f([αuH(uP)as]f⋅Sf+αu[d]fϕf0)+(1−αu)ϕfk−1(26)\sum_f\frac{\left[\frac{\alpha_u}{a_s}\right]_f}{1+[d]_f}\left(\frac{\nabla p_d}{\rho}\right)_f\cdot\boldsymbol{S}_f=\sum_f\frac{1}{1+[d]_f}\left(\left[\frac{\alpha_u\boldsymbol{H}(\boldsymbol{u}_P)}{a_s}\right]_f\cdot\boldsymbol{S}_f+\alpha_u[d]_f\phi_f^0\right)+(1-\alpha_u)\phi_f^{k-1} \tag*{(26)}

The mesh non-orthogonality is handled using the over-relaxed approach, Jasak [1996]. The surface vector Sf\boldsymbol{S}_f is then decomposed in two parts: the orthogonal δ\boldsymbol{\delta} and non-orthogonal k\boldsymbol{k} contributions:

(∇pdρ)f⋅Sf=(∇pdρ)f⋅δ⏟implicit+(∇pdρ)f⋅k⏟explicit(27)\left(\frac{\nabla p_d}{\rho}\right)_f\cdot\boldsymbol{S}_f=\underbrace{\left(\frac{\nabla p_d}{\rho}\right)_f\cdot\boldsymbol{\delta}}_{\mathit{implicit}}+\underbrace{\left(\frac{\nabla p_d}{\rho}\right)_f\cdot\boldsymbol{k}}_{\mathit{explicit}} \tag*{(27)}

The orthogonal part is discretized implicitly while the non-orthogonal contribution is treated explicitly and added to the matrix source term. After the resolution of the pressure Poisson equation, velocity field and conservative face flux ϕ\phi are respectively updated using Equations 24 and 25 with the updated pressure field.

Ghost Fluid Method for pressure extrapolation

The GFM has been initially proposed by Fedkiw et al. [ [4] for sharp density handling in compressible flows. The method as been subjected to various extensions: Kang et al. [ [27], Hong et al. [ [19] or Lalanne et al. [ [31]. The jump conditions 20 and 21 are used to derive interface-corrected interpolation schemes in the manner of Vukcevic [ [55], where the procedure is given in details. First, mesh faces that share the interface are marked (Equation 28) depending on the LS values ψP\psi_P and ψN\psi_N of an owner and its neighbor cells. Then, the coordinate vector of the interface xΓx_{\Gamma} (Equation 30) is obtained by linear interpolation using distance weight λ\lambda (Equation 29) and owner and neighbor cell coordinates. Finally, the extrapolated pressure at the ghost cell is calculated using jump conditions 20 and 21. The ghost pressures are directly given in Equation 31 and Equation 32, Ferro et al. [ [5].

ψPψN<0(28)\psi_P\psi_N < 0 \tag*{(28)}
λ=ψNψP−ψN(29)\lambda= \frac{\psi_N}{\psi_P-\psi_N} \tag*{(29)}
xΓ=cN+λ(cP−cN)(30)x_{\Gamma} = c_N+\lambda\left(c_P-c_N\right) \tag*{(30)}
pN+=ρ+ρ∗pd,N+(1−ρ+ρ∗)pd,P−ρ+ρ∗HP wet, N drypP−=ρ−ρ∗pd,P+(1−ρ−ρ∗)pd,N−ρ−ρ∗HP wet, N dry(31)\begin{aligned} p_N^+ &= \frac{\rho^+}{\rho^*}p_{d,N}+\left(1-\frac{\rho^+}{\rho^*}\right)p_{d,P}-\frac{\rho^+}{\rho^*}\mathcal{H} && P\ \text{wet},\ N\ \text{dry}\\ p_P^- &= \frac{\rho^-}{\rho^*}p_{d,P}+\left(1-\frac{\rho^-}{\rho^*}\right)p_{d,N}-\frac{\rho^-}{\rho^*}\mathcal{H} && P\ \text{wet},\ N\ \text{dry} \tag*{(31)} \end{aligned}
pN−=ρ−ρ∗pd,N+(1−ρ−ρ∗)pd,P+ρ−ρ∗HP dry, N wetpP+=ρ+ρ∗pd,P+(1−ρ+ρ∗)pd,N−ρ+ρ∗HP dry, N wet(32)\begin{aligned} p_N^- &= \frac{\rho^-}{\rho^*}p_{d,N}+\left(1-\frac{\rho^-}{\rho^*}\right)p_{d,P}+\frac{\rho^-}{\rho^*}\mathcal{H} && P\ \text{dry},\ N\ \text{wet}\\ p_P^+ &= \frac{\rho^+}{\rho^*}p_{d,P}+\left(1-\frac{\rho^+}{\rho^*}\right)p_{d,N}-\frac{\rho^+}{\rho^*}\mathcal{H} && P\ \text{dry},\ N\ \text{wet} \tag*{(32)} \end{aligned}

Where pd,Np_{d,N} and pd,Pp_{d,P} are the dynamic pressures at owner and neighbor cells of the interface face. ρ∗=ρ−λ+ρ+(1−λ)\rho^*=\rho^-\lambda+\rho^+(1-\lambda) is the weighted average density as in Haghshenas et al. [2019]. ρ−\rho^- and ρ+\rho^+ are the density of light and heavy phases. Expressions 31 and 32 are used to modify the pressure gradient (Gauss and least square methods) and Laplacian operators for the pressure Poisson equation during the pressure-velocity coupling.

Relaxation Zone

An explicit relaxation zone method has been coded based on Jacobsen et al. [ [24]. In a relaxation zone, the solution is forced via an explicit correction. For free surface flows involved in marine applications, the target solution (ψ\psi and u\boldsymbol{u}) are usually calculated based on wave theory and depending on the desired sea state. The method presented by Jacobsen et al. [ [24] consists in applying the following smoothing equation to all cells within a specified zone for a given field ξ\xi:

ξ=(1−ω)ξcur+ωξtar(33)\xi=(1-\omega)\xi_{cur}+\omega\xi_{tar} \tag*{(33)}

With ξtar\xi_{tar} the desired value, ξcur\xi_{cur} the current value and ω\omega being a weight decaying exponentially within the zone and null outside of it:

ω=exp⁡(dλ)−1e−1(34)\omega=\frac{\exp\left(\frac{d}{\lambda}\right)-1}{e-1} \tag*{(34)}

Where dd is the distance to the inlet of the zone and λ\lambda the total length of the zone so that w=0w=0 at the beginning of it and tends to w=1w=1 at the end, imposing the desired solution when d→λd\rightarrow\lambda. In this work, the relaxation zones are used for the last test case, in chapter 3.6, to damp induced waves so that numerical pollution or reflection are avoided. The target solutions for ψ\psi and u\mathbf{u} correspond to a flat sea state with a forced air/water current.

Solver chart of LSFoam

The Level-Set, the momentum, and the pressure Poisson equations are solved in a segregated manner with the PIMPLE algorithm available in OpenFOAM. The PIMPLE algorithm is a combination of SIMPLE ([38]) and PISO ([38, 23]) algorithms. At the beginning of the time step, the SIMPLE loop starts. Grid and flux are updated knowing rigid body motions (if any) and Level-Set equation is solved. The reinitialization equation is solved only for the last SIMPLE corrector. Explicit corrections are operated for relaxation zones (if any). Then, interface faces are marked and fluid properties are updated. The pressure Poisson equation is solved iteratively within the PISO loop and, finally, the turbulence equations are solved. It has to be noticed that the HH operator is updated for each corrector of the PISO loop. The steps are resumed in Figure 3.

Segregated algorithm for LSFoam solver

Figure 3. Segregated algorithm for LSFoam solver.

Test cases

Assessment of enhanced reinitialization procedure

The performances of the enhanced reinitialization procedure, described in chapter § 2.1, is assessed using a dedicated numerical test case. Only the eikonal equation 10 is solved to recover the signed distance function, knowing a circular contour (φ0=0\varphi^0 = 0) of radius 0.25 m and with an arbitrary signed distance initialization (-1 m inside the circle and 1 m outside it). The numerical domain is a 1 m x 1 m square. Three different 2D grids, shown in Figure 6, are generated: a 64x64 structured Cartesian grid, an unstructured grid with triangular cells and a structured distorted grid with a maximal non-orthogonality of 65° and a maximal aspect ratio of 70. The numerical error relative to the exact solution ψexact\psi_{exact} is calculated using the L2L_2 norm, Kim and Park [ [29] for each reinitialization iteration ii:

Comparison of iso-contours for the exact solution, with anchoring cells, and without anchoring cells across three grids

Figure 6. Comparison of iso-contour of ψ\psi for the three grids at iteration i=200i = 200. Solution with anchoring cells in blue and without in orange.

L2(i)=[∑PNcells((ψPi−ψP,exact)2max⁡(∣ψexact∣2)Ncells)]1/2(35)L_2(i) = \left[\sum_{P}^{N_{cells}}\left(\frac{\left(\psi_P^i-\psi_{P,exact}\right)^2}{\max\left(\lvert\psi_{exact}\rvert^2\right)N_{cells}}\right)\right]^{1/2} \tag*{(35)}

Where NcellsN_{cells} is the total number of grid cells, PP the cell counter and ii the iteration.

Use of anchoring cells

For each grids, the reinitialization equation 10 is solved for 5000 iterations with and without the anchoring cells strategy. Figure 4 shows the evolution of the L2(i)L_2(i) norm for the three grids, both with and without anchoring cells. The results indicate that without anchoring cells, the L2L_2 norm value starts to increase after a given amount of iterations, indicating an error accumulation due to interface displacements. The L2L_2 norm is one order of magnitude greater without the anchoring cells. In contrast, the method with anchoring cells exhibits monotonic convergence for the three grids. The convergence is slower for the distorted grid due to the nature of the grid itself. Figure 6 shows the comparison of 11 ψ\psi iso-contours (from -0.1 m to 0.1 m) for both methods and for all the grids. The calculated iso-contours are plotted at i=200i = 200. The more iteration are solved, the more the Level-Set values without anchoring diverge. The exact desired analytical solution is also plotted in black. Without anchoring cells, the result exhibits major difference compared to the analytical solution, whereas the use of anchoring cells provides a converged solution close to the analytical result.

Evolution of L2 norm during the reinitialization process for three different 2D grids

Figure 4. Evolution of L2L_2 norm during the reinitialization process for tree different 2D grids (Cartesian, tetrahedral and distorted) and w/wo anchoring cells. Dashed lines: without anchoring cells. Straight lines: with anchoring cells.

Use of LTS approach

Another improvement of the original method of Sussman et al. [ [50] proposed in this work is the use of LTS approach for the discretization of the temporal term in Equation (10), replacing the Euler scheme with a uniform spatial time step τ\tau. For the original approach and with industrial meshes containing a wide range of different sizes, the eikonal equation convergence speed would be determined by the CFL condition for the smallest cell. In contrast, a LTS approach allows to increase the convergence speed by maximizing locally the time step (Equation (12)) based on the user defined reinitialization Courant number γmax\gamma_{max}. Figure 5 shows the evolution of the L2L_2 norm during the reinitialization (5000 iterations) for the distorted grid using both methods. For the original one, the spatial time step τ\tau is maximized while avoiding any divergence of the resolution process. In both cases, the eikonal equation is solved implicitly as described in chapter 2.1. The results show that the LTS approach allows to drastically increase the convergence speed (by approximately a factor 10, when γmax=1.0\gamma_{max} = 1.0) while maintaining the accuracy and the stability, demonstrating the efficiency of the present approach for complex meshes.

Evolution of L2 norm during the reinitialization process for the distorted grid using LTS and Euler schemes

Figure 5. Evolution of L2L_2 norm during the reinitialization process for the distorted grid using a LTS approach (three Courant number γmax\gamma_{max} are compared) or with Euler scheme and the maximal admissible uniform spatial time step τ\tau.

The rising bubble test case, Hysing et al. [2007]

The rising bubble test case is a 2D benchmark from Hysing et al. [2007]. This test case has been simulated by many authors: Zuzio and Estivalezes [2011], Klostermann et al. [2013], Balcázar et al. [2016], Patel and Natarajan [2017], Gamet et al. [2020]. It consists of simulating a single rising bubble in a quiescent liquid. The domain sizes in the xx and yy directions are 1 m and 2 m. A bubble with a diameter of D=0.5D = 0.5 m is initially centered at coordinates (x,y)=(0.0,0.5)(x,y)=(0.0, 0.5). Top and bottom boundaries are non-slipping walls, whereas lateral walls are slipping ones. Two configurations, TC1 and TC2, are simulated and resumed in Table 1. The Reynolds number ReRe, the Etvs number EOEO and the capillary number CaCa are defined as:

caseρ1\rho_1ρ2\rho_2μ1\mu_1μ2\mu_2ggσ\sigmaReReEOEOCaCaρ1ρ2\frac{\rho_1}{\rho_2}μ1μ2\frac{\mu_1}{\mu_2}
TC110001001010.9824.535100.2861010
TC210001100.10.981.96351253.5711000100

Table 1. TC1 and TC2: Physical properties and similarity parameters

Re=ρ1UgDμ1EO=ρ1Ug2DσCa=EORe(36)Re = \frac{\rho_1 U_g D}{\mu_1} \qquad EO = \frac{\rho_1 U_g^2 D}{\sigma} \qquad Ca = \frac{EO}{Re} \tag*{(36)}

Where Ug=gDU_g = \sqrt{gD}. Four levels of Cartesian grid refinements are studied: 32x64, 64x128, 128x256 and 256x512. Simulations are performed using an adaptive time step based on a maximal Courant number value of 0.05. The solver is set in PIMPLE (Issa [1986]) mode, and the number of loops depends on the residual of each iteration. The PIMPLE algorithm stops when the calculated residuals are lower than ϵpd<10−5\epsilon_{pd} < 10^{-5}, ϵU<10−4\epsilon_U < 10^{-4} and ϵψ<10−6\epsilon_\psi< 10^{-6}. The convection term in the momentum equation is discretized with a second order upwind scheme (linearUpwind) and the dynamic pressure gradient is calculated using a least square method corrected at the interface (Ghost Fluid Method). Time advancement is achieved with the 2nd order backward scheme (backward). The reinitialization equation is solved 10 times at each time step with a reinitialization Courant number of 0.75. This procedure allows to fully recover the signed distance property of the Level-Set function. The characteristic length ϵ\epsilon is chosen as 2Δz(x)2\Delta z(x). The mass error is less than 10−310^{-3} %.

Two quantities are used to compare the simulation results with the reference data of Hysing et al. [2007]: the position of the bubble center of mass (Equation (37)) and the bubble vertical velocity (Equation (38)).

Xc=∫αx dx∫α dx(37)X_c = \frac{\int\alpha x\,dx}{\int\alpha\,dx} \tag*{(37)}
Vy=∫αvy dx∫α dx(38)V_y = \frac{\int\alpha v_y\,dx}{\int\alpha\,dx} \tag*{(38)}

Where α\alpha is the volume fraction as defined in equation (20). The bubble center of mass evolutions are presented in Figure 7 for each level of grid refinement. Overall results are in relatively good agreement with the reference codes named MoonNMD, FreeLIFE and TP2D from Hysing et al. [2007], especially for the two finest grids. The rising velocity results are presented in Figure 8. As for the bubble center of mass, there is a good agreement between the presented results and the data of Hysing et al. [2007]. The results tend to be closer to the reference data with grid refinements. The numerical results can also be compared qualitatively by examining the bubble shape for the two test cases, as presented in Figure 9.

Case TC1 bubble center of mass coordinates and rising velocity comparison

Figure 7. Case TC1 - Bubble center of mass coordinates and rising velocity comparison with data of Hysing et al. [2007].

Case TC2 bubble center of mass coordinates and rising velocity comparison

Figure 8. Case TC2 - Bubble center of mass coordinates and rising velocity comparison with data of Hysing et al. [2007].

Case TC1 and TC2 bubble shape comparison

Figure 9. Case TC1 and TC2 - Bubble shape comparison with data of Hysing et al. [2007].

Rayleigh-Taylor instability, Puckett et al. [1997]

The Rayleigh-Taylor instability test case is a popular 2D numerical benchmark for complex multiphase flows. The problem has been initially proposed by Puckett et al. [ [42] and simulated by many authors during the last two decades: Popinet and Zaleski [ [41], Herrmann [ [17], Sheu et al. [ [46], Talat et al. [ [51] or Kim and Park [ [29]. The case consists in modeling two fluids with different density, ρ1=1.225\rho_1 = 1.225 and ρ2=0.1694kg/m3\rho_2 = 0.1694 kg/m^3, but with the same viscosity μ=0.00313Pa.s\mu= 0.00313 Pa.s in a rectangular domain measuring 1 m x 4 m. The heavier fluid is positioned above the lighter one, and the interface is initially shaped with a sinusoidal perturbation having an amplitude of 0.05 m. The top and bottom boundaries are non-slipping walls, whereas the lateral ones are slipping walls. Four levels of Cartesian grid refinements are studied: 64x256, 128x512, 256x1024 and 512x2048. Simulations are performed using an adaptive time step based on a maximal Courant number value of 0.2. The numerical settings are identical to the rising bubble test cases. Results are presented in Figure 10 and Figure 11 for mesh sensitivity and comparison with reference data. The mushroom shape tends to converge with grid refinement. The comparison with reference results shows a medium level of agreement, except with the data of Sheu et al. [ [46] where the results are closer. The mass variation relative error is below 10−410^{-4}.

Rayleigh-Taylor instability shape comparison for mesh sensitivity results

Figure 10. Rayleigh-Taylor instability. Shape comparison for mesh sensitivity results.

Rayleigh-Taylor instability shape comparison between finest grids and reference solutions

Figure 11. Rayleigh-Taylor instability. Shape comparison between finest grids and reference solutions.

Flow around an Ogee crest, erpicum2018experimental

The flow around a scale model of an Ogee spillway crest is reproduced. The W2 Ogee spillway geometry is modeled with a design head HdH_d of 10 cm (corresponding to case W2 of Peltier et al. [2018], Erpicum et al. [2018]) and have been built with the following equations from Hager [1987] and Imanian and Mohammadian [2019]:

(xHd+0.2418)2+(zHd+0.1360)2=0.042 for −0.2818≤xHd≤−0.276(39)\left(\frac{x}{H_d}+0.2418\right)^2+\left(\frac{z}{H_d}+0.1360\right)^2=0.04^2\ \text{for}\ -0.2818\leq\frac{x}{H_d}\leq-0.276 \tag*{(39)}
(xHd+0.105)2+(zHd+0.219)2=0.22 for −0.2276≤xHd≤−0.175(40)\left(\frac{x}{H_d}+0.105\right)^2+\left(\frac{z}{H_d}+0.219\right)^2=0.2^2\ \text{for}\ -0.2276\leq\frac{x}{H_d}\leq-0.175 \tag*{(40)}
(xHd)2+(zHd+0.5)2=0.52 for −0.175≤xHd≤0(41)\left(\frac{x}{H_d}\right)^2+\left(\frac{z}{H_d}+0.5\right)^2=0.5^2\ \text{for}\ -0.175\leq\frac{x}{H_d}\leq0 \tag*{(41)}
zHd=−0.5∗(xHd)1.85 for xHd≥0(42)\frac{z}{H_d}=-0.5\ast\left(\frac{x}{H_d}\right)^{1.85}\ \text{for}\ \frac{x}{H_d}\geq0 \tag*{(42)}

With x = 0 corresponding to the highest point of the Ogee spillway. The 2D numerical domain, illustrated in Figure 12, is composed of an upstream tank, the Ogee spillway, and a discharge zone. At the inlet, a Robin boundary condition is implemented, imposing the velocity of the water phase while applying a zero-gradient condition for the air phase. The reference pressure is imposed at the top through an atmospheric boundary condition. Zero-gradient conditions are applied to the right patch while the remaining patches are defined as wall types. The mesh sensitivity study didn’t show any significant variation in the results. Therefore, the results are presented for a single unstructured grid generated with snappyHexMesh and composed of 200k cells. The maximum mesh non-orthogonality is 69° and the maximum aspect ratio equals 729. The turbulence is solved with the EARSM turbulence model of Hellsten [2005]. Regarding the numerical settings, the Euler scheme is used for time derivatives since only the steady-state is of interest. The convection terms are discretized with the 2nd order upwind scheme (linearUpwind) with a limited gradient (cellLimited Gauss linear 1). The MUSCL scheme (van Leer [1979]) is used to discretize the Level-Set convective term. The gradients are discretized with the Gauss linear scheme, except for the pressure one, which is discretized with the least square scheme. The time step is fixed at 10 ms, leading to maximal Courant numbers around 100, and the PIMPLE algorithm stops when the calculated residuals are lower than ϵpd<10−5\epsilon_{pd}<10^{-5}. For such a flow, the head HH is defined by the water depth hh relative to the crest corrected y a kinetic energy term:

Ogee spillway simulation

Figure 12. Ogee spillway simulation - Illustration of the two-dimensional mesh with 200k cells.

H=h+Q22gB2(h+huf)(43)H=h+\frac{Q^2}{2gB^2(h+h_{uf})} \tag*{(43)}

Where QQ is the discharge (m3/sm^3/s), BB the spillway width, and hufh_{uf} the height of upstream face of the spillway. A sensitivity analysis on the water velocity at the inlet patch is performed for determining the discharge coefficient CD=QB2gH3C_D=\frac{Q}{B\sqrt{2gH^3}} relative to the head ratio H/HdH/H_d. The results are compared to the experimental data of Erpicum et al. [2018]. The water level is initialized at the crest, and the water velocity is ramped during 5 s. The simulations are conducted for a sufficient time (50 s) to ensure a stabilized state. The discharge coefficient relative to head ratio is shown in Figure 13. The overall trend is in medium agreement with experimental data, and the discharge coefficient is underestimated. However, the flow separation near H/Hd=5.5H/H_d=5.5 is well captured. The deviations from the experimental data are likely caused by turbulence and/or 3D effects. More detailed investigations are out of the scope of this study. It has to be noticed that no drift of the water level has been observed, showing that the present method, at least for this test case, is mass conservative.

Discharge coefficients for different Head ratio with the W2 geometry

Figure 13. Discharge coefficients for different Head ratio with the W2 geometry.

Tridimensional dambreak simulation with a square cylinder obstacle, GomezGesteira2013

This test case consists of simulating the fall of a water column and the impact of the generated wave on a square cylinder obstacle. Numerical facilities are described by Gomez-Gesteira [2013] and Ferro et al. [2022]. A water depth of 7.5 mm is initially placed beyond the gate (based on Vukcevic and Jasak [2014]). Force and fluid velocity in front of the obstacle measurements have been performed and are used for comparison with numerical results. The velocity probing point is located 146 mm in front of the obstacle, in the mid-plane, and 26 mm above the floor. Three mesh grids have been generated with blockMesh and are composed of: 130 k (coarse), 300 k (medium), and 3 M (fine) hexahedral cells. The finest one is illustrated Figure 14. Boundary conditions are wall types except for the top boundary, where an atmospheric boundary condition is simulated (totalPressure and pressureInletOutletVelocity). Simulations are carried out using an adaptive time step based on a maximal Courant number value of 0.25 for the interface and 0.5 for the remaining domain. Turbulence is solved with the EARSM turbulence model of Hellsten [2005]. Convection terms are discretized with the 2nd order upwind scheme (linearUpwind) with a limited gradient (cellLimited Gauss linear 1). Gradients are discretized with the Gauss linear scheme, except the pressure one, which is discretize with the least square scheme. The MUSCL schemes (van Leer [1979]) is used to discretize the Level-Set convective term. Finally, the 2nd order backward scheme is chosen for time derivatives, and the PIMPLE algorithm stops when the calculated pressure residual is lower than ϵpd<10−5\epsilon_{pd} < 10^{-5}. Force and velocity histories are presented in Figure 16. The offset in the first peak is also observed by Vukcevic and Jasak [2014] and Ye et al. [2020]. It may be caused by the fact that, experimentally, the gate can’t be instantly removed. Overall, the results are relatively similar and are in agreement with the experimental data, even though the peaks are slightly overestimated. Regarding velocity measurements in front of the obstacle, the trend is properly captured. Free surface motions are detailed in Figure 17. Figure 15 represents the Level-Set contours for the finest grid and illustrates that the Level-Set distance property is well preserved. In this case, where the free surface motions are complex, the relative error of mass variation is inferior to 1%.

View of the finest non-uniform Cartesian grid built with blockMesh

Figure 14. View of the finest non-uniform Cartesian grid built with blockMesh - 3 M cells. The square obstacle is colored in purple.

Level-Set contours from -0.1 to 0.1 at $\psi(x)=0$ in green

Figure 15. Level-Set contours - from -0.1 to 0.1 - ψ(x)=0\psi(x) = 0 in green.

Force and velocities results for the 3 grids, and comparison with the experimental data

Figure 16. Force and velocities results for the 3 grids, and comparison with the experimental data Gomez-Gesteira [2013].

Figure 17. Free surface motions.

Gothenburg workshop, 2010, KVLCC2 steady resistance, Larsson et al. [2014]

The KVLCC2 (H and H [2001]) is a model scale ship. Its main particularities are detailed in Table 2. Test cases 1.b and 1.2a are parts of the 2010 Gothenburg workshop (Larsson et al. [ [32]) and consist in simulating a towing tank test with a Froude number equal to 0.142 (1.047 m/s). The KVLCC2 test case is challenging for free surface methods as the maximum wave height is less than 1% of LppL_{pp} (Length Between Perpendicular). Numerical results are compared with resistance and wave elevation measurements. Simulations are carried out in the fixed ship reference frame with a symmetry hypothesis on the y=0y = 0 plane. The air/water flow is imposed at the entrance of the computational box. A pressure reference is imposed on the top through atmospheric boundary conditions. For bottom and lateral patches, a slip condition is used, while for outlet the ones, zero-gradient conditions are defined. Wall functions are used for the hull patch. Four levels of mesh refinement are generated with snappyHexMesh with respectively 1.7 M, 2.37 M, 3.2 M and 5.5 M cells (lately referred to coarse/grid 0, medium/grid 1, fine/grid 2 and vfine/grid 3). The average grid refinement ratio between grids, rg=1.2r_g = 1.2, is calculated and used for the grid convergence study. The mesh is built using several refinement zones, as illustrated on Figure 18. The maximum mesh non-orthogonality is 82° and the maximum aspect ratio is 129. In the near-hull region, cells are refined in each direction within a rectangular box. Close to the free surface, cells are refined in the vertical direction. Moreover, in the Kelvin wake region, cells are also refined in longitudinal (Ox) and transversal (Oy) directions. Finally, 8 boundary layer cells are inflated with 100 % of cover layer rate. The time step has been fixed to 20 ms resulting in a maximum Courant number of 50 for the finest grid. The time discretization is achieved with first order Euler scheme because only steady-state results are of interest. The spatial discretization is identical to 3D dambreak simulation and the PIMPLE algorithm stops when the calculated pressure residual is lower than ϵpd<10−5\epsilon_{pd} < 10^{-5}. An EARSM turbulence model Hellsten [ [15] is used. The steady state drag coefficients are calculated and compared to experimental data for the 3 finest grids, as shown in Figure 19. Following Vukcevic [ [55] guidelines, grid refinement study results and validation on grid 1, 2 and 3 are presented in Table 3. A 6 meter long rectangular relaxation zone is added near the outlet patch to damp the free surface and velocity perturbations. The resistance coefficient relative errors are lower than 2%. Figure 20 represents the phase fraction and some contours ψ(x)=constant\psi(x) = constant illustrating that the Level-Set function is well preserved. LSFoam wave patterns, presented on the top side of Figure 21, are reasonably matching the experimental data (bottom side of Figure 21). Regarding Figure 22, that represents the free surface elevations (z/Lpp for some planes y/Lpp = constant), LSFoam results fit the experimental data for planes y/Lpp = 0.09640 and y/Lpp = 0.1581. On the plane y/Lpp = 0.2993, free surface oscillations are slightly overestimated for the finest grid and probably caused by wave reflection due to the mesh transition outside the Kelvin triangle. Regarding mass conservation, for the finest grid, the relative error was below 10−510^{-5} showing the ability of the present method to maintain mass and hence the water level.

DesignationPrototypeTT model
Scale ratio11/58
Speed (m/s)7.97391.047
Froude number0.1420.142
Reynolds number2.1×1092.1 \times10^94.6×1064.6 \times10^6
Lpp (m)3205.5172
Breadth (m)581
Depth (m)300.5172
Draft (m)20.80.3586
Wetted surface area (m²)271948038.8
Displacement (m3)312.6211.6023
Block coefficient0.80980.8098

Table 2. KVLCC2 main particulars.

KVLCC2 mesh obtained with snappyHexMesh

Figure 18. KVLCC2 mesh obtained with snappyHexMesh - very fine grid. 5.5 M cells.

Force coefficient comparison between LSFoam and experimental data

Figure 19. Force coefficient comparison between LSFoam and experimental data. The blue bars indicate the experimental uncertainty of 1 %. The green bars is the mesh uncertainty with a total height of 2UG2U_G.

Illustration of hull phase fraction

Figure 20. Illustration of hull phase fraction with ψ(x)=−0.05\psi(x) = -0.05 m to 0.050.05 m each 0.010.01 m.

Measurement ResultCTC_T
Experimental Result0.00411
Experimental uncertainty (%)1 %
Grid 1 solution0.004158
Grid 2 solution0.004086
Grid 3 solution0.004099
Error grid 10.00004
Error grid 2-0.00002
Error grid 3-0.00001
Relative error grid 1 (%)1.16 %
Relative error grid 2 (%)-0.58 %
Relative error grid 3 (%)-0.26 %
RiR_i−1<Ri<0-1 < R_i < 0, oscillatory convergence
USNU_{SN}0.01 %
UGU_G1.3 %
UvU_v0.01 %

Table 3. KVLCC2 validation and grid refinement study for the three finest grid.

KVLCC2 wave pattern illustration

Figure 21. KVLCC2 wave pattern illustration - left EFD - right LSFoam finest grid.

CFD free surface elevation comparison with experimental data on y/Lpp lines

Figure 22. CFD free surface elevation (z/Lpp) comparison with experimental data on y/Lpp lines.

Conclusions

The Level-Set algebraic-like approach (Sussman et al. [1994]) is based on a function ψ\psi being the signed distance to the interface. To capture interface motions, this function is advected in a flow field. Such a procedure will break its distance property and lead to unacceptable mass variations. To tackle these issues, the reinitialization equation (5) from Sussman et al. [1994] is traditionally solved explicitly with a uniform spatial time step, but many practical limits remain: robustness, reinitialization frequency, number of iterations, mass variation, and polyhedral meshes with industrial quality (mainly high non-orthogonality and aspect ratio). In this work, we propose to address all of these issues by:

  • Adopting an implicit form of the reinitialization equation with LTS time advancement,

  • Implementing an adaptive thickness size for sign and filtering functions,

  • Enforcing the immobility of the interface during reinitialization iteration through the marking of anchoring cells.

The benefits of the LTS approach and anchoring cells are demonstrated in chapter 3. For pressure-velocity coupling, in a perspective to enhanced both accuracy and robustness, the solver takes advantage of the PIMPLE algorithm with a consistent momentum interpolation formulation Cubero and Fueyo [2007] and the GFM Fedkiw et al. [1999] to handle density discontinuities Vukčević et al. [2017]. With this Level-Set approach, the GFM is eased by the direct calculation of the distance to the interface.

The present approach has been coded in the OpenFOAM (Weller et al. [1998]) framework within a new solver, named LSFoam, and has been tested on five test cases covering different flow configurations: the rising bubble test case, Hysing et al. [2007], Rayleigh-Taylor instability simulations (Puckett et al. [1997]), Ogee spillway flow Erpicum et al. [2018], tridimensional dambreak simulation with a square cylinder obstacle Gomez-Gesteira [2013] and KVLCC2 steady resistance calculations (Larsson et al. [2014]). For the first two cases with surface tension dominated flow, the solver gave results very close to reference solutions. To challenge the method, non-uniform and unstructured grids have been used for the last three cases. For the Ogee spillway test, the method efficiently maintains the water level. The overall results are in medium agreement with the data of Erpicum et al. [ [3], although the flow detachment is well predicted. Deviations in the discharge coefficient are observed, but are likely caused by turbulence modeling and/or the 2D assumption. For the dambreak simulation, the results are in good agreement with the experimental data. For ship resistance applications, the present method has shown excellent mass conservation properties as well as force calculations and wave patterns. Regarding mass losses, the conservation is excellent for all cases excepting for the 3D dambreak, where the motion of the free surface is very complex, although the mass error is limited to 1%. A potential solution could be to implement a method to enforce mass conservations for such cases. Gathering all the numerics detailed in this work, LSFoam has shown excellent robustness by handling mesh non-orthogonality above 80° and maximal Courant number higher than 100. The original approach of Sussman et al. [ [49] with adequate enhancement is able to give overall excellent results for different flow configurations. The method is particularly promising for moderate free surface deformations typically encountered in marine and offshore applications.

Declaration of competing interests

The authors declare that they have no known competing financial.

References

  1. [3]S. Erpicum, B. Blancher, J. Vermeulen, Y. Peltier, P. Archambeau, B. Dewals, and M. Pirotton. Experimental study of ogee crested weir operation above the design head and influence of the upstream quadrant geometry. 2018.DOI
  2. [4]R. P. Fedkiw, T. Aslam, and S. Xu. The ghost fluid method for deflagration and detonation discontinuities. Journal of Computational Physics, 154(2), 9–199. ISSN 0021-9991. doi: 10.1006/jcph.1999.6320. URL https://www.osti.gov/biblio/20000635.DOI
  3. [5]P. Ferro, P. Landel, M. Pescheux, and S. Guillot. Development of a free surface flow solver using the ghost fluid method on openfoam. Ocean Engineering, 253:111236, 2022. ISSN 0029-8018. doi: https://doi.org/10.1016/j.oceaneng.2022.111236. URL https://www.sciencedirect.com/science/article/pii/S0029801822006321.
  4. [6]A. Fluent. Ansys fluent theory guide, release 18.0. ansys. Inc., Canonsburg, PA, USA, 2017.
  5. [8]Gomez-Gesteira. Spheric sph benchmark test cases: Test 1-force exerted by a schematic 3d dam break on a square cylinder. 2013.
  6. [10]J. W. Gärtner, A. Kronenburg, and T. Martin. Efficient weno library for openfoam. SoftwareX, 12:100611, 2020. ISSN 2352-7110. doi: https://doi.org/10.1016/j.softx.2020.100611. URL https://www.sciencedirect.com/science/article/pii/S2352711020303241.
  7. [15]A. Hellsten. New advanced k-w turbulence model for high-lift aerodynamics. AIAA Journal, 43(9):1857–1869, 2005. doi: 10.2514/1.13754. URL https://doi.org/10.2514/1.13754.
  8. [16]F. Henri. Améliorations des méthodes Level Set pour l’impact de goutte de pluie. Theses, Université de Bordeaux, Dec. 2021. URL https://theses.hal.science/tel-03527520.DOI
  9. [17]M. Herrmann. A balanced force refined level set grid method for two-phase flows on unstructured flow solver grids. Journal of Computational Physics, 227(4):2674–2706, 2008. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2007.11.002. URL https://www.sciencedirect.com/science/article/pii/S0021999107004998.
  10. [18]C. Hirt and B. Nichols. Volume of fluid (vof) method for the dynamics of free boundaries. Journal of Computational Physics, 39(1):201–225, 1981. ISSN 0021-9991. doi: https://doi.org/10.1016/0021-9991(81)90145-5. URL https://www.sciencedirect.com/science/article/pii/0021999181901455.
  11. [19]J.-M. Hong, T. Shinar, M. Joo Kang, and R. Fedkiw. On boundary condition capturing for multiphase interfaces. Journal of Scientific Computing, 31:99–125, 2007.
  12. [20]J. Huang, P. M. Carrica, and F. Stern. Coupled ghost fluid/two-phase level set method for curvilinear body-fitted grids. International Journal for Numerical Methods in Fluids, 55(9):867–897, 2007. doi: https://doi.org/10.1002/fld.1499. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/fld.1499.
  13. [21]S. Hysing, S. Turek, D. Kuzmin, N. Parolini, E. Burman, S. Ganesan, and L. Tobiska. Proposal for quantitative benchmark computations of bubble dynamics. Ergebnisberichte des Instituts für Angewandte Mathematik, Nummer 351, Fakultät für Mathematik, TU Dortmund, 2007.
  14. [23]R. Issa. Solution of the implicitly discretised fluid flow equations by operator-splitting. Journal of Computational Physics, 62(1):40–65, 1986. ISSN 0021-9991. doi: https://doi.org/10.1016/0021-9991(86)90099-9. URL https://www.sciencedirect.com/science/article/pii/0021999186900999.
  15. [24]N. G. Jacobsen, D. R. Fuhrman, and J. Fredsøe. A wave generation toolbox for the open-source cfd library: Openfoam®. International Journal for Numerical Methods in Fluids, 70(9):1073–1088, 2012. doi: https://doi.org/10.1002/fld.2726. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/fld.2726.
  16. [26]N. Johansson. Implementation of a standard level set method for incompressible two-phase flow simulations. 2011. URL https://api.semanticscholar.org/CorpusID:118330967.
  17. [27]M. Kang, R. P. Fedkiw, and X.-D. Liu. A boundary condition capturing method for multiphase incompressible flow. J. Sci. Comput., 15(3):323–360, sep 2000. ISSN 0885-7474. doi: 10.1023/A:1011178417620. URL https://doi.org/10.1023/A:1011178417620.
  18. [28]A. Khosronejad, M. G. Arabi, D. Angelidis, E. Bagherizadeh, K. Flora, and A. Farhadzadeh. Comparative hydrodynamic study of rigid-lid and level-set methods for les of open-channel flow. Journal of Hydraulic Engineering, 145(1):04018077, 2019. doi: 10.1061/(ASCE)HY.1943-7900.0001546. URL https://ascelibrary.org/doi/abs/10.1061/%28ASCE%29HY.1943-7900.0001546.
  19. [29]H. Kim and S. Park. Coupled level-set and volume of fluid (clsv​​of) solver for air lubrication method of a flat plate. Journal of Marine Science and Engineering, 9(2), 2021. ISSN 2077-1312. doi: 10.3390/jmse9020231. URL https://www.mdpi.com/2077-1312/9/2/231.
  20. [31]B. Lalanne, L. R. Villegas, S. Tanguy, and F. Risso. On the computation of viscous terms for incompressible two-phase flows with level set/ghost fluid method. Journal of Computational Physics, 301:289–307, 2015. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2015.08.036. URL https://www.sciencedirect.com/science/article/pii/S002199911500563X.
  21. [32]L. Larsson, F. Stern, and M. Visonneau. Numerical ship hydrodynamics. An assessment of the 6th Gothenburg 2010 workshop. Springer Netherlands, 1 edition, Dec. 2014. doi: 10.1007/978-94-007-7189-5.DOI
  22. [33]A. Leroyer, J. Wackers, P. Queutey, and E. Guilmineau. Numerical strategies to speed up cfd computations with free surface—application to the dynamic equilibrium of hulls. Ocean Engineering, 38(17):2070–2076, 2011. ISSN 0029-8018. doi: https://doi.org/10.1016/j.oceaneng.2011.09.006. URL https://www.sciencedirect.com/science/article/pii/S0029801811002009.
  23. [34]X.-D. Liu, S. Osher, and T. Chan. Weighted essentially non-oscillatory schemes. Journal of Computational Physics, 115(1):200–212, 1994. ISSN 0021-9991. doi: https://doi.org/10.1006/jcph.1994.1187. URL https://www.sciencedirect.com/science/article/pii/S002199918471879.
  24. [35]T. Martin and I. Shevchuk. Implementation and validation of semi-implicit weno schemes using openfoam®. Computation, 6(1), 2018. ISSN 2079-3197. doi: 10.3390/computation6010006. URL https://www.mdpi.com/2079-3197/6/1/6.DOI
  25. [36]S. J. Osher and R. Fedkiw. Level set methods and dynamic implicit surfaces., volume 153 of Applied mathematical sciences. Springer, 2003. ISBN 0387954821.
  26. [37]I. R. Park, S. H. Van, J. Kim, and K. J. Kang. Level-set simulation of viscous free surface flow around a commercial hull form. 2005. URL https://api.semanticscholar.org/CorpusID:53370150.
  27. [38]S. Patankar and D. Spalding. A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows. International Journal of Heat and Mass Transfer, 15(10):1787–1806, 1972. ISSN 0017-9310. doi: https://doi.org/10.1016/0017-9310(72)90054-3. URL https://www.sciencedirect.com/science/article/pii/0017931072900543.
  28. [41]S. Popinet and S. Zaleski. A front-tracking algorithm for accurate representation of surface tension. International Journal for Numerical Methods in Fluids, 30(6):775–793, 1999. URL https://hal.archives-ouvertes.fr/hal-01445441.
  29. [42]E. G. Puckett, A. S. Almgren, J. B. Bell, D. L. Marcus, and W. J. Rider. A high-order projection method for tracking fluid interfaces in variable density incompressible flows. Journal of Computational Physics, 130(2):269–282, 1997. ISSN 0021-9991. URL https://www.sciencedirect.com/science/article/pii/S0021999196955904.DOI
  30. [44]H. Rusche. Computational Fluid Dynamics of Dispersed Two-Phase Flows at High Phase Fractions. PhD thesis, Imperial College, London, 2002. URL http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/docs/HenrikRuschePhD2002.pdf.
  31. [45]G. Russo and P. Smereka. A Remark on Computing Distance Functions. Journal of Computational Physics, 163(1):51–67, Sept. 2000. doi: 10.1006/jcph.2000.6553.DOI
  32. [46]T. W. Sheu, C. Yu, and P. Chiu. Development of a dispersively accurate conservative level set scheme for capturing interface in two-phase flows. Journal of Computational Physics, 228(3):661–686, 2009. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2008.09.032. URL https://www.sciencedirect.com/science/article/pii/S0021999108005007.
  33. [48]M. Sun, Z. Wang, and X.-S. Bai. Assessment and modification of sub-cell-fix method for re-initialization of level-set distance function. International Journal for Numerical Methods in Fluids, 62(2):211–236, 2010. ISSN 1097-0363. doi: 10.1002/fld.2204.DOI
  34. [49]M. Sussman, P. Smereka, and S. Osher. A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 114(1):146–159, 1994. ISSN 0021-9991. doi: https://doi.org/10.1006/jcph.1994.1155.
  35. [50]M. Sussman, E. Fatemi, P. Smereka, and S. Osher. An improved level set method for incompressible two-phase flows. Computers and Fluids, 27(5):663–680, 1998. ISSN 0045-7930. doi: https://doi.org/10.1016/S0045-7930(97)00053-4. URL https://www.sciencedirect.com/science/article/pii/S0045793097000534.
  36. [51]N. Talat, B. Mavrič, V. Hatić, S. Bajt, and B. Šarler. Phase field simulation of rayleigh–taylor instability with a meshless method. Engineering Analysis with Boundary Elements, 87:78–89, 2018. ISSN 0955-7997. doi: https://doi.org/10.1016/j.enganabound.2017.11.015. URL https://www.sciencedirect.com/science/article/pii/S0955799717304009.
  37. [52]V. Titarev and E. Toro. Finite-volume weno schemes for three-dimensional conservation laws. Journal of Computational Physics, 201(1):238–260, 2004. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2004.05.015. URL https://www.sciencedirect.com/science/article/pii/S0021999104002281.
  38. [54]B. van Leer. Towards the ultimate conservative difference scheme. v. a second-order sequel to godunov’s method. Journal of Computational Physics, 32(1):101–136, 1979. ISSN 0021-9991. doi: https://doi.org/10.1016/0021-9991(79)90145-1. URL https://www.sciencedirect.com/science/article/pii/002199979901451.
  39. [55]V. Vukcevic. Numerical Modelling of Coupled Potential and Viscous Flow for Marine Applications. PhD thesis, 11 2016.DOI
  40. [56]V. Vukcevic and H. Jasak. A conservative level set method for interface capturing in two-phase flows. 2014.
  41. [58]H. G. Weller, G. Tabor, H. Jasak, and C. Fureby. A tensorial approach to computational continuum mechanics using object-oriented techniques. Computers in Physics, 12(6):620–631, 1998. doi: 10.1063/1.168744. URL https://aip.scitation.org/doi/abs/10.1063/1.168744.DOI
  42. [59]T. Yamamoto, Y. Okano, and S. Dost. Validation of the s-clvsof method with the density-scaled balanced continuum surface force model in multiphase systems coupled with thermocapillary flows. International Journal for Numerical Methods in Fluids, 83(3):223–244, 2017. doi: https://doi.org/10.1002/fld.4267. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/fld.4267.

Paper details

vlnc:W_kbvkdtut
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents