Shallow Water

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Finite Volume Method for Shallow Water

Equations
Oto Havle, Jir Felcman

Workshop Dresden-Prague on Numerical Analysis 2008

Contents

Shallow water equations

SWE without source term

SWE with topographic source term

Conclusion

Shallow water equations


A system of PDEs
h
+ div(hv) = 0,
t
1 2
z

(hvs ) + div(hvs v) + g
h = gh
,
t
2 xs
xs
z ... given function, g > 0 ... given constant

h
z

s = 1, 2.

Shallow water equations - a hyperbolic system


2

w X
+
f i (w ) = r(x, w )
t
xi
i=1

where

   
h
h
h
hv1

w
q
hv
hv2

q1
hv1
f 1 (w ) = h1 q12 + 21 gh2 = hv12 + 21 gh2
hv1 v2
h1 q1 q2

q2
hv2
f 2 (w ) = h1 q1 q2 = hv1 v2
hv22 + 12 gh2
h1 q22 + 21 gh2


0
r(x, w ) =
ghz(x)

Shallow water equations - a hyperbolic system

Difficulties with Shallow Water Equations


I

existence / uniqueness theorems not available

dry areas - SWEs do not have sense for h = 0

source term

Shallow water equations - a hyperbolic system


Flat bottom case z = const.
I

system of conservation laws

w X
+
f s (w ) = 0
t
xs
s=1

Shallow water equations - a hyperbolic system


Flat bottom case z = const.
I

system of conservation laws

standard FVM discretization

Z
w (x, t
Di

k +1

Z
) dx

w (x, t k ) dx

Di

t k +1

+
tk

Di

2
X

ni f i (w )

i=1

{z

H(w |Di ,w |Dj ,nij )

dS = 0

Shallow water equations - a hyperbolic system


Flat bottom case z = const.
I

system of conservation laws

standard FVM discretization

we need a numerical flux


wki w

on the cell Di
and time interval (t k , t k +1 )

wki +1 = wki

k X
|ij |H(wki , wkj , nij )
|Di |
jS(i)

Numerical flux

How to derive a numerical flux H(w L , w R , n)


I

Choose a new coordinate system such that n = (1, 0).

Linearize and solve a linear 1D Riemann problem.


w
w
+A
=0
t
x1
(
w L , x1 < 0
w (x1 , t = 0) =
w R , x1 > 0

Take the linear flux Aw at x1 = 0 and rewrite in the original


coordinate system.

How to linearize the Riemann problem


We adapt the Vijayasundaram flux,
g V (w L , w R ) = A+ (w ? )w L + A (w ? )w R
wL + wR
where w ? =
2
A1 (w ) = D f 1 (w )

(?)

As A1 (w )w 6= f 1 (w ), the 1D flux (?) is not consistent with the


Shallow Water Equations. We fix it with additional term

0
1
2
1
g V 1 (w L , w R ) = A+ (w ? )w L + A (w ? )w R gh??
2
0
hL + hR
where h?? =
2

SWE with no source term - Numerical results


Elementary Riemann problems in 1D
I

continuous solution (rarefaction wave) - EOC 0.75

discontinuous solution (contact discontinuity) - EOC 0.5

2D test problem - circular dam break

10
9
8
7
6
5
4
3
2
1
0

6
5
4
3
2
1
0
200

200

150

150

100
-200

50
-150

-100

0
-50

50

100

150

-50
-100
-150
-200
200

100
-200

50
-150

-100

0
-50

50

100

150

-50
-100
-150
-200
200

Source term - stationary solution


Shallow water equations
h
+ div(hv) = 0,
t
1 2
z

(hvs ) + div(hvs v) + g
h = gh
,
t
2 xs
xs
Stationary solution (lake at rest)
h(x, t) = H0 z(x),
Discrete stationary solution

H0 zi
w ki = 0 ,
0

v(x, t) = 0.


zi z D

s = 1, 2.

Discretization of source terms


Rewrite to a system of conservation laws with a nonzero RHS
2

w X
+
f s (w ) = r(x, w )
t
xs
s=1

Operator splitting
2

w X
+
f s (w ) = 0
t
xs
s=1

w
+
t

= r(x, w )

would not work. Stationary solutions are different.

Discretization of source terms


Difficulty with the source term
I

We use a piecewise-constant approximation of the


topography function z.
hi = H0 zi
The source term is now a distribution.


0
r(x, w ) =
ghz(x)

Source term must be taken into account when


approximating convective term.

Linearised Riemann problem with a source term


We construct a linear Riemann problem with nonzero RHS
w
w
+A
= (x)r,
t
x
(
w L, x < 0
w (x, 0) =
wR, x > 0

t >0

The matrix A is the same as before


A = A1 (w ? ) = Df 1 (w ? )

w? =

The right hand side has special form

0
r = gh? (zL zR )
0

1
(wL + wR )
2

Linear Riemann problem with a source term


To solve the Riemann problem
I

Use diagonal form A = UU1 to decouple equations.

u
u
+
= (x), t > 0
t
x
u(x, 0) = u0 (x)

Linear Riemann problem with a source term


To solve the Riemann problem
I

Use diagonal form A = UU1 to decouple equations.

Use characteristics to solve scalar problems.

= 0 = u(x, t) = u0 (x) + t(x),

K (x, t),
6= 0 = u(x, t) = u0 (x t) +
||
(
1, x(x t) < 0,
where K (x, t) =
0, x(x t) 0.

Linear Riemann problem with a source term


To solve the Riemann problem
I

Use diagonal form A = UU1 to decouple equations.

Use characteristics to solve scalar problems.

The solution is a function, unless v1 = c.

|v | < c

... subcritical

|v | = c

... critical

|v | > c ... supercritical

p
gh

h
w = hv1
hv2
c=

Linear Riemann problem with a source term


To solve the Riemann problem
I

Use diagonal form A = UU1 to decouple equations.

Use characteristics to solve scalar problems.

The solution is a function, unless v1 = c.

For the purposes of deriving a numerical flux, ignore the


distributional case.

The linear flux Aw at x = 0 is




1
1
A
lim w (x, t) +
lim w (x, t)
2 x0+
2 x0
1
= A+ w L + A w R + (sgn A)r ? .
2

New numerical flux


The numerical flux (discretization of convective term)
g conv (w L , w R , zL , zR )
1 2

= A+
1 (w ? )w L + A1 (w ? )w R 2 gh?? e 2
1
gh? (zR zL )(sgn A1 )e 2
2
In fact, the numerical flux does not depend on sgn 2 .
p
1 = v1 c, 2 = v1 , 3 = v1 + c,
c = gh
Therefore, it is continuous in the subcritical case |v | < c,

1/c
sgn A1 (w ? )e 2 = v1 /c .
v2 /c

Discretizing the source term


We discretize the source term proper
t k +1
t k +1
Z Z
Z Z
r(x, w (x, t)) dx dt ghi
Di

tk

Di
k


0
dx dt
z(x)

tk

= ghi

0
z(x)
nij


dS

Di
k

ghi

|ij |zij? nij

jS(i)

where zij? =

zi + zj
is an approximation to z at the interface ij .
2

The numerical scheme


Both convective and source have a quasi-flux form
X
k
|ij |(. . . )
jS(i)

We can write
w ki +1 = w ki



k X
|ij |H total w ki , w kj , zi , zj , nij
|Di |
jS(i)

Theoretical properties
I

The scheme is conservative with respect to h.

The discrete "lake at rest" is a stationary solution.

Numerical results
The scheme seems to work in the subcritical case |v | < c, but
not in the supercritical case. It gets better if we replace
h?? =

hL + hR
2

with

h?? =

h
qR

1+ 2
2 hL

< 1,
+

h ,
L

1 2
2 hR ,

1 < < 1,

v1,?
c?

> 1,

g conv (w L , w R , zL , zR )
1 2

= A+
1 (w ? )w L + A1 (w ? )w R 2 gh?? e 2
1
gh? (zR zL )(sgn A1 )e 2
2

Summary
Numerical scheme for Shallow Water Equations.
I

Simple first order Finite Volume scheme.

Handles topographic source term.

Future work
I

Enhance with mesh adaptivity.

Investigate the case h = 0.

Summary
Numerical scheme for Shallow Water Equations.
I

Simple first order Finite Volume scheme.

Handles topographic source term.

Future work
I

Enhance with mesh adaptivity.

Investigate the case h = 0.

Thank you for your attention.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy