• No results found

Fast Numerical Methods for Evolving Interfaces

N/A
N/A
Protected

Academic year: 2020

Share "Fast Numerical Methods for Evolving Interfaces"

Copied!
112
0
0

Loading.... (view fulltext now)

Full text

(1)

KUSTER, CHRISTOPHER M. Fast Numerical Methods for Evolving Interfaces. (Under the direction of Professor Pierre Gremaud).

(2)
(3)
(4)

I would like to dedicate this dissertation to my wife, Sandy, and my daughter, Clarissa,

(5)

Biography

Christopher Kuster, son of Clarence and Susan Kuster, was born in Doylestown, Pennsylvania in the spring of 1973. About a year later, they moved, first to California, living for a summer in the shadow of Disneyland, and then to Bald Bluff township in Illinois to take up farming.

Christopher spent most of his early life working and playing on the farm with his sister Wendy. He attended Westmer High School in Joy, Illinois with a brief stint at the Illinois Mathematics and Science Academy his sophomore year. While in high school, he was very active, taking part in band, cross country, track, and academic bowl.

After high school, Christopher went on to attend Knox College in Galesburg, Illinois. There, he was a double major in Physics and Mathematics, took part in biophysics research with Professor Charles Schulz, was president of the fencing club, and played trumpet in the college jazz band.

(6)

Acknowledgements

(7)

Contents

List of Tables vii

List of Figures ix

1 Introduction 1

1.1 General Introduction . . . 1

1.2 Dissertation Overview . . . 2

2 Tools 4 2.1 Moving Boundary Problem . . . 4

2.1.1 Level Set Formulation . . . 5

2.1.2 Stationary Formulation . . . 6

2.1.3 Viscosity Solution . . . 6

2.2 Boundary Representations . . . 9

2.2.1 Explicit Representation . . . 9

2.2.2 Implicit Representation . . . 10

2.3 Signed Distance Function . . . 11

2.3.1 Classical Approach . . . 14

2.3.2 Projection Methods . . . 17

2.3.3 Discretization . . . 24

2.3.4 Stability . . . 26

2.3.5 Fast Marching . . . 31

2.3.6 Fast Sweeping . . . 32

2.3.7 Other Methods . . . 35

2.3.8 Eikonal Solver Comparison . . . 36

2.3.9 Narrow Band Implementations . . . 37

2.4 Time Evolution . . . 38

2.4.1 Velocity Extension . . . 38

2.4.2 HJ WENO TVD-RK . . . 39

2.5 Boundary Element Method . . . 40

(8)

2.5.2 Integral Equation . . . 42

2.5.3 Discretized Integral Equation . . . 44

2.5.4 Linear Solvers . . . 45

3 Numerical Methods 47 3.1 Second Order Fast Marching with Obstacles . . . 47

3.2 Moving Boundary Methods . . . 50

3.2.1 Second Order Time Dependent . . . 50

3.2.2 Iterative Method for Static Free Boundary Problems . . . 52

4 Numerical Results 58 4.1 Solving the Eikonal Equation . . . 58

4.1.1 Application/Motivation via. Sand Piles . . . 58

4.1.2 Second Order Fast Marching with Obstacles . . . 64

4.1.3 Fast Marching vs. Fast Sweeping . . . 66

4.2 Fast Methods for Moving Boundary Problems . . . 72

4.2.1 Projection Accuracy . . . 72

4.2.2 Simple Velocity Fields . . . 74

4.2.3 External Bernoulli Problem . . . 81

5 Concluding Remarks 87 5.1 Review of New Results . . . 87

5.2 Future Directions . . . 88

Bibliography 89 A Fast Multipole Method 95 A.1 Method Overview . . . 95

A.2 Performance . . . 98

(9)

List of Tables

4.1 Convergence study for formally first and second order methods in the presence of a circular obstacle in a domain Ω = (0,6)2 (Example 2);

M measures the number of nodes on one edge of the domain, i.e., total number of nodes N =O(M2). . . . . 69

4.2 Runtime for first order FM and FS on a uniform cartesian mesh for Examples 1, 2 and 3 (N =O(M2)). . . . . 72

4.3 Runtime for first order FM and FS on a uniform cartesian mesh for Examples 1, 2 and 3 (N =O(M2)). . . 73 4.4 L∞ errors of the boundary location and runtimes for two projection

methods applied to finding a simple boundary. . . 74 4.5 CPU time (in seconds) versus size of the mesh. The above rates refer

to α, where time=O(h−α) for the PDE approach (Section 2.3.1), the

Fast Marching method with projections from 2.3.2 (Taylor) and from 2.3.2 (Min.) respectively. . . 76 4.6 Constant expansion: L∞-error of the projection for the PDE approach,

the “Taylor” approach from 2.1.1 and the minimization method of 2.1.2. 78 4.7 Rotation of an off center circle: L∞-errors, convergence rates and CPU

times (in seconds) after one complete rotation. . . 78 4.8 Area loss, L1 errors and rates and CPU time (in seconds) for the

Za-lesak’s disk rotation problem for Fast Marching with projection from 2.3.2.. . . 81 4.9 Internal boundary: 1 circle at origin. Relative tolerance 1e-3. Initial

guess inside of solution. . . 82 4.10 Internal boundary: 1 circle at origin. Relative tolerance 1e-3. Initial

guess outside of solution. . . 83 4.11 Internal boundary: 2 circles on diagonal. Relative tolerance 1e-3.

Ini-tial guess inside of solution. . . 84 4.12 Internal boundary: 2 circles on diagonal. Relative tolerance 1e-3.

(10)

A.1 Percent time spent Contouring, solving the boundary element linear system (LS), extending the velocity field and smoothing the level set function with Fast Marching (FM), and doing the “time” evolution for both the Full Matrix multiplication and Fast Multipole Method. N is the number of evenly spaced nodes on the inner boundary and is equal to 2π/∆x. . . 96 A.2 Full matrix vs. Fast Multipole Method, Internal boundary: 1 circle

(11)

List of Figures

2.1 Illustration of moving boundary problem setup. . . 5

2.2 Possible solutions to the 1-D eikonal equation w/two boundary points (sources) at x= 0 and x= 1. . . 7

2.3 Left: Initial boundary, Right: Embedding in higher dimensional level set function. . . 9

2.4 Left: Discretized implicit representation, Right: Discretized explicit representation. . . 10

2.5 Stencils for third order WENO derivative approximation . . . 16

2.6 All possible cases for the simple projection method.. . . 18

2.7 Exact solution (x?), approximate solution (x¯), and 9 point stencil for the Taylor approximation method around the point x0. . . 19

2.8 Upwind discretization for the eikonal equation. . . 25

2.9 Root locus curve for recursively defined discretization (n = 5). . . 28

2.10 Root locus curve for older second order discretization (Sethian). . . . 29

2.11 Root locus curve for older “third order” discretization (Chopp).. . . . 30

2.12 Array and corresponding binary tree in the Heap Sort. . . 32

2.13 Four sweep orderings for Fast Sweeping in 2D. . . 33

2.14 Contouring a triangular mesh. . . 42

2.15 Two possible contourings of a square mesh. . . 43

2.16 Domain for (2.82)-(2.84). . . 44

3.1 Adding nodes increases accuracy of Fast Marching method. . . 48

3.2 Extrapolation of velocity field to points near the boundary.. . . 54

3.3 Time step is chosen as half the linear extrapolation of the current solution. 56 4.1 Left: Pile without obstacle, Right: Pile with cylindrical obstacle . . . . 59

4.2 Force diagram for single grain on the surface of the pile. . . 60

4.3 Obstacle: cylinder, source on side of domain. . . 62

4.4 Exact solution for region with circular obstacle. . . 63

4.5 Obstacle: square prism, source on side of domain. . . 64

(12)

4.7 Pile forming over a truncated cone. . . 66 4.8 Example of a bin with an insert . . . 67 4.9 Volume as a function of height for materials with different angles of

repose. . . 68 4.10 Error plots for: Cartesian Grid (left), Modified Grid (right). Circular

obstacle with source at upper left corner of the domain. . . 70 4.11 Error as a function of runtime for various Fast Marching schemes. . 71 4.12 Domains for numerical examples . . . 71 4.13 Contour plot of solution for Example 3 (5 partial rings). . . 73 4.14 Contour plot of solution for N = 400 domain with random slowness

function. . . 74 4.15 L1 and Lerror (compared to final iteration) after each sweep for

Example 3 (5 partial rings). . . 75 4.16 Constant expansion using Fast Marching with projection from 2.3.2:

L1 (diamond) andL(circles) rates of convergence in the tube/narrow

band under grid refinement: L1-rate ≈3.14, L∞-rate ≈2.58. . . 76 4.17 Comparison after one rotation on a100×100 grid, left, and a200×200

grid, right, for the Zalesak’s disk using Fast Marching with projection from 2.3.2.. . . 79 4.18 Rotation of Zalesak’s disk with Fast Marching with projection from

2.3.2: L1 (diamond) and L(circles) rates of convergence in the

tube/narrow band under grid refinement: L1-rate≈2.93, L∞-rate≈1.01. 80 4.19 Boundary at iteration 0, 1, 2, and 15 for N = 100 case of 2 circles

example with initial iterate inside solution. . . 83 4.20 L∞ Convergence histories for 1 circle (left) and 2 circles (right)

exam-ples. Internal start vs. External start. . . 85 4.21 L∞ error under grid refinement for 1 circle (left) and 2 circles (right)

examples w/internal start. . . 85

(13)

Chapter 1

Introduction

1.1

General Introduction

Free and moving boundary (or interface) problems appear in a large number of applications. Free boundary problems involve an unknown interface and can be either static or time dependent. Moving boundary problems are time dependent with an interface that is either known or unknown. Note that this implies that some moving boundary problems are also free boundary problems. In this dissertation, only prob-lems with unknown interfaces are considered and “free boundary problem” will refer only to the static case.

(14)

be thought of as a moving boundary problem [55] though “moving through what” is a good question. More examples exist, but this partial list shows that the applications where these types of problems occur are not only large in number, but also span many fields of study. The uniqueness, stability, and regularity of solutions to these problems is of great interest and has been studied in detail [6, 10, 18, 27, 1, 9, 12].

This dissertation focuses on the development of fast and accurate numerical meth-ods for solving free and moving boundary problems. Due to the prevalence of these problems, there are a large number of solution methods in existence. Our techniques (see Sections 3.2.1 and 3.2.2) make use of the relatively recent development of fast eikonal solvers (see Section 2.3) to achieve low complexity algorithms with high ac-curacy.

1.2

Dissertation Overview

(15)

addition to the published results, this dissertation includes a study of the stability and accuracy of several discretizations used with Fast Marching in Section 2.3.4. Also Fast Marching and Fast Sweeping are applied to a domain with a random slowness function (see Section 4.1.3) similar to those found in geophysical applications.

The other portion of this research is related to free and moving boundary prob-lems. In Section 3.2.1, a new, second order accurate method for solving general moving boundary problems is defined with numerical results in Section 4.2.2. In the development of this method, a new method for projecting grid points onto an implic-itly defined boundary is defined (see Section 2.3.2). These results will soon appear in [30]. A new iterative method for solving free boundary problems is developed in Section 3.2.2. Numerical results for this method applied to the external Bernoulli problem are shown in Section 4.2.3. A paper with this technique and results has been submitted for publication [39] and is currently available as a tech report at the CRSC website1.

The structure of this dissertation is as follows. Chapter 2 defines moving boundary problems and the tools that we use to solve them. Chapter 3 describes the new numerical methods developed for 1) increasing the accuracy of the Fast Marching method in domains with obstacles, 2) solving moving boundary problems, and 3) solving free boundary problems. Finally, Chapter 4 contains numerical studies of all of the described methods.

(16)

Chapter 2

Tools

In this chapter, we investigate several numerical tools. These range from geometric constructions to optimal graph traversal methods to techniques for solving differential equations. Chapter 3 will focus on how these methods are combined to solve moving boundary problems.

2.1

Moving Boundary Problem

Consider a closed, non-self intersecting, simply connected, n − 1 dimensional boundary, Γ(t) enclosing a domain A(t) ⊂ Rn. For future reference, let Ψ

Rn

be a fixed domain large enough to contain A(t) for all t. For both one-parameter families,{Γ(t)}t≥0,{A(t)}t≥0, the parametert≥0 can be thought of as the time. For

stationary problems, or when confusion is not possible, the explicit dependence on t

will be dropped in the notation. Suppose that velocity of the boundary is given by a function v : Γ(t)→ Rn (see Figure 2.1). The goal of a moving boundary problem is

(17)

( )

t

( )

t

ξ

( )

t

F n

v

A

Ψ

Figure 2.1: Illustration of moving boundary problem setup.

2.1.1

Level Set Formulation

Let Γ(t) be represented as the zero level set of a functionφ : Ψ×[0,∞)→R,

Γ(t) ={x∈Ψ;φ(x, t) = 0}. (2.1)

If we look at the path of a point ξ(t) on the boundary, then the condition

φ(ξ(t), t) = 0 (2.2)

must hold for all time. Using the chain rule, the time evolution of the boundary is given by

d

dtφ(ξ(t), t) = ∂tφ(ξ(t), t) +∇φ(ξ(t), t)·v = 0. (2.3)

where

ξ0(t)≡v. (2.4)

If F is the outward normal speed, then v ·n = F where n is the outward normal vector to the curve Γ(t) at the point ξ(t) with respect to the enclosed domain A(t).

(18)

φ. There is some freedom in choosing how to extendF. The only real criterion is that it be consistent on the boundary. Section 2.4.1 contains information on the extension method used in our work.

Since bothnand∇φare normal to Γ(t), we can writen=∇φ/k∇φk. Substituting into (2.3) and extending F leads to the evolution equation

∂tφ+Fk∇φk= 0 (2.5)

defined on all of Ψ. This is the level set equation first introduced by Osher and Sethian [46]. Below, we will consider a reformulation that is possible when the sign of F is constant.

2.1.2

Stationary Formulation

If the function F is positive, then (2.5) can be rewritten in a stationary formula-tion. Let f(x) be the time at which the zero level set of φ passes through the point

x. Then φ(x, f(x)) = 0 for all time, so

∇φ(x, f(x)) =∇φ+∂tφ∇f = 0. (2.6)

Using the result in (2.5),

∇φ =Fk∇φk∇f. (2.7)

Taking the norm leads to the eikonal equation

k∇f(x)k= 1/F =S (2.8)

where the function S, as the inverse of the speed, is referred to as the slowness function.

2.1.3

Viscosity Solution

(19)

Hamilton-Jacobi equations. These are equations of the form

α∂tφ+H(x,∇φ(x)) = 0, (2.9)

where the functionH is referred to as the Hamiltonian and the parameter, αis either 0 corresponding to a static problem, or 1 corresponding to a time dependent problem. It is well known that, even with a smooth Hamiltonian and smooth boundary data, (2.9) generally has no classical solutions, i.e. continuous solutions with continuous first derivatives. As an example, consider the 1-D eikonal equation (2.8) with the boundary conditions shown below.

H(x,∇φ(x)) = 1− kφ0(x)k= 0, φ(0) = 0, φ(1) = 0 (2.10)

From the differential equation,φ0(x) =±1, but the boundary data cannot be satisfied without changing from the positive to negative derivative at some point.

x

0

1

φ

x

0

1

φ

Figure 2.2: Possible solutions to the 1-D eikonal equation w/two boundary points (sources) at x= 0 and x= 1.

Since there may be no classical solutions, we look for weak solutions to (2.9). In general, there are an infinite number of weak solutions (see Figure 2.2). A particular class of weak solutions, known as viscosity solutions, were first defined for Hamilton-Jacobi equations by Crandall and Lions [17]. In [16], they showed that the viscosity solutions defined below are the same as those found using the vanishing viscosity method (thus the name) where the solution is taken as the solution to

(20)

in the limit where →0. Viscosity solutions can be expressed using subdifferentials,

D−φ(x), and superdifferentials, D+φ(x). These are defined as follows

D−φ(x) =np∈RN : lim y→xinf

φ(y)−φ(x)−p·(y−x)

kx−yk ≥0

o

(2.12)

D+φ(x) = np∈RN : lim

y→xsup

φ(y)−φ(x)−p·(y−x)

kx−yk ≤0

o

. (2.13)

A function φ(x) is a viscosity solution of a static (α = 0) Hamilton-Jacobi equa-tion,

H(x,∇φ(x)) = 0 (2.14)

on a domain Ψ⊂RN if two conditions hold

H(x, p)≥0 for all x∈Ψ and p∈D−φ(x)

H(x, p)≤0 for all x∈Ψ and p∈D+φ(x).

(2.15)

The viscosity solution satisfies several properties. Any classical solution of (2.14) satisfies (2.15). In any region that φ(x) is differentiable, the sub/superdifferentials are the same and are equal to the gradient of theφ(x). Under mild assumptions onH, the viscosity solution for a Hamilton-Jacobi problem is unique. For instance, for (2.8), the viscosity solution is unique as long as S >0. Note that the viscosity solution of

H(x,∇φ(x)) = 0 is not the same as the viscosity solution of −H(x,∇φ(x)) = 0. In the case of the 1-D eikonal equation (2.8) with S = 1,

H(x,∇φ(x)) = 1− |φ0(x)|, φ(0) = 0 (2.16)

leads to a viscosity solution that increases with distance from 0, but

H(x,∇φ(x)) =|φ0(x)| −1, φ(0) = 0 (2.17)

(21)

2.2

Boundary Representations

2.2.1

Explicit Representation

In order to define the numerical methods, we need a way to represent the bound-ary (Figure 2.3(Left)) numerically. One way to do this is to store a set of points,{ξj},

on the boundary (Figure 2.4(Right)). Numerical methods that apply this technique to solving moving boundary problems are known as front tracking methods [45] or marker/string methods [52]. These methods solve (2.4) for each point, ξj, on the

boundary, where v(ξj) is the velocity at the point ξj. This is commonly called a

Lagrangian (particle fixed) formulation of the problem. Such methods have the ad-vantage of complexity and memory usage of the same order as the number of points describing the boundary. Disadvantages of these approaches include possible clus-tering of boundary nodes and difficulties in dealing with topological changes of the boundary [52].

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1

(22)

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1 !1

!0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1

!1

!0.8

!0.6

!0.4

!0.2 0 0.2 0.4 0.6 0.8 1

Figure 2.4: Left: Discretized implicit representation, Right: Discretized explicit representation.

2.2.2

Implicit Representation

We avoid the problems listed above by using the level set formulation described in Section 2.1. The cost of doing this is an increase in the dimension of the problem since the 1-dimensional boundary is viewed as the zero level set of a 2-dimensional function (Figure 2.3(Right)). By convention, the level set function is chosen such that it is negative inside the boundary and positive outside. Instead of following the positions of nodes on the boundary as in Section 2.2.1, we store the value of the level set function at every point on a fixed Cartesian grid, {Ψij} with grid size ∆x (Figure 2.4(Left))

covering the domain Ψ. Since the grid is fixed, there is not an opportunity for the node clustering that can occur with the explicit representation. Reconnection of the boundary due to changes in topology of the boundary is not an issue unless it is required for velocity computation (see Section 3.2.2) since the boundary is never explicitly defined. Methods that use this representation for the moving boundary problem are called a level set methods. The boundary is moved implicitly by solving the Eulerian (grid fixed) formulation of the evolution equation [45, 52].

∂φ(x, t)

(23)

on the points, {Ψij}, of the Cartesian grid. This equation is similar to (2.5), but

uses an extension of the vector velocity, v, instead of the scalar velocity, F. The vector valued velocity defines an upwind direction for use in discretizing the gradient of φ with the WENO (see Section 2.3.1). In the case of a fixed vector velocity field on all of Ψ, uniform rotation for example, v can be found trivially. However, when the velocity field is only defined by F on the boundary, the vector velocity off the boundary is defined as v =F∇φ.

The remainder of this chapter deals with numerical techniques commonly used in level set methods. Also included are some techniques not usually found in level set methods that we employ for solving problems where the velocity on the bound-ary is determined through solving a differential equation on the domain inside the boundary.

2.3

Signed Distance Function

Some level set functions are numerically better to work with. The signed distance function in particular has many desirable properties. The magnitude of the value of this function at a particular point is the distance from that point to the closest point on the boundary. The sign of the signed distance function changes across the boundary. For a closed curve, the values inside the curve are chosen to be negative and the values outside are chosen to be positive. The signed distance function with this choice of sign is also called the oriented distance function [19].

One of the properties that makes the signed distance function nice for numerical methods is that, near the boundary, it has the same smoothness as the boundary [37]. This is important since numerical methods generally lose accuracy where there is low regularity. For example, consider the distance function from the origin,

d(x, y) = px2+y2. (2.19)

(24)

approximation of ∇d, then the error scales as ∆xD2d. The first and second partials with respect to xare

∂xd(x, y) =

x

p

x2+y2

∂xxd(x, y) =

1

p

x2+y2 +

2x2

(x2 +y2)3/2 =O

1 |x|

.

(2.20)

Near the origin, |x| ≈ ∆x, so the error is O(1), constant with respect to the grid size. For this reason, accuracy studies exclude a fixed region around the boundary in examples where the boundary is a single point.

When the boundary is a smooth, closed curve, the discontinuity problems do not occur. By definition, the signed distance function is C0 regardless of the boundary. Theorem 2.1 shows that the signed distance function for a C1 curve is C1 for points

near the boundary. This is extended toCk curves in [37].

Theorem 2.1 (simplified version of [37], Theorem 2)

Let Γ ⊂ R2 be a closed, simply connected C1 curve, and let A

R2 be the open

set with Γ as its boundary. If Γ has positive reach, i.e. there exists δ > 0 such that for each x∈Γ, every point, y in the open ball of radius δ centered at x has a unique nearest point in Γ (the largest such δ is referred to as reach(Γ)), then there exists an open neighborhoodU of Γ such that the signed distance function, d:R2

R, is aC1

function.

Proof. (following [37])

Fix a pointp∈Γ and choose coordinates tangent,ξ, and normal,η, to Γ atpwith

p at the origin. In a neighborhood of p, Γ is then given by {(t, f(t)) : t ∈ [−r, r]}, where r >0 andf isC1 with f(0) = 0 and (∂f /∂t)(0) = 0. It is now only necessary

to show that there is an open ball containing p on whichd(x) is C1.

(25)

t=t(ξ, η) satisfies |t|< r. Now,t is an extreme point for the function

S(t) = (t−ξ)2+ (f(t)−η)2. (2.21)

Thus,

0 = ∂

∂t

(t−ξ)2+ (f(t)−η)2

= 2(t−ξ) + (f(t)−η)f0(t).

(2.22)

Using [24], Theorem 4.8(4), we see that t(ξ, η) is a continuous function of (ξ, η)∈W. Now consider a point (ξ, η)∈W. Using (2.22), we compute

(d(ξ, η))2 = (t−ξ)2+ (f(t)−η)2

= ((f(t)−η)f0(t))2+ (f(t)−η)2

= (f(t)−η)2(1 + (f0(t))2).

(2.23)

Without loss of generality, we know that

d(ξ, η) = (f(t)−η) 1 + (f0(t))21/2. (2.24)

For (ξ, η)∈W \Γ we have, from [24], Theorem 4.8(3,5), and (2.22) and (2.23),

∂d

∂ξ(ξ, η) = (d(ξ, η))

−1(ξt)

= ξ−t

f(t)−η 1 + (f

0

(t))2−1/2

=f0(t) 1 + (f0(t))2−1/2

(2.25)

and

∂d

∂η(ξ, η) = (d(ξ, η))

−1(ηf(t))

=− 1 + (f0(t))2−1/2

(2.26)

Now, the right hand sides of (2.25) and (2.26) are continuous function of (ξ, η) on all ofW, so by [24], Theorem 4.7, (2.25) and (2.26) hold for all (ξ, η)∈W and d(ξ, η) is C1 in a domain of width r about Γ.

(26)

the possibility of truncation error with very large or very small gradients. Finally, the reason that a signed distance function is used instead of the usual distance function is that the gradient is continuous across the boundary (except where the boundary is not locally C1). A discontinuity at the boundary reduces the effectiveness of the

contouring and projection methods described in Sections 2.5.1 and 2.3.2.

The signed distance function from a given boundary is the viscosity solution to the eikonal equation (2.8) with the slowness function, S = 1 and the boundary condition that the signed distance on the boundary is zero. The remainder of this section is devoted to describing various numerical methods for solving the general eikonal equation (2.8).

The eikonal solver described in Section 2.3.1 is a third order method, however, it is slow to converge, especially when there are large gradients to smooth out. One solution is to use an upwind finite difference approach and attempt to compute each node as few times as possible. There are several such methods in existence (see Sec-tions 2.3.5–2.3.7). These methods all share the same discretization (see Section 2.3.3) and differ only in the order in which the nodes are computed. For these upwind meth-ods to work, they need the values of the signed distance function to be supplied near the boundary. This is accomplished through a projection process. Several methods for performing projections are described in Section 2.3.2.

2.3.1

Classical Approach

PDE Method

(27)

can be written

∂tφ(x, t) +sgn(φ(x, t))(k∇φ(x, t)k −S(x)) = 0, (x, t) in Ψ×[0,∞],

φ(x,0) =φ0(x), x in Ψ

(2.27)

where φ0 is a generic level set function with zero level set equal to Γ. The solution

is then taken as limt→∞φ(x, t). In the discrete case, the values of φ0 are only known

at Ψij. Since only the steady state solution is of interest, the integration of this

differential equation can be done using a simple forward Euler scheme in time and a third order WENO scheme for the gradient calculation as defined below. This leads to a third order accurate method as long as a sufficient number of time steps are taken. The accuracy is demonstrated in Section 4.2.2.

WENO Gradient Approximation

Weighted essentially non-oscillatory (WENO) schemes are used to find highly accurate approximations of derivatives in regions where the smoothness of the function is unknown. The basic idea is that a WENO scheme will use high accuracy centered differences when the function is smooth, but revert to a lower order single-sided approximation near where the derivative is discontinuous. This solves the problem that high order centered approximations have with smoothing near discontinuities in the derivative.

(28)

WENO in 1-D

The following WENO scheme is taken from [34] and is specifically recommended for use with Hamilton-Jacobi equations. Let φ : RR be a Lipschitz continuous function with piecewise smooth derivatives and {xk}be a uniform discretization of R

with spacing ∆x. Define

φk =φ(xk), ∆+φk =φk+1−φk, ∆−φk =φk−φk−1 (2.28)

x

i−2

x

i−1

x

i

x

i+1

x

i+2

Left biased stencil

Right biased stencil

Figure 2.5: Stencils for third order WENO derivative approximation

The third order WENO approximation to φx(xi) on the left-biased stencil

(Fig-ure 2.5) is given by

φ−x,i= 1 2

∆+φ

i−1

∆x +

∆+φ i ∆x − ω− 2 ∆+φ

i−2

∆x −2

∆+φi1

∆x +

∆+φ i ∆x where ω− = 1 1 + 2r2

, r− =

+ (∆−∆+φ

i−1)2

+ (∆−+φ

i)2

and on the right biased stencil (Figure 2.5) by

φ+x,i = 1 2

∆+φi−1

∆x +

∆+φi

∆x

− ω+ 2

∆+φi+1

∆x −2

∆+φi

∆x +

∆+φi−1

∆x

where

ω+ =

1 1 + 2r2

+

, r+ =

+ (∆−∆+φi+1)2

+ (∆−+φ

i)2

(29)

The value of is chosen to be small (roughly 10−6) and appears in the relations to keep the denominator for going to zero.

This method is adapted to multiple dimensions by simply applying the above relations separately in each direction. It is used in Section 2.4.2 to discretize the boundary evolution equation and in Section 2.3.1 to find the signed distance function.

2.3.2

Projection Methods

Many of the methods of solving for the signed distance function (see Sections 2.3.5 (Fast Marching), 2.3.6 (Fast Sweeping), etc.) require that the solution be given initially in a small tube of size ∆x around the boundary. In order to find the signed distance function at these points, we use a process known as projection. Because the boundary is defined implicitly on only some discrete set, the problem is ill-posed. In order to solve the problem, assumptions must be made about the smoothness of the level set function. Most of the methods mentioned in this section assume that the function is at least twice differentiable. Since this may not be the case, we employ methods utilizing a small stencil so there is less potential for instability of the solution in regions with low regularity. The following projection methods are performed at each point adjacent to the boundary.

Simple Projection

(30)

the distance of the node to the boundary is taken as the minimum of the distances between the node and the interpolated zeros. When there are two zeros not on the same grid line (Figure 2.6 (bottom left)) or three zeros (Figure 2.6 (bottom middle)), the distance is taken to be the minimum distance to the lines connecting the zeros on different grid lines. This method is first order accurate, and in practice, seems to be used only when more accurate methods fail.

Figure 2.6: All possible cases for the simple projection method.

Taylor Approximation

A projection method based on a Taylor approximation of the function was in-troduced in [33]. The function φ(x) can be expanded in a neighborhood of x0 as

φ(x) = φ(x0) +∇φ(x0)·(x−x0) +

1

2(x−x0)

T

Hφ(x0)(x−x0) +. . . (2.29)

where Hφ(x) is the symmetric Hessian matrix

Hφ(x) = 

 ∂2φ

∂x2

∂2φ

∂x∂y

∂2φ

∂x∂y ∂2φ

∂y2

(31)

x x

x *

0

Figure 2.7: Exact solution (x?), approximate solution (x¯), and 9 point stencil for the

Taylor approximation method around the point x0.

If we assume that the projection of x0 onto the curve where φ(x) = 0 is in the

direction of the (negative) gradient of φ at x0 and truncate the Taylor expansion at

three terms, we can substitute ¯x−x0 = ¯α∇φ(x0) resulting in the following quadratic

equation

0 = φ(x0) + ¯αk∇˜φ(x0)k2+ ¯α2

1

2( ˜∇φ(x0))

TH˜

φ(x0)( ˜∇φ(x0)). (2.31)

where we define the numerical gradient, ˜∇φ, and Hessian, ˜Hφ, at the point xij on a

Cartesian grid with size ∆x by standard central differences

∂φij

∂x =

φ(i+1)j−φ(i−1)j

2∆x ,

∂φij

∂y =

φi(j+1)−φi(j−1)

2∆x ∂2φ

ij

∂x2 =

φ(i+1)j −2φij +φ(i−1)j

(2∆x)2 ,

∂2φ

ij

∂y2 =

φi(j+1)−2φij +φi(j−1)

(2∆x)2

∂2φ

ij

∂x∂y =

(φ(i+1)(j+1)−φ(i−1)(j+1))−(φ(i+1)(j−1)−φ(i−1)(j−1))

(2∆x)2 .

(2.32)

We chose, ¯α to be the root of (2.31) closest to zero with the same sign as φ0. Then

the projected point xis calculated using

¯

(32)

and the distance obtained using the Euclidean norm, k¯x−x0k.

It is possible that the quadratic equation (2.31) has no real roots. This can occur if the boundary is not smooth, or is changing over a distance that is unresolved by the numerical grid thus making the finite difference formulas (2.32) unreliable. When this happens, another method (such as the simple projection defined above) must be employed.

The Taylor Approximation method is third order accurate. This is illustrated in the following argument. If we assume that the level set function, φ(x), is a signed distance function with positive reach, i.e. every point within a couple ∆x of the boundary has a unique closest point on the boundary, then the exact problem is

0 =φ(x0) +∇φ(x0)(x∗−x0) +

1 2(x

x0)THφ(x0)(x∗−x0) +O(∆x3) (2.34)

wherex∗ denotes the position of the exact projection (see Figure 2.7) and is given by

x∗ =x0+α∗∇φ(x0). (2.35)

Substituting (2.35) into (2.34) results in

0 = φ(x0) +α∗k∇φ(x0)k2+

(α∗)2

2 (∇φ(x0))

TH

φ(x0)∇φ(x0). (2.36)

Using the discretization of the gradient and Hessian given by (2.32)

˜

∇φ(x0) = ∇φ(x0) +O(∆x2) and H˜φ(x0) = Hφ(x0) +O(∆x). (2.37)

Assumingφis a signed distance function,k∇φk= 1, ¯α =O(∆x), and (2.31) becomes

0 =φ(x0) + ¯α+

¯

α2

2 (∇φ(x0))

TH

φ(x0)∇φ(x0) +O(∆x3). (2.38)

Subtracting (2.38) from (2.36) yields

0 = (α∗−α¯) + 1 2((α

)2−α¯2)(∇φ(x0))THφ(x0)∇φ(x0) +O(∆x3)

= (α∗−α¯) + 1 2(α

¯

α)(α∗+ ¯α)(∇φ(x0))THφ(x0)∇φ(x0) +O(∆x3)

(33)

and

α∗−α¯ = O(∆x

3)

1 +O(∆x)(∇φ(x0))THφ(x0)∇φ(x0)

=O(∆x3) (2.40)

showing that the Taylor approximation method is third order accurate.

Constrained Optimization Method

Finding the projection of the point (x0, y0) onto the curve defined by φ(x, y) = 0

can also be viewed as a constrained optimization problem1. In [30], we introduced a new projection method based on classical, Lagrange multiplier solution techniques. This involves minimizing the square of the cartesian distance, (x−x0)2+ (y−y0)2

subject to the constraint, φ(x, y) = 0.

Since φis only known on grid points, we approximate the problem as follows. For each grid point, (xi, yj), near the boundary, we use the values ofφon a 9 point stencil,

consisting of (xi, yj) and its 8 closest neighbors, to approximate φ(x, y) as a unique

Q2 function in the vicinity of (xi, yj). Q2 functions are polynomials with degree 2 in

each variable. The Q2 function corresponding to the values of φ on the given stencil

is found by solving the linear system

a0+a1xk+a2ym+a3xkym+a4x2k+a5y2m+a6x2kym+a7xkym2 +a8x2ky

2

m =φ(xk, ym) (2.41)

wherek=i−1. . . i+ 1 andm=j−1. . . j+ 1. This is a set of 9 linear equations with 9 unknowns. If the local discretization is translated and scaled such that (xi, yj) =

1Here, xand y are scalars instead of points in

R2. The precise meaning should be clear from

(34)

(0,0), and the grid size is, ∆x= 1, then the solution is given by

a0 =φij, a1 = (φ(i+1)j−φ(i−1)j)/2, a2 = (φi(j+1)−φi(j−1))/2

a3 = ((φ(i+1)(j+1)−φ(i−1)(j+1))−(φ(i+1)(j−1)−φ(i−1)(j−1)))/4

a4 = (φ(i+1)j −2φij +φ(i−1)j)/2, a5 = (φi(j+1)−2φij +φi(j−1))/2

a6 = ((φ(i+1)(j+1)−φ(i+1)(j−1))−2(φi(j+1)−φi(j−1))

+ (φ(i−1)(j+1)−φ(i−1)(j−1)))/4

a7 = ((φ(i+1)(j+1)−φ(i−1)(j+1))−2(φ(i+1)j −φ(i−1)j)

+ (φ(i+1)(j−1)−φ(i−1)(j−1)))/4

a8 = ((φ(i+1)(j+1)−2φ(i+1)j +φ(i+1)(j−1))−2(φi(j+1)−2φij +φi(j−1))

+ (φ(i−1)(j+1)−2φ(i−1)j+φ(i−1)(j−1)))/4.

The usual approach for solving constrained optimization problems is known as the method of Lagrange multipliers. Instead of solving the constrained problem, an unconstrained problem is constructed such that the solutions to the unconstrained problem are potential solutions to the constrained problem [42]. More precisely, let (x∗, y∗) denote a local solution to the constrained optimization problem given at the beginning of this section. If we define the Lagrangian of the problem to be

L(x, y, λ) = (x−x0)2+ (y−y0)2+λq2(x, y), (2.42)

then the extrema satisfy

∇(x,y,λ)L(x∗, y∗, λ∗) = 0 (2.43)

where λ∗ is known as a Lagrange multiplier for the system. This leads to the system of equations

2(x∗ −x0) +λ

∂q2(x∗, y∗)

∂x = 0

2(y∗−y0) +λ

∂q2(x∗, y∗)

∂y = 0 q2(x∗, y∗) = 0.

(35)

Since this is a nonlinear system, Newton’s method (or similar) must be used to find the solution. This projection method has the advantage that it finds the correct projection onto theQ2 patch as opposed to the methods proposed in the next section.

For smooth boundaries, this method has been numerically verified to be third order (see Section 4.2.1). The extra order of convergence is due to the fact that it is only applied in a region within ∆xof the boundary.

Other Methods

There are at least two other projection methods that can use the Q2 patch

de-scribed in the previous section. The first, used in [44], involves starting at the point

x0 and repeatedly applying the recursion relation

xi+1 =xi−φ(xi)

∇q2(xi)

k∇q2(xi)k

(2.45)

until|φ(xi)| ≤, where ∈R+ is small. It is noted in [44] that this process does not

always converge, in this case, the projection described in Section 2.3.2 should be used instead.

Another method, used in [15], is to use Newton’s method (or similar) to solve for where q2(x) = 0 with x0 as the initial iterate. The disadvantage of this is that the

condition is satisfied at every point on the approximate boundary. So if the method converges, it may not converge to the desired point.

Higher order approximations to φ(x) are also possible. Chopp suggested using a bi-cubic approximation involving a 16 node stencil that is not centered on the node in question [15]. It has the advantage of creating a function that is globally continuous and smooth. The large stencil means that this method is less localized than the other methods discussed. Since we have not found it necessary to use a higher order approximation, we have not attempted to implement methods using this approximation of φ(x), however, this approximation can be used in place of the Q2

(36)

Method Comparison

We have now introduced several methods for finding the distance function near the boundary. The simple projection method is a direct method that is fast, easy to implement, and always returns a solution. However, the method has a low order of accuracy. The Taylor approximation method is also a fast direct method. It is third order accurate, but does not always return a solution. In regions with large curvature, the quadratic equation in the direction of the numerical gradient may not have a root. The constrained optimization method is a new approach that finds the exact solution to an approximate problem. The results in Section 4.2.1 show that the method is third order accurate. Also shown in Section 4.2.1 is that although this method contains an iterative step, it is as fast as the direct Taylor approximation method and returns a solution with about half the error in practice. The main drawback is that it is more complicated to implement than many of the other methods due to the addition of the Lagrange multiplier. Initial testing of the iterative methods employed by Sethian and Chopp showed them to be slower and less accurate than either the Taylor approximation method or the constrained optimization method. It should be noted, however, that the descriptions of these methods in the literature were not sufficient for us to be certain that our implementations were equivalent to theirs.

2.3.3

Discretization

In order to discretize the eikonal equation (2.8), we use the process described in [53, 54], and consider a node x0 at which the solution φ is to be computed and two

neighboring nodes x1 andx2 at which the values of φ (φ`,`= 1,2) and its derivatives

(∂xφ`, ∂yφ`, `= 1,2) are known or have already been computed (See Figure 2.8). We

define

N` =

x0 −x`

kx0 −x`k

, `= 1,2 and N =

N1

N2 

(37)

whereN is a 2×2 nonsingular matrix, assuming x0,x1 and x2 are not collinear. The

directional derivatives in the directions N1 and N2 are approximated by

D`φ =

φ0−φ`

kx0−x`k

` = 1,2 (to 1st order), (2.46)

D`φ= 2

φ0−φ`

kx0−x`k

−N`·[∂xφ`, ∂yφ`] ` = 1,2 (to 2nd order). (2.47)

Those approximate directional derivatives are linked to the gradient by

D`φ=N`· ∇φ+O(kx0−xikα) or Dφ=N ∇φ+O(hα), (2.48)

where Dφ = [D1φ, D2φ], h = max{kx0 −x1k,kx0−x2k}, and α = 1 or 2 depending

on whether (2.46) or (2.47) is respectively used. Solving for ∇φ and plugging into (2.8) results in the quadratic equation defining the unknownφ0

Dφt(N Nt)−1 = (S(x

0))2. (2.49)

This equation has two solutions. The smaller of the two decreases along characteristics and the larger of the two increases. The larger of the two solutions corresponds to the viscosity solution that we are looking for.

x

x

x

1

0 2

N

N

1

2

Figure 2.8: Upwind discretization for the eikonal equation.

(38)

a direction between the vectorsN1 and N2. This corresponds to the inequality

(N NT)−1Dφ >0. (2.50)

If the upwind condition given by (2.50) fails or the value of φ is only known at a single neighboring node, then the relation

φ0 =φ(x?) +S(x0)kx0−x?k. (2.51)

is applied using the neighboring node x? resulting in the smallest value of φ0. This

corresponds to the gradient lying entirely along the line connecting x0 and x?.

2.3.4

Stability

One issue that appears not previously to have been addressed, is whether the method induced by the discretization is stable. Here, we will examine the stability of a one dimensional version of the discretization given above as well as that of two others found in the literature. The restriction to one dimension is justifiable in that, for the eikonal equation, Fast Marching propagates the information along approximate characteristic lines and is thus approximating a one dimensional process. To see this, consider the 2-D eikonal equation on a polar grid with a point source at the origin and a slowness function identically equal to 1. The characteristic lines are radial, so it can be thought of as the one dimensional equation,|∂rφ|= 1. Note that in general,

the solutions to Hamilton-Jacobi equations do not have their gradients lined up with their characteristics and Fast Marching does not work in the same way [54].

In particular, the type of stability that we will examine is A-stability. This is a measure of how perturbations in the data are amplified by a numerical method. To study the A-stability of a method, we apply it to the test problem

dφ(x)

dx =λφ(t), φ(0) = 1 (2.52)

with solution given by

(39)

We then look at what values of z = λ∆x lead to a characteristic polynomial with roots of magnitude less than or equal to 1, where any roots with magnitude equal to 1 must be simple roots. For the method to be A-stable, the above condition must be true for all z ∈C(p.240 [32]).

If we look at the above discretization in one dimension and assume that the function increases with x, then the discretization is defined by the recursion relation

∂φn

∂x = 2D

xφn−

∂φn−1

∂x . (2.54)

where Dx−φk= (φk−φk−1)/∆x. If we define the derivative at the boundary by

∂φ1

∂x =D

xφ1, (2.55)

then we can express the equation at the node xn as the (n+ 1)-step upwind rule

∂φn

∂x =

1

∆x 2φn+ 4

n−2 X

k=1

(−1)kφn−k+ 3(−1)n−1φ1+ (−1)nφ0 !

. (2.56)

When we apply this method to (2.52), the characteristic polynomial of equation(2.56) is given by

(2−z)ρn+ 4

n−2 X

k=1

(−1)kρn−k+ 3(−1)n−1ρ+ (−1)n. (2.57)

To find the values ofz for which the roots of of (2.57) are less than one in magnitude, we can use the method of root locus curves (p.241 [32]). We set ρ = exp (iθ) and solve for z. This results in a curve inCthat defines the boundary between where the roots have magnitude less than one and where they have magnitude greater than one. The root locus curve corresponding to (2.57) with n = 5 can be seen in Figure 2.9. The result for larger n is similar. The stability region is external to the root locus curve. However, since the root locus curve crosses the imaginary axis, not all of C− is in the stability region. Therefore, this method is only conditionally stable.

The method can be shown to be second order accurate as follows. Equation (2.54) can be written as

∂φn

∂x =

2

∆x(φn−φn−1)− ∂φn−1

(40)

!5 0 5 10 15 20 !15 !10 !5 0 5 10 15

Figure 2.9: Root locus curve for recursively defined discretization (n= 5).

Expanding φn−1 and ∂φ∂xn−1 aroundxn, we obtain

φn−1 =φn−φ0n∆x+φ00n∆x

2

2 −φ

000

n∆x

3

6 +φ (4)

n ∆x

4

4! +O(∆x

5), (2.59)

∂φn−1

∂x =φ

0

n−φ00n∆x+φ000n∆x

2

2 +O(∆x

4). (2.60)

Substituting these into (2.58),

2

∆x(φn−φn−1)− ∂φn−1

∂x =φ

0

n+

∆x2

6 φ

00

n+O(∆x

3

) (2.61)

showing that the discretization is second order accurate.

In his earlier works [51], Sethian described the second order upwind discretization

∂φn

∂x =D

xφn+

∆x

2 D

xD

xφn (2.62)

This can be written as the 2-step upwind rule

∂φn ∂x = 1 ∆x 3

2φn−2φn−1+ 1 2φn−2

(2.63)

Applying this method to (2.52), results in the characteristic polynomial

3 2 −z

ρ2−2ρ+1

(41)

The root locus curve can be seen in Figure 2.10. The stability region is exterior to the curve as before. From this, it can be seen that the stability region includes all of

C− so the method defined by (2.62) is A-stable. We choose to use the conditionally

stable discretization instead because it has a smaller stencil.

0 1 2 3 4 5 6

!3 !2 !1 0 1 2 3

Figure 2.10: Root locus curve for older second order discretization (Sethian).

This method is also second order accurate. Using (2.59) and

φn−2 =φn−φ0n(2∆x) +φ

00

n

(2∆x)2

2 −φ

000

n

(2∆x)3

6 +φ

(4)

n

(2∆x)4

4! +O(∆x

5

) (2.65)

in (2.63) results in

f rac1∆x

3

2φn−2φn−1+ 1 2φn−2

=φ0n− ∆x

2

3 φ

000

n +O(∆x

3

). (2.66)

Showing that the discretization is second order accurate.

In [15], Chopp introduced the upwind approximation given by

∂φn

∂x =D

xφn+

∆x

2 D

xD

xφn+

∆x2

6 D − xD − xD −

xφn. (2.67)

Expanding this leads to the 3-step upwind rule

∂φn ∂x = 1 ∆x 10 6 φn−

15

6 φn−1+φn−2− 1 6φn−3

(42)

with characteristic polynomial

5 3 −z

ρ3− 5 2ρ

2+ρ 1

6. (2.69)

The root locus curve for this method can be seen in Figure 2.11. Again, the stability region is exterior to the curve and includes all of C−. This means that the method is A-stable.

0 1 2 3 4 5 6

!3 !2 !1 0 1 2 3

Figure 2.11: Root locus curve for older “third order” discretization (Chopp).

According to [21], any A-stable numerical method for (2.52) is at most a second order method. This is in contradiction to the claim made in [15] that the method is third order. If we examine the discretization (2.68) and Taylor expand all of the terms around the pointxn, i.e. (2.59), (2.65), and

φn−3 =φn−φ0n(3∆x) +φ

00

n

(3∆x)2

2 −φ

000

n

(3∆x)3

6 +φ

(4)

n

(3∆x)4

4! +O(∆x

5

),

and plug these into (2.68), we obtain the following result

1 ∆x

10 6 φn−

15

6 φn−1+φn−2− 1 6φn−3

=φ0n− ∆x

2

3! φ

000

n +O(∆x

5

). (2.70)

(43)

2.3.5

Fast Marching

Algorithm

The Fast Marching algorithm, introduced by Tsitsiklis [62] is a single pass algo-rithm with Dijkstra-like node ordering designed to solve graph traversal problems. This algorithm calculates the nodes in a smallest first ordering by using a Heap Sort to keep track of the current smallest valued node. The heap data structure is order

log(N) for insertions, deletions, and updates. The use of this data structure, along with the single-pass nature of the algorithm, means that the algorithm as a whole is order N log(N) whereN is the total number of nodes in the domain.

The heap is a data structure in which all operations required by Fast Marching (insert, update, deletion, find smallest node) are order log(N) or better. It also has the added advantage of being compact. The amount of memory required is equal to the number of elements in the structure. The entries are stored in an array. This array is treated like a full binary tree (see Figure 2.12). The first element of the array is the root of the tree. The indices of the children of node iare calculated as 2i

and 2i+ 1. The index of the parent of node i is then i/2 (using integer arithmetic). New elements are inserted at the end of the array (a leaf node) and then sorted into their proper place in the tree by being swapped with their parent until their parent is smaller (sift-up), and then swapped with their smallest child until both children are larger (sift-down). Updates are done by a sift-up followed by a sift-down. This process of insertion and update causes the root of the tree to always contain the smallest element. Removal of this element is done by swapping the last element in the array with the first element, reducing the size of the array, and then performing a sift-down on the new root of the tree [64].

(44)

1

1

2

3

4

2 3 4 5 6

5

6

Figure 2.12: Array and corresponding binary tree in the Heap Sort.

neighbors calculated, and FAR nodes that have not yet been calculated. FRONT nodes are kept in a heap data structure with the smallest element at the root of the tree (top of the heap). Algorithm 2.1 follows the steps given in [51].

Algorithm 2.1 Fast Marching Mark nodes in Γ as DONE

Mark all other nodes as FAR and set their value to infinity Calculate non-DONE neighbors of nodes in Γ

Add these neighbors to FRONT list while FRONT list not emptydo

Pick smallest valued node, i, from FRONT list Mark i as DONE

Calculate non-DONE neighbors of i

Add these neighbors to FRONT list end while

Note: Only nodes marked as DONE are used when doing calculations.

2.3.6

Fast Sweeping

Algorithm

(45)

order-ings: one from left to right, and the other from right to left. In the two dimensional case we are interested in, there are four orderings: right and up, up and left, left and down, down and right. (see Figure 2.13). This is an expansion of the Gauss-Seidel method (Section 2.3.7) where only one ordering was used. Algorithm 2.2 provides a summary of the method. Fast Sweeping has a complexity of O(N) where N is the total number of nodes in the domain. In contrast to the Fast Marching method, the constant on theO-term depends of the slowness function (see Section 4.1.3).

1

2

3

4

4 3 2 1

4

3

2

1

1 2 3 4

(46)

Algorithm 2.2 Fast Sweeping loop

for each sweep ordering do Calculate nodes in sweep order

if no nodes changed in this sweep then STOP

end if end for end loop

Termination Proof

Unlike what is proposed in [61, 66], we consider Fast Sweeping as a direct method because, as shown in Section 4.1.3, convergence is not uniform, so the algorithm must be run to completion. Lemma 2.2 provides a natural stopping criterion for the algorithm.

Lemma 2.2 Fast Sweeping Termination (Gremaud, Kuster [29])

Let Uk, k = 0, . . . ,, be the iterates generated by the Fast Sweeping method

applied to (2.8). Then there exists ¯k such that φk =φ¯k for all k≥k¯.

Proof. Consider an arbitrary node i at which the solution has been computed. There exists a path made of successive upwind neighbors from ito the set, Γ, where

φ(x) = 0. By construction, each successive sweep determines the final value of at least one node on that path, starting on Γ and moving successively toi. This clearly leads to a finite algorithm. The numerical solution at node i only depends on the values at its neighbors. If those values do not change at step ¯k+ 1, then φk

i =φ

¯

k i for

(47)

2.3.7

Other Methods

Gauss-Jacobi Method

The Gauss-Jacobi method is a simple fixed-point algorithm. First, an ordering of the nodes is chosen and the initial iterate φ0 is taken to be infinite on all of the nodes

except for on the boundary set where φ0 = 0. Then the value of the next iterate

of φ at each node is calculated using the maximum over the pairs of neighbors of the upwind solutions given in Section 2.3.3. In Algorithm 2.3, the upwind solution is denotedF(φ(x1), φ(x2), ..., φ(xN)). The update occurs only when the current ordering

is completed. The algorithm terminates when the system is at steady state (a fixed point).

Algorithm 2.3 Gauss-Jacobi

Choose node ordering{x1, x2, ..., xN}

Set φ0(xi) = ∞,i= 1...N

Set φ0(x

i) = 0 on boundary set

k= 0

while not convergeddo for i= 1...N do

φk+1(x

i) =F(φk(x1), φk(x2), ..., φk(xN))

end for

if no nodes changed in this sweepthen STOP

end if end while

Gauss-Seidel Method

(48)

Algorithm 2.4 Gauss-Seidel

Choose node ordering{x1, x2, ..., xN}

Set φ0(xi) = ∞,i= 1...N

Set φ0(x

i) = 0 on boundary set

k= 0

while not convergeddo for i= 1...N do

φk+1(x

i) =F(φk+1(x1), φk+1(x2), ..., φk+1(xi−1), φk(xi), ..., φk(xN))

end for

if no nodes changed in this sweepthen STOP

end if end while

O(N) Fast Marching

Recently, there have been attempts to blend the Dijkstra-like qualities of the Fast Marching method with the lower order of complexity of the Fast Sweeping method. One method, introduced by Yatziv, et. al. [65] does this by using an untidy priority queue in place of the heap structure found in Fast Marching. Another method, proposed by Kim [36] works like Fast Marching method with two changes. First, instead of using a Heap Sort, a list of nodes on the front is kept and sweeps the algorithm sweeps through that list in at every iteration. Second, any node within ∆x/(√2Sij,min) offij,min is moved to the DONE bin and has its neighbors calculated

(node ij, min is the smallest valued node on the front). This is justified by the fact that any such node would fail the upwind criterion. Note that this removes multiple nodes from the front list in each iteration as opposed to the single node per iteration removed by Fast Marching.

2.3.8

Eikonal Solver Comparison

(49)

Gauss-Seidel describe general classes of solvers instead of specific methods. Neither method specifies a node ordering, and the ordering is what differentiates a fast method from a slow one. In particular, since both Fast Marching and Fast Sweeping update the values immediately, they fall into the Gauss-Seidel class of methods. Fast Sweeping is an O(N) method that is easy to implement, but does not do the computations in a causal order. This may lead to difficulties in implementing it as a second order method. Fast Marching is a little more complicated to implement than Fast Sweeping due to the heap data structure. TheO(log(N)) overhead due to maintaining the heap is not large in practice, and maintaining the ordering guarantees convergence to the viscosity solution. The Group Marching method claims to combine the best properties of Fast Marching and Fast Sweeping. It keeps a causal ordering, but does so in such a way that it’s complexity is O(N). We have not implemented this method, but it looks promising.

2.3.9

Narrow Band Implementations

In many applications, a signed distance function is only needed near the zero level set. For example, in moving boundary problems, the only important part of the domain is near the boundary. If this is the case, computations can be cut off when the magnitude of the distance function reaches some predetermined size [14]. This cutoff is especially easy to use with methods that compute nodes in a causal order such as Fast Marching. If the cutoff size is a multiple of the grid size, the computational complexity is reduced by one order. Fast Marching is then O(Nlog(N)) instead of O(N2log(N)) on a two dimensional domain (where N is the number of grid points

(50)

2.4

Time Evolution

The movement of the boundary is defined by the level set equation (2.5). This equation can be expressed in the form

∂tφ(x, t) =L(x, t, φ(x, t)) (2.71)

where L(x, t, φ(x, t)) = −Fk∇φ(x, t)k or L(x, t, φ(x, t)) = −v · ∇φ(x, t) depending on the situation. There are many methods for numerically integrating this type of equation. We use two different methods: Forward Euler when we desire simplicity and speed, and HJ WENO TVD-RK (see Section 2.4.2) when we desire accuracy.

2.4.1

Velocity Extension

As noted previously, the velocity field is only defined on the boundary and in order to evolve the level set equation in time, it must be defined in the entire domain. This is accomplished through a process known as extension. There is a great deal of freedom in choosing how to extend the velocity off the boundary. The usual choice [3] is to require

∇F · ∇φ = 0. (2.72)

(51)

2.4.2

HJ WENO TVD-RK

For problems where temporal accuracy is desired, we use a third order total vari-ation decreasing (TVD) Runge-Kutta scheme coupled with a third order WENO scheme for the spatial derivative. The differential equation being solved is given by (2.71).

The total variation of a function φ(x, t) is a measure of how fast the function changes either in space, or over time. Here we will consider total variation in space only. In one dimension, the total variation is defined by

T V(φ) =

Z

R

∂φ ∂x(x, t)

dx. (2.73)

If φ(x, t) is discretized in both time and space, such that φ(xj, tn) = φnj, then the

discretized version of the total variation in space of φ at timetn is

T V(φn) = Σj|φnj+1−φ

n

j| (2.74)

where the index j varies over the spatial discretization. TVD methods are those for which

T V(φn+1)≤T V(φn) (2.75)

at each time step. This may involve a restriction on the maximum size of the time step,

∆t ≤c∆t1 (2.76)

where cis known as the Courant-Friedrichs-Lewy (CFL) coefficient for the time dis-cretization and ∆t1 is the maximum stable time step for the Forward Euler method

acting on the same differential equation.

A general Runge-Kutta method for (2.71) can be written as

φ(i) = Σik=01(αikφ(k)+ ∆tβikL(φ(k)), i= 1, ..., m,

φ(0) =φn, φ(m) =φn+1

(52)

and is TVD with CFL coefficient

c= min

i,k

αik

βik

(2.78)

provided that αik ≥0, and βik ≥0 [28].

The TVD scheme that we use was developed by Gottlieb and Shu [28]. This method is described by the following three step relation

φ(1) =φn+ ∆tL(φn),

φ(2) = 3 4φ n + 1 4φ (1) +1

4∆tL(φ

(1)

),

φ(n+1)= 1 3φ n + 2 3φ (2) +2

3∆tL(φ

(2)

).

(2.79)

with a CFL coefficient c= 1.

For the moving boundary problem,L(φ(x, t)) =v·∇φ(x, t). Wherev, the velocity field, is either fixed, or calculated as uext∇φ(x, t). The spatial component in this

expression contains the gradient ofφ. In order to keep third order accuracy, we must have at least a third order approximation of the gradient. To do this, we use the WENO scheme described in 2.3.1.

2.5

Boundary Element Method

(53)

2.5.1

Contouring

The process of finding the set of points in a level set function with a particular value is known as contouring. In order to discretize the boundary we use the following contouring method to find the zero level set of the function defined on the Cartesian grid. First, the underlying grid is divided up into triangles by adding a diagonal to each grid square (Figure 2.14). In Figures 2.14 and 2.15, nodes with positive values are colored green, nodes with negative values are colored red, elements near the boundary (those having nodes with each sign) are shaded light blue, the gradient is indicated with arrows, and the resulting contours are dashed lines. To construct the boundary,P1 functions (planes) are constructed covering each triangular grid element

near the boundary. P1 functions are polynomials with total degree of 1. Here, they

are computed using (2.80) below. Contour lines are then constructed by connecting points on the boundary of the grid element where the P1 patch is zero. This process

is equivalent to finding the point on the edge where the level set function is zero by linear interpolation on each element.

The outward normal of each boundary element is then found using the gradient of theP1 patch using (2.81). This approach is fast and simple to implement. One major

advantage is that the gradient is constant over the entire triangular element. This is not true when using elements corresponding to the squares of the grid (Figure 2.15). Note that in the lower left, the gradient changes direction completely depending on how the contours are chosen. Also, each triangle has at most one contour line passing through it which is untrue of square elements (Figure 2.15).

Assuming that the triangle representing one of the elements of the grid is defined by the points (0,0), (1,0), and (0,1), then the P1 patch, p(x, y), for a function, φ

over that element is given by

(54)

Figure 2.14: Contouring a triangular mesh.

and its gradient by

∇p(x, y) = (φ(1,0)−φ(0,0), φ(0,1)−φ(0,0)). (2.81)

With proper scaling, these equations can be used to find the P1 patch and gradient

on any of the triangular elements.

2.5.2

Integral Equation

Consider the boundary value problem

Lu(x) = 0, x∈A\Ω¯, (2.82)

u(x) = g1, x∈∂Ω, (2.83)

∂u

∂n(x) = g2, x∈∂A (2.84)

(55)

Figure 2.15: Two possible contourings of a square mesh.

component of∇unormal to the boundary. IfG(x, y) is the fundamental solution (also known as Green’s Function) associated withL, then multiplying (2.82) byG(x, y) and integrating twice by parts results in the integral equation

u(x) =

Z

Γ

G(x, y)∂u

∂ny

(y)ds(y)−

Z

Γ

∂G ∂ny

(x, y)u(y)ds(y), x∈A (2.85)

u(x)

2 =

Z

Γ

G(x, y)∂u

∂ny

(y)ds(y)−

Z

Γ

∂G ∂ny

(x, y)u(y)ds(y), x∈Γ. (2.86)

where Γ =∂A∪∂Ω. The fractional term on the boundary is the result of taking the limit of a contour integral around the point. If the boundary is consists of multiple smooth segments, then at the point where the segments join, the fraction depends on angle at which they join. We will only consider the solution at points where the boundary is smooth, so (2.86) is sufficient for our needs.

Examining the solution on the boundary (2.86), we define the linear operator I :L2(Γ)L2(Γ) by

Iv(x) =

 

 v(x)

2 +

R ∂A

∂G

∂ny(x, y)v(y)ds(y)−

R

∂ΩG(x, y)v(y)ds(y), x∈∂A, R

∂A ∂G

∂ny(x, y)v(y)ds(y)−

R

∂ΩG(x, y)v(y)ds(y), x∈∂Ω

(56)

A

Figure 2.16: Domain for (2.82)-(2.84).

and the function F ∈L2(Γ) by

F(x) =

 

 R

∂Ag2(y)G(x, y)ds(y)− R

∂Ωg1(y)

∂G

∂ny(x, y)ds(y), x∈∂A

,R

∂Ag2(y)G(x, y)ds(y)− R

∂Ωg1(y)

∂G

∂ny(x, y)ds(y)−

1

2, x∈∂Ω.

(2.88) It is then simple to show that

Iw(x) = F(x), ∀x∈Γ (2.89)

is the integral form of equations (2.82-2.84), where

w(x) =

 

u(x) x∈∂A,

∂u

∂n(x) x∈∂Ω.

2.5.3

Discretized Integral Equation

The linear system (2.89) is discretized in the following way. First, a piecewise linear discretized boundary, Γh (with subdomains∂Ah and ∂Ωh corresponding to ∂A

and ∂Ω), is obtained. In our applications, this is done using the contouring method described in Section 2.5.1. The function w(x) is taken to be piecewise constant on the elements of Γh. In other words, w(x) is approximated by wh such that

References

Related documents

The table contains data for all EU-27 countries on temporary employment (in thousands) for NACE sectors L, M and N (rev 1.) and O, P and Q (rev.. Data are presented separately

Includes cookies may pl schema name of our client at first reply, improve ibm kc alerts notifies you want access by using plain text in your content.. Research and get schema name

The distributor may seek to limit the producer’s right to terminate until distributor has recouped its advance (assuming it has given the producer an advance.) Another

Development of the curriculum of the Master of Advanced Industrial Management European Academy on Industrial Management (AIM) Industrial enterprises &amp; Organizations.

In addition to the Code of Business Conduct and Ethics, Molina Medicare has developed an extensive set of policies and procedures to implement the Medicare Compliance/FWA plan,

• Storage node - node that runs Account, Container, and Object services • ring - a set of mappings of OpenStack Object Storage data to physical devices To increase reliability, you

the long peace of the 19th century, thereby undermining the willingness of potential belligerents to hold their reserves as deposits in foreign.. &#34;In the years following the

To help raise awareness, Purdue College of Pharmacy stu- dents, fellows, and faculty have hosted an annual blood pressure screening at the Hook’s Drug Store Museum during the