The Level Set Method and its Applications

Hongkai Zhao

Department of University of California, Irvine Outline

• Introduction to the level set method.

• Survey of some of the research and applications.

• Specific topic: solving PDEs on moving interfaces.

• Open discussions.

2 Moving interface problem

The simplest setting: given the motion law of a moving interface dΓ(t) dΓ(t) = v(x,t)or = vn(x,t)n dt dt

V(X, Γ)

n

Γ

Question: How to represent and track or capture Γ numericaly? Moreover, v(x,t)orvn(x,t) may depend on: • ambient velocity (convection) • geometry of Γ • global quantity (which depends on Γ)

3 Other approaches

• Particle/mesh (tracking) method: Parametric (explicit) representation of Γ using particles/triangular meshes and track the motion by solving a system of ODEs. +: explicit representation; good efficiency and accuracy. -: parametrization in higher dimensions; reparametrization and reconnection for large deformation and topological changes.

• Volume of fluid method: Implicit representation of Γ using fraction of volumes and track the volume fraction using conservation form. +: good conservation property; easy to handle topological changes -: restricted to conservative type of equation; reconstruction of interface and computation of geometrical quantities.

4 The level set method (Osher and Sethian, 88)

Step 1: Embed the interface Γ into a level set function φ(x) (implicit representation): Γ={x : φ(x)=0}. The location and geometric quantities of Γ can be extracted from φ easily. For examples, ∇φ ∇φ unit n = , mean curvature κ = ∇· . |∇φ| |∇φ|

Step 2: Embed the motion of Γ(t): dΓ φ(Γ(t),t)=0 ⇔ φ + ∇φ · =0. t dt The evolution PDE for φ(x,t)is:

φt + v ·∇φ =0 or φt + vn|∇φ| =0

Note: The level set function φ and the velocity field v or vn can be defined arbitrarily off the zero level set Γ.

5 Morphological interpretation of the level set method

∇φ ∇φ ( )= (x) and κ( )=∇· (x) is the normal and mean n x |∇φ(x)| x |∇φ(x)| curvature at x of the level set that passes through x.

x n(x) κ( x) Φ=Φ(x)

For examples:

1. φt + v ·∇φ = 0 means every level set of φ is convected by the velocity field v.

φ ∇· ∇φ |∇φ| φ 2. t +( |∇φ|) = 0 means every level set of moves normal to itself by its mean curvature.

6 An example

φt + |∇φ| =0,φ(x, 0) = φ0(x) Denote p = ∇φ. The Hamiltonian is H(p, x)=|p|.Thecharac- teristic equation is ⎧ ⎪ ⎨⎪ p˙ (t)=−∇xH(p, x)=0 ˙ (t)=∇ H( , )= p ⎪ x p p x |p| ⎩⎪ φ˙(t)=∇pH(p, x) · p − H(p, x)=0 which can be solved explicitly ⎧ ⎪ ⎪ ∇φ(x(t),t)=p(t)=p(0) = ∇φ0(x(0)) ⎨⎪ t t p(t) t ∇φ(x(t),t) x( )=x(0) + | t | = x(0) + |∇φ t ,t | ⎪ p( ) (x( ) ) ⎪ ∇φ ,t ⎩⎪ φ( ,t)=φ − t (x ) x 0 x |∇φ(x,t)|

If φ0(x)=|x|−r0 then x φ(x,t)=φ x − t = |x|−(t + r ) 0 |x| 0 So the zero level set for φ(x,t)=0is|x| = r0 + t.

7 Mathematical advantages

• A geometric problem becomes a PDE problem. PDE tools, such as viscosity solution, can be used.

• Singularities and topological changes in Γ can be handled more easily in φ space.

Φ

Φ

Y

Y t 3 Φ=0

t 2 Φ=0 Φ=0

X t Φ=0 1 Φ=0 Φ=0 X

(a) evolution of a (b) topological changes

8 Numerical advantages

• Eulerian formulation gives a simple data structure. The PDE for the level set function is solved on a fixed grid. No remeshing and surgery is needed for dynamic deformations or topological changes.

• The formulation is the same in any number of dimensions.

• Efficient numerical algorithms for PDEs are available and can handle shocks and entropy conditions properly.

Remark: The extra dimension of computation cost can be re- duced by restricting the computation in a narrow band around the zero level set.

9 Numerical schemes

Numerical methods for conservation laws and Hamilton-Jacobi equations play a crucial role.

φt + F (x,φ,∇φ,...)=0 Spatial discretization on rectangular grids: For hyperbolic terms, such as v ·∇φ, vn|∇φ|:upwind(W)ENO schemes (Shu, Osher...), Godnov schemes, ... ∇· ∇φ For parabolic terms, such as |∇φ|: central difference scheme.

Time discretization: TVD or TVB Runge-Kutta method.

Spatial discretization on triangulated mesh: Petrov-Galerkin type of monotone scheme (Barth & Sethian), discontinuous Galerkin method, ...

10 Reinitialization and extension

• Reinitialization: The desirable level set function is the signed distance function: |∇φ| =1,φ(x ∈ Γ) = 0. (1)

Even if |∇φ0| =1, |∇φ| =1,t>0iff∇vn ·∇φ =0 In general, reinitialization is needed to enforce (1).

• Extension of velocity:

∇vn ·∇φ =0,vn(x ∈ Γ) is fixed

Φ

|Φx|=1

x Φ>0 V Φ=0 Φ<0

11 The effect of curvature

Motion by mean curvature is the flow for decreasing |Γ|, which is a regularization that prevents oscillations along Γ and enforce the entropy condition when singularity develops. ⎧ ⎪ ∆φ (if |∇φ| =1) ∇φ ⎨ |∇φ|∇· = ⎪ |∇φ| ⎩⎪ φ − ∇φ D2 φ ∇φ ∆ |∇φ| ( )|∇φ| (diffusion along the interface If numerical viscosity is present, ∼ hα∆φ, curvature effect is also present, which may cause the decrease of both |Γ| and the volume enclosed by Γ.

12 Resolution analysis 1 κ= r+δ 1 κ= r 1 κ=r−δ

If vn = vn(κ), e.g. motion by mean curvature, neighboring level sets of the zero level set evolves with the same law. We have 1 1 1 > > , r + δ r r + δ 1 1 1 r 1 ( + )= > 2 r − δ r + δ r2 − δ2 r Concavity (the inner level set) wins, which causes the loss of area.

1 To interp olate r accurately, the grid size h has to resolve the α finest feature. The error is O h for a method of order α. rmin

13 Static Hamilton-Jacobi equation

Eikonal equation:

|∇u(x)| = f(x) > 0,u(x ∈ Γ0)=0 u(x) is the first arrival time at x for the wave front starting at Γ with normal velocity 1 , i.e., 0 f(x) dΓ 1 {x : u(x)=T } =Γ(T ), where = n, Γ(0) = Γ dt f(x) 0 or 1 φt + |∇φ| =0, {x : φ(x, 0) = 0} =Γ . f(x) 0

14 Fast sweeping method

After upwind differencing following the causality, we have the following nonlinear system to solve { Dx u +, Dx u −}2 { Dy u +, Dy u −}2 h2f2 max ( − i,j) ( + i,j) +max ( − i,j) ( + i,j) = i,j or + 2 + 2 2 2 [(ui,j − uxmin) ] +[(ui,j − uymin) ] = fi,jh i =1, 2,...,j =1, 2,... where uxmin =min(ui−1,j,ui+1,j),uymin =min(ui,j−1,ui,j+1)

• Fast marching method: following the characteristics sequen- tially. (Tsitsiklis, Sethian, Sethian & Vladimirsky).

• Fast sweeping method: an iterative method following the char- acteristics in parallel. (Bou´e & Dupuis, Zhao, Tsai, et al)

15 Variational level set formulation (Zhao, et al)

• Express the energy functional in terms of the level set function. volume enclosed by the surface (φ<0),V= H(−φ)dx Rn surface area S = δ(φ)|∇φ|dx Rn • Derive E-L equation/gradient flow for the level set function. The gradient flow that minimizes the enclosed volume:

φt + δ(−φ)=0⇒ φt + |∇φ| =0, i.e. vn = −1 The gradient flow that minimizes the surface area: ∇φ ∇φ ∇φ φ −δ(φ)∇· =0⇒ φ −|∇φ|∇· =0, i.e. vn = ∇· = κ t |∇φ| t |∇φ| |∇φ|

16 A level set formulation for two phase flow by Sussman, Smereka and Osher. Let φ be the level set function for the moving interface Γ(t) between the two fluids.

• Distributional Navier-Stokes equation: ρ(ut +(u ·∇)u)=ρg + ∇·Λ+σκδ(φ)∇φ ∇·u =0 T (ρ1,µ1),φ<0 where Λ = −pI + µi(∇u + ∇u ), (ρ, µ)= (ρ2,µ2),φ>0 ∇φ ,κ∇· ∇φ n = |∇φ| = |∇φ|

• The evolution of the interface:

φt + u ·∇φ =0 Note: The Delta function is numerically smeared over a few grids.

17 A sharp interface formulation applied to the Hele-Shaw flow by Hou, Li, Osher and Zhao.

u = −β∇p, ∇u = f The Poisson equation for the pressure

∇·(∇p)=−f with jump conditions at the interface

[p]=σκ, [βpn]=0 • Solve the pressure equation using the immersed interface method and the level set function on rectangular grids (LeVeque & Li).

• Evolve the interface:

φt + u ·∇φ =0 Note: The jump condition is explicitly enforced.

18 Applications of the level set method

• Multiphase fluids

• Materials

• Image processing

• Computer graphics

• Inverse problem

• Shape optimization

• Whereever there is a moving interface and free boundary in your problem.

19 Some recent development

• Level set formulation for with higher co-dimensions (Cheng et al).

• Level set method + Volume of Fluid Method (Pucket and Sussman).

• Adaptive level set method (Cristini and Lowengrub).

• Particle level set method (Enwright and Fedkiw).

• Solving PDEs on moving interfaces.

20 Open problems

• Method itself.

More rigorous numerical analysis. Moving mesh for the level set method. Coupling of tracking method with the level set method.

• Applications......

21 Two Books

Level Set Methods and Fast Marching Methods (1996, 1999), by J. Sethian.

Level Set Method and Dynamic Implicit Surfaces (2003), by S. Osher and R. Fedkiw.

22