- Introduced by
- Stanley Osher
- Year
- 1988
- Type
- Implicit interface tracking method
- Family
- Fluid Dynamics
What does it do?
The Level Set Method is an implicit interface-tracking technique.
Osher and Sethian introduced it in 1988 in work on fronts propagating with curvature-dependent speed, using Hamilton–Jacobi formulations. Sussman, Smereka and Osher extended it to incompressible two-phase flow in 1994. The interface is represented as the zero level set (contour) of a signed distance function φ, so changes in interface topology and the interface's curvature and normals are handled through the field rather than by tracking interface points explicitly.
The intuition behind the method
Imagine a landscape where elevation represents the distance from an interface: positive heights are above the interface, negative below. The interface itself sits at zero elevation. As the landscape deforms (governed by physics), the elevation function φ changes. The interface position is always the zero contour. This implicit representation is elegant: you never explicitly track points on the interface; instead, you track the signed distance field. When the interface breaks or merges, the distance function simply develops new zero contours—no special handling needed. Interface properties like curvature κ and normal n̂ are computed by taking derivatives of φ. The challenge is maintaining the distance property: as the flow advects φ, the gradient |∇φ| drifts from 1, requiring periodic reinitialization.
History
Osher and Sethian introduced the level set method in 1988, in work on fronts propagating with curvature-dependent speed using Hamilton–Jacobi formulations. Sussman, Smereka and Osher applied it to incompressible two-phase flow in 1994, which opened its use in multiphase computational fluid dynamics. Sethian later developed the Fast Marching Method for efficient distance computation and treated level set and fast marching methods together in a book (1996). Hybrid approaches that combine volume-of-fluid and level set ideas were later developed to address mass conservation.
When to use it
Choose level sets when the interface geometry drives the physics and curvature or normal direction must be computed accurately, for example when surface tension acts on a moving or deforming interface. They also suit problems where interface regions merge, break up or change topology, since no explicit reconnection logic is needed. Level sets are also common in image segmentation and topology optimization, where the zero contour represents a boundary. Avoid level sets when strict conservation of phase volume is required; a volume-of-fluid method, which is conservative by construction, is usually the better choice. Use caution for flows dominated by thin layers or triple-point contact lines, where the method is difficult to apply.
Limitations and considerations
- Phase volume is not conserved strictly; it drifts as φ is advected and reinitialized.
- Reinitialization, which restores |∇φ| = 1 by solving an additional equation, introduces numerical diffusion and smears the interface.
- The accuracy of the result depends on how often reinitialization is performed and on the algorithm used.
- Thin layers and triple-point contact lines are difficult to resolve, because the signed distance field is poorly defined where interface regions are close together.
- Velocity and pressure must be extrapolated across the interface, and extrapolation errors can affect interface motion, so this step needs care.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Curvature and normal directions follow directly from gradients of φ, so surface tension can be evaluated without tracking interface points.
- Merging, breakup and other topology changes occur without explicit reconnection logic.
- The φ field can be used to extend quantities defined on the interface into the surrounding bulk, through reinitialization-based extension.
- The implicit representation suits shape optimization and inverse problems, where the zero contour is updated using shape gradients or sensitivity information.
Applications
- Multiphase flows: bubble dynamics, droplet coalescence and interfacial instabilities, where accurate curvature determines the surface tension force.
- Shape optimization: updating the zero contour of a shape with shape gradients, as in the design of mechanical parts or airfoils.
- Image processing: segmentation and shape analysis, where the zero contour represents an object boundary.
- Materials science: grain growth, dendritic solidification and phase transitions during crystal formation.
How it works
How it works
Specify the domain, the initial interface position, the velocity field (supplied by a flow solver where the flow is computed), and the physical properties of each phase.
Initialize φ as a signed distance function: φ < 0 in one phase, φ > 0 in the other, with |∇φ| = 1 and the zero contour at the initial interface. Define boundary conditions for φ and for the flow variables. The accuracy of this initial distance field matters for all later steps (see pitfalls).
Formula
\phi(\mathbf{x}, t=0) = \pm d(\mathbf{x})Solve the Navier–Stokes equations for the velocity field. In two-phase flows, surface tension forces enter this step and depend on the interface curvature, which is computed from φ (see interpret).
Advect φ with the velocity field using the transport equation ∂φ/∂t + u·∇φ = 0, which is the Hamilton–Jacobi-type evolution step of the method. Reinitialization to restore |∇φ| = 1 is applied as a separate operation during the time loop, because advection alone causes |∇φ| to drift.
Formula
\frac{\partial \phi}{\partial t} + \mathbf{u} \cdot \nabla \phi = 0Extract the interface as the zero level set of φ. Curvature κ = ∇·(∇φ/|∇φ|) and the unit normal n̂ = ∇φ/|∇φ| are derived from gradients of φ and are used for surface tension and for geometric output such as interface area. Check the total volume of each phase over time, since the level set method does not conserve phase volume strictly.
Common pitfalls
- Reinitializing too often or too rarely both degrade the interface. Frequent reinitialization adds diffusion and phase volume loss; infrequent reinitialization lets |∇φ| drift from 1 and distorts the curvature estimate. The interval is best chosen by monitoring how far |∇φ| deviates from 1.
- Using first-order advection for φ, which is diffusive and smears the interface. Higher-order schemes such as ENO or WENO are used for accuracy.
- Starting from a φ that is not a true distance function (|∇φ| ≠ 1) introduces errors from the first time step. Compute the initial distance field with a fast marching or fast sweeping method.
- Computing curvature directly from finite-difference gradients of φ produces high-frequency noise, which then contaminates surface tension forces. Smooth φ locally before computing curvature.
- Phase volume loss accumulates over long simulations. Compare the total volume of each phase with its initial value and apply a mass correction if the loss is significant.
Frequently asked questions
What is reinitialization and why is it needed?
Advecting φ preserves the zero level set (the interface), but the gradient |∇φ| gradually drifts from 1, making φ steep or flat near the interface and degrading curvature estimates. Reinitialization solves an additional equation to restore |∇φ| = 1 while keeping the zero contour in place. The trade-off is that reinitialization introduces diffusion and can cause loss of phase volume.
How is interface curvature computed in the level set method?
Curvature is κ = ∇·(∇φ/|∇φ|), the divergence of the unit normal n̂ = ∇φ/|∇φ|. You compute the gradient of φ, normalize it, and take its divergence. Finite-difference estimates are noisy where |∇φ| is small, so φ is often smoothed locally before curvature is computed. Accurate curvature matters because it sets the surface tension force.
How does the level set method handle mass conservation compared with volume-of-fluid?
Volume-of-fluid is conservative because its volume fractions sum to the phase volume. Level sets do not conserve mass exactly: advection and reinitialization move the zero contour, and phase volume can drift. Hybrid volume-of-fluid/level set methods and mass-correction steps are used to reduce this drift. Where strict conservation is required, volume-of-fluid is usually preferred.
What are the advantages of level sets over explicit interface tracking?
No explicit interface points are stored, so merging and breakup need no special logic, and curvature and normals follow from gradients of φ. The drawbacks are that the implicit representation is less intuitive and that phase volume is not strictly conserved.
How do I initialize a level set function accurately?
Compute the signed distance from the initial interface with a fast marching or fast sweeping method. For a simple interface such as a circle, an analytical distance formula can be used. Confirm that |∇φ| ≈ 1 at initialization, because errors at this stage carry into the first time steps.
Related methods
Sources
Osher, S., & Sethian, J. A. (1988). Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations. Journal of Computational Physics, 79(1), 12-49.
Open DOI referenceSethian, J. A. (1996). Level Set Methods and Fast Marching Methods: Evolving Interfaces in Computational Geometry, Fluid Mechanics, Computer Vision, and Materials Science. Cambridge University Press.
ISBN: 978-0521645577Sussman, M., Smereka, P., & Osher, S. (1994). A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 114(1), 146-159.
Open DOI reference