finite volume numerical solutions to the shallow water ... · to implement fvm to solve hyperbolic...
TRANSCRIPT
Finite Volume Numerical Solutions tothe Shallow Water wave Equations
Dr Sudi Mungkasi
Department of MathematicsSanata Dharma University, Yogyakarta, Indonesia
Email: [email protected]
Presented at:The Australian National University, Canberra, Australia
25 June 2019
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 1 / 56
Contents
In this talk, we present
Motivation and aims
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 2 / 56
USA: Johnstown dam break
More than 2000 people died: USA, 31 May 1889
Ref: http://projectdisaster.com/?m=200805
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 3 / 56
France: Malpasset dam break
More than 400 people died: France, 2 Dec 1959
Ref: http://www.ncche.olemiss.edu/software/ccheflood
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 4 / 56
Indonesia: Aceh tsunami 2004
More than 166,000 people died: Indonesia, 26 Dec 2004
Ref: http://medlem.spray.se/meunasah/
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 5 / 56
Japan: Tohoku tsunami 2011
At least 10,000 people dead: Japan, 11 Mar 2011
Ref: http://news.nationalgeographic.com/news/2011/03/
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 6 / 56
Aims
Our aims are
to implement FVM to solve hyperbolic PDE
to obtain numerical solutions to SWE
to see some open problems in plasma physics that may be solvedusing FVM
To anticipate floods due to dam break and tsunami:
early warning system
modelling of water flows
simulation of water flows, such as using ANUGA software.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 7 / 56
Contents
Contents
Motivation and aims
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 8 / 56
Conservative form
In one space dimension, conservation laws have the form:
qt + f (q)x = 0. (1)
When there is a source term s, it is usually called balance laws and has theform:
qt + f (q)x = s. (2)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 9 / 56
Specific examples of conservation laws:
a). advection equation: qt + cqx = 0.
b). Burgers’ equation: ut + (12u2)x = 0.
c). shallow Water wave Equations (SWE) :
∂Q
∂t+
∂F(Q)
∂x+
∂G(Q)
∂y= 0 (3)
where
Q =
w
uh
vh
, F(Q) =
uh
u2h + 12gh
2
uvh
, G(Q) =
vh
uvh
v2h + 12gh
2
(4)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 10 / 56
Wave equation
Recall the second order scalar wave equation
utt = c2uxx , −∞ < x < ∞. (5)
It can be written as a first order system of conservation laws as follows.Introducing
v = ux , w = ut (6)
we then have vt = wx and wt = c2vx .Therefore we obtain the system
vt + (−w)x = 0, (7)
wt + (−c2v)x = 0. (8)
That is,qt + f (q)x = 0 (9)
in which q = [v , w ]T and f (q) = [−w , − c2v ]T .Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 11 / 56
Heat equation
The one-dimensional heat equation is
qt = cqxx (10)
where c is positive constant, which is the diffusion coefficient. The heatequation can be rewritten into a conservative form
qt + (−cqx)x = 0 . (11)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 12 / 56
Methods to solve conservation laws
Finite Difference Method works from the differential form of conservationlaws
qt + f (q)x = 0. (12)
Finite Volume Method works from integral forms of conservation laws
d
dt
∫ x2
x1
q(x , t) dx = f (q(x1, t))− f (q(x2, t)). (13)
or∫ x2
x1
q(x , t2) dx =
∫ x2
x1
q(x , t1) dx
+
∫ t2
t1
f (q(x1, t))dt −
∫ t2
t1
f (q(x2, t))dt. (14)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 13 / 56
Finite Volume Methods
We use the following notations
Ci = (xi− 12, xi+ 1
2) (15)
Qni ≈
1
∆x
∫ xi+1
2
xi− 1
2
q(x , tn)dx ≡1
∆x
∫
Ci
q(x , tn)dx (16)
F ni+ 1
2
≈1
∆t
∫ tn+1
tn
f [q(xi+ 12, t)]dt (17)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 14 / 56
Finite Volume Methods
Then the integral form of conservation laws
∫ x2
x1
q(x , t2) dx =
∫ x2
x1
q(x , t1) dx
+
∫ t2
t1
f (q(x1, t))dt −
∫ t2
t1
f (q(x2, t))dt. (18)
can be written as a fully-discrete Finite Volume Scheme
Qn+1i = Qn
i −∆t
∆x(F n
i+ 12
− F ni− 1
2
). (19)
Here F ni+ 1
2
for all i are the fluxes.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 15 / 56
Contents
Contents
Motivation and aims
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 16 / 56
1D SWE
The 1D SWE isqt + f(q)x = s ,
where
q =
[
h
hu
]
, f =
[
hu
hu2 + 12gh
2
]
, s =
[
0−ghzx
]
.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 17 / 56
FVM for 1D SWE
Recall that forqt + f (q)x = 0, (20)
we obtain a semi-discrete FVM
∆xid
dtQi + F n
i+ 12
− F ni− 1
2
= 0 (21)
or a fully-discrete FVM
Qn+1i = Qn
i −∆t
∆xi(F n
i+ 12
− F ni− 1
2
). (22)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 18 / 56
FVM for 1D SWE
Then forqt + f (q)x = s, (23)
we obtain a semi-discrete FVM
∆xid
dtQi + F n
i+ 12
− F ni− 1
2
= Si (24)
or a fully-discrete FVM
Qn+1i = Qn
i −∆t
∆xi(F n
i+ 12
− F ni− 1
2
) +1
∆xiSi . (25)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 19 / 56
Simulation example 1: dam-break problem
The following is by a 2nd order method.
! " # $ % & % # ' ( ) *+ ,Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 20 / 56
Simulation example 2: perturbation of a lake at rest
The following is by a 2nd order FVM.- . / 0 12 1 3 4 5 1 6 / . 7 8 9: ; : : ; < = ; : = ; < > ; :: ; :: ; >: ; ?: ; @: ; A= ; :B C DEF: ; : : ; < = ; : = ; < > ; :G = ; :G : ; <: ; :: ; <= ; :H IJFKC LJ: ; : : ; < = ; : = ; < > ; :M N O P Q P N RG = ; :G : ; <: ; :: ; <= ; :S FT IUVC W
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 21 / 56
2D SWE
The two-dimensional shallow water equations are
∂Q
∂t+
∂F(Q)
∂x+
∂G(Q)
∂y= 0 (26)
where
Q =
w
uh
vh
, F(Q) =
uh
u2h + 12gh
2
uvh
, G(Q) =
vh
uvh
v2h + 12gh
2
(27)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 22 / 56
General forms
Conservation laws in one-dimensional space have the form
qt + f (q)x = 0. (28)
Conservation laws in two-dimensional space have the form
qt + f (q)x + g(q)y = 0. (29)
Here, we focus on two-dimensional space domain. We will discretise thedomain into polygonal cells: usually either rectangular or triangular grids.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 23 / 56
Two approaches of FVM for 2D SWE
Two popular approaches to solve the 2D SWE using FVM:
Rectangular grids
Triangular grids
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 24 / 56
1. Rectangular grids
Discretisation of the spatial domain
The value Qnij represents a cell average over the (i , j) grid cell at time tn,
Qnij ≈
1
∆x∆y
∫ y+ 12
y− 12
∫ x+ 12
x− 12
q(x , y , tn) dx dy . (30)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 25 / 56
1. Rectangular grids
Recall qt + f (q)x + g(q)y = 0. Let Cij = [xi− 12, xi+ 1
2]× [yj− 1
2, yj+ 1
2],
∆x = xi+ 12− xi+ 1
2and ∆y = yj+ 1
2, yj− 1
2. Then we have
ddt
∫ ∫
Cij
q(x , y , t) dx dy =
−
∫ yj+1
2
yj− 1
2
f (q(xi+ 12, y , t)) dy +
∫ yj+1
2
yj− 1
2
f (q(xi− 12, y , t)) dy
−
∫ xi+1
2
xi− 1
2
f (q(x , yi+ 12, t)) dx +
∫ xi+1
2
xi− 1
2
f (q(x , yi− 12, t)) dx (31)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 26 / 56
1. Rectangular grids
Integrating this expression from tn to tn+1 and dividing it by the cell area∆x∆y , we obtain a fully-discrete FVM for Conservation laws intwo-dimensional space have the form
qt + f (q)x + g(q)y = 0 (32)
is
Qn+1ij = Qn
ij −∆t
∆x
[
F ni+ 1
2,j− F n
i− 12,j
]
−∆t
∆y
[
Gni ,j+ 1
2
− Gni ,j− 1
2
]
. (33)
Here
F ni− 1
2,j≈
1
∆t∆y
∫ tn+1
tn
∫ yj+1
2
yj− 1
2
f (q(xi− 12, y , t)) dy dt, (34)
Gni ,j− 1
2
≈1
∆t∆x
∫ tn+1
tn
∫ xi+1
2
xi− 1
2
g(q(x , yj− 12, t)) dx dt. (35)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 27 / 56
2. Triangular grids
Suppose that we discretise the domain into a finite number of triangles.
Discretisation of the spatial domain
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 28 / 56
FVM on arbitrary polygonal grids
The conservation laws with source term can be written as
∂
∂t
∫
Ωq dΩ+
∮
ΓT−1f(Tq) dΓ =
∫
Γs dΩ . (36)
The discrete version of it is
dqidt
+1
Ai
∑
j∈N (i)
Hij lij = si . (37)
Here T is a transformation, which transform a vector from globalcoordinates into local coordinates. The local coordinates are the edges ofthe polygonal cell and their orthogonal direction.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 29 / 56
Algorithm for FVM on arbitrary polygonal grids
Recall the discrete version of the FVM
dqidt
+1
Ai
∑
j∈N (i)
Hij lij = si . (38)
1 For each interface (i , j) , transform the quantity qi and qj in theglobal coordinate system (x , y) into the quantity qi and qj in thelocal coordinate system system (x , y) .
2 Compute the flux f at the interface (i , j) corresponding to
qt + f(q)x = s (39)
3 Transform the flux f back to the global coordinate system (x , y).
4 Finally, solve (38) where N (i) = 0, 1, 2, if triangular grids areconsidered, for qi .
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 30 / 56
ANUGA Software
Some descriptions:
1 ANUGA is an open source (free software) developed by AustralianNational University (ANU) and Geoscience Australia (GA).
2 The mathematical background underlying the software is the finitevolume method.
3 Triangular computational grids are used.
4 The interface of this software is in Python language, but thecomputationally expensive parts are written in C language.
5 A thorough description of this software is available athttp://anuga.anu.edu.au/.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 31 / 56
Planar dam break at 0 s
Figure : Initial condition for the planar dam break problem. ANUGA software wasused in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 32 / 56
Planar dam break at 0.5 s
Figure : Water flows 0.5 second after the planar dam is broken. ANUGA softwarewas used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 33 / 56
Planar dam break at 1.0 s
Figure : Water flows 1.0 second after the planar dam is broken. ANUGA softwarewas used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 34 / 56
Planar dam break at 1.5 s
Figure : Water flows 1.5 seconds after the planar dam is broken. ANUGAsoftware was used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 35 / 56
Circular dam break at 0 s
Figure : Initial condition for the circular dam break problem. ANUGA softwarewas used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 36 / 56
Circular dam break at 0.5 s
Figure : Water flows 0.5 second after the circular dam is broken. ANUGAsoftware was used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 37 / 56
Circular dam break at 1.0 s
Figure : Water flows 1.0 second after the circular dam is broken. ANUGAsoftware was used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 38 / 56
Circular dam break at 1.5 s
Figure : Water flows 1.5 seconds after the circular dam is broken. ANUGAsoftware was used in this simulation.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 39 / 56
Contents
Contents
Motivation and aims
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 40 / 56
Weak local residuals (WLR)
Weak local residual (WLR) can be used as a smoothness indicator ofnumerical solutions.Consider the scalar balance law with an initial condition
qt + f (q)x = s , −∞ < x < ∞ ,
q(x , t) = q0(x) , t = 0 .
The weak form of the initial value problem is∫
∞
0
∫∞
−∞
[q(x , t)Tt(x , t) + f (q(x , t))Tx(x , t) + s(x , t)T (x , t)] dx dt
+
∫∞
−∞
q0(x)T (x , 0) dx = 0,
where T (x , t) is an arbitrary test function.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 41 / 56
Weak local residuals (WLR)
We can choose the localised linear B-splines as the test functions
Tn−1/2j+1/2 (x , t) := Bj+1/2(x)B
n−1/2(t) , where
Bj+1/2(x) =
x−xj−1/2
∆xif xj−1/2 ≤ x ≤ xj+1/2 ,
xj+3/2−x
∆xif xj+1/2 ≤ x ≤ xj+3/2 ,
0 otherwise ,
and Bn−1/2(t) is defined similarly.This results in the WLR
En−1/2j+1/2 = −
∫ tn+1/2
tn−3/2
∫ xj+3/2
xj−1/2
[
q∆(x , t)[
Tn−1/2j+1/2
]
t
+ f (q∆(x , t))[
Tn−1/2j+1/2
]
xs∆(x , t)T
n−1/2j+1/2
]
dx dt.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 42 / 56
Weak local residuals (WLR)
After a straightforward computation, we obtain the WLR formulation
En−1/2j+1/2 =
∆x
2
[
qnj − qn−1j + qnj+1 − qn−1
j+1
]
+∆t
2
[
f(
qn−1j+1
)
− f(
qn−1j
)
+ f(
qnj+1
)
− f(
qnj)
]
−∆x∆t
4
[
sn−1j + snj + sn−1
j+1 + snj+1
]
. (40)
This WLR can be extended into 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 43 / 56
Adaptive Methods in 1D
0 5 10 15 20 250.00.20.40.60.81.01.2
Stage
StageBed
0 5 10 15 20 250.000
0.010
0.020
CK
0 5 10 15 20 25Position
−0.06−0.04−0.020.000.020.040.06
Cell level
WLR in adaptive methods in 1D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 44 / 56
Adaptive Methods in 1D
0 5 10 15 20 250.00.20.40.60.81.01.2
Stage
StageBed
0 5 10 15 20 25
0.0000.0100.020
CK
0 5 10 15 20 25Position
0
2
4
6
8
10
Cell level
WLR in adaptive methods in 1D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 45 / 56
Adaptive Methods in 1D
0 5 10 15 20 250.00.20.40.60.81.01.2
Stage
StageBed
0 5 10 15 20 25
0.0000.0100.020
CK
0 5 10 15 20 25Position
0
2
4
6
8
10
Cell level
WLR in adaptive methods in 1D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 46 / 56
Adaptive Methods in 1D
0 5 10 15 20 250.00.20.40.60.81.01.2
Stage
StageBed
0 5 10 15 20 25
0.000
0.010
0.020
CK
0 5 10 15 20 25Position
0
2
4
6
8
10
Cell level
WLR in adaptive methods in 1D. (154 cells)
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 47 / 56
Standard Methods in 1D
0 5 10 15 20 250.00.20.40.60.81.01.2
Stage
StageBed
0 5 10 15 20 25
0.000
0.010
0.020
CK
0 5 10 15 20 25Position
−1.0
−0.5
0.0
0.5
1.0
Cell level
Standard (non-adaptive) methods in 1D using 308 cells.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 48 / 56
Adaptive Methods in 2D
Adaptive methods in 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 49 / 56
Adaptive Methods in 2D
−1
−0.5
0
0.5
1
−1
−0.5
0
0.5
10
0.2
0.4
0.6
0.8
1
xy
Adaptive methods in 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 50 / 56
Adaptive Methods in 2D
−1
−0.5
0
0.5
1
−1
−0.5
0
0.5
10
0.2
0.4
0.6
0.8
1
xy
Adaptive methods in 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 51 / 56
Adaptive Methods in 2D
−1
−0.5
0
0.5
1
−1
−0.5
0
0.5
10
0.2
0.4
0.6
0.8
1
xy
Adaptive methods in 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 52 / 56
Adaptive Methods in 2D
−1
−0.5
0
0.5
1
−1
−0.5
0
0.5
10
0.2
0.4
0.6
0.8
1
xy
Adaptive methods in 2D.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 53 / 56
Contents
Contents
Motivation and aims
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 54 / 56
Conclusions
In this talk, we have presented
Conservation laws and FVM
FVM for SWE
Adaptive mesh FVM for SWE
Other topics that could have been covered
Staggered grid FVM for SWE
Parallel computations of FVM for SWE
Application of FVM in plasma physics
Are there open problems in plasma physics that may be solved using FVM?
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 55 / 56
Main references
R. J. LeVeque. Finite volume methods for hyperbolic problems,Cambridge University Press, Cambridge, 2002.
S. Mungkasi. A study of well-balanced finite volume methods andrefinement indicators for the shallow water equations, PhD thesis,Australian National University, Canberra, 2012.
Dr Sudi Mungkasi (ANU Visitor) Finite volume methods 56 / 56