numerical methods for hyperbolic conservation laws lecture...

41
Numerical Methods for Hyperbolic Conservation Laws Lecture 1 Wen Shen Department of Mathematics, Penn State University Email: [email protected] Oxford, Spring, 2018 Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1 Oxford, Spring, 2018 1 / 41

Upload: others

Post on 15-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Numerical Methods for Hyperbolic Conservation LawsLecture 1

Wen Shen

Department of Mathematics, Penn State UniversityEmail: [email protected]

Oxford, Spring, 2018

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 1 / 41

Page 2: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Course outline; tentative plan

1 Linear Equations

Basic theory, method of characteristics,Weak solutions, Riemann problemsFinite volume method: conservative, BV stability.High resolution methods: shock capturing, flux limiters, slope limitersConvergence, accuracy and StabilityVariable coefficient linear equations

2 Nonlinear equations

Examples: Traffic flow, Euler equation, shallow water equationsWeak solutions, shock formation, vanishing viscosity, entropy conditionsConservative methods: Godunov’s, Lax-Friedrich, E-schemes etc.Nonlinear systems, approximate Riemann solvers,Finite volume methods for nonlinear systems.

3 Additional topics:(if time permits)

Multidimensional problems;Wave front tracking; Center difference scheme;Conservation laws with discontinuous flux and applications.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 2 / 41

Page 3: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Texts:

1 R.J. LeVeque, Numerical Methods for Conservation Laws. Birkauser 1992.

2 R.J. LeVeque, Finite Volume Methods for Hyperbolic Problems, CambridgeUniversity Press, 2002.

3 K.W. Morton and D. F. Mayers, Numerical Solution of Partial DifferentialEquations.

4 H. Holden, and N.H. Risebro, Front Tracking for Hyperbolic ConservationLaws, Springer Verlag, New York 2002.

5 C.-W. Shu, High order ENO and WENO schemes for computational fluiddynamics, Lecture Notes, Springer, (1999), 439-582.

6 E. Tadmor, Approximate solutions of nonlinear conservation laws. Lecturenotes in Mathematics 1697, C.I.M.E. course in Cetraro, Italy. Springer 1998.

7 Class handout of research papers.

Books [2] will be heavily used. Parts of [1] and [3] will be used.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 3 / 41

Page 4: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 4 / 41

Page 5: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Derivation of a conservation law, fluid/gas dynamics

Consider fluid/gas flowing through a 1D pipe.u(x , t): velocityq(x , t): tracer density = mass per unit length in 1D

Given any points x1 < x2:

Q=

∫ x2

x1

q(x , t) dx = total mass on the section [x1, x2]

Conservation of mass: Q(t) changes only due to the flow (flux) at x1 and x2.

Fi (t) =: flux at xi . Rate of mass passing xi per unit time.• Fi > 0: flow to the right• Fi < 0: flow to the left

d

dt

∫ x2

x1

q(x , t) dx = F1(t)− F2(t) : integral form of a conservation law

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 5 / 41

Page 6: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Here, flux at (x , t) = u(x , t) · q(x , t).• Assume u(x , t) is known: flux f (q, x , t) = u(x , t)q. variable coefficient• Assume u(x , t) ≡ u constant: flux f (q) = u · q. linear flux• If u depends on q such that u = u(q): flux f (q) = u(q) · q. nonlinear flux,autonomous, with the most important applications.

Put together: for any x1 < x2

d

dt

∫ x2

x1

q(x , t) dx = f (q(x1, t))− f (q(x2, t)) = −∫ x2

x1

∂xf (q(x , t)) dx

Assume q(x , t) differentiable:∫ x2

x1

[∂

∂tq(x , t) +

∂xf (q(x , t))

]dx , for all x1, x2

Differential form of the conservation law

∂tq(x , t) +

∂xf (q(x , t)) = 0. i.e., qt + f (q)x = 0

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 6 / 41

Page 7: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Advection equation: characteristics

Cauchy problem:qt + uqx = 0, q(x , 0) = q(x)

Explicit solutionq(x , t) = q(x − ut)

Observation:• q(x , t) is constant along rays in space-time for which x − ut = constant• Along the ray X (t) = x0 + ut, we have q(X (t), t) = q(x0).• Values of q advect with constant velocity u.Such rays X (t) are called characteristics.

d

dtq(X (t), t) = qt(X (t), t) + qx(X (t), t) · X ′(t) = qt + uqx = 0.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 7 / 41

Page 8: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Boundary conditions:• If u > 0, BC is needed at x = a, say q(a, t) = g0(t).

Solution:

q(x , t) =

{g0(t − (x − a)/u), a < x < a + u(t − t0)

q(x − u(t − t0)), a + u(t − t0) < x < b

• If u < 0, BC is needed at x = b. Similar treatment.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 8 / 41

Page 9: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Variable coefficients

Assume u = u(x).qt + (u(x)q)x = 0

Characteristic curves X (t): X ′(t) = u(X (t))→ tracks the motion of particles carried along by the fluid

Along X (t):

d

dtq(X (t), t) = qt + X ′(t)qx = qt + u(X (t)) · qx

= qt + (u(X (t)) · q)x − u′(X (t))q = − u′(X (t))q

→ Solution q is NOT constant along characteristics!

NB! The PDE can be solved by solving two ODEs.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 9 / 41

Page 10: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Non-conservative advection equation:

qt + u(x)qx = 0

Characteristics: X ′(t) = u(X (t)) , and q is constant along X (t).

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 10 / 41

Page 11: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Diffusion

At a molecular level, particles tend to spread out, in −∇q direction.

Fick’s law of diffusion in 1D: net flux = −βqx

If u = 0, and β =constant, then

qt = βqxx , (heat equation)

If β = β(x), thenqt = (β(x)qx)x

If it’s in a flow: flux = uq − βqx , and

qt + uqx = βqxx , (advection-diffusion equation)

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 11 / 41

Page 12: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Example in gas dynamics

ρ: gas density. u: velocity

Conservation of mass:

ρt + (ρu)x = 0 (continuity equation)

Conservation of momentum:ρ(x , t)u(x , t) : density of momentumMeaning:

∫ x2

x1ρ(x , t)u(x , t) dx = total momentum on [x1, x2] at t

Momentum flux at (x , t):• advective flux: = (ρu)u = ρu2. (i.e., the momentum carried past (x , t)) –macroscopic• micro-scopic: caused by pressure p

Add up, momentum flux = ρu2 + p

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 12 / 41

Page 13: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Need a third equation for p: equation of state

.Example: isentropic gas where entropy of gas is constant:

p = κργ=P(ρ), (γ ≈ 1.4 for air)

2× 2 system: {ρt + (ρu)x = 0

(ρu)t + (ρu2 + P(ρ))x = 0

orqt + f (q)x = 0

where

q =

(ρρu

)=

(q1

q2

), f (q) =

(ρu

ρu2 + P(ρ)

)=

(q2

(q2)2/q1 + P(q1)

)

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 13 / 41

Page 14: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Quasilinear form

Rewrite qt + f (q)x = 0 asqt + f ′(q)qx = 0

where f ′(q): Jacobian matrix with Ji,j = ∂fi∂qj

.

If f ′(q) = A = constant matrix,

qt + Aqx = 0, (linear system )

Let q ∈ Rm,A ∈ Rm×m.

Definition of hyperbolicity:

The system qt + Aqx = 0 is called hyperbolic if A is diagonalizable with realeigenvalues.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 14 / 41

Page 15: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

This means: A has a set of eigenvalues λ1 ≤ λ2 ≤ · · · ≤ λm,and a complete set of linearly independent right eigenvectors r1, r2, · · · , rmsuch that

A = RΛR−1, R = [r1, r2, · · · , rm], Λ = diag{λ1, λ2, · · · , λm}

One has:

R−1qt + R−1Aqx = 0, [R−1q]t + [R−1AR][R−1q]x = 0

wt + Λwx = 0 where w = R−1q

A decoupled system:

(wp)t + λp(wp)x = 0, p = 1, 2, · · · ,m

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 15 / 41

Page 16: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Special cases of hyperbolic systems:

• A is symmetric: A = AT . A is diagonalizable with real eigenvalues.Symmetric hyperbolic

• A has distinct real eigenvalues λ1 < λ2 < · · · < λm.→ all rp are linearly independent.Strictly hyperbolic

• A has real eigenvalues but not diagonalizable.Weakly hyperbolic

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 16 / 41

Page 17: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Connection to second order wave equation

ptt = c20pxx (2nd order hyperbolic PDE)

Equivalence to first order equation: let

q1 = pt , q2 = −px .

Then(q1)t + c2

0 (q2)x = 0, (q2)t + (q1)x = 0

qt + Aqx = 0, A =

(0 c2

0

1 0

)

λ1 = −c0, λ2 = c0, r1 =

(c0

−1

), r2 =

(c0

1

)⇒ strictly hyperbolic

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 17 / 41

Page 18: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Quasi-linear systems

qt + A(q, x , t)qx = 0 (I )

Definition. (I) is hyperbolic at (q, x , t) if A(q, x , t) satisfies the hyperbolicitycondition at this point.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 18 / 41

Page 19: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Cauchy Problem

qt + Aqx = 0, A = RΛR−1, w = R−1q, wt + Λwx = 0

Initial condition given q(x , 0) = q(x).

Let w(x) = R−1q(x).pth equation:

(wp)t + λp(wp)x = 0,

wp(x , t) = wp(x − λpt, 0) = wp(x − λpt)

q(x , t) = R · w(x , t)

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 19 / 41

Page 20: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Superposition of waves

Then

q(x , t) = R · w(x , t) = [r1, r2, · · · , rm][w1,w2, · · · ,wp]T =m∑

p=1

wp(x , t)rp

→ superposition of waves of different familiesdecompose q in the space spanned by {rp}wp(x , t)=strength of pth wave. (eigen-coefficient)Advected with speed λp, along line X (t) = x0 + λpt

Definition. X (t) with X ′(t) = λp is called the characteristic of the pth family, orp-characteristics.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 20 / 41

Page 21: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Left eigenvalues

LetL = R−1

`1, `2, · · · , `m: rows of L`pA = λp`p

Thenw = R−1q = Lq, wp = `pq

Solution

q(x , t) =m∑

p=1

[`p q(x − λpt)] rp

Solution of linear equations: Superposition of m waves, each wave travelsindependently with no change in shape.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 21 / 41

Page 22: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Simple waves

pth wave:shape: wp(x)rpspeed: λp

Given an index i . If the initial data is given such that

wp(x) ≡ wp(constant) for p 6= i

thenq(x , t) = wi (x − λi t)ri +

∑p 6=i

wprp = q(x − λi t)

→ Initial data propagates with speed λi .

This is called a simple wave.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 22 / 41

Page 23: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Domain of dependence and range of influence

Take m = 3 for example, and assume λ1 < 0 < λ2 < λ3.

NB! Finite propagation speed given bounded domain of dependence and range ofinfluence. (leads to stability conditions in numerical methods)

Different from diffusion equation.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 23 / 41

Page 24: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Riemann Problems for linear hyperbolic systems

• If q(x) is smooth, so is the solution q(x , t)• If q(x) has a jump, we allow it to propagate along various characteristics

Riemann initial data:

q(x) =

{ql , x < 0

qr , x > 0

For m = 1, scalar equation qt + uqx = 0, we have

q(x , t) = q(x − ut).

For m ≥ 2: decompose ql , qr as

ql =m∑

p=1

wl,prp, qr =m∑

p=1

wr ,prp

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 24 / 41

Page 25: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

pth advection equation

(qp)t + λp(qp)x = 0, I.C. wp(x) =

{wl,p, x < 0

wr ,p, x > 0

which gives

wp(x , t) = wp(x − λpt) =

{wl,p, x − λpt < 0

wr ,p, x − λpt > 0

The jumps are traveling with 3 velocities.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 25 / 41

Page 26: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Across the pth characteristics, the jump in q is

(wr ,p − wl,p)rp=αprp

NB! The jump is an eigenvector of A.Idea can be generalized to nonlinear systems.

Summarize:• Decompose the initial jump qr − ql into eigenvectors of A

qr − ql = α1r1 + · · ·+ αmrm, where αp = `p(qr − ql)

• Jump in the pth wave is Wp = αprp.• Solution

q(x , t) = ql +∑

p:λp<x/t

Wp = qr −∑

p:λp>x/t

Wp = ql +∑p

H(x − λpt)Wp

H(x): Heaviside function

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 26 / 41

Page 27: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Phase plane for m = 2, q = (q1, q2), and λ1 < λ2

Observations:• A discontinuity with ql , qr as left and right states can propagate as a singlejump (simple wave) only if qr − ql is an eigenvector of A.

• Self-similar, i.e., solution is constant along any rays x/t = ξ.

• ql is connected in r1 direction, while qr is connected in r2 direction

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 27 / 41

Page 28: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

How to locate qm in the phase plane:

For m > 2: similar ideas, but hard to draw.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 28 / 41

Page 29: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Finite Volume Methods

qt + f (q)x = 0, f (q) = Aq

Uniform mesh: (∆x ,∆t) :

xi− 12

= ∆x(i − 1

2), tn = n∆t

Grid cell: Ci = (xi− 12, xi+ 1

2)

Cell average:

Qni ≈

1

∆x

∫ xi+ 1

2

xi− 1

2

q(x , tn)dx =1

∆x

∫Ci

q(x , tn)dx

Apply conservation law on Ci :

d

dt

∫Ci

q(x , t)dx = f (q(xi− 12, t))− f (q(xi+ 1

2, t))

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 29 / 41

Page 30: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Integrate over [tn, tn+1] in t:∫Ci

q(x , tn+1)dx −∫Ci

q(x , tn)dx =

∫ tn+1

tn

f (q(xi− 12, t))dt −

∫ tn+1

tn

f (q(xi+ 12, t))dt

Divided by ∆x :

Qn+1i = Qn

i −1

∆x

[∫ tn+1

tn

f (q(xi+ 12, t))dt −

∫ tn+1

tn

f (q(xi− 12, t))dt

]= Qn

i −1

∆x

[∆t · Fi+ 1

2−∆t · Fi− 1

2

]where

Fi+ 12=

1

∆t

∫ tn+1

tn

f (q(xi+ 12, t)) dt (average flux)

=⇒ Qn+1i = Qn

i −∆t

∆x

[Fi+ 1

2− Fi− 1

2

]Fi+ 1

2: numerical flux

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 30 / 41

Page 31: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Numerical flux: It is natural to assume that Fi− 12

= F(Qni−1,Q

ni )

⇒ Qn+1i = Qn

i −∆t

∆x

[F(Qn

i ,Qni+1)−F(Qn

i−1,Qni )]

⇒ explicit, conservative, 3-point computation stencil

(i ,n)(i−1,n) (i+1,n)

(i ,n+1)

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 31 / 41

Page 32: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Conservative method

Summing ∆xQn+1i over any set of consective cells

∆xJ∑

i=I

Qn+1i = ∆x

J∑i=I

Qni −∆t

[FJ+ 1

2− FI− 1

2

](intermediate terms all cancel out!)

⇒: Over the full domain, we have exact conservation except for fluxes at theboundaries!

View the method as FDM:

Qn+1i − Qn

i

∆t+

Fi+ 12− Fi− 1

2

∆x= 0

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 32 / 41

Page 33: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

The diffusion equation

qt = (β(x)qx)x

flux: f (qx , x) = −β(x)qx

numerical flux:

F(Qi−1,Qi ) = −βi− 12· Qi − Qi−1

∆x, βi− 1

2≈ β(xi− 1

2)

⇒ FDM:

Qn+1i = Qn

i +∆t

∆x2

[βi+ 1

2(Qn

i+1 − Qni )− βi− 1

2(Qn

i − Qni−1)

]If β ≡constant:

Qn+1i = Qn

i +∆t

∆x2β[Qn

i+1 − 2Qni + Qn

i−1

]

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 33 / 41

Page 34: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Crank-Nicolson method

Numerical flux:

F ni− 1

2= F(Qi−1,Qi ) = − 1

∆xβi− 1

2· 1

2

[(Qn

i − Qni−1) + ((Qn+1

i − Qn+1i−1 )

]This gives

Qn+1i = Qn

i +∆t

2∆x2

[βi+ 1

2(Qn

i+1 − Qni )− βi− 1

2(Qn

i − Qni−1)

+βi+ 12(Qn+1

i+1 − Qn+1i )− βi− 1

2(Qn+1

i − Qn+1i−1 )

]

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 34 / 41

Page 35: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Conditions on numerical flux

Consistency:

If Qni−1 = Qn

i = q, then F = f (q), i.e., F(q, q) = f (q)

Continuity:

There exists a constant L so that

|F(Qi−1,Qi )− f (q)| ≤ L ·max{|Qi − q|, |Qi−1 − q|}

Consistency and Continuity are necessary for convergence.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 35 / 41

Page 36: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Numerical domain of dependence, stability condition

Consider explicit 3-point stencil FDM:

Domain of dependence determined by ∆t/∆x .

A necessary stability condition:

A numerical method can be converged only if its numerical domain of dependencecontains the true domain of dependence of the PDE.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 36 / 41

Page 37: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Example: qt + uqx = 0 with a 3-point stencil method.∣∣∣∣∆t

∆x

∣∣∣∣ ≤ ∣∣∣∣1u∣∣∣∣ , ν=

∣∣∣∣ u∆t

∆x

∣∣∣∣ ≤ 1

ν: the Currant number

⇒ The CFL condition

For system: ν = ∆t∆x ·maxp |λp|

3-point stencil: CFL condition is ν ≤ 1

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 37 / 41

Page 38: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

The Lax-Friedrichs method

qt + f (q)x = 0, f (q) = Aq

Qn+1i =

1

2(Qn

i−1 + Qni+1)− ∆t

2∆x(f (Qn

i+1)− f (Qni−1))

(This looks more like a FDM. Actually also FVM with central scheme)

numerical flux:

F(Qni−1,Q

ni ) =

1

2[f (Qn

i−1) + f (Qni )]− ∆x

2∆t[Qn

i − Qni−1]

CFL condition: ν ≤ 1

consistency: F(q) = 12 (f (q) + f (q))− 0 = f (q)

Accuracy (formally): first order in t, second order in x .

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 38 / 41

Page 39: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

An unstable flux

A naive attempt for numerical flux

F(Qni−1,Q

ni ) =

1

2[f (Qn

i−1) + f (Qni )]

Scheme:

Qn+1i = Qn

i −∆t

2∆x[f (Qn

i+1)− f (Qni−1)]

Unfortunately, the method is generally unstable, even with CFL condition.

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 39 / 41

Page 40: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

REA (Reconstructed-evolve-average) algorithm

Example: qt + uqx = 0, u > 0

∆xQn+1i = ∆tuQn

i−1 + (∆x −∆tu)Qni

= ∆xQni −∆tu(Qn

i − Qni−1)

Denote the wave (i.e., the jump)

Wni− 1

2= Qn

i − Qni−1

If u > 0:

Qn+1i = Qn

i −∆tu

∆xWn

i− 12

If u < 0:

Qn+1i = Qn

i −∆tu

∆xWn

i+ 12

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 40 / 41

Page 41: Numerical Methods for Hyperbolic Conservation Laws Lecture 1personal.psu.edu/wxs27/NotesNumCons/Lecture1.pdf · Finite volume methods for nonlinear systems. 3 Additional topics:(if

Combine both cases into one formula: let

u+= max(u, 0), u−= min(u, 0)

F ni− 1

2= u−Qn

i + u+Qni−1

Qn+1i = Qn

i −∆t

∆x

[u+Wi− 1

2+ u−Wi+ 1

2

]Special case: if ν = u ∆t

∆x = 1, it gives the exact solution!

Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Lecture 1Oxford, Spring, 2018 41 / 41