Next Article in Journal
CFD-Assisted Design of an NH3/H2 Combustion Chamber Based on the Rich–Quench–Lean Concept
Previous Article in Journal
Employing Quantum Entanglement for Real-Time Coordination of Distributed Electric Vehicle Charging Stations: Advancing Grid Efficiency and Stability
Previous Article in Special Issue
An Experimental Investigation of Pressure Drop in Two-Phase Flow during the Condensation of R410A within Parallel Microchannels
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Convergence of Normal and Curvature Calculations with the Height Function Method for Two-Phase Flow

by
Antonio Cervone
1,†,
Sandro Manservisi
1,*,†,
Jieyun Pan
2,3,†,
Ruben Scardovelli
1,† and
Stéphane Zaleski
2,3,4,†
1
Laboratorio di Montecuccolino, Department of Industrial Engineering, University of Bologna, Via dei Colli 16, 40136 Bologna, Italy
2
Institut Jean Le Rond d’Alembert (UMR 7190), Sorbonne Université, F-75005 Paris, France
3
Centre National De La Recherche Scientifique (CNRS), rue Michel-Ange, CEDEX 16, F-75794 Paris, France
4
Institut Universitaire de France, F-75231 Paris, France
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Energies 2025, 18(11), 2918; https://doi.org/10.3390/en18112918
Submission received: 10 April 2025 / Revised: 16 May 2025 / Accepted: 28 May 2025 / Published: 2 June 2025

Abstract

The volume-of-fluid (VOF) method is widely used for multiphase flow simulations, where the VOF function implicitly represents the interface through the volume fraction field. The height function (HF) method on a Cartesian grid integrates the volume fractions of a column of cells across the interface. A stencil of three consecutive heights and centered finite differences compute the unit normal n and the curvature κ with second-order convergence with grid refinement. The interface line can cross more than one cell of the column, and the value of the geometrical properties of the interface should be interpolated in the cut cells. We propose a numerical algorithm to interpolate the geometrical data that removes the inconsistency between theoretical and numerical results presented in many papers. A constant approximation in the column of cells provides first-order convergence with grid refinement, while linear and quadratic interpolations indicate second-order convergence. The numerical results obtained with analytical curves agree with the theoretical development presented in this study.

1. Introduction

Multiphase flows with moving interfaces separating immiscible fluids are present in many natural phenomena and industrial applications. The presence of interfaces makes it difficult to simulate the physical phenomena involved, which often depend on the interfacial forces and the physical properties of the different phases. For example, two-phase flow can be characterized by high density and viscosity ratios with a wide range of spatial and temporal scales and strong interface deformation due to surface tension, which can produce complex topologies with merging and/or splitting of the interface. Direct numerical simulations of multiphase flows can simulate quite complex configurations of practical interest, where the continuum length and time scales are fully resolved. These require a precise calculation of the interface geometry, in particular the local values of the interface unit normal n and its curvature κ , in all computational cells cut by the interface. For incompressible flows and constant physical properties, the computation of the spatial position of the phases is performed through the phase indicator function χ ( x , t ) , which is 1 inside the reference phase and 0 in the secondary phase. The function χ is discontinuous on the interface and conventional discretization methods fail to reproduce its evolution in time satisfactorily. Several methods have been proposed to track a moving interface; examples include, among others, the volume-of-fluid (VOF) method, the Level Set (LS) method, and the Front-Tracking (FT) method [1,2,3].
The computation of the unit normal and curvature along the interface can be approximated in various ways in the different methods. In this paper, we focus on the VOF method, which has also been implemented in several free, open-source software platforms [4,5,6,7,8].
The VOF method considers the fraction of volume C i of any computational cell Ω i to represent implicitly the interface between two immiscible fluids:
C i = 1 V i Ω i χ ( x , t ) d V ,
where V i is the volume of the cell and χ ( x , t ) the phase indicator function with value 1 inside the reference phase and 0 in the secondary phase.
The advection of the volume fraction field depends on the local fluid velocity u and satisfies the following advection equation:
C t + u · C = 0 .
The volume fraction field changes abruptly across the interface—see Figure 1a—since the χ function is discontinuous. When solving for the hyperbolic Equation (1), finite difference methods, such as upwind schemes, are rather diffusive and the interface does not remain sharp in time. For an incompressible flow, · u = 0 , a geometrical approach is more efficient and proceeds in two steps. The interface is first reconstructed, and the Piecewise Linear Interface Calculation (PLIC) approximates in two dimensions the interface line as a segment in each cut cell, n · x = n x x + n y y = α , where the non-homogeneous term α is computed by enforcing area conservation [9]. Various schemes have been proposed to estimate the unit interface normal, n = C / | C | , in a uniform Cartesian grid, including finite differences and error minimization [10,11,12]. Then, the reconstructed interface is advected in the given velocity field. This amounts to computing geometrically the reference phase area in two dimensions (2D) [9] or volume in three dimensions (3D) [13] that is exchanged across the boundary of neighboring cells. They can still produce very small mass errors due to the intrinsic finite machine precision, which should be removed during the numerical simulations.
The surface tension force, located at the fluid–fluid interface, can be modelled by a force per unit volume, using the continuum surface force (CSF) model [14]: F σ = σ κ n δ S , where σ is the surface tension coefficient and δ S a surface distribution localized at the interface [9]. The interface curvature, κ = · n , can be computed as the second derivative of the abruptly changing C field, but it is a poor approximation. The volume fraction field C can be convoluted with a smoothing kernel to obtain a more regular function (CV) [15]. Another possibility is the reconstructed distance function (RDF), which can be computed from the piecewise linear reconstruction of the interface [15], in a way similar to the coupled VOF-Level Set (CLSVOF) method [16]. The CV and the RDF functions can then be numerically differentiated to compute the curvature. These two methods are robust at low resolution, but do not have good convergence properties with grid refinement. Other methods to compute the mean curvature include least-square methods that fit a parabola/paraboloid to the volume fractions of a block of cells [17] or to a set of interfacial points [5], and volumetric fitting methods [18].
This paper focuses on the computation of the interface geometrical properties with the height function method (HF). In some articles, the HF method is observed to have first-order convergence with grid refinement [19,20], while theoretical results indicate second-order convergence. We analyze the reasons for this unexpected behavior of the VOF method. The novelty of this paper is a proposal for avoiding this incongruous result.
To this aim, we investigate the origin of the numerically observed first-order convergence of the HF method and suggest how to remove this inconsistency to obtain the theoretical second-order convergence. This work follows what was previously published in [21].
Section 2 introduces the continuous height function of [22] and three different polynomial approximations of the interface line, of its unit normal n , and of the curvature κ in a column of cells cut by the interface. Section 3 considers an interface line described by a set of differentiable parametric equations and characterized by a variation of the curvature, both in magnitude and sign. Second-order convergence with grid refinement is recovered when the interface line is drawn in a uniform Cartesian grid at the points where the heights are located, but data interpolation provides a different order of convergence according to the polynomial approximation under consideration. Finally, our conclusions are drawn in Section 4.

2. Interface Line Approximation with the Height Function

The height function (HF) method is based on the C field, and the heights are computed by summing the volume fractions across the interface along one coordinate direction. The height is an approximation of the distance of the interface point on the column midline from a reference coordinate line, as shown in Figure 1. Three consecutive heights along the same coordinate direction are required to compute the unit normal n and the curvature κ with centered finite differences. The Standard Height Function (SHF) method uses a fixed 7 × 3 stencil to calculate the three heights, while the Generalized Height Function (GHF) method uses an adaptive stencil to compute them [5]. The second approach is more precise at low resolution or in the presence of complex topologies that are characterized by interface breakup or coalescence. The HF method has also been extended to non-uniform Cartesian grids [23], to adaptively refined meshes [5], and to unstructured meshes [24].
The HF method fails to provide adequate estimates of the interface geometry when the surface is not well resolved in the computational grid, in other words, when the local radius of curvature is close to the grid spacing. Some hybrid methods have been developed to overcome this issue. At high grid resolutions, the unit normal and the curvature of the interface are computed with second-order convergence with the HF method. At lower grid resolutions, the hybrid method should automatically switch to another more robust method with coarse grids, such as the CV and RDF methods.
More recently, a machine learning approach has been used to estimate the interface properties, directly from the volume fractions of a fixed block of cells [19,20], or even from the HF distribution [21]. Its curvature estimate does not converge with grid refinement; still, it can be used at coarse grid resolution as a part of a hybrid method.

2.1. The Continuous Height Function

Following the derivation of [22], we consider an interface line that locally can be expressed in the explicit form y = f ( x ) , when | d f ( x ) / d x | 1 . The inverse form x = f 1 ( y ) should be considered when | d f ( x ) / d x | > 1 . We assume that f ( x ) is continuous with its derivatives, with the notation f ( n ) ( x ) = d n f ( x ) / d x n . The continuous height function H ( x ; h ) is then defined as
H 0 = H ( x ; h ) = 1 h x h / 2 x + h / 2 f ( t ) d t ,
H 0 is by definition the mean value of f ( x ) in the given interval of integration of length h. Similarly, the mean value of f ( x ) in the two adjacent intervals can be denoted as H 1 = H ( x h ; h ) and H + 1 = H ( x + h ; h ) . With these three consecutive values of the height function, it is possible to approximate with centered finite differences the values of the first and second derivatives and of the curvature κ of the function f ( x ) at point x:
H x = H + 1 H 1 2 h , H x x = H + 1 + H 1 2 H 0 h 2 , κ n = H x x 1 + H x 2 3 / 2 .
The first derivative represents the slope of the tangent line that determines uniquely the direction of the unit normal n . With an expansion in the Taylor series with the small parameter h, it is straightforward to show the following [22]:
f ( x ) H 0 = f ( 2 ) ( x ) 24 h 2 + O ( h 4 ) ,
f ( 1 ) ( x ) H x = 5 f ( 3 ) ( x ) 24 h 2 + O ( h 4 ) ,
f ( 2 ) ( x ) H x x = f ( 4 ) ( x ) 8 h 2 + O ( h 4 ) ,
κ ( x ) κ n = S ( x ) f ( 4 ) ( x ) + 5 T ( x ) 8 S 5 / 2 ( x ) h 2 + O ( h 4 ) ,
where S ( x ) = 1 + ( f ( 1 ) ( x ) ) 2 and T ( x ) = f ( 1 ) ( x ) f ( 2 ) ( x ) f ( 3 ) ( x ) . Higher-order terms of the Taylor series are defined by O ( h 4 ) . The approximation of the function f ( x ) and of its derivatives and curvature with the height function H and centered finite differences is therefore second-order-accurate with grid spacing h. However, it should be noted that this statement is correct only at the abscissa x where the height point is located.
For the situation depicted in Figure 2a, the interface section inside the central column does not cross a horizontal grid line, and the height H 0 , where the interface geometrical properties are evaluated, is centered with respect to that section. On the other hand, in Figure 2b, the same interface line crosses a horizontal grid line in the central column. A centered scheme would require the computation of the geometrical properties at midpoints x 1 and x 2 , after the calculation of the position z 0 of the interface intersection with the grid line.
For the normal calculation, this issue was first raised in [25], where the numerical second derivative, given by the second of Equation (3), was used to approximate the variation of the unit normal n across the column, and the abscissa of midpoints x 1 and x 2 was computed with an expression involving the volume fraction C of the two consecutive cut cells. For the curvature calculation, a quadratic interpolation that was demonstrated to be second-order accurate was proposed in [22], but numerical results were not provided.
Here, we consider three consecutive values of a geometrical property—for example, the height function values H 1 , H 0 , and H + 1 of Figure 2a—to interpolate the data inside the central column. We compute the following three coefficients
a = H + 1 2 H 0 + H 1 2 h 2 , b = H + 1 H 1 2 h , c = H 0 ,
and consider the three polynomials P 0 ( x ) , P 1 ( x ) , and P 2 ( x ) , of order 0, 1, and 2, respectively:
P 0 ( x ) = c , P 1 ( x ) = b x + c , P 2 ( x ) = a x 2 + b x + c .
Let x m be the abscissa of the midpoint of the central column; then at any point x of the central column, with x = x m + γ h and | γ | < = 1 / 2 , we find
f ( x ) P 0 ( x ) = γ f ( 1 ) ( x m ) h + O ( h 2 ) f ( x ) P 1 ( x ) = 12 γ 2 1 24 f ( 2 ) ( x m ) h 2 + O ( h 3 ) f ( x ) P 2 ( x ) = 1 24 f ( 2 ) ( x m ) h 2 + O ( h 3 ) .
The constant approximation P 0 ( x ) is first-order-accurate in the central cell, while the linear and quadratic interpolations, P 1 ( x ) and P 2 ( x ) , are both second-order-accurate. These results are a direct consequence of the fact that the three height function values H 1 , H 0 , and H + 1 are second-order-accurate.
In place of the height function values, we can consider three consecutive values of the first derivative and of the curvature, both of them defined in Equation (3), to recompute the coefficients a, b, and c of the polynomial approximations. For the first derivative, we find
f ( 1 ) ( x ) P 0 ( x ) = γ f ( 2 ) ( x m ) h + O ( h 2 ) f ( 1 ) ( x ) P 1 ( x ) = 12 γ 2 5 24 f ( 3 ) ( x m ) h 2 + O ( h 3 ) f ( 1 ) ( x ) P 2 ( x ) = 5 24 f ( 3 ) ( x m ) h 2 + O ( h 3 )
and for the curvature
κ ( x ) P 0 ( x ) = γ S ( x m ) f ( 3 ) ( x m ) 3 γ f ( 1 ) ( x m ) ( f ( 2 ) ( x m ) ) 2 S 5 / 2 ( x m ) h + O ( h 2 ) κ ( x ) P 1 ( x ) = V ( γ , x m ) 8 S 7 / 2 ( x m ) h 2 + O ( h 3 ) κ ( x ) P 2 ( x ) = S ( x m ) f ( 4 ) ( x m ) + 5 T ( x m ) 8 S 5 / 2 ( x m ) h 2 + O ( h 3 )
where V ( γ , x m ) = 12 γ 2 ( 4 ( f ( 1 ) ( x m ) ) 2 1 ) ( f ( 2 ) ( x m ) ) 3 ( 36 γ 2 5 ) S ( x m ) T ( x m ) + ( 4 γ 2 1 ) S 2 ( x m ) f ( 4 ) ( x m ) . For both geometrical properties, we find again that the constant approximation is first-order-accurate, while the linear and quadratic approximations are second-order-accurate.

2.2. The Discrete Height Function

In a computational domain in two dimensions, partitioned with square cells of side h, the volume fraction field C is initialized with the new version of the Vofi library [26], which requires a user-defined function g ( x ) . The interface is described by the implicit equation g ( x ) = 0 and points inside the reference phase satisfy g ( x ) < 0 , while g ( x ) > 0 in the secondary phase. The library computes the interface intersections with the grid lines and in each cut cell performs, where required, a 1D Gauss–Legendre integration with a variable number of nodes to calculate the area between the interface line and the cell boundary. The new version optimizes the algorithms described in [27] while introducing a few new features as well. The volume fraction distribution in a 3 × 3 block of square cells is shown in Figure 1a.
A grid cell ( i , j ) cut by the interface will have 0 < C i , j < 1 ; then the discrete height H can be calculated with a one-dimensional (1D) stencil by adding the C data columnwise, along the y direction, or rowwise, along the x direction. Let us consider only the vertical direction, where the interface line can be locally written in the explicit form y = f ( x ) . Then,
H = 1 h x i h / 2 x i + h / 2 f ( x ) d x = 1 h k = n n C i , j + k h 2 .
For the volume fraction distribution of Figure 1a, three vertical heights can be computed, as shown in Figure 1b.
In the standard height function method (SHF), a fixed value of n is used; then, the 1D stencil will have 5 cells for n = 2 and 7 cells for n = 3 . The height point H is centered in the i-th column, but it is not necessarily inside the cell ( i , j ) . Furthermore, it is not guaranteed that the interface line crosses the entire column within the stencil, or there can be more than one interface section in the given stencil. This second situation may happen in the case of complex topologies, such as droplet merging or filament breakup.
The generalized height function method (GHF) considers an adaptive 1D stencil [5], centered on the mixed cell ( i , j ) and with a maximum length of n c cells. The algorithm is dynamical, and the summation in (13) stops as soon as a full cell, C = 1 , and an empty one, C = 0 , are found on opposite sides of the stencil. We usually consider a stencil with n c = 5 cells; then the height in the first two cases of Figure 3 is correctly computed, but not in Figure 3c as the stencil is not wide enough. However, in Figure 3c, the height can be computed along the x coordinate direction. In Figure 3d, there is an empty cell between the two interface sections, and the GHF method is capable of computing the two local heights; this is not the case for the SHF method. If the two sections approach each other even more and the empty cell disappears, both methods fail to provide an adequate height function value.
The height H is stored as an offset from the cell center, together with a positive integer flag to indicate if the height is measured from the top or the bottom of the cell. Therefore, when we collect the heights to compute the interface geometrical properties, we need to normalize their value to a common base of the central column before computing the numerical derivatives. In the mixed cells with no height, the integer flag is set to a negative value to indicate that an interpolation of the local geometrical data is required in that cell.
At small grid resolutions, it is not always possible to collect three consecutive values of the height function that have been computed along the same coordinate direction. In that case, we can combine discrete heights computed columnwise and rowwise. This part of the algorithm has been discussed in [22]. In this study, we investigate only the asymptotic behavior of the height function method. In the present implementation of the algorithm, a first sweep across the computational domain is required to compute the discrete heights with Equation (13); then, a second sweep is performed to numerically calculate the geometrical properties of the interface with Equation (3). This procedure is similar to what has been implemented in other numerical codes. However, the geometrical data are no longer local, but need to be stored in matrices, and with a third sweep are interpolated where necessary with the polynomials of Equations (11) and (12), after the evaluation of the interface intersections with the grid lines using Equation (9).

3. Numerical Results

3.1. Analytical Test Case

To recover numerically the theoretical results of the previous section, we consider an interface line that requires the use of the height function along both coordinate directions that is characterized by a variation of the curvature value both in magnitude and sign and where the curvature can also be computed analytically. To this end, we consider the 4-petaled star that was introduced in [20], with parametric equations
x ( θ ) = R s + A s cos ( n s θ ) cos ( θ )
y ( θ ) = R s + A s cos ( n s θ ) sin ( θ )
where R s = 1 is the radius of the base circle, A s = 0.25 the amplitude of the oscillation, and n s = 4 the number of oscillations (or petals). The interface line is drawn in Figure 4a. However, because of the symmetry of the figure, we consider only the portion of the line in the top-right quadrant where the angle θ varies in the range [ 0 , π / 2 ] . The straight line θ = π / 4 is another axis of symmetry, as also pointed out by the numerical results. We subdivide the square domain of side L = R s + A s = 5 / 4 with square cells of side h i = R s / N i , where N i is the grid resolution. The coarsest resolution is N 0 = 20 , i is the resolution level, i = 0 , 1 , , 5 , and N i = 2 i N 0 . A small portion of the computational grid at the lowest resolution h 0 = 1 / N 0 is also shown in Figure 4a.
If the height function is numerically computed with Equation (13) along the vertical direction y, we are approximating with the first one of Equation (3) the first derivative f ( 1 ) ( x ) = d y / d x at position x with centered finite differences. Given the parametric representation of Equations (14) and (15) of the interface line, and with the notation y ˙ = d y / d θ and y ¨ = d 2 y / d θ 2 , we compute analytically the required derivatives as
f ( 1 ) ( x ) = d y d x = d y / d θ d x / d θ = y ˙ ( θ ) x ˙ ( θ ) , f ( 2 ) ( x ) = d d x d y d x = x ˙ y ¨ y ˙ x ¨ x ˙ 3
and then the curvature as
κ ( x ) = x ˙ y ¨ y ˙ x ¨ x ˙ 2 + y ˙ 2 3 / 2 .
These derivatives are computed at the abscissa x k of the midpoint of the different columns, x k = ( k 1 / 2 ) h i with k = 1 , 2 , , 5 N i / 4 . In the top-right quadrant of Figure 4a, Equation (14) is strictly monotonic and can be numerically inverted to express the angle θ as a function of x.
In a similar manner, we can compute analytically the derivatives of the inverse function x = f 1 ( y ) at the ordinate y k and plot them as a function of the angle θ after the inversion of Equation (15). Therefore, we can plot the first derivatives d y / d x and d x / d y as a function of the angle θ on the same figure, as shown in Figure 4b. The sections represented with solid lines are those where the first derivative of f ( x ) and of f 1 ( y ) are smaller than one in absolute value. In the figure, we observe three consecutive switches from one representation of the derivative to the other one. In Figure 4c, we plot the second derivative and in Figure 4d the curvature, which is a geometrical property of the line that does not depend on the analytical representation.

3.2. Pointwise Convergence

The minimum radius of curvature r m i n , or the maximum curvature κ m a x , is found at θ = θ c = π / 4 , where r m i n = κ m a x 1 3.46 h 0 . At that point, the absolute value of the first derivative is equal to one, and there is a switch in the representation of the first derivative. For these two reasons, the error of the numerical approximation of the curvature is expected to be maximum. In Figure 5a, we consider three consecutive columns, the middle one centered at the abscissa x c = x ( θ c ) , computed from Equation (14). The value H of the three heights is calculated with the Vofi library and the numerical first derivative and curvature with Equation (3). The local error E c for a geometrical property q is defined as follows:
E c = | q n , i q c |
where q c is the analytical value at θ c and q n , i the numerical value at resolution level i. The thickness of the largest column is h = 1 / 40 , corresponding to level i = 1 ; that of the most slender one is h = 1 / 640 of level i = 5 .
We also consider a 3 × 3 block of square cells of side h of the computational domain that was previously defined. The point of interest at θ c is always contained in the central column of the block, as shown in Figure 5b for the first three grid resolutions. The midpoint x i of the central column provides an approximation of the abscissa x c , and it coincides with the root approximation of x c given by the bisection method. The sequence { x i } of midpoints is then approaching the value x c with the linear convergence of the bisection algorithm. In this case, we can define two local errors:
E g c = | q n , i q c | , E g i = | q n , i q a , i |
where q n , i is the numerical value of q at x i from the three heights in the block and q a , i is the analytical value at x i . The results for the first derivative and the curvature at θ c are shown in Figure 6. A second-order convergence is observed for the three different local errors, even if the sequence { x i } converges only linearly to x c . The fluctuation in the values of E g c and E g i is due to the fact that the error is maximum at x c and that the point x i can get very close to x c at any grid spacing h and then moves away at the next refinement, as typical of the bisection method.

3.3. Convergence to the Interface Line

In Figure 4, we plot the interface line, its first and second derivatives, and the curvature as a function of the angle θ . Sections of the different lines are drawn as solid lines where the first derivative of the function f ( x ) or of the inverse function f 1 ( y ) are smaller than or equal to 1 in absolute value. In these sections, we compute the error E k at the abscissa x k or ordinate y k , where the height function is defined, for any geometrical property q as
E k = | q n , k q a , k |
where q n , k is the numerical value computed from the height function field and q a , k the corresponding analytical value. As we double the grid resolution from N i cells to N i + 1 = 2 N i , the number of heights along each coordinate direction also roughly doubles. To keep that number more or less constant in a plot, we divide that number by the factor 2 i , where i is the resolution level that was previously defined. Similarly, for a second-order convergence, the error E k of Equation (20) should decrease by the factor 4 from one resolution level to the next one. Again, to keep that value more or less constant at each abscissa x k , or ordinate y k , we multiply it by the factor 4 i , E k * = 4 i E k . In Figure 7, we plot the error E k * of the height function, of its first and second derivatives, and of the curvature as a function of the angle θ . In Figure 7a, the three switches from one representation of the interface line to the other are seen as cusps. The error is maximum at θ = θ c = π / 4 , as previously anticipated. In the other plots, the error is still continuous at θ = π / 4 , because of the symmetry of the interface line with respect to that axis, but not in the other two transitions. A few minima appear in the plots that are due to error cancellation for the corresponding values of the angle θ .
The error of the height function model for any geometrical property q can be evaluated by the L 2 norm defined as
E 2 = k = 1 M i q n , k q a , k 2 M i
and by the L norm:
E = max k | q n , k q a , k |
where again q n , k is the numerical value from the height function field, q a , k the analytical value at the same position x k , or y k , and M i the total number of cells where the height is positioned, at resolution level i.
The results for the two error norms are presented in Figure 8 for the first derivative and curvature. A second-order convergence is observed for both norms and geometrical properties.

3.4. Data Interpolation

The numerical results obtained in the previous section agree with the theoretical development of Section 2.1, namely, that the discrete height function approximation, given by Equation (13), and the numerical approximation of its geometrical properties, given by Equation (3), are second-order-accurate at the points where the height H is positioned. The vertical heights of Figure 2a are along the midline of each column. However, if the interface section inside the column crosses a horizontal grid line, as shown in Figure 2b, the two subsections of the interface lie on different grid cells. The issue is now which value should be considered for the normal vector and for the local curvature in the two subsections.
In Figure 2a, a translation of the interface line parallel to itself along the vertical direction changes the value of the three heights H by the same amount, and also the position of the intersection point with the horizontal grid line in Figure 2b. However, the values of the first and second derivatives and the curvature do not change. Therefore, to simplify the derivation, in the columns or rows where the height function is located, we consider the subgrid spacing h s = h / 10 and the positions at ± j h s , with j = 1 , 2 , 3 , 4 , for a total of 8 points, where we compute the error between an analytical value and that given by the numerical interpolation.
Figure 9a shows the constant, linear, and quadratic approximations of the interface line calculated from three consecutive heights H, in the vertical column with the abscissa x in the range [ 0.15 , 0.20 ] at the coarsest resolution, h = 1 / N 0 . The endpoint of the height H is always positioned in the convex region of the interface line, and the quadratic interpolation lies entirely in the same set. The central part of the linear approximation is also in the convex region. Still, it crosses the interface line, and the two endpoints of the linear interpolation are in the concave region. This implies that the linear interpolation is closer to the interface line than the quadratic one in a relevant fraction of the column size. The two interpolations are then comparable, and in any cut cell the “best” choice could be different according to the position of the intersection point z 0 and of the two midpoints x 1 and x 2 of Figure 2b. Figure 9b shows the constant, linear, and quadratic approximations of the interface curvature in the same column. The two interpolations are both in the convex region, and the quadratic one is somewhat closer to the analytical value. We can conclude that the linear and quadratic interpolations show a similar behavior, since the geometrical properties q, which have been computed numerically, are only second-order-accurate and outperform the constant approximation.
To be more quantitative, at each refinement level i, we have 8 M i additional points where we compute the errors, M i being the total number of cells with the height H. We consider the same two error norms of Equations (21) and (22), where q a , k is again the analytical value of the geometrical property q computed at the additional points. In contrast, the numerical value q n , k is now evaluated with one of the three polynomial interpolations of Equation (9). The coefficients a, b, and c are calculated from three consecutive values of q, as illustrated in Equation (8) for the height function. Figure 10 and Figure 11 show the convergence of L 2 and L error norms for the interpolation of the first derivative and of the curvature, respectively. These results agree with the theoretical ones of Equations (11) and (12). The constant approximation shows first-order convergence. This is by far the most commonly used approximation in two-phase flow simulations with the one-fluid formulation of the Navier–Stokes equations. The linear and quadratic interpolations compute the first derivative more accurately with second-order convergence. This interpolation should be used at any grid resolution only when the interface line intersects a horizontal grid line in a given vertical column, as shown in Figure 2b, but not, for example, in the two adjacent columns. For the interpolation, a few more computations need to be performed: geometrical data need to be collected from the two lateral columns (or rows) to approximate the intersection z 0 and the position of the two midpoints x 1 and x 2 , where the geometrical data need to be interpolated. In a local Cartesian coordinate system with the origin on the bottom-left corner, the abscissas of the two midpoints are x 1 = z 0 / 2 and x 2 = ( h + z 0 ) / 2 , respectively.

4. Conclusions

In this study, we considered the height function (HF) method for the representation of an interface line and the calculation of its geometrical properties. We proposed a numerical algorithm that removes the inconsistency between the theoretical and numerical results presented in many papers: the HF method is observed to have first-order convergence with grid refinement while theoretical results indicate second-order convergence. The HF method integrates the volume fraction (VOF) field along a column of grid cells of a Cartesian grid and provides a smoother field to be differentiated with finite differences. We chose the generalized height function (GHF) approach, which considers an adaptive stencil for the VOF function integration, over the standard height function (SHF) approach, which considers a fixed stencil, because it computes more accurate heights, in particular in high-curvature regions.
With the HF values from three consecutive columns of cells along the same coordinate direction and centered finite differences, the first and second derivatives of the interface line can be computed with second-order convergence with grid refinement. The unit normal n and the curvature κ are then calculated along the column midline from these two derivatives. The interface line can intersect more than one cell in a given column of a Cartesian grid. When this happens, the interface geometrical properties have to be interpolated in the cut cells from the value in the column midline. We considered three polynomials that corresponded to constant, linear, and quadratic approximations of the interface line inside the column, respectively. The constant approximation is the most widely used approximation and provides first-order convergence, while the linear and quadratic approximations provide second-order convergence.
Finally, we considered an interface line in a uniform Cartesian grid. The interface is described by differentiable parametric equations and is characterized by a curvature changing both in magnitude and sign. The numerical results are in agreement with the theory presented.
The HF method has been extended to three dimensions [5,28]. If the interface section in a column is shared by two consecutive cubic cells, the two midpoints x 1 and x 2 of Figure 2b in 2D become the barycenters of two interface subsections. Expressions for the barycenter coordinates have been derived for a linear interface cutting a cubic cell [12]; this task becomes much more complicated for a quadratic interface and probably will require some approximations. Therefore, the linear interpolation should be considered in practice, as it provides second-order convergence with grid refinement at a lower computational cost. We believe that this algorithm may enhance robustness and limit phase break-up caused by improper surface tension evaluation in small structures. We plan to test this numerical algorithm in three dimensions and implement it in dynamic codes to evaluate its robustness.

Author Contributions

Conceptualization, A.C., S.M., J.P., R.S. and S.Z.; methodology, A.C., S.M., J.P., R.S. and S.Z.; software, A.C., S.M., J.P., R.S. and S.Z.; validation, A.C., S.M., J.P., R.S. and S.Z.; writing—original draft preparation, A.C., S.M., J.P., R.S. and S.Z.; writing—review and editing, A.C., S.M., J.P., R.S. and S.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Dataset available on request from the authors.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hirt, C.W.; Nichols, B.D. Volume of Fluid (VOF) Method for the Dynamics of Free Boundaries. J. Comput. Phys. 1981, 39, 201–225. [Google Scholar] [CrossRef]
  2. Sussman, M.; Smereka, P.; Osher, S. A Level Set Approach for Computing Solutions to Incompressible Two-Phase Flow. J. Comput. Phys. 1994, 114, 146–159. [Google Scholar] [CrossRef]
  3. Tryggvason, G.; Bunner, B.; Esmaeeli, A.; Juric, D.; Al-Rawahi, N.; Tauber, W.; Han, J.; Nas, S.; Jan, Y.J. A Front-Tracking Method for the Computations of Multiphase Flow. J. Comput. Phys. 2001, 169, 708–759. [Google Scholar] [CrossRef]
  4. Popinet, S. Gerris: A tree-based adaptive solver for the incompressible Euler equations in complex geometries. J. Comput. Phys. 2003, 190, 572–600. [Google Scholar] [CrossRef]
  5. Popinet, S. An accurate adaptive solver for surface-tension-driven interfacial flows. J. Comput. Phys. 2009, 228, 5838–5866. [Google Scholar] [CrossRef]
  6. Deshpande, S.; Anumolu, L.; Trujillo, M. Evaluating the performance of the two-phase flow solver interFoam. Comput. Sci. Discov. 2012, 5, 014016. [Google Scholar] [CrossRef]
  7. Raeini, A.Q.; Blunt, M.J.; Bijeljic, B. Modelling two-phase flow in porous media at the pore scale using the volume-of-fluid method. J. Comput. Phys. 2012, 231, 5653–5668. [Google Scholar] [CrossRef]
  8. Gamet, L.; Scala, M.; Roenby, J.; Scheufler, H.; Pierson, J.L. Validation of volume-of-fluid OpenFOAM® isoAdvector solvers using single bubble benchmarks. Comput. Fluids 2020, 213, 104722. [Google Scholar] [CrossRef]
  9. Tryggvason, G.; Scardovelli, R.; Zaleski, S. Direct Numerical Simulations of Gas-Liquid Multiphase Flows; Cambridge University Press: Cambridge, UK, 2011. [Google Scholar]
  10. Youngs, D.L. Time-dependent multi-material flow with large fluid distortion. In Numerical Methods for Fluid Dynamics; Morton, K., Baines, M., Eds.; Academic Press: London, UK, 1982; pp. 273–285. [Google Scholar]
  11. Pilliod, J.E.J.; Puckett, E.G. Second-order accurate volume-of-fluid algorithms for tracking material interfaces. J. Comput. Phys. 2004, 199, 465–502. [Google Scholar] [CrossRef]
  12. Aulisa, E.; Manservisi, S.; Scardovelli, R.; Zaleski, S. Interface reconstruction with least-squares fit and split advection in three-dimensional Cartesian geometry. J. Comput. Phys. 2007, 225, 2301–2319. [Google Scholar] [CrossRef]
  13. Weymouth, G.D.; Yue, D.K.P. Conservative Volume-of-Fluid method for free-surface simulations on Cartesian-grids. J. Comput. Phys. 2010, 229, 2853–2865. [Google Scholar] [CrossRef]
  14. Brackbill, J.U.; Kothe, D.B.; Zemach, C. A continuum method for modeling surface tension. J. Comput. Phys. 1992, 100, 335–354. [Google Scholar] [CrossRef]
  15. Cummins, S.J.; Francois, M.M.; Kothe, D.B. Estimating curvature from volume fractions. Comput. Struct. 2005, 83, 425–434. [Google Scholar] [CrossRef]
  16. Sussman, M.; Puckett, E.G. A Coupled Level Set and Volume-of-Fluid Method for Computing 3D and Axisymmetric Incompressible Two–Phase Flows. J. Comput. Phys. 2000, 162, 301–337. [Google Scholar] [CrossRef]
  17. Renardy, Y.; Renardy, M. PROST: A Parabolic Reconstruction of Surface Tension for the Volume-of-Fluid Method. J. Comput. Phys. 2002, 183, 400–421. [Google Scholar] [CrossRef]
  18. Han, A.; Evrard, F.; Desjardins, O. Comparison of methods for curvature estimation from volume fractions. Int. J. Multiph. Flow 2024, 174, 104769. [Google Scholar] [CrossRef]
  19. Patel, H.V.; Panda, A.; Kuipers, J.A.M.; Peters, E.A.J.F. Computing interface curvature from volume fractions: A machine learning approach. Comput. Fluids 2019, 193, 104263. [Google Scholar] [CrossRef]
  20. Önder, A.; Liu, P.L.F. Deep learning of interfacial curvature: A symmetry-preserving approach for the volume of fluid method. J. Comput. Phys. 2023, 485, 112110. [Google Scholar] [CrossRef]
  21. Cervone, A.; Manservisi, S.; Scardovelli, R.; Sirotti, L. Computing Interface Curvature from Height Functions Using Machine Learning with a Symmetry-Preserving Approach for Two-Phase Simulations. Energies 2024, 17, 3674. [Google Scholar] [CrossRef]
  22. Bornia, G.; Cervone, A.; Manservisi, S.; Scardovelli, R.; Zaleski, S. On the properties and limitations of the height function method in two-dimensional Cartesian geometry. J. Comput. Phys. 2011, 230, 851–862. [Google Scholar] [CrossRef]
  23. Francois, M.M.; Swartz, B.K. Interface curvature via volume fractions, heights, and mean values on nonuniform rectangular grids. J. Comput. Phys. 2010, 229, 527–540. [Google Scholar] [CrossRef]
  24. Ivey, C.B.; Moin, P. Accurate interface normal and curvature estimates on three–dimensional unstructured non-convex polyhedral meshes. J. Comput. Phys. 2015, 300, 365–386. [Google Scholar] [CrossRef]
  25. Ferdowsi, P.; Bussmann, M. Second-order accurate normals from height functions. J. Comput. Phys. 2008, 227, 9293–9302. [Google Scholar] [CrossRef]
  26. Chierici, A.; Chirco, L.; Chenadec, V.L.; Scardovelli, R.; Yecko, P.; Zaleski, S. An optimized VOFI library to initialize the volume fraction field. Comput. Phys. Commun. 2022, 281, 108506. [Google Scholar] [CrossRef]
  27. Bnà, S.; Manservisi, S.; Scardovelli, R.; Yecko, P.; Zaleski, S. Numerical integration of implicit functions for the initialization of the VOF function. Comput. Fluids 2015, 113, 42–52. [Google Scholar] [CrossRef]
  28. Patel, H.V.; Kuipers, J.A.; Peters, E.A. Computing interface curvature from volume fractions: A hybrid approach. Comput. Fluids 2018, 161, 74–88. [Google Scholar] [CrossRef]
Figure 1. (a) Volume fraction distribution. (b) Three heights (red arrows) can be computed for the given distribution.
Figure 1. (a) Volume fraction distribution. (b) Three heights (red arrows) can be computed for the given distribution.
Energies 18 02918 g001
Figure 2. (a) Three consecutive heights H are required to compute the interface unit normal n and the curvature κ with centered finite differences at the midpoint x of the central column; (b) the interface section inside the central column crosses two consecutive grid cells, and the interface geometrical properties computed at point x should be interpolated by the heights (arrow lines) at points x 1 and x 2 , midpoints of the new cell generated by the new line (dashed).
Figure 2. (a) Three consecutive heights H are required to compute the interface unit normal n and the curvature κ with centered finite differences at the midpoint x of the central column; (b) the interface section inside the central column crosses two consecutive grid cells, and the interface geometrical properties computed at point x should be interpolated by the heights (arrow lines) at points x 1 and x 2 , midpoints of the new cell generated by the new line (dashed).
Energies 18 02918 g002
Figure 3. Generalized height function (red line with arrow) and a stencil with n c = 5 cells: (a) only three cells are required to compute the height; (b) the entire stencil is necessary; (c) the stencil is not wide enough, since the top cell is not empty; (d) both local heights can be computed.
Figure 3. Generalized height function (red line with arrow) and a stencil with n c = 5 cells: (a) only three cells are required to compute the height; (b) the entire stencil is necessary; (c) the stencil is not wide enough, since the top cell is not empty; (d) both local heights can be computed.
Energies 18 02918 g003
Figure 4. (a) Base circle (green line) and 4-petaled star (indigo line); the top-right sector is the computational domain containing a quarter of the star (thick black line). (b) First derivative, (c) second derivative, and (d) curvature as a function of the angle θ , computed from f ( x ) (red lines) and f 1 ( y ) (blue lines); the sections shown as solid lines are those that are numerically approximated. Solid lines: selected sections for numerical approximation; dashed line: discarded sections.
Figure 4. (a) Base circle (green line) and 4-petaled star (indigo line); the top-right sector is the computational domain containing a quarter of the star (thick black line). (b) First derivative, (c) second derivative, and (d) curvature as a function of the angle θ , computed from f ( x ) (red lines) and f 1 ( y ) (blue lines); the sections shown as solid lines are those that are numerically approximated. Solid lines: selected sections for numerical approximation; dashed line: discarded sections.
Energies 18 02918 g004
Figure 5. Geometry to compute heights (red segments) near the point at θ = θ c = π / 4 (green point) of the interface (blue line). (a) Three consecutive columns with the largest spacing, h = 1 / 40 , the middle one centered at x c = x ( θ c ) . (b) Three consecutive 3 × 3 blocks of square cells of the computational domain, the first one with the largest grid spacing h = 1 / 40 . The interface point at x c is inside the central column of each block, where only the central height is drawn.
Figure 5. Geometry to compute heights (red segments) near the point at θ = θ c = π / 4 (green point) of the interface (blue line). (a) Three consecutive columns with the largest spacing, h = 1 / 40 , the middle one centered at x c = x ( θ c ) . (b) Three consecutive 3 × 3 blocks of square cells of the computational domain, the first one with the largest grid spacing h = 1 / 40 . The interface point at x c is inside the central column of each block, where only the central height is drawn.
Energies 18 02918 g005
Figure 6. Local error at point θ = θ c = π / 4 at different resolutions N = 2 i N 0 : (a) first derivative and (b) curvature. Errors E c , E g i and E g c are defined in text.
Figure 6. Local error at point θ = θ c = π / 4 at different resolutions N = 2 i N 0 : (a) first derivative and (b) curvature. Errors E c , E g i and E g c are defined in text.
Energies 18 02918 g006
Figure 7. Local error E * = 4 i E as a function of the angle θ , at different grid resolutions N ( N = 2 i N 0 ): (a) height function; (b) first derivative; (c) second derivative; and (d) curvature.
Figure 7. Local error E * = 4 i E as a function of the angle θ , at different grid resolutions N ( N = 2 i N 0 ): (a) height function; (b) first derivative; (c) second derivative; and (d) curvature.
Energies 18 02918 g007
Figure 8. Convergence of L 2 and L error norms as a function of the grid resolution N: (a) first derivative; (b) curvature.
Figure 8. Convergence of L 2 and L error norms as a function of the grid resolution N: (a) first derivative; (b) curvature.
Energies 18 02918 g008
Figure 9. Constant, linear, and quadratic interpolations in a vertical column at the coarsest resolution h = 1 / 20 : (a) interface line; (b) curvature. The marks * are at abscissa x of the 8 additional points where we compute the error between the three interpolations and the analytical curve.
Figure 9. Constant, linear, and quadratic interpolations in a vertical column at the coarsest resolution h = 1 / 20 : (a) interface line; (b) curvature. The marks * are at abscissa x of the 8 additional points where we compute the error between the three interpolations and the analytical curve.
Energies 18 02918 g009
Figure 10. Convergence of the constant, linear, and quadratic interpolations of the first derivative as a function of the grid resolution N: (a) L 2 error norm; (b) L error norm.
Figure 10. Convergence of the constant, linear, and quadratic interpolations of the first derivative as a function of the grid resolution N: (a) L 2 error norm; (b) L error norm.
Energies 18 02918 g010
Figure 11. Convergence of the constant, linear, and quadratic interpolations of the curvature as a function of the grid resolution N: (a) L 2 error norm; (b) L error norm.
Figure 11. Convergence of the constant, linear, and quadratic interpolations of the curvature as a function of the grid resolution N: (a) L 2 error norm; (b) L error norm.
Energies 18 02918 g011
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cervone, A.; Manservisi, S.; Pan, J.; Scardovelli, R.; Zaleski, S. On the Convergence of Normal and Curvature Calculations with the Height Function Method for Two-Phase Flow. Energies 2025, 18, 2918. https://doi.org/10.3390/en18112918

AMA Style

Cervone A, Manservisi S, Pan J, Scardovelli R, Zaleski S. On the Convergence of Normal and Curvature Calculations with the Height Function Method for Two-Phase Flow. Energies. 2025; 18(11):2918. https://doi.org/10.3390/en18112918

Chicago/Turabian Style

Cervone, Antonio, Sandro Manservisi, Jieyun Pan, Ruben Scardovelli, and Stéphane Zaleski. 2025. "On the Convergence of Normal and Curvature Calculations with the Height Function Method for Two-Phase Flow" Energies 18, no. 11: 2918. https://doi.org/10.3390/en18112918

APA Style

Cervone, A., Manservisi, S., Pan, J., Scardovelli, R., & Zaleski, S. (2025). On the Convergence of Normal and Curvature Calculations with the Height Function Method for Two-Phase Flow. Energies, 18(11), 2918. https://doi.org/10.3390/en18112918

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop