Finite Volumes IMWE
Finite Volumes IMWE
1 Preliminary considerations 3
1.1 Study of the movement of a fluid . . . . . . . . . . . . . . . . 3
1.2 Number of dimensions of the model . . . . . . . . . . . . . . . 4
1.3 Discretization techniques . . . . . . . . . . . . . . . . . . . . . 4
1.4 Systems of hyperbolic equations . . . . . . . . . . . . . . . . . 5
1.5 The Shallow Water Equations . . . . . . . . . . . . . . . . . . 5
1
CONTENTS 2
5 Some results 42
5.1 Types of boundary conditions . . . . . . . . . . . . . . . . . . 42
5.2 One dimensional problems . . . . . . . . . . . . . . . . . . . . 42
5.2.1 Straight channel with slope and bottom friction . . . . 43
5.2.2 Channel with an obstacle on the bottom . . . . . . . . 46
5.2.3 Dam break . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2.4 Dam break with reflection . . . . . . . . . . . . . . . . 49
5.3 Two dimensional problems . . . . . . . . . . . . . . . . . . . . 52
5.3.1 Partial Dam Break . . . . . . . . . . . . . . . . . . . . 52
5.3.2 Flow in a fishway . . . . . . . . . . . . . . . . . . . . . 55
References 61
Chapter 1
Preliminary considerations
3
CHAPTER 1. PRELIMINARY CONSIDERATIONS 4
variables produce, similarly to the LES case, some terms called Reynolds
stresses. The effect of these stresses can be modeled by estimating a turbu-
lent viscosity, for which a turbulence model is needed.
2.1 Introduction
The aim of this chapter is to show the main aspects of the method in one
spatial dimension. First, several commonly used terms are defined and some
basic concepts in numerical modeling are introduced or reminded. To de-
scribe some of the techniques, simple equations in 1D are used, such as the
transport equation. In order to facilitate the application of the method to
the particular case of the shallow water equations, the final chapter defines
some terms commonly used in open channels hydraulics.
7
CHAPTER 2. ONE DIMENSIONAL APPROACH 8
volume fixed in space, which is crossed by the moving fluid, they are said
to be written in conservative form, this is the way that most resembles a
flow balance of mass and momentum [7, pg. 19]. If the control volume moves
with the fluid, so always contains the same particles, the non conservative
form is obtained [4, pg. 16]. A conservation law in conservative form is
written
Ut + Fx = 0, U = U(x, t), F = F(U). (2.1)
U is called Variables Vector and F(U) Flux Functions Vector. When ex-
pressing the conservation laws in differential form, it is assumed that the
solutions satisfy the relevant requirements of regularity.
Example 1 (scalar): The Transport equation (linear advection equation).
∂u ∂f
+ = 0 u = u(x, t), f (u) = au, a = constant. (2.2)
∂t ∂x
Example 2 (scalar): Burgers equation.
∂u ∂f 1
+ = 0 u = u(x, t), f (u) = u2 . (2.3)
∂t ∂x 2
Example 3 (system of conservation laws): the one-dimensional shallow
water equations.
( )
h hu
U= , F(U) = . (2.4)
hu hu2 + 21 gh2
d=at
uL uL
uR uR
x=0 x=0
t
certain value. To know the position R u
ofu the point where the variable initially R
∗ ∗
took the same value, we gox=0 down the curve passing throughx=0 (x , p ) to find
the horizontal axis (Figure 2.2). The result, unsurprisingly, is x = x∗ − at∗ .
(x*,t*)
t
∂u n 1 ∂ 2 u n 2
un+1
i = uni + 4t + 4t + O(4t3 ) (2.16)
∂t i 2 ∂t2 i
∂u n un+1
i − uni 1 ∂ 2 u n
= − 4t + O(4t2 ), (2.17)
∂t i 4t 2 ∂t2 i
which is a first order forward discretization. Also
∂u n 1 ∂ 2 u n 2 1 ∂ 3 u n 3
uni+1 = uni + 4x + 4x + 4x + O(4x4 ), (2.18)
∂x i 2 ∂x2 i 6 ∂x3 i
∂u n 1 ∂ 2 u n 2 1 ∂ 3 u n 3
uni−1 = uni − 4x + 4x − 4x + O(4x4 ), (2.19)
∂x i 2 ∂x2 i 6 ∂x3 i
and subtracting these two equations, we obtain a space centered second order
discretization
∂u n uni+1 − uni−1 1 ∂ 3 u n 2 3
= − 3 4x + O(4x ). (2.20)
∂x i 24x 6 ∂x i
Then equation (2.15) can be written in discretized form as
un+1
i − uni uni+1 − uni−1
+a =0 (2.21)
4t 24x
from which the following numerical algorithm results
1 a4t n
un+1 = uni − (u − uni−1 ). (2.22)
i
2 4x i+1
This scheme, first order in time and second in space is called Euler explicit
scheme and it can be shown that is unconditionally unstable [27, pg. 163].
CHAPTER 2. ONE DIMENSIONAL APPROACH 12
∂u n uni − uni−1
= , (2.23)
∂x i 4x
∂u n uni+1 − uni
= , (2.24)
∂x i 4x
from which only one is successful, depending on the sign of the speed a of
the wave. If a > 0, the option (2.23) together with (2.17) results
un+1
i − uni uni − uni−1
+a =0 (2.25)
4t 4x
from where
un+1
i = uni − c(uni − uni−1 ), (2.26)
being
a4t
c= , (2.27)
4x
This scheme proves to be stable [27, pg. 164] provided that
0 ≤ c ≤ 1. (2.28)
un+1
i = uni − c(uni+1 − uni ), (2.29)
∂u 1 ∂ 2 u
ui−1 = ui − 4x + 4x2 + O(4x3 ), (2.34)
∂x i 2 ∂x2 i
whence, multiplying by a and rearranging, we obtain
∂u 1 ∂ 2 u ui − ui−1
a − a4x 2 = a + O(4x2 ). (2.35)
∂x i 2 ∂x i 4x
That is, the expression
ui − ui−1
a , (2.36)
4x
which represents a first order discretization of (2.32), is simultaneously a
second order discretization (thus more accurate) of
∂u a4x ∂ 2 u
a − = 0, (2.37)
∂x 2 ∂x2
containing a diffusive term with a coefficient a4x/2.
CHAPTER 2. ONE DIMENSIONAL APPROACH 14
becomes Z xi+ 1
2 ∂u
dx + f (u(xi+ 1 , t)) − f (u(xi− 1 , t)) = 0. (2.41)
xi− 1 ∂t 2 2
2
Since the interval ends xi± 1 do not depend on time, we can write
2
Z x 1
∂ i+ 2
u(x, t)dx + f (u(xi+ 1 , t)) − f (u(xi− 1 , t)) = 0. (2.42)
∂t x 1 2 2
i− 2
We define uni as the spatial average of the function u(x, t) in the interval Ii ,
at time tn = n4t, i.e.
Z x 1
n 1 i+ 2
ui = u(x, tn )dx, (2.43)
4x x 1
i− 2
Integrating (2.42) between tn and tn+1 , the time derivative disappears from
the first term, resulting
Z x 1
i+ 2
[u(x, tn+1 ) − u(x, tn )] dx
xi− 1
2
Z tn+1 h i
+ f (u(xi+ 1 , t)) − f (u(xi− 1 , t)) dt = 0 (2.44)
2 2
tn
and we see that the value of u in Ii only changes along time 4t due
to the value of the flux f at the ends of Ii . Then, using (2.43),
Z tn+1 h i
n+1 n
ui − ui 4x + f (u(xi+ 1 , t)) − f (u(xi− 1 , t)) dt = 0. (2.45)
2 2
tn
so we get
4t n
un+1
i = uni − n
fi+ 1 − fi− 1 . (2.47)
4x 2 2
2.6.3 Convergence
The algorithm (2.47) allows us to obtain variable values forward in time. To
provide a good approximation of the law of conservation, the algorithm must
be convergent. which means that the numerical solution converges to the
solution of the differential equation when 4x, 4t → 0.
Convergence is ensured with two requirements: consistency and stabil-
ity. Indeed, Lax Theorem states that a consistent and stable scheme is
convergent. We will briefly discuss both.
Usually, continuity for the variable u is also required, i.e. φ(uni−1 uni ) → f (v),
when uni−1 , uni → v [20, pg. 68].
CHAPTER 2. ONE DIMENSIONAL APPROACH 17
since fluxes at cell boundaries cancel each other, except for flows at the ends
x = xN − 1 and x = xM + 1 .
2 2
The interest of conservative schemes is that, as the Theorem of Lax-
Wendroff [15, pg. 168] says, if a consistent conservative scheme converges,
the result is a weak solution of the equation. In contrast, non-conservative
schemes may not converge to the correct solution, if a shock wave is present
[27, pg. 170]. Two examples of conservative schemes are the Godunov and
Lax-Friedrichs schemes.
We may say that the Lax-Wendroff theorem “continues” Lax’s Theorem.
That is, a scheme consistent, stable and conservative converges at a weak
solution of the equation.
The algorithm (2.47) can also be seen as a finite difference approximation
of the conservation law (2.38), as this law can be discretized as
n n
un+1 − uni fi+ 1 − f
i 2
i− 12
+ = 0, (2.52)
4t 4x
n n
where fi+ 1,f
i− 1
are approximations of the value of f at the endpoints.
2 2
CHAPTER 2. ONE DIMENSIONAL APPROACH 18
∂u + ∂f = 0,
∂t ∂x
(2.53)
n
ui−1 , x < 0,
u(x, 0) = u0 (x) =
uni , x > 0,
∂u + ∂f = 0,
∂t ∂x
(2.54)
n
ui , x < 0,
u(x, 0) = u0 (x) =
uni+1 , x > 0.
Let ũ(x, t) be the combined solution of RP (uni−1 , uni ) and RP (uni , uni+1 )
in Ii . Since ũ(x, t) is the exact solution of the conservation law (2.38), we
introduce it in the integral form (2.44), with spatial and temporal domains,
respectively
Ii = [xi− 1 , xi+ 1 ], In = [0, 4t] , (2.55)
2 2
obtaining
Z xi+ 1 Z xi+ 1
2 2
e(x, 4t)dx =
u u
e(x, 0)dx
xi− 1 xi− 1
2 2
Z 4t Z 4t
− f (e
u(xi+ 1 , t))dt + f (e
u(xi− 1 , t))dt = 0. (2.56)
2 2
0 0
CHAPTER 2. ONE DIMENSIONAL APPROACH 19
4t n
un+1
i = uni − n
fi+ 1 − fi− 1 , (2.58)
4x 2 2
being Z 4t
1
f i± 12 = f (ũ(xi± 1 , t))dt. (2.59)
4t 0
2
The integrand in (2.59) depends on the exact solution to the Riemann Prob-
lem, at each end of the cell, along the time axis (in local coordinates, then
at x = 0). This is represented as
whereby
fi± 1 = f (ui± 1 (0)). (2.61)
2 2
If, for instance, the flux function is f (u) = au, a > 0, it results
(if, instead, we take a < 0 the result is auni on the left boundary and auni+1
on the right). Replacing in (2.58), we arrive at
4t a4t n
un+1 = uni + (auni−1 − auni ) = uni − (u − uni−1 ), (2.63)
i
4x 4x i
case of the quasi-linear Burgers equation may be seen. Finally, the spatial
averaging of the dependent variables in each cell is performed.
To simplify the process, different authors [16, 23, 30] have used schemes
called approximate Riemann solvers, which they have applied to com-
pressible fluids. These schemes have been extended later [2, 14, 29, 31] to free
surface flows with very good results (in [20] different approximate Riemann
solvers are described). While it is true that these schemes will replace the
exact solution of the Riemann problem by an approximate one, the infor-
mation provided by the exact solution is partially lost in any case, due to
spatial averaging in each cell, which makes less significant the error in the
approximation [8].
In the conservative scheme of Lax-Friedrichs the fluxes at the ends are
calculated as
+ c f (un ) + c − 1 f (un ),
fi+ 1 = 1 2c
2
i 2c i+1
(2.64)
1 + c n c − 1
fi− 1 = 2c f (ui−1 ) + 2c f (ui ), n
2
where c takes the value given by (2.27). If f (u) = au and we replace (2.64)
in equation (2.47), the finite differences scheme (2.31) of Lax-Friedrichs is
obtained.
where U is the variables vector and Am×m a constant matrix. The system
is called hyperbolic if A is diagonalizable, i.e. if it has m real eigenvalues
λi and m eigenvectors linearly independent ki . It is strictly hyperbolic if all
the eigenvalues are different.
Calling Λ the diagonal matrix of eigenvalues and X the matrix whose
columns are the eigenvectors ki , it holds
A = XΛX−1 . (2.69)
from where
Vt + ΛVx = 0. (2.72)
Thus the system in canonical or characteristic form has been obtained.
Each of the resulting m uncoupled equations have only one variable involved
∂vj ∂vj
+ λj =0 j = 1, 2 . . . m, (2.73)
∂t ∂x
CHAPTER 2. ONE DIMENSIONAL APPROACH 22
and take the form of the 1D transport equation. Thus, the system can be seen
as a combination of m waves traveling at their characteristic velocities
given by the m eigenvalues λj . These eigenvalues (or characteristic values)
define the characteristic curves x(t) = x0 + λj t, (see 2.3, along which the
information corresponding to each one of the characteristic variables {vj }
propagates.
With the above said we have made a basis change to the set of eigenvectors
ki . The characteristic variables can be interpreted then as the components
of the variables vector U in the reference system formed by the eigenvectors
(being X−1 the basis change matrix) or, what is the same, as the projections
of the vector U on the eigenvectors.
After solving the system (2.73), the values U can be obtained from the
relationship (2.70). For example, let us consider the system
u1 2u1
Ut + Fx = 0, U = , F= (2.74)
u2 u1 + u2
which, by applying the rule of the chain, changes to
u1 2 0
Ut + AUx = 0, U = , A= . (2.75)
u2 1 1
From matrix A we obtain
1 0 −1 1 0
λ1 = 2, λ2 = 1, X = , X = . (2.76)
1 1 −1 1
Then, using the base change (2.70), the characteristic variables are found to
be
v1 1 0 u1 u1
= = , (2.77)
v2 −1 1 u2 u2 − u1
and, using these variables, we obtain the decoupled system
∂v1 ∂v1
+2 =0 (2.78)
∂t ∂x
∂v2 ∂v2
+1 = 0. (2.79)
∂t ∂x
Then, if the initial condition of the problem is
v1 (x, 0) = v10 (x); v2 (x, 0) = v20 (x), (2.80)
the system solution will be, as in (2.10)
v1 (x, t) = v10 (x − 2t), v2 (x, t) = v20 (x − t), ∀x ∈ R, ∀t ≥ 0 (2.81)
and we can undo the variables change by using the matrix X
u1 1 0 v1 v1
= = . (2.82)
u2 1 1 v2 v1 + v2
CHAPTER 2. ONE DIMENSIONAL APPROACH 23
Ut + AUx = 0
can decouple, becoming m equations (2.73), each one involving a single vari-
able. But the non-centered conservative scheme studied in the scalar case
(2.38) can only be applied to this system if all eigenvalues have the same sign.
Then, in a general case, with eigenvalues of both signs, we will discretize up-
wind for the positive ones and downwind for the negatives. The practical
way to accomplish this is to decompose the matrix A into two, one with
positive or zero eigenvalues and the other with negative or zero eigenvalues.
Scheme CIR. Calling
+ λj si λj ≥ 0,
λj = (2.83)
0 si λj < 0,
− λj si λj ≤ 0,
λj = (2.84)
0 si λj > 0,
the CIR scheme (2.26) applied to a decoupled hyperbolic linear system (in
canonical form) is
4t + 4t −
{vj }n+1
= {vj }ni − λ {vj }ni − {vj }ni−1 − λ {vj }ni+1 − {vj }ni ,
i 4x j 4x j
j = 1, 2 . . . m.
(2.85)
Let Λ be the diagonal matrix of eigenvalues λj , Λ of the λj , Λ of the λ−
+ + −
j
and |Λ| of the absolute values |λj |. It holds
Λ = Λ+ + Λ− , (2.86)
|Λ| = Λ+ − Λ− . (2.87)
If we define
it results
A+ + A− = A, (2.91)
A+ − A− = X |Λ| X−1 = |A| . (2.92)
CHAPTER 2. ONE DIMENSIONAL APPROACH 24
And the CIR scheme can be written then in vector form, either in terms of
characteristic variables
4t + n 4t − n
Vin+1 = Vin − n
Λ (Vi − Vi−1 )− Λ (Vi+1 − Vin ), (2.93)
4x 4x
or -by means of the matrix X - in terms of the starting variables
4t + n 4t − n
Un+1
i = Uni − A (Ui − Uni−1 ) − A (Ui+1 − Uni ). (2.94)
4x 4x
The Godunov first order upwind scheme uses the conservative formula anal-
ogous to (2.58)
n+1 n 4t n n
Ui = Ui − Fi+ 1 − Fi− 1 , (2.96)
4x 2 2
where, similarly to (2.61), the flux terms of the cell borders are
Fi± 1 = F Ui± 1 (0) , (2.97)
2 2
being Ui− 1 (0) and Ui+ 1 (0) the solutions of RP (Uni−1 , Uni ) and RP (Uni , Uni+1 )
2 2
respectively.
Numerical flows at the ends of the interval are calculated from the values
of F and U in the anterior and posterior points yielding the expressions [27,
pg. 185]
1 n 1
Fi + Fni+1 − |A| Uni+1 − Uni ,
Fi+ 1 = (2.98)
2 2 2
1 n 1
Fi−1 + Fni − |A| Uni − Uni−1 ,
Fi− 1 = (2.99)
2 2 2
where |A| takes the value given by (2.90).
That is, the resulting value for the flux vector at the left and right borders
of the cell is the mean of the values at the points (i − 1, i) and (i, i + 1)
respectively, with an upwinding term.
The Q- schemes use expressions like (2.98) and (2.99).
Chapter 3
ρV 2 L2 VL
Re = = . (3.1)
µV L ν
V and L are the characteristic velocity and length of the flow and ν is the
ratio between the dynamic viscosity and the density, called kinematic viscos-
ity. It is observed experimentally that for values below the so-called critical
Reynolds number the adjacent fluid layers slide over each other in an orderly
way, which is called laminar regime. In a laminar regime, if the boundary
conditions do not vary with time, the flux is permanent.
For values above critical Re, the flow behavior changes, becoming random
and chaotic. The movement becomes non permanent, even with constant
boundary conditions. It is called turbulent regime.
The random nature of turbulent flow and the high frequency with which
the magnitudes vary make extremely difficult in practice a complete descrip-
tion of the movement of all fluid particles. Let u, v, w the velocity components
and p the pressure. One can decompose a magnitude (for instance a velocity
component u) in the sum of its average value (u) and the turbulent fluc-
tuation (u0 ). A turbulent flow is then characterized by the average values
(u, v, w, p) and the statistical properties of the fluctuations (u0 , v 0 , w0 , p0 ).
Even in flows where average velocities and pressures vary only in one or
two spatial dimensions, the turbulent fluctuations are three-dimensional. If
25
CHAPTER 3. TWO-DIMENSIONAL FLOW EQUATIONS 26
Although it does not appear explicitly in the expression of ϕ and ϕ, both are
a function of the coordinates of the considered point (x, y, z).
The temporal average of ϕ(t), for a given point, can be defined in dif-
ferent ways. For the cases considered here, of unsteady flow we will use the
expression [21, pg. 278]
Z t+ 4t
1 2
ϕ(t) = ϕ(θ)dθ, (3.3)
4t t− 4t
2
where the choosen 4t must be greater than the time scale of the turbulence
and lower than the time scale of the average flow. For example, in an estuary
it can be considered that the period of the turbulent oscillation of the veloc-
ity is less than one second, while the tide period is about 12 hours. After
performing the time average (3.3), the mean flow continues oscillating under
the influence of the tide.
∂u ∂v ∂w
+ + = 0. (3.4)
∂x ∂y ∂z
du ∂u ∂u ∂u ∂u 1 ∂p
= +u +v +w = Fx − + ν∆u, (3.5)
dt ∂t ∂x ∂y ∂z ρ ∂x
dv ∂v ∂v ∂v ∂v 1 ∂p
= +u +v +w = Fy − + ν∆v, (3.6)
dt ∂t ∂x ∂y ∂z ρ ∂y
dw ∂w ∂w ∂w ∂w 1 ∂p
= +u +v +w = Fz − + ν∆w. (3.7)
dt ∂t ∂x ∂y ∂z ρ ∂z
The vector F = (Fx , Fy , Fz )T is the force per unit mass; p is the pressure; ρ
µ
is the density; ν = ρ is the kinematic viscosity, µ is the dynamic viscosity.
Adding to each of the three dynamic equations the continuity equation
multiplied by u, v and w respectively, and using the ∇ operator for divergence
and ∇2 for the Laplacian, the system takes the form
∇·u = 0, (3.8)
∂u 1 ∂p
+ ∇ · uu = Fx − ∇2 u,
+ ν∇ (3.9)
∂t ρ ∂x
∂v 1 ∂p
+ ∇ · vu = Fy − ∇2 v,
+ ν∇ (3.10)
∂t ρ ∂y
∂w 1 ∂p
+ ∇ · wu = Fz − ∇2 w.
+ ν∇ (3.11)
∂t ρ ∂z
been replaced by their time averages, the viscosity by the turbulent viscosity
νt = µt /ρ and a new addend has appeared in the source term, which is
negligible if we assume that the spatial variation of νt is very small.
hu hv
The variable h represents the depth measured vertically, u, v are the averages
in the vertical of the horizontal components of the velocity, f is the Coriolis
coefficient, τs evaluates the effect of wind, S0 and SF are the geometric and
frictional slopes.
∂zb ∂zb
S0x = − , S0y = − , (3.29)
∂x ∂y
√ √
n2 u u2 + v 2 n2 v u 2 + v 2
Sf x = , Sf y = . (3.30)
h4/3 h4/3
The two components of the turbulent term St have the following expressions
∂ ∂u ∂ ∂v ∂u
St1 = 2νt h + νt h + , (3.31)
∂x ∂x ∂y ∂x ∂y
∂ ∂v ∂u ∂ ∂v
St2 = νt h + + 2νt h . (3.32)
∂x ∂x ∂y ∂y ∂y
31
CHAPTER 4. APPLICATION TO THE 2D SWE 32
values and are used in the discretization- do not coincide with the nodes of
the original mesh.
The subcell Tij is the union of triangles AMI and MBI (see Figure 4.1). Their
areas are
kηijAM kdAM
ij kηijM B kdM
ij
B
Aij1 = , Aij2 = , (4.2)
2 2
where the values dij represent the triangle height.
K
Gi
I
Ci
Ti j I
A B
M B G
M ij
hijMB
A hijAM
J
it; and 3) the turbulent term is frequently not taken into consideration,
assuming that its effects are included in the bottom friction term.
Removing the mentioned addends from the source term the equations
(3.25)-(3.28) reduce to
∂U ∂F1 ∂F2
+ + = G, (4.3)
∂t ∂x ∂y
being
hu hv
h
U = hu , F1 = hu2 + 21 gh2 , F2 = huv , (4.4)
hv huv 2 1
hv + 2 gh2
0
G = gh(S0x − Sf x ) . (4.5)
gh(S0y − Sf y )
The geometric slopes, defined in terms of zb by (3.29) (see Fig.4.2), will be
expressed in terms of H, which represents the distance to the bottom from a
fixed reference level, positive downward. Thus the slopes are positive if the
ground descend and negative otherwise.
∂H ∂H
S0x = , S0y = . (4.6)
∂x ∂y
The friction slopes are
√ √
n2 u u2 + v 2 n2 v u 2 + v 2
Sf x = , Sf y = , (4.7)
h4/3 h4/3
where n is the Manning coefficient, h the depth and u, v the horizontal com-
ponents of the velocity. The conservative variables hu, hv represent the dis-
charge per unit width in a rectangular channel. In Figure 4.2 a section of
the domain by a vertical plane y = y0 is represented.
Z Water surface
h(x,y0,t)
H(x,y0)
Bottom surface
zb
The divergence theorem is applied to the second term, turning the surface
integral into a line integral along Γi , the cell border,
ZZ Z ZZ
∂U
dA + F · ηe dl = G dA. (4.11)
Ci ∂t Γi Ci
If the second term is moved to the other side and a minus sign is introduced
in the integral, it results
ZZ Z ZZ
∂U
dA = F · (−e
ηe) dl + G dA. (4.12)
Ci ∂t Γi Ci
in the domain [22, pg. 6.20]. That is, the variation in time of U is due to
the net flux of F towards the inside of the cell plus the variation due to the
source term.
Un+1 − Uni
ZZ Z ZZ
i
dA + F · ηe dl = GdA. (4.14)
Ci 4t Γi Ci
The surface integral of the source term splits into a sum of integrals over the
subcells Tij , j ∈ Ki
ZZ X ZZ
GdA = GdA. (4.17)
Ci j∈Ki Tij
Un+1
i − Uni X Z X ZZ
Ai + F · ηe dl = GdA. (4.18)
4t j∈K Γij j∈K Tij
i i
CHAPTER 4. APPLICATION TO THE 2D SWE 37
being |Λ| the diagonal matrix of the absolute values of the eigenvectors of Q
and X the matrix whose columns are the eigenvectors of Q; in the Van Leer
Q-scheme, |Q| is evaluated in the intermediate state
Uni + Unj
UnQ = . (4.23)
2
Then, expression (4.20) that discretizes the 2D flux in the middle point be-
tween I and J is obtained as the mean value of the fluxes at both points plus
an upwinding term.
Note that in (4.21), the derivatives of F1 and F2 with respect to the
variables vector U are the factors that appear when writing the equation
(4.3) in the nonconservative form.
The shallow water equations are a strictly hyperbolic system (see 2.7), i.e.
the flux Jacobian matrix has three different eigenvalues and three linearly
independent eigenvectors, so there will always be X−1 . Indeed
0 1 0
dF1
= −u2 + gh 2u 0 , (4.25)
dU
−uv v u
0 0 1
dF2
= −uv v u , (4.26)
dU 2
−v + gh 0 2v
λ1 = α
eu + βv,
e
λ2 = λ1 + c, (4.29)
λ3 = λ1 − c,
0 1 1
(e
α, β)
e and dij take the values given by expressions (4.1) and (4.2) and the
friction slopes aregiven by (4.7). The sum of (4.17) is then expressed as
X ZZ X
G dA ≈ Aij ψ nij , (4.39)
j∈Ki Tij j∈Ki
where Aij takes the expressions given in (4.2) for each subtriangle of the
subcell Tij and ψ nij is calculated from (4.35). Note that dij represents the
distance from I to the edge AM .
min (4x)i
4t ≤ , (4.40)
max (|u| + c)i
being (4x)i the cell width, u the velocity and c the celerity.
For the 2D case, [1, pg. 233] proposes
!
Dij
4t ≤ min √ , (4.41)
2( u2 + v 2 + c)ij
being Dij the distances beween node I and its four neighborgs. This has
been the formula used in the present work.
CHAPTER 4. APPLICATION TO THE 2D SWE 41
4.5 Algorithm
A forward discretization of the time derivative and two others for the flux
and source terms, which are evaluated at time tn have been obtained. Thus
(4.18) now takes the form
Un+1
i − Uni X X
Ai + φnij =
kηη ij kφ Aij ψ nij , (4.42)
4t j∈K j∈K
i i
from where
!
4t X X
Un+1
i = Uni + Aij ψ nij − φnij
kηη ij kφ . (4.43)
Ai j∈Ki j∈Ki
The above expression provides a explicit in time iterative method for cal-
culating the value of the variables vector U on each node I and in every
moment, from the variables values in the previous time, on the same node I
and the Nj , j ∈ Ki that surround it.
Chapter 5
Some results
42
CHAPTER 5. SOME RESULTS 43
n0.6 q 0.6
yn = = 1.47 m, (5.2)
S00.3
n0.6 q 0.6
yn = = 0.94 m, (5.3)
S00.3
The initial conditions are the same in the three cases: still water and hori-
zontal flow profile corresponding to the downstream depth hbc . The results
obtained in the tests coincide with those of [32].
CHAPTER 5. SOME RESULTS 47
problem, with dry bottom, the depths at time t = 15 s are shown in Figure
5.9
In both cases the result is a good approximation of the exact solution for
1D, obtained from [28]. The analytical solutions can be found in[31, pg. 60]
and its obtaining in [25, pgs. 308 y 333].
Exacta Calculada
1.1
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 50 100 150 200
199 0 0 0 0
200 0 0 0 0
Exacta Calculada
1.1
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 50 100 150 200
0.4 0.4
0.4
0.2
0.2 0.2
0
0 0
0 10 20 30 40 50
0 10 20 30 40 50 0 10 20 30 40 50
0 0 0
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
0 0 0
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
0 0 0
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
0 0 0
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
0 0 0
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
• Depth: upstream
Frame 001 22 Apr 2004 ROTURA_P5 , DELTAT=
.310000, N= 23
H1 = 10 m and downstream H0 = 5 m.
Z
• Depth: upstream H1 = 5 m and downstream H0 = 0 m.
In Figure 5.12 a wavefront can be seen that, after a time t = 7.1 s, reaches
Y X
the right side of the contour. Figure 5.13 represents the velocity field. The
wavefront in Figure 5.14 is clearly different, due to dry bed condition. Finally
(Figure 5.15) shows the mesh used in both cases.
10
8
H
6
200
150
200
150 100
X
100 50
50
Y 0
0
200
175
150
125
100
Y
75
50
Frame 001 22 Apr 2004 ROTURA_P6 , DELTAT= .310000, N= 23
25
Z
0 X
0 50 100 150 200 Y
X
4
H
200
0
150
200
150 100
X
100 50
50
Y 0
0
200
175
150
125
100
Y
75
Frame 001 27 Apr 2004 EscalaPcs3,CICLO= 1,ITKE= 0,TIEMPO= 23.3137 TIEMKE= 0.0000,RNUCTE=0.000000
50
25
0
0 50 100 150 200
X
0.8
0.6
Y
0.4
0.2
1
Y
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
X
Figure 5.19: Fishway. Velocities.
Frame 001 27 Apr 2004 EscalaPcs3,CICLO= 1,ITKE= 0,TIEMPO= 23.3137 TIEMKE= 0.0000,RNUCTE=0.000000
1.5
VM: 0.05 0.125 0.2 0.275 0.35 0.425 0.5 0.575 0.65 0.725 0.8 0.875 0.95
1
Y
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
X
Figure 5.20: Fishway. Velocity modulus.
1.5
H: 0.165 0.17 0.175 0.18 0.185 0.19 0.195 0.2 0.205 0.21 0.215 0.22 0.225 0.23 0.235
1
Y
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
X
Figure 5.21: Fishway. Depths.
CHAPTER 5. SOME RESULTS 58
0.8
0.6
Y
0.4
Frame 001 27 Apr 2004
0.2
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
X
Figure 5.22: Fishway, pool 1. Computational velocities.
0.8
0.6
Y
0.4
0.2
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
X
Figure 5.23: Fishway, pool 1. Measured velocities.
CHAPTER 5. SOME RESULTS 59
VM
0.8 0.95
0.875
0.8
0.725
0.65
0.575
0.6 0.5
0.425
0.35
Y
0.275
0.2
0.4 0.125
0.05
Frame 001 19 Oct 2004
0.2
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
X
Figure 5.24: Fishway, pool 1. Computational velocity modulus.
VM
0.8 0.95
0.875
0.8
0.725
0.65
0.575
0.6 0.5
0.425
0.35
Y
0.275
0.2
0.4 0.125
0.05
0.2
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
X
Figure 5.25: Fishway, pool 1. Measured velocity modulus.
Frame 001 27 Apr 2004 EscalaPcs3,CICLO= 1,ITKE= 0,TIEMPO= 23.3137 TIEMKE= 0.0000,RNUCTE=0.000000
0.8 H
0.235
0.23
0.225
0.22
0.215
0.21
0.205
0.6 0.2
0.195
0.19
0.185
0.18
Y
0.175
0.17
0.165
0.4
0.2
Frame 001 27 Apr 2004
0.8 H
0.235
0.23
0.225
0.22
0.215
0.21
0.205
0.6 0.2
0.195
0.19
0.185
0.18
0.175
Y
0.17
0.165
0.4
0.2
[4] Anderson, J.D.; Degrez, G.; Dick, E. & Grundmann, R. (1996), Com-
putational fluid dynamics. An introduction, Wendt, J.F. (ed.), Springer.
[5] Bermúdez, A.; Dervieux, A.; Desideri, J. & Vázquez, M.E. (1998), Up-
wind schemes for the two dimensional shallow water equations with vari-
able depth using unstructured meshes, Computer Methods in Applied
Mechanics and Engineering 155, 49-72.
[6] Brigham Young University (1996), User´s guide to RMA2 version 4.3
Salt Lake City, EEUU.
[8] Caleffi, V., Valiani, A. & Zanni, A. (2003), Finite volume method for
simulating extreme flood events in natural channels, Journal of Hydraulic
Research, 41 , 2, 167-177.
[9] Chaudhry, M.H. (1993), Open channel flow, Prentice Hall, New Jersey.
61
REFERENCES 62
[11] DHI Software (2001), MIKE 21: A modelling system for estuaries,
coastal waters and seas, Danish Hydraulic Institute Water and Envi-
ronment, Horsholm, Denmark.
[12] Donea, J. & Huerta, A. (2003), Finite element methods for flow prob-
lems, John Wiley & Sons, Chichester, England.
[13] Eymard, R.; Gallouët, T. & Herbin, R. (1997), Finite volume methods,
Prepublication n0 97-19 of LATP, umr 6632, Marseille. To appear in
Handbook of Numerical Analysis, P.G. Ciarlet and J.L. Lions eds.
[16] Harten, A.; Lax, P. & Van Leer, B. (1983), On upstream differencing and
Godunov-type schemes for hyperbolic conservation laws, SIAM Rev. 25,
35-61 (en Upwind and high-resolution schemes, Springer, Berlin 1997).
[19] Idelsohn, S.R. & Oñate, E. (1993), Finite volumes and finite elements:
two good friends, International Journal for Numerical Methods in Engi-
neering 37, 19, 3323-3341.
[23] Roe, P.L. (1981), Approximate Riemann solvers, parameter vectors and
difference schemes, Journal of Computational Physics, 43, 357-372.
REFERENCES 63
[25] Stoker, J.J. (1992), Water waves. The mathematical theory with appli-
cations, John Wiley & Sons, New York.
[27] Toro, E.F. (1997), Riemann solvers and numerical methods for fluid
dynamics. A practical introduction, Springer, Berlin.
[28] Toro, E.F. (2000), Numerica. A library of source codes for teaching,
research and applications, Numeritek Ltd., Cheshire.
[33] Wright, N. (2001), Conveyance implications for 2-D and 3-D modelling.
Scoping study for reducing uncertainty in river flow conveyance, HR
Wallingford.
[34] Zienkiewicz, O.C. & Heinrich, J.C. (1979), A unified treatment of steady-
state shallow water and two dimensional Navier-Stokes equations. Finite
element penalty function approach, Computer Methods in Applied Me-
chanics and Engineering 17/18, 673-698.
[35] Zienkiewicz, O.C. & Oñate, E. (1990), Finite volumes vs. finite elements.
Is there really a choice?, CIMNE, Barcelona.