88
STOCKHOLM SWEDEN 2015 KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES

$ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

IN ,DEGREE PROJECT L SCIENTIFIC COMPUTING, SECOND CYCLE, STOCKHOLM SWEDEN 2015

A Modal PML for the 2D ShallowWater Equations in ConservativeVariables

SIMON JOHANSSON

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCHOOL OF ENGINEERING SCIENCES

Page 2: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 3: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

A Modal PML for the 2D Shallow Water Equations in Conservative Variables

S I M O N J O H A N S S O N

Master’s Thesis in Scientific Computing (30 ECTS credits) Master Programme in Scientific Computing (120 credits) Royal Institute of Technology year 2015 Supervisor at KTH was Olof Runborg Examiner was Michael Hanke TRITA-MAT-E 2015:83 ISRN-KTH/MAT/E--15/83--SE Royal Institute of Technology SCI School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci

Page 4: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 5: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

AbstractA modal Perfectly Matched Layer (PML) is constructedfor the two-dimensional, non-linear, Shallow Water Equa-tions (SWEs) in conservative variables. The result is ananalytical continuation of the original equations where ab-sorption is applied to the outgoing wave modes which aredamped exponentially fast in the direction of propagation.Numerical tests are performed using a variation of the Di-agonally Implicit Runge-Kutta (DIRK) integration schemein conjunction with Lax-Wendroff’s method for smooth so-lutions and some variation of Roe’s method for discontinu-ous solutions. Different absorption functions are used, i.e.the absorption function of the original PML constructed byBerenger for electromagnetic waves, and some variations ofthe hyperbola functions. The results clearly show that thePML is better than the characteristic boundary condition,but also that improvements through some sort of optimiza-tion should lead to better parameter choices, potentiallydecreasing the reflections further.

Page 6: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 7: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

ReferatEtt Modalt PML för de Två-Dimensionella

Ekvationerna för Grunt Vatten iKonservativa Variabler

Ett modalt Perfekt Matchande Lager (PML) konstruerasför de två-dimensionella, icke-linjära, ekvationerna för gruntvatten (Shallow Water-ekvationerna (SWE)) i konservati-va variabler. Resultatet är en analytisk fortsättning av deursprungliga ekvationerna där absorption tillämpas på deutgående vågmoderna som dämpas med exponentiell has-tighet i utbredningsriktningen. Numeriska tester genomförsmed en version av det Diagonalt Implicita Runge-Kutta(DIRK) schemat tillsammans med Lax-Wendroffs metodför kontinuerliga lösningar och en variant av Roes metodför diskontinuerliga lösningar. Olika absorptionsfunktioneranvänds, d.v.s. absorptionsfunktionen från det ursprungli-ga PML:et konstruerat av Berenger för elektromagnetiskavågor, samt olika versioner av hyperbola-funktionerna. Re-sultaten visar tydligt att PML:et är bättre än det karakte-ristiska randvillkoret, men också att förbättringar genomnågon sorts optimering borde leda till bättre parameterval,och potentiellt minska reflektionerna ytterligare.

Page 8: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 9: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Contents

List of Figures

List of Tables

1 Introduction 1

2 Shallow Water Waves 52.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Initial and Boundary Conditions . . . . . . . . . . . . . . . . . . . . 72.3 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Numerical Solutions of the SWEs 113.1 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Wall Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.3 Numerical Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.3.1 The Lax-Friedrichs Method . . . . . . . . . . . . . . . . . . . 143.3.2 The Lax-Wendroff Method . . . . . . . . . . . . . . . . . . . 153.3.3 Roe’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3.4 The Implicit-Explicit Runge-Kutta Method . . . . . . . . . . 18

3.4 Simulations in Bounded Domains . . . . . . . . . . . . . . . . . . . . 203.4.1 Bath Tub Simulation . . . . . . . . . . . . . . . . . . . . . . . 203.4.2 Non-Linear Effects . . . . . . . . . . . . . . . . . . . . . . . . 223.4.3 Order of Accuracy . . . . . . . . . . . . . . . . . . . . . . . . 223.4.4 Discontinuous Solutions . . . . . . . . . . . . . . . . . . . . . 27

4 The Unbounded Domain 314.1 The Characteristic Boundary Condition . . . . . . . . . . . . . . . . 31

4.1.1 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . 324.2 The Perfectly Matched Layer . . . . . . . . . . . . . . . . . . . . . . 34

4.2.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2.2 The PML-Equations . . . . . . . . . . . . . . . . . . . . . . . 364.2.3 PML Implementation . . . . . . . . . . . . . . . . . . . . . . 374.2.4 Analysis of the PML . . . . . . . . . . . . . . . . . . . . . . . 394.2.5 Absorption Choices . . . . . . . . . . . . . . . . . . . . . . . . 44

Page 10: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2.6 Comparison with Characteristic Boundary Condition . . . . . 484.2.7 The Non-Linear Case . . . . . . . . . . . . . . . . . . . . . . 504.2.8 Reflections for Discontinuous Problems . . . . . . . . . . . . 53

5 Conclusions 61

Bibliography 63

A Important Concepts 67A.1 The Courant-Friedrichs-Lewy Condition . . . . . . . . . . . . . . . . 67A.2 L-Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68A.3 Newton’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68A.4 Total Variation Diminishing (TVD) . . . . . . . . . . . . . . . . . . 69

B Reflection Error Convergence 71

Page 11: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

List of Figures

3.1 Sample dependency stencil for cell Cj,k. Gray cells are the cells which thesample solver depends on in a single time step. . . . . . . . . . . . . . . . . 12

3.2 Bath tub simulation in the linearized case using the LaxF method and dimen-sional splitting. A few chosen time steps are plotted. . . . . . . . . . . . . . 21

3.3 L2-difference between the LaxF-solver in the linear and non-linear case fordifferently sized initial perturbations. . . . . . . . . . . . . . . . . . . . . . 23

3.4 Log-log graph for the L∞-errors versus spatial step size for the linear Lax-Friedrichs (LaxF) and linear Lax-Wendroff (LaxW) methods at t = 0.015 seconds. 24

3.5 Log-log graph for the L∞-errors versus spatial step size for the non-linear so-lutions using the following methods: Lax-Friedrichs (LaxF), Roe’s first order,and Lax-Wendroff (based on Roe) at t = 0.015 seconds. . . . . . . . . . . . . 26

3.6 Log-log graph for the L∞-errors versus spatial step size for the DIRK1 andDIRK2 implementations at t = 0.015 seconds. . . . . . . . . . . . . . . . . . 27

3.7 Discontinuous initial data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.8 Discontinuous initial data propagated t = 0.0224 seconds using Roe’s method

applying the van Leer limiter. . . . . . . . . . . . . . . . . . . . . . . . . . 293.9 Discontinuous initial data propagated t = 0.0224 seconds using both Roe’s first

order method and Roe’s high resolution method with the van Leer limiter, thenrotated to omit the y-direction. . . . . . . . . . . . . . . . . . . . . . . . . 29

4.1 L2-norm of the water depth deviation for the characteristic boundary conditionplotted vs time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.2 Unbounded simulation for the linearized case using the LaxW solver and thecharacteristic boundary conditions at a few chosen time steps. . . . . . . . . . 34

4.3 The domain Ω extended with PML-layers in all directions. . . . . . . . . . . 384.4 Form of absorption function. . . . . . . . . . . . . . . . . . . . . . . . . . . 454.5 L2-norm for the water depth deviation for the linear PML with Berenger ab-

sorption function using β = 3 and different values of σmax. The number of cellsin the layer is 6, and D = 0.3. . . . . . . . . . . . . . . . . . . . . . . . . . 46

4.6 L2-norm for the water depth deviation for the linear PML with hyperbolaabsorption functions as well as with the Berenger absorption function whereβ = 3 and σmax = 4000. The number of cells in the layer is 6, and D = 0.3. . . 49

Page 12: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.7 L2-norm for the water depth deviation for the linear PML with different numberof cells using Berenger absorption function where β = 3 and σmax = 4000. EachPML has a corresponding empty layer which is terminated by the characteristicboundary condition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.8 L2-norm for the water depth deviation for the linear PML with different num-ber of cells using shifted hyperbola absorption function. Each PML has acorresponding empty layer which is terminated by the characteristic boundarycondition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.9 L2-norm for the water depth deviation for the non-linear PML with differentnumber of cells using Berenger absorption function where β = 3 and σmax =4000. Each PML has a corresponding empty layer which is terminated by thecharacteristic boundary condition. . . . . . . . . . . . . . . . . . . . . . . . 52

4.10 L2-norm for the water depth deviation for the non-linear PML with differentnumber of cells using shifted hyperbola absorption function. Each PML has acorresponding empty layer which is terminated by the characteristic boundarycondition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.11 L2-norm for the water depth deviation for the non-linear PML with differentnumber of cells using Berenger absorption function where β = 3 and σmax =4000, and a perturbation size of 5. Each PML has a corresponding empty layerwhich is terminated by the characteristic boundary condition. . . . . . . . . . 54

4.12 A few chosen time steps when solving the linear PMLs with Lax-Friedrichsmethod for a discontinuity. In this case with 16 cells in the layer. . . . . . . . 56

4.13 L2-norm for the water depth deviation of an initial discontinuity using the linearPML with different number of cells where the Berenger absorption function isused, β = 3 and σmax = 4000. Each PML has a corresponding empty layerwhich is terminated by the characteristic boundary condition. . . . . . . . . . 57

4.14 A few chosen time steps when solving the non-linear PMLs with Roe’s methodand the van Leer limiter for a discontinuity. In this case with 16 cells in the layer. 58

4.15 L2-norm for the water depth deviation of an initial discontinuity using thenon-linear PML with different number of cells where the Berenger absorptionfunction is used, β = 3 and σmax = 4000. Each PML has a correspondingempty layer which is terminated by the characteristic boundary condition. . . 59

4.16 L2-norm for the water depth deviation of an initial discontinuity of size 5 usingthe non-linear PML with different number of cells where the Berenger absorp-tion function is used, β = 3 and σmax = 4000. Each PML has a correspondingempty layer which is terminated by the characteristic boundary condition. . . 60

B.1 Reflection convergence behaviour for DIRK2 combined with Lax-Wendroff ap-plied to the linear PML-equations. . . . . . . . . . . . . . . . . . . . . . . . 72

Page 13: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

List of Tables

3.1 Butcher table for second order temporal DIRK scheme. The left upper part isthe explicit part, the right upper part the implicit part, and the lower part anotation help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2 L∞-errors versus reference solution for the linear Lax-Friedrichs (LaxF) andlinear Lax-Wendroff (LaxW) methods at t = 0.015 seconds. . . . . . . . . . . 24

3.3 L∞-errors versus reference solution for the non-linear solutions using the fol-lowing methods: Lax-Friedrichs (LaxF), Roe’s first order, and Lax-Wendroff(based on Roe) at t = 0.015 seconds. . . . . . . . . . . . . . . . . . . . . . . 25

4.1 Pattern of absorption functions. . . . . . . . . . . . . . . . . . . . . . . . . 39

Page 14: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 15: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Chapter 1

Introduction

Wave propagation exists in many forms and areas. These include acoustics, elec-tromagnetics, the study of water waves, heat dissipation, and the study of trafficflows, see for example [7].

Some of these problems include flows on an unbounded domain, i.e. a domainwhich has no natural truncation: Waves needs to be studied on the interior of thedomain, and should leave the domain with a minimal or no reflection. This is thecase when simulating electromagnetic waves which hits an absorbing surface, orwhen simulating a tsunami which leaves a domain of interest. In general, the latterexemplifies that the problem often exists due to computational limitations. Thisis because computations require a discretized (finite) space, which is bounded. Thegoal of this paper is to consider the problem of wave propagation in unboundeddomains in the case of shallow water waves, i.e. water waves for which the wavelength is much bigger than the water depth, and to formulate and implement asolution in this particular case. Shallow water waves have mathematical propertieswhich render them easier to study than general water waves, while they still haveinteresting applications such as tsunami waves and atmospheric phenomena.

A relatively simple approach to the problem of wave propagation in unboundeddomains is the characteristic boundary condition, which depends on the character-istic structure of the given equations, and which sets incoming characteristic wavesto zero. This absorbs some of the waves but also generates quite big reflections.

A more complicated boundary condition, which absorbs outgoing waves, is givenby Engquist and Majda in [12]. The application is for the linear case and usespseudo-differential operators together with a Padé approximation to construct ab-sorbing boundary condition of second and higher order. Another implementationis that of Higdon developed for non-dispersive acoustic and elastic waves which isimplemented for non-linear shallow water waves in [13]. The high-order Higdoncondition in [13] is the product of a set of operators each given by the advectionequation, and each corresponding to a phase speed. For further references, see [27],

1

Page 16: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 1. INTRODUCTION

[31] and [11]. Both the Engquist-Majda condition and the high order Higdon con-dition have their merits: The simulation in [12] gives a 3.5-times bigger error forthe first order condition compared to the corresponding high order condition, andthe high-order Higdon condition, on the other hand, is very general, being applica-ble to many different problems. However, there are limitations to these high orderconditions, and the main concern is stability: They are not always stable.

An alternative approach was formulated by Berenger in 1994 in the case ofelectromagnetic waves [6]. The formulation was named Perfectly Matched Layer(PML) since the domain of study is extended by a layer with a perfect matchingproperty. More specifically, a splitting of the electromagnetic fields together with anabsorbing medium and a plane wave technique was used to absorb outgoing waves,see [6]. Chew and Weedon [9] later showed that the PML formulation in [6] wasequal to a coordinate stretching, which maps from the real axis to the complex plane.Becache and Joly analyzed Berenger’s approach and found that it is only weaklywell-posed, see [5]. The PML has also been implemented for advective acoustics [1],elastic waves [3], and a general formulation for hyperbolic systems [14]. For furtherreferences, see [15], [19] and [4].

In the case of the 2D Shallow Water Equations (SWEs), Navon et al in 2001implemented a variation of Berenger’s approach where each of the primitive variableswere split, and absorption introduced in accordance with Berenger, see [23][24]. Theanalysis in [23][24] was for the linearized case, while the implementation was for thenon-linear equations. It used the explicit Miller and Pearce method for numericalintegration, showing that the absorption for the SWEs in primitive variables wasbetter than the characteristic boundary condition, but the L2-errors in the heightfield were still quite big, even when the number of cells in the layer reached 30.

The approach in [23][24] was for the SWEs in primitive variables, and usedan explicit treatment of the absorption terms. The goal of this paper is to useanother approach, implemented by Amro and Zheng [2] for the 2D Euler equationsin 2007, and apply it to the 2D SWEs. Amro and Zheng solved the non-linearEuler equations in the conservative variables by formulating a corresponding set ofcoordinate transformed PML-equations, an implementation that follows from [14].The approach is well suited for general computations since the physical nature inboth the Euler (gas) and SWE cases is non-linear and conservative1. Furthermore,Amro and Zheng stated that their approach should be well suited for the SWEs andthis is something the current paper will show. Also, comparing with [23][24], thetreatment in this paper will consider both explicit and implicit terms which easesthe time step requirements on the solver.

The paper is outlined as follows: Chapter 2 discusses shallow water waves andtheir corresponding equations, while Chapter 3 introduces numerical considerations,

1Conservative of mass and momentum.

2

Page 17: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

and performs simulations, all using a bounded domain. Chapter 4 treats the problemof wave propagation in unbounded domains, describes the characteristic and PMLformulations, performs some analysis, and carries out simulations in both the linearand non-linear cases, using different absorption functions. Finally, in Chapter 5,the paper is concluded.

3

Page 18: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 19: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Chapter 2

Shallow Water Waves

2.1 FormulationWater is a relatively inviscid, Newtonian1 fluid, which means that the relationshipbetween stress and the rate of deformation is linear. Waves in shallow water aredispersive (waves of different frequencies have different speeds), and the fluid veloc-ity in the vertical direction is negligible. The underlying equations, the SWEs, arederived by averaging the inviscid Navier-Stokes equations in the vertical direction.The assumption of small vertical effects, such as a wave length which is much big-ger than the water depth, are essential for this to be acceptable. However, furtherassumptions are also needed. See [30].

In this paper, it is assumed that the bathymetry2 is constant, and that windforcing, Coriolis forces and other external forces, except gravity, can be ignored.This leads to a model of surface gravity waves [30]. The 2D SWEs, under theseassumptions, may be written:

∂h

∂t+ h

∂u

∂x+ u

∂h

∂x+ h

∂v

∂y+ v

∂h

∂y= 0, (2.1)

∂u

∂t+ u

∂u

∂x+ v

∂u

∂y+ g

∂h

∂x= 0, (2.2)

∂v

∂t+ u

∂v

∂x+ v

∂v

∂y+ g

∂h

∂y= 0, (2.3)

where g is gravitational acceleration, h is water depth above a constant water bed,and where u and v are wave velocities in the x- and y-directions, respectively.

The form (2.1) - (2.3) is a primitive variable form of the 2D SWEs, i.e. h, u, v isa primitive variable set in the sense that it describes the dynamics of the system andcan be used to generate any another variable set which also describes the dynamics

1As long as the flow is non-turbulent.2Bottom topography.

5

Page 20: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 2. SHALLOW WATER WAVES

of the system. Also, a primitive variable set is in general not a conservative variableset.

The problem with the SWEs written in primitive form is that it, except forsmooth solutions, does not guarantee the conservation of mass and momentum instandard numerical methods, the very properties from which the equations derive[20]. This is especially troublesome in the case of a shock, where the primitive formof the equations may lead to unphysical numerical solutions [20]. To guaranteeconservation, the equations (2.1) - (2.3) could be re-written in conservative form.

The conservative form of (2.1) is given directly by the product rule,

∂h

∂t+ ∂ (hu)

∂x+ ∂ (hv)

∂y= 0, (2.4)

while (2.2) has to be multiplied by h,

h∂u

∂t+ hu

∂u

∂x+ hv

∂u

∂y+ gh

∂h

∂x= 0,

where it is realized that (also by the product rule):

∂ (hu)∂t

= h∂u

∂t+u∂h

∂t,

∂(hu2)∂x

= hu∂u

∂x+u∂ (hu)

∂x,

∂ (huv)∂y

= hv∂u

∂y+u∂ (hv)

∂y,

which gives

∂ (hu)∂t

+ ∂(hu2)∂x

+ ∂ (huv)∂y

+ gh∂h

∂x− u

(∂h

∂t+ ∂ (hu)

∂x+ ∂ (hv)

∂y

)= 0,

where the expression within the parenthesis is exactly the left hand side of (2.4),which has to be zero, and since

gh∂h

∂x≡∂(

12gh

2)

∂x,

this leads to∂ (hu)∂t

+∂(hu2 + 1

2gh2)

∂x+ ∂ (huv)

∂y= 0 (2.5)

which is the conservative form of (2.2). Analogously, the conservative form of (2.3)becomes

∂ (hv)∂t

+ ∂ (huv)∂x

+∂(hv2 + 1

2gh2)

∂y= 0. (2.6)

Together (2.4), (2.5) and (2.6) form the conservative 2D SWEs [20][30], where(2.1), (2.2) and (2.3) is one possible primitive form. The equation (2.4) is the con-tinuity equation, while equations (2.5) and (2.6) are the equations for conservation

6

Page 21: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

2.2. INITIAL AND BOUNDARY CONDITIONS

of momentum [20][30]. The set of conservative variables in (2.4) - (2.6) is h,m, nwhere m := hu and n := hv is momentum in the x- and y-directions, respectively.

The vector form of (2.4) - (2.6) is

qt + F (q)x +G(q)y = 0 (2.7)

where

q =

hmn

F =

mm2/h+ 1

2gh2

mn/h

, G =

nmn/h

n2/h+ 12gh

2

The SWEs may be used to simulate waves spreading when a dam breaks [20],

as well as tsunami waves [21]. They may also be used to model atmospheric andoceanic phenomena [30]. Note, however, that additional forces, such as the Coriolisforce, may be needed to make such models realistic. The conservative form (2.7) isfurthermore useful when computing shocks [20], and reminds us of which propertiesthat are actually conserved in shallow water flow, namely mass and momentum.

2.2 Initial and Boundary ConditionsThe equations governing shallow water flow was presented in the previous section.However, the equations alone are not enough to formulate the problem: They haveto be put into a context. This means that a simulation of shallow water flow has tostart from an initial state and be given boundary conditions.

In the case of the 2D SWEs, the initial state may be a set of values for the fieldsh, u and v. Linearization (see the next section) is common and therefore the givenvalues may be the mean flow together with deviations. Naturally the initial datadepends on the problem, and may be either smooth or discontinuous.

Boundary conditions are applied to the boundaries of the domain of interest. Ex-amples of boundary conditions include solid wall3, periodic and absorbing boundaryconditions [20]. The formulation of the boundary conditions are important in thatthey, together with the rest of the problem formulation, have to form a well-posedproblem, otherwise unique solutions are not guaranteed [16].

Solid wall is mathematically that the normal velocities on the boundary of thedomain are zero [20], i.e.

u · n = 0, (2.8)3Also called hard wall.

7

Page 22: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 2. SHALLOW WATER WAVES

where u = (u, v)T is the velocity vector and n the normal vector on the boundary.Solid wall boundary conditions therefore means that mass and momentum are con-served within the domain of interest and that waves are reflected back when theboundary is reached.

Periodic boundary conditions, on the other hand, are - naturally - based onperiodic assumptions, i.e. [20]

q(x+ L, y, t) = q(x, y, t), ∀x, y, t, (2.9)

where L is the length of the domain in the x-direction. Periodic boundary conditionsallow waves on one side of the domain to enter on the other side of the domain.

Finally, it is common that no natural truncation exists4, and that waves arerequired to leave the domain of interest with no or minimal reflections. The treat-ment of this problem in the case of shallow water waves is the goal of this paper.These kinds of boundary conditions have many names, they may be called absorbingboundary conditions [2][20][23][24], open boundary conditions [2][19], nonreflectingboundary conditions [2][20][23][24] as well as wave propagation in unbounded do-mains, among other things. In this paper, the author adopts the name absorbingboundary condition (ABC), which seems common enough, although the term wavepropagation in unbounded domains may also be used. The goal of an ABC is the fol-lowing: To make waves "vanish" out through an artificial boundary placed at somedistance from the interesting part of the solution, and that unphysical reflectionsshall be minimal.

2.3 LinearizationLet us focus on the behaviour of small deviations from a constant solution. Thisis done by linearizing the SWEs given in conservative variables, i.e. equation (2.7).To do this, differentiate F with respect to h, m and n to get the Jacobian of F :

A = F ′(q) =

0 1 0− (m/h)2 + gh 2 (m/h) 0− (m/h) (n/h) (n/h) (m/h)

=

0 1 0−u2 + gh 2u 0−uv v u

and equivalently for G:

B = G′(q) =

0 0 1− (m/h) (n/h) (n/h) (m/h)− (n/h)2 + gh 0 2 (n/h)

=

0 0 1−uv v u

−v2 + gh 0 2v

.4For example, any problem where water waves are studied on some subset of the world oceans

lacks a natural truncation. Also, meteorological problems which study the weather on a sub-domainof the earth are of this type, as well as problems where electromagnetic waves are simulated to beabsorbed by some absorbing material.

8

Page 23: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

2.3. LINEARIZATION

The quasi-linear form of (2.7) is therefore: hhuhv

+

0 1 0−u2 + gh 2u 0−uv v u

hhuhv

x

+

0 0 1−uv v u

−v2 + gh 0 2v

hhuhv

y

= 0, (2.10)

which holds for smooth solutions.

Next, let hhuhv

=

HHUHV

+

h

hu

hv

,where H, U and V are the mean flow values of h, u and v, and where h, u and v arethe deviations from this state. Insert this into (2.10), and then remove all powersand factors involving the deviations, since they are relatively small. This leads tothe linearized SWEs: h

hu

hv

t

+

0 1 0−U2 + gH 2U 0−UV V U

h

hu

hv

x

+

0 0 1−UV V U

−V 2 + gH 0 2V

h

hu

hv

y

= 0,

(2.11)which approximates the behaviour of the SWEs for small deviations from the meanstate. In vector form this becomes

qt + Cqx +Dqy = 0 (2.12)

where

q =

h

hu

hv

,

C =

0 1 0−U2 + gH 2U 0−UV V U

,

D =

0 0 1−UV V U

−V 2 + gH 0 2V

.

The equivalent formulations (2.11) and (2.12) are valid if h H, |u| √gH and

|v| √gH. The requirement h H is natural, while the other two requirements

9

Page 24: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 2. SHALLOW WATER WAVES

can be derived from the maximum absolute eigenvalues of C and D, which are in theorder of

√gH. Thus, the requirements |u|

√gH and |v|

√gH means that the

wave speeds have to be much less than the mean wave speeds. It can be concludedthat (2.11) and (2.12) are valid for "small" amplitude variations around the givenmean state and that they should be solved with caution and with this in mind.

10

Page 25: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Chapter 3

Numerical Solutions of the SWEs

To begin with, consider the problem on a bounded domain, i.e. the solution ofthe SWEs on a domain bounded by hard walls in all directions, and formulatenumerical solutions in this case. This is done to concentrate on how the ShallowWater Equations may be solved, either in the non-linear form (2.7) or the linearizedform (2.12), and then, in the next chapter, introduce more complicated boundaryconditions.

3.1 DiscretizationLet the domain of interest, Ω, be rectangular,

Ω := [xmin, xmax]× [ymin, ymax] ∈ R2,

where xmin < xmax and ymin < ymax. Introduce a discretization of Ω,

Ωj,k := (xj , yk),

wherexj = xmin + (j − 1)∆x, yk = ymin + (k − 1)∆y

j = 1, ..., N + 1, k = 1, ...,M + 1

and where∆x = xmax − xmin

N, ∆y = ymax − ymin

M

are the step sizes in the x- and y-directions, respectively. Then define the gridcell, Cj,k, such that it lies between the grid points (xj , yk), (xj+1, yk), (xj , yk+1) and(xj+1, yk+1) with the cell center at (xj+1/2, yk+1/2). This gives N×M grid cells withthe same size spread evenly over the domain Ω. Also, x1 = xmin, xN+1 = xmax,y1 = ymin and yM+1 = ymax.

Alternatively, the cell centers will be positioned at the (xj , yk)-positions. This,however, makes no fundamental change to the grid other than making it easier to

11

Page 26: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

have grids at different spatial step levels which share cell centers. This grid is oftencalled the dual grid. Denote it Ω∗j,k.

A temporal gridtn, n = 0, 1, ..., NT

is introduced, where NT is the number of time steps. This has the time step size,

∆t = tn+1 − tn,

which is the same for all n. The value of ∆t is chosen by the user, but has to fulfillthe CFL-condition for stability, see appendix A.1.

To find a discrete solution, a grid function

qnj,k ≈ q(xj , yk, tn)

is also introduced. It approximates the data of the variable field q given in equation(2.7) (or the corresponding linearized data for equation (2.12)) for each grid cellCj,k on a discrete time step tn. Finally, a local solver, ψ, is constructed such that(informally)

qn+1j,k = ψ(qnj+J,k+K), ∀(J,K) ∈ Dψ, (3.1)

whereDψ is the discrete domain of dependence for ψ, usually one or two cells in eachspatial direction. This leads to an expansion of the grid Ωj,k, i.e. an introduction ofghost cells. For example, if Dψ = (−1, 0), (1, 0), (0,−1), (0, 1), this means a onecell dependence in each spatial direction, see Figure 3.1, and the following ghostcells are therefore needed in the spatial discretization: C0,k (west direction) andCN+1,k (east direction) ∀k and Cj,0 (south direction) and Cj,M+1 (north direction)∀j. The values of qnj,k for these ghost cells needs to be applied at each iteration stepso that the solver can iterate correctly.

Figure 3.1. Sample dependency stencil for cell Cj,k. Gray cells are the cellswhich the sample solver depends on in a single time step.

The procedure (3.1) may be used directly, but an alternative is to use the cor-responding dimensional split version (informally),

q∗j,k = ψ1(qnj+J,k), ∀J ∈ Dψ1 (3.2)

12

Page 27: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.2. WALL APPLICATION

qn+1j,k = ψ2(q∗j,k+K), ∀K ∈ Dψ2 (3.3)

where ψ1 is the local solver in the x-direction only, and ψ2 the local solver in they-direction only. This means that ghost cell values have to be applied in the x-direction for each x-direction step (3.2), and in the y-direction for each y-directionstep (3.3).

In this paper, (3.1) will be used as well as the alternative (3.2) - (3.3). A morecomplicated procedure will also be used.

3.2 Wall ApplicationAs mentioned earlier, in this chapter hard wall boundary conditions are applied ineach spatial direction. This means that the discrete version of the condition (2.8)is needed for the 2D SWEs. It is commonly known (see for example [20]) thatthis is done by negating the x-momentum in the west and east directions, and they-momentum in the south and north directions. This gives

q0,k =

h1,k−m1,kn1,k

, ∀k (3.4)

qj,0 =

hj,1mj,1−nj,1

, ∀j (3.5)

qN+1,k =

hN,k−mN,k

nN,k

, ∀k (3.6)

qj,M+1 =

hj,Mmj,M

−nj,M

, ∀j (3.7)

and shows the case of a one cell dependence in each spatial direction. These con-ditions, (3.4) - (3.7), needs to be applied before each iteration step using the (yetunspecified) solver ψ in (3.1), and means that momentum normal to the outerboundaries is not allowed to pass through these boundaries.

3.3 Numerical SchemesIn this section, five numerical schemes are constructed: 1) the Lax-Friedrichs method,2) the Lax-Wendroff method, 3) a low-resolution Roe method, which is first order,4) a limiter-based Roe method, which may be used to construct high-resolutionsolutions, i.e. second order except at discontinuities, and 5) the Implicit-Explicit

13

Page 28: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

Runge-Kutta (IERK) method. Notice that at least methods 1) to 4) may be appliedas a non-dimensional split solver (3.1) and as a dimensional split solver (3.2) - (3.3).In passing it is also worth to mention that Roe’s method (both versions of it) isused to solve the non-linear equations (2.7), not the linearized equations (2.12)1.For details, see [20].

3.3.1 The Lax-Friedrichs MethodThe Lax-Friedrichs method (LaxF) as given in 1D - i.e. omitting the y-fluxes in(2.7) - is (see for example [20]):

qn+1j =

qnj−1 + qnj+12 − ∆t

2∆x(Fnj+1 − Fnj−1

), (3.8)

which may be re-written as

qn+1j − qn

j−1+qnj+1

2∆t +

Fnj+1 − Fnj−12∆x = 0,

where extension to 2D is natural,

qn+1j,k −

qnj−1,k+qn

j+1,k+qnj,k−1+qn

j,k+14

∆t +Fnj+1,k − Fnj−1,k

2∆x +Gnj,k+1 −Gnj,k−1

2∆y = 0,

and therefore

qn+1j,k =

qnj−1,k + qnj+1,k + qnj,k−1 + qnj,k+14 − ∆t

2∆x(Fnj+1,k − Fnj−1,k

)− ∆t

2∆y(Gnj,k+1 −Gnj,k−1

).

(3.9)which is one possible version of Lax-Friedrichs method in 2D, enumerated 1) above.Instead of (3.9) one may also use dimensional splitting,

q∗j,k =qnj−1,k + qnj+1,k

2 − ∆t2∆x

(Fnj+1,k − Fnj−1,k

), (3.10)

qn+1j,k =

q∗j,k−1 + q∗j,k+12 − ∆t

2∆y(G∗j,k+1 −G∗j,k−1

), (3.11)

which naturally introduces a splitting error.

It is important to note that the versions (3.9) and (3.10) - (3.11) are not equiv-alent. They yield different numerical behaviour and have different stability regionsif von Neumann stability analysis is applied to them which may be done in thelinearized case.

The Lax-Friedrichs method is only first order and highly dissipative. It may beused as some sort of reference method to validate basic behaviour but (at least inthe above form) absolutely not as a serious method. It can be used in the non-linearcase (2.7) as well as the linearized case (2.12) where, in the linearized case, q has tobe replaced by q and the F and G vectors by Cq and Dq, respectively.

1This is because (the below version of) Roe’s method fails if the water depth field is zero, whichit often is in the linearized case. This follows from the construction of the Roe state, see below.

14

Page 29: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.3. NUMERICAL SCHEMES

3.3.2 The Lax-Wendroff MethodThe Lax-Wendroff method (LaxW), enumerated 2) above, is a second order method.It is constructed using a Taylor series expansion of the time variable, where thelinear hyperbolic system (2.12) has been used to rewrite t-derivatives in terms ofx-derivatives, and where terms higher than second order have been discarded. Also,all derivatives have been approximated using central differences. In 2D this becomes[20]

qn+1j,k = qnj,k −

∆t2∆xC

(qnj+1,k − qnj−1,k

)− ∆t

2∆yD(qnj,k+1 − qnj,k−1

)+

12

(∆t∆x

)2C2(qnj−1,k − 2qnj,k + qnj+1,k

)+ 1

2

(∆t∆y

)2D2

(qnj,k−1 − 2qnj,k + qnj,k+1

)+

∆t28∆x∆y (CD +DC)

((qnj+1,k+1 − qnj−1,k+1

)−(qnj+1,k−1 − qnj−1,k−1

)), (3.12)

which is a second order method that uses qnj,k and all the neighbouring cells, eventhose on the diagonal, to compute qn+1

j,k .

Just as before, this may be written in dimensional split form, but resolving onlyone dimension at a time would ignore the term common to both dimensions, i.e.

∆t28∆x∆y (CD +DC)

((qnj+1,k+1 − qnj−1,k+1

)−(qnj+1,k−1 − qnj−1,k−1

)), and introduce

a splitting error.

3.3.3 Roe’s MethodRoe’s method, which was introduced by P. L. Roe in 1981, considers the solutionof a quasi-linear hyperbolic system of conservation laws in 1D [26]:

qt + A(q)qx = 0, (3.13)

and shows that, under some circumstances - e.g. the Euler equations of gas dynamicswith only a one family shock - exact solutions exist on the interface between twoadjacent cells. This is done by defining a parametrization vector [26]. Importantly,the approach is also valid for the SWEs [20]. The procedure below is an extensionof Roe’s approach, where the parametrization vector is given by (see [20])

ψ =

√h√hu√hv

leading to the Roe state:

hj+1/2,k = hj+1,k + hj,k2 (3.14)

uj+1/2,k =√hj+1,kuj+1,k +

√hj,kuj,k√

hj+1,j +√hj,k

(3.15)

15

Page 30: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

vj+1/2,k =√hj+1,kvj+1,k +

√hj,kvj,k√

hj+1,k +√hj,k

(3.16)

which is defined on the interface between the cells Cj,k and Cj+1,k on the discretiza-tion Ωj,k. If this state is used for the matrix A in Section 2.3, denote the resultAj+1/2,k - the so called Roe matrix - then it can be shown that the first orderapproximation of the flux Fj+1/2,k is [20]

Fj+1/2,k ≈ F 1j+1/2,k = 1

2 (Fj+1,k + Fj,k)−12 |Aj+1/2,k| (qj+1,k − qj,k) (3.17)

where |Aj+1/2,k| = Rj+1/2,k|Λj+1/2,k|R−1j+1/2,k for which Rj+1/2,k is the 3 by 3 matrix

with the eigenvectors of Aj+1/2,k as columns, and Λj+1/2,k the 3 by 3 diagonal matrixwith the eigenvalues of Aj+1/2,k as diagonal elements.

A second order (or high resolution) flux is also available if higher order termsare added to (3.17). This may be done in the following way [20]:

Fj+1/2,k ≈ F 2j+1/2,k = F 1

j+1/2,k + Fj+1/2,k

Fj+1/2,k = 12

3∑p=1|λpj+1/2,k|

(1− ∆t

∆x |λpj+1/2,k|

)W pj+1/2,k

where λpj+1/2,k is the p:th eigenvalue of Aj+1/2,k, and W pj+1/2,k the p:th limited

characteristic wave in the upwind direction:

W pj+1/2,k = φ(γpj+1/2,k)W

pj+1/2,k

where φ(·) is a limiter function, and where

W pj+1/2,k =

(wpj+1,k − w

pj,k

)rpj+1/2,k

is the difference in the p:th characteristic variable over the jump at (xj+1/2, yk)times the corresponding eigenvector rpj+1/2,k at the said interface. Moreover,

γpj+1/2,k =W

pj+1/2,k ·W

pj+1/2,k

W pj+1/2,k ·W

pj+1/2,k

is the limiting function argument, and

Wpj+1/2,k =

(wpJ+1,k − w

pJ,k

)rpJ+1/2,k

where (J+1/2, k) refers to the jump in the upwind direction of (j+1/2, k). Finally,there are different limiters which may be used, for example the min-mod limiter,

φ(γpj+1/2,k) = minmod(1, γpj+1/2,k),

16

Page 31: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.3. NUMERICAL SCHEMES

where the minmod function returns the minimum modulus of its’ two input argu-ments, but also the van Leer limiter,

φ(γpj+1/2,k) =γpj+1/2,k + |γpj+1/2,k|

1 + |γpj+1/2,k|,

where both of these limiters yield high-resolution. Another possibility is

φ(γpj+1/2,k) = 1,

which yields the Lax-Wendroff method. This completes the high-order Roe formu-lation, and enables the calculation of F 2

j+1/2,k.

This is done analogously for Fj−1/2,k, Gj,k+1/2 and Gj,k−1/2, and leads to thefirst order Roe method 3) in the un-split version

qn+1j,k = qnj,k −

∆t∆x

(F 1,nj+1/2,k − F

1,nj−1/2,k

)− ∆t

∆y(G1,nj,k+1/2 −G

1,nj,k−1/2

), (3.18)

and analogously for the high order method 4)

qn+1j,k = qnj,k −

∆t∆x

(F 2,nj+1/2,k − F

2,nj−1/2,k

)− ∆t

∆y(G2,nj,k+1/2 −G

2,nj,k−1/2

). (3.19)

The obvious dimensional split versions of (3.18) and (3.19) are

q∗j,k = qnj,k −∆t∆x

(F 1,nj+1/2,k − F

1,nj−1/2,k

), (3.20)

qn+1j,k = q∗j,k −

∆t∆y

(G1,∗j,k+1/2 −G

1,∗j,k−1/2

), (3.21)

and

q∗j,k = qnj,k −∆t∆x

(F 2,nj+1/2,k − F

2,nj−1/2,k

), (3.22)

qn+1j,k = q∗j,k −

∆t∆y

(G2,∗j,k+1/2 −G

2,∗j,k−1/2

). (3.23)

Roe’s method is interesting in that it (i) yields an exact solution to the quasi-linear form of the equations on the interface between two cells [26], (ii) is an approx-imate solution to the non-linear equations [26], and (iii) enables the use of limitersto control the behaviour of waves across discontinuities [20].

17

Page 32: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

3.3.4 The Implicit-Explicit Runge-Kutta MethodAssume that the non-linear SWEs (2.7) are extended with source terms dependenton q, x and y,

qt + F (q)x +G(q)y = S(q, x, y), (3.24)

and also that S(q, x, y) have very different magnitudes (sometimes very "large") ondifferent parts of the computational domain. Then the problem (3.24) is consideredstiff : The time step requirement is very different where S(q, x, y) is large comparedto where S(q, x, y) is small [20][2][28]. This is the case later in this report, whenabsorption terms are added to the SWEs. Thus, the situation needs to be handled.

The varying time scales of a stiff problem such as (3.24) means that any ex-plicit method would suffer from severe time step requirements [20][2]. Also, the fullproblem formulation presented later in this report is similar to [2], which avoids animplicit approach with the argument that an implicit approach on the given systemwould lead to a scheme where a large number of unknowns (in this case, 9) needsto be resolved. Instead [2] uses the Implicit-Explicit Runge-Kutta (IERK) method,which is also followed by this paper.

Let Qj,k be the numerical approximation of the problem state at Cj,k (includingnearby cells if needed). Then (3.24) may be written on the semi-discretized form

∂Qj,k∂t

= H(Qj,k) + S(Qj,k), (3.25)

where H(Qj,k) ≈ −F (Qj,k)x − G(Qj,k)y is a numerical approximation of the hy-perbolic part of (3.24), and where the dependence of S on x and y has been builtinto the numerical evaluation. The second order Diagonally Implicit Runge-Kutta(DIRK) version of the IERK method - where second order refers to the temporalapproximation - is then given by [25]

Q∗j,k = Qnj,k + χ∆tS(Q∗j,k), (3.26)

Q∗∗j,k = Qnj,k + ∆tH(Q∗j,k) + (1− 2χ)∆tS(Q∗j,k) + χ∆tS(Q∗∗j,k), (3.27)

Qn+1j,k = Qnj,k + 1

2∆t(H(Q∗j,k) +H(Q∗∗j,k) + S(Q∗j,k) + S(Q∗∗j,k)

), (3.28)

where χ = 1 −√

22 . In this scheme, the hyperbolic terms H are approximated

explicitly and the absorption terms S implicitly. The coefficients, i.e. the constantsin front of ∆tH(·) and ∆tS(·), may be written in a so called Butcher table [25],see Table 3.1. In this case, it is actually a two-part Butcher table, the left part isthe explicit part and the right part is the implicit part. Each of these parts arebuilt on the form of a left column vector z = (z1, z2)T , a corresponding matrixM = (m1,1,m1,2;m2,1,m2,2), and a row vector ω = (ω1, ω2), followed by a blankspace in the left corner. The scheme is of DIRK -type since all values in the M -matrix which lies above the main diagonal are zero.

18

Page 33: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.3. NUMERICAL SCHEMES

Table 3.1. Butcher table for second order temporal DIRK scheme. The leftupper part is the explicit part, the right upper part the implicit part, and thelower part a notation help.

To see that the above construction is a second order temporal integration scheme,define

zi =i∑

r=1mi,r,

for the explicit part, and

zi =i∑

r=1mi,r,

for the implicit part. The order of accuracy conditions are then, according to [25]:

First orderω1 + ω2 = 1, ω1 + ω2 = 1, (3.29)

Second orderω1z1 + ω2z2 = 1/2, z1ω1 + z2ω2 = 1/2, (3.30)

ω1z1 + ω2z2 = 1/2, ω1z1 + ω2z2 = 1/2, (3.31)

where the tilde symbol marks the explicit part of the table. In the given casez = (0, 1)T , z = (χ, 1 − χ)T , w = (1/2, 1/2) and w = (1/2, 1/2), which means thatall the given sums in (3.30) and (3.31) becomes 1

2 , leading to second order.

However, the order of the entire procedure, i.e. including both temporal andspatial terms, is also dependent how H(·) and S(·) have been computed; they musthave been computed in some "nice" way for the above order of accuracy calculationsto hold. "Nice", in this context, means that they may not be the result of any rewrit-ing which includes the time derivatives. For example, the Lax-Wendroff method -described in Section 3.3.2 - is formulated using a Taylor series expansion of the timederivative, where the differential equation is used to translate time derivatives tospatial derivatives, and using (3.26) - (3.28) in conjunction with this does not yieldsecond order accuracy, see numerical experiments in Section 3.4.3. This is because

19

Page 34: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

the semi-discreteness really is broken in this case because the Lax-Wendroff methodis fully discrete in itself meaning that semi-discreteness is lost. In practice, thismeans that when the Lax-Wendroff method, which is second order in both time andspace, is combined with an additional approximation in time this leads to smearing.In this case ω1 = 1/2 and ω2 = 1/2, as given in Table 3.1, are replaced by

ω1 = 1, ω2 = 0, (3.32)

which turns (3.26) - (3.28) into

Q∗j,k = Qnj,k + χ∆tS(Q∗j,k), (3.33)

Q∗∗j,k = Qnj,k + ∆tH(Q∗j,k) + (1− 2χ)∆tS(Q∗j,k) + χ∆tS(Q∗∗j,k), (3.34)

Qn+1j,k = Qnj,k + ∆tH(Q∗j,k) + 1

2∆t(S(Q∗j,k) + S(Q∗∗j,k)

). (3.35)

If S(·) := 0 this reduces to the Lax-Wendroff scheme when H is approximatedin the above way. This is not the case, of course, if H is constructed in some "nice"way, where S(·) := 0 really leads to the first order forward Euler scheme. Since(3.26) - (3.28) and (3.33) - (3.35) are two different DIRK implementations, the firstwill - from now on - be called DIRK1 and the second DIRK2, just to separate themfrom one another.

According to [2] this scheme is L-stable and Total Variation Diminishing (TVD),which are important properties when solving ODEs with stiff source terms, seeAppendices A.2 and A.4. Informally, L-stability ensures a sufficient convergencerate to the true solution, and both L-stability and TVD are preventive of unnaturaloscillations.

3.4 Simulations in Bounded Domains

3.4.1 Bath Tub SimulationTo illustrate, a simple test problem is solved on Ω = [−1, 1]× [−1, 1] using the initialdata

q(x, y, 0) =

e−(x2+y2)/0.05

00

, (3.36)

and the mean state

qmean =

4000

(3.37)

using the dimensional split version of the Lax-Friedrichs method (3.10) - (3.11) inthe linearized case (2.12), i.e. F = Cq and G = Dq. The boundary conditions

20

Page 35: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.4. SIMULATIONS IN BOUNDED DOMAINS

are hard wall in each direction, as stated earlier, and N = M = 81. The Courantnumber is 0.9 which leads to a time step size of 0.0011. The results for a few chosentime steps are plotted in Figure 3.2.

The simulation may be called a bath tub simulation since a bath tub has solidsides, e.g. walls, and the bottom is usually quite flat. Throwing a stone into the tubleads to isotropically spreading waves, analogous to those in Figure 3.2. The wavesbounces back when the sides of the bath tub have been reached, and the simulationis stopped after the waves have done this twice, yet again reaching the middle ofthe tub.

Figure 3.2. Bath tub simulation in the linearized case using the LaxF methodand dimensional splitting. A few chosen time steps are plotted.

21

Page 36: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

3.4.2 Non-Linear EffectsThe simulation in the previous section was for the linearized case (2.12). Thequestion is, what happens if non-linear effects are introduced, i.e. if (2.7) is solvedinstead? It turns out that if the non-linear problem (2.7) is solved using (3.10) -(3.11), with settings otherwise identical to above, i.e. with the initial data

q(x, y, 0) =

40 + e−(x2+y2)/0.05

00

, (3.38)

then the difference should be that the non-linear solution is closer to the linearsolution when the perturbation from the mean state is smaller. To verify this, thesolver in the linearized case is run once with the data in (3.36) - (3.37) and oncewith the data

q(x, y, 0) =

2e−(x2+y2)/0.05

00

, (3.39)

and the mean state

qmean =

4000

, (3.40)

and then analogously for the solver in the non-linear case: Once with the data in(3.38) and once with

q(x, y, 0) =

40 + 2e−(x2+y2)/0.05

00

. (3.41)

The difference in the L2-norm between the linear case and the non-linear case isthen calculated in each case, and the differences are plotted, see Figure 3.3.

In each case, the Courant number was kept at 0.9, meaning a time step sizeof approximately 0.0011. Although each solver was run only a few time steps, itis clear from Figure 3.3 that the linear solution is closer to the non-linear solutionfor the smaller perturbation, which was expected. This means that the linear andnon-linear LaxF-solutions are consistent with one another.

3.4.3 Order of AccuracyThe order of accuracy is investigated for the linear cases for solvers 1) and 2)(enumerated in Section 3.3), for the non-linear case for solver 1) and the solvers 3)and 4) (which by definition are for non-linear solutions), and finally for the DIRK-type solvers using 2) in the linear case. The investigations are performed using thestandard approach, i.e. (i) perform a reference run on a very fine grid, and then (ii)

22

Page 37: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.4. SIMULATIONS IN BOUNDED DOMAINS

Figure 3.3. L2-difference between the LaxF-solver in the linear and non-linearcase for differently sized initial perturbations.

perform runs on different coarser grid levels, in this case at 4, 8, 16 and 32 timesthe cell size of the reference run and with 1/4, 1/8, 1/16 and 1/32 times as manytime steps, where the number of time steps for the coarsest grid is 8 (only a fewtime steps are needed for this, and the simulation would become prohibitively longin the reference case otherwise). Then, at the final time step, and at the grid pointsof the coarsest grid, measure the error in the L∞-norm for each of the runs versusthe reference run.

The domain is, as before, [−1, 1] × [−1, 1] with the grid sizes 31 × 31, 61 × 61,121×121, 241×241 and a reference grid of 961×961 (the cell centers are positionedas in Ω∗j,k, see Section 3.1). In the linear case, the initial data is (3.36) - (3.37),and in the non-linear case (3.38). The Courant number in the dimensional splitcases is set at 0.9, and in the other cases at 0.5, and there are solid wall boundaryconditions in all directions.

Linear Solutions

The Lax-Friedrichs solver in the linear case 1) and the Lax-Wendroff solver in thelinear case 2) are run according to the above conditions using dimensional splitting.

23

Page 38: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

The L∞-errors at t = 0.015 seconds are shown in Table 3.2, while the log-log plotin Figure 3.4 shows the error-line through the error points of the coarsest and thefinest grids, respectively, estimating visually the order of accuracy.

It is easy to see that the Lax-Friedrichs method is first order, and that the Lax-Wendroff method is second order: When the step size is halved in the Lax-Friedrichscase, the error is (approximately) divided by two, while in the Lax-Wendroff caseit is (approximately) divided by four.

Table 3.2. L∞-errors versus reference solution for the linear Lax-Friedrichs(LaxF) and linear Lax-Wendroff (LaxW) methods at t = 0.015 seconds.

Figure 3.4. Log-log graph for the L∞-errors versus spatial step size for thelinear Lax-Friedrichs (LaxF) and linear Lax-Wendroff (LaxW) methods at t =0.015 seconds.

24

Page 39: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.4. SIMULATIONS IN BOUNDED DOMAINS

Non-Linear Solutions

The order of accuracy for the non-linear solutions, i.e. Lax-Friedrichs method 1),Roe’s first order method 3), and the Lax-Wendroff method in the non-linear case(based on the Roe formulation) 4), is investigated using the dimensional splittingapproach. This is done using the same continuous initial data as before, i.e. (3.38),which means that high-resolution is not needed, and therefore not used. The errorsat t = 0.015 seconds are shown in Table 3.3, while the log-log graph in Figure 3.5gives a visual display.

Table 3.3. L∞-errors versus reference solution for the non-linear solutionsusing the following methods: Lax-Friedrichs (LaxF), Roe’s first order, andLax-Wendroff (based on Roe) at t = 0.015 seconds.

Yet again it’s easy to see which implementations that are first order - Lax-Friedrichs method and Roe’s first order method - while Lax-Wendroff’s method(based on Roe) is second order.

The IERK Method

The order of accuracy for the IERK implementations DIRK1 and DIRK2 are in-vestigated using the un-split Lax-Wendroff method (3.12), where S := 0. Since anun-split method is used, the Courant number has to be changed, and is set to 0.5.Figure 3.6 shows the L∞-errors plotted versus spatial step size in a log-log graph.

The DIRK1-implementation is obviously first order while the DIRK2 imple-mentation is second order. The difference between the two implementations (seeSection 3.3.4) is that the DIRK1-method averages a predictive forward Euler stepwith a regular forward Euler step, i.e. this is Heun’s method, while the DIRK2-method only takes a single forward Euler step. In both cases, however, the H-term follows from Lax-Wendroff’s method, which is second order (really turningthe semi-discrete IERK approach to a discrete scheme). When this is coupled withthe DIRK1-implementation this leads to smearing, and first order accuracy, whilethis does not occur for DIRK2. It can be concluded that both the DIRK1- andDIRK2-implementations depend on how the H-term has been computed, where theDIRK2-implementation becomes the Lax-Wendroff method.

25

Page 40: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

Figure 3.5. Log-log graph for the L∞-errors versus spatial step size for the non-linear solutions using the following methods: Lax-Friedrichs (LaxF), Roe’s firstorder, and Lax-Wendroff (based on Roe) at t = 0.015 seconds.

In this report, the DIRK2-implementation will be used. The reasons are asfollows:

• DIRK2 reduces to the original method when S := 0• Dimensional splitting is easily applied to DIRK2, at least if S is built to allow

that kind of splitting• There are already second order methods (and, if needed, higher order meth-

ods) to solve the SWEs: The DIRK1-approach is not needed to yield secondorder for the hyperbolic terms

• The DIRK1- and DIRK2-implementations are identical when computing Q∗j,kand Q∗∗j,k during a single step

This concludes the order of accuracy section.

26

Page 41: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.4. SIMULATIONS IN BOUNDED DOMAINS

Figure 3.6. Log-log graph for the L∞-errors versus spatial step size for theDIRK1 and DIRK2 implementations at t = 0.015 seconds.

3.4.4 Discontinuous SolutionsIn this section, the behaviour of the numerical methods are investigated when theexact solution is discontinuous. To do this, the non-linear equations (2.7) are solvedusing the dimensional split Roe solver applying the van Leer limiter, comparing itwith Roe’s first order method. Let Ω = [−1, 1] × [−1, 1], and set N = 81 (theM -value is not relevant), a Courant number of 0.9, and use the initial data

q(x, y, 0) =

40 + Φ(x)00

,where

Φ(x) =

1, if x ∈ [0, 0.5]0, otherwise

which leads to waves transported only in the x-direction. The initial data is shownin Figure 3.7, while the data after t = 0.0224 seconds using the Roe’s high resolutionmethod with the van Leer limiter is shown in Figure 3.8. The goal of this section isto study the front and back layers of the square-looking wave which propagates inthe negative x-direction. This is done for both the first order Roe method and thehigh resolution Roe method using a 99%-benchmark, i.e. each layer lies between

27

Page 42: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 3. NUMERICAL SOLUTIONS OF THE SWES

h = 40.005 and h = 40.495. The data in Figure 3.8 is rotated so that the unnecessaryy-axis is no longer shown, and the data is then plotted for both methods, see Figure3.9.

Notice that the high-resolution method yields a sharper slope than the low-resolution method. This behaviour is intuitive and correct: only at the disconti-nuity will the low-resolution and high-resolution methods behave the same. Im-mediately to the sides of the discontinuity the high-resolution method will be lessdissipative and better at preserving the squared initial data. The discontinuitylayer is measured in relation to the cell size, ∆x, and the results are the follow-ing: The front layer is 4∆x for the high-resolution method and 6∆x for the low-resolution method, while the back (rear) layer is 4∆x for the high-resolution methodand 6∆x for the low-resolution method. This means that the low-resolution lay-ers are 50% bigger than the high-resolution layers, and it can be concluded thatthe high-resolution method manages the traveling "squared" waves better than thelow-resolution method. Also, it further verifies the behaviour of the high-resolutionmethod and concludes this section.

Figure 3.7. Discontinuous initial data.

28

Page 43: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

3.4. SIMULATIONS IN BOUNDED DOMAINS

Figure 3.8. Discontinuous initial data propagated t = 0.0224 seconds usingRoe’s method applying the van Leer limiter.

Figure 3.9. Discontinuous initial data propagated t = 0.0224 seconds usingboth Roe’s first order method and Roe’s high resolution method with the vanLeer limiter, then rotated to omit the y-direction.

29

Page 44: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 45: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Chapter 4

The Unbounded Domain

In the previous chapter the SWEs were solved on a bounded domain. This wasachieved using hard wall boundary conditions. Formulating boundary conditionswhich allows waves to pass through unhindered, or with a very low reflection, isconsiderably harder. As mentioned in the introduction, one way to do this is thecharacteristic boundary condition, which sets incoming characteristic waves to zero.

4.1 The Characteristic Boundary ConditionThe logic of the characteristic boundary condition is to let outgoing characteristicwaves pass unhindered through the outer boundaries while incoming characteristicwaves are set to zero [18][29]. Usually, this is a first order formulation which ignorestransverse waves, concentrating on waves normal to the boundary. It uses lineariza-tion of the original equations, and thereafter a characteristic decomposition. Thecharacteristic boundary condition is often used as a reference condition, for exam-ple in [23][24] and [2]. Below, the approach in [29] and [18] is followed, assuming alinearized system.

To formulate the characteristic boundary condition, assume that the boundaryunder consideration lies in the x-direction, and then remove the transverse y-fluxesfrom the linearized Shallow Water Equations, (2.12), to obtain

qt + Cqx = 0. (4.1)

Here, C is diagonalizable with real eigenvalues, i.e. it is a system of hyperbolicdifferential equations. Thus, one can write

C = RΛR−1

where the columns of R are the eigenvectors of C and Λ is the diagonal matrixwhich contains the eigenvalues of C. Inserting this into (4.1), choosing

w = R−1q

31

Page 46: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

and multiplying (from the left) with R−1, gives the characteristic equation

wt + Λwx = 0 (4.2)

where w = (w1, w2, w3)T are the so called characteristic variables.

The characteristic boundary condition then solves

∂wi∂t

+ λiwi,x = 0 (4.3)

for each outgoing wave, i.e. for λi > 0 in the positive direction and λi < 0 in thenegative direction, and then

∂wi∂t

= 0 (4.4)

for each incoming wave. Thus, each characteristic variable wi in the incoming caseis required to remain unchanged over time.

The discrete version of (4.3) uses the upwind approach for wi,x since each char-acteristic wave travels only in one direction. The discrete formulation of (4.3) and(4.4) then becomes

wn+1i,J,k = wni,J,k −

Li∆t∆x

(wni,J,k − wni,J−1,k

), ∀i, k (4.5)

where J is the index of the relevant ghost cell, and where

Li =

λi, for each outgoing wave0, for each incoming wave

The transformation back to the conservative variables gives

qn+1J,k = Rwn+1

J,k , ∀k (4.6)

which completes the formulation of the characteristic boundary condition used inthis paper.

4.1.1 Simulation ResultsTo test this, consider the setup in Section 3.4.1, where the wall boundary conditionsare replaced by characteristic boundary conditions. Also, the Courant numberis kept at 0.9, which leads to a time step of 0.0011 (the same as before), andreference data is obtained by executing the same setup on a much larger domain,Ωref = [−6, 6]× [−6, 6], terminated by hard wall boundary conditions. This time -because higher order accuracy is normally sought for - the Lax-Wendroff method isrun on the linearized SWEs until t = 0.2805 seconds and the L2-norm of the water

32

Page 47: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.1. THE CHARACTERISTIC BOUNDARY CONDITION

depth deviation is measured between the test solution and the reference solution onthe domain Ω = [−1, 1]× [−1, 1]. Thus, the error is given by

e =√√√√∑

j

∑k

(hj,k − hrefj,k

)2, ∀Cj,k ∈ Ω

where hj,k is the water depth for the test solution and hrefj,k the water depth for thereference solution.

The time it takes for the waves to hit the characteristic boundaries is very short,around 0.02 seconds, while the time it takes to reach the boundaries in the referencecase is, approximately, 0.27 seconds1. Thus, the waves in the reference case havethe time to reach the outer boundaries, but not the time to bounce back. Theresults are shown in Figure 4.1. For completeness, the behaviour of the water depthdata at different time steps is also shown, see Figure 4.2. This is analogous to thesimulation in Figure 3.2, Section 3.4.1.

Figure 4.1. L2-norm of the water depth deviation for the characteristic bound-ary condition plotted vs time.

1This is because the approximate wave speed is√gH =

√9.81 ∗ 40 ≈ 20 m/s and the distance

from x = −1 to x = −6 is 5 meters which gives a time of 5/20 = 0.25 seconds for traveling overthat distance.

33

Page 48: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.2. Unbounded simulation for the linearized case using the LaxWsolver and the characteristic boundary conditions at a few chosen time steps.

From Figures 4.1 and 4.2 it is clear that quite a big part of the waves arepassing unhindered through the outer boundaries of the domain. However, in thenext section another approach will be used to show a way of improving this.

4.2 The Perfectly Matched Layer

The Perfectly Matched Layer (PML) is different than the characteristic boundarycondition. It extends the original domain Ω with a layer where waves should beabsorbed. Also, the layer should absorb all waves, at least in theory, and then beterminated by, for example, the characteristic boundary condition.

34

Page 49: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

4.2.1 BasicsThere are different versions of the PML. In this paper, the approach of Amro andZheng is used, see [2]. Their analysis is for the 2D Euler equations, but there isgreat similarity and below follows an analogous formulation for the 2D ShallowWater Equations.

Consider the linearized SWEs (2.12). This is a linear hyperbolic system whichmeans that the standard modal analysis can be applied. Thus, the Laplace trans-form may be taken in time and the Fourier transform in y. This gives

sQ+ CQx + ikDQ = 0, (4.7)

where Q = Q(s, k, x) is the Laplace-Fourier transform of q in t and y, where k is thevariable dual to y, and s the variable dual to t. This has the general, non-trivial,solution

Q(s, k, x) =3∑l=1

Ql(s, k)eλl(s,k)x

where (Ql, λl) are the generalized eigenvectors and eigenvalues of

(sI + λlC + ikD)Ql(s, k) = 0,

which often is called the dispersion relation. The inverse Laplace-Fourier transformthen yields

q(x, y, t) = 12πi lim

T→∞

∫ p+iT

p−iT

∑k∈Z

3∑l=1

Ql(s, k)est+λl(s,k)x+ikyds, (4.8)

which is valid for p := Res > 0, and given by the Fourier-Mellin integral.

The idea behind the PML, see [2], is to consider each component in (4.8),

qs,l,k(x, y, t) := Ql(s, k)est+λlx+iky, (4.9)

and to make the coordinate transformation

x −→ x′ = x+ fl(s, k)λl

∫ x

x0σ(z)dz, x ≥ x0, (4.10)

where x0 is the start of the integration area (yet unspecified), where σ(·) ≥ 0 is theabsorption function, and where fl(s, k) is some complex valued function. Thenmakesure that sgn(<fl) ≡ sgn(<λl) where sgn is the sign-function. This means thatthe waves, seen from the continuous perspective, will be damped exponentially fastin their traveling direction. The choice of σ(·), however, is important since it decideshow the waves will be absorbed in the discrete case. To fulfill the requirement onfl, Amro and Zheng [2] uses the following choice

fl =(

λls+ ikV

− µ)

s+ ikV

s+ ikV + α, (4.11)

35

Page 50: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

whereµ = U

C2sonic − U2 , α = 2πCsonic

Lx, (4.12)

for which Csonic is the sonic speed2, and where Lx is the length of the spatialdomain in the x-direction. The choice of µ is necessary and sufficient to guaranteeasymptotic stability, while α is the phase shift parameter [2]. Although this is forthe 2D Euler equations, it will be shown that the formulation is valid also for the2D SWEs. See analysis in Section 4.2.4.

4.2.2 The PML-Equations

The PML equations are given by inserting (4.10) into (4.9), assuming x ≥ x0, sothat each component becomes

qs,l,k(x, y, t) = Ql(s, k)est+λlx+ikyefl

∫ x

x0σ(z)dz

, (4.13)

and therefore (omitting the arguments of qs,l,k for brevity)

∂qs,l,k∂x

= (λl + flσ) qs,l,k =(λl +

(λl

s+ ikV− µ

)s+ ikV

s+ ikV + ασ

)qs,l,k,

which emphasizes the exponential damping property of the PML, and gives

λlqs,l,k = s+ ikV + α

s+ ikV + α+ σ

(∂qs,l,k∂x

+ σµs+ ikV

s+ ikV + αqs,l,k

). (4.14)

Next, inserting (4.14) into the dispersion relation gives

sqs,l,k + s+ ikV + α

s+ ikV + α+ σC

(∂qs,l,k∂x

+ σµs+ ikV

s+ ikV + αqs,l,k

)+ ikDqs,l,k = 0 (4.15)

where, just as in [2], the auxiliary vector

φs,l,k = − 1s+ ikV + α+ σ

C

(∂qs,l,k∂x

+ (α+ σ)µqs,l,k)

is introduced. The expression in (4.15) is then transformed back to physical space,i.e performing the inverse Laplace transform and summing over all λl and k for bothqs,l,k and φs,l,k, and noting that ikqs,λ,k = qy as well as sqs,l,k = qt. This leads tothe equations

qt + Cqx +Dqy + σµCq + σφ = 0,

φt + Cqx + V φy + (α+ σ)µCq + (α+ σ)φ = 0.2The sonic speed is different for the Euler equations and the Shallow Water Equations. In the

case of the Shallow Water Equations it is Csonic = CSW Es =√gH.

36

Page 51: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

which concludes the modal analysis, and the associated analytical continuation, inthe x-direction. When the same analysis is applied in the y-direction, this gives thefollowing equations:

qt + Cqx +Dqy + (σxµxC + σyµyD) q + σxφ1 + σyφ2 = 0, (4.16)

φ1,t + Cqx + V φ1,y + (αx + σx)µxCq + (αx + σx)φ1 = 0, (4.17)φ2,t +Dqy + Uφ2,x + (αy + σy)µyDq + (αy + σy)φ2 = 0. (4.18)

However, as shown in [2], the formulation (4.16) - (4.18) suffers from unstable,growing modes at high wave numbers, kx and ky - at least in the non-linear case- when both σx > 0 and σy > 0. To suppress these instabilities, extra damping isadded of the form

(αx + αy)σxσy

σmaxx + σmaxy

q, (4.19)

where σmaxx and σmaxy are the maximum values of σx and σy, respectively. ThePML equations for the linearized Shallow Water Equations in 2D are then given byinserting (4.19) into (4.16):

qt +Cqx +Dqy + (σxµxC + σyµyD) q+ σxφ1 + σyφ2 + (αx +αy)σxσy

σmaxx + σmaxy

q = 0,

(4.20)φ1,t + Cqx + V φ1,y + (αx + σx)µxCq + (αx + σx)φ1 = 0, (4.21)φ2,t +Dqy + Uφ2,x + (αy + σy)µyDq + (αy + σy)φ2 = 0. (4.22)

Finally, these equations may be transformed to non-linear form by substituting qwith q − qmean, Cq with F (q) and Dq with G(q) and so forth:

qt+F (q)x+G(q)y+σxµx (F (q)− F (qmean))+σyµy (G(q)−G(qmean))+σxφ1+σyφ2+

(αx + αy)σxσy

σmaxx + σmaxy

(q − qmean) = 0, (4.23)

φ1,t + F (q)x + V φ1,y + (αx + σx)µx (F (q)− F (qmean)) + (αx + σx)φ1 = 0, (4.24)φ2,t +G(q)y + Uφ2,x + (αy + σy)µy (G(q)−G(qmean)) + (αy + σy)φ2 = 0. (4.25)

4.2.3 PML Implementation

Semi-Discrete Form

Consider the PML-equations for the linearized SWEs (4.20) - (4.22), or - for thatmatter - their non-linear form (4.23) - (4.25). How should these equations be solved?To answer this question, set

E =

qφ1φ2

,37

Page 52: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

evaluate at Cj,k, and let

H(Ej,k) =

−Cqx,j,k −Dqy,j,k−Cqx,j,k − V φ1,y,j,k−Dqy,j,k − Uφ2,x,j,k

,

S(Ej,k) =

− (σx,j,kµxC + σy,j,kµyD) qj,k − σx,j,kφ1,j,k − σy,j,kφ2,j,k − (αx + αy) σx,j,kσy,j,k

σmaxx +σmax

yqj,k

−(αx + σx,j,k)µxCqj,k − (αx + σx,j,k)φ1,j,k−(αy + σy,j,k)µyDqj,k − (αy + σy,j,k)φ2,j,k

,where the derivatives qx,j,k, qy,j,k, φ1,y,j,k and φ2,x,j,k have been evaluated using somenumerical approximation, and which means that (4.20) - (4.22) may be written as

∂Ej,k∂t

= H(Ej,k) + S(Ej,k). (4.26)

This is the same form as (3.25), where the values of S depends on σx,j,k and σy,j,k,whose values are zero inside Ω, and non-zero outside Ω, which is visualized schemat-ically in Figure 4.3.

Figure 4.3. The domain Ω extended with PML-layers in all directions.

The values of σx,j,k and σy,j,k have the pattern shown in Table 4.1, where σx,j,kand σy,j,k have the potential to become big outside Ω. Actually, in simulations thevalues of σx,j,k and σy,j,k will at least be in the order of 102, and (4.26) may thereforebe considered stiff, meaning that the IERK method is appropriate.

DIRK Implementation

The IERK implementation, in this case DIRK2 as described in Section 3.3.4, maybe used to solve (4.26). The arguments for this where made earlier. In short,the implementation is L-stable and TVD. However, notice that (3.33) and (3.34)

38

Page 53: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Ω σx,j,k = 0, σy,j,k = 0A, C, G and I σx,j,k > 0, σy,j,k > 0B and H σx,j,k = 0, σy,j,k > 0D and F σx,j,k > 0, σy,j,k = 0

Table 4.1. Pattern of absorption functions.

require implicit steps to be taken, and that nine unknown scalars (e.g. the vectorsq∗j,k, φ∗1,j,k and φ∗2,j,k in (3.33)) needs to be resolved at every iteration step.

This may partly be resolved as follows: The step (3.33) may be written as

q∗j,k − qnj,kχ∆t + (σx,j,kµxC + σy,j,kµyD) q∗j,k + σx,j,kφ

∗1,j,k + σy,j,kφ

∗2,j,k+

(αx + αy)σx,j,kσy,j,kσmaxx + σmaxy

q∗j,k = 0 (4.27)

φ∗1,j,k − φn1,j,kχ∆t + (αx + σx,j,k)µxCq∗j,k + (αx + σx,j,k)φ∗1,j,k = 0 (4.28)

φ∗2,j,k − φn2,j,kχ∆t + (αy + σy,j,k)µyDq∗j,k + (αy + σy,j,k)φ∗2,j,k = 0 (4.29)

where (4.28) can be used to write φ∗1,j,k as a function of the other parameters/variables,

φ∗1,j,k = 11 + χ∆t(αx + σx,j,k)

(φn1,j,k − χ∆t(αx + σx,j,k)µxCq∗j,k

),

and analogously for φ∗2,j,k in (4.29),

φ∗2,j,k = 11 + χ∆t(αy + σy,j,k)

(φn2,j,k − χ∆t(αy + σy,j,k)µyCq∗j,k

),

which means that the only unknowns become q∗j,k. The resulting system may then bewritten on the form K(q∗j,k) = 0, and solved using Newton iterations, see AppendixA.3.

The same procedure may be performed for (3.34), and provides an approach tosolve the system (3.33) - (3.35) applied to (4.26) where Qj,k ≡ Ej,k.

4.2.4 Analysis of the PML

Computation of Complex Eigenvalues

39

Page 54: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

As mentioned in Section 4.2.1, the above formulation requires that sgn(<fl) =sgn(<λl). To find λl, insert (2.12) into (4.8), which leads to the dispersion rela-tion, and solve this by taking the determinant and setting it equal to zero,

det (sI + λC + ikD) = 0, (4.30)

where the subscript is dropped on λ for brevity. This is equivalent to

det

s λ ikλ(−U2 + gH

)− ikUV s+ λ2U + ikV ikU

λ (−UV ) + ik(−V 2 + gH

)λV s+ λU + ik2V

= 0,

leading to a third degree polynomial,

aλ3 + bλ2 + cλ+ d = 0, (4.31)

wherea = U

(U2 − gH

),

b = (s+ ikV )(3U2 − gH

),

c = U(3 (s+ ikV )2 + gHk2

),

d = (s+ ikV )((s+ ikV )2 + gHk2

),

which is solved by dividing by a (for now assume a 6= 0),

λ3 + b

aλ2 + c

aλ+ d

a= 0, (4.32)

and by guessing one of the roots. The chosen guess is

λ = −s+ ikV

U(4.33)

and is constructed from the fact that (s+ ikV ) persists in both b, c and d, whileU is a factor in a, and that λ3 has to negate (c/a)λ. To check this, and to simplifythe calculations, let R = s+ ikV and Z = U2 − gH. Insertion of (4.33) into (4.32)then gives(−RU

)3+ R

(2U2 + Z

)UZ

(−RU

)2+ U

(3R2 + gHk2)

UZ

(−RU

)+ R

(R2 + gHk2)UZ

= 0,

and thus

1− 2U2 + Z

Z+ 3U2

Z+ U2

Z

(gHk2

R2

)− U2

Z− U2

Z

(gHk2

R2

)= 0

which is equivalent to1− Z

Z= 0.

40

Page 55: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

This obviously holds, and shows that (4.33) is a root of (4.32). To be able tocompute the other roots of (4.32), some additional factorization is needed, whichgives (

λ+ R

U

)(λ2 + 2UR

Zλ+ R2 + gHk2

Z

)= 0.

Thus, the other roots of (4.32) are given by

λ2 + 2URZ

λ+ R2 + gHk2

Z= 0, (4.34)

which is solved in the standard way (completing the square). The roots of (4.34)are thus (reverting to the original variables)

λ =(s+ ikV )U ±

√gH

((s+ ikV )2 + k2 (gH − U2)

)gH − U2 ,

which together with (4.33) gives the complete set of roots of (4.32), and thereforeof (4.31) in the case of a 6= 0. However, what if U = 0 (and therefore a = 0)?Then (4.31) becomes a second degree polynomial which should be interpreted asonly two characteristic waves that are actually spreading (and one not spreading atall). Anyhow, to sum up, the complex eigenvalues of (4.31) are:

λ1 = −s+ ikV

U(4.35)

λ2 =(s+ ikV )U +

√gH

((s+ ikV )2 + k2 (gH − U2)

)gH − U2 , (4.36)

λ3 =(s+ ikV )U −

√gH

((s+ ikV )2 + k2 (gH − U2)

)gH − U2 , (4.37)

where it is worthwhile to mention that gH > U2, since only small perturbationsfrom the mean state are considered (see Section 2.3).

Ensuring sgn(<f) = sgn(<λ)

For the values of f , µ and α (given in (4.11) and (4.12)) to be valid, it has to holdthat sgn(<f) = sgn(<λ), as stated earlier. Intuitively, this means that theabsorption has to be performed in the correct direction, i.e. in the direction of theeigenvalues. To what extent does this hold for (4.35) - (4.37)? To check this, thesign of the real part of f is evaluated for each λ.

41

Page 56: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Let fl = f(λl; ...), where l = 1, 2, 3, and s = p + ir, where p, r ∈ R, and p > 0.Also, define m := r + kV . This gives

f1 =(

λ1p+ im

− U

C2sonic − U2

)p+ im

(p+ α) + im,

where Csonic =√gH, and using (4.35) evaluates to

f1 =(− (p+ im)U (p+ im) −

U

gH − U2

) (p+ im) ((p+ α)− im)(p+ α)2 +m2 ,

and thereforef1 =

(gH

UZ

) (p+ im)α+(p2 +m2)

(p+ α)2 +m2 ,

which have the real part

<f1 =(gH

UZ

)pα+

(p2 +m2)

(p+ α)2 +m2 ,

and since gH > 0, Z = U2 − gH < 0 (from the linearization), p > 0, and α > 0,this gives

sgn(<f1) = −sgn(U).Also, from (4.35) it follows directly that sgn(<λ1) = −sgn(U), and therefore thatsgn(<f1) = sgn(<λ1), which shows the required relationship for λ1.

Next, consider λ2,

λ2 =(p+ im)U +

√gH√

(p+ im)2 + b1

gH − U2 ,

where b1 := k2 (gH − U2) > 0, and let

z = (p+ im)2 + b1 =(p2 + b1 −m2

)+ i (2pm)

where using√z =

√|z|+ <z

2 + i sgn (=z)

√|z| − <z

2 (4.38)

gives

<√z =

√√√√√(p2 + b1 −m2)2 + (2pm)2 + (p2 + b1 −m2)2 .

Then it can be shown that <√z ≥ p: Consider

<√z =

√√√√√(p2 + b1 −m2)2 + 4p2m2 + p2 + b1 −m2

2 ≥ p

42

Page 57: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

where b1 > 0. This leads to√(p2 + b1 −m2)2 + 4p2m2 + p2 + b1 −m2

2 ≥ p2, (4.39)

where the expression within the root fulfills(p2 + b1 −m2

)2+ 4p2m2 = p4 +

(m2 − b1

)2+ 2p2

(m2 + b1

)≥ p4 +

(m2 − b1

)2+ 2p2

(m2 − b1

)=(p2 +

(m2 − b1

))2

and (4.39) therefore becomes

|p2 +(m2 − b1

)|+ p2 + b1 −m2

2 = |b1 −m2 − p2|+ b1 −m2 − p2

2 + p2 ≥ p2.

Thus, it’s possible to write <√z = p+K whereK ≥ 0 which leads to (reverting

to suitable variables)

<λ2 = pU +√gH(p+K)

gH − U2 =(U +√gH)p+K

√gH

gH − U2

where gH > U2 givessgn(<λ2) = 1,

i.e. always positive. Next, investigate f2:

f2 =(

λ2p+ im

− U

gH − U2

)p+ im

(p+ α) + im,

where insertion of λ2, and some simplification, leads to

f2 =√gH√

(p+ im)2 + b1

((p+ α) + im) (−Z)and therefore

f2 =((p+ α)− im)

√gH√

(p+ im)2 + b1

((p+ α)2 +m2) (−Z)where (−Z) > 0 means that the denominator is real and positive. Thus, the sign ofthe real part of f2 is the same as the sign of the real part of the numerator, fnum2 ,which may be written

fnum2 = (p− im)√gH√

(p+ im)2 + b1 + α√gH√

(p+ im)2 + b1

where, as before, z = (p+ im)2 + b1 and <√z ≥ p > 0 means that the real part

of the expression within the second root is positive. Finally, it can be shown that<(p− im)

√gH√z ≥ 0:

<(p− im)√gH√z = p

√gH<

√z+m

√gH=

√z,

43

Page 58: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

where the first term is obviously positive while the second term equates

m√gH=

√z = m

√gH

sgn(=z)

√|z| − <z

2

= |m|√gH

√|z| − <z

2

where |z| ≥ <z means that the above term also is greater than or equal to zero.

Thus,

<fnum2 > 0⇒ sgn(<f2) = 1⇒ sgn(<f2) = sgn(<λ2) = 1,

which was to be shown. Also, the same reasoning holds for λ3 and f3, except thatthe signs are opposite:

sgn(<f3) = sgn(<λ3) = −1.

This means that sgn(<fl) = sgn(<λl) ∀l where l = 1, 2, 3, which was to beshown.

4.2.5 Absorption Choices

The absorption functions, σx and σy (now given as continuous functions), shouldfollow the pattern shown in Table 4.1, i.e. waves in the "x-direction"-layer needsto have their x-components absorbed, and analogously in the y-direction. Thequestion is, how should these functions look like? There is no definitive answer tothis question, at least not for the SWEs, and two different approaches are consideredhere.

Berenger Absorption Function

One quite common approach is the one used by Berenger in [6], i.e. in the originalsplit-PML-formulation applied to electromagnetic waves. The formulation has alsobeen implemented for the SWEs [2][23][24], and uses the absorption function

σx(δ) = σmaxx

D

)β, (4.40)

where δ is the distance from the start of the layer to the given x-coordinate (insidethe x-direction layer), D is the size of the layer, and σmaxx and β are parameters cho-sen from experience and/or testing. This is applied analogously in the y-direction.

A common choice for the parameter β is, according to [23][24], β = 3, whichgives the form (i.e. assuming σmaxx = 1) shown in Figure 4.4 in the case of D = 0.3.

44

Page 59: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.4. Form of absorption function.

Thus, β determines the form of the absorption function and σmaxx is used forscaling.

Numerical experiments are carried out with the same setup as in Section 4.1.1,except that the reference domain is changed to [−10, 10]× [−10, 10], the simulationis run until t ≈ 0.8 seconds, and this time the modal PML, i.e. the PML-equations(4.20) - (4.22), is applied to the boundaries of Ω. Notice that this means that thewaves inside the reference domain has the time to reach to outer boundaries, bounceback, and then travel to a distance of about 2 meters away from, but not reach, thedomain of study. The DIRK2-implementation is used to solve the PML-equationswith the help of Newton iterations (as given in Appendix A.3) and the Berengerabsorption function (4.40) is utilized for absorption, with β = 3. This is done -experimenting with different values of σmax := σmaxx ≡ σmaxy - for 6 cells in eachlayer leading to D = 6∆x = 6∆y = 0.3. The layer is the same size in each direction,and the results are shown in Figure 4.5.

The center of the initial gaussian lies at (0, 0), and the wave speed is ap-proximately

√gH =

√9.81 ∗ 40 ≈ 20 m/s. This means that, for this part of

the wave, it takes about 1/20 = 0.05 seconds to travel from (0, 0) to (1, 0) and√12 + 12/20 ≈ 0.0707 seconds to travel from (0, 0) to (1, 1). Thus, the center of the

initial gaussian starts exiting the domain and entering the layer during the timeperiod of 0.05 - 0.0707 seconds. Also, for this part of the wave to go front and backinside the layer, it takes approximately 0.03 - 0.0424 seconds. Roughly speaking,the residuals of the center of the initial gaussian will therefore leave its’ reflectionsbefore 0.11 seconds. Most of the energy of the entire initial gaussian, however,

45

Page 60: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.5. L2-norm for the water depth deviation for the linear PML withBerenger absorption function using β = 3 and different values of σmax. Thenumber of cells in the layer is 6, and D = 0.3.

will have been reflected before this, let’s say at t ≈ 0.1 seconds. This means thatthe behaviour up until 0.1 seconds gives the initial behaviour of the reflection, andduring this time period it is obvious that the version using σmax = 200 is worse offthan the other versions where the σmax = 1500 version seems slightly better thanthe σmax = 4000 version.

The time from 0.1 until 0.2 seconds represents the time where most of the

46

Page 61: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

initial reflections travel the entire distance of the domain. During this time period,the σmax = 200 version is still worse than the other versions while the σmax =4000 version now seems slightly better than the σmax = 1500 version. Next, whenthese (relatively small) reflections starts reflecting again, at around 0.2 seconds, thebehaviour changes again. All-in-all, however, the curve using σmax = 4000 seemsto avoid reflections above ≈ 10−1, and is judged to be better than the other twoversions.

Finally, when the reflections - and the reflections of the reflections, and so forth- have traveled long enough, i.e. after t = 0.6 seconds, then all of the errors arequite similar. The errors that remain are the ones induced by the numerical methodas applied to the reflections. The reason is that the numerical approximation errorin some sense is absolute while the reflections are relative errors of relative errorswhich become small very fast. Thus, these long run errors will decrease by the sameorder as the numerical method, for numerical confirmation, see Appendix B.1. Thismeans that, as long as the spatial cell sizes are the same, it is only interesting tostudy what happens during the first few "reflection periods", in this case maybeuntil t ≈ 0.3 or t ≈ 0.4 seconds, and not any later. Runs following this one willtherefore be terminated at t ≈ 0.4.

To sum up, the version which uses σmax = 4000 seems better than the otherversions since its’ error is kept below ≈ 10−1 during the entire simulation.

Hyperbola Absorption Function

Another approach is to formulate the absorption function σx so that it has theproperty [22]: ∫ D

0σx(δ)dδ =∞, (4.41)

i.e. that the continuous version of σx is unbounded (and analogously for σy). In[22], two such functions are given (as applied to the SWEs):

Hyperbola Absorption Function

σx(δ) =√gH

D − δ(4.42)

Shifted Hyperbola Absorption Function

σx(δ) =√gH

D

D − δ

)(4.43)

where (4.42) is in accordance with Bermidez, and (4.43) is formulated in [22]3. Theidea behind these functions is to fulfill the criteria (4.41), and therefore, in theory,

3In passing, note that, in the discrete form of (4.42) and (4.43), D will never equate δ: Thelast cell inside the layer will have its’ cell center the distance ∆x/2 away from the position δ = D.

47

Page 62: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

apply infinite absorption. In addition, (4.43) vanishes at the interface between Ωand the layer, i.e. the point where δ = 0. This feature is good: There should be noabsorption at the interface since it might easily affect the interior of the domain.

The same simulation is run as in the Berenger function case, where the run nowis terminated at t ≈ 0.4. This time the functions (4.42) and (4.43) are used forabsorption, where H = 40 and σmax = σmaxx = σmaxy = max(σx). The results areshown in Figure 4.6, which also makes a comparison with the Berenger case whereβ = 3 and σmax = 4000.

Figure 4.6 shows that the error of the shifted hyperbola implementation is similarto the Berenger function case (with β = 3 and σmax = 4000) up until t ≈ 0.16seconds, where after the Berenger function becomes better. Also, the errors for thehyperbola function are clearly bigger. Thus, the same conclusion can be drawn asin the previous section: The Berenger function with β = 3 and σmax = 4000 isbetter than the other versions. The advantage of the hyperbola versions - that theyhave no parameters that needs to be optimized - is clearly not sufficient to competewith the given implementation of the Berenger absorption function.

4.2.6 Comparison with Characteristic Boundary ConditionIn this section, the PML using the Berenger absorption function with β = 3 andσmax = 4000, as well as the PML using the shifted hyperbola function, is comparedwith the characteristic boundary condition given in Section 4.1. This is done usingthe same settings as in the previous section (Section 4.2.5), where the size of thePML - here seen as the number of cells - is varied. The characteristic boundarycondition is run as an empty layer formulation, i.e. using the PML-equations witha layer without absorption which is terminated by the characteristic boundary con-dition. In this way, a comparison between, for example, a 6 cells PML and a 6cells empty PML - both terminated by the characteristic boundary condition - isrelatively fair.

The number of cells for the PML-implementations are 2, 4, 8 and 16, each witha corresponding empty layer characteristic boundary condition. The results of thesimulations are given in Figure 4.7, which shows the Berenger absorption case, andFigure 4.8, which shows the shifted hyperbola case.

It can be noted that the characteristic boundary conditions are shifted versionsof one another. Also, the maximum L2-error over time is smaller in each PMLcase than it is in the corresponding characteristic boundary condition case. Thebest implementation is, as expected from before, the PML case using the Berengerfunction with β = 3 and σmax = 4000. From an intuitive point of view, it seemslike an increase in the number of cells would further improve the PML, which isnatural, although it would also increase the computational costs of the simulation.Finally, it is possible that changing the σmax-value could improve the PML further,

48

Page 63: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.6. L2-norm for the water depth deviation for the linear PML withhyperbola absorption functions as well as with the Berenger absorption functionwhere β = 3 and σmax = 4000. The number of cells in the layer is 6, andD = 0.3.

maybe even to find some optimum, but the value of trying to do so would only bebig if the implementation could be generalized, and not case by case driven as it isnow. This is something that the shifted hyperbola approach tries to remedy, butdoes not quite manage to do so.

49

Page 64: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.7. L2-norm for the water depth deviation for the linear PML withdifferent number of cells using Berenger absorption function where β = 3 andσmax = 4000. Each PML has a corresponding empty layer which is terminatedby the characteristic boundary condition.

4.2.7 The Non-Linear CaseThe same simulation as in the previous section is performed using Lax-Wendroff’smethod (as defined in Section 3.3.3) applied to the non-linear equations, where itcan be noted that the size of the initial perturbation state is 1/40 = 2.5% of themean depth. The results are shown in Figure 4.9 and Figure 4.10.

The results are more or less identical with the linear case and therefore equallyvalid in the non-linear case. This is good since the PML-analysis is confined to thelinear case but still shown to work in the non-linear case.

However, the simulations in Figures 4.9 and 4.10 uses a perturbation of height

50

Page 65: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.8. L2-norm for the water depth deviation for the linear PML withdifferent number of cells using shifted hyperbola absorption function. EachPML has a corresponding empty layer which is terminated by the characteristicboundary condition.

1 corresponding to a 2.5% deviation from the mean state. The question is whathappens if this perturbation is much larger? To test this, the initial data (3.38) isreplaced with

q(x, y, 0) =

40 + 5e−(x2+y2)/0.05

00

,i.e. the deviation from mean state is now of size 5 or 12.5%. The Courant number is

51

Page 66: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.9. L2-norm for the water depth deviation for the non-linear PML withdifferent number of cells using Berenger absorption function where β = 3 andσmax = 4000. Each PML has a corresponding empty layer which is terminatedby the characteristic boundary condition.

kept at 0.9 which leads to a time step that changes slightly but can still be roundedto 0.0011. The Berenger version above is used and everything else is kept as before.This leads to the results shown in 4.11.

Notice that the scale of the error axis in Figure 4.11 goes to 101. Thus, thesize of the error has increased although the shape of the error over time seemslargely the same. This is because reflections are relative errors and relatively bigwaves therefore leads to relatively big errors. Anyhow, the PML is still better thanthe characteristic boundary condition, which is reasonable since the error for bothconditions will scale with the size of the deviations going through the boundaries.The reason is that both conditions are derived using a linearization analysis.

52

Page 67: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.10. L2-norm for the water depth deviation for the non-linear PMLwith different number of cells using shifted hyperbola absorption function. EachPML has a corresponding empty layer which is terminated by the characteristicboundary condition.

4.2.8 Reflections for Discontinuous ProblemsThe same settings are used as in Section 4.2.6 except that the initial data is givenby

q(x, y, 0) =

Φ(x, y)00

, qmean =

4000

,in the linear case, and

q(x, y, 0) =

40 + Φ(x, y)00

,53

Page 68: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.11. L2-norm for the water depth deviation for the non-linear PMLwith different number of cells using Berenger absorption function where β = 3and σmax = 4000, and a perturbation size of 5. Each PML has a correspondingempty layer which is terminated by the characteristic boundary condition.

in the non-linear case, where

Φ(x, y) =

1, if (x, y) ∈ [−0.25, 0.25]× [−0.25, 0.25]0, otherwise.

Thus, the discontinuity lies in the middle of the domain, and will break sym-metrically, leading to waves in all directions.

The Linear Case

54

Page 69: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

In the linear case, the Lax-Friedrichs method is used. This is because the Lax-Wendroff method causes spurious oscillations when interacting with a discontinuity.The solution is plotted at a few chosen time steps in Figure 4.12, while the L2-errorof the water depth data is shown in Figure 4.13 (observe that the range of the axisnow is 10−4 to 101). Figure 4.12 shows that the initial discontinuity has spreadisotropically in all directions, clearly looking like shocks if comparison is made withthe runs using smooth data.

The behaviour in Figure 4.13 as compared with Figure 4.7 is that the error hasbecome bigger. For example, the characteristic boundary condition using 2 cellsnow has an L2-error exceeding 100. The error at t ≈ 0.1 seconds furthermore isclearly bigger in Figure 4.13 than in Figure 4.7. This is because more of the waveenergy reaches the boundary at the same time in the discontinuous case than in thesmooth case. The peak at about 10−1 is, analogously, reached later in the smoothcase than in the discontinuous case.

All-in-all the boundary conditions work in a similar way for the discontinuouscase, showing just a slight worsening in their behaviour.

The Non-Linear Case

In the non-linear case, all conditions are kept as above - to begin with using aperturbation of size 1 - except that Roe’s method now is used with the van Leerlimiter. The results are shown in the same way as before in Figures 4.14 and 4.15.

The biggest change in the behaviour of the simulation seems to be that thediscontinuity has been kept in better shape (looking more like a shock) in Figure4.14 as compared with Figure 4.12. Also, Figure 4.15 and Figure 4.13 are verysimilar and it is clear that the change from the linear to the non-linear case has notreally affected the error reflections.

The fact that the reflections are very similar in the linear and non-linear caseyet again shows that a perturbation of size 1 really is quite small. Then, just asin Figure 4.11, a bigger perturbation is considered. Thus, the initial perturbationΦ(x, y) is changed to

Φ(x, y) =

5, if (x, y) ∈ [−0.25, 0.25]× [−0.25, 0.25]0, otherwise,

ceteris parabus. The result of the simulation is then shown in Figure 4.16.

In comparison with Figure 4.15, the behaviour in Figure 4.16 is similar up untilt ≈ 0.1, i.e. when most of the initial wave has passed out into the layer, exceptthat the errors has increased in scale. From t ≈ 0.1 until t ≈ 0.2, however, it is

55

Page 70: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

clear that at least the PMLs with 8 and 16 cells have seen a deformation of theirerror curves which has been pushed upwards, losing some of the previous forms.Also, the long run error level has been pushed upwards, analogously to before. Thismeans that the PML behaviour has worsened, which is to be expected since thePML was constructed for the linearized equations, and is now being implementedfor the non-linear equations for a perturbation which is no longer so small.

Figure 4.12. A few chosen time steps when solving the linear PMLs withLax-Friedrichs method for a discontinuity. In this case with 16 cells in thelayer.

56

Page 71: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.13. L2-norm for the water depth deviation of an initial discontinuityusing the linear PML with different number of cells where the Berenger absorp-tion function is used, β = 3 and σmax = 4000. Each PML has a correspondingempty layer which is terminated by the characteristic boundary condition.

57

Page 72: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.14. A few chosen time steps when solving the non-linear PMLs withRoe’s method and the van Leer limiter for a discontinuity. In this case with 16cells in the layer.

58

Page 73: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

4.2. THE PERFECTLY MATCHED LAYER

Figure 4.15. L2-norm for the water depth deviation of an initial discontinuityusing the non-linear PML with different number of cells where the Berengerabsorption function is used, β = 3 and σmax = 4000. Each PML has a cor-responding empty layer which is terminated by the characteristic boundarycondition.

59

Page 74: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 4. THE UNBOUNDED DOMAIN

Figure 4.16. L2-norm for the water depth deviation of an initial discontinuityof size 5 using the non-linear PML with different number of cells where theBerenger absorption function is used, β = 3 and σmax = 4000. Each PML hasa corresponding empty layer which is terminated by the characteristic boundarycondition.

60

Page 75: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Chapter 5

Conclusions

To construct absorbing boundary conditions for wave propagation problems is adifficult task. A relatively simple approach is that of the characteristic boundarycondition, which sets incoming characteristic waves to zero. However, the reflectionsbecome quite big, and has led to the construction of high order conditions such asthose by Majda and Engquist, as well as the Higdon conditions. The main problemwith these approaches is that they may lead to instabilities. This is partly remediedby the PML, which was constructed by Berenger in 1994 and applied to electro-magnetic waves: The idea is to truncate the domain with a layer which absorbsoutgoing waves with a perfect matching property, i.e. an exponential decrease inthe deviations as they travel out into the layer.

In this paper, the PML is considered for the 2D SWEs. This has been donebefore, see for example Navon et al in [23][24], but the approach considered here isthe same as Amro and Zheng used for the 2D Euler equations in [2], modified for the2D SWEs. The formulation is a modal PML where the Laplace-Fourier transformis used to create a set of PML-equations which is an analytic continuation of theoriginal 2D SWEs. As opposed to Navon et al, the conservative variables are usedtogether with a semi-implicit approach, i.e. the DIRK implementation, a methodwhich is L-stable and TVD. This avoids the harsh time step requirement restrictionsof an explicit method, while keeping a second order accuracy through the Lax-Wendroff method for the hyperbolic terms for smooth solutions, and through Roe’smethod with limiters for discontinuous solutions.

Two different absorption functions are considered: The one used by Berengerin 1994 for electro-magnetic waves, and two different hyperbola variations, byBermidez and Modave et al, respectively. The Berenger implementation requiressome sort of parameter optimization to work properly while the two hyperbola im-plementations absorbs waves in relation to the wave speed and the size of the layer,without the need of parameter optimization. Each approach is shown to be betterthan the characteristic boundary condition for the chosen test problems using boththe linear and non-linear SWEs, where the Berenger implementation gives the best

61

Page 76: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

CHAPTER 5. CONCLUSIONS

results. This is the case even though the parameters haven’t been optimized inany special way, just experimented with until yielding adequate results. It can benoted that, to get better results, one possibility would be to treat the choice ofabsorption values (at specific discrete points) as an optimization problem, tryingto pick out the best values. This was - to some extent - done in [8] and [10], butfor other wave equations than the SWEs, and points to some success. Also, [8]used complex absorption values, even though instabilities occurred, destroying thesolution. Anyhow, trying to approach the selection of σ-values as an optimizationproblem would be interesting: It might minimize the reflections, hopefully keepingthe solution stable.

The PML was furthermore tested with discontinuous initial data. This leadto a different behaviour of the L2-error, where the peak of the curve was reachedearlier during the simulation, i.e. when the first part of the original discontinuityreached the PML, as compared to the smooth case. Other than that, the differenceswhere small and probably more related to the amount of energy in the wave thanthe discontinuity itself. The behaviour was very similar in the linear and non-linear cases, which is partly due to the fact that the deviation from mean state wasnot that big. The size of the discontinuous perturbation was then greatly increased,which meant that the initial behaviour was largely unchanged while later reflections(between t ≈ 0.1 and t ≈ 0.2) grew substantially showing the weakness that thePML was built on a linear analysis, and the effect of large energy deviations passingsimultaneously out into the layer.

To conclude, the objectives of the thesis have been met: A PML has beenconstructed for the non-linear SWEs in two dimensions using conservative variables,which is analogous to Amro and Zheng, and the implementation works better thanthe characteristic boundary condition.

62

Page 77: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Bibliography

[1] S. Abarbanel, D. Gottlieb, J. S. Hesthaven, Well-posed Perfectly MatchedLayers for Advective Acoustics, Journal of Computational Physics 154, pages266-283, 1999

[2] T. Amro, C. Zheng, A PML Absorbing Boundary Condition for the NonlinearEuler Equations in Unbounded Domains, ASC Report No. 03/2007

[3] D. Appelö, G. Kreiss, A New Absorbing Layer for Elastic Waves, Preprintsubmitted to Elsevier Science, 2005

[4] D. Appelö, T. Colonius, A High-Order Super-Grid-Scale Absorbing Layer andIts Application to Linear Hyperbolic Systems, 2009

[5] E. Becache, P. Joly, On the Analysis of Berenger’s Perfectly Matched Layersfor Maxwell’s Equations. [Research Report] RR-4164, 2001

[6] J.P. Berenger, A Perfectly Matched Layer for the Absorption of Electromag-netic Waves, Journal of Computational Physics 114, 185-200, 1994

[7] J. Billingham, A.C. King, Wave Motion, Cambridge University Press, 2001,Reprinted with corrections 2006

[8] A. Chern, Discrete analysis and optimization of a PML boundary condition,Technical Report "TRITA-NA, 0348-2952", Royal Institute of Technology,2010

[9] W.C. Chew, W.H. Weedon, A 3D Perfectly Matched Medium from Modi-fied Maxwell’s Equations with Stretched Coordinates - Chew and Weedon, Mi-crowave Opt. Technol. Lett., 7: 599-604, 1994

[10] F. Collino and P. B. Monk, Optimizing the perfectly matched layer, Comput.Methods Appl. Mech. Engrg. 164, pages 157 - 171, 1998

[11] B. Düz, R. H. M. Huijsmans, A. E. P. Veldman, M. J. A. Borsboom, P. R.Wellens, An Absorbing Boundary Condition for Regular and Irregular WaveSimulations, MARINE 2011, IV International Conference on ComputationalMethods in Marine Engineering, Computational Methods in Applied Sciences29, 2013

63

Page 78: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

BIBLIOGRAPHY

[12] B. Engquist, A. Majda, Absorbing Boundary Conditions for the NumericalSimulation of Waves, Mathematics of Computation, Volume 31, Number 139,pages 629-651, July 1977

[13] D. Givoli and B. Neta, High-Order Non-Reflecting Boundary Conditions forthe Dispersive Shallow Water Equations, Journal of Computational and Ap-plied Mathematics 158, pages 49-60, 2003

[14] T. Hagstrom, A New Construction of Perfectly Matched Layers for HyperbolicSystems with Applications to the Linearized Euler equations, Mathematicaland Numerical Aspects of Wave Propagation WAVES 2003, Springer-Verlag,2003

[15] T. Hagstrom, D. Givoli, D. Rabinovich, J. Bielak, The Double AbsorbingBoundary Method, Journal of Computational Physics 259, 220-241, 2014

[16] B. Gustafsson, H. Kreiss, J. Oliger, Time Dependent Problems and DifferenceMethods, A Wiley Interscience Publication, John Wiley & Sons Inc., 1995

[17] E. Hairer and G. Wanner, Solving Ordinary Differential Equations II: Stiffand Differential-Algebraic Problems, Second Revised Edition, 2002

[18] L. C. Huang, An Upwind Difference Scheme And Its Corresponding BoundaryScheme, Journal of Computational Mathematics, Vol. 1, No. 1, 75-82, 1983

[19] J. W. Lavelle, W. C. Thacker, A Pretty Good Sponge: Dealing With OpenBoundaries in Limited-Area Ocean Models, Elsevier, 2007

[20] R. J. Leveque, Finite Volume Methods for Hyperbolic Problems, CambridgeUniversity Press, 2002

[21] R. J. Leveque, D. L. George, High-Resolution Finite Volume Methods forthe Shallow Water equations With Bathymetry and Dry States, Advances InCoastal and Ocean Engineering, Advanced Numerical Models for SimulatingTsunami Waves and Runup, Vol. 10, p. 43-73, 2008

[22] A. Modave, E. Deleersnijder, E. J. M. Delhez, On the parameters of absorbinglayers for shallow water models, Ocean Dynamics 60:65-79, 2009

[23] I.M. Navon, B. Neta, M.Y. Hussaini, A Perfectly Matched Layer formula-tion for the nonlinear shallow water equations models: The split equationsapproach, FSU-CSIT-01-41, Technical Report, 2001

[24] I.M. Navon, B. Neta, M.Y. Hussaini, A Perfectly Matched Layer Approach tothe Linearized Shallow Water Equations Models, Monthly Weather Review,Volume 132, Issue 6, pages 1369-1378, 2004

[25] L. Pareshi, G. Russo, Implicit-explicit Runge-Kutta schemes and applicationsto hyperbolic systems with relaxation, J. Sci. Comp., 25, pages 129-155, 2004

64

Page 79: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

BIBLIOGRAPHY

[26] P. L. Roe, Approximate Riemann Solvers, Parameter Vectors, and DifferenceSchemes, Journal of Computational Physics 43, 357-372, 1981

[27] D. Rabinovich, D. Givoli, T. Hagstrom, J. Bielak, High Order AbsorbinBoundary Conditions for Elastodynamics, COMPDYN 2011, ECCOMASSThematic Conference on Computational Methods in Structural Dynamics andEarthquake Engineering, 2011

[28] G. Strang, Computational Science and Engineering, Wellesley CambridgePress, 2007

[29] K. W. Thompson, Time Dependent Boundary Conditions for Hyperbolic Sys-tems, Journal of Computational Physics 68, 1-24, 1987

[30] T. Weiyan, Shallow Water Hydrodynamics: Mathematical Theory and Nu-merical Solution for a Two-dimensional System of Shallow Water Equations,Elsevier Oceanography Series, 55, Nanjing Research Institute of Hydrologyand Water Resources, 1992

[31] J. Zhou, J. Zhao, Efficient High-Order Absorbing Boundary Condition for theADI-FDTD Method, Microwave and Wireless Component Letters, IEEE, Vol.19, Issue 1, pages 6-8, 2009

65

Page 80: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 81: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Appendix A

Important Concepts

A.1 The Courant-Friedrichs-Lewy ConditionThe Courant-Friedrichs-Lewy (CFL) condition is a necessary (but not sufficient)condition for any finite volume or finite difference method in order for it to bestable. The CFL condition states that a numerical method can be convergent onlyif its’ numerical domain of dependence contains the true domain of dependence forthe differential equation. The true domain of dependence depends on the wavespeed, and therefore the CFL condition puts a limit on how big time steps thatmay be taken given the spatial step size(s). See [20].

To illustrate, consider the 1D advection equation,

ut + aux = 0,

which have been given suitable initial and boundary conditions. Let a > 0, thenthe exact solution simply translates a distance of a∆t over a single time step ∆x.The CFL condition then states that [20]

a∆t∆x ≤ 1

has to be fulfilled for stability: The information in the numerical implementationhas to propagate faster than or equal to the speed of information propagation inthe given continuous equation.

An extension to 2D for the same equation gives

ut + a(ux + uy) = 0,

and therefore the CFL condition

a

(∆t∆x + ∆t

∆y

)≤ 1,

67

Page 82: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

APPENDIX A. IMPORTANT CONCEPTS

which means that, if ∆x = ∆y, then

a

(∆t∆x

)≤ 1

2

is necessary (but not sufficient) for stability.

Besides this stability requirement, the numerical solution also has to converge tothe true solution as the spatial step size and the time step size is refined, otherwisethe method won’t be convergent. See [20].

A.2 L-Stability

In the following, assume the time-stepping procedure yn+1 = Φ(z)yn, where Φ(z) isthe amplification factor, which usually is complex.

L-stable. A method is L-stable if it is A-stable and it holds that limz→∞Φ(z) =0.

A-stable. A method is A-stable if Φ(z) is analytic for Rez < 0, i.e. thatits’ convergence region includes the left half of the complex plane, and if yn → 0 asn→∞.

See [17] for reference.

L-stability is important when solving ODEs with stiff source terms since it pre-vents unnatural oscillations between adjacent time steps due to locally fast timescale changes, and has a "fast enough" convergence rate to the true solution [20].

A.3 Newton’s Method

Newton’s method for a non-linear vector expression H(x) = 0 is well-known and isgiven by [28]:

J(H(xm))∆x = −H(xm), ∀m

xm+1 = xm + ∆x

where J(H) is the Jacobian of H, while ∆x is unknown - and thereby solved for - inthe first equation. In this paper, the chosen termination condition is |H(xm+1)| <L = 10−8, also limiting the number of iterations to 100, to prevent infinite loops.

Newton’s method has second order convergence.

68

Page 83: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

A.4. TOTAL VARIATION DIMINISHING (TVD)

A.4 Total Variation Diminishing (TVD)To define TVD, the concept of total variation is needed. Let qi be the discretevalues of some function, where i is the index. The total variation is then defined by

TV (q) =∞∑

i=−∞|qi − qi−1|,

which, for a two-level method, gives rise to the concept of Total Variation Dimin-ishing, see [20]:

Total Variation Diminishing (TVD). A two-level method is called totalvariation diminishing (TVD) if, for any set of data qn, the values qn+1 computedby the method satisfy

TV (qn+1) ≤ TV (qn), ∀n.

This relationship should really be called total variation non-increasing (TVNI)due to the ≤-sign but is usually called TVD for short [20]. A method which is TVDwill not introduce unnatural oscillations, which makes it an important property ofthe method [20].

69

Page 84: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 85: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

Appendix B

Reflection Error Convergence

In this appendix, the second order convergence of the reflection error when DIRK2is used in conjunction with Lax-Wendroff is confirmed numerically. To do this, thelinear PML-equations are solved, where the Berenger absorption function is usedwith β = 3 and σmax = 4000. The domain is Ω = [−1, 1] × [−1, 1], just as before,and the reference domain is [−30, 30]× [−30, 30]. Everything else is the same as inSection 4.2.5, except that the simulation is run a lot longer, until t ≈ 2.5 seconds,and that three different grid levels are considered, namely: 11 × 11, 21 × 21 and41×41 which all have their corresponding reference grids (i.e. with the same spatialstep sizes, but applied to the reference domain). The layer size is locked at D = 0.4meaning 2, 4 and 8 cells in the layer for the differently sized grids. The errorreflection is then measured using the L∞-norm for the water depth deviation, andthe results are shown in Figure B.1.

The figure shows an error convergence in the long run (see for example at thetime of 2.5 seconds) of approximately second order, which is the order of convergencefor Lax-Wendroff’s method. This means that the addition of a non-zero absorptionlayer, and the DIRK2-implementation, has not destroyed the second order conver-gence, which was to be shown.

71

Page 86: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

APPENDIX B. REFLECTION ERROR CONVERGENCE

Figure B.1. Reflection convergence behaviour for DIRK2 combined with Lax-Wendroff applied to the linear PML-equations.

72

Page 87: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow
Page 88: $ 0RGDO 30/ IRU WKH ' 6KDOORZ :DWHU (TXDWLRQV LQ ...874841/FULLTEXT02.pdf · Abstract A modal Perfectly Matched Layer (PML) is constructed for the two-dimensional, non-linear, Shallow

TRITA -MAT-E 2015:83

ISRN -KTH/MAT/E--15/83--SE

www.kth.se