Abstract
A novel surface tracking, and advection algorithm for incompressible fluid flows in two and three dimensions is presented. This method based on the volume-of-fluid (VOF) method, is named VOF-with-center-of-mass-and-Lagrangian-particles (VCLP), and it uses spatially and temporally localized Lagrangian particles (LPs) inside a finite volume framework. The fluid surface is recaptured and reconstructed piecewise using the mean slope and curvature. The fluid mass inside each cell is discretized spatially by LPs and distributed as blue noise. LPs are then advected cell by cell with a choice of two different advection schemes in time using interpolated velocity and approximated acceleration fields. VCLP continuously tracks the center of mass of the fluid parcels in the Lagrangian way and this helps to reduce the errors due to numerical acceleration that results from lack of information to reconstruct the interface accurately. VCLP’s performance is evaluated using standard benchmark tests in 2D and 3D such as translation, single vortex, deformation, and Zalesak’s tests from the literature. VCLP is applied to TSUNAMI2D, a 2D Navier–Stokes model to simulate shoaling and breaking of waves.
Graphical abstract
Similar content being viewed by others
Avoid common mistakes on your manuscript.
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 X, Y, Z 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(i, j, k, m) 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(i, j, k, m) 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.
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.
Entering time step \(t_m\)
-
2.
Receives velocity field, fluid distribution (f), and center of mass locations from the solver.
-
3.
Classification of all cells in to five; Empty, Surface, Inner I, Inner II, Inner III.
-
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.
Create an empty copy of the domain for time step \(t_{m+1}\) (empty f matrix and center of mass locations)
-
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.
Once advection of all cells are completed, filters are applied and steps required for skip core optimization is carried out.
-
8.
The domain for \(t_{m+1}\) is complete with new fluid distribution and center of mass location
-
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.
-
1.
\(C_T^* = \lfloor f(i,j,k,m) \rfloor \)
-
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.
\(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.
\( 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.
\(C_T^* = {\left\{ \begin{array}{ll} 3 &{} \text {where } C_{T2} = 2(2q+1)^3 \\ C_T^* &{} \text {otherwise} \end{array}\right. }\)
-
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.
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,
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,
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.
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,
but since F is discretized into f, numerically its approximate value (X component) is obtained using Eq. 5.
where,
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. 6–12. 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 .
Then, Eq. 8 is used to estimate the two slopes parameters \(H_x\) and \(H_y\) which are non-dimensional.
Equation 9 estimates two non-dimensional parameters which are independent of the cell dimensions.
The magnitudes of these two parameters \(F_x\) and \(F_y\) are used to estimate another parameter \(\alpha \) as in Eq. 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.
Finally, the components on the interface normal are estimated using Eq. 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,
where \(R_m\) is the mean radius of curvature and \(r_k\) is the neighbor radius.
Neighbor radius \(r_k\) is found using Eq. 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.
The three components of \(\nabla \cdot {n}\) are found using set of Eq. 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.
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”.
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.
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,
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.
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.
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 X, Y, 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(i, j, k, m).
Once \({\tilde{c}}\) is known, the positions of the LPs representing the fluid are corrected using the following Eq. 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)\).
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,
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,
where \({\beta }= {u}_m \times {a}_m\) and \(\theta _m\) given by Eq. 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.
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.
The acceleration of a particle in the compact Eulerian form is written in Eq. 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 x, y and z depending on the component axis.
The terms \(E_0a\) to \(E_3a\) seen in the above equations are calculated using the set of Eqs. 29 given below.
Finally the partial derivative of acceleration with respect to time (Eq. 25), is determined by Eq. 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).
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
Finally, Eq. 32 provides the updated CM, where (\({c}_{tr}\)) is the transferred CM.
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.
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.
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
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.
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,
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\).
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.
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.
The relative mass losses (RML) found out using Eq. 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.
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.
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.
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].
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].
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.
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.
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,
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.
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.
References
Harlow, F.H.: Mac numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. Phys. Fluid 8, 12 (1965)
Peskin, C.S.: Numerical analysis of blood flow in the heart. J. Comput. Phys. 25(3), 220–252 (1977)
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. 169(2), 708–759 (2001)
Hirt, C., Amsden, A., Cook, J.: An arbitrary Lagrangian–Eulerian computing method for all flow speeds. J. Comput. Phys. 135(2), 203–216 (1997)
Baiges, J., Codina, R., Pont, A., Castillo, E.: An adaptive fixed-mesh ale method for free surface flows. Comput. Methods Appl. Mech. Eng. 313, 159–188 (2017)
Nithiarasu, P.: An arbitrary Lagrangian Eulerian (ALE) formulation for free surface flows using the characteristic-based split (CBS) scheme. Int. J. Numer. Meth. Fluids 48(12), 1415–1428 (2005)
Marchandise, E., Remacle, J.-F., Chevaugeon, N.: A quadrature-free discontinuous Galerkin method for the level set equation. J. Comput. Phys. 212(1), 338–357 (2006)
Harlow, F.H.: The particle-in-cell computing method for fluid dynamics. Methods Comput. Phys. 3, 319–343 (1964)
Snider, D.: An incompressible three-dimensional multiphase particle-in-cell model for dense particle flows. J. Comput. Phys. 170(2), 523–549 (2001)
Schroeder, C., Zheng, W., Fedkiw, R.: Semi-implicit surface tension formulation with a Lagrangian surface mesh on an Eulerian simulation grid. J. Comput. Phys. 231(4), 2092–2115 (2012)
Wang, L., Khayyer, A., Gotoh, H., Jiang, Q., Zhang, C.: Enhancement of pressure calculation in projection-based particle methods by incorporation of background mesh scheme. Appl. Ocean Res. 86, 320–339 (2019)
Dyadechko, V., Shashkov, M.: Reconstruction of multi-material interfaces from moment data. J. Comput. Phys. 227(11), 5361–5384 (2008)
Wenzel, E., Garrick, S.: A point-mass particle method for the simulation of immiscible multiphase flows on an Eulerian grid. J. Comput. Phys. 397, 108835 (2019)
Kothe, D.B.: Perspective on eulerian finite volume methods for incompressible interfacial flows. In: Free Surface Flows, pp. 267–331. Springer (1998)
Kothe, D., Rider, W., Mosso, S., Brock, J., Hochstein, J.: Volume tracking of interfaces having surface tension in two and three dimensions. In: 34th Aerospace Sciences Meeting and Exhibit, p. 859 (1996)
Rudman, M.: A volume-tracking method for incompressible multifluid flows with large density variations. Int. J. Numer. Meth. Fluids 28(2), 357–378 (1998)
Scardovelli, R., Zaleski, S.: Direct numerical simulation of free-surface and interfacial flow. Annu. Rev. Fluid Mech. 31(1), 567–603 (1999)
Aulisa, E., Manservisi, S., Scardovelli, R., Zaleski, S.: A geometrical area-preserving volume-of-fluid advection method. J. Comput. Phys. 192(1), 355–364 (2003)
Hirt, C.W., Nichols, B.D.: Volume of fluid (VOF) method for the dynamics of free boundaries. J. Comput. Phys. 39(1), 201–225 (1981)
Rider, W.J., Kothe, D.B.: Reconstructing volume tracking. J. Comput. Phys. 141(2), 112–152 (1998)
Nichols, B., Hirt, C., Hotchkiss, R.: Sola-vof: A solution algorithm for transient fluid flow with multiple free boundaries. Technical report, Los Alamos National Lab.(LANL), Los Alamos, NM (United States) (1980)
Torrey, M.D., Cloutman, L.D., Mjolsness, R.C., Hirt, C.: Nasa-vof2d: a computer program for incompressible flows with free surfaces. NASA STI/Recon Technical Report N 86 (1985)
Elliot, S.: Fluid flow aspects of solidification modeling: Simulation of low pressure die casting. PhD thesis, Ph. D. Thesis, Department of Mining & Metallurgical Engineering, University (1999)
Harvie, D.J., Fletcher, D.F.: A new volume of fluid advection algorithm: the defined donating region scheme. Int. J. Numer. Meth. Fluids 35(2), 151–172 (2001)
Harvie, D.J., Fletcher, D.F.: A new volume of fluid advection algorithm: the stream scheme. J. Comput. Phys. 162(1), 1–32 (2000)
Gueyffier, D., Li, J., Nadim, A., Scardovelli, R., Zaleski, S.: Volume-of-fluid interface tracking with smoothed surface stress methods for three-dimensional flows. J. Comput. Phys. 152(2), 423–456 (1999)
Scardovelli, R., Zaleski, S.: Analytical relations connecting linear interfaces and volume fractions in rectangular grids. J. Comput. Phys. 164(1), 228–237 (2000)
Scardovelli, R., Zaleski, S.: Interface reconstruction with least-square fit and split Eulerian–Lagrangian advection. Int. J. Numer. Meth. Fluids 41(3), 251–274 (2003)
Gerrits, J., Veldman, A.: Dynamics of liquid-filled spacecraft. J. Eng. Math. 45(1), 21–38 (2003)
Cook, R.L.: Stochastic sampling in computer graphics. ACM Trans. Gr. (TOG) 5(1), 51–72 (1986)
Rider, W., Kothe, D.: Stretching and tearing interface tracking methods. In: 12th Computational Fluid Dynamics Conference, p. 1717 (1995)
Bell, J.B., Colella, P., Glaz, H.M.: A second-order projection method for the incompressible Navier–Stokes equations. J. Comput. Phys. 85(2), 257–283 (1989)
Mukundan, A.A., Ménard, T., de Motta, J.C.B., Berlemont, A.: A 3d moment of fluid method for simulating complex turbulent multiphase flows. Comput. Fluids 198, 104364 (2020)
Pirozzoli, S., Di Giorgio, S., Iafrati, A.: On algebraic TVD–VOF methods for tracking material interfaces. Comput. Fluids 189, 73–81 (2019)
Zhao, Y., Chen, H.-C.: Violent free surface flow simulations by a coupled level-set and volume-of-fluid method in overset grid systems. Int. J. Offshore Polar Eng. 24(02), 114–121 (2014)
Wang, Z., Yang, J., Stern, F.: A new volume-of-fluid method with a constructed distance function on general structured grids. J. Comput. Phys. 231(9), 3703–3722 (2012)
Ménard, T., Tanguy, S., Berlemont, A.: Coupling level set/vof/ghost fluid methods: Validation and application to 3d simulation of the primary break-up of a liquid jet. Int. J. Multiph. Flow 33(5), 510–524 (2007)
Zalesak, S.T.: Fully multidimensional flux-corrected transport algorithms for fluids. J. Comput. Phys. 31(3), 335–362 (1979)
Garoosi, F., Mahdi, T.-F.: Presenting a novel higher-order bounded convection scheme for simulation of multiphase flows and convection heat transfer. Int. J. Heat Mass Transf. 172, 121163 (2021)
Cifani, P., Michalek, W., Priems, G., Kuerten, J.G., van der Geld, C., Geurts, B.J.: A comparison between the surface compression method and an interface reconstruction method for the vof approach. Comput. Fluids 136, 421–435 (2016)
Li, M.-J.: Interaction between free surface flow and moving bodies with a dynamic mesh and interface geometric reconstruction approach. Comput. Math. Appl. 81, 649–663 (2021)
LeVeque, R.J.: High-resolution conservative algorithms for advection in incompressible flow. SIAM J. Numer. Anal. 33(2), 627–665 (1996)
Dyadechko, V., Shashkov, M.: Moment-of-fluid interface reconstruction. Los Alamos Report LA-UR-05-7571 (2005)
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. 162(2), 301–337 (2000)
Horrillo, J.J.: Numerical method for tsunami calculation using full Navier–Stokes equations and the volume of fluid method (2006)
Grilli, S.T., Subramanya, R.: Numerical modeling of wave breaking induced by fixed or moving boundaries. Comput. Mech. 17(6), 374–391 (1996)
Lachaume, C., Biausser, B., Fraunié, P., Grilli, S.T., Guignard, S.: Modeling of breaking and post-breakingwaves on slopes by coupling of bem and vof methods. In: The Thirteenth International Offshore and Polar Engineering Conference. OnePetro (2003)
Mebius, J.E.: Derivation of the euler-rodrigues formula for three-dimensional rotations from the general formula for four-dimensional rotations. arXiv:math/0701759 (2007)
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Data availability statement
The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.
Additional information
Communicated by Shervin Bagheri.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Comparison of T-slope with other methods to find the interface normal
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. The circular domain is centered at (1,1) with a radius of 0.15 units. The grid resolution for two cases are (1) \(\delta x = 0.025\), \(\delta y = 0.025\), with aspect ratio 1:1, and (2) \(\delta x = 0.05\) and \(\delta y = 0.01\) with aspect ratio 5:1. The qualitative results are shown in Figs. 18 and 19 . The numerical gradient method interfaces are not smooth and have significant discontinuities in both cases with different aspect ratios. The minimum slope method works well with 1:1 aspect ratio, however for the larger or smaller aspect ratios it is biased and have larger errors. It can be seen that the estimated slope near the top and bottom parts of the circular fluid are more horizontal than the true slope for the aspect ratio of 5:1. The introduced T-slope method seems to resolve this issue, producing good result for both scenarios as can be seen from Fig. 19.
Sorted surface constant method
The algorithm to apply SSC method for the PLIC in 2D and 3D follows.
-
1.
Fill the surface cell uniformly with N points with a blue noise distribution.
-
2.
Calculate planar constants for all N points by simply substituting coordinates of each points in Eq. (B1).
-
3.
Sort the planar constants in ascending order and find \(fN^{th}\) planar constant.
If fN is not an integer, find weighted average of \( \lfloor fN \rfloor ^{th} \) and \( \left\{ \lfloor fN \rfloor +1 \right\} ^{th} \) planar constants. Here ‘\(\lfloor \rfloor \)’ is the floor function which gives the largest integer smaller than the next integer.
1.1 Sorted surface constant method for PCIC
The first step is to fill the cell with random points of blue noise distribution. Then all points are mapped to the PLIC normal line passing through the PLIC mid point. For a given point, (example: 1 or 2 in Fig. 5) the mapped point on the normal line is located at distance R from it. The mapped points are then sorted based on the surface-constant ‘a’ which is the signed distance from the midpoint to the mapped point to locate the interface.
Now while mapping, there are two possible location along the normal. If R is negative, the point with minimum surface constant value is chosen else the maximum. After sorting, we find the \(fN^{th}\) (surface constant), which gives the sphere’s center. Thus, the final equation of \({C}\) (Eq. 3) is achieved. There is an alternative approach for the SSC, which is SSC*. The steps for SSC* is the following.
-
1.
N uniformly distributed random points are created inside a unit square with blue noise distribution but sorted in positive y direction. Random points need to fill a larger volume or area than the cell. For example: a square or cube with a side length equal to the length of the cell’s largest diagonal.
-
2.
Rotate and orient points such that sorted direction align with the normal direction.
-
3.
Remove points outside the cell ending up with M points.
-
4.
Find \((fM)^{th}\) point’s planar constant.
If fM is not an integer, find weighted average of \( \lfloor fM \rfloor ^{th} \) and \( \left\{ \lfloor fM \rfloor +1 \right\} ^{th} \) planar constants.
Figure 20 shows PCIC reconstruction with spherical surface. Parts of PCIC surface would lie on both sides of equivalent \({L}\) as both have same f value in comparison with Fig. 4.
The computational speed of SSC is depended on the speed of sorting the array (surface constant ‘a’). This is a one step process. It does not require to solve any equations as in the analytical case, which usually gets complicated in 3D and for unstructured and curvilinear systems. SSC is flexible because speed vs. accuracy is dependent only on number of points N, which can be customized. While using large number of points, SSC* may be more efficient than SSC as sorting is required in the latter.
Blue noise template
1.1 Blue noise
Creation of blue noise template with N LPs along each dimension using the proposed method is as follows.
-
Estimate the radius r, where \(r = \dfrac{1}{\sqrt{2}N}\) in 2D and \(r = \dfrac{\sqrt{3}}{2N}\) in 3D.
-
Divide the cell equally with \(\delta x = \delta y= \dfrac{1}{N}\) creating \(N^2\) square cell division in 2D and into \(N^3\) cell divisions in 3D with \(\delta x = \delta y= \delta z = \dfrac{1}{N}\)
-
Generate 2-tuple of \(N^2\) uniformly distributed random numbers multiplied by \(\delta x\) in 2D and 3-tuple of \(N^3\) uniformly distributed random numbers multiplied by \(\delta x\) and place one LP inside each cell divisioin using the random numbers.
-
Check through all cell divisions if shortest distance between the LPs inside the neighbor cell is less than r, in which case delete the LP in the cell division (not the LP in neighbor cell).
-
Consider the cell division from which LP was deleted in the previous step. Fill those cell divisions with 30 to 100 random particle in 2D and 200 to 1000 in 3D and remove newly generated LPs that are within distance r from the neighbors. Select just a single LP from the remaining set of newly generated LPs that makes sure every cell division have one LP and shortest distance between any two LPs are larger than r.
Derivation of TJSM advection scheme and its comparison with other popular schemes in 2D and 3D
1.1 Derivation of TJSM
In a 3D domain, the position, velocity and acceleration of the particle at time step \(t_m\) within \(\Delta t_m\) are \({p}_m\), \({u}_m\), and \({a}_m\). This is written as Eq. D2.
Now impose a small time duration much smaller than the time step \(\Delta t_m\), \(\delta _t\) for which the particle is advected in a straight line. The position and velocity of the advected particle after \(\delta _t\) are given by \({p}_{m'}\) and \({u}_{m'}\) (Eq. D3). From the Taylor series expansion, their approximate values can be evaluated as shown in .
Now we assume that during \(\delta _t\) particle is undergoing a uniform circular planar motion which means then there would be a center of rotation (\({c}_r\)), a plane of rotation, a radius (r), and an angular velocity (\({\omega }\)). The center of rotation should pass through the plane which is parallel to the planes that can carry both \({u}_{m'}\) and \({u}_{m}\) and passes through the point \({p}_m\). We name this as plane P1. The \({c_r}\) would also pass through a plane with normal as \({u}_{m}\) and passing through point \({p}_m\), plane P2. Finally \({c_r}\) passes also through a plane with normal as \({u}_{m'}\) and through point \({p}_{m'}\), plane P3. The intersection of P1, P2, and P3 uniquely identify the center of rotation, \({c_r}\). The equations for the three planes are given by Eqs. D4–D6.
Substituting Eqs. D3 and D2 in Eq. D4, we get Eq. D7
Substituting Eqs. D3D5 and in Eqs. D4, D8 is obtained.
The term multiplied by \(\delta _t\) is neglected as it tends to zero. The three equations Eqs. D5, D7 and D8 where ‘’ is the Euclidean norm is solved for \({c_r}\). After simplification using identities we get Eq. D9 for \({c_r}\) .
From Eqs. D9, D10 for radius vector is obtained as indicated below.
Once radius vector and velocity vector is known, angular velocity vector \({\omega }\) can be estimated from D13, by using Eqs. D11 and D12 indicated below.
where \({\beta }= {u}_m \times {a}_m\).After simplification using identities, the angular velocity vector is obtained as
Now, the angular rotation \(\theta \) during the time step and normalized vector \({\omega }\) is given by Eq. D14 and Eq. D15
Using Rodrigues’ formula given by Eq. D16 [48], after simplification using vector identities, we get the final advected location of the particle as given by Eq. D17.
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.
1.1.1 Comparison of TJSM advection scheme with other methods
The performance of the proposed numerical advection scheme, the TJSM method is tested using one of the deformation benchmark test for the interface tracking. In this test, a circular fluid body of radius 0.15 centered at (0.5,0.75) inside a square domain of unit size with its left bottom corner at the origin (0,0). The fluid body is inside a solenoidal velocity field that deforms the circular fluid body. Deformation test induces radical deformation and topology change of fluid bodies, which is more challenging than single vortex test [20]. There are sixteen vortices in the domain, and flow fields are time-reversed. Time reversed flow field means that for half of the simulation time, the fluid body undergoes deformation and then for the next half the velocity field is time-reversed causing the circular fluid to go back to its original shape and location. For the numerical case where time is discretized, final state of the fluid body is not exactly same as the starting state. Thus the similarity of the final state to the initial state is the measure of goodness for the advection method. The stream function for this velocity field is given by Rider et al. [31] as shown in Eq. (D18).
The velocity field is given by Eq. D19.
The time-varying field have its maximum magnitude of velocity at \(t=0\) and \(t=T\) and zero at \(t=T/2\) where it reverses.
The 2D test is conducted by putting marker particles on the circle perimeter, and each particle is advected in time using several numerical advection schemes. The numerical advection schemes tested are (1) Euler’s Method, (2) Taylor \(2^{nd}\) order, (3) Taylor \(3^{rd}\) order, and (4) Runge–Kutta \(4^{th}\) order, and (5) TJSM \(2^{nd}\) order. The number of time steps is 256 for a simulation time of \(T=2\) s. The deformation test results are depicted in the Fig. 21 where marker particles bound the fluid area to improve the contrast.
The 2D deformation test results for the numerical advection schemes show that at \(t=T/2\) difference between methods are not easily noticeable except for the T-shaped tip of the top part in the Taylor’s first order method, which is shorter than other methods (see top panels of Fig. 21). At \(t=T\), the final shape is ideally the initial circle itself, however all methods show some deviations from it. Taylor’s first order have large deviation from circular shape, while other cases are closer to the initial circle. Taylor’s second and third order have an elliptical shape at the bottom and the third order have slightly closer shape to the initial circle than the second order. The Runge-Kutta fourth order have an overall circular and symmetric shape, however edges are flatter over the bottom half of fluid body and is similar to a polygon like shape. The TJSM result looks very close to the initial circle and very slight deformation can be noticed at the top and bottom part. While comparing all methods qualitatively, the closeness to the circular shape is in the order (1) TJSM second order, (2) Runge-Kutta fourth order, (3) Taylor’s third order, (4) Taylor’s second order, and (5) Taylor’s first order. So, as per the test results, the proposed advection method, TJSM performs well. The deformation test in 3D is carried out in the similar way as in 2D, where the spherical fluid body of radius 0.15 centered at (0.5,0.5,0.5) is placed inside a solenoidal time-reversing velocity field. The velocity field for this test is given by given by Eqs. D20–D22.
The simulation time of \(T=12\) s is completed in 32 time steps. Figure 22 shows the deformation test results of the fluid body. Qualitatively, the resemblance of the final results to the spherical shape are in the order (1) TJSM second order, (2) Taylor’s second order, and (3) Taylor’s first order. So, as per the test results in 3D, the proposed numerical advection scheme, TJSM seems to perform well in comparison with the two standard methods.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
C Sunny, R., Horrillo, J. & Cheng, W. VOF with center of mass and Lagrangian particles (VCLP): a surface tracking and advection method for incompressible fluids. Theor. Comput. Fluid Dyn. 36, 915–942 (2022). https://doi.org/10.1007/s00162-022-00628-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00162-022-00628-9