lab: scientific computing - tsunami- simulation

17
Technische Universität München Department of Informatics V 29th April, 2013 A. Breuer, S. Rettenberger, M. Bader Session 2: Bathymetry, Dimensional Splitting, SWE Lab: Scientific Computing - Tsunami- Simulation Monday, April 29, 13

Upload: others

Post on 16-Oct-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

29th April, 2013

A. Breuer, S. Rettenberger, M. Bader

Session 2: Bathymetry, Dimensional Splitting, SWE

Lab: Scientific Computing - Tsunami-Simulation

Monday, April 29, 13

Page 2: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Outline

• Presentations: Assignment 1• Numerics

– Bathymetry– Dimensional Splitting

• Preparation: Assignment 2• SWE

2

Monday, April 29, 13

Page 3: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation 3

Schedule (big meetings)

Date Schedule15.04.2013 Kickoff29.04.2013 Presentation 113.05.2013 Presentation 227.05.2013 Presentation 310.06.2013 Presentation 424.06.2013 Report: Project phase01.07.2013 Presentation Project

Monday, April 29, 13

Page 4: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Presentations: Assignment 1

4

Prof. Dr. M. BaderDipl.-Math. A. BreuerS. Rettenberger, M. Sc.

TUM, SCCS (I5)Bachelor-Praktikum:Tsunami-Simulation April 15, 2013

In this assignment we are going to implement and test the most basic functionality of ourlab-course: The f-wave solver for the one-dimensional shallow water equations. The shallowwater equations are a system of nonlinear hyperbolic conservations laws with an optionalsource term:

h

hu

t

+

hu

hu

2 + 1

2

gh

2

x

= S(x, t). (1)

The quantities q = [h,hu]T are defined by h(x, t), the space-time dependent height of thewater column and hu(x, t), the space-time dependent momentum in spatial x-direction (uis the particle velocity of the water column). g the gravity constant (usually g := 9.81m/s

2)and f := [hu,hu2 + 1

2

gh

2]T the flux function. As source term S(x, t) we will consider thee↵ect of space-dependent bathymetry (topography of the ocean) only S(x) = [0,-ghB

x

]T ,embedding of additional forces, such as friction or the coriolis e↵ect is possible. Figure 1illustrates the involved quantities.

Figure 1: Sketch of quantities appearing in the one-dimensional shallow water equations.

To verify, that this fundamental functionality of our program works as expected, proper(unit-) testing is required. We will do testing by a selection of standardized tests, for whicha solution is available.

Remark As units we use meters (m) and seconds (s) for all computations.

Literature

We discuss the basic ideas of numerics, software and strategies in our meetings, neverthelessmany important details can’t be covered in such a short time. We recommend a basic set ofliterature in each assignment as hint for your personal studies. In terms of this assignmentwe recommend the following list of books, papers and guides:

• Finite volume methods for hyperbolic problems, R. J. LeVeque, 2002

• Riemann solvers and numerical methods for fluid dynamics, E. F. Toro, 2009

Monday, April 29, 13

Page 5: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

SWEs: Source Term

5

Prof. Dr. M. BaderDipl.-Math. A. BreuerS. Rettenberger, M. Sc.

Bachelor-Praktikum:Tsunami-Simulation April 2, 2013

In this assignment we are going to implement and test the most basic functionality of ourlab-course: The f-wave solver for the one-dimensional shallow water equations. The shallowwater equations are a system of nonlinear hyperbolic conservations laws with an optionalsource term:

h

hu

t

+

hu

hu2 + 1

2

gh2

x

= S(x, t). (1)

The quantities q = [h,hu]T are defined by h(x, t), the space-time dependent height of thewater column and hu(x, t), the space-time dependent momentum in spatial x-direction (uis the particle velocity). g the gravity constant (usually g := 9.81m/s2) and f := [hu,hu2 +1

2

gh2]T the flux function. As source term S(x, t) we will consider the e↵ect of space-dependentbathymetry only S(x) = [0,-ghB

x

]T , embedding of additional forces, such as friction or thecoriolis e↵ect is possible. Figure TODO illustrates the involved quantities.

To verify, that the most basic functionality of our program works as expected a proper(unit-) testing is required. We will do testing by a selection of standardized tests, for whicha solution is available.

Remark As units we use meters (m) and seconds (s) for all computations.

Literature

We discuss the basic ideas of numerics, software and strategies in our meetings, neverthelessmany important details can’t be covered in such a short time. We recommend a basic set ofliterature in each assignment as hint for your personal studies. In terms of this assignmentwe recommend the following list of books, papers and guides:

• Finite volume methods for hyperbolic problems, R. J. LeVeque, 2002

• Riemann solvers and numerical methods for fluid dynamics, E. F. Toro, 2009

• A wave propagation method for conservation laws and balance laws with spatially vary-

ing flux functions, D. S. Bale, 2003

• Thinking in C++: http://mindview.net/Books/TICPP/ThinkingInCPP2e.html

• git Documentation: http://git-scm.com/documentation

• Doxygen Manual : http://www.stack.nl/~dimitri/doxygen/manual

• CxxTest User Guide: http://cxxtest.com/guide.html

• SCons user Guide: http://www.scons.org/doc/production/HTML/scons-user.html

• Paraview Documentation: http://www.itk.org/Wiki/ParaView/Users_Guide/Table_Of_Contents

Monday, April 29, 13

Page 6: Lab: Scientific Computing - Tsunami- Simulation

1. ..2. F-Wave solver: Edge-local

Riemann solutions

3. ..

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

F-Waves with source term

6

Monday, April 29, 13

Page 7: Lab: Scientific Computing - Tsunami- Simulation

ghost layercomputational domain

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: Sweeps

7

Monday, April 29, 13

Page 8: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: X-Sweep

8

Monday, April 29, 13

Page 9: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: X-Sweep

9

Monday, April 29, 13

Page 10: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: X-Sweep

10

Monday, April 29, 13

Page 11: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: Y-Sweep

11

Monday, April 29, 13

Page 12: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: Y-Sweep

12

Monday, April 29, 13

Page 13: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: Sweeps

13

Q

⇤i,j

= Q

n

i,j

-�t

�x

�A

+�Q

i-1/2,j

+A

-�Q

i+1/2,j

x-sw

eep

y-sw

eep

= -

= -

Q

n+1

i,j

= Q

⇤i,j

-�t

�y

⇣B

+�Q

⇤i,j-1/2

+ B

-�Q

⇤i,j+1/2

Monday, April 29, 13

Page 14: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Dimensional Splitting: Stability

14

�t <

1

2· �x

max

x

^ �t <

1

2· �y

max

y

, (10)

�t = 0.4 · �x

max

x

, (11)

Monday, April 29, 13

Page 15: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Preparation: Hydraulic Jumps

15

Source: Hydraulics over a weir, Little River Research and Design: http://www.emriver.com

Monday, April 29, 13

Page 16: Lab: Scientific Computing - Tsunami- Simulation

Prof. Dr. M. Bader

Dipl.-Math. A. Breuer

S. Rettenberger, M. Sc.

TUM, SCCS (I5)

Bachelor-Praktikum:

Tsunami-Simulation April 29, 2013

In their di↵erential form the two dimensional shallow water equations are given by:

2

4h

hu

hv

3

5

t

+

2

4hu

hu

2 + 1

2

gh

2

huv

3

5

x

+

2

4hv

huv

hv

2 + 1

2

gh

2

3

5

y

= S(x,y, t). (1)

The quantities q = [h,hu,hv]T are defined by the space-time dependent water height

h(x,y, t), the momentum in spatial x-direction hu(x,y, t) and the momentum in y-direction

hv(x,y, t). F := [hu,hu2 + 1

2

gh

2

,huv]T is the flux function in x-direction and G :=[hv,huv,hv2+ 1

2

gh

2]T in the flux function in y-direction. g is the gravitational constant (usu-

ally g := 9.81m/s

2

). As for the one-dimensional shallow water equations, we consider only

the space-dependent e↵ect of bathymetry in the source term S(x,y) = [0,-ghB

x

,-ghB

y

]T .In this assignment we will first introduce bathymetry in our solver and simulate one di-

mensional flow over a weir in Chapter 1 and 2. The following Chapters 3 and 4 cover the

extension of our one dimensional discretization to two spatial dimensions. After this assign-

ment we have all numerics at hand and will be able to concentrate on Tsunami simulations

in the third assignment.

Literature

• Hydraulics over a weir : http://serc.carleton.edu/details/files/19076.html

• SWE Wiki : https://github.com/TUM-I5/SWE/wiki

• Documentation, GNU C Preprocessor : http://gcc.gnu.org/onlinedocs/cpp/

• Case Study: Malpasset Dam-Break Simulation using a Two-Dimensional Finite VolumeMethod, Valiani et. al., 2002

1 Bathymetry

1.1 Non-zero source term

Bathymetry is the topography of the ocean and the most important e↵ect to be considered

in the source term of the shallow water equations for Tsunami simulations. As reference we

use the sea level: Bathymetry in dry cells (land) Ci

is zero or positive: b

i

> 0, wet cells

(water) have negative values: b

i

< 0.

Introduction of bathymetry into the f-wave solver is comparably simple, because it can

be directly incorporated into the decomposition of the jump in the flux function:

�f- �x i-1/2

=2X

p=1

Z

p

, (2)

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

Preparation: Assignment 2

16

Monday, April 29, 13

Page 17: Lab: Scientific Computing - Tsunami- Simulation

Technische Universität MünchenDepartment of Informatics V

A. Breuer, S. Rettenberger, M. Bader Lab: Scientific Computing - Tsunami-Simulation

SWE

• SWE code: https://github.com/TUM-I5/SWE

17

Monday, April 29, 13