lecture 7 finite volume methods and riemann problem solvers · finite volume conservative methods...

34
Lecture 7 Finite Volume methods and Riemann Problem solvers D. Vanzo, A. Siviglia Laboratory of Hydraulics, Hydrology and Glaciology (VAW) ETH ZZ¨ urich [email protected] HS19 D. Vanzo, A. Siviglia (ETH Z¨ urich) Lecture notes HS19 1 / 34

Upload: others

Post on 22-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Lecture 7Finite Volume methods and Riemann Problem solvers

D. Vanzo, A. Siviglia

Laboratory of Hydraulics, Hydrology and Glaciology (VAW)ETH ZZurich

[email protected]

HS19

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 1 / 34

Page 2: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Table of contents I

1 Finite volume conservative methodsIntegral form of hyperbolic systemsConservative numerical methodsCentred methods

The Lax-Friedrichs methodThe Lax-Wendroff methodThe FORCE centred method

The Godunov methodThe Riemann Problem

MotivationExact solution of the Riemann ProblemApproximate solution of the Riemann Problem

2 Exercise

3 Reference Textbooks

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 2 / 34

Page 3: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods

Time and space discretisation in 1D

The discretisation process consists of transforming the originally continuous time and spacecoordinates into discrete variables (see Figure).

Figure 1: Discretization of time and space in the one-dimensional case.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 3 / 34

Page 4: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods

Time and space discretization in 1D

A set of points (called the calculation points) is defined in time and space by the modeler. Thesolution is calculated at these points. The governing equations are approximated using thedifferences between the known and unknown values of the calculation solution at the predefinedpoints. Denoting by Un

i the solution at the calculation point xi at the calculation time tn, the

following difference may be seen as a good approximation of the derivative ∂U∂x

over the interval[xi , xi+1] at the time tn.

Uni − Un

i−1

xi − xi−1

This is not the only possible choice. Many alternative formulations may be proposed. Theaccuracy of the numerical solution depends on the accuracy with which the governing equationsare approximated. Approximation methods where the differences between the point values areused to estimate the derivatives are referred to as finite difference methods.In what follows, the distance between points i and i + 1 is denoted by ∆x . It is often referred toas the grid spacing, or cell width. The difference between two successive calculation times tn andtn+1, also called the calculation time step, is usually denoted by ∆t. The time tn is usuallyreferred to as time level n.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 4 / 34

Page 5: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Integral form of hyperbolic systems

Integral form

Consider the following one-dimensional conservation law:

∂U

∂t+∂F

∂x= 0

This is called the differential form of the conservation law and is valid only for the case in whichthe solution is smooth throughout. This equation is based on the assumption that the solution iscontinuous and differentiable with respect to time and space.In the presence of discontinuities, one must use the integral form.

∮[Udx − F (U)dt] = 0 (1)

where the line integration is performed along the boundary of the domain in counterclockwisemanner.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 5 / 34

Page 6: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Integral form of hyperbolic systems

Integral form of hyperbolic systems

We choose a rectangular control volume Vi inthe x − t plane (see the figure), of dimension

[xi− 12, xi+ 1

2]× [tn, tn+1]

By integrating along the boundary of the controlvolume:

Figure 2: Control volume in the x − t space.

xi+ 1

2∫x

i− 12

[U(x , tn)dx +

xi− 1

2∫x

i+ 12

[U(x , tn+1)dx −

tn+1∫tn

[F (U(xi+ 12, t))]dt +

tn∫tn+1

[F (U(xi− 12, t))]dt

= 0

xi+ 1

2∫x

i− 12

[U(x , tn+1)dx =

xi+ 1

2∫x

i− 12

[U(x , tn)dx −

tn+1∫tn

F (U(xi+ 12, t))dt −

tn+1∫tn

F (U(xi− 12, t))dt

(2)

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 6 / 34

Page 7: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Conservative numerical methods

Derivation of conservative numerical formulation

Let us now define the mesh size ∆xi and the time step ∆t:

∆xi = xi+ 12− xi− 1

2, ∆t = tn+1 − tn

We divide through ∆xi and multiply the whole of the second term within the square brackets onthe right-hand side by ∆t/∆t:

1

∆xi

xi+ 1

2∫x

i− 12

U(x , tn+1)dx =1

∆xi

xi+ 1

2∫x

i− 12

[U(x , tn)dx−∆t

∆xi ∆t

tn+1∫tn

F (U(xi+ 12, t))dt −

tn+1∫tn

F (U(xi− 12, t))dt

(3)

We define integral averages of U(x , t) at times t = tn+1 and t = tn respectively over the length∆xi (it is a length in the one-dimensional case, in general it is a volume):

Un+1i =

1

∆xi

xi+ 1

2∫x

i− 12

U(x , tn+1)dx , Uni =

1

∆xi

xi+ 1

2∫x

i− 12

U(x , tn)dx (4)

We also define time integral averages of the flux F (U) at position x = xi+ 12

and x = xi− 12

:

Fi+ 12

=1

∆t

tn+1∫tn

F (U(xi+ 12, t))dt, Fi− 1

2=

1

∆t

tn+1∫tn

F (U(xi− 12, t))dt (5)

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 7 / 34

Page 8: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Conservative numerical methods

This is the update formula to be used for the numerical integration of the Saint-Venant equations

Un+1i = Un

i −∆t

∆xi

[Fi+ 1

2− Fi− 1

2

]UPDATE FORMULA (6)

N.B.

U is the vector of unknowns while F is the vector of fluxes, therefore we have two updateformulae, one for each variable, i.e.:

hn+1i = hn

i −∆t

∆x

[(uh)i+ 1

2− (uh)i− 1

2

](7)

qn+1i = qn

i −∆t

∆x

[(hu2 +

1

2gh2

)i+ 1

2

−(

hu2 +1

2gh2

)i− 1

2

](8)

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 8 / 34

Page 9: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Conservative numerical methods

Conservative numerical methods

Substituting the definitions (4) and (5) in the equation (3), we obtain the formula that constitutethe basis of conservative numerical methods:

Un+1i = Un

i −∆t

∆xi

[Fi+ 1

2− Fi− 1

2

]UPDATE FORMULA (9)

So far the derived expressions are exact expressions and do not involve numerical approximations.However the formula (9) can be interpreted in a numerical sense, if the complete spatial domainis discretized into a set of control volumes Ii = [xi− 1

2, xi+ 1

2] called cells, i = 1, 2, ...,m. The term

Fi+ 12

is called the inter-cell numerical flux corresponding to the inter-cell boundary at x = xi+ 12

between cells i and i + 1 . In general the numerical flux is of the form

Fi+ 12

= Fi+ 12

(Un

i−KL, ...,Un

i+KR

), where the non-negative integers KL and KR depend on the

particular choice of the numerical flux.

Conservative methods obeys to the so called telescopy property. This says that the intercell fluxFi+ 1

2used to update the cell average Un+1

i must be identical to the intercell flux Fi− 12

used to

update Un+1i+1 , so on summation of Un+1

i and Un+1i+1 , the flux at the boundary between the cells i

and i + 1 cancels out.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 9 / 34

Page 10: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Conservative numerical methods

Finite volume approximation

Figure 3: Finite volume approximation and the resulting Riemann problems at interfaces.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 10 / 34

Page 11: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Conservative numerical methods

Classes of conservative methods

The conservative numerical methods for solving the general initial-boundary value problem for thehyperbolic system are of two distinct classes:

the centred or symmetric methods, that do not explicitly require the provision of wavepropagation information to construct the numerical schemes, i.e. they do not require theexplicit solution of the Riemann Problem. These schemes are then simple to understand andto implement, particularly for complicated hyperbolic system, as for example theSaint-Venant-Exner model.

the upwind methods, or Godunov-type methods, that use the wave propagation information,essential property of the hyperbolic partial differential equations, to construct the numericalschemes. This is achieved in various ways. At the highest level one solves local Riemannproblem exactly; at the lowest level one provides a minimum of information on wavepropagation directions, perhaps just the sign of a single wave at each intercell boundary.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 11 / 34

Page 12: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Centred methods

Centred methods: Lax-Friedrichs

Here we present schemes that do not require the (explicit) solution of the Riemann problem.These schemes are not biased by the wave propagation direction, which distinguishes upwindmethods, and are called centred or symmetric schemes.

Numerical schemes may be obtained from the conservative formula(9) by giving appropriatedefinitions for the inter-cell flux Fi+ 1

2. The Lax-Friedrichs method results if we choose:

FLFi+ 1

2

=1

2

[F(Un

i+1) + F(Uni )]−

1

2

∆x

∆t

(Un

i+1 − Uni

)(10)

This first-order accurate scheme is exceedingly simple to implement but, as is well known, is toodiffusive to be used in practical computations. The scheme is monotone and has linearisedstability condition:

∆t ≤CFL ∆x

|u|+√

gh

with CFL = 0.9 in practical computations.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 12 / 34

Page 13: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Centred methods

Centred methods: Lax-Wendroff

The Lax-Wendroff method results if we choose:

FLWi+ 1

2

= F

(U

n+ 12

i+ 12

), (11)

with

Un+ 1

2

i+ 12

=1

2(Un

i + Uni+1)−

1

2

∆t

∆x

[F(Un

i+1)− F(Uni )], (12)

The two-step Lax-Wendroff scheme is not monotone!!! This scheme is second-order accurate andis not monotone and thus produces spurious oscillations in the vicinity of high gradients, such asin shock waves. It has linearised stability condition:

∆t ≤CFL ∆x

|u|+√

gh

with CFL =0.9 in practical computations.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 13 / 34

Page 14: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods Centred methods

Centred methods: FORCE

Another possible choice of flux is that of the force scheme (First ORder CEntred) proposed byToro in 2001; this may be written as:

FFORCEi+ 1

2

=1

2

(FLF

i+ 12

+ FLWi+ 1

2

), (13)

The force scheme is first-order accurate and has half the numerical viscosity of the Lax-Friedrichsmethod. The scheme has been proved to be monotone and stable, with linearised stabilitycondition

∆t ≤CFL ∆x

|u|+√

gh

with CFL =0.9 in practical computations. The FORCE scheme can be written in a two-stepstaggered grid version as

Un+ 1

2

i+ 12

=1

2(Un

i + Uni+1)−

1

2

∆t

∆x

[F(Un

i+1)− F(Uni )], (14)

Un+1i =

1

2

(U

n+ 12

i− 12

+ Un+ 1

2

i+ 12

)−

1

2

∆t

∆x

[F(U

n+ 12

i+ 12

)− F(Un+ 1

2

i− 12

)

], (15)

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 14 / 34

Page 15: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Godunov method

The Godunov upwind method

The upwind method of Godunov has been proposed for the first time in 1959 [1]. It utilises thesolution of the Riemann problem locally; this solution can be exact or approximate as we will see.

[1 ] S.K. Godunov (1959). Finite difference methods for the computation of discontinuoussolution of the equations of fluid dynamics. Mat. Sb.,47:271-306

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 15 / 34

Page 16: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Godunov method

The Godunov upwind method

Figure 4: Godunov upwind method: (a) control volume in x − t space, (b) integral averages give piece-wiseconstant data Ui−1, Ui Ui+1, (c) structure of solutions of Riemann problems at intercell boundaries

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 16 / 34

Page 17: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Godunov method

The Godunov upwind method: the scheme

Let us assume that the initial data Un at time t = tn is a set of integral averages Uni over control

volumes Ii = xi− 12, xi+ 1

2and this results in a piece-wise constant distributions of data. Figure

(10(b)) shows a possible distribution of the data in cells i − 1, i and i + 1 for a typical componentof the vector Un.Le us consider a short portion of the domain, say xi− 1

2≤ x ≤ xi+ 3

2, then locally one has the set

of conservation laws with initial data that consists of two constant states separated by adiscontinuity. That is, we have the following initial value problem (IVP):

∂t U + ∂x F = 0 , x ∈ R , t > 0 ,

U(x , tn) =

Ui if x < xi+ 1

2,

Ui+1 if x > xi+ 12.

(16)

This is precisely a Riemann problem, whose data states are Ui (left) and Ui+1 (right), thesolution of which is denoted by Ui+ 1

2(x , t).

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 17 / 34

Page 18: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Godunov method

The Godunov upwind method: the scheme

Le us consider the other portion of the domain, say xi− 32≤ x ≤ xi+ 1

2, then we have another

initial value problem (IVP):

∂t U + ∂x F = 0 , x ∈ R , t > 0 ,

U(x , tn) =

Ui−1 if x < xi− 1

2,

Ui if x > xi− 12.

(17)

This is precisely a Riemann problem, whose data states are Ui−1 (left) and Ui (right), thesolution of which is denoted by Ui− 1

2(x , t).

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 18 / 34

Page 19: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Godunov method

The Godunov upwind method: the scheme

The Godunov flux Fi+ 12

at the intercell boundary xi+ 12

may be defined as the physical flux

function F (U) evaluated at the solution Ui+ 12

(x , t), which in turns is to be evaluated along the

t−axis; in local coordinates this is x/t = 0. Then, we can write

Fi+ 12

= F(

Ui+ 12

(0))

(18)

Two items are needed to evaluate the Godunov flux

the solution Ui+ 12

(x , t) of the Riemann problem with data UL ≡ Uni (left) and UR ≡ Un

i+1

(right);

a solution sampling procedure to correctly identify the required value along the t−axis, x/t.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 19 / 34

Page 20: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Dam-break problem

In the language of free surface water flows, a rarefaction is also called a depression and a shock isalso called a bore. Here we shall use both terminologies. If one assumes that the wavephenomenon is correctly governed by the Saint-Venant equations and that the wall vanishesinstantaneously at time t = 0, then the situation may be described by Figs (5)-(7). The initialconditions for the water depth at time t = 0 are represented by Fig. (5) where the wall isreplaced by a discontinuity in water depth at the position x = 25 m. Fig. (5) shows the waterdepth, the velocity profile and the a summary of the wave process as a function of space and timeat the later time t = 1s after the wall collapses, while the situation at t = 2s and t = 3s isillustrated in Fig. (6) and (7) respectively. The right wave is a shock, a discontinuous wave, andthe left wave is a rarefaction, a smooth wave.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 20 / 34

Page 21: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Dam-break problem

10 15 20 25 30 35 400

0.2

0.4

0.6

0.8

1

x

h −

flo

w d

epth

10 15 20 25 30 35 400

0.5

1

1.5

x

u −

flo

w v

elo

city

10 15 20 25 30 35 400

1

2

3

x

tim

e

Figure 5: Time evolution of the dam-break problem: t= 1s

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 21 / 34

Page 22: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Dam-break problem

10 15 20 25 30 35 400

0.2

0.4

0.6

0.8

1

x

h −

flo

w d

epth

10 15 20 25 30 35 400

0.5

1

1.5

x

u −

flo

w v

elo

city

10 15 20 25 30 35 400

1

2

3

x

tim

e

Figure 6: Time evolution of the dam-break problem: t= 2s

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 22 / 34

Page 23: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Dam-break problem

10 15 20 25 30 35 400

0.2

0.4

0.6

0.8

1

x

h −

flo

w d

epth

10 15 20 25 30 35 400

0.5

1

1.5

x

u −

flo

w v

elo

city

10 15 20 25 30 35 400

1

2

3

x

tim

e

Figure 7: Time evolution of the dam-break problem: t= 3s

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 23 / 34

Page 24: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The Riemann Problem

The Riemann problem for the Saint-Venant equations is a generalisation of the dam-breakproblem. Formally, the Riemann problem is defined as the initial-value problem (IVP)

∂t U + ∂x F = 0 , x ∈ R , t > 0 ,

U(x , 0) =

UL if x < 0 ,

UR if x > 0 .

(19)

Figure 8: Structure of the solution of the Riemann problem (19) .

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 24 / 34

Page 25: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The Riemann Problem

The structure of the similarity solution of the problem is shown below in the entire x-t half plane.There are two wave families. The left family is associated with the eigenvalue λ1, while the rightwave family is associated with λ2. Waves associated with the genuinely non-linear characteristicfields λ1 and λ2 are either shocks (discontinuous solutions) or rarefactions (smooth solutions).The entire solution consists of three constant states, namely QL (data), Q∗, and QR (data),separated by two waves. The unknown states to be found are Q∗. If any of the λ1 and λ2 wavesis a rarefaction then there will be a smooth transition between two adjacent constant states. Inorder to solve exactly the entire initial-value problem we need to establish appropriate jumpconditions across each characteristic field to connect the unknown state Q∗ to the initialconditions QL (left) and QR (right) respectively. In what follows we establish such jumpconditions across each characteristic field.

Figure 9: Structure of the solution of the Riemann problem (19).

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 25 / 34

Page 26: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The Riemann Problem

10 15 20 25 30 35 400

0.2

0.4

0.6

0.8

1

x

h −

flo

w d

epth

10 15 20 25 30 35 400

0.5

1

1.5

x

u −

flo

w v

elo

city

10 15 20 25 30 35 400

1

2

3

x

tim

e

Figure 10: Structure of the solution of the Riemann problem: solution in the star region.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 26 / 34

Page 27: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The Riemann Problem

Why is relevant the study of the Riemann Problem?

Because we can build exact solutions to compare with numerical ones;

because it is usually used for building numerical methods.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 27 / 34

Page 28: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Exact solution

The exact solution of the Riemann problem in the star region can be determined through theapplication of appropriate jump conditions through the waves, either shock or rarefactions.Through shock waves the Rankine-Hugoniot conditions holds, whereas through rarefaction waves,characteristic equations can be impose.Details on the exact solution of the Riemann problem for the Saint-Venant equations can befound in the text book by Toro, E.F. Shock-capturing methods for free-surface shallow flows.Wiley and Sons Ltd; 2001.

The provided Matlab codes solve a suite of Riemann problems for the Saint-Venant equations(1D problem) via both approximate and exact solutions.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 28 / 34

Page 29: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Approximate Riemann solvers

To compute numerical solutions by Godunov-type methods, one can use the exact or approximateRiemann solvers. Approximate solvers, if used judiciously, can provide effective computationaltools at a competitive cost. Making the choice between the exact and approximate Riemannsolvers is motivated by

computational cost;

simplicity;

correctness.

Correctness should be the overriding criterion.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 29 / 34

Page 30: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

Approximate Riemann solvers

In this approach one first computes an approximate solution Ui+ 12

(x/t) to the Riemann problem.

then an approximate numerical flux is obtained by evaluating the physical flux

Fi+ 12

= F(Ui+ 12

(0)) (20)

where Ui+ 12

(0) is the appropriate value along the t− axis. The process of finding the approximate

solution Ui+ 12

(0) has two steps. In the first step one computes an approximate solution for the

variable h∗ and u∗ in the star region. In the second step one samples the solution to obtain thecorrect values along the t-axis and evaluate the Godunov flux.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 30 / 34

Page 31: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The HLL (Harten, Lax, van Leer) Riemann solver

If we apply similar considerations to the left and right portion of the Riemann fan, we obtain thefollowing relations for the fluxes:

FHLL = FL + SL(UHLL − UL) (21)

orFHLL = FR + SR (UHLL − UR ) (22)

and finally we get the HLL flux:

FHLL =SR FL − SLFR + SLSR (UR − UL)

SR − SL(23)

The corresponding HLL intercell flux for the approximate Godunov method is then given by

FHLLi+ 1

2

=

FL if 0 ≤ SL ,

FHLL if SL ≤ 0 ≤ SR ,

FR if 0 ≥ SR .

(24)

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 31 / 34

Page 32: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Finite volume conservative methods The Riemann Problem

The HLL Riemann solvers

As to the wave speed estimates SL and SR there are several possible choices available. Wesuggest the following:

SL = uL − cLgK SR = uR + cR gK (25)

where gK (K = L,R) is given by

gK =

(h∗+hK )h∗

2h2K

if h∗ > hK ,

1 if h∗ ≤ hK .

(26)

here h∗ is an estimate for the exact solution for h in the star region. A successful choice for h∗ is:

h∗ =1

g

[1

4(uL − uR ) +

1

2(cL + cR )

]2

, (27)

where CL =√

ghL and CR =√

ghR .

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 32 / 34

Page 33: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Exercise

Exercise

The Folder Saint Venant FV FD contains a Matlab code which solves the Saint-Venantequations (1D problem) using 5 different Finite Volumes and 3 Finite Differences methods. Thedomain is discretized using equally grid spacing ∆x (dx in the code). The initial condition is aRiemann problem (test 1 and test 2). The numerical solution (blue line-dots) is compared withthe exact solution (black solid-line).

1 Which are the main differences between the centred (Lax-Friedrichs, Lax-Wendroff, FORCE)and Godunov methods (Exact solution of RP, HLL)? Which solutions are most accurate?

2 Which are the main differences between the Finite Volume and Finite Difference methods?Which solutions are most accurate?

3 How the numerical solution behaves if the grid spacing is reduced? Which are theconsequences in terms of time computation?

4 What does happen if the CFL is > 1?

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 33 / 34

Page 34: Lecture 7 Finite Volume methods and Riemann Problem solvers · Finite volume conservative methods Integral form of hyperbolic systems Integral form Consider the following one-dimensional

Reference Textbooks

Refence Textbooks

1 Guinot, V. Wave propagation in Fluids: models and numerical techniques, Wiley and SonsLtd; 2010.

2 Toro, E.F. Shock-capturing methods for free-surface shallow flows. Wiley and Sons Ltd;2001.

3 Toro, E.F. Riemann solvers and numerical methods for fluid dynamics, Springer Verlag;Third Edition, 2009.

D. Vanzo, A. Siviglia (ETH Zurich) Lecture notes HS19 34 / 34