Skip to main content
Proceedings of the National Academy of Sciences of the United States of America logoLink to Proceedings of the National Academy of Sciences of the United States of America
. 2001 Nov 20;98(25):14198–14201. doi: 10.1073/pnas.251420998

Conservative front tracking and level set algorithms

James Glimm *,‡,, Xiao Lin Li *, Yingjie Liu *, Ning Zhao §
PMCID: PMC64658  PMID: 11717403

Abstract

Hyperbolic conservation laws are foundational for many branches of continuum physics. Discontinuities in the solutions of these partial differential equations are widely recognized as a primary difficulty for numerical simulation, especially for thermal and shear discontinuities and fluid–fluid internal boundaries. We propose numerical algorithms that will (i) track these discontinuities as sharp internal boundaries, (ii) fully conserve the conserved quantities at a discrete level, even at the discontinuities, and (iii) display one order of numerical accuracy higher globally (at the discontinuity) than algorithms in common use. A significant improvement in simulation capabilities is anticipated through use of the proposed algorithms.


Hyperbolic conservation laws are foundational for many branches of continuum physics. Discontinuities in the solutions of these partial differential equations are widely recognized as a primary difficulty for numerical simulation. Commonly used numerical algorithms are convergent at some power of the mesh spacing Δx, but only for smooth solutions. At solution discontinuities, the local truncation errors are typically 0 (1), e.g., not convergent. For nonlinear shock waves, this situation is mitigated by the fact that errors flow into the discontinuity (which functions as a “black hole” in this regard), and the size of the error region does not grow. For linear-type discontinuities, such as thermal or fluid material boundaries, the discontinuities spread and often occupy 5–10 mesh cells as the simulation evolves into late time. The ability to solve accurately many practical problems is hampered by these facts.

Front tracking was proposed as a (partial) cure for these problems (13). The method has recently been extended to three dimensions and given a robust and simple interface description (46). In this method, a sharp numerical boundary is maintained within the computation to prevent the artificial mixing of fluids across a fluid interface. The communication of information across the interface is accomplished by use of analytic solutions of idealized jump discontinuities (Riemann problems) and by ghost cells, to maintain data extrapolated across the interface. The ghost cells are needed by the finite difference operators approximating the differential equation. The ghost-cell extrapolation method was introduced in 1981 by Glimm, Marchesin, and McBryan (3) for front tracking. This method, and a closely related ghost-cell level set method (7) proposed in 1999, are only partial solutions to the problem of simulation of fluid interfaces. Both lack conservation in the cells cut by the interface and both have only conventional accuracy with 0 (1) local truncation errors at the discontinuities. Thus, neither is a correct solution of the interface problem.

The purpose of this paper is to propose a tracking/level set algorithm that is conservative even at discontinuities and that improves by one order of accuracy over conventional algorithms.

Numerical Algorithms

Conservation Laws in Integral Form.

A conservation law is a partial differential equation of the form

graphic file with name M1.gif 1

so called because ∫ udx changes in time only because of net influx at the boundaries. Consider a cell with volume V with a bounding surface S, part or all of which may be moving in time. Assume that, in a small time interval Δt, we have the increments of both the conserved quantity uu + Δu and the volume VV + ΔV. We expand

graphic file with name M2.gif 2

For the right-hand side of Eq. 2, the last term is a higher-order differential and can be neglected as Δt → 0. The second term contributes

graphic file with name M3.gif 3

where vn is the component of the velocity in the direction of the outward normal to S. Dividing both sides of Eq. 2 by Δt and taking the limit of Δt → 0, we have

graphic file with name M4.gif 4

Substitution of the conservation law (Eq. 1) allows evaluation of the first term on the right side of Eq. 4. For this purpose, we let Fn(u) denote the component of F(u) in the direction of the outward normal to S. Therefore, we have the space integral form of the conservation law for a cell with moving boundary as

graphic file with name M5.gif 5

For a fixed cell such as a rectangular cell in an Eulerian grid, Eq. 5 degenerates to the conventional integral form of the conservation law

graphic file with name M6.gif 6

Eq. 6 has been the foundation of many finite difference and finite volume schemes. When tracking a moving interface, it is Eq. 5 that is fundamental.

Ghost-Cell Extrapolation Tracking Methods.

Active tracking of physical discontinuities have proven important in the computation of many physical problems. The 1981 front tracking paper (3) pioneered the use of ghost cells for the separation of fluid components across a tracked interface. The state at the center of a ghost cell is extrapolated from the state of the Riemann solution on the same side of the interface as the cell to be solved. The ghost-cell method was also used in 1999 by Fedkiw et al. (7), with the ghost-cell state assigned through entropy extrapolation from the states on the same side as the solution cell.

The main advantage of either of these ghost-cell algorithms is that the computation needs only finite difference operations on regular cells (aside from issues of front propagation). As we will see, the main disadvantages of ghost-cell methods are (i) loss of conservation and (ii) only conventional order of accuracy. Conservative algorithms overcome these two disadvantages but give up the advantage of regular cell finite difference operations.

In one space dimension, assume a uniform partition (just for simplicity of notation) over the computational interval. Let xi denote the cell center of the ith cell, tn denote the nth time level, Δx denote the cell size, and Δt = tn+1tn. Consider a second-order finite difference scheme for Eq. 1,

graphic file with name M7.gif 7

where FInline graphic = F(UInline graphic, UInline graphic, UInline graphic, UInline graphic), UInline graphic approximates Δx−1Inline graphic u(x, tn)dx, the average of the conserved quantity over the cell [xj−1/2, xj+1/2], and λ = Δtx. If an interface (tracked either by the front tracking or the level set methods) is found between cell centers xj and xj+1, the ghost-cell method will solve for UInline graphic and UInline graphic through the scheme

graphic file with name M17.gif 8
graphic file with name M18.gif 9

where FInline graphic = F(UInline graphic, UInline graphic, Inline graphic, Inline graphic) and FInline graphic = F(Inline graphic, Inline graphic, UInline graphic, UInline graphic). Here Inline graphic, Inline graphic, Inline graphic, and Inline graphic are the ghost states assigned by Riemann solution (front tracking) or entropy extrapolation (level set). Because in general FInline graphicFInline graphic, such extrapolation methods are not conservative.

To illustrate the failure of conservation, we consider explicitly the simplest case, of a first-order centered scheme, the Lax–Friedrichs scheme for Burgers' equation. In this case, u is a scalar, and F(u) = ½u2. To recover the Lax–Friedrichs scheme, notice that the numerical flux may be written as

graphic file with name M35.gif

If the interface lies between nodes j and j + 1, the ghost-cell extrapolation scheme is found by setting

graphic file with name M36.gif

and

graphic file with name M37.gif

according to the above formulas. Because ghost-cell extrapolation typically satisfies UInline graphicInline graphic and UInline graphicInline graphic, and because the left and right nonidentities generally fail to be equal by different amounts, the left and right fluxes are not equal even in the most elementary possible case, and the ghost-cell methods are not conservative.

To obtain a conservative method, we replace FInline graphic and FInline graphic by the dynamic flux as in Eq. 5, for which Rankine–Hugoniot conditions guarantee equally of left and right values.

Conservative Front Tracking.

The front tracking method propagates the interface by solving the Riemann problem at the interface. Using the extrapolated states from the left and right sides of the front, the Riemann solution consists of several constant states separated by waves: shock, rarefaction, and contact discontinuity. The Riemann solution contains the speed s and the constant states uL, uR on each side of a wave. They must satisfy the Rankine–Hugoniot condition

graphic file with name M44.gif 10

In the present context, the primary tracked wave in the Riemann solution is the contact discontinuity.

Consider the one-dimensional case and assume that the position σn of a tracked wave is between the two cell centers xj and xj+1 at the time step tn. Then, at the time step tn+1, there are two possibilities: (i) the interface position σn+1 is still between xj and xj+1; (ii) the interface has crossed one cell center; for example, the new interface position is between cell centers xj+1 and xj+2. For the first case, let us introduce the notation Inline graphicInline graphic = σnxj−1/2 and Inline graphicInline graphic = xj+3/2 − σn. For ij, j + 1, let Inline graphicInline graphic ≡ Δx. Also let λ̄Inline graphic = Δt/Inline graphicInline graphic. We can update the new interior states at j and j + 1, respectively, through the following schemes:

graphic file with name M54.gif 11
graphic file with name M55.gif 12

where UInline graphic, UInline graphic, UInline graphic, and UInline graphic are integrated over irregular cells of minimum size Δx/2 defined by the interface location. For example,

graphic file with name M60.gif 13

The interface flux FInline graphic is defined as

graphic file with name M62.gif 14

The second case is handled by similar formulas (J.G., X.L.L., and Y.L., unpublished work). For the second case, small space cells may arise, and to prevent this from occurring, the irregular space time cell containing the moving interface is split in two pieces, each of which is merged with a (regular) neighbor for the purpose of the finite difference algorithm.

The conservative property follows directly from Eq. 14. The improved convergence properties of this scheme result from a locally second-order accurate reconstruction of the speed sn and the states uInline graphic and uInline graphic at the midpoint between the (σn, tn) and (σn+1, tn+1) on the moving interface. These quantities must satisfy Eq. 14 as an identity. The extension to higher dimensions is developed in J.G., X.L.L., and Y.L., unpublished work, where numerical examples in one dimension are also given.

Theorem 1: The above algorithm defines a finite difference scheme that is conservative at tracked fronts as well as in the interior and that has L second-order local truncation errors near a tracked interface in one dimension and first-order L local truncation errors near a smooth tracked interface in higher dimensions. Thus the algorithm is formally third-order accurate in L1 in one dimension and second-order accurate in L1 in higher dimensions.

Proof: The conservativeness of this method is easily seen through the summation

graphic file with name M65.gif 15

Here, N is the total number of cells, and FInline graphic and FInline graphic are the flux at the left and right boundaries, respectively. The cancellation of the flux terms near the tracked interface is because of Rankine–Hugoniot condition FInline graphic = FInline graphic. For the proof of order of local truncation error, see J.G, X.L.L., and Y.L., unpublished work. The extension to multidimensions requires space–time finite volume differencing, one version of which is proposed in J.G., X.L.L., and Y.L., unpublished work. As in the one-dimensional algorithm, merging of selected adjacent cells is needed to assure a lower bound on the Courant–Friedrichs–Levy (CFL) time step restriction.

Conservative Level-Set Tracking.

The first use of the level-set method in fluid simulation (8, 9) was only a graphical tool to follow the motion of the interface through the evolution of a level set function ψ(x) by solving

graphic file with name M70.gif 16

where v is the flow velocity in space. This use of the level function can be replaced by other physical quantities, such as fluid density. To fully exploit the level-set method, Fedkiw et al. applied a ghost-cell extrapolation method similar to that of the front tracking method (3). The primary difference between these two ghost-cell algorithms lies in the constant extrapolation of the Riemann solution states vs. entropy extrapolation of the states from one side for the assignment of ghost-cell states. As we have shown in Conservative Front Tracking, neither extrapolation is conservative.

In the calculation of interface speed, the major difference between refs. 8 and 9 and front tracking is that the front tracking method first solves a Riemann problem whose solution gives both the interface speed and the left and right states, whereas the interface speed in refs. 8 and 9 is given by the evolution of the level function through two successive time steps. Consider a one-dimensional case. The exact interface velocity in a time step Δt must be calculated through the interpolated interface positions σn and σn+1:

graphic file with name M71.gif 17

To match the Rankine–Hugoniot condition at the interface, we must construct the left and right states ul and uR to satisfy

graphic file with name M72.gif 18

For a nonlinear wave such as a shock, this is a complex problem, because the shock speed is local and does not equal the flow velocity on either side of the interface. However, for a contact interface, this Riemann problem is simplified, as the propagation speed for the contact discontinuity equals the continuous normal component of the fluid velocity on both sides of the interface. Also, the pressure must be continuous across the contact interface. As a result, the densities, arbitrary on both sides, are the only remaining variables available that can be chosen to satisfy the jump condition.

We can therefore construct the left and right states in the following way. First, the velocity is given by (Eq. 17):

graphic file with name M73.gif 19

whereas the pressure at the interface is interpolated from a stencil, which consists of states at cell centers on both sides of the interface.

graphic file with name M74.gif 20

The left and the right densities are extrapolated from stencils from the left and right sides, respectively, and are not equal to each other, as suggested by the formulas

graphic file with name M75.gif 21

Conservative finite differencing with no mass diffusion across an interface requires use of irregular cells near the interface. In other words, state averages over regular cells cut by an interface are not sufficient and must be supplemented by sufficient information to allow determination of the state average over each of the pieces into which the cell is divided by the interface. This aspect of conservative differencing is shared by both the front tracking and the level-set algorithms we propose here. Thus, we complete the numerical scheme following that of the front tracking method (Eqs. 11 and 12). Extension to higher dimensions is through space–time finite-volume methods, as with Front Tracking.

Numerical Examples

We compute Burgers' equation, (∂u/∂t) + (∂/∂x)((1/2)u2) = 0 on [0, 6] × [0, T], with initial conditions

graphic file with name M76.gif 22

In Table 1, we present the numerical results at T = 3.2 by using the untracked Monotonic Upstream-centered Scheme for Conservation Law (MUSCL) scheme and conservatively (shock) tracked scheme with a MUSCL interior solver. Fig. 1 displaces the comparative numerical results obtained with N = 30, T = 3.2, and CFL number equal to 0.4. Here L1 error indicates the L1 norm of u − Ũ at time T, where u is the exact solution, and Ũ is the second-order approximate solution reconstructed from the piecewise constant numerical solution U at time T, which is supposed to be an approximation of the cell average of the exact solution.

Table 1.

Comparative error analysis for the test problem (Eq. 22) for Burgers' equation

Method N L1 error L1 order UiΔxi
Untracked 30 6.83e-2 1.732
60 3.49e-2 0.969 1.733
120 1.63e-2 1.10 1.733
240 8.24e-3 0.984 1.733
Conservatively tracked 30 2.17e-2 1.732
60 7.07e-3 1.62 1.733
120 2.11e-3 1.74 1.733
240 6.04e-4 1.80 1.733

Figure 1.

Figure 1

Comparative numerical results for Burgers' equation.

Acknowledgments

This work was supported in part by the U.S. Department of Energy (Contracts DE-FG02-90ER25084 and DE-AC02-98CH1086), the Department of Energy Office of Inertial Fusion, the Army Research Office (Grant DAAD19-01-10642), and the National Science Foundation (Grant DMS-0102480). S.L.L. was supported by the U.S. Department of Energy (sponsor identification DEFG0398DP00206) and the Los Alamos National Laboratory (sponsor identification 26730001014L). Y.L. was supported in part by the U.S. Department of Energy (sponsor identification DEFG0298ER25363). N.Z. was supported in part by the National Science Foundation of China (Grant no. 10072028).

Footnotes

This paper was submitted directly (Track II) to the PNAS office.

References

  • 1.Richtmyer R, Morton K. Difference Methods for Initial Value Problems. 2nd Ed. New York: Interscience; 1967. [Google Scholar]
  • 2.Moretti G. Annu Rev Fluid Mech. 1987;19:313–337. [Google Scholar]
  • 3.Glimm J, Marchesin D, McBryan O. J Comp Phys. 1981;39:179–200. [Google Scholar]
  • 4.Glimm J, Grove J W, Li X-L, Shyue K-M, Zhang Q, Zeng Y. SIAM J Sci Comp. 1998;19:703–727. [Google Scholar]
  • 5.Glimm J, Grove J W, Li L-L, Zhao N. In: Contemporary Mathematics. Chen G-Q, DiBebedetto E, editors. Vol. 238. Providence, RI: Am. Math. Soc.; 1999. pp. 133–149. [Google Scholar]
  • 6.Glimm J, Grove J W, Li X-L, Tan D C. SIAM J Sci Comp. 2000;21:2240–2256. [Google Scholar]
  • 7.Fedkiw R P, Aslam T, Merriman B, Osher S. J Comp Phys. 1999;152:457–492. [Google Scholar]
  • 8.Mulder R, Osher S, Sethian J A. J Comp Phys. 1992;100:209–228. [Google Scholar]
  • 9.Li X-L. Phys Fluids A. 1993;5:1904–1913. [Google Scholar]

Articles from Proceedings of the National Academy of Sciences of the United States of America are provided here courtesy of National Academy of Sciences

RESOURCES