A method of simulation of moving interfaces using geometry-aware volume-of-Fluid method is provided. The method comprises steps for:
representing two different fluid volumes in a domain using a level set surface on a grid mesh comprising a plurality of cells;
representing an interface with a zero contour of a level set function;
modeling two phase flow dynamics of the two different fluid volumes using a viscous incompressible Navier-Stokes equations with surface tension;
updating incompressible velocity field of the domain by computing a velocity advection term in a conservative manner, performing a velocity diffusion implicitly, performing a pressure projection with surface tension, and applying a pressure difference to make an intermediate velocity incompressible;
updating the interface using the incompressible velocity field by updating a volume fraction of each cell in a conservative manner, moving the level set interface using a semi-Lagrangian method, correcting a resulting level set interface according to the volume fraction, and performing redistancing of the level set; and
displaying the updated interface of the two fluid volumes on a display,
wherein the level set values are stored in refined sub-grids,
wherein in order to correct level set values in a cell to be consistent with the volume fraction a sub-cell volume element is generated and used.
The viscous incompressible Navier-Stokes equations with surface tension may comprise
where u, ρ, μ, p, D, σ, κ, δs, n, and g stand for velocity, density, dynamic viscosity, pressure, deformation rate tensor, surface tension coefficient, curvature, Dirac delta function defined on the interface, unit normal to the interface, and gravity, respectively, T is a volume fraction, and φ is the level set, wherein 0≦T≦1.
The method may further comprising steps for:
computing the density and the dynamic viscosity using
and computing the curvature using
The grid mesh may comprise a restrictive and fully-threaded octree.
The method may further comprise a step for integrating time using a modified fractional step method (FSM) such as
where the superscript n+½ denotes a time step right after the step of updating the interface, F is a linear operator, and G is a weighted Laplace operator produced by the pressure projection,
wherein the linear systems represented by F and G are solved by using a Poisson equation solver.
The method may further comprise a step for coupling the level set and the volume fraction by a volume computation such as a Heaviside function approximation formulas.
An advection of the volume fraction may be performed by Eq. 3, which is discretized by Eq. 11,
wherein Eq. 11 is integrated by Eqs. 12 and 13 for two (2)-dimensional domain
After the advection of the volume advection an advection of the level set may be performed by a semi-Lagrangian method such as a Runge-Kutta second-order method.
In correcting the level set values in a cell to be consistent with the volume fraction all the level set values in the refined cell are changed by a constant c of Eq. 14,
wherein the constant c for a given target volume fraction T is determined by a Brent's method.
A center position of the sub-cell volume element may be determined by computing an inverse distance weighted average of level set points.
The advection of the volume fraction may further comprise a volume correction given by
Algorithm 1.
The redistancing may be performed by computing a signed distance directly from meshes extracted from the level set grid.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
These and other features, aspects and advantages of the present invention will become better understood with reference to the accompanying drawings, wherein:
a) shows an interface obtained with the level set values of the black dots without refinement.
b) shows an interface obtained with the level set values of the black dots within the current cell with refinement.
c) shows a refined point shared with neighbor cells shown in red.
a) shows a level, set volume correction cases where the level set is fitted to the volume fraction.
b) shows a volume fraction indicating that flotsam exists or a small feature is aliased in the cell and since the volume fitting may result in undesired interface, the sub-cell volume element (shown in red) is generated.
c) shows another typical case of the level set volume correction, in which the volume fitting is unnecessary.
d) shows another case of level set volume correction, in which the level set is fitted to have the same sign with the minimum distance and the dashed line is expected to be the resulting interface.
a) shows sample points for the curvature computation at the center of the shaded cell in 2D.
b) shows sample points for the curvature computation at the center of the shaded cell in 3D.
We present a new framework to simulate moving interfaces in viscous incompressible two phase flows. The goal is to achieve both conservation of the fluid volume and a detailed reconstruction of the fluid surface. To these ends, we incorporate sub-grid refinement of the level set with the volume-of-fluid method. In the context of this refined level set grid we propose the algorithms needed for the coupling of the level set and the volume-of-fluid, which include techniques for computing volume, redistancing the level set, and handling surface tension. We report the experimental results produced with the proposed method via simulations of the two phase fluid phenomena such as air-cushioning and deforming large bubbles.
Categories and Subject Descriptors (according to ACM CCS): I.3.5 [Computer Graphics]: Computational Geometry and Object Modeling Physically Based Modeling I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism-Animation
Fluid flows are attractive natural phenomena. Imagine large air bubbles entrapped in a volume of water which are stretching, breaking, and merging as they interact with the water. For a quarter of a century, many researchers in the computational science field have tried to grasp the beautiful behaviours of fluids. In the field of computer graphics, reproduction of two phase flows in which both liquid and gas media exist has been a practical challenge.
A two phase flow simulator, generally, consists of two main components: the solver of the fluid momentum as described by Navier-Stokes equations and the tracker of the fluid interface. Conservation of the physical quantities (such as the momentum and the volume) is important for both components. However, there is a trade-off; as the velocity field becomes sophisticated, it is hard to obtain the interface to conserve the volume. Given that the interface is directly related to the visualization quality, it is a seminal issue in the computer graphics community.
Eulerian and Lagrangian approaches have been applied to both components. Eulerian approaches with the fractional step method (FSM) as the momentum solver and the level set method (LSM) as the interface tracker have been a popular choice. However, with the LSM, it is known that the results tend to be diffusive. Moreover, the fluid volume is not preserved. Hybrid methods which incorporate the LSM with Lagrangian objects such as particles or explicit meshes can reduce the volume loss. However, volume conservation is not sufficiently guaranteed when using particles for scenes with small features. The local volume transfers and topology changes are still difficult to handle with methods that use explicit meshes in spite of the recent remarkable advances in this area. In terms of volume conservation, the Eulerian volume-of-fluid. (VOF) method and the Lagrangian smoothed particle hydrodynamics (SPH) method have clear advantages. Unfortunately, these methods pose the challenge of extracting smooth interfaces, which is not the case in the level set based methods.
The above discussion leads us to revisit the classical method of combining the level set and the VOF methods. In this paper, we develop a new framework to couple the level set and the VOF methods to achieve both conservation of the fluid volume and a detailed reconstruction of the fluid surface. In contrast to previous coupling methods, we use refined sub-grids to store the level set. Since the level set of the refined sub-grid is used to know the geometric situation of the given volume fraction, it can effectively handle sub-cell level details and local volume transfers. We refer to this method as the geometry-aware volume-of-fluid (GAVOF) method. The contributions of this paper can be summarized as follows: (1) The paper introduces a new framework, GAVOF, to couple the level set and the VOF methods with geometrical consistency. (2) It develops algorithms needed for the implementation of GAVOF, which include redistancing the level set and handling surface tension. (3) It shows by experiments that the proposed method does preserve both the volume and the details quite well.
The global framework of the proposed method is based on the Eulerian scheme. But Lagrangian meshes are also used in each local cell. Thus, we review both Eulerian and Lagrangian methods which are relevant to our work.
The LSM [OS88] and the VOF method [HN81] based on the FSM [Cho67, Sta99] are commonly used Eulerian methods. In the LSM, the interface is defined by the zero contour of the level set function. The discrete level set representation can lose the signed distance property as the interface evolves, thus, a redistancing procedure is needed to maintain the signed distance property [SSO94]. During the processes of surface evolution and redistancing, the volume can disappear or become aliased. To alleviate such problems, methods using a sub-cell fix [RS00] for the redistancing, using particles [EMF02, ZB05, SKK07], using adaptive grids [LGF04, HK10], and using filters [KLL*07, KSK09] have been introduced. However, those methods do not conserve the local volume to a sufficient degree in scenes with small features.
Recently, methods that are mainly focusing on the conservations have been introduced; [MMTD07] has suggested a density based interface tracking method; [LGF11, LCPF12], have presented conservative semi-Lagrangian advection methods; [CM12] has combined the previous two types of methods. Especially, the methods [LCPF12, CM12] for liquids showed very efficient results by allowing large time steps. Our work takes a different approach from them; in our work two phase flows are solved without the free surface approximation; the volume is conserved via the VOF method. Although our method depends on small time steps, realistic viscous bubbles can be achieved.
The VOF method guarantees conservation of the volume. The interface is generally reconstructed by means of the piecewise linear interface calculation (PLIC) [RK98]. However, it is not connected across the cells of the grids. Therefore, if low-resolution grids are used, it becomes difficult to capture the sub-cell features and obtain the mesh for rendering. The time restriction is also stiffer than that of the LSM. To increase the level of detail in the interface and reduce the degree of freedom of the domain, a method using an adaptive grid (Gerris) [Pop03] has been introduced. To solve the disconnected interface problem, a method combining the level set and the VOF method (CLSVOF) [SP00] and applications such as [MUM*06, KPNS10] have also been introduced. Our work carries on the ideas of Gerris and CLSVOF, but extends it to the sub-cell level.
Methods based on SPH [Mon92] as well as hybrid methods that combine the Lagrangian particles or meshes with the Eulerian grids have been increasingly introduced. Since the early works [PTB*03, MCG03] on SPH, improvements in the incompressibility [BT07, SP09], in the adaptivity [APKG07, SG11], and in the versatility [AIA*12, IAAT12, CPPK07] have been made. Along with the above improvements on the SPH itself, techniques to convert particles into a smooth interface also have been developed by [YT10, YWTY12]. Despite the recent remarkable advances, however, SPH methods are less accurate in modeling the interfacial viscosity and the surface tension of two phase flows. Space-filling particles may have to be used to solve multi-phase flows accurately.
Hybrid methods have been introduced to complement the Eulerian and Lagrangian methods. The particle level set (PLS) based methods [EMF02, SKK07] and the fluid implicit particle (FLIP) based methods [ZB05, AT11, BB12] have shown impressive results. For small-scale bubbles and forms interacting with large-scale fluids, methods to couple the SPH and PLS methods [HLYK08, LTKF08], methods to couple the SPH and the marker level set (MLS) methods [MMS09], and a method to use stochastic particles [KSK10] also have been introduced. Recently, mesh-based methods have been actively studied by [BGOS06, M0″ 9, WTGT09, WTGT10, TWGT10, BBB10]. However a purely mesh based simulator is still difficult to implement. To alleviate the difficulties associated with handling the topological changes and balancing the interfacial forces, the meshes are often embedded to the Eulerian grids. The fluid volume is then offset in a global manner. This contrasts to our method, in which the meshes are readily available in each local cell and the fluid volume is compensated for locally.
In this section we give an overview of our framework, deferring the details and the contributions of our method in the next two sections (Sections 4 and 5).
Given the density, dynamic viscosity, and the curvature in each grid cell, the momentum solver updates the velocity of the domain as follows: (1) the solver computes the velocity advection term in a conservative manner. (2) The solver performs the velocity diffusion implicitly. (3) The solver performs the pressure projection with the surface tension. (4) Finally, the solver applies the pressure difference to make the intermediate velocity incompressible. Two phase fluid flows can be approximated by single phase fluid flows with the free surface boundary. Although such approximation can reduce the amount of computation, lack of the pressure of the counterpart can cause the moving interfaces to collapse. Therefore, in the development of the momentum solver, we did not make the free surface approximation.
From the incompressible velocity field given by the momentum solver, the interface tracker updates the interface as follows: (1) the tracker updates the volume fraction of each cell in a conservative manner. (2) The tracker moves the level set interface using a semi-Lagrangian method. (3) The tracker corrects the resulting level set interface according to the volume fraction. (4) Finally, the tracker performs redistancing of the level set. The conserved volume fractions are a primary component for the momentum solver. The level set values are continuously corrected to fit the volume fraction. In the process of volume correction of the level set, inconsistency between the volume fraction and the level set may occur. We will describe this problem in more detail and propose a solution in Section 5, which forms the main contribution of this paper.
In this section, we briefly describe the momentum solver. Although it is not the main contribution in this paper, we emphasize that the incompressibility of the velocity field is important to conserve the fluid volume aside from the prevention of the interface aliasing. Also, the momentum conservation is important to preserve sub-cell level details. Hence, we use the finite volume method (FVM) strictly to solve the momentum equations. For more details for the momentum solver, we recommend to refer to Gerris [Pop03].
We solve the viscous incompressible Navier-Stokes equations with surface tension.
∇·u=0 (1)
ρ(u1+·∇u)=−∇p'∇·(2μD)+σκδsn+g (2)
1+·(Tu)=0 (3)
φ+∇·(φu)=0 (4)
where u, ρ, μ, p, D, σ, κ, δs, n, and q are the velocity, the density, dynamic viscosity, the pressure, the deformation rate tensor, surface tension coefficient, the curvature, the Dirac delta function defined on the interface, the unit normal to the interface, and the gravity, respectively. T (0≦T≦1) is the volume fraction and φ is the level set. Equations 1 and 2
describe the incompressibility of the velocity field and the conservation of the momentum, respectively. Equation 3 is the advection of the volume fraction and describes the conservation of the mass if we define the density by the volume fraction. Equation 4 is the advection of the level set, which is supplemented for the interface tracking.
The density and dynamic viscosity are computed from the volume fraction according to Equations 5 and 6, and the curvature is computed from the level set as Equation 7 (Section 5.7). For two phase flows at high density/viscosity ratio, the filtered volume fraction is generally used.
To reduce degrees of freedom and efficiently determine where the fluid interfaces exist, we use an octree grid. Various interpolation schemes on the octree grid have been suggested [Pop03, LGF04, MG07]. We adopt the restrictive and fully-threaded octree of [Pop03], which facilitates the implementation of the multigrid solver (Section 4.4) and the pre-computation of ENO coefficients (Section 5.6). All variables except for the level set are stored at the center of the grid cells. This simplifies the FVM formulation. The velocity-pressure decoupling problem caused by the collocated arrangement is moderated by solving the pressure projection at the face center (not at cell center).
The time integration is done with the modified FSM which is illustrated in
The superscript n+1 a denotes the time step right after the interface tracker. The spatial derivatives of the equations in each step are discretized by FVM. In particular, the velocity advection term is discretized by Bell-Galena-Graz (BCG) second order unsplit scheme [BCG89], which is known to be stable when the CFL number is less than one. The velocity diffusion is computed by the Crank-Nicolson method. The resulting Helmholtz type equation produces a linear operator F. The pressure projection produces the weighted Laplace operator G. The linear systems represented by F and G can be solved by using the Poisson solver.
To solve linear systems in Section 4.3 efficiently, we use the multigrid method, which requires us to formulate Gauss-Seidel relaxation operator for the Poisson equation. To do this, we integrate Equation 8 over a cell.
where e is a variable and r is a right hand side. By applying the divergence theorem, we have Equation 9.
where ∇d is the gradient operator at the face in a direction d and h is the cell size. By linearizing the gradient operator,
Gauss-Seidel relaxation is fulfilled by Equation 10.
where αd and βd are the slope and the intercept of the linearized gradient operator in a direction d. The relaxation for the residual equation is directly applied to each level of grids using V-cycle. We use simple averaging and straight injection for the restriction and prolongation operators. The result after V-cycles corrects the error and enhances the convergence substantially.
In this section, we present our geometry-aware interface tracker.
The main difference between the previous VOF or CLSVOF methods and ours comes from that, in our method, the level set values are stored at the refined points as shown in
Compared to solving the least squares problem using the 3×3 (3×3×3 in 3D) stencil [MTB07], with the cell refinement, the interface is directly reconstructed by the marching cube algorithm. Note that refinements of neighbour cells can provide different level set values (up to four values in 2D) to a shared refined point, as shown in
Coupling of the level set and the volume fraction requires an efficient volume computation method. We use the Heaviside function approximation formulas presented by [MG08]. (In Table 1, we fix two errata of the formulas). One can compute the volume by extracting the closed meshes, using the voxelization [ED08], or approximating the Heaviside function in other ways [Tow09]. However, the method we used is fast enough and sufficiently robust.
Also, it gives the exact volume for piecewise linear interfaces.
The advection equation for the volume fraction is solved by the split-direction method; Equation 3 is discretized by Equation 11, which is integrated (in 2D) by Equations 12 and 13.
where V and F are the effective cell volume and the flux passing through a cell face. Since it is formulated by FVM, the total volume is preserved. Note that we truncate the volume fraction that is apart from the interface by h in order to handle flotsams caused by the lack of floating precision. However, the truncation effect on the volume conservation is small as shown in
The flux at each cell face is computed geometrically, as shown in
For the flux computation in the next direction, we move the level set of the original cell with the face velocity and store it temporarily.
After the advection of the volume fraction, we advect the level set using the semi-Lagrangian method. We use the Runge-Kutta second-order method for the position integration and use Lagrange polynomials for the level set interpolation as in [DP09, HK10].
We correct the level set values in a cell to be consistent with the volume fraction. In order to preserve the interface details, we let all the level set values in the refined cell change by a constant c in Equation 14. The inverse problem to determine c given the target volume fraction T is solved by the Brent's method.
where H is the Heaviside function defined on a cell Ω, Lixyz is a Lagrange polynomial defined at the i-th level set point, and N is the number of level set points. If the target volume fraction is zero or one, the solution could not be unique. Therefore, we modified the Brent's method to give the unique solution by selecting the absolute minimum change c which makes all level set values have the same sign as in
The first one is ignored whereas the second must be heeded.
To do this, we introduce the sub-cell volume element. We determine the center position of the sub-cell volume element by computing the inverse distance weighted average of the level set points. Given the volume fraction, we set the width, height, and depth of the element by considering the variances. Also, we define the sign of the element by the opposite sign of the level set. If the sub-cell volume element overlaps at least p/2 grid points with different signs, it changes the values of the overlapped level set points. (If we let the element change the level set value even when it overlaps only one grid point, the tiny interface can not move outside the cell and can be seen as a noise). We provide Algorithm 1 for the volume correction.
This routine can be called in the process of the volume fraction advection. If the sub-cell volume element is generated during the process, it participates in the flux computation by moving, resizing, and destroying. However, we emphasize that it does not change the volume fraction itself, thus, it does not affect the volume conservation.
In the advection of the level set, the level set should satisfy the signed distance property. Since our CFL number is less than one, it is sufficient for the cells next to the interface to be of the signed distance property. We have implemented two different redistancing methods; one is PDE-based and the other is mesh-based.
In the PDE-based method, we use the sub-cell corrected ENO2 derivatives. Since we rely on the geometric distance to the interface, the overall accuracy is limited to the second order, thus, higher order method is redundant. We precompute the ENO constants and perform Gauss-Seidel sweeping as [Min10]. The sweeping directions on the octree is determined by the order of traversing children nodes as [COQ06].
Alternatively, we can compute the signed distance directly from the meshes extracted from the level set grid. If we make a map from each cell to its adjacent triangles of the meshes priorly, the computation can be accelerated. Compared to the PEE-based method, the mesh-based method is easily parallelized. At the same time, the result is almost the same. Hence, we have used the mesh-based method for all experiments.
To model surface tension, we use the continuum based surface tension force (CSF) [BKZ92]. For the curvature computation, we adopt the least squares method suggested by [MR06], which relaxes the locality of the curvature.
where the system is formulated by N sample points and the solution is used to compute the curvature. To solve Equation 15 properly, we need at least 6 (10) sample points in 2D (3D). In our implementation, we use 21 (81) sample points in 2D (3D) as illustrated in
It has been reported that in simulations of two phase flows dominated by surface tension, methods considering sub-cell level details often fail (even if the curvature is accurate) [DP09, WMFB11]. The resolution mismatch between the momentum grid and the interface grid can cause the imbalance between the pressure difference and the surface tension across the interface. These errors are accumulated and become sources of spurious currents which deform the interface abnormally. Therefore, we pay attention to the balance of the pressure difference and the surface tension in two ways: first, we compute the surface tension at the cell face (as we did for the pressure projection) and apply it to the cell center [Pop09]. Second, we optionally apply the smoothing filter [Tau95] to local meshes before the volume correction if flows are dominated by the surface tension. In these ways, we can practically reduce the spurious currents near the interfaces and increase the stability.
All simulations presented here were performed on a single desktop computer with Intel Core i7 3.3 GHz CPU with 12 GB RAM on 64 bit windows OS. We accelerated our framework using MPICH. The optimization techniques for the domain decomposition have not been implemented, thus, linear scalability was not accomplished. However, the optimization is one of our future works. The final rendering was done with Mitsuba [Jak10]. For the density and viscosity, we used ρl=999 kg/m3 and μl=1.1e−3 kg/ms for the water, ρg=1.2 kg/m3 and μg=1.8e−5 kg/ms for the air. We used the surface tension coefficient σ=7.2e−2 Nm and the gravity g=9.8 m/s2.
In this paper, we have presented a new framework to simulate moving interfaces in viscous incompressible two phase flows without loss of the fluid volume and surface details. The sub-grid refinement of the level set coupled with the VOF method could improve the previous coupling methods by capturing sub-cell details more vividly.
A limitation of our method is the time step restriction. It is known that the surface tension can induce spurious currents near the interface and become unstable when large time steps are used. Stable methods to alleviate this problem have been introduced by [SO09, Sus11]. Applying these methods to our framework will be a future work. Our framework is not limited to the regular grid. Hence, the application to irregular domains can be another future work.
We would like to thank Dr. Doyub Kim, Dr. Nambin Heo, and the anonymous reviewers for their valuable discussions for this work. This work was supported by Ministry of Culture, Sports and Tourism (MCST) and Korea Culture Content Agency (KOCCA) in the Culture Technology (CT) Research & Development Programs 2013, National Research Foundation of Korea (NRF) grant funded by the Korea government (MEST) (No. 2012R1A2A1A01004891), the Brain Korea 21 Project in 2013, and ASRI (Automation and Systems Research Institute at Seoul National University).
This application is a non-provisional application corresponding to Provisional U.S. Patent Application Ser. No. 61/767,696 for “Method of Simulation of Moving Interfaces using Geometry-Aware Volume of Fluid Method” filed on Feb. 21, 2013. The Provisional U.S. Patent Application Ser. No. 61/767,696 and all the reference papers are incorporated by reference into this disclosure as if fully set forth herein.