You are on page 1of 5

Hohaï University Academic year 2014/2015

Nanjing  China
Pro ject :

Purpose :

Getting a simulation with the kinematic wave approximation (approximation


of shallow water equations). At rst we will begin with the advection equation
and Burgers' equation.

1 Advection equation

At rst, we consider the advection equation



∂t c(t, x) + u.∂x c(t, x) = 0 x ∈ R t ∈ R+
, (1)
c(t = 0, x) = c0 (x) x∈R

with c ∈ R.
1. Which kind of phenomena can we model with this equation ? How can
we get this model more realistic (a simple answer is expected) ?
2. Solve this equation by hand (1) with the Method Of Characteristics
(MOC). How is behaving the solution ?
3. Show that we can write equation (1) under the following form

∂t c(t, x) + ∂x f (c(t, x)) = 0, (2)

what is the name of function f ? Give the expression for f (c(t, x)).
4. We consider the following nite volume scheme
n+1/2 n+1/2
cn+1 − cni fi+1/2 − fi−1/2
i
+ = 0, (3)
∆t ∆x
n+1/2
in order to solve the advection equation. What is fi+1/2 ?
n+1/2
5. For fi+1/2 we consider the following function
0 n
n+1/2 f (cni ) + f (cni+1 ) f (ci+1/2 ) n
fi+1/2 = F(cni , cni+1 ) = − (ci+1 − cni ) (4)
2 2

1
with
f 0 (cni+1/2 ) = max(|f 0 (cni )|, |f 0 (cni+1 )|). (5)
Scheme (4)-(5) is stable under the following stability condition

∆t
max(f 0 (cni+1/2 )). ≤ 1. (6)
∆x

Question : Is f 0 (cni+1/2 ) a constant ? If so, what is the value of f 0 (cni+1/2 ) ?


Code this scheme in Scilab and plot the solution at several times ta-
king with the following data.
Data : Tmax = 4, Xmax = 1, u = 0, 1, J = 200, initial condition

1 for x ∈ [0, Xmax /2]



c(t = 0, x) = c0 (x) =
0 for x ∈]Xmax /2, Xmax ]

and inow or imposed boundary condition

c(t, x = 0) = 1, for t ∈ [0, Tmax ].

and open outow at x = Xmax .

2 Burgers' equation

We consider Burgers' equation under its conservative form

u(t, x)2
 
∂t u(t, x) + ∂x = 0, (7)
2

with u(t, x) the unknown, t the variable in time and x the variable in space.
1. Show that we can write Burgers' equation (7), under the following
form
∂t u(t, x) + ∂x f (u(t, x)) = 0, (8)
and give the formula/function f (u(t, x)).
2. Thus it is possible to use an explicit nite volume scheme to solve this
equation
n+1/2 n+1/2
un+1 − uni fi+1/2 − fi−1/2
i
+ =0 (9)
∆t ∆x

2
which writes under the form
n+1/2 n+1/2
fi+1/2 − fi−1/2
un+1
i = uni − ∆t = 0. (10)
∆x
with
n
n+1/2 f (uni ) + f (uni+1 ) ai+1/2 n
fi+1/2 = F(uni , uni+1 ) = − .(ui+1 − uni ) (11)
2 2
with the velocity ani+1/2 = max(|f 0 (uni )| , f 0 (uni+1 ) ) and the CFL condi-

tion writes
n ∆t
0< max ai+1/2 . ≤ 1. (12)
i∈{1,...,J−1} ∆x
Question : Give the expression of f 0 (uni ), then apply the nite volume
scheme with a scilab code to the wave rarefaction with the following
initial condition
−1, if x ≤ 0

u0 (x) = (13)
1, if x > 0
and the following data.
Data : For x ∈ [−1, 1] and t ∈ [0, 2].

Instructions : We will take J = 200 cells in space, and a variable

time step ∆t (calculated at each iteration thanks to the stability/CFL


condition (12)), for boundary conditions on left and right boundary
conditions, we should take open/Neumann boundaries (i.e. : un+1 0 =
un+1
1 and u n+1
J = un+1
J−1 ).

3 Kinematic wave equation

Kinematic wave equation is a simplication of Shallow Water/Saint-Venant


system. The Shallow Water system writes


 ∂t h + ∂x (hu) = 0

 2  , (14)
gh 2
 ∂t (hu) + ∂x + hu = gh (S0 − Sf )


2

with h(t, x) is the water height [m], u(t, x) the ow velocity [m/s], q(t, x) =
h(t, x)u(t, x) the unit discharge [m2 /s], g = 9.81 the constant of gravity

3
[m/s2 ], S0 = −∂x z(x) the opposite of the bed slope, z(x) the topography
[m], Sf the friction term depending of the considered friction law. We consi-
der here the Manning friction law Sf = n2 q|q|/h10/3 . The rst equation of
system (14) is the mass conservation equation and the second one is the mo-
mentum equation. Under some ow conditions, the shallow water equations
can simplify under the kinematic wave's equations

 ∂t h + ∂x (hu) = 0
, (15)
S0 − Sf = 0

or again 
 ∂t h + ∂x q = 0
, (16)
S0 − Sf = 0

1. Show that with Manning friction's formulation and the kinematic wa-
ve's model (15), we have
r
|S0 | 10/3
q(t, x) = sgn(S0 ) h , (17)
n2
with sgn the sign function.
2. With relation (17) we have q(t, x) as a function of h(t, x). Starting
form relation (17), show that we can write h(t, x) as a function of
q(t, x).
Indication : It writes under the form h(t, x) = (q(t, x) n /|S0 |) , with
α β γ

α, β and γ , three constants to determine.


3. With the rst equation in system (16) and relation (17), show that
the kinematic wave's model can write

∂t h(t, x) + ∂x f (h(t, x)) = 0 (18)

and give the expression of function f (h(t, x)).


Indication : We have
r
5 |S0 | 2/3
f 0 (h(t, x)) = sgn(S0 ) h (19)
3 n2

4
4. Thus it is possible to use an explicit nite volume scheme to solve this
equation
n+1/2 n+1/2
hn+1 − hni fi+1/2 − fi−1/2
i
+ =0 (20)
∆t ∆x
which writes under the form
n+1/2 n+1/2
fi+1/2 − fi−1/2
hn+1
i = hni − ∆t = 0. (21)
∆x
with
n
n+1/2 f (hni ) + f (hni+1 ) ai+1/2 n
fi+1/2 = F(hni , hni+1 ) = − .(hi+1 − hni ) (22)
2 2
with the velocity ani+1/2 = max(|f 0 (hni )| , f 0 (hni+1 ) ) and the CFL condi-

tion writes
n ∆t
0< max ai+1/2 . ≤ 1. (23)
i∈{1,...,J−1} ∆x
Question : Give the expression of f 0 (hni ), then apply the nite volume
scheme with a scilab code to get the evolution of z + h as a function
of x (plot z and z + h at dierent time steps) with the following data.
Data : S0 = 0.005, n = 0.02, J = 200 the number of cells in space,

L = 1000m the length of the domain, T = 300s the duration of the


event, the initial condition h(0, x) = h0 (x) = 0.7105m. Downstream
consider an open boundary hn+1 J+1 = hJ
n+1
and upstream an imposed
discharge
2 + sin(πt/10) if t < 10s

q(t, 0) = (24)
2 else
For the upstream boundary, do not forget to transform (24) into a
function h(t, 0) thanks to the function from question 2. of this section
in order to get your boundary condition.

You might also like