You are on page 1of 58

Level Set Methods and Treatment with Finite Elements

1
Why Level Sets?
Introduced by Osher and Sethian in
1988 (OS88)
Basic framework for capturing the
geometry of moving boundaries
and interfaces
Eulerian perspective
For problems where the surface
geometry evolves in fairly complex
ways, with topology changes, no
other method has been as
successful

Overview of Level Sets 2


Why Level Sets?
Introduced by Osher and Sethian in
1988 (OS88)
Basic framework for capturing the
geometry of moving boundaries
and interfaces
Eulerian perspective
For problems where the surface
geometry evolves in fairly complex
ways, with topology changes, no
other method has been as
successful

Overview of Level Sets 2


Outline
Level Set and Fast Marching Method Basics
Algorithms Compatible with Finite Elements
Assumed Gradient Approach
Discontinuous Galerkin Methods
Gradient Augmented Method
Application to Multi-phase Flow
References

Overview of Level Sets 3


Classical Methods for Evolving Interfaces
In addition to the Level Set Method, marker/string and volume of fluid
methods attempt to represent the evolution of an interface, with
varying degrees of independence to the background grid/stencil.

All of these methods have advantages and disadvantages.

Overview of Level Sets 4


Another perspective: arrival time
Assume we are considering an interface
that is always moving outward
We could compute the arrival time T(x,y)
of the interface as it crosses each point
vn
In 1D, we have the relationship

dT
1=v
dx

In higher dimensions, Grad T is


orthogonal to the level sets of T (the iso-
contours), and so we have T dT
dx
|Grad T | vn = 1, T = 0 on S
x

Overview of Level Sets 5


Arrival time (cont’d)

Now suppose the normal


velocity is neither strictly
positive or negative =>
T(x,y) is not a single
valued function
We may embed the initial
position of the interface as
the zero level set of a
higher dimensional
function
A simple one-dimensional
example is shown on the
right

Overview of Level Sets 6


Derivation of LS Equation
For a particle on the interface, we require
(x(t), t) = 0
Via chain rule
˙ + Grad (x(t), t) · ẋ(t) = 0
Since vn is the speed in the outward normal direction, we have
Grad
ẋ(t) · n = vn n=
|Grad |
leaving
˙ + vn |Grad | = 0

This is the classical level-set equation

Overview of Level Sets 7


The Level Set Method
The level set method OS88 is designed to
represent evolving features with evolving
functions. In effect, the geometry of the
feature of interest is represented as the zero ψ>0
iso-contour of a scalar function ψ over Rh.
The evolution equation governing the function ψ<0
is an initial-value problem:
ψ̇ + v|Grad ψ| = 0
S(t) = {x|ψ(x, t) = 0}

Note that this is a field equation, and requires


knowledge of a normal velocity field over the
entire domain.

Overview of Level Sets 8


The Level Set Method (cont’d)
When the velocity field is known over the entire domain,
occasionally the LS equation will be written as

ψ̇ + v·Grad ψ = 0
Since only the normal component of the velocity field is important
regarding the motion of the interface, and
Grad ψ Grad ψ
n= v=v + vt
|Grad ψ| |Grad ψ|

The above can also be recast into the conservative form

ψ̇ + ∇·(vψ) = ψ∇·v

Overview of Level Sets 9


Advantages of these perspectives
Formulation doesn’t change
moving from 2D to 3D
Topology changes handled
naturally
Intrinsic geometric properties of
the interface can be determined
from the level-set field in both
cases:
! "
Grad ψ Grad ψ
n= K = −Div
|Grad ψ| |Grad ψ|

Both can be accurately approximated by computational schemes


that exploit techniques borrowed from the solution of hyperbolic
conservation laws

Overview of Level Sets 10


An Illustration

Overview of Level Sets 11


Maintaining Signed Distances
Many numerical methods for the level set
equation seek to maintain the function ψ
as a signed distance to the interface,
satisfying |Grad ψ| = 1 .
There are several reasons for doing this:
1. Most calculations are based on regular, Cartesian
grids. A uniform spacing of the level sets enables
more accurate calculations of gradients on a given
stencil.
2. Signed distances will yield the most accurate results
for the normal and curvature calculations.
3. It is often useful, for enrichment, to know the
distance to the interface.

In many cases, it is difficult to maintain


signed distances. Redistancing algorithms
are designed to restore a given level set
to a signed distance function.

Overview of Level Sets 12


Redistancing Algorithms
The basic idea is to restructure the level set
field such that |Grad ψ| = 1, while not
disturbing (too much) the zero iso-contour.
One approach is brute force. We loop over
the set of points in the domain, compute the
distance to the interface, and determine the
side to assign the sign.
The Fast Marching Method can also be used to
solve the Eikonal equation |Grad ψ| = 1 ,
forwards and backwards from the front.
Other methods solve an auxiliary equation to
steady state, such as (SSO94):

ψ̇ = sign(ψ)(1 − |Grad ψ|) → ψ̇ + sign(ψ)|Grad ψ| = sign(ψ)

Overview of Level Sets 13


The Fast Marching Method
The FMM (see C01) is designed to solve 1
the Eikonal equation in O(N log N ) |Grad ψ| =
v
operations over the entire computational
domain.
The method essentially turns a BVP into
an IVP, by updating from smaller values of
the function to larger values.
It makes use of heap sorts and a binary
tree data structure that is constructed in
such a way that only one pass per cell is
required.
It’s important to note that while the level
set equation will generally be subject to
time step/CFL conditions, the FMM is not.

Overview of Level Sets 14


Constructing Extension Velocities
The basic question is: knowing the velocity
on the interface, how does one go about
assigning it to points not on the interface.
In other words, how do you extend the
velocity away from the front?
Again there are brute force approaches, in
which the velocity at a point is assigned
the same value as its closest point
projection on the front (MSV95).
Other methods are based on finding a velocity field matching that on the
interface and satisfying Grad v e ·Grad ψ = 0 .
This equation can again be solved using FMM (S99).

Overview of Level Sets 15


Discretized forms for Level Sets
Returning to the original level set equation, a very simple scheme looks
something like:
n+1 n
ψij − ψij n
= −v|∇ij ψij |
∆t
Properly constructing the difference operators is not a trivial issue. If
the front velocity depends only on position and first derivatives of the
level-set function, both the level set and Eikonal equation are particular
cases of the Hamilton-Jacobi equation
!
αψ̇ + H(∇ψ, x) = 0 H(∇ψ, x) = v ψ,2x +ψ,2y +ψ,2z

Even with initial data that is smooth, these equations often give rise to
solutions with discontinuous derivatives. The viscosity solution (see
LS95) provides a means to extend weak solutions to a broad class of
Hamiltonians.

Overview of Level Sets 16


Numerical Methods for Hamilton-Jacobi
Many level set calculations are performed using high-order RK
schemes temporally and high-order (4th, 5th...) WENO (weighted
essentially non-oscillatory- see JS96) schemes spatially.
Sharp features can still become smoothed, particularly over long times.
Such problems have actually been addressed using a combination of LS
and VOF or particle strategies.

images from EFFM02

Overview of Level Sets 17


Algorithms Compatible with Finite Elements
We’d like to evolve interfaces through
arbitrary domains that are discretized with
finite elements. A list of desirable qualities
might include:
1. Designed to work for arbitrary, unstructured
(triangulated) meshes.
2. Extensions to higher-order based on local operations (as
mesh generated with gmsh
opposed to building complex stencils).
3. Designed to be efficient and easy to implement.
4. No free parameters.
5. Designed for two and three-dimensional problems.

Unfortunately, there are relatively few


algorithms satisfying all of the above. The
method of ZS03, for example, is only designed
for 2D and requires complicated stencils as
shown on the right.

Overview of Level Sets 18


Algorithms Based on Continuous FE
Several schemes based on unstructured triangulated domains were
developed in BS98. They examined a monotone scheme and a positive-
coefficient scheme.
Another scheme was based on stabilized Petrov-Galerkin space-time
formulations for homogenous Hamiltonians of degree p satisfying
1
H(∇ψ) = ∇H ·∇ψ
p
The formulation involves the addition of least-squares stabilization and a
discontinuity capturing term.

B(ψ h , wh )gal + B(ψ h , wh )ls + B(ψ h , wh )bc + B(ψ h , wh )dc = 0

Using linear elements, constant space-time slabs, mass lumping, and explicit
time integration, the algorithm simplifies considerably.

Overview of Level Sets 19


Bilinear Forms for PG Scheme
The basic Galerkin form is as expected:
! !
B(ψ h , wh )gal = w(ψ̇ + H(∇ψ)) dv dt
I R

As is, to a degree, the least-squares term:


! ! " # " #
h h 1 1
B(ψ , w )ls = ẇ + (∇H ·∇w) τ ψ̇ + (∇H ·∇ψ) dv dt
p p
I R

While the origins of the dc term are less obvious (see H93):
!
B(ψ h , wh )dc = ν(ψ)(∇w·∇ψ) dv
T

The formulation involves at least three free parameters.

Overview of Level Sets 20


Algorithm
The baseline algorithm for the PG scheme (without dc) is easy to
implement. For a problem in Rd, to go from tn to tn+1 :
1. For each node k in the mesh, initialize ψk∗ = wk = 0

2. Loop over the elements, and compute


! !
v̄ = v dv ∇ψ = ∇φj ψj τ (ψ)
Re
Loop over the nodes i of the element, computing
v̄∇ψ·∇φi 1
Ki = α i = + τ Ki
|∇ψ| d
Compute element fluxes:
!
δψ = Ki ψ i

Update nodal quantities:


ψi∗ = ψi∗ + αi δψ wi = wi + αi meas(Re )

ψi∗
3. March in time: ψin+1 = ψin − ∆t
wi

Overview of Level Sets 21


Results
Etching problems:

Various assumptions for the velocity of the boundary as a function of


incident angle give rise to convex or nonconvex Hamiltonians.

Overview of Level Sets 22


Results
Etching problems:

v = cos(θ) v = 5 cos(θ) − 4 cos3 (θ)

Various assumptions for the velocity of the boundary as a function of


incident angle give rise to convex or nonconvex Hamiltonians.

Overview of Level Sets 22


Results
Etching problems:

v = cos(θ) v = 5 cos(θ) − 4 cos3 (θ)

Various assumptions for the velocity of the boundary as a function of


incident angle give rise to convex or nonconvex Hamiltonians.

Overview of Level Sets 22


Other stabilized FE formulations
RHG00 examined a stabilized finite-element formulation using Galerkin
Least Squares (GLS) for modeling the oxidation of silicon.
The weak form reads:

∇ψ
! ! ! " #
wψ̇ dv + wv|∇ψ| dv + τ v ∇w ψ̇ + v|∇ψ| dv = 0
|∇ψ|
R R R

Forward Euler was used temporally.


GR01 later reported that stability parameters based on HFH89 failed
to eliminate solution oscillations for some cases. Better results were
obtained using stability parameters based on BR94.

Overview of Level Sets 23


Other stabilized FE formulations II
NJL05 used a finite-element formulation to simulate
incompressible bubble dynamics. SUPG was used to
solve both the level-set and pseudo-time redistancing
equations.
A smoothed Heaviside function was used to
partition the physical fields, such as density
ρ(ψ) = ρ1 Hϵ (ψ) + ρ2 (1 − Hϵ (ψ))
0 if ψ < −ϵ
⎧ ⎫

⎪ ⎪


⎪ ⎪

⎨ % ψ πψ
& ⎬
1 1
Hϵ = 2 1 + ϵ + π sin( ϵ ) if |ψ| ≤ ϵ

⎪ ⎪



⎩ 1 if ψ > ϵ ⎪

A weak volume constraint was added during


reinitialization.

Overview of Level Sets 24


Assumed Gradient Approach
In MDG05, we examined an assumed gradient form of the level-set
equation. For many problems, an extension velocity needs to be
created. If we assume that signed distances are approximately
maintained, we can then replace the original level set equation
∂ψ
+ v|Grad ψ| = 0
∂t
with the form
∂ψ
+ ve = 0
∂t
For some simple cases, this reduces the nonlinear pde to an ode.
However, in general we will still have a nonlinear advection equation.
We examined the extent to which stabilization was required for this
modified equation.

Overview of Level Sets 25


Assumed Gradient Approach II
An extensional velocity field satisfies
Grad ψ·Grad v e = 0, v e = v on S
Using the original level set equation, ψ̇ = −v e |Grad ψ| , ZCMO96
argued
∂ 2 ∂
|Grad ψ| = 2Grad ψ· Grad ψ
∂t ∂t
= 2Grad ψ·Grad ψ̇
= −2Grad ψ·Grad (v e |Grad ψ|)
= −2(Grad ψ·Grad v e )|Grad ψ| − 2Grad ψ·v e (Grad |Grad ψ|)
For the assumed gradient form, the terms in blue vanish. As such, the
method is much less sensitive to perturbations from signed distances.

Overview of Level Sets 26


Assumed Gradient Approach III
We examined standard Galerkin methods, leading to consistent and
lumped mass schemes, with first and second order Runge-Kutta time
stepping. The consistent second-order scheme looks like
! ! !
ψ h 1 wh dv = ψnh wh dv − ∆t (veh )n wh dv
n+ 2
R R R
! " #
1 ∆t
! !
h h h h h
ψn+1 w dv = ψn + ψ 1 w dv − (veh ) 1 wh dv
2 n+ 2 2 n+ 2
R R R

with the lumped form yielding (at each node)

(ψI ) 1 = (ψI )n − ∆t(veh )n (xI )


n+ 2
! "
1 ∆t h
(ψI )n+1 = (ψI )n + (ψI ) 1 − (ve ) 1 (xI )
2 n+ 2 2 n+ 2

Overview of Level Sets 27


Results: curvature-driven flows
A standard benchmark problem with LSM concerns the curvature-
driven collapse of a circle. Some finite-difference schemes will show a
clear mesh sensitivity for such problems.

These calculations were performed using curvatures determined from


the divergence of a projected normal field.

Overview of Level Sets 28


Results: curvature-driven flows
A standard benchmark problem with LSM concerns the curvature-
driven collapse of a circle. Some finite-difference schemes will show a
clear mesh sensitivity for such problems.

These calculations were performed using curvatures determined from


the divergence of a projected normal field.

Overview of Level Sets 28


Etching Simulations
Computational Domain and Initial Geometry

Reinitialization alone does provide some smoothing/stabilization.

Overview of Level Sets 29


Etching Simulations
Computational Domain and Initial Geometry
v = cos(θ) v = 5 cos(θ) − 4 cos3 (θ)

Reinitialization alone does provide some smoothing/stabilization.

Overview of Level Sets 29


Etching Simulations
Computational Domain and Initial Geometry
v = cos(θ) v = 5 cos(θ) − 4 cos3 (θ)

from BS98

Reinitialization alone does provide some smoothing/stabilization.

Overview of Level Sets 29


The role of reinitialization
Beginning with a perfect circle initialized on a Cartesian grid, we
can look at the impact of repeated re-initialization (without
advecting the front).

This occurs because the zero iso-contour is not exactly


represented inside the element.

Overview of Level Sets 30


Issues with the Classical Level-Set Method
Small structures are lost once they fall below the grid
resolution
An accurate approximation of the curvature can be difficult
to obtain
! "
Grad ψ
K = −Div
|Grad ψ|

Accurate schemes for the evolution equation involve large


stencils

Overview of Level Sets 31


A Runge-Kutta DG scheme
Runge-Kutta discontinuous Galerkin methods have become
increasingly popular for solving hyperbolic conservation laws (see, e.g.
CS89).
Note that these methods will have more dofs than continuous
versions for the same background mesh.
Recently, MRC06 developed a quadrature-free RK-DG method for the
level set equation applied to incompressible flow.

ψ̇ + ∇·(vψ) = ψ∇·v → ψ̇ + ∇·(vψ) = 0

As with the assumed-gradient approach, the basic notion is to avoid


problems with evaluating the gradient of the level-set function. Note
that neither of these approaches are as general as those designed for
HJ equations.
Overview of Level Sets 32
RK-DG basics
The weak form for the method is straightforward:
! ! !
ψ̇w dv = vψ·∇w dv − f up w da
R R ∂R

In general, the velocity field will be non-uniform over each element.


An important step is to make the replacements
! !
h
vψ = v φI ψI → φI (vψ)I

Expressing gradients in terms of reference element coordinates


simplified things. This gives rise to a linear algebraic system over
each element of the form (in 2D)
! ! ! ! 1 !
nedge
e ξ e η
e
ψ̇k Mkj = (vξ ψ)k Dkj + (vη ψ)k Dkj − Jedge fke,l Mkj
l
J
k k k k l=1

Overview of Level Sets 33


RK/DG Remarks
Time-stepping for a spatial discretization of order p is accomplished
with a TVD-RK scheme of order p+1. Stability over each element is
governed by h
∆t <
c(2p + 1)
Note that for p=4 on a hex, we have a 125x125 system to solve over
each element. However, the matrices only need to be assembled once.
Dispersion and dissipation errors for these methods go like
O((hk)2p+3 ), O((hk)2p+2 )

MRC06 used these results and some numerical studies to guide mesh
refinement: with p=4, if the radius of curvature of ψ is greater than h/4,
there should not be significant dissipation.

Overview of Level Sets 34


Results
Notched circle

Shearing of a sphere. All results were obtained without any


reinitialization.

Overview of Level Sets 35


Results
Notched circle

Shearing of a sphere. All results were obtained without any


reinitialization.

Overview of Level Sets 35


Gradient-Augmented Level Sets (GALS)
Level-set equation

˙ +v·r =0
Gradient-Augmented Level Sets NRS10

˙ +v·r =0

˙ +v·r = rv ·

Of comparable quality to WENO schemes, but with


optimally local stencils
Designed to address the aforementioned shortcomings of
standard LS techniques
Original work employed Hermite polynomials

Overview of Level Sets 36


Gradient-Augmented Level Sets (GALS)
Level-set equation

˙ +v·r =0
Gradient-Augmented Level Sets NRS10

˙ +v·r =0

˙ +v·r = rv ·

Of comparable quality to WENO schemes, but with


optimally local stencils
Designed to address the aforementioned shortcomings of
standard LS techniques
Original work employed Hermite polynomials

Overview of Level Sets 36


Sub-grid features with Hermites
Some interesting features can be captured by a tricubic
function at the subgrid scale

Drops, jets, and films can all be captured to some degree


Globally third-order accurate scheme

Overview of Level Sets 37


Zalesak’s Disk
Rigid-body rotation of a notched circle in constant vorticity
velocity field

Overview of Level Sets 38


Swirling benchmark
Vortex in a box flow

Overview of Level Sets 39


Applications of Level Set Methods
Applications span problems in
physics, engineering, materials
science, to computer graphics and
beyond
Phase transformations and multi-
phase flow have been perhaps the
most common
Extensions to fracture mechanics
have also emerged over the past
decade
Video courtesy of R. Fedkiw
The coupling to embedded
interface methods such as the X-
FEM or G-FEM is natural

Overview of Level Sets 40


Application: Incompressible, Multiphase Flow
Introduced in LDM13
Employed a 2nd-order finite difference flow solver for
incompressible Navier-Stokes

Level set function defined on a narrow band


Reinitialization techniques for mass and level set are
employed
Uses a generalized CIR advection scheme, super-
consistent RK3 time integration

Overview of Level Sets 41


Generalized CIR Advection
Generalization of CIR52
Solve for the levelset and its gradient simultaneously
˙ +v·r =0
˙ + v · r = rv ·

by tracing back along the characteristic curve


ẋ = v(x, t)
and solving the simplified expressions
˙ =0
˙ = rv ·

This is effected via the super-consistent RK3 scheme

Overview of Level Sets 42


Dambreak Benchmark
Correction for moving contact line

a
FLUID 1 FLUID 2

Ls
4.5
a

Martin & Moyce, 1952


Figure 7: Dambreak Initialization
4 Hu & Sueyoshi, 2010
GALSM (without front correction)
3.5 GALSM (with front correction)
4.5

3 Martin & Moyce, 1952


Displacement (Ls/a)

4 Hu & Sueyoshi, 2010


GALS (40 x 10)
2.5
3.5 GALS (80 x 20)
GALS (160 x 40)
2
3
Displacement (Ls/a)

1.5
2.5

1
2

0.5
1.5 0 0.5 1 1.5 2
Time (non−dimensional)

1 Figure 9: Dambreak simulation The mesh is uniform and of dimension 80 x 20. From top to bottom, the sa
shown are at times t =0.00, 0.06, 0.12, 0.18, and 0.24 seconds

0.5 fluid velocity is given by the second-order solution of Laitone [13]. Their solutions are repeated here:

43
! "
3 5 2 2 101 4 2
Overview of Level Sets η(x) = h + ϵs2 − ϵ2 s2 t2 + ϵ3
4 8
s t −
80
s t
0 # $ # $
Rising Bubble Benchmark
2

Volume loss on an 80x160 grid in first 5


1.8
seconds: 0.3% with GALS vs. 23.5% with
classical method 1.6

Order of convergence 1.4

1.2

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1

Overview of Level Sets 44


Wave tank experiment
Wave tank at Duke
Frequency of wedge is varied

Overview of Level Sets 45


Comparison
5.5

4.5

4
Mean Wave Amplitude (cm)

3.5

2.5

1.5

1 Numerical Data
Experimental Data
0.5

0
0.2 0.4 0.6 0.8 1 1.2
Wedge Frequency (Hz)

Overview of Level Sets 46


Block structured adaptivity

Overview of Level Sets 47


Block structured adaptivity

Overview of Level Sets 47


Conclusions
The level-set method is a powerful tool for evolving interface
problems
Much work remains to properly bring the technology and
techniques of the LSM and FMM into the weighted-residual setting.
DG methods appear to provide a reasonable compromise between
the finite-difference/volume and finite element communities. For
some problems, they have been shown to be just as accurate as the
alternatives, and they also generalize to unstructured meshes.
The GALSM is a relatively simple variation on the classical method
that appears to hold a lot of potential

Overview of Level Sets 48


References
OS88: Osher and Sethian, JCP 79, p. 12- NRS10: Nave et al, JCP 229, p. 3802-
SSO94: Sussman et al., JCP 114, p. 146- LDM13: Lee et al, JCP, submitted
C01: Chopp, SIAM J. Sci. Comput. 23, p. 230- CIR52: Courant et al, CPAM 5, p. 243-
MSV95: Malladi et al., IEEE Trans. Pattern Anal. 17, p. 158- SCMB01b: Stolarska et al, IJNME 51, p. 943-
S99: Sethian, Level Set Methods and Fast Marching GMB02: Gravouil et al., IJNME 53, 2569-
Methods, Cambridge. AB05: Areias and Belytschko, IJNME 63, p. 760-
LS95: Lions and Souganidis, Numer. Math. 69, p. 441- OHSC04: Oliver et al, IJNAMG 28, pp. 609-
JS96: Jiang and Shu, JCP 126, p. 202- AK12: Armero and Kim, IJNME 91, pp. 1291-
ZS03: Zhang and Shu, SIAM J. Sci. Comput. 24, p. 1005-
BS98: Barth and Sethian, JCP 145, p. 1-
H93: Hansbo, JCP 109, p. 274-
RHG00: Rao et al., IJNME 47, p. 359-
GR01: Garikipati and Rao, JCP 174, p. 138-
HFH89: Hughes et al., CMAME 73, p. 173
BR94: Brezzi and Russo, MMMAS 4, p. 571-
NJL05: Nagrath et al., CMAME 194, p. 4565-
MDG05: Mourad et al., IJNME 64, p. 1009
ZCM096: Zhao et al., JCP 127, p. 179-
CS89: Cockburn and Shu, Math. Comp. 52, p. 411-
MRC06: Marchandise et al., JCP 212, p. 338-
SCMB01a: Sukumar et al., CMAME 190, p. 6183-
JCD02: Ji et al., IJNME 54, p. 1209-
CSB02: Chessa et al., IJNME 53, p. 1959-
DFJ05: Dolbow et al., CMAME 194, p. 4447-
ZGT06: Zabaras et al., JCP, in press
JMFD06: Ji et al, IJSS 43, p. 1878-
CB03: Chessa and Belytschko, IJNME 58, p. 2041-
PMOZK99: Peng et al., JCP 155, p. 410-

Overview of Level Sets 49

You might also like