1 Introduction

While modeling two-phase immiscible flows with a significant difference in molecular viscosity and density, the presence of the lighter phase can be neglected, and then the interface is considered as free-surface or surface. This assumption is valid for modeling liquid-gas flows such as ocean waves because of the significant difference in pressure and inertia. Free surface flows are commonly solved using Lagrangian and Eulerian approaches. The early work with the Lagrangian approach for interface tracking is found in the Marker and Cell method (MAC) [1]. In the MAC method, the velocity field models the fluid flow, while the markers represent the fluid in space, and fluid flow is simulated by moving the marker particles through space as per the interpolated velocities from the velocity field. Peskin [2] used the immersed boundary method to analyze the blood flow in the heart where the moving heart walls were treated as inner boundaries. Other Lagrangian methods use a deformable mesh that conforms to the interface at all times as in the front-tracking method [3] and Arbitrary Lagrangian Eulerian (ALE) methods [4,5,6]. In the front-tracking method, the flow field is discretized on a stationary grid using conservative finite difference approximation, while the interface is identified using an unstructured grid that can move through the stationary grid along with it. The Lagrangian approach is not be suitable for fluid flows with large deformations, fragmented interfaces, and fluid-structure interactions as the interfaces are defined as internal boundaries [7]. Even though re-meshing is a solution, it comes with higher computational cost and interpolation errors. Another Lagrangian method called Particle-in-cell (PIC) method, have discrete mass points representing the fluids, and it has been used since the 1960’s [8, 9]. Differential equations of mass and momentum characterize flow and energy in this method, and mass points move by weighted velocities. Eulerian and Lagrangian frameworks have been coupled previously to avoid shortcomings and to complement each other. Semi-implicit surface tension formulation with a Lagrangian surface mesh on an Eulerian simulation grid by Schroeder [10] and enhancement of pressure calculation by the incorporation of background mesh scheme by Wang [11] are some cases. For interface reconstruction, an extension of the VOF method was introduced by Dyadechko & Shashkov [12] called the moment of fluid method (MoF) that keeps track of the cell-wise material centroids and uses this information to reconstruct interface by minimizing the defect of the first moment along with volume conservation constraint. This method allows the reconstruction of the interface with no information on neighboring cell fluid volume. Very recent work by Wenzel and Garrick [13] introduced the point-mass particle method, which is an Eulerian–Lagrangian approach where Navier–Stokes equations are solved in the Eulerian grid while Lagrangian particles discretize the fluid mass and phase information. Further review on interface tracking methods can be found in [14,15,16,17]. Among the interface capturing methods for incompressible fluids, the volume-of-fluid (VOF) method introduced by Hirt and Nichols in 1979 is the most popular [18, 19]. VOF’s computational efficiency, straightforward treatment of changes in interface topology, and mass conservation makes it a success [20]. VOF is characterized by a static or moving mesh and a discontinuous scalar function that gives the percentage of fluid present inside each mesh cell.

VOF can reconstruct the interface from the f values. The mean normal direction of the interface could be found out from the spatial gradient of the f function. The evolution of the f function is given by \(Df/Dt= 0\), which states that the F moves with the fluid. One of the main advantages of the VOF method is that it stores the minimum number of variables and follows the region instead of an interface, and avoids the problems associated with the intersecting and breaking surfaces. In the original VOF advection, the piecewise constant scheme was used, i.e., the interface inside each cell is parallel to one of the axes. An improvement to this method can be seen in Nichols et. al. [21], Hirt and Nichols [19], Torrey et al. [22] and Duff [23]. Improvement is facilitated via an additional degree of freedom to form a stair shaped profile within a cell, according to the local spatial distribution of fluid mass. Piecewise-linear schemes are an improvement in terms of accuracy to piecewise-constant schemes, even though they are more complex and computationally expensive. Since the fluid volume is conserved, the interface is located uniquely from interface normal. Interface normal can be estimated using many algorithms in the context of VOF, but all of them rely on the material volume data from the neighboring cells for interface reconstruction. Some notable piecewise linear schemes include Rider and Kothe [20], Harvie and Fletcher [24, 25], Geuyffier et al. [26], and Scardovelli and Zaleski [27, 28].

We present a novel surface tracking, and advection algorithm based on the VOF method for incompressible fluid flows in two and three dimensions. This method is named VOF-with-center-of-mass-and-Lagrangian-particles (VCLP), and it uses spatially and temporally localized Lagrangian particles (LPs).

The scope of VCLP is the need for a surface tracking and advection algorithm that combine the strengths of Eulerian methods, such as computational speed and fewer memory requirements and the higher accuracy and surface tracking ability of Lagrangian methods with customizable speed vs. accuracy using a single parameter. The following sections explains its methodology and validation in detail.

2 VOF with the center of mass and Lagrangian particles (VCLP) method

The computational domain \({\Omega }\) is discretized into \(n_X\), \(n_Y\), \(n_Z\) Cartesian grid cells in positive XYZ directions. The space occupied by any cell is identified by s(i,j,k) and its dimensions are \(\delta x_i,\delta y_j\), and \(\delta z_k)\). (i,j,k,m) identifies the cell at s(i,j,k) during the \(m^{th}\) time step of simulation. Now, a binary value function \(F({x},m)\) with outputs zero and one, based on the VOF method, is defined at every point in computational domain. For the cell space s(ijkm) where F is defined everywhere, the average of value of F function gives another function f known as fractional fluid volume which is a scalar value defined for every cell in the domain with values between 0 and 1. \({f_m} \) is a matrix of dimension \(n_X \times n_Y \times n_Z\) filled with f(ijkm) values, of all cells. Now, consider three matrices of same dimension containing the velocities \({u}(i,j,k,m)\) corresponding to every cell in \({\Omega }\), represented as \({U_{X,m}}\), \({U_{Y,m}}\), and \({U_{Z,m}}\). Together these three matrices is denoted as \({U_m}\). Similarly the CM matrices is denoted as \({c_m}\). Then the entire purpose of VCLP can be conveyed by the simple relation between input and output parameters given by Eq. 1.

$$\begin{aligned}&\text {VCLP (input parameters)} = \text {(output parameters)}\nonumber \\&\boxed { \textit{VCLP}{(f_m,c_m,U_m)} = {(f_{m+1},c_{m+1}) } } \end{aligned}$$
(1)

Thus VCLP needs velocity field, fluid distribution, and the CM location of the given time step to provide the fluid distribution, and the CM for the next time step. So it takes seven/four scalar input/output in 3D and five/three in 2D.

2.1 VCLP procedure

The VCLP procedure can be summarized as follows.

  1. 1.

    Entering time step \(t_m\)

  2. 2.

    Receives velocity field, fluid distribution (f), and center of mass locations from the solver.

  3. 3.

    Classification of all cells in to five; Empty, Surface, Inner I, Inner II, Inner III.

  4. 4.

    Interface reconstruction calculation of all Surface cells using PLIC or proposed PCIC method.

    • Finds interface normal(shape parameter) using proposed T- Slope Method.

    • Finds interface curvature using proposed methods.

    • Locates interface using proposed sorted surface constant (SSC) methods.

  5. 5.

    Create an empty copy of the domain for time step \(t_{m+1}\) (empty f matrix and center of mass locations)

  6. 6.

    Starts working on a single cell

    • Fill the selected cell (Surface, Inner I, Inner II) with LPs using the blue noise template created at the beginning of simulation. Surface cells have PLIC or PCIC interfaces

    • Center of mass of the filled cell is estimated and corrected using the center of mass location that is being tracked and obtained from solver

    • LPs (Fluid) in the selected cell is advected using Taylor’s second-order advection scheme or the proposed TJSM scheme.

      • Velocity field of LPs are estimated via trilinear interpolation

      • Acceleration field of LPs are calculated using proposed method

    • The advected LPs are received by one or more cells in the domain created for \(t_{m+1}\)

    • The center of mass of all cells that received LPs are updated

    • Moves on to the next surface, inner I, or Inner II cell to advect

  7. 7.

    Once advection of all cells are completed, filters are applied and steps required for skip core optimization is carried out.

  8. 8.

    The domain for \(t_{m+1}\) is complete with new fluid distribution and center of mass location

  9. 9.

    \(m = m+1\)

Notes: The blue noise template of LPs needs to be created only once at the beginning of simulation. The center of mass locations of cells for the first time step is calculated from the geometry and initial conditions using LPs and hence doesn’t require correction.

2.2 Classification of cells

In typical VOF method there are empty (E), surface (S), and interior cells (N) respectively. In VCLP, interior cells are further classified in to three levels, Inner I, Inner II, and Inner III and all classifications are based on cell-type value denoted by \(C_T\) ( Table  1 ) and estimated using the following steps 1 to 6, where q is the ceiling function value of the Courant-Friedrichs-Lewy (CFL) number (\(q = \lceil \textit{CFL}\rceil \)) and the CFL number is given by \(\textit{CFL} = \dfrac{u_{max} \Delta t}{\delta x}\). \(C_T^*\) is the temporary \(C_T\) value which gets updated along the steps.

Table 1 Classification of cells in the computational domain \({\Omega }\)
  1. 1.

    \(C_T^* = \lfloor f(i,j,k,m) \rfloor \)

  2. 2.

    \(C_{T1} = \sum _{k=k-q}^{k=k+q} \sum _{j=j-q}^{j=j+q} \sum _{i=i-q}^{i=i+q} C_T^*\)

  3. 3.

    \(C_T = {\left\{ \begin{array}{ll} 2 &{} \text {where } C_{T1} = (2q+1)^3, f>0.5\\ C_T^* &{} \text {otherwise} \end{array}\right. }\)

  4. 4.

    \( C_{T2} = \sum _{k=k-q}^{k=k+q} \sum _{j=j-q}^{j=j+q} \sum _{i=i-q}^{i=i+q} C_T^*\)

  5. 5.

    \(C_T^* = {\left\{ \begin{array}{ll} 3 &{} \text {where } C_{T2} = 2(2q+1)^3 \\ C_T^* &{} \text {otherwise} \end{array}\right. }\)

  6. 6.

    \(C_T = {\left\{ \begin{array}{ll} 4 &{} \text {where } C_{T3} = 3(2q+1)^3 \\ C_T^* &{} \text {otherwise} \end{array}\right. }\)

Figure 1 shows an ellipsoidal fluid body with a circular hole in it inside a square computational domain and the classification of cells before and after advection based on steps above.

Fig. 1
figure 1

Cell Classification: Top: Rectangular block is a simplified 1-D translation diagram with CFL = 0.75 showing if \(N_3\) is not advected the \(N_3\) mass gain equals \(N_2\) mass loss. Hatched is before advection and filled is after. Left: an ellipsoidal fluid body with a circular hole before advection. Right: fluid body after advection with \(q = 1\) and a uniform velocity field of \(\cos (3\pi /4) \hat{i}+\sin (3\pi /4) \hat{j}\). Left: Classification of cells before advection. Right: cells with changes in classification after advection and the corresponding change

2.3 Interface reconstruction

Interface is reconstructed for all cells classified as surface cell according to \(C_T\) value. There are two choices for interface reconstruction calculation; Piecewise Linear Interface Calculation (PLIC) method and the Piecewise-Circular-Interface-Calculation method (PCIC). PLIC is used by many models and it creates a line segment representing the interface in 2D and a plane in 3D, whereas PCIC which we propose creates a circular arc for the interface in 2D and a spherical surface in 3D. Linear interface reconstruction denoted as Eq. 2,

$$\begin{aligned} {L}(i,j,k,m): n_xx+n_yy+n_zz +a= 0 \end{aligned}$$
(2)

needs interface normal vector \({n}=(n_x,n_y,n_z)\) and a, the planar constant. PCIC is build on top of PLIC meaning PLIC calculation is required for PCIC. The PCIC reconstruction (\({C}\)) is given by Eq. 3,

$$\begin{aligned} \begin{aligned} {C}:&(x-x_0)^2+(y-y_0)^2+(z-z_0)^2 - R^2 = 0 \\&{\left\{ \begin{array}{ll} &{} x_{i-1}< x \le x_i \\ &{} y_{j-1}<y \le y_j \\ &{} z_{k-1} <z \le z_k \end{array}\right. } \end{aligned} \end{aligned}$$
(3)

where \((x_0,y_0,z_0)\) is the sphere’s center and R its radius. The additional information required for PCIC than PLIC is the radius of the sphere R, or equivalently the interface curvature which is the reciprocal of R denoted by \(\kappa \).

Figure 2a depicts the reconstructed fluid domain along the interfaces using PLIC and Fig. 2b shows the fluid domain reconstructed with PCIC.

Fig. 2
figure 2

a Reconstructed PLIC interfaces and b Reconstructed Piecewise Circular Interface Calculation (PCIC), using f values. Center of mass locations are shown as dots. Fluid body is circular with a radius of 0.15 inside a unit square domain with a resolution of 32 \(\times \) 32

It can be seen that the PCIC interface reconstructions are more accurate and the radius of curvatures are close to the true value (circle of radius 0.15 m is on cell size of 1/32 \(\times \) 1/32 m).

2.3.1 Interface normal and T-slope method

The interface normal is given by Eq. 4,

$$\begin{aligned} {n}= \dfrac{\nabla F}{|\nabla F |} \approx \dfrac{\nabla f}{|\nabla f |} \end{aligned}$$
(4)

but since F is discretized into f, numerically its approximate value (X component) is obtained using Eq. 5.

$$\begin{aligned} \begin{aligned} \nabla _{n_X} f&= \dfrac{f_{(x)}(i+1)-f_{(x)}(i) }{\delta x_{i+1}+\delta x_{i}} \\&\quad +\dfrac{f_{(x)}(i)-f_{(x)}(i-1) }{\delta x_{i-1}+\delta x_{i}} \end{aligned} \end{aligned}$$
(5)

where,

$$\begin{aligned} f_{(x)}(i) = \dfrac{ \sum _{k=k-1}^{k=k+1} \sum _{j=j-1}^{j=j+1} f(i,j,k) \delta y_j \delta z_k }{\sum _{k=k-1}^{k=k+1} \sum _{j=j-1}^{j=j+1} \delta y_j \delta z_k} \end{aligned}$$

In literature, the two common ways to estimate the interface normal are by finding the \(\nabla _n f\) using above mentioned equations and by using a method that deals with minimum slope with respect to the axes. We may call these numerical gradient method and the minimum slope error method which can be learned from [19]. VCLP uses a new method that we propose, called T- Slope method to find the interface normal and Eqs. 612. shows how the interface normal is estimated in 2D based on the calculated intermediate parameters \(S_x, S_y, H_x, H_y, F_x, F_y, \alpha \) and \(\theta \). The first two parameters \(S_x\) and \(S_y\) having units of length represent the change of volume with distance and they are given by Eqs. 6 and 7 .

$$\begin{aligned} \begin{aligned} S_x&= \sum _{j=j-1}^{j=j+1} \delta y_{j} \left( \dfrac{f_{i+1,j} \delta x_{i+1} - f_{i,j} \delta x_{i} }{\delta x_{i}+\delta x_{i+1} } \right) \\&\quad +\delta y_{j} \left( \dfrac{f_{i,j} \delta x_{i} - f_{i-1,j} \delta x_{i-1} }{\delta x_{i}+\delta x_{i+1} } \right) \\ \end{aligned} \end{aligned}$$
(6)
$$\begin{aligned} \begin{aligned} S_y&= \sum _{i=i-1}^{i=i+1} \delta x_{i} \left( \dfrac{f_{i,j-1} \delta y_{j-1} - f_{i,j} \delta y_{j} }{\delta y_{j}+\delta y_{j-1} } \right) \\&\quad + \delta x_{i} \left( \dfrac{f_{i,j} \delta y_{j} - f_{i,j+1} \delta y_{j+1} }{\delta y_{j}+\delta y_{j-1} } \right) \end{aligned} \end{aligned}$$
(7)

Then, Eq. 8 is used to estimate the two slopes parameters \(H_x\) and \(H_y\) which are non-dimensional.

$$\begin{aligned} \begin{aligned} H_x = \sum _{j=j-1}^{j=j+1} \delta y_{j}\left( \dfrac{f_{i+1,j} - f_{i,j} }{\delta x_{i}+\delta x_{i+1} } + \dfrac{f_{i,j} - f_{i-1,j} }{\delta x_{i}+\delta x_{i+1} } \right) \\ H_y = \sum _{i=i-1}^{i=i+1} \delta x_{i}\left( \dfrac{f_{i,j-1} - f_{i,j} }{\delta y_{j}+\delta y_{j-1} } + \dfrac{f_{i,j} - f_{i,j+1} }{\delta y_{j}+\delta x_{j+1} } \right) \end{aligned} \end{aligned}$$
(8)

Equation 9 estimates two non-dimensional parameters which are independent of the cell dimensions.

$$\begin{aligned} \begin{aligned} F_x =&\dfrac{ \sum _{j=j-1}^{j=j+1} f_{i+1,j}- \sum _{j=j-1}^{j=j+1} f_{i-1,j}}{ \sum _{j=j-1}^{j=j+1} f_{i,j}} \\ F_y =&\dfrac{ \sum _{i=i-1}^{i=i+1} f_{i,j-1}- \sum _{i=i-1}^{i=i+1} f_{i,j+1}}{ \sum _{i=i-1}^{i=i+1} f_{i,j}} \end{aligned} \end{aligned}$$
(9)

The magnitudes of these two parameters \(F_x\) and \(F_y\) are used to estimate another parameter \(\alpha \) as in Eq. 10.

$$\begin{aligned} \alpha = {\left\{ \begin{array}{ll} 1 &{} \text {if} \, |F_x |<|F_y |\\ 0 &{} \text {else} \end{array}\right. } \end{aligned}$$
(10)

The calculated parameters \(S_x, S_y, H_x, H_y, F_x, F_y\) and \(\alpha \) are used as in Eq. 11 to estimate \(\theta \) which is the angle of rotation of interface with respect to the X-axis.

$$ \begin{aligned} \theta = {\left\{ \begin{array}{ll} \tan ^{-1} (H_y)+ \pi &{} \text {if} \, \alpha = 0 \, \& \, S_x \ge 0\\ -\tan ^{-1} (H_y) &{} \text {if} \, \alpha = 0 \, \& \, S_x < 0\\ \tan ^{-1} (H_x)+ \dfrac{\pi }{2} &{} \text {if} \, \alpha = 1 \, \& \, S_y \le 0\\ -\tan ^{-1} (H_x)- \dfrac{\pi }{2} &{} \text {if} \, \alpha = 1 \, \& \, S_y > 0\\ \end{array}\right. } \end{aligned}$$
(11)

Finally, the components on the interface normal are estimated using Eq. 12.

$$\begin{aligned} n_x = \cos {\theta }, \, \, n_y = \sin {\theta } \end{aligned}$$
(12)

A two-dimensional circular fluid domain is reconstructed from the actual f values, i.e., from the intersection area of the circle and cell boundaries using PLIC with the three methods, numerical gradient, minimum slope, and T-Slope. Methods are tested for two aspect ratios and the results are compared in appendix A.

2.3.2 Interface curvature and PCIC

The Piecewise-Circular-Interface-Calculation (PCIC) is a proposed alternative to PLIC, but with a higher order. It constructs a circular arc (2D) or a spherical surface (3D) for surface cells and a PLIC reconstruction is equivalent to a PCIC reconstruction with infinite radius. As PCIC have higher order than PLIC, improved accuracy is expected in the reconstructed interface, and subsequently in the simulated flow. Since the curvature information can also be used to estimate the surface tension force, it is expected to improve accuracy in related scenarios also.

The procedure developed in 2D to estimate the interface curvature is shown in Fig. 3, where normals drawn at the four neighbor surface cells and their intersection with the normal of the surface cell in consideration provides the neighbor radius’. The interface curvature is estimated by taking average of four neighbor curvatures and its reciprocal gives the radius for the PCIC as given in Eq. 13,

$$\begin{aligned} R_m = \dfrac{4}{\sum _{k=1}^{k=4} \frac{1}{r_k} } \end{aligned}$$
(13)

where \(R_m\) is the mean radius of curvature and \(r_k\) is the neighbor radius.

Fig. 3
figure 3

Interface curvature in 2D for the PCIC reconstruction. Normals are drawn from the mid points of nearest four neighboring PLICs to the normal of the surface cell in consideration, passing through its PLIC reconstruction’s midpoint. Neighbor curvatures are averaged to get the PCIC interface curvature

Neighbor radius \(r_k\) is found using Eq. 14,

$$\begin{aligned} r_k = \dfrac{|n_{ex}(y_0-m_y)-n_{ey}(x_0-m_x) |}{\sqrt{n_xn_{ey}-n_yn_{ex}} } \end{aligned}$$
(14)

where \((x_0, y_0)\) is the mid point of the PLIC reconstruction and \((n_x,n_y)\) is its normal passing through its midpoint, \((m_x, m_y)\). \((n_{ex},n_{ey})\) is the normal of the neighbor’s PLIC reconstruction. For estimating interface curvature in 3D, a new method is developed using the interface normals located at the centroids of PLIC reconstructions inside the cell and inside its three nearest neighbor surface cells. Let’s consider the centroid of the cell of consideration as \({e_0}\) and its three neighbors as \({e_1},{e_2}\) and \({e_3}\). Similarly four normals at the centroids are denoted as \({n_0}\) to \({n_3}\). Interface curvature (\(\bar{\kappa }\)) is given by Eq. (15) where \(\nabla \cdot {n}\) is the divergence of normal at the PLIC centroid.

$$\begin{aligned} R = \dfrac{1}{\bar{\kappa }} = -\dfrac{2}{\nabla \cdot {n}}, ~\ \nabla \cdot {n}= \dfrac{\partial n_x}{\partial x} + \dfrac{\partial n_y}{\partial y} + \dfrac{\partial n_z}{\partial z} \end{aligned}$$
(15)

The three components of \(\nabla \cdot {n}\) are found using set of Eq. 16,

$$\begin{aligned} \begin{aligned} D\dfrac{\partial n_x}{\partial x}&= X_1(y_2z_3-y_3z_2)+X_2(y_3z_1-y_1z_3) \\&\quad +X_3(y_1z_2-y_2z_1)\\ D\dfrac{\partial n_y}{\partial y}&= Y_1(x_3z_2-x_2z_3)+Y_2(x_1z_3-x_3z_1) \\&\quad +Y_3(x_2z_1-x_1z_2)\\ D\dfrac{\partial n_z}{\partial z}&= Z_1(x_2y_3-x_3y_2)+Z_2(x_3y_1-x_1y_3) \\&\quad +Z_3(x_1y_2-x_2y_1)\\ D&=x_1(y_2z_3-y_3z_2)+x_2(y_3z_1-y_1z_3)\\&\quad +x_3(y_1z_2-y_2z_1) \end{aligned} \end{aligned}$$
(16)

Note that here \({n_0}-{n_k}=(X_k,Y_k,Z_k)\) and \({e_0}-{e_k}=(x_k,y_k,z_k)\) where k =1, 2, and 3 representing the three nearest neighboring surface cells.

2.3.3 Locating interfaces and SSC

The planar constant ‘a’ in PLIC and the center of the sphere for PCIC needs to be calculated as the next step. Two common approaches to locate the interface are the analytical and the numerical iterative methods like the bisection method [29]. Analytical solution is accurate but computationally intensive, especially in 3D. Bisection method is an iterative method stopped when the error is below a predefined limit. VCLP uses a new numerical method named the Sorted-Surface-Constant method (SSC) which works on the principle that planar constants along interface normal vary linearly as illustrated in Fig. 4.

Fig. 4
figure 4

Estimation of planar constant a using the Sorted Surface Constant (SSC) method for the surface cell given the interface normal and the f-value

SSC method works for structured, unstructured grids in 2D and 3D with the same efficiency given boundaries are well defined. The application of SSC method for PCIC is depicted in the Fig. 5. Detailed explanation and steps are provided in “Appendix A”.

Fig. 5
figure 5

Sorted Surface Constant (SSC) method for PCIC. Each N points inside cell is mapped to the normal through the PLIC midpoint such that intersecting point is at distance R. Points are then sorted (color) according to the signed distance(surface constant value) from PLIC midpoint to the intersecting point (example: points 1, 2). \(fN^{th}\) surface constant provides the center of circle ’c’, making fraction of number of points inside PCIC to be f

2.4 Lagrangian particles and center of mass tracking

While advecting in VCLP, the fluid inside the cell is represented using Lagrangian particles (LPs) as concentrated mass points. A single template of fluid mass points generated with blue noise distribution is used. Here, LPs representing the fluid are advected cell by cell, and after advection of one cell, the same LPs template is used for the next cell advection. This is an important difference to the common Lagrangian approaches, where the entire fluid domain or interface are represented simultaneously by LPs and all LPs are tracked through the simulation time, requiring very large number of LPs proportional to the domain size for the same resolution. VCLP uses only one blue noise template of LPs with custom number of particles, and hence only a total of 100–1000 LPs are required for the entire simulation irrespective of the domain size in 2D, and 1000 to 8000 LPs in 3D.

2.4.1 Lagrangian particle creation

The creation of LPs in 2D and 3D is simple as creating two and three arrays of uniformly distributed random numbers within 0 and 1 (white noise) that represent the coordinates of their location. As LPs represent the fluid with uniform density, the ideal scenario is uniformly distributed LPs without any spatial bias. But most arrangements such as LPs at the vertices of rectangles or hexagons have directional bias but not for a uniformly distributed white noise and blue noise (Poisson disk sampling) [30]. The difference between these sampling techniques can be seen in Fig. 6.

Fig. 6
figure 6

Blue noise and white noise templates

It can be noted that the blue noise has no clusters and every small region looks similar representing uniform density in a better way. Tests were conducted with white and blue noise and proved the same and hence a blue noise template is used. This template is created only once at the start of simulation and can be reused in each cell to advect the fluid for all time steps. If a finer resolution is opted, then a template with larger number of LPs or density is generated. Blue noise template is generated using a new procedure and is provided in appendix. The template is used to populate the fluid region in one cell, and is then advected, then the code moves on to the next cell till entire fluid domain is advected for the given time step. The template is used to fill the cell completely or partially after which LPs outside the PCIC reconstruction \({C}\) are removed representing the fluid region. Figure  7 shows the modification of blue noise template on the left side into a representation of fluid in a surface cell with a PCIC interface and elimination function E as defined in Eq. 17,

$$\begin{aligned} E = {\left\{ \begin{array}{ll} \text {sgn} \left\{ n_xp_x+n_yp_y+n_zp_z+a \right\} :{L} \\ \text {sgn} \left\{ \Vert {p}- {x_0} \Vert - R^2 \right\} \text { sgn} \left\{ \nabla \cdot {n} \right\} :{C} \end{array}\right. } \end{aligned}$$
(17)

is used to determine whether a LPs are retained or not. LPs are eliminated if the elimination function value is negative. A limiting cell subdomain is constructed to improve the accuracy and efficiency in the calculations pertaining to advection. The subdomain is the smallest rectangle that can accommodate the fluid region. The subdomain boundary is shown by the dashed line in the Fig. 7.

Fig. 7
figure 7

Modification of the LPs template: a Initial Lagrangian particles unit square template with \(N=25\) particles per cell dimension uniformly distributed. b Region of particles from the template is scaled in to rectangle that fills fluid region with no change in the aspect ratio. The orange colored LPs represent the fluid inside PCIC reconstruction. The blue colored LPs outside the interface are removed

2.4.2 Center of mass tracking

Accuracy of an interface reconstruction is increased by tracking of the center of mass(CM) of fluid cell following the Lagrangian approach. In theory if the grid cell size is infinitesimal, this converges to pure Lagrangian method. So for control volumes, tracking CM in Lagrangian way is essentially tracking the entire fluid whole time, but with minimal number of points, one per cell. This is the one of the main idea behind the VCLP method. During an interface reconstruction CM mostly will not be match exactly due to different reasons, mainly due to the simplification of the interface into PLIC or PCIC, that too reconstructed from the mean slope and curvature that itself is an approximation. These errors make the fluid move slower or faster in the wrong direction, depending on the errors and velocity-field.

Fig. 8
figure 8

Center of mass (CM) tracking: A rectangular fluid body (A \(t_m\)) is inside a square cell of 1 m dimension with a velocity field \(u_y\)= 0.5 m/s. The ideal state of fluid body at the start (lower panel) and after one second (upper panel) is shown in A. B the numerical simulation of fluid flow for a CFL value of 0.5 without CM tracking. C the numerical simulation of fluid flow for a CFL value of 0.5 with CM tracking. Blue dot is the true CM (\({c}\)) which is tracked in the Lagrangian way, while red dot, the estimated CM (\({\tilde{c}_{m+1}}\)). The reconstructed fluid region is translated to match the true CM shown by the arrow

At a given time step, there are two CMs for a cell, the tracked CM denoted as \({c}\), and the estimated CM after the reconstruction given by \({\tilde{c}}(i,j,k,m)\). The LPs representing the fluid inside the cell before the CM correction is given by \({\tilde{\Lambda }}(i,j,k,m)\). The XY, and Z coordinates of LPs are \(\tilde{\Lambda }_x(i,j,k,m)\), \(\tilde{\Lambda }_y(i,j,k,m)\), and \(\tilde{\Lambda }_z(i,j,k,m)\). The LPs after CM correction is denoted by \({\Lambda }\). Estimated CM location (\({\tilde{c}}\)) is found using the Eq. 18. \({\overline{\Lambda }}\) is the average of the positions all LPs inside the cell space s(ijkm).

$$\begin{aligned} {\tilde{c}}(i,j,k,m) = {\overline{\Lambda }}(i,j,k,m) \end{aligned}$$
(18)

Once \({\tilde{c}}\) is known, the positions of the LPs representing the fluid are corrected using the following Eq. 19.

$$\begin{aligned} \boxed { {\Lambda } = {\tilde{\Lambda }}+ {c} - {\tilde{c}}} \end{aligned}$$
(19)

When the fluid inside the cell is represented by LPs, each LP would represent a fraction of the total mass of that fluid within the cell. That mass denoted by \(m_p\) is estimated using Eq. 20, where \(N_{{\Lambda }(i,j,k,m)}\) is the number of LPs in \({\Lambda }(i,j,k,m)\).

$$\begin{aligned} m_p(i,j,k,m) = \rho \dfrac{|s(i,j,k,m) |f(i,j,k,m)}{N_{{\Lambda }(i,j,k,m)}} \end{aligned}$$
(20)

2.5 Fluid advection

VCLP have two choices numerical advection schemes to advect the LPs representing fluid; Taylor’s second-order numerical advection scheme and a new proposed scheme named Tracking Journey in Spiral (TJSM) method. Taylor’s second order method is given by Eq. 21,

$$\begin{aligned} {p}_{m+1}= {p}_m+ {u}({p}_m,t_m)\Delta t_m + \frac{1}{2} {a}({p}_m,t_m)\Delta t_m^2 \end{aligned}$$
(21)

but note that the acceleration field in this equation is not available from solver. This equation considers a single LP whose position at time step \(t_m\) is denoted by \({p}_m = p_x(m) \hat{i}+p_y(m) \hat{j}+p_z(m) \hat{k} \). The velocity and acceleration is denoted by \({u}({p}_m,t_m)\) and \({a}({p}_m,t_m)\), respectively with time step \(\Delta t_m=t_{m+1}-t_m\).

2.5.1 TJSM advection scheme

TJSM integrates the equation of motion like others, while trying to capture rotational effects inside a velocity field more effectively. Instead of a linear motion, TJSM assumes that the particle undergoes a circular motion with a constant angular velocity during the time step intervals. In the higher-order TJSM, thus particle could move following a spiral path, hence the name. The developed TJSM advection scheme is given by Eq. 22,

$$\begin{aligned} \begin{aligned} {p}_{m+1} = {p}_{m}+ \dfrac{ \left\{ \left( {\beta } \times {u}_m \right) (1-\cos {\theta _m}) - {u}_{m} \Vert {\beta } \Vert \sin {\theta _m} \right\} \Vert {u}_m \Vert ^2 }{\Vert {\beta } \Vert ^2} \end{aligned} \end{aligned}$$
(22)

where \({\beta }= {u}_m \times {a}_m\) and \(\theta _m\) given by Eq. 23.

$$\begin{aligned} {\theta }_m = \Vert {\omega }_m \Vert \Delta t_m = \dfrac{ \Delta t_m \Vert {u}_m \times {a}_m \Vert ^5 }{\Vert {u}_m \Vert ^2 \Vert {\beta } \times {u}_m \Vert ^2} \end{aligned}$$
(23)

If \({u}_m = 0\), or \( {u}_m \times {a}_m = 0\), then Taylor’s second order advection method is to be used to advect LPs. The performance is tested using the deformation benchmark test for the interface tracking in 2D and 3D. As the advection scheme alone is tested, LPs are moved in purely Lagrangian way. The derivation of TJSM scheme in 3D and test results are provided in the appendix.

2.5.2 Acceleration field for advection

For second-order advection methods described in Eqs. 21 and 22, velocity and acceleration terms are required to advect the particle. Figure 9 shows a LP at position \((p_x,p_y,p_z)\) within the cell.

Fig. 9
figure 9

Trilinear interpolation with partial volumes as weights to interpolate advection velocity for a LP at \((p_x,p_y,p_z)\) using known velocities at the vertices

Velocities at the eight vertices are \(u_1\) to \(u_8\). \(V_1\) to \(V_8\) are the eight weight factors (proportional to the volumes of the blocks) used in the trilinear interpolation. The velocity at position \({p}\) is thus determined using Eq. 24.

$$\begin{aligned} {u}({p})&= \dfrac{1}{\sum _{k=1}^{k=8} V_k } ( V_1{u}_7 + V_4{u}_6 + V_5{u}_3 + V_8{u}_2 \nonumber \\&\quad +V_2{u}_8+ V_3{u}_5 +V_6{u}_4 +V_7{u}_1 ) \end{aligned}$$
(24)

The acceleration of a particle in the compact Eulerian form is written in Eq. 25.

$$\begin{aligned} {a} = \dfrac{\partial {u}}{dt}+ ({u} \cdot \nabla ){u} \end{aligned}$$
(25)

The partial derivative terms of \(u_a\), \(\dfrac{\partial u_a}{ \partial x}\), \(\dfrac{\partial u_a}{ \partial y}\), and \(\dfrac{\partial u_a}{ \partial z}\) in Eq. 25 are estimated using Eq. 26 to Eq. 28 where a takes xy and z depending on the component axis.

$$\begin{aligned} -\dfrac{\partial u_a}{ \partial x}= & {} \dfrac{u_{a1,2} }{ \delta x_i}+ \dfrac{p'_yE_{1a}}{ \delta x_i \delta y_j}+\dfrac{p'_zE_{2a}}{ \delta x_i \delta z_k}+\dfrac{ p'_yp'_zE_{0a}}{\delta x_i \delta y_j \delta z_k} \end{aligned}$$
(26)
$$\begin{aligned} -\dfrac{\partial u_a}{ \partial y}= & {} \dfrac{u_{a1,4} }{ \delta y_j}+ \dfrac{p'_xE_{1a}}{\delta x_i\delta y_j}+\dfrac{p'_yE_{3a}}{\delta y_j \delta z_k}+\dfrac{ p'_zp'_xE_{0a}}{\delta x_i \delta y_j \delta z_k} \end{aligned}$$
(27)
$$\begin{aligned} -\dfrac{\partial u_a}{ \partial z}= & {} \dfrac{u_{a1,5} }{\delta z_k}+ \dfrac{p'_xE_{2a}}{\delta x_i \delta z_k}+\dfrac{p'_yE_{3a}}{\delta y_j \delta z_k}+\dfrac{ p'_yp'_xE_{0a}}{\delta x_i \delta y_j \delta z_k} \end{aligned}$$
(28)

The terms \(E_0a\) to \(E_3a\) seen in the above equations are calculated using the set of Eqs. 29 given below.

$$\begin{aligned} \begin{aligned} E_{0a}&= (u_{a1}-u_{a2}+u_{a3}-u_{a4} \\&\quad -u_{a5}+u_{a6}-u_{a7}+u_{a8})\\ E_{1a}&= (-u_{a1}+u_{a2}-u_{a3}+u_{a4} )\\ E_{2a}&= (-u_{a1}+u_{a2}+u_{a5}-u_{a6}) \\ E_{3a}&= (-u_{a1}+u_{a4}+u_{a5}-u_{a8}) \\ u_{ab,c}&= u_{ab}-u_{ac}\\ p'_x&= p_x-x_i\\ p'_y&= p_y-y_j\\ p'_z&= p_z-z_k\\ \end{aligned} \end{aligned}$$
(29)

Finally the partial derivative of acceleration with respect to time (Eq. 25), is determined by Eq. 30,

$$\begin{aligned} \dfrac{\partial {a}}{\partial t_m}=\dfrac{{u}_m-{u}_{m-1}}{t_m-t_{m-1}} \end{aligned}$$
(30)

Term \(\left( \dfrac{\partial {a}}{\partial t}\right) \) requires the velocities from the previous time step. Having obtained all terms described in the Eqs. 25, the approximate acceleration for all LPs are obtained. Thus, LPs are advected by either the Taylor’s second order (Eq. 21) or the TJSM (Eq. 22) numerical advection schemes.

2.6 Updating mass and center of mass

After advection the next step is The updating of f value and the CM. An new copy of the computational domain \({\Omega }\) is created to receive the fluid mass advected, denoted by \({\Omega ^*_m}\). This new domain receives the advected LPs from cell-by cell and new values for the fluid mass and CM keeps updating. ‘*’ denotes that the functions and parameters belongs to \({\Omega ^*}\). After advection of all the fluid in the cells, this updated domain copy, \({\Omega ^*_m}\) becomes the next time step value, \({\Omega _{m+1}}\). A typical interface before and after advection along with the LPs are shown on the left and right panels, respectively. Transferred mass and transferred CM from three neighbor cells into the surface cell in the middle are shown on right panel of Fig. 10, along with the final CM location and the f value (right panel).

Fig. 10
figure 10

Mass transfer and CM Update: Left: LPs representing the fluid before advection. f- value and center of mass is shown for the surface cell(middle cell). Right: advected LPs from the middle and neighbor cells into the middle cell (orange color) and their transferred CMs. The updated f- value and CM is also shown. Note that cells are advected one by one and this figure is an combined representation of the process

If a cell space receives n LPs from a cell with mass per point \(m_p\) as indicated in Eq. (20), then the updated f value is estimated by Eq. (31) as

$$\begin{aligned} f_{up}^*(i,j)= f^*(i,j)+\dfrac{nm_p}{\rho \delta x_i \delta y_j } \end{aligned}$$
(31)

Finally, Eq. 32 provides the updated CM, where (\({c}_{tr}\)) is the transferred CM.

$$\begin{aligned} \begin{aligned} {c}_{up}^*= \dfrac{{c}_e^* f^* \delta x_i \delta y_j \rho + {c}_{tr}nm_p}{nm_p+ \delta x_i \delta y_j \rho } \end{aligned} \end{aligned}$$
(32)

2.6.1 Filters and optimization

When the velocity field is interpolated to advect LPs the divergence of the interpolated velocity field at certain location become non-zero. Hence, it can be said the f value larger than one at times is the result of the non-zero divergence resulting from the necessity to interpolate the discretized velocity field. As this is unavoidable, a filter is used for cells having \(f>1\) and takes the excess and redistributes mass to non-empty neighboring cells uniformly. VCLP method proposes an optimization technique named skip core optimization (SCO) to increase computational efficiency. This technique allows us to skip the computation for a portion of cells which are far (three times CFL distance) from the interface. SCO can be understood as follows. Cells are classified before advection in to empty (E), surface (S), and interior cells (\(N_1, N_2, N_3\)) based on q as explained in Sect. 2.1. This classification ensures cells always appear in the order \(E,S,N_1,N_2,N3\) and during advection cell of one class can interact only with the neighboring ones as restricted by CFL number. if we denote \(A_{i,j}\) as mass of fluid advected from cells of class i to class j, then the Table 2 is obtained.

Table 2 Fluid mass before and after advection

So, if we use SCO, some of \(N_3\) cells will have \(f>1\) and the additional mass will be exactly \(A_{N_3N_2}\). Also, some of \(N_2\) cells will have \(f<1\) and the deficiency would be exactly \(A_{N_3N_2}\). Now, because of CFL number based classification, an \(N_3\) cell can only become \(N_2\) and \(N_2\) can become either \(N_1\) or \(N_3\). In all of these scenarios f will be equal to one and this shows that we can skip advection in \(N_3\) cells and by setting \(f=1\) for \(N_3\) cells with \(f>1\) and \(N_2\) with \(f<1\) after advection and by skipping CM update in \(N_3\) and \(N_2\) cells. The application of filters is the final step of VCLP producing the final outputs the new f value matrix (\({f_{m+1}}\)) and the new CM matrices (\({c_{m+1}}\)).

3 Benchmark tests

To evaluate the accuracy of VCLP method for interface reconstruction and advection, three benchmark tests in 2D and one in 3D from literature are conducted. The tests in 2D are translation, single vortex, and Zalesak’s test while in 3D deformation test is done. In each of these tests, a well defined 2D fluid body inside a computational domain with specified grid resolution and dimensions is allowed to flow according to a specified solenoidal (non-divergent) velocity field. The flow is then simulated till the given time T, using the proposed method with the specified time intervals. The ideal final state of the fluid body at time T is known and the performance of the proposed method is evaluated on the basis of its qualitative and quantitative similarity with the simulation result. In the following sections, VCLP with PLIC is written as ‘VCLP-’ and with PCIC as ‘VCLP+.’ ’VCLP+’ with Skip Core Optimization is given as ’VCLP+ SC’ and ’VCLP+’ while using Eq. 21 for advection it is shown as ’VCLP+ T2’. Advection using TJSM is denoted as ‘TJ’.

3.1 Translation test

For translation tests, a circular and a square fluid body are placed inside two different velocity fields. The fluid bodies are transported in 1000 time steps over a distance approximately five times the diameter of the fluid. The number of grid cells along the diameter or the size of the fluid body is equal to 15. The test results are shown in Fig. 11.

Fig. 11
figure 11

Translation of a circle (rows A and C) and a square (rows B and D) in two different velocity fields \({u}= \hat{j}\) ( rows A and B) and \({u}= 2 \hat{i}+ \hat{j}\) ( rows C and D). a Initial condition, b Hirt and Nichols without local height function, c Hirt and Nichols with local height function, d Young’s without local height function, e Young’s with local height function, f VCLP- with PLIC and g VCLP+ with PCIC Note: Results from column (b) to (e) are obtained from [29]

3.2 Single vortex

The single vortex test for evaluating the accuracy of a surface tracking and advection method was proposed by Rider and Kothe [31] and the solenoidal flow velocity field was suggested by Bell et al. [32]. For this test, a circular fluid body of radius 0.15 m, centered at (0.5,0.75) is placed inside a time reversing solenoidal velocity field given by 33

$$\begin{aligned} \begin{aligned} u_x=&-sin^{2}(\pi x) \sin (2\pi y) \cos \left( \dfrac{\pi t}{T} \right) \\ u_y=&sin^{2}(\pi y) \sin (2\pi x) \cos \left( \dfrac{\pi t}{T} \right) \end{aligned} \end{aligned}$$
(33)

where the T is the time period of the single vortex and t is the time. In an ideal case, the initial circular fluid body in a solenoidal velocity field gets stretched into a filament spiraling around the vortex center till time \(t=\frac{T}{2}\), and gets back into the initial circular shape at \(t=T\). Similarity of the final state to the initial state is the measure of accuracy for the surface tracking and advection method. Figure 12 depicts the single vortex test results of the VCLP methods along with that of H &N and Young’s methods.

Fig. 12
figure 12

Single vortex test result: Advection of a circular body of fluid placed in a single-vortex field. The maximum simulation time is equal to \(T = 8\) except for rows A and B, where \(T = 2\). Snapshot are shown at time T/2 (rows A, C, and E) and at time T (rows B, D, and F). The computational grid consists of 60 \(\times \) 60 cells (rows A,B,C and D) or \(100 \times 100\) cells (rows E and F). a Fluid body at time t = 0 or initial state, b Hirt and Nichols results without local height function, c Hirt and Nichols with local height function, d Young’s without local height function, and e Young’s with local height function, f VCLP with PLIC and g VCLP with PCIC. Note: Results from column (a) to (e) are obtained from [29]

Single vortex tests area also conducted for CFL = 0.5 and \(T=8\) s with two grid resolutions of \(64 \times 64\) and \(128 \times 128\) to compare VCLP results with two newer methods, moment of fluid (MOF) and coupled level set volume of fluid (CLSVOF). Figure 13 shows the test results at time \(t=T\) for the grid resolution of \(64 \times 64\) where the circle drawn in black color is the ideal case, whereas the dashed red lines are the test results. Single vortex test results a and b are obtained from [33].

3.2.1 Quantitative analysis of single vortex tests

Geometric error is used to quantify advection tests’ accuracy by comparing the initial and final fluid distribution or the f-matrix. The f-matrix error is integrated over the computational domain, to account for the error in geometry of the fluid body. Geometric error in 2D is estimated using the Eq. 34,

$$\begin{aligned} E_{geo} = \sum _{i=1}^{i=n_x} \sum _{j=1}^{j=n_y} |f(i,j,T)-f(i,j,0) |~ dx_idy_j \end{aligned}$$
(34)

where \(t=T\) is final time. Table 3 shows the single vortex test results of VCLP and five other surface tracking and advection methods. The tests are conducted for three grid resolutions: \(32\times 32\), \(64 \times 64\) and \(128 \times 128\).

Fig. 13
figure 13

Time reversed single vortex test results for grid resolution \(64 \times 64\) and CFL = 0.5 for \(T=8\) s. Results at \(t=T=8\) s for a Moment of Fluid (MOF) and b Coupled Level Set Volume of Fluid (CLSVOF) c VCLP- and d VCLP+. Results a and b are obtained from [33]

Table 3 Geometric errors \(E_{geo}\) for single vortex time reversible tests with time period \(T=8\) s (lower panel)

Single vortex tests for time periods \(T=2,~4\) and 6 are conducted for a grid resolution of \(64 \times 64\) and CFL\(=1\) to compare with results from five other methods, obtained from [31]. The test results are presented in Table 4.

Table 4 Geometric errors \(E_{geo}\) for single vortex time reversible tests with a grid resolution of \(64\times 64\) and CFL = 1

VCLP results are compared with newer methods such as MOF and CLSVOF in Table 5 which gives the geometric errors for the single vortex tests for the three grid resolutions, \(32 \times 32\), \(64 \times 64\) and \(128 \times 128\) with CFL=0.5.

Table 5 Geometric errors \(E_{geo}\) for single vortex time reversible tests with CFL = 0.5 and \(T=8\) s

The relative mass losses (RML) found out using Eq. 35,

$$\begin{aligned} \textit{RML} = \dfrac{\sum A(i,j,0) -\sum A(i,j,T)}{\sum A(i,j,0)} \end{aligned}$$
(35)

where \(A(i,j,T)=f(i,j,T)\delta _{x_i}\delta _{y_j}\) and \(\sum \) denotes summation of all cells during the single vortex tests using VCLP are of the order \(10^{-15}\), with nearly perfect mass conservation. In contrast, the relative mass loss using CLSVOF method are \(1.42 \times 10^{-5}\) by Zhao et al. [35], \(4.0 \times 10^{-4}\) by Wang et al. [36], and \(1 \times 10^{-4}\) Menard et al. [37].

In conclusion, according to the single vortex test results, VCLP method have lesser geometric and relative position error along with negligible mass loss.

3.3 Zalesak’s disk test

Zalesak’s test problem (Zalesak et al. [38]) is a modified version of the rigid body rotation test where a circular fluid body a slotted disk (Zalesak’s disk ) is used. The slotted disk centered at (0.5, 0.75) have a radius r = 0.15 m. The slot in the disk is defined such that it satisfies the relations, \(\left| x - 0.5\right| \le 0.025\) and \(y \le 0.85\). The slotted fluid is placed inside the velocity field for rigid body rotation given by Eqs. 36.

$$\begin{aligned} \begin{aligned} u_x&= -2\pi (y-0.5) \\ u_y&= \, \, 2\pi (x-0.5) \end{aligned} \end{aligned}$$
(36)

The slotted disk undergoes a rigid body rotation of \(2\pi \) radian (one complete circle) during 628 time-steps. Figure 14 compare the results for \(100 \times 100\) resolution with the work of Scardovelli et al. [28] using ELVIRA reconstruction method and its variations.

Fig. 14
figure 14

Comparison of Zalesak’s rigid body rotation test results for \(100 \times 100\) resolution obtained from [28] with VCLP result. a ELVIRA reconstruction (solid line) and the linear best fit (dashed line) b with the quadratic fit alone (solid line) and with the continuity algorithm (dashed line) c VCLP. Dotted line is the ideal result

3.3.1 Quantitative analysis of Zalesak’s disk tests

Table 6 gives the relative error of Zalesak’s disk test results for the \(200 \times 200\) grid resolution. The relative errors of 10 other methods are presented from literature. VCLP methods have the least error, even lesser than purely Lagrangian methods. TJSM advection scheme have slightly lesser error than Taylor’s second-order scheme. PCIC reconstruction performs better than PLIC with lesser error. So, overall VCLP methods performs very well in the Zalesak’s disk test.

Table 6 Relative error for Zalesak’s disk rigid body rotation test for resolution of \(200 \times 200 \)

3.4 3D deformation test

In the 3D deformation test a spherical fluid body centered at (0.35, 0.35, 0.35) with a radius of 0.15 m is placed inside a time reversing solenoidal velocity field with vortices. Equations 37 gives the velocity field for the deformation test proposed by LeVeque [42].

$$\begin{aligned} \begin{aligned} u_x=2 \sin ^2(\pi x)\sin (2 \pi y)\sin (2 \pi z) \cos (\pi t/T)\\ u_y=- \sin ( 2 \pi x)\sin ^2(\pi y)\sin (2 \pi z) \cos (\pi t/T)\\ u_z=- \sin (2 \pi x)\sin (2 \pi y)\sin ^2( \pi z) \cos (\pi t/T) \end{aligned} \end{aligned}$$
(37)

This test use 20 LPs per dimension for two grid resolutions, \(32^3\) and \(64^3\) cells. Figure 15 displays the result for resolution \(64^3\). The spherical fluid body on the left panel is the initial state, the middle panel is the maximum stretched shape at \(t=T=1.5~\)s. The final result at \(t=T=3~\)s, is the right panel. Table 7 provides the geometric error comparison with Moment of fluid method (MOF) [43] and CLSVOF [44] obtained from [33].

Fig. 15
figure 15

3D Deformation test results of VCLP with \(T=3~\)s and CFL = 0.5 for a grid resolution of \(64 \times 64 \times 64\). Left panel: initial state at \(t=0\), middle panel: maximum deformed state at \(t=\frac{T}{2}=1.5\) s, Right panel: final results for \(t=T=3~\)s

Table 7 Geometric errors \(E_{geo}\) and order of convergence for 3D deformation tests with CFL = 0.5 and \(T=3~\)s. MOF and CLSVOF test results are obtained from [33]

3.5 Computational performance of VCLP

A parametric study was conducted for LPs per dimension distributed as blue noise to evaluate the optimum number of LPs. The single vortex test with resolution of \(64 \times 64 \) and \(T = 8\) s was chosen for the study. Absolute errors and relative computational times were obtained as indicated in Fig. 16. The total computational time for time-steps is normalized with the case using 89 LPs.

Fig. 16
figure 16

Geometric error and relative computational time for VCLP-PCIC with skip core optimization with respect to number of Lagrangian particles for the single Vortex test with \(T = 8\) s in a \(64 \times 64\) grid

The following Table 8 compares the computational time and accuracy for the single vortex test. The resolution of the VCLP tests is \(60 \times 60 \) and are conducted for 10 and 33 LPs per dimension. In the Table 8, non-advective means the advection is entirely skipped from calculation to account for the computational time all methods have in common.

Table 8 Computational time and error compared of VCLP method compared with original VOF method for Single Vortex T= 8, \(\delta x = \delta y =1/60\) with the circle

The computational performance study of the VCLP method for the single 2D vortex test for resolution of \(60 \times 60 \) shows that the VCLP method with 10 LPs, Taylor 2\(^{nd}\) order advection, and CM tracking takes 19 % more time than SOLA-VOF, but the error reduced by 1289 %. The CM tracking seems to reduce the error from 2.68 to 6 times with less than five percent more of computational time. For a resolution of \(120 \times 120 \), SOLA-VOF takes 105.5 s with an error of 0.07924, which is 629 % more computational time and 1200 % times more error than VCLP with 10 LPs per dimension. This supports the claim that using VCLP at lower resolution obtains better results than SOLA-VOF with lesser computational time. Overall, from the computational performance analysis in 2D, the VCLP method shows considerable improvement with a slightly more computational time.

4 VCLP application

A validated CFD code, TSUNAMI2D by Horrillo [45] with the VCLP advection module is used to simulate the breaking wave problem from literature. Additional information on the TSUNAM2D model can be found in [45].

4.1 Breaking wave problem

The breaking wave is a challenging transient multiphase problem to numerically simulate and solve for converging breaker jet free surfaces. Grilli et al. [46] have numerically modeled shoaling and breaking of 2D solitary waves generated by a moving lateral boundary and traveling over a plane slope. This experiment is replicated using TSUNAMI2D-VCLP, where a solitary wave of height \(H_0=0.45~\)m in a 1 m deep wave tank shoals and breaks over a slope of 1:15.

The movement of the piston wavemaker to generate the solitary waves is defined by Eq. 38,

$$\begin{aligned} x_p(t) = \dfrac{H_0}{\kappa } \left[ \tanh {\dfrac{\kappa }{h_0}(ct-x_p(t)-\lambda }+\tanh {\dfrac{\kappa \lambda }{h_0}}) \right] \end{aligned}$$
(38)

where \(\kappa = \dfrac{1}{2}\sqrt{3H_{0}^{'}}\) Here \(H_0\) is the solitary wave height in constant depth \(h_0\), and c is the celerity of the solitary wave. The motion of the piston wavemaker corresponds to a wave profile that is cut at \(\lambda \) distance on both sides of the wave crest. More detailed information about the piston wavemaker can be found in [46]. The TSUNAMI2D-VCLP results till the breaking point is compared with the FNFP-BEM results by Grilli et al. [46] obtained from [47] and are given in Fig. 17. The dotted line is FNFP-BEM, while the solid line represents the TSUNAMI2D-VCLP results. The solitary wave at locations ‘a’ to ‘f’ matches well in terms of height position and shape.

Fig. 17
figure 17

Comparison of the evolution of a solitary wave model using TSUNAMI2D-VCLP and FNPF-BEM model by Grilli et al. [46] with Ho/ ho = 0.45, over a slope of 1:15. The solid lines are FNPF-BEM model results and dotted lines are TSUNAMI2D-VCLP

5 Conclusion

A surface tracking and advection method for incompressible and immiscible fluid flows, named VCLP is proposed. Mathematical description of VCLP method is provided in detail and the accuracy of the VCLP method for interface reconstruction and advection is evaluated based on benchmark tests such as translation, single vortex, and Zalesak’s disk test in 2D and deformation test in 3D. The benchmark test results show that VCLP performs qualitatively well compared to conventional methods such as Hirt and Nichols (H &N), Young’s, and newer methods such as the moment of fluid (MoF) and Coupled Level Set Volume of Fluid methods (CLSVOF). Later, the quantitative error comparisons support this observation. From the 2D single vortex field test results, VCLP has lesser geometric error than H &N, Young’s, \(1^{st}\) order upwind, PPM, Level sets, SLIC, and PLIC. Quantitative results of the Zalesak’s disk test and deformation tests using VCLP also show less or similar error than the other presented methods. From the Zalesak’s test result for grid resolution of \(200 \times 200\), VCLP errors are smaller than successful methods from literature such as Youngs, Puckett, ELVIRA, gVoFoam, interFoam, OpenFoam, Quadratic fit, and Quadratic fit with continuity. For deformation and Zalesak’s disk tests, newly proposed TJSM advection scheme performs better than Taylor’s second order advection scheme. Also, VCLP-PCIC have lesser error than VCLP-PLIC for Zalesak’s disk tests. This suggests that the proposed advection scheme TJSM and the new reconstruction method, PCIC are successful.

The challenging breaking wave problem was simulated using TSUNAMI2D-VCLP and results were compared with the FNFP-BEM and the results are very comparable. Thus, the applications of the VCLP method in the TSUNAMI2D solver shows overall satisfactory results.