optimal control for reinitialization in finite element ...preprint 2016; 00:1–15 optimal control...

15
Preprint 2016; 00:115 Optimal control for reinitialization in finite element level set methods Christopher Basting 1, * , Dmitri Kuzmin 1 and John N. Shadid 2, 3 1 Institute of Applied Mathematics (LS III), TU Dortmund University, Vogelpothsweg 87, D-44227 Dortmund, Germany 2 Computational Mathematics Dept., Sandia National Laboratories, P.O. Box 5800, Albuquerque, NM 87185, USA 3 Department of Mathematics and Statistics, University of New Mexico, MSC01 1115, Albuquerque, NM 87131, USA SUMMARY A new optimal control control problem that incorporates the residual of the Eikonal equation into its objective is presented. The formulation of the state equation is based on the level set transport equation but extended by an additional source term, correcting the solution so as to minimize the objective functional. The method enforces the constraint so that the interface cannot be displaced. The system of first order optimality conditions is derived, linearized, and solved numerically. The control also prevents numerical instabilities, so that no additional stabilization techniques are required. This approach offers the flexibility to include other desired design criteria into the objective functional. The approach is evaluated numerically in three different examples and compared to other PDE-based reinitialization techniques. Received . . . KEY WORDS: Level set evolution; Reinitialization; Optimal Control; Variational formulation; Finite element methods; Eikonal equation 1. INTRODUCTION Level set methods are among the most popular techniques for numerical simulation of evolving interfaces in the context of interface capturing methods. The interface is represented in an implicit manner as the zero level set of an auxiliary function, the level set function. When applied to free- surface problems, the smoothness of this function at the interface is of great importance. Signed distance functions generally satisfy this need and are therefore commonly chosen as initial data. Unfortunately, the desirable signed distance function property is not preserved in the numerical process of advection. In some regions the level set function can become very steep, so that a nearly discontinuous function has to be advected. In other regions it may become very flat causing a significant loss of accuracy when localizing the interface. In order to preserve the signed distance function property approximately, reinitialization procedures are commonly applied. Those are roughly divided into geometric and PDE-based procedures. A wealth of geometric [1, 2, 3] and PDE-based techniques [4, 5, 6, 7, 8, 9] exist. A well designed reinitialization method produces an approximation to a signed distance function that has the same zero isocontour as the original level set function. Sussman et al. [7] presented a post processing reinitialization scheme in which a hyperbolic PDE is solved to steady state. In practice, the numerical solution of this equation leads to significant displacements of the interface [10] due to artificial diffusion. An approach directly addressing this inaccuracy is the interface local projection method of Parolini [6]. Here, in a narrow band along the interface, the values of the * Correspondence to: Christopher Basting ([email protected]) Prepared using fldauth.cls [Version: 2010/05/13 v2.00]

Upload: others

Post on 25-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

Preprint2016; 00:1–15

Optimal control for reinitialization in finite element level setmethods

Christopher Basting1,∗, Dmitri Kuzmin1 and John N. Shadid2,3

1 Institute of Applied Mathematics (LS III), TU Dortmund University, Vogelpothsweg 87, D-44227 Dortmund, Germany2 Computational Mathematics Dept., Sandia National Laboratories, P.O. Box 5800, Albuquerque, NM 87185, USA

3 Department of Mathematics and Statistics, University of New Mexico, MSC01 1115, Albuquerque, NM 87131, USA

SUMMARY

A new optimal control control problem that incorporates the residual of the Eikonal equation into itsobjective is presented. The formulation of the state equation is based on the level set transport equationbut extended by an additional source term, correcting the solution so as to minimize the objective functional.The method enforces the constraint so that the interface cannot be displaced. The system of first orderoptimality conditions is derived, linearized, and solved numerically. The control also prevents numericalinstabilities, so that no additional stabilization techniques are required. This approach offers the flexibilityto include other desired design criteria into the objective functional. The approach is evaluated numericallyin three different examples and compared to other PDE-based reinitialization techniques.

Received . . .

KEY WORDS: Level set evolution; Reinitialization; Optimal Control; Variational formulation; Finiteelement methods; Eikonal equation

1. INTRODUCTION

Level set methods are among the most popular techniques for numerical simulation of evolvinginterfaces in the context of interface capturing methods. The interface is represented in an implicitmanner as the zero level set of an auxiliary function, the level set function. When applied to free-surface problems, the smoothness of this function at the interface is of great importance. Signeddistance functions generally satisfy this need and are therefore commonly chosen as initial data.Unfortunately, the desirable signed distance function property is not preserved in the numericalprocess of advection. In some regions the level set function can become very steep, so that a nearlydiscontinuous function has to be advected. In other regions it may become very flat causing asignificant loss of accuracy when localizing the interface. In order to preserve the signed distancefunction property approximately, reinitialization procedures are commonly applied. Those areroughly divided into geometric and PDE-based procedures. A wealth of geometric [1, 2, 3] andPDE-based techniques [4, 5, 6, 7, 8, 9] exist.A well designed reinitialization method produces an approximation to a signed distance functionthat has the same zero isocontour as the original level set function. Sussman et al. [7] presenteda post processing reinitialization scheme in which a hyperbolic PDE is solved to steady state. Inpractice, the numerical solution of this equation leads to significant displacements of the interface[10] due to artificial diffusion. An approach directly addressing this inaccuracy is the interface localprojection method of Parolini [6]. Here, in a narrow band along the interface, the values of the

∗Correspondence to: Christopher Basting ([email protected])

Prepared using fldauth.cls [Version: 2010/05/13 v2.00]

Page 2: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

2 CH. BASTING AND D. KUZMIN AND J.N. SHADID

level set function are directly computed and then used to provide boundary conditions for a post-processing reinitialization scheme.As alternative approach to hyperbolic reinitialization, Li et al. [5] introduce the distance regularizedlevel evolution (DRLSE). Its corrected level set function is the steady-state solution to an energy-minimizing gradient flow equation. The approach offers the flexibility to choose a potential functiondefining the distance regularization, so that truncated distance functions can also be handled, butspecial care needs to be taken to prevent interface displacements. In our recent publication [11], webuilt on this idea and developed an interface preserving level set reinitialization scheme, leadingto a nonlinear elliptic problem that penalizes interface displacements. In the present paper we willcomment on this approach combined with the interface local projection method by Parolini [6].In the context of moving interfaces, all of the approaches mentioned above are correcting a givenpredictor to the solution of the advection equation. In contrast to this procedure, Ville et al. [9]propose an all-at-once approach that embeds the reinitialization equation of [7] into the transportequation. The method is referred to as convective reinitialization. Here, interface accuracy relies onhow well the sign function is resolved.In this paper we present another all-at-once approach based on an optimal control problem. Theresidual of the Eikonal equation is minimized whilst constraining an augmented transport equation.We derive the resulting nonlinear system of first order optimality conditions and linearize it. Threenumerical examples illustrate the potential of this new approach.

2. LEVEL SET METHOD

The level set approach to simulating the evolution of a free interface Γ inside a bounded domain Ωis based on an implicit representation of Γ in terms of a scalar indicator function ϕ(t,x) such that

Γ(ϕ)(t) = x ∈ Ω | ϕ(t,x) = 0. (1)

In the context of two-phase flows, the sign of ϕ tells the two phases apart. It is common practice toinitialize ϕ as signed distance function to the zero level set, i.e.

ϕ(0,x) = ±dist(x,Γ(0)). (2)

A signed distance function satisfies the Eikonal equation

|∇ϕ| = 1, (3)

almost everywhere. If ϕ is a signed distance function (SDF), the normal vector to the interface isreadily obtained by

n = ∇ϕ. (4)

This is particularly useful when it comes to recovering interface related quantities such as thecurvature. The signed distance function property is also very useful in the context of adaptivestrategies, since it serves as interface proximity indicator. Furthermore, when numerically solvingthe level set transport equation

∂ϕ

∂t+ v · ∇ϕ = 0 in Ω, (5)

reinitialization of ϕ will ensure |∇ϕ| ≈ 1, thus preventing numerical instabilities due to steepeningand flattening effects as described above. Numerical methods generally fail to preserve this desirableSDF property over time, wherefore reinitialization methods are commonly applied.

3. REINITIALIZATION

A well-designed reinitilization scheme should possess three important properties. Most importantly,the boundary condition ϕ|Γ = 0 should be satisfied as closely as possible, i.e. the zero isocontour

(2016)Prepared using fldauth.cls Preprint

Page 3: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 3

of ϕ must not be displaced in any significant manner by the reinitialization procedure. Second, theresult should satisfy the SDF property and be smooth away from kinks. In particular, the residual of|∇ϕ| = 1 should be small in proximity to the interface where accuracy is most important. Last butnot least, computational efforts due to reinitialization must be managable.

Many algorithms to tackle the problem of reinitialization exist and can roughly be subdivided intodirect and PDE-based methods. Latter ones do not require the explicit localization of the interfacebut an approximate distance function is obtained by solving an additional or modified PDE. In thispaper we focus on reinitialization methods mainly designed for evolution problems, i.e. methods ofparticular interest are those that approximate the solution to the interface transport equation whileenforcing the SDF property in a certain way, which we will refer to as all-at-once methods. Thealternative are post-processing approaches, where the numerical solution to the transport equation ϕserves as a predictor and the reinitialization method then corrects ϕ to become a good approximationto a signed distance function.

3.1. Hyperbolic Reinitialization

The most common PDE-based approach was introduced by Sussman et al. [7]. Due to the methodshyperbolic nature, we refer to this approach as hyperbolic reinitialization. The key idea boils downto solving the initial value problem

∂ϕ

∂τ+ Sε(ϕ)(|∇ϕ| − 1) = 0, ϕ(0,x) = ϕ, (6)

in virtual time τ to steady state. Sε is a regularization of the sign function; a commonly chosen oneis

Sε(ϕ) =ϕ√

ϕ2 + ε2.

Since Sε(ϕ) vanishes where ϕ = 0, the steady state solution to (6) preserves the implicitly definedinterface Γ(ϕ) exactly. Furthermore, the steady state ϕ satisfies the Eikonal equation |∇ϕ| = 1almost everywhere. As already pointed out, this method avoids the explicit localization of theinterface. However, numerically this approach requires a well-chosen and mesh-size dependentregularization parameter ε (its choice is not clear) and a stable scheme to solve the equation tosteady state. Inappropriate choices of ε may lead to slow speed of convergence and considerabledisplacements of the interface due to the added numerical diffusion. This may affect the globalmass conservation properties of the overall scheme significantly, see for example [12].

Convected ReinitializationBased on the hyperbolic reinitializaton approach, Ville et al. [9] embed the reinitialization processinto the actual transport model, transforming the post-processing into an all-at-once method. Theconvected reinitialization equation

∂ϕ

∂t+ v · ∇ϕ+ λS(ϕ)(|∇ϕ| − 1) = 0, (7)

is obtained by considering the auxillary intial value problem (6) in virtual time τ , chosing theparameter

λ =∂τ

∂t, (8)

and rewriting it into an Eulerian context. At the interface, S(ϕ) is zero and the source term vanishes.The numerical solution of (7) however requires a regularized signed distance function introducingan additional parameter as well as an iterative scheme to linearize the problem.In terms of a finite element discretization, Ville et al. [9] suggest an streamline-upwind Petrov-Galerkin (SUPG) method to solve this convection dominated problem with coefficient

τSUPG 'h

D|v|, (9)

(2016)Prepared using fldauth.cls Preprint

Page 4: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

4 CH. BASTING AND D. KUZMIN AND J.N. SHADID

where D is the number of nodes per element and h is the mesh size. The problem can easily belinearized by means of a fixed-point iteration or Newton’s method. Usually a couple of virtual timesteps are sufficient. The scheme is sensitive to the choice of λ and may require smaller choices of λthan (8) which may increase the number of artificial time steps required.

3.2. Parabolic Reinitialization

A different approach to hyperbolic PDE reinitialization is the DRLSE algorithm developed by Li etal. [5]. In the context of pure reinitialization, the corrected level set function represents the steady-state solution to an energy-minimizing gradient flow equation

∂ϕ

∂τ+∂R∂ϕ

= 0, (10)

where R(ϕ) is a suitable energy functional [11]. The choice

R(ϕ) =1

2

∫Ω

(|∇ϕ| − 1)2dx (11)

is the least-squares solution to (3). For this particular choice, (10) reduces to the nonlinear heatequation

∂ϕ

∂τ−∇ ·

(∇ϕ− ∇ϕ

|∇ϕ|

)= 0. (12)

The initial condition for the steady-state computations is given by the original level set function ϕ.For other definitions of the energy functional R(ϕ), see [5, 11].

3.3. Elliptic Reinitialization

In [11] the authors presented a different approach based on the presented parabolic reinitializationbut yielding an elliptic problem instead. In contrast to the local hyperpolic reinitialization approachneeded to be carried out to steady state, the elliptic approach is global and hence produces a solutionin just one step – justifying the higher computational costs. However, since the problem is nonlinear,a fixed-point iteration needs to be applied. In practice, only one or very few iterations are neededfor it to produce sufficiently good results.The method is based on a general energy functional (see also [5])

Rp(ϕ) =1

2

∫Ω

p(|∇ϕ|)dx, (13)

depending on a suitably chosen potential function p : [0,∞)→ R. For

p(s) := (s− 1)2 (14)

we obtain the particular choice of (11). To enforce the boundary condition ϕ|Γ(ϕ) = 0 imposed bythe original level set function ϕ, the cost functional is augmented by adding the penalty term

Pϕ(ϕ) =α

2

∫Γ(ϕ)

ϕ2ds, (15)

where ϕ denotes the provisional solution before applying the reinitialization scheme. The penalizedminimization problem yields the necessary optimality conditions

∂Rp∂ϕ

+∂Pϕ∂ϕ

= 0. (16)

The variational form of the penalized minimization process becomes∫Ω

dp(|∇ϕ|)∇ϕ · ∇vdx+ α

∫Γ(ϕ)

ϕvds, (17)

(2016)Prepared using fldauth.cls Preprint

Page 5: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 5

with diffusion rate dp(s) = p′(s)s . This representation reveals that the level set regularization

term generates forward diffusion for dp(|∇ϕ|) > 0 and backward diffusion for dp(|∇ϕ|) < 0,respectively.The variational problem can be solved using a Ritz-Galerkin finite element method. The variationalform associated with (16) and for the particular choice (14) is given by∫

Ω

(1− 1

|∇ϕ|

)∇ϕ · ∇vdx+ α

∫Γ(ϕ)

ϕvds, (18)

and can be linearized into a consistent fixed-point iteration where at each step a steady diffusion-reaction equation with a source term depending on the gradient of the previous iterate has to besolved.Note that other choices of p lead to different diffusion rates and can, for example, preserve flatgradients of ϕ away from the interface; see [11] for more details.

Local Projection Penalty TermThe method presented in [11] can be modified as follows: instead of enforcing the boundarycondition ϕ|Γ(ϕ) = 0 by adding a surface penalty term such as (15), deviations from a desired stateare penalized. This desired state is defined by the local L2 projection of an exact but discontinuousreinitialization of ϕ in the interface proximity region Ωint. This local projection technique wasdeveloped by Parolini [6]. Applied to elliptic reinitialization, the energy functionalR and the penalty

0

1

2

3

4

5

Figure 1. Interface region Ωint (shaded)

term P change to

R(ϕ) =1

2

∫Ω\Ωint

p(|∇ϕ|)dx, (19)

andP(ϕ) = α

∫Ωint

(ϕ− ϕint)2dx, (20)

with the local L2 projection ∫Ωint

ϕintvdx =

∫Ωint

ϕ

|∇ϕ|vdx. (21)

Note that the ϕ|∇ϕ| satisfies the Eikonal equation and its zero level set coincides with ϕ. Both

approaches yield very similar results; however the local projection is easier to implement as noexplicit localization of the interface is required.

(2016)Prepared using fldauth.cls Preprint

Page 6: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

6 CH. BASTING AND D. KUZMIN AND J.N. SHADID

4. OPTIMAL CONTROL APPROACH

We now present an optimal control approach designed as all-at-once method, i. e. solving the levelset transport equation while constraining the Eikonal residual. In this method the transport equationis augmented by a source term ϕu and serves as a constraint for the optimization problem. Theobjective functional consists of the energy functional Rp(ϕ) as introduced in (13) and a Tikonovregularization term for the control variable u. The optimization problem is formulated as follows:

min J(ϕ, u) :=1

2Rp(ϕ) +

β

2‖u‖2U , (22a)

subject to∂ϕ

∂t+ v · ∇ϕ+ ϕu = 0. (22b)

A suitable control space has to be chosen, for example U = L2(Ω). Since the added source termvanishes where ϕ = 0, the zero isocontour is not displaced by definition of the method even thoughno further regularization (e. g. of the sign function as in [7, 9]) is required. Elsewhere, the controladjusts the added source term so that the residual of the Eikonal equation is minimized under thegiven objective. The choice of U and β determine the expected regularity of the control.

4.1. Weak Form

The state equation (22b) can be written in weak form as∫Ω

(∂ϕ

∂t+ v · ∇ϕ+ ϕu

)v dx,

defining a bilinear form a(·, ·) and a trilinear form b(·, ·, ·). We will consider different schemes fordiscretization and stabilization, each resulting in specific linear forms. For simplicity we restrictourselves to the time-discrete problem. Let ϕn denote the solution of the previous time level tn. Theadded source term is treated fully implicitly. The semi-discrete problem then reads

min J(ϕ, u) := Rp(ϕ) +β

2‖u‖2U , (23a)

subject to a(ϕ, v) + b(ϕ, u, v) = l(v) ∀v. (23b)

Since the state equation is convection dominated, stabilized numerical schemes are preferred but notnecessarily required in the optimal control approach where the control will stabilize the solution.We will consider the following three approaches:

1. θ-scheme and no stabilization

aNS(ϕ, v) =

∫Ω

ϕv + ∆tθv · ∇ϕvdx, (24a)

bNS(ϕ, u, v) =

∫Ω

∆tϕuvdx, (24b)

lNS(v) =

∫Ω

ϕnv −∆t(1− θ)v · ∇ϕn. (24c)

2. θ-scheme and SUPG stabilization (with parameter τ )

aSUPG(ϕ, v) =

∫Ω

(ϕ+ ∆tθv · ∇ϕ

)(v + τv · ∇v)dx, (25a)

bSUPG(ϕ, u, v) =

∫Ω

∆tϕu(v + τv · ∇v)dx, (25b)

lSUPG(v) =

∫Ω

(ϕn −∆t(1− θ)v · ∇ϕn

)(v + τv · ∇v)dx. (25c)

(2016)Prepared using fldauth.cls Preprint

Page 7: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 7

3. Semi-Implicit Lax-Wendroff (SILW) stabilization

aSILW(ϕ, v) =

∫Ω

ϕv +(∆t)2

2(v · ∇ϕ)(v · ∇v)dx, (26a)

bSILW(ϕ, u, v) =

∫Ω

∆tϕuvdx, (26b)

lSILW(v) =

∫Ω

−∆tv · ∇ϕnv. (26c)

4.2. Optimality Conditions

We derive the first order optimality conditions for (23) by differentiating the associated Lagrangianfunctional

L(ϕ, u, λ) := J(ϕ, u) + a(ϕ, λ) + b(ϕ, u, λ)− l(λ) (27)

with respect to state ϕ, control u and Lagrange multiplier λ:

δR(ϕ,ψ) + a(ψ, λ) + b(ψ, u, λ)− l(λ) = 0 ∀ψ (28a)b(ϕ, η, λ) + β(u, η)U = 0 ∀η (28b)a(ϕ, v) + b(ϕ, u, v) = l(v) ∀v (28c)

The derivative of Rp(ϕ) with respect to ϕ in direction v is given by

δRp(ϕ, v) =

∫Ω

p′(|∇ϕ|)∇ϕ · ∇v|∇ϕ|

dx, (29)

and similarly, the second derivative is

δ2Rp(ϕ, v, w) =

∫Ω

p′′(|∇ϕ|)∇ϕ · ∇w|∇ϕ|

∇ϕ · ∇v|∇ϕ|

dx

+

∫Ω

p′(|∇ϕ|)(∇w · ∇v|∇ϕ|

− ∇ϕ · ∇v|∇ϕ|2

∇w · ∇ϕ|∇ϕ|

)dx

=

∫Ω

p′′(|∇ϕ|)|∇ϕ|2

∇ϕ · ∇w∇ϕ · ∇vdx

+

∫Ω

p′(|∇ϕ|)|∇ϕ|

(∇w · ∇v − (∇ϕ · ∇v)(∇ϕ · ∇w)

|∇ϕ|2

)dx

For p1, we have p′1(s) = s− 1, p′′1(s) = 1, whence

δR1(ϕ, v) =

∫Ω

(1− 1

|∇ϕ|

)∇ϕ · ∇vdx,

and

δ2R2(ϕ, v, w) =

∫ω

∇v · ∇w(

1− 1

|∇ϕ|

)+

(∇ϕ · ∇v)(∇ϕ · ∇w)

|∇ϕ|3dx.

4.3. Linearization

To solve system (28) numerically, a linearization is required. For a potential function p chosen as in(14), the system can be linearized by employing an iterative solution strategy such as

δR1(ϕ, v) ≈∫

Ω

∇ϕm · ∇vdx−∫

Ω

∇ϕm−1 · ∇v|∇ϕm−1|

dx.

andb(ϕ, u, λ) ≈ b(ϕm−1, um, λm).

(2016)Prepared using fldauth.cls Preprint

Page 8: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

8 CH. BASTING AND D. KUZMIN AND J.N. SHADID

Alternatively, we can employ Newton’s method for linearization. Therefore, let us denote theresidual of (28) by F (x) where x := (ϕ, u, λ). The Newton update to solve (28) then reads

xm+1 = xm −(J(xm)

)−1F (xm), (30)

with the Jacobian (J(xm)

)i,j

=

(∂Fi∂xj

). (31)

The derivatives of F are:

∂F1

∂ϕ= δ2Rp(ϕ, δϕ, ψ), (32a)

∂F1

∂u= b(ψ, δu, λ), (32b)

∂F1

∂λ= a(ψ, δλ) + b(ψ, u, δλ), (32c)

∂F2

∂ϕ= b(δϕ, η, λ), (32d)

∂F2

∂u= (δu, η)U , (32e)

∂F2

∂λ= b(ϕ, η, δλ), (32f)

∂F3

∂ϕ= a(δϕ, v) + b(δϕ, u, v), (32g)

∂F3

∂u= b(ϕ, δu, v), (32h)

∂F3

∂λ= 0. (32i)

Considering the fully discrete numerical scheme, the Jacobian matrix has the block structure

J =

δ2R(ϕ) ∆tM(λ) A+ ∆tM(u)∆tM(λ) βM ∆tM(ϕ)

A+ ∆tM(u) ∆tM(ϕ) 0

,whereA is the discretization matrix of the transport equation defined by the bilinear form a(·, ·), andM(·) the weighted mass matrix corresponding to the trilinear form b(·, ·, ·). Thus, the discretizationand stabilization schemes differ only in the discretization matrices A and M(·).

4.4. Influence of the Regularization Parameter β

In this section we will assess the influence of the regularization parameter β for an examplary testcase. Figure 2 shows the L2(Ω) error, the H1(Ω) error, the displacement error (33) and the residualof the Eikonal equation after one full revolution of the distance function of a circle on a circularmesh. Note that in the optimal-control context ϕ ∈ H1(Ω) by definition of the objective functional.Each of the three discretizations described in the previous section produces very similar results.Therefore we restrict ourselves to the θ-method with no stabilization (24). Other test cases exhibitvery similar error behavior for the choice of β.In our numerical studies we observed that very small values of β will, as expected, admit largercontrols leading to larger errors than using larger values of β. We found the choice of β between10−3 and 10−1 to produce good results in all cases. No significant time dependence was observedin the below numerical experiments.

(2016)Prepared using fldauth.cls Preprint

Page 9: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 9

10−8 10−7 10−6 10−5 10−4 10−3 10−2 10−1 100 101 102 103 104 105 106

β

10−5

10−4

10−3

10−2

10−1

100

101

erro

r

OC REINIT

EIK RESL2-errorH1-errorLS-error

Figure 2. Influence of regularization parameter β on the errors of ϕh.

5. NUMERICAL RESULTS

To evaluate the error in terms of the displacement of the interface, we define

eΓ =1

∑i∈P (Γ)

|D(xi)− ϕi|. (33)

P (Γ) denotes the set of nodes belonging to an element that is intersected by the zero isocontour,NΓ is the number of such elements. To measure the overall quality of the signed distance functionapproximation, we evaluate the residual of the Eikonal equation in the L2 sense and relative to theinitial data:

eE =‖|∇ϕh(t = T )| − 1‖L2(Ω)

‖|∇ϕh(t = 0)| − 1‖L2(Ω)

(34)

Other errors measured are the L2(Ω) and H1(Ω) error, given the finite element projection of theexact solution at the final time t = T . Note that theH1(Ω) error will only provide information on thesmoothness behavior, since we can only expect the optimal control solution to belong toH1(Ω). Forall results presented in the following, we used a second-order accurate time discretization (Crank-Nicolson or Semi-Implicit Lax-Wendroff) and linear finite elements for spatial discretization.

5.1. Mass Conservation

As already pointed out, reinitialization procedures may have an negative inlfuence on the local(and global) mass conservation as they can shift the interface. In the context of two-phase flows,knowledge of the exact interface location is crucial as it defines the mass contained within theinterface. Errors in the interface position and thereby in conservation of mass significantly reducenumerical accuracy and may lead to unphysical behavior.Therefore, in this first example we assess the quality of the reinitialization methods in terms ofmass conservation. We consider two initial contours: a single circular interface, and a non-convexinterface of two overlapping circles, each depicted in figure 3. The level set function is initializedas twice the signed distance function of the particular interface. Figures 4 and 5 show the initial

(2016)Prepared using fldauth.cls Preprint

Page 10: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

10 CH. BASTING AND D. KUZMIN AND J.N. SHADID

condition and its reinitialized counterpart. In tables I and II the corresponding numerical relativemass (area) errors

E =A(ϕh)−Aexact

Aexact,

and rates of convergence are shown. Numerical computations were performed using linear finiteelements on a uniform square mesh with mesh sizes hi = 1

20 ·12i , i = 0, 1, 2, 3, 4. Iterations were

stopped when the residual of the Eikonal equation reached a value less than 1.1 times the Eikonalresidual of the projected solution.The L2-projection of the initial data into the linear finite element space is second order accurate interms of mass conservation. As pointed out in [6], the classical hyperbolic reinitialization approach(6) shows a convergence rate of ≈ 1. In contrast, both elliptic approaches and the optimal controlapproach exhibits a rate of ≈ 2 which is of the same order as direct brute-force reinitialization.We want to emphasize the global character of the elliptic reinitialization: the results shownwere obtained after only one iteration, which justifies the higher computational costs. Hyperbolicapproaches need many iterations to reach steady state when provided a poor initial condition as inthis test case. Furthermore, this example shows that the methods are not only capable of correctinga level set function that is close to a signed distance function but also generating a signed distancefunction from a given profile.Due to the static nature of this test case, the optimal control approach is applied by setting thevelocity field equal to zero. The observed larger absolute mass error can be justified by the designas an all-at-once method, where corrections are typically small within each time step whereas inthis example large correction and hence large controls are needed. Clearly, large values of u willdegrade the interface accuracy due to increased numerical diffusion in the source term. We alsonote that the other all-at-once method presented in the previous chapter, convective reinitialization,did not converge at all when applied to this test case.

Figure 3. Test case interface shapes

hInitial L2 proj. Elliptic reinit. Elliptic reinit. w. L.P. OCError Order Error Order Error Order Error Order

0.050000 0.008928 2.2446 0.001486 -0.2100 0.006966 1.8986 0.046514 3.35840.025000 0.001884 2.1359 0.001719 2.0291 0.001868 2.1253 0.004535 1.98970.012500 0.000429 2.0632 0.000421 2.0294 0.000428 1.9757 0.001142 1.98310.006250 0.000103 2.0783 0.000103 1.9717 0.000109 1.9886 0.000289 1.88250.003125 0.000024 0.000026 0.000027 0.000078

Table I. Convergence test: relative mass (area) error for the circular interface.

(2016)Prepared using fldauth.cls Preprint

Page 11: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 11

Figure 4. Circular interface: initial condition (left) and the level set function after reinitialization (right)

Figure 5. Non-convex overlapping circle interface: initial condition (left) and the level set funciton afterreinitialization (right)

5.2. Rotation of a Slotted Disk

In this and the following section we solve time-dependent convection problems using the optimalcontrol approach and the convected level set method. Reinitialization techniques based on post-processing are not considered in this numerical study. In our experience they require additionalstabilization and tend to produce stronger displacements of the interface if applied at each time step.First, we consider a very challenging non-stationary test case in which the initial data is given as the

(2016)Prepared using fldauth.cls Preprint

Page 12: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

12 CH. BASTING AND D. KUZMIN AND J.N. SHADID

hInitial L2 proj. Elliptic reinit. Elliptic reinit. w. L.P. OCError Order Error Order Error Order Error Order

0.050000 0.008723 1.8378 0.006606 1.3485 0.008727 1.6760 0.174454 4.10360.025000 0.002440 2.0102 0.002594 2.0431 0.002731 2.2448 0.010148 1.97200.012500 0.000606 1.9306 0.000629 1.9581 0.000576 1.8585 0.002587 1.95620.006250 0.000159 2.0128 0.000162 2.0270 0.000159 2.0128 0.000667 1.99420.003125 0.000039 0.000040 0.000039 0.000167

Table II. Convergence test: relative mass (area) error for the non-convex interface.

distance function of a slotted disk, see figure 6. The velocity field is set to

v(t,x) =

[x2 − 1

212 − x1

],

thus defining a rotation about the center of the domain Ω = U0.5(0.5, 0.5). In the absence of aninflow boundary portion (the velocity field v is perpendicular to the outer normal vector) noboundary conditions are required. At t = 2π, the zero level set of the solution coincides with theinitial data so that errors can easily be measured.

Figure 6. Initial configuration

All numerical computations were carried out using the second-order implicit Crank-Nicolsontime stepping scheme and linear finite elements on a mesh with maximal edge length h0 = 0.05 and∆t0 = 2π

600 ≈ 0.01047 (refinement level ` = 0) and the associated refinements h` = h0 · 2−` and∆t` = ∆t · 2−` for ` = 1, 2, 3. We assess the relative averaged mass error by

emass =

∫ T

0

|A(ϕh(t))−Aexact)|Aexact

dt.

In table III the errors for the non-reinitialized standard finite element approach (NR), the OptimalControl approach (OC) and the Convected Reinitialization approach (CR) are listed. Each of thethree methods was stabilized by means of SUPG. Throughout all refinement levels, the Eikonalresidual of OC is about one half of that for NR, while mass conservation error and L2 error are ofthe same order. Note that CR was very sensitive to the choice of its parameter λ and hence mayproduce better results for more carefully chosen parameters.As the initial zero interface is not smooth, this is a very challenging test case for reinitializationprocedures as they tend to smear discontinuities. OC exhibits similar errors and rates as NRwith SUPG stabilization but with a considerably smaller residual of the Eikonal equation. On allrefinement levels the same parameter β = 2.5 · 10−2 was used. Figure 7 shows the zero level setsof the three methods after one full revolution. We observere that both reinitialization methods haveproblems resolving the sharp corners of the slot. The interface of the OC approach fits the NRinterface quite well, i. e. displacements of the interface are rather small.

(2016)Prepared using fldauth.cls Preprint

Page 13: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 13

Non-reinitialized with SUPG stabilization

`residual Eikonal eq. eE L2 error rel. mass error emass

Rel. Error Error Order Error Order Error Order0 3.5493514 0.0201330 0.9054 0.0035952 1.6028 0.0654459 3.28701 4.8105934 0.0107488 0.7546 0.0011837 1.1306 0.0067050 1.04312 4.1543350 0.0063710 0.8067 0.0005406 1.1789 0.0032538 2.78453 4.4149061 0.0036422 0.0002388 0.0004722

Optimal Control approach (β = 2.510−2) and SUPG stabilization

`residual Eikonal eq. eE L2 error rel. mass error emass

Rel. Error Error Order Error Order Error Order0 2.1469588 0.0121782 0.8035 0.0046831 1.7306 0.0264582 0.34381 3.1227208 0.0069774 0.9333 0.0014111 1.3202 0.0208488 4.80402 2.3825698 0.0036539 1.0769 0.0005651 0.8500 0.0007463 1.76213 2.0996569 0.0017322 0.0003135 0.0002200

Convected Reinitialization approach with constant λ and SUPG stabilization

`residual Eikonal eq. eE L2 error rel. mass error emass

Rel. Error Error Order Error Order Error Order0 9.9834836 0.0566294 1.5536 0.0316824 2.1927 0.0776932 1.26491 8.6336391 0.0192910 1.3191 0.0069301 1.7719 0.0323301 0.96602 5.0415941 0.0077317 1.1186 0.0020293 2.5003 0.0165509 3.13393 4.3163510 0.0035609 0.0003587 0.0018854

Table III. Errors for each method after one full revolution of the slotted disk on different refinement levels

Figure 7. Isocontours of the non-reinitialized approach (green), the Optimal Control approach (blue) and theConvected Reinitialization approach (red)

5.3. Vortex Deformation of a Circle

In the previous test cases the zero interface of the solution coincided with the zero interface of theinitial data except for rotation and shift. In this case we apply a different velocity field that willsignificantly deform the zero interface over time. The maximum deformation is reached at half timet = T

2 , after which the sign is reversed. At final time t = T , the initial data is recovered so that wecan assess the quality of the interface and the accuracy in terms of mass conservation.

(2016)Prepared using fldauth.cls Preprint

Page 14: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

14 CH. BASTING AND D. KUZMIN AND J.N. SHADID

As computational domain we used the unit square with a structured triangular mesh with h0 = 0.05,∆t0 = 0.01 and h` = h0 · 2−`, ∆t` = ∆t0 · 2−` for ` = 1, 2, 3. The velocity field is given by

v(t,x) = cos( tπ4 )

[sin2(πx1) sin(2πx2)− sin2(πx2) sin(2πx1)

]. (35)

Note that applying the standard level set method using Crank-Nicolson for time discretization willreproduce the initial data as it is reversible (if no artificial diffusion is introduced by stabilizationtechniques).Figure 8 shows the isocontours of the Optimal Control and the Convected Reinitialization approachat time instants i t4 , i = 1, 2, 3, 4.

`Non-reinitialized w. SUPG Convected Reinitialization Optimal Control

rel. mass error emass rel. mass error emass rel. mass error emass

Error Order Error Order Error Order0 0.0562404 1.3017 1.0832819 2.0221 0.0278216 1.11421 0.0228146 2.7551 0.2667089 3.0191 0.0128519 1.38142 0.0033795 2.9307 0.0329006 0.2484 0.0049330 3.13253 0.0004432 0.0276965 0.0005625Table IV. Mass comparison for Optimal Contral and Convected Reinitialization approaches

Figure 8. Vortex flow zero level sets for Optimal Control (β = 10−1) in blue and Convected Reinitializationin red: t = T

4 (top left), t = T2 (top right), t = 3T

4 (bottom left) and t = T (bottom right)

(2016)Prepared using fldauth.cls Preprint

Page 15: Optimal control for reinitialization in finite element ...Preprint 2016; 00:1–15 Optimal control for reinitialization in finite element level set methods Christopher Basting 1;,

OPTIMAL CONTROL FOR REINITIALIZATION IN LEVEL SET METHODS 15

6. SUMMARY

We have presented a new all-at-once strategy to solve the level set transport equation whilemaintaining the signed distance function property as far as possible. The problem was formulatedand the first order optimality conditions were derived and discussed. The benefits of the proposedmethodology include the preservation of the zero interface and the possibility of designing a goal-oriented objective functional, for example in the context of shape optimization. Comparison to otherPDE-based reinitialization techniques demonstrated the potential of this approach.

REFERENCES

1. Ausas RF, Dari EA, Buscaglia GC. A geometric mass-preserving redistancing scheme for the level set function.International Journal for Numerical Methods in Fluids 2011; 65(8):989–1010, doi:10.1002/fld.2227. URL http://dx.doi.org/10.1002/fld.2227.

2. Sethian J. Fast marching methods. SIAM Review 1999; 41(2):199–235, doi:10.1137/S0036144598347059. URLhttp://dx.doi.org/10.1137/S0036144598347059.

3. Smolianski A. Numerical modeling of two-fluid interfacial flows. PhD Thesis, University of Jyvaskyla 2001.4. Hysing SR, Turek S. The eikonal equation: numerical efficiency vs. algorithmic complexity on quadri-

lateral grids 2005; URL http://www.iam.fmph.uniba.sk/amuc/_contributed/algo2005/hysing-turek.pdf.

5. Li C, Xu C, Gui C, Fox M. Distance regularized level set evolution and its application to image segmentation.Image Processing, IEEE Transactions on dec 2010; 19(12):3243 –3254, doi:10.1109/TIP.2010.2069690. URLhttp://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5557813&tag=1.

6. Parolini N. Computational fluid dynamics for naval engineering problems. PhD Thesis, Lausanne 2004, doi:10.5075/epfl-thesis-3138. URL http://library.epfl.ch/theses/?nr=3138,http://vpaa.epfl.ch/page14334.html.

7. Sussman M, Smereka P, Osher S. A level set approach for computing solutions to incompressible two-phase flow.Journal of Computational Physics 1994; 114:146–159, doi:10.1006/jcph.1994.1155. URL http://dl.acm.org/citation.cfm?id=182718.

8. Tsai YHR, Cheng LT, Osher S, Zhao HK. Fast sweeping algorithms for a class of hamilton-jacobi equations.SIAM Journal on Numerical Analysis 2004; 41(2):pp. 673–694. URL http://www.jstor.org/stable/4101221.

9. Ville L, Silva L, Coupez T. Convected level set method for the numerical simulation of fluid buckling. InternationalJournal for Numerical Methods in Fluids 2011; 66(3):324–344, doi:10.1002/fld.2259. URL http://dx.doi.org/10.1002/fld.2259.

10. Hartmann D, Meinke M, Schroder W. Differential equation based constrained reinitialization for level set methods.Journal of Computational Physics 2008; 227(14):6821 – 6845, doi:http://dx.doi.org/10.1016/j.jcp.2008.03.040.URL http://www.sciencedirect.com/science/article/pii/S0021999108001964.

11. Basting C, Kuzmin D. A minimization-based finite element formulation for interface-preserving level setreinitialization. Computing 2013; 95(1):13–25, doi:10.1007/s00607-012-0259-z. URL http://dx.doi.org/10.1007/s00607-012-0259-z.

12. Cheng LT, Tsai YH. Redistancing by flow of time dependent eikonal equation. Journal of ComputationalPhysics 2008; 227(8):4002 – 4017, doi:http://dx.doi.org/10.1016/j.jcp.2007.12.018. URL http://www.sciencedirect.com/science/article/pii/S002199910700558X.

13. Basting C, Kuzmin D. Optimal control for mass conservative level set methods. Journal of Computationaland Applied Mathematics 2014; 270:343 – 352, doi:http://dx.doi.org/10.1016/j.cam.2013.12.040. URL http://www.sciencedirect.com/science/article/pii/S0377042713007139.

(2016)Prepared using fldauth.cls Preprint