finite volume methodt. morales y c. par es finite volume method 1 / 98 table of contents 1...

48
Finite Volume Method Tom´ as Morales de Luna - Carlos Par´ es Madro˜ nal Departamento de Matem´ aticas Universidad de C´ordoba [email protected] http://www.uco.es/ma1molut Dpto. An´ alisis Matem´ atico Universidad de M´ alaga [email protected] Doc-Course ”Partial Differential Equations: Analysis Numerics and Control” Grupo EDANYA EDANYA T. Morales y C. Par´ es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical methods Finite Difference Method Finite Volume Method 5 Bibliograf´ ıa T. Morales y C. Par´ es Finite Volume Method 2 / 98

Upload: others

Post on 19-Apr-2020

5 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method

Tomas Morales de Luna - Carlos Pares Madronal

Departamento de MatematicasUniversidad de [email protected]

http://www.uco.es/∼ma1molut

Dpto. Analisis MatematicoUniversidad de Malaga

[email protected]

Doc-Course ”Partial Differential Equations: Analysis Numerics and Control”

Grupo EDANYA

EDANYA

T. Morales y C. Pares Finite Volume Method 1 / 98

Table of contents

1 Conservation laws: introduction

2 Weak Solutions

3 Systems of conservation laws

4 Numerical methodsFinite Difference MethodFinite Volume Method

5 Bibliografıa

T. Morales y C. Pares Finite Volume Method 2 / 98

Page 2: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

1. Conservation laws: examples

x 1 2x x t

u(x , t) mass density at (x , t) (gr/cm)

Variation of mass due to the action of a flux: F (x , t) (gr/seg) whichdepends on the velocity at point x at time t.

Example: passive transport.

v(x , t) velocity of the fluid at (x , t) (cm/seg);F (x , t) = u(x , t)v(x , t) (gr/seg).

Modelisation:

Mass in [x1, x2] at time t =∫ x2

x1u(x , t)dx (gr)

Variation of mass = ddt

∫ x2

x1u(x , t)dx (gr/seg)

T. Morales y C. Pares Finite Volume Method 4 / 98

1. Conservation laws: examples

Mass conservation:

d

dt

∫ x2

x1

u(x , t)dx = F (x1, t)− F (x2, t).

Integral form:∫ x2

x1

u(x , t2) dx︸ ︷︷ ︸Mass in [x1, x2]

at t = t2

−∫ x2

x1

u(x , t1) dx︸ ︷︷ ︸Mass in [x1, x2]

at t = t1

=

∫ t2

t1

F (x1, t) dt︸ ︷︷ ︸Total flux

at x = x1

−∫ t2

t1

F (x2, t) dt︸ ︷︷ ︸Total flux

at x = x2

Differential form:∫ t2

t1

(d

dt

∫ x2

x1

u(x , t) dx

)dt =

∫ t2

t1

(F (x1, t)− F (x2, t)) dt

↓ u, f smooth∫ t2

t1

∫ x2

x1

[∂u

∂t+∂F

∂x

]dx dt = 0

T. Morales y C. Pares Finite Volume Method 5 / 98

Page 3: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

1. Conservation laws: examples

As x1, x2, t1, t2 are arbitrary, we get to the law:

∂u

∂t+∂F

∂x= 0.

Scalar conservation laws: We assume that the flux only depends on u:

F (x , t) = f (u(x , t)),

f : R→ R continuous.

ut + f (u)x = 0.

Examples:

Transport equation:ut + (v · u)x = 0.

For v = cst:ut + vux = 0.

T. Morales y C. Pares Finite Volume Method 6 / 98

1. Conservation laws: examples

Examples:

Burgers’ equation:

ut +

(u2

2

)x

= 0.

Traffic model:ut + (v · u)x = 0.

u(x , t) traffic density.v = v(u) traffic velocity.Example:

v(u) =vmax

β(β − u),

where vmax is the speed limit on the road and β is the capacity of theroad (maximum possible density).

T. Morales y C. Pares Finite Volume Method 7 / 98

Page 4: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

1. Conservation laws: examples

Examples:

Diffusion-advection equation:

Advection flux: v · u.Diffusion flux (Fick’s law): −µux .Equation:

ut + (u · v − µux)x = 0.

ut + (u · v)x − µux,x = 0.

This is not a conservation law in the sense that:

f (u, ux) = v · u − µux .

Conservation laws with viscous terms are parabolic second order PDE.Here we focus on first order hyperbolic PDE.

T. Morales y C. Pares Finite Volume Method 8 / 98

1. Conservation laws: systems

In many situations, the problem studied depends on the value of Nquantities (conserved variables): u1(x , t), . . . , uN(x , t).

The fluxes may depend on the different variables:

∂ui∂t

+∂

∂xfi (u1, . . . , uN) = 0, i = 1, . . . ,N :

In vector form:Ut + F (U)x = 0,

where

U =

u1...uN

, F (U) =

f1(u1, . . . uN)...

fN(u1, . . . , uN)

.

T. Morales y C. Pares Finite Volume Method 9 / 98

Page 5: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

1. Conservation laws: systems

Examples:Ut + F (U)x = 0.

Shallow water equations on a rectangular channel with constantcross-section and constant bottom:

U =

(hq

); F (U) =

qq2

h+

g

2h2

.

h(x , t) water height.u(x , t) water velocity.q(x , t) = h(x , t)u(x , t) water discharge.

Euler’s equations:

U =

ρρvE

; F (U) =

ρvρv2 + pv(E + p)

.

ρ(x , t) gas density.v(x , t) velocity.E = ρ(v 2/2 + e) energy, where e(x , t) is the specific internal energy.p(x , t) pressure, which is related to the other variables by a givenequation of state: p = p(ρ, e). (example, Ideal Gas: p = (γ − 1)ρe).

T. Morales y C. Pares Finite Volume Method 10 / 98

1. Conservation laws: higher dimensions

U = vector of conserved variables.F (U) flux vector.

n

R

_

d

dt

∫RU dV +

∫∂R

F (U) · n dA =

∫RS(U) dV

↓ Divergence theorem∫R

(∂U

∂t+∇ · F (U)

)dV =

∫RS(U) dV

↓ R arbitrary

∂U

∂t+∇ · F (U) = S(U)

T. Morales y C. Pares Finite Volume Method 11 / 98

Page 6: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Conservation laws: shocks

T. Morales y C. Pares Finite Volume Method 12 / 98

Conservation laws: shocks

T. Morales y C. Pares Finite Volume Method 12 / 98

Page 7: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Conservation laws: shocks

T. Morales y C. Pares Finite Volume Method 12 / 98

Conservation laws: shocks

T. Morales y C. Pares Finite Volume Method 12 / 98

Page 8: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Conservation laws: shocks

T. Morales y C. Pares Finite Volume Method 12 / 98

1. Conservation laws: shocks

Aznalcollar: dam break

Simulation of marine currents at Strait of Gibraltar.

Lock-exchange.

T. Morales y C. Pares Finite Volume Method 13 / 98

Page 9: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: weak solutions

We consider a Cauchy problem in the form:{ut + f (u)x = 0, x ∈ R, t ≥ 0;u(x , 0) = u0(x), x ∈ R;

where:f : R→ R is a smooth function;u0 : R→ R is a known function.

Assume a given solution u, and integrate the equation on therectangle [a, b]× [t0, t1]. We get the equality∫ b

au(x , t1)dx =

∫ b

au(x , t0)dx +

∫ t1

t0

f (u(a, t))dt −∫ t1

t0

f (u(b, t))dt.

If we assume that the solution has a compact support for every timeinstant: ∫

Ru(x , t1)dx =

∫Ru(x , t0)dx .

T. Morales y C. Pares Finite Volume Method 15 / 98

2. Conservation laws: the linear case

We consider the particular case f (u) = au, a ∈ R:{ut + aux = 0, x ∈ R, t ≥ 0;u(x , 0) = u0(x), x ∈ R.

If u is solution for the problem, then u is constant on the linex = at + k, k ∈ R:

d

dt(u(at + c , t)) = a

∂u

∂x(at + c , t) +

∂u

∂t(at + c , t) = 0.

The family of those lines are called characteristic curves of theequation and they allow to solve the equation:

u(x , t) = u0(x − at), ∀x ∈ R, t ≥ 0.

T. Morales y C. Pares Finite Volume Method 16 / 98

Page 10: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: the linear case

Example: ut + ux = 0, u(x , 0) = tanh(x)u(x , t) = u(x − t, 0) = tanh(x − t)

0

0.5

1

1.5

2

t

características

−1

−0.5

0

0.5

1datos iniciales

−1

−0.5

0

0.5

1solución t=2

T. Morales y C. Pares Finite Volume Method 17 / 98

2. Conservation laws: the linear case

The solution on (x , t) only depends of the value at x − at: Domaindependence.

The data on an interval [a, b] only has influence on the following zone:

a b x

t

zona deinfluencia

We call it the influence zone.T. Morales y C. Pares Finite Volume Method 18 / 98

Page 11: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: the linear case

If the initial condition is smooth, the solution is also smooth.

If the initial condition has a discontinuity, this discontinuity willpropagate along a characteristic curve.

In this case, it is not a solution in the classic sense.

T. Morales y C. Pares Finite Volume Method 19 / 98

2. Conservation laws: characteristic curves

Let us consider the general case:{ut + f (u)x = 0, x ∈ R, t ≥ 0;u(x , 0) = u0(x), x ∈ R;

Denoting by a(u) = f ′(u), the conservation law may be written in theform:

ut + a(u)ux = 0, x ∈ R, t > 0.

a(u) plays a similar role as the constant speed a in the linear case. Wemay extend the definition of the characteristic curves as the solutionof the ODE:

dx

dt= a(u(x , t)).

Compared to the linear case, the characteristic curves depend now onthe equation as well as on its solution.

T. Morales y C. Pares Finite Volume Method 20 / 98

Page 12: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: characteristic curves

The solutions are constant along the characteristic curves:

d

dt(u(x(t), t)) =

(∂u

∂x

dx

dt+∂u

∂t

)(x(t), t)

=

(∂u

∂xa(u) +

∂u

∂t

)(x(t), t) = 0.

Given a solution u, the characteristic curves that starts at the point(x0, 0) is the solution of the Cauchy problem:{

dx

dt= a(u(x , t));

x(0) = x0.

Given that u is constant on the characteristic curve, we get:

a(u(x(t), t)) = a(u0(x0)), ∀t > 0.

The characteristic curve that starts at (x0, 0) is a line

x = a(u0(x0))t + x0.

T. Morales y C. Pares Finite Volume Method 21 / 98

2. Conservation laws: characteristic curves

u(x , 0) = tanh(x).

0

0.5

1

t

características

−1

−0.5

0

0.5

1datos iniciales

−1

−0.5

0

0.5

1solución t=1

The characteristic curvesdiverge, which gives asmooth solution ∀t.

u(x , 0) = 1− tanh(x).

0

0.5

1

t

características

0

0.5

1

1.5

2datos iniciales

0

0.5

1

1.5

2solución t=1

The characteristic curvesconverge: the solution willdevelop a discontinuity for afinite time interval.

BURGERS’ EQUATIONT. Morales y C. Pares Finite Volume Method 22 / 98

Page 13: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: weak solutions

Aim: To give a definition for solutions which allows to take intoaccount non-smooth functions (discontinuous solutions).

We shall say that u : R× R+ → R is a piecewise C 1 function if thereexists a finite number of curves Γ1,...,ΓN which may be parametrizeas:

Γi = {(σi (t), t), t ∈ Ii},where Ii is an interval of [0,∞) and σi : Ii ⊂ R→ R is a C 1(Ii )function, such that:

u is C 1 in the open set delimited by the curves {Γi} and the line{t = 0};in any point (γ, t0) of the curve Γi , there exist the lateral limits for uand are finite

lımx→γ+

u(x , t0) = u+(γ, t0), lımx→γ−

u(x , t0) = u−(γ, t0).

T. Morales y C. Pares Finite Volume Method 23 / 98

2. Conservation laws: Definition of weak solutions (1)

Definition 1: We say that a function u : R× R+ → R is a weaksolution if it satisfies:∫ b

au(x , t1)dx =

∫ b

au(x , t0)dx+

∫ t1

t0

f (u(a, t))dt−∫ t1

t0

f (u(b, t))dt,

∀(a, b) ⊂ R, ∀(t0, t1) ⊂ R+.

If u is a piecewise C1 function, then the integrals in [a, b] make sense.

There is a small technical difficulty when there exists a stationarydiscontinuity at x = a or x = b.

T. Morales y C. Pares Finite Volume Method 24 / 98

Page 14: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: weak solution example

Example: we seek weak solutions in the form:

u(x , t) =

{uL if x < σ(t);

uR if x > σ(t);

where uL and uR two different real numbers and σ : [0,∞)→ R is asmooth function.

The equality∫ b

au(x , t1)dx =

∫ b

au(x , t0)dx +

∫ t1

t0

f (u(a, t))dt −∫ t1

t0

f (u(b, t))dt

is trivial whenever [a, b]× [t0, t1] does not intersect the curveΓ = {(σ(t), t), t ∈ [0,∞]}.

T. Morales y C. Pares Finite Volume Method 25 / 98

2. Conservation laws: weak solution example

What happens when they intersect:

x

t

t0

t1

a b

It should be satisfied:

uL(σ(t1)− a) + uR(b − σ(t1)) = uL(σ(t0)− a) + uR(b − σ(t0))

+(t1 − t0)f (uL)− (t1 − t0)f (uR),

T. Morales y C. Pares Finite Volume Method 26 / 98

Page 15: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: weak solution example

Arranging the terms:

σ(t1)− σ(t0)

t1 − t0=

f (uR)− f (uL)

uR − uL.

Now, taking the limit t1 to t0 we get that a necessary condition is:

σ′(t0) =f (uR)− f (uL)

uR − uL.

As a consequence, the discontinuity propagates at constant speed:

σ′(t) =[f (u)]

[u], ∀t,

where [f (u)] = f (uR)− f (uL) and [u] = uR − uL.

It is called Rankine-Hugoniot condition.

T. Morales y C. Pares Finite Volume Method 27 / 98

2. Conservation laws: definition of weak solutions (2)

Assume that u is a classic solution and that ϕ is a C 1 function withcompact support C 1

0 (R× [0,∞)).

We get:

0 =

∫R×R+

(∂u

∂t+

∂xf (u)

)ϕ dx dt

=

∫R

(∫R+

∂u

∂tϕ dt

)dx +

∫R+

(∫R

∂xf (u)ϕ dx

)dt

= −∫R×R+

(u∂ϕ

∂t+ f (u)

∂ϕ

∂x

)dx dt −

∫Ru(x , 0)ϕ(x , 0) dx .

T. Morales y C. Pares Finite Volume Method 28 / 98

Page 16: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: weak solution example

Definition 1: We say that a function u ∈ L∞loc(R× R+) is a weaksolution if it satisfies:∫

R×R+

(u∂ϕ

∂t+ f (u)

∂ϕ

∂x

)dx dt +

∫Ru0(x)ϕ(x , 0) dx = 0

for every ϕ ∈ C 10 (R× [0,∞).

It can be shown that both definitions of weak solutions are equivalent.

It can be shown that a piecewise C 1 function is a weak solution if,and only if:

It is a classic solution where it is smooth.

It satisfies the Rankine-Hugoniot condition at the discontinuities.

T. Morales y C. Pares Finite Volume Method 29 / 98

2. Conservation laws: weak solution example

Remarks:

If there exists a stationary discontinuity at x = a:

σ′(t) = 0 =[f (u(a, t)]

[u(a, t)]=⇒ f (u(a−, t)) = f (u(a+, t)).

As a consequence there is no ambiguity in Definition 1 for weaksolutions.

It is possible to obtain conservation laws which are equivalent forsmooth solutions but have different weak solution.

T. Morales y C. Pares Finite Volume Method 30 / 98

Page 17: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: self-similar solution

We say that u is a self-similar solution if it can be written in the form

u(x , t) = v

(x − x0

t − t0

)for some x0 ∈ R, t0 ≤ 0 and v : R→ R a continuous function.

If u is a self-similar function, then it is constant along the lines:

x − x0

t − t0= C .

Suppose that x0 = t0 = 0:

u(x , t) = v(xt

).

Then we have:

0 = − x

t2v ′(xt

)+ a

(v(xt

)) 1

tv ′(xt

)∀t > 0, ∀x ∈ R.

T. Morales y C. Pares Finite Volume Method 31 / 98

2. Conservation laws: self-similar solution

Then:

v ′(xt

) [a(v(xt

))− x

t

]= 0 ∀x ∈ R, ∀t > 0.

The function v should satisfy:

v ′(ξ) (a(v(ξ))− ξ) = 0, ∀ξ ∈ R.

Either v ′(ξ) = 0 or a(v(ξ)) = ξ; that is, either v is constant or v isthe inverse function of a, provided that this function has inverse.

Let uL, uR such that a(uL) < a(uR), if a has inverse in [a(uL), a(uR)],then we get the following self-similar solution:

u(x , t) =

uL if x < a(uL)t;a−1(x/t) if a(uL)t < x < a(uR)t;uR if x > a(uR)t.

T. Morales y C. Pares Finite Volume Method 32 / 98

Page 18: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: self-similar solution

In particular, if f is strictly convex or concave, then a is strictlymonotone and has inverse. Thus, we may define self-similar solutionswhenever a(uL) < a(uR), that is:

for uL < uR , if f is convex;for uL > uR if f is concave.

These type of solutions are called rarefaction waves.

In the case of Burgers’ equation, a(u) = u. Rarefaction waves connecttwo states such that uL < uR and correspond to

u(x , t) =

uL if x < a(uL)t;x/t if a(uL)t < x < a(uR)t;uR if x > a(uR)t.

T. Morales y C. Pares Finite Volume Method 33 / 98

2. Conservation laws: no-uniqueness of weak solutions

Let uL < uR , we consider Burgers’ equation with initial condition:

u0(x) =

{−1 if x < 0;1 if x > 0;

One possible solution for this problem is a rarefaction wave.

Another possibility is a weak solution: a stationary shock:

u(x , t) =

{−1 if x < 0;1 if x > 0.

It satisfies the Rankine-Hugoniot condition:

s = 0 =f (1)− f (−1)

2=

1/2− 1/2

2.

T. Morales y C. Pares Finite Volume Method 34 / 98

Page 19: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: no-uniqueness of weak solutions

u(x , t) = sign(x) =

{−1 x < 0

1 x ≥ 0v(x , t) =

−1 x/t ≤ −1

x/t −1 < x/t < 1

1 x/t ≥ 1

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

x

t

Caracteristicas

Shock expansivo

Stationary shock

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1Caracteristicas

x

t

Rarefaction wave

T. Morales y C. Pares Finite Volume Method 35 / 98

2. Conservation laws: entropy condition (1)

It is now necessary to established a criterion to select the physicalsolution.

Lax’s criterion: We say that a discontinuity is an entropic shock if itsatisfies the Rankine-Hugoniot condition and

a(u−) ≥ s ≥ a(u+)

where u− and u+ are the limits to each side of the discontinuity ands is the speed of the shock.

A weak solution is an entropic solution if it is continuous or if itsdiscontinuities are entropic shocks.

When a discontinuity is not an entropic shock, it generatesinformation, while on an entropic shock the information collapses.

T. Morales y C. Pares Finite Volume Method 36 / 98

Page 20: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: entropy condition

x

t

Entropic shock

x

t

Non-entropic shock

T. Morales y C. Pares Finite Volume Method 37 / 98

2. Conservation laws: entropy condition (2)

Vanishing viscosity method:

We perturbate the conservation law by adding a second order term:

∂uε∂t

+∂

∂xf (uε) = ε

∂2uε∂x2

,

the equation is parabolic and its solutions are smooth.Entropic solutions are those that can be obtained as the limit, in somesense, of the problem with viscous terms uε when ε tends to 0.These entropic solutions can be characterized as follows: Let (η,G ) anentropy pair, that is, they are smooth from R to R such that

η, entropy function, is strictly convex;G , entropy flux, is a primitive of η′ · f ′, that is, G ′ = η′ · f ′

T. Morales y C. Pares Finite Volume Method 38 / 98

Page 21: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: entropy condition (2)

The solutions of the viscous problem should satisfy:

η(uε)t + G (uε)x ≤ ε∂2

∂x2η(uε).

We say that a weak solution for the conservation law satisfies theentropy condition if it satisfies the inequality:

η(uε)t + G (uε)x ≤ 0

in the sense of distributions.

Smooth solution satisfy:

η(u)t + G (u)x = 0,

and are thus entropic.

T. Morales y C. Pares Finite Volume Method 39 / 98

2. Conservation laws: entropy condition (2)

It can be shown that a piecewise C 1 function is entropic if, and onlyif, it satisfies at the discontinuities the following inequality:

s[η(u)] ≥ [G (u)],

where s is the speed of the shock, given by Rankine-Hugoniot.

Remarks:

In general we should check for any possible entropy pair

If f is convex or concave, it can be shown that it is enough to test withjust one entropy pair

If f is convex or concave, both definitions of entropic solution areequivalent.

Based on the physics of the problem, one can in practice find entropypairs which are relevant for the problem.

T. Morales y C. Pares Finite Volume Method 40 / 98

Page 22: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

2. Conservation laws: Riemann problem

Given a conservation law, we call Riemann problem to the Cauchyproblem given by the initial condition:

u(x , 0) =

{uL x < 0

uR x ≥ 0

If f is strictly convex or concave, we can now solve such problem:

If a(uL) < a(uR), the solution is a rarefaction wave.If uL = uR the solution is constant.If a(uL) > a(uR), the solution if a entropic shock, that is, adiscontinuity that propagates at speed:

s =f (uR)− f (uL)

uR − uL,

which satisfies the entropy inequality.

T. Morales y C. Pares Finite Volume Method 41 / 98

3. Systems of conservation laws: the linear case

We consider the system:

Ut + AUx = 0,

where

U(x , t) =

u1(x , t)...

uN(x , t)

,and A is a N × N matrix.

We shall assume that the system is hyperbolic: the matrix A has Ndifferent eigenvalues λ1 < · · · < λN . Let R1, . . . ,RN be thecorresponding eigenvectors.

T. Morales y C. Pares Finite Volume Method 43 / 98

Page 23: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

3. Systems of conservation laws: the linear case

Let K the matrix whose columns are the eigenvectors Ri . Then:

A = KΛK−1,

where Λ is the diagonal eigenvalue matrix.

If we make the change of variables:

V = K−1 · U,

system results in N decoupled linear conservation laws:

∂vi∂t

+ λi∂vi∂x

= 0, i = 1, . . . ,N.

The components of V are called characteristic variables. Thecomponents of U, conserved variables.

T. Morales y C. Pares Finite Volume Method 44 / 98

3. Systems of conservation laws: the linear case

To solve the problem with initial condition

U(x , 0) = U0(x),

1 We decompose the initial condition in the base of eigenvectors:

U0(x) =N∑i=1

v0i (x)Ri .

2 We solve the problem in characteristic variables:

vi (x , t) = v0i (x − λi t), i = 1, . . . ,N.

3 We revert the solution to conserved variables:

U(x , t) =N∑i=1

v0i (x − λi t)Ri .

T. Morales y C. Pares Finite Volume Method 45 / 98

Page 24: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

3. Systems of conservation laws: the linear case

In particular, the solution to the Riemann problem with data UL, UR

consists in N discontinuities that propagate with constant speeds λ1,. . . , λN .

These discontinuities connect N + 1 estates:

U0 = UL,U1, . . . ,UN−1,UN = UR .

If

UL =N∑i=1

uLi Ri , UL =N∑i=1

uRi Ri ,

then

UJ =J∑

i=1

uRi Ri +N∑

i=J+1

uLi Ri , J = 1, . . . ,N − 1.

T. Morales y C. Pares Finite Volume Method 46 / 98

3. Systems of conservation laws: general case

Consider the system:Ut + F (U)x = 0.

where

U(x , t) =

u1(x , t)...

uN(x , t)

, F (U) =

F1(u1, . . . , uN)...

FN(u1, . . . uN)

.Let

A(U) =

∂F1∂u1

. . . ∂F1∂uN

.... . .

...∂FN∂u1

. . . ∂FN∂uN

the Jacobian matrix of the flux F .

T. Morales y C. Pares Finite Volume Method 47 / 98

Page 25: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

3. Systems of conservation laws: general case

Assume that the system is strictly hyperbolic: for every U, the matrixA(U) has N different real eigenvalues λ1(U) < · · · < λN(U). LetR1(U), . . . ,RN(U) a set of associated eigenvectors.

Given a solution U, the characteristic curves are the solutions of theN ODE

dx

dt= λi

(U(x(t), t)

), i = 1, . . . ,N.

Related to each family of characteristic and based on its nature, wemay build solutions which are:

Either contact discontinuities, which are discontinuities such that, as inthe linear case, they propagate following the characteristic curve;or rarefaction waves and entropic shocks.

These type of solutions are called simple waves.

The solution of a given Riemann problem consists in N simple wavesconnecting N + 1 estates.

T. Morales y C. Pares Finite Volume Method 48 / 98

3. Systems of conservation laws: example

Example: Euler’s system with initial condition:

ρ(x , 0) =

{ρ1 x < 0ρ2 x > 0

v(x , 0) =

{v1 x < 0v2 x > 0

p(x , 0) =

{p1 x < 0p2 x > 0

x

p

v

ρ

1

1

1 ρpv

2

2

2t=0

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

density, t=.4

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

pressure, t=.4

T. Morales y C. Pares Finite Volume Method 49 / 98

Page 26: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

We consider Cauchy’s problem:∂u

∂t+ c

∂u

∂x= 0, x ∈ R, t > 0;

u(x , 0) = u0(x), x ∈ R.We consider a uniform mesh grid in the semi-plane t ≥ 0.

T. Morales y C. Pares Finite Volume Method 52 / 98

Finite Difference Method: linear case

We consider approximation of the partial derivatives that take intoaccount only the value of the function on the nodes

For the spatial derivative:

∂u

∂x(xi , tn) =

u(xi+1, tn)− u(xi , tn)

∆x+ O(∆x),

∂u

∂x(xi , tn) =

u(xi , tn)− u(xi−1, tn)

∆x+ O(∆x),

∂u

∂x(xi , tn) =

u(xi+1, tn)− u(xi−1, tn)

2∆x+ O(∆x2).

For the temporal derivative:

∂u

∂t(xi , tn) =

u(xi , tn+1)− u(xi , tn)

∆t+ O(∆t).

T. Morales y C. Pares Finite Volume Method 53 / 98

Page 27: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

Solution must satisfy:

u(xi , tn+1)− u(xi , tn)

∆t+ c

u(xi+1, tn)− u(xi , tn)

∆x∼= 0.

Idea: look for approximations uni of u(xi , tn) such that:

un+1i − uni

∆t+ c

uni+1 − uni∆x

= 0.

Decentering to the right:

un+1i = uni − c

∆t

∆x(uni+1 − uni ).

Initial condition:u0i = u0(xi ), ∀i .

T. Morales y C. Pares Finite Volume Method 54 / 98

Finite Difference Method: linear case

With other choices for spatial derivative we get the methods:

Decentering to the left:

un+1i = uni − c

∆t

∆x(uni − uni−1);

Centering scheme:

un+1i = uni − c

∆t

2∆x(uni+1 − uni−1).

T. Morales y C. Pares Finite Volume Method 55 / 98

Page 28: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

Lax’s theorem: For linear problems, a consistent scheme is convergentif, and only if, it is stable.

Consistency: The exact values of a smooth solution on the grid nodesu(xi , tn) must satisfy the difference equation with an error that tendsto 0 with ∆x and ∆t. This error is called the local truncature error.

For instance, for the decentering to the right method:

Lni =u(xi , tn+1)− u(xi , tn)

∆t+ c

u(xi+1, tn)− u(xi , tn)

∆x= O(∆x + ∆t).

We say that the method is of order (p, q) if:

Lni = O(∆xp + ∆tq).

The decentering methods are of order (1,1) and the centered methodof order (2,1)

T. Morales y C. Pares Finite Volume Method 56 / 98

3. Finite difference method: linear case

Stability: The truncature errors at the node points are not amplifiedwith time.

As the exact solution satisfies:

sup{|u(x , t)|, x ∈ R} = sup{|u0(x)|, x ∈ R}, ∀t > 0,

a reasonable criterion for stability is that, given T > 0, there existsK > 0 independent of ∆t and ∆x such that:

supi∈Z|uni | ≤ K sup

i∈Z

∣∣u0i

∣∣ , ∀n ≤ T

∆t.

If we define un the piecewise constant function which takes the valueuni on the interval [xi −∆x/2, xi + ∆x/2), the inequality writes as:

||un||∞ ≤ K ||u0||∞, ∀n ≤ T

∆t.

T. Morales y C. Pares Finite Volume Method 57 / 98

Page 29: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

3. Finite difference method: linear case

Remarks:

It is possible to give another different definition using other functionalnorm, for instance, || · ||p.In particular, the norm || · ||2 allows to use the Von Neumeann stabilityanalysis based on Fourier techniques.This analysis is very useful forlinear problems but it does not generalize to non-linear case.

Example: Stability of the decentering to the left scheme:

∣∣un+1i

∣∣ =

∣∣∣∣uni (1− c∆t

∆x) + c

∆t

∆xuni−1

∣∣∣∣≤ |uni |

∣∣∣∣1− c∆t

∆x

∣∣∣∣+ |c | ∆t

∆x

∣∣uni−1

∣∣≤

(∣∣∣∣1− c∆t

∆x

∣∣∣∣+ |c | ∆t

∆x

)(supj∈Z

∣∣unj ∣∣).

T. Morales y C. Pares Finite Volume Method 58 / 98

3. Finite difference method: linear case

Assuming c > 0 and imposing the CFL condition (Courant,Friedrichs, Levy):

|c | ∆t

∆x≤ 1,

we get|un+1

i | ≤ supj∈Z|unj |

as a consequence:

supj∈Z|unj | ≤ sup

j∈Z|u0

j |, ∀n.

The scheme is conditionally stable.

The decentering scheme to the right is stable if c < 0 and the sameCFL condition is satisfied.

The centering scheme is unconditionally unstable.

T. Morales y C. Pares Finite Volume Method 59 / 98

Page 30: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

In order to get stable schemes we have to decenter in the gooddirection and to impose a time-step restriction, based on the speed ofpropagation of the information on the continuous media.

In the decentering to the right scheme, for instance, the value uni onlydepends on the initial conditions on the grid points of the t = 0 axisthat are on the interval:

[xi , xi+n].

This is what we call domain of dependence of the numerical scheme.

On the other side, the domain of dependence of the analyticalsolution is the base point of the characteristic curve xi − ctn.

Assuming c > 0 and the CFL condition, we get that the domain ofdependence of the numerical scheme contains the analytical domainof dependence, which is a necessary condition for convergence.

T. Morales y C. Pares Finite Volume Method 60 / 98

Finite Difference Method: linear case

c > 0

)( xi tn

��

������������������������������������������������������������������������

������������������������������������������������������������������������

x

t

i nx - at

c < 0

)( xi tn

��

����������������������������������������������������������������������������������������������������������������

����������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������

������������������������������������������������������������������������

x

t

i nx - at

T. Morales y C. Pares Finite Volume Method 61 / 98

Page 31: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

Using the equality:

c+ = max{c, 0}, c− = min{c , 0}

the schemes may be combined in the method:

un+1i = uni −

∆t

∆x{c+(uni − uni−1) + c−(uni+1 − uni )},

called CIR scheme (from Courant, Isaacson and Rees) or upwindscheme.

Using the equality:

c+ =c + |c |

2y c− =

c − |c |2

the scheme can be written in the so-called viscous form:

un+1i = uni − c

∆t

2∆x

(uni+1 − uni−1

)+ |c | ∆t

2∆x

(uni+1 − 2uni + uni−1

).

T. Morales y C. Pares Finite Volume Method 62 / 98

Finite Difference Method: linear case

In general, a scheme on viscous form:

un+1i = uni − c

∆t

2∆x

(uni+1 − uni−1

)+

q

2

(uni+1 − 2uni + uni−1

).

can be seen as a centering scheme plus a second order discretizationof the vanishing viscosity term:

q

2

∆x

∆t∆x

∂2u

∂x2.

The viscous term stabilizes the centering scheme if q is properlychosen: it can be proved that the scheme is L2-stable if, and only if, qverifies the inequality: (

c∆t

∆x

)2

≤ q ≤ 1.

T. Morales y C. Pares Finite Volume Method 63 / 98

Page 32: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

The lower bound for q gives Lax-Wendroff’s scheme:

un+1i = uni −c

∆t

2∆x

(uni+1 − uni−1

)+

1

2

(c ∆t

∆x

)2 (uni+1 − 2uni + uni−1

).

of order (2,2) and conditionally stable;

The upper bound for q gives Lax-Friedrichs’ scheme:

un+1i = uni − c

∆t

2∆x

(uni+1 − uni−1

)+

1

2

(uni+1 − 2uni + uni−1

),

of order (1,1) and conditionally stable.

It may be written as:

un+1i =

1

2

(uni−1 + uni+1

)− c

∆t

2∆x

(uni+1 − uni−1

).

T. Morales y C. Pares Finite Volume Method 64 / 98

Finite Difference Method: linear case

First order schemes for regular solutions: u0, un-LxF, un-UpW.

t = 4

−10 −8 −6 −4 −2 0 2 4 6 8 10−1

−0.5

0

0.5

1

1.5

2t=4

t = 8

−10 −8 −6 −4 −2 0 2 4 6 8 10−1

−0.5

0

0.5

1

1.5

2t=8

T. Morales y C. Pares Finite Volume Method 65 / 98

Page 33: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: linear case

Second order scheme:LxW.

t = 4

−10 −8 −6 −4 −2 0 2 4 6 8 10−1

−0.5

0

0.5

1

1.5

2t=4

t = 16

−10 −8 −6 −4 −2 0 2 4 6 8 10−1

−0.5

0

0.5

1

1.5

2t=16

T. Morales y C. Pares Finite Volume Method 66 / 98

Finite Difference Method: linear case

A convergent scheme may produce bad results when the solution hasa discontinuity:

CIR’s scheme

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 10.2

0.4

0.6

0.8

1

1.2

Lax-Wendroff’s scheme

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 10.2

0.4

0.6

0.8

1

1.2

Numerical solution for the linear equation with c = 1, ∆x = 0.01,∆t = 0.005

T. Morales y C. Pares Finite Volume Method 67 / 98

Page 34: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Difference Method: non-linear problems

We consider again the problem:

∂u

∂t+

∂xf (u) = 0, x ∈ R, t ≥ 0;

If we write the equation in the form:

∂u

∂t+ a(u)

∂u

∂x= 0,

where a(u) = f ′(u), it is clear that a(u) plays, locally, the role of c inthe linear problem.

It is natural the following extension of the CIR scheme:

un+1i = uni −

∆t

∆x{a(uni )+(uni − uni−1) + a(uni )−(uni+1 − uni )}.

The resulting scheme is consistent of order (1,1) and conditionallystable, but may converge to functions that are not weak solutions ofthe problem.

T. Morales y C. Pares Finite Volume Method 68 / 98

Finite Volume Method

We define the cell or finite volumes {Ii} as

Ii = [xi−1/2, xi+1/2]

where xi−1/2 = xi −∆x/2 y xi+1/2 = xi + ∆x/2.

Weak solutions should satisfy:

1

∆x

∫Ii

u(x , tn+1) dx =1

∆x

∫Ii

u(x , tn) dx

+∆t

∆x

{1

∆t

∫ tn+1

tn

f (u(xi−1/2, t)) dt − 1

∆t

∫ tn+1

tn

f (u(xi+1/2, t)) dt

}.

Now we may see uni as average approximations of u on the cell Ii atinstant tn:

uni∼=

1

∆x

∫Ii

u(x , tn) dx ,

T. Morales y C. Pares Finite Volume Method 70 / 98

Page 35: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method

It is reasonable to consider numerical schemes in the form:

un+1i = uni +

∆t

∆x{F n

i−1/2 − F ni+1/2},

where:F ni+1/2 = F (uni−q, u

ni−q+1, ..., u

ni+p−1, u

ni+p).

is an approximation of the average flux that crosses the intercellxi+1/2 between times tn y tn+1, that is:

F ni+1/2

∼=1

∆t

∫ tn+1

tn

f (u(xi+1/2, t))dt.

These type of schemes are called conservative schemes and thefunction F , numerical flux.

T. Morales y C. Pares Finite Volume Method 71 / 98

How may we define the numerical flux?

We recall . . . ∂u

∂t+

∂xf (u) = 0, x ∈ R, t > 0,

u(x , 0) =

{uL if x < 0;uR if x > 0.

Riemann’s problem solution

V(xt, uL, uR

)

T. Morales y C. Pares Finite Volume Method 72 / 98

Page 36: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Any weak solution should satisfy, for [x0, x1]× [t0, t1]:∫ x1

x0

u(x , t1)dx −∫ x1

x0

u(x , t0)dx =

∫ t1

t0

F (u(x0, t))dt −∫ t1

t0

F (u(x1, t))dt

In particular, for a sufficiently large and considering [−a, 0]× [0,∆t]∫ 0

−au(x ,∆t)dx −

∫ 0

−au(x , 0)dx =

∫ ∆t

0F (u(−a, t))dt −

∫ ∆t

0F (u(0, t))dt

∫ 0

−aV (

x

∆t, uL, uR)dx−

∫ 0

−au(x , 0)dx =

∫ ∆t

0F (u(−a, t))dt−

∫ ∆t

0F (u(0, t))dt

∫ 0

−a

(V (

x

∆t, uL, uR)− uL

)dx =

∫ ∆t

0F (u(−a, t))dt −

∫ ∆t

0F (u(0, t))dt∫ 0

−a

(V (

x

∆t, uL, uR)− uL

)dx = ∆t(F (uL)− F (V (0, uL, uR)))

and considering [0, a]× [0,∆t]∫ a

0

(V (

x

∆t, uL, uR)− uR

)dx = ∆t(F (V (0, uL, uR))− F (uR))

T. Morales y C. Pares Finite Volume Method 73 / 98

∫ 0

−∞(V (ξ, uL, uR)− uL) dx = F (uL)− F (V (0, uL, uR))

∫ ∞0

(V (ξ, uL, uR)− uR) dx = F (V (0, uL, uR))− F (uR)

T. Morales y C. Pares Finite Volume Method 74 / 98

Page 37: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Godunov’s method

The idea is to obtain the solution of the Cauchy problem by combining thesolutions of the Riemann’s problems:

un+1i :=

1

∆x

∫ xi+1/2

xi−1/2

u(x , tn+1)dx1

∆x

∫ xi

xi−1/2

u(x , tn+1)dx+1

∆x

∫ xi+1/2

xi

u(x , tn+1)dx1

∆x

∫ xi

xi−1/2

V

(x − xi−1/2

t − tn, ui−1, ui

)dx

+1

∆x

∫ xi+1/2

xi

V

(x − xi+1/2

t − tn, ui , ui+1

)dx

T. Morales y C. Pares Finite Volume Method 75 / 98

Godunov’s method

un+1i =

1

∆x

∫ xi

xi−1/2

V

(x − xi−1/2

t − tn, ui−1, ui

)dx

+1

∆x

∫ xi+1/2

xi

V

(x − xi+1/2

t − tn, ui , ui+1

)dx = uni +

1

∆x

∫ xi

xi−1/2

(V

(x − xi−1/2

t − tn, ui−1, ui

)− ui

)dx

+1

∆x

∫ xi+1/2

xi

(V

(x − xi+1/2

t − tn, ui , ui+1 − ui

))dx = uni +

∆t

∆x(F (V (0, ui−1, ui ))−F (ui ))

+1

∆x

∫ xi+1/2

xi

(V

(x − xi+1/2

t − tn, ui , ui+1 − ui

))dx = uni +

∆t

∆x(F (V (0, ui−1, ui ))−F (ui ))

+∆t

∆x(F (ui )− F (V (0, ui , ui+1)))

T. Morales y C. Pares Finite Volume Method 76 / 98

Page 38: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Godunov’s method

un+1i = uni −

∆t

∆x(F (V (0, ui , ui+1))− F (V (0, ui−1, ui )))

un+1i = uni −

∆t

∆x

(Fi+1/2 − Fi−1/2)

)Fi+1/2 = F (ui , ui+1) = F (V (0, ui , ui+1))

F (V (0, uL, uR)) = F (uL)−∫ 0

−∞(V (ξ, uL, uR)− uL) dx

F (V (0, uL, uR) = F (uR) +

∫ ∞0

(V (ξ, uL, uR)− uR) dx

T. Morales y C. Pares Finite Volume Method 77 / 98

CFL condition

If we want that above calculations work, we need that the Riemann’sproblems do not interfere with each other. It is easy to check thatunder the condition:

max(|a(uL)|, |a(uR)|) ∆t

∆x≤ 1/2,

where a(u) = F ′(u) the waves travelling from the origin do not reachthe points ±∆x/2.

This should be true for each of the Riemann’s problem at theinterface. As a consequence we impose the CFL condition:

supi ,n|a (uni )| ∆x

∆t≤ 1

2.

In reality, it is enough a less restrictive CFL condition:

supi ,n|a (uni )| ∆x

∆t≤ 1.

T. Morales y C. Pares Finite Volume Method 78 / 98

Page 39: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

In order to define conservative schemes

un+1i = uni −

∆t

∆x

(Fi+1/2 − Fi−1/2)

)Fi+1/2 = F (ui , ui+1) = F (V (0, ui , ui+1))

F (V (0, uL, uR)) = F (uL)−∫ 0

−∞

(V (ξ, uL, uR)− uL

)dx

F (V (0, uL, uR) = F (uR) +

∫ ∞0

(V (ξ, uL, uR)− uR

)dx

We even may consider numerical fluxes that depend on various statesFi+1/2 = F (ui−q, . . . , ui , ui+1, . . . , ui+p)

T. Morales y C. Pares Finite Volume Method 79 / 98

Conditions that should satisfy a numerical flux

If the numerical flux F is a Lispchitz-continuous function on eachvariable and satisfies:

F (u, u, . . . , u) = f (u),

the scheme is consistent in the usual sense.

Lax-Wendroff’s theorem assures that if the approximations given by aconservative scheme converge, the limit is a weak solution of theconservation law.

Weak solutions given by a conservative scheme satisfy theconservation property: ∑

i∈Zuni =

∑i∈Z

u0i , ∀n.

T. Morales y C. Pares Finite Volume Method 80 / 98

Page 40: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: examples

In the case of linear problems, the centering, CIR, Lax-Wendroff andLax-Friedrichs schemes, introduced as finite difference schemes, maybe seen as a conservative numerical fluxes:

F cen(u, v) = cu + v

2,

F cir (u, v) = cu + v

2− |c |

2(v − u),

F LW (u, v) = cu + v

2− c2∆t

2∆x(v − u),

F LF (u, v) = cu + v

2− ∆x

2∆t(v − u).

T. Morales y C. Pares Finite Volume Method 81 / 98

Finite Volume Method: examples

It is easy to extend them to general conservation laws:

F cen(u, v) =f (u) + f (v)

2,

F cir (u, v) =f (u) + f (v)

2− |a((u + v)/2)|

2(v − u),

F LW (u, v) =f (u) + f (v)

2− a((u + v)/2)2∆t

2∆x(v − u),

F LF (u, v) =f (u) + f (v)

2− ∆x

2∆t(v − u).

A requirement for the schemes is for them to be linearly stable, thatis, applied to a linear problem they are stable. This criterion is notsatisfied by the centering scheme. It is necessary to use some kind ofdecentering for the definition of the numerical flux.

T. Morales y C. Pares Finite Volume Method 82 / 98

Page 41: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

The stability criterion for these schemes is the CFL condition:

∆t maxi|a(uni )| = CFL∆x ,

with CFL ≤ 1.

For all those schemes, Lax-Friedrichs is the only one for which we canprove that: if the numerical solutions converge, then the limit is aweak entropic solution taking CFL ≤ 0.5.

Lax-Friedrichs is too diffusive. One way to improve it is to combine itwith Lax-Wendroff, which is less diffusive.

T. Morales y C. Pares Finite Volume Method 83 / 98

Finite Volume Method: examples

For instance, the FORCE numerical flux is the mean average ofLax-Friedrichs and Lax-Wendroff fluxes:

F FORCE (u, v) = 0.5(F LW (u, v) + F LF (u, v)).

It is less diffusive than Lax-Friedrichs and does not present spuriousoscillations on the discontinuities.

Another family of schemes is based on the use of flux limiters:

F (u, v) = ϕF LF (u, v) + (1− ϕ)F LW (u, v).

In the zones where the solution is regular, ϕ ∼= 0 and whenever itdetects a discontinuity ϕ ∼= 1.

T. Morales y C. Pares Finite Volume Method 84 / 98

Page 42: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: examples

Other alternative form to define the schemes is to give an approximationof the Riemann’s problem

V (ξ, uL, uR)

Fi+1/2 = F (ui , ui+1) = F (V (0, ui , ui+1))

F (V (0, uL, uR)) = F (uL)−∫ 0

−∞

(V (ξ, uL, uR)− uL

)dx

F (V (0, uL, uR) = F (uR) +

∫ ∞0

(V (ξ, uL, uR)− uR

)dx

T. Morales y C. Pares Finite Volume Method 85 / 98

Finite Volume Method: examples

HLL method

V (ξ, uL, uR) =

uL, if ξ < cL,u∗, if cL < ξ < cRuR , if cR < ξ

where

u∗ =cR

cR − cLuR −

cLcR − cL

uL −1

cR − cL(F (uR)− F (uL))

F (uL, uR) =

F (uL), if 0 < cL,cRF (uL)− cLF (uR)

cR − cL+

cRcLcR − cL

(uR − uL), if cL < 0 < cR

F (uR), if cR < 0

T. Morales y C. Pares Finite Volume Method 86 / 98

Page 43: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: examples

Rusanov’s = Lax Friedrichs’ Method

If we take cL = cR =∆x

∆t, we recover the Lax Friedrichs’ flux

T. Morales y C. Pares Finite Volume Method 87 / 98

Finite Volume Method: Roe’s method

Instead of using the exact solution of the Riemann’s problem, wesolve the linearized problem

∂u

∂t+ a(uL, uR)

∂u

∂x= 0, x ∈ R, t > 0,

u(x , 0) =

{uL if x < 0;uR if x > 0;

where a(uL, uR) is a good approximation of f ′,

T. Morales y C. Pares Finite Volume Method 88 / 98

Page 44: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: Roe’s method

Roe’s method may be written as

un+1i = uni −

∆t

∆x

(an,+i−1/2(uni − uni−1) + an,−i+1/2(uni+1 − uni )

)where

ani+1/2 = a(uni , uni+1)

The scheme is conservative and consistent if, and only if, the so-calledRoe’s property is satisfied:

f (v)− f (u) = a(u, v)(v − u), ∀u, v .

T. Morales y C. Pares Finite Volume Method 89 / 98

Finite Volume Method: Roe’s method

In that case, the numerical flux is given by:

FRoe(uL, uR) =f (uL) + f (uR)

2− 1

2|a(uL, uR)|(uR − uL).

In a scalar problem, Roe’s property combined with consistency, definea(u, v):

a(uL, uR) =

f (uR)− f (uL)

uR − uLif uR 6= uL;

f ′(u) if uL = uR = u.

Roe’s method has good entropic shock-capturing properties: if uL, uRmay be connected by an entropic shock, the solution for the exactand approximated Riemann’s problems coincide. The only error is thatof the averaging step.

In particular, stationary shocks are exactly captured.

T. Morales y C. Pares Finite Volume Method 90 / 98

Page 45: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: Roe’s method

As a counterpart: Roe’s method may converge to a non-entropic weaksolution.

This difficulty may be avoided using an entropy fix. For instance, onewell-known approach is given by Harten, which modifies the flux as:

FRoe(uL, uR) =f (uL) + f (uR)

2− 1

2|a(uL, uR)|ε (uR − uL),

where:

|a|ε = |a|+ 0.5

{(1 + sgn(ε− |a|)

)(a2 + ε2

2ε− |a|

)},

where ε is a small parameter.

T. Morales y C. Pares Finite Volume Method 91 / 98

Finite Volume Method: non-linear stability

Lax-Wendroff’s theorem does not assure convergence, it only characterizethe possible limits of the approximations given by the conservative scheme.

To assure convergence, it is necessary to require some stability criterion, asit was the case for linear problems.

The good stability criterion for non-linear problems is related to totalvariation: Let un a piecewise constant function that takes the value uni oneach cell. We call total variation of un to the quantity:

TV (un) =∑i

|uni+1 − uni |. (4.1)

We say that a conservative and consistent scheme is TV-stable if for anyinitial data u0 and for eachT > 0, there exist two positive constants ∆t0,Ksuch that:

TV (un) ≤ K , ∀n ≤ T

∆t,∀∆t ≤ ∆t0.

T. Morales y C. Pares Finite Volume Method 92 / 98

Page 46: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: non-linear stability

It can be proved that a if a conservative and consistent method isTV -stable, the approximations it produces approach weak solutions ofthe problem on a given sense.

One way to assure TV-stability is to require that the scheme diminishtotal variation: we say that a scheme is TVD (Total VariationDiminishing) if for any initial condition u0 and any values ∆t and∆x , we get:

TV (un+1) ≤ TV (un).

TVD methods preserve monotonicity : if un is monotone increasing ordecreasing, un+1 will be the same.

A numerical scheme that preserves monotonicity cannot producespurious oscillations near shocks. As a consequence, Lax-Wendroff’sscheme and their extensions to non-linear problems are not TVD.

T. Morales y C. Pares Finite Volume Method 93 / 98

Finite Volume Method: non-linear stability

If a conservative scheme of 3 points is TVD, then it is of order 1.Then, to build high order methods that are TVD we need to increasethe stencil, the information used to approach the numerical fluxes onthe intercells.

The approximations produced by a conservative scheme that isTV-stable do not necessarily converge to an entropic solution

A family of schemes for which convergence for entropic solutions canbe assured are the so-called monotone schemes: we say that a methodis monotone if:

uni ≤ vni , ∀i =⇒ un+1i ≤ vn+1

i , ∀i .

Godunov and Lax- Friedrichs are monotone under a CFL condition.

T. Morales y C. Pares Finite Volume Method 94 / 98

Page 47: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Finite Volume Method: non-linear stability

Any monotone scheme is TVD and preserves monotonicity.

Nevertheless they have a strong restriction: any monotone schemeresults on a first order scheme.

Finding high order TVD schemes is nowadays an active research topic.

T. Morales y C. Pares Finite Volume Method 95 / 98

Bibliografia I

Edwige Godlewski and Pierre-Arnaud Raviart.Hyperbolic systems of conservation laws.Ellipses, 1991.

Randall J. LeVeque.Numerical Methods for Conservation Laws.Birkhauser, 1992.

Edwige Godlewski and Pierre-Arnaud Raviart.Numerical approximation of hyperbolic systems of conservation laws,volume 118 of Applied Mathematical Sciences.Springer-Verlag, New York, 1996.

Randall J. LeVeque.Finite volume methods for hyperbolic problems.Cambridge Texts in Applied Mathematics. Cambridge University Press,Cambridge, 2002.

T. Morales y C. Pares Finite Volume Method 97 / 98

Page 48: Finite Volume MethodT. Morales y C. Par es Finite Volume Method 1 / 98 Table of contents 1 Conservation laws: introduction 2 Weak Solutions 3 Systems of conservation laws 4 Numerical

Bibliografia II

Eleuterio F. Toro.Riemann solvers and numerical methods for fluid dynamics.Springer-Verlag, Berlin, second edition, 1999.A practical introduction.

Francois Bouchut.Nonlinear stability of finite volume methods for hyperbolicconservation laws and well-balanced schemes for sources.Frontiers in Mathematics. Birkhauser Verlag, Basel, 2004.

T. Morales y C. Pares Finite Volume Method 98 / 98