Docsity

Hyperbolic Conservation Law - Lecture Notes | MAT 228C, Study notes of Mathematics

Toggle sidebar
bg1
Chapter 1
Hyperbolic Conservation Law
1.1 Introduction
The hyperbolic conservation law is of the form
q+ (f(q))x= 0,
where qis the conserved quantity and f(q) is the flux function. Assume that fis convex, i.e., f′′(q)>0 for
all q, or f′′(q)<0 for all q.
In higher dimension,
qt+∇ · F(q) = 0.
E.g., in 2D, F=f
g,
qt+ (f(u))x+ (g(q))y= 0.
For systems
qt+∇ · F(q) = 0
is hyperbolic if the Jacobian of F:
Jij =∂Fi
∂qj
has real eigenvalues and is diagonalizable.
We studied the linear case f(q) = aq, which yields the linear advection equation
qt+aqx= 0.
Now we study the nonlinear case, e.g., Burgers equation
ut+uux=ǫuxx viscus Burgers equation
ut+uux= 0 ,or ut+ ( 1
2u2)x= 0 inviscid Burgers equation
The viscus Burgers equation is a model for Navier-Stokes equations.
1.2 Traffic Flow Model
Here we begin with a traffic flow model. Let ρbe the density of cars. The flux is f(ρ) = uρ. If uis constant,
we have linear advection. Observe that ushould decrease as ρgoes up.
A simple model: u=umax (1 −ρ), 0 ≤ρ≤1, with flux f(ρ) = umax(1 −ρ)ρ, and we have the equation
ρt+ (umax(1 −ρ)ρ)x= 0.
What does the solution do? Recall that we solved the linear advection equation
ρt+aρx= 0
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Hyperbolic Conservation Law - Lecture Notes | MAT 228C and more Study notes Mathematics in PDF only on Docsity!

Chapter 1

Hyperbolic Conservation Law

1.1 Introduction

The hyperbolic conservation law is of the form

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

where q is the conserved quantity and f (q) is the flux function. Assume that f is convex, i.e., f ′′(q) > 0 for all q, or f ′′(q) < 0 for all q. In higher dimension, qt + ∇ · F (q) = 0.

E.g., in 2D, F =

[

f g

]

qt + (f (u))x + (g(q))y = 0. For systems qt + ∇ · F (q) = 0

is hyperbolic if the Jacobian of F :

Jij =

∂Fi ∂qj

has real eigenvalues and is diagonalizable. We studied the linear case f (q) = aq, which yields the linear advection equation

qt + aqx = 0.

Now we study the nonlinear case, e.g., Burgers equation

ut + uux = ǫuxx viscus Burgers equation

ut + uux = 0 , or ut + (

u^2 )x = 0 inviscid Burgers equation

The viscus Burgers equation is a model for Navier-Stokes equations.

1.2 Traffic Flow Model

Here we begin with a traffic flow model. Let ρ be the density of cars. The flux is f (ρ) = uρ. If u is constant, we have linear advection. Observe that u should decrease as ρ goes up. A simple model: u = umax(1 − ρ), 0 ≤ ρ ≤ 1, with flux f (ρ) = umax(1 − ρ)ρ, and we have the equation

ρt + (umax(1 − ρ)ρ)x = 0.

What does the solution do? Recall that we solved the linear advection equation

ρt + aρx = 0

by noting that ρ is constant along characteristic curves x = at + x 0. The solution to the problem is

ρ(x, t) = ρ(x − at, 0).

Can we adapt this idea to the nonlinear case? In the linear case: x(t) = at + x 0. d dt

ρ(x, t)

dx dt

ρx + ρt = ρt + dx dt

ρx.

If d dxt = a, x(t) = at + x 0 , then (^) ddt

ρ(x, t)

= 0 and the solution is constant on the characteristics. Try this idea for the nonlinear problem

ρt +

f (ρ)

x = 0^ conservation form, or ρt + f ′(ρ)ρx = 0 quasilinear form.

We look for characteristics x(t) from observing that

d dt

ρ(x, t)

= ρt + dx dt

ρx = 0 if dx dt

= f ′(ρ(x(t), t)).

This says that the solution is constant on characteristics; d dxt = const = f ′(ρ(ξ, 0)), and so the characteristics are again straight lines. x(t) = f ′(ρ 0 (ξ))t + ξ.

The slope of characteristics depends on the initial condition. Let ρ(ξ, 0) = ρ 0 (ξ). We solve for ξ from the characteristics and ρ, i.e., solve

x = f ′(ρ 0 (ξ))t + ξ ρ(x, t) = ρ 0 (ξ)

for ξ given x and t and then we can evaluate the solution.

Example. umax = 1, f (ρ) = ρ(1 − ρ), f ′(ρ) = 1 − 2 ρ. Slope in the x-t plane is (^1) − 21 ρ 0 (ξ). We have characteristic cross.

Let S(t) is the spatial location of the shock. The conservation law says

f (ρ(x 1 , t)) − f (ρ(x 2 , t)) = d dt

∫ (^) x 2

x 1

ρ(x, t) dt

d dt

S(t)

x 1

ρ dx +

∫ (^) x 2

S(t)

ρ dx

∫ (^) S(t)

x 1

ρt dx +

∫ (^) x 2

S(t)

ρt dx + S′(t) ·

ρ(S−, t) − ρ(S+, t)

Now take the limits as x 1 → S−, x 2 → S+. The integrals of ρt go to zero and

S′(t) =

f (ρ(S+, t)) − f (ρ(S−, t)) ρ(S+, t) − ρ(S−, t)

[f ] [ρ]

is the shock speed. This is called the Rankine-Hugoniot jump condition.

How to develop numerical schemes that capture the right shock speed? How to upwind?

qt + f ′(q)qx = 0

Try to pick the direction of the spatial difference based on the local velocity. This works as long as the solution is smooth, but it might give the wrong solution when there is a shock. E.g., Burgers equation

ut + (

u^2 )x = 0 , or ut + uux = 0,

u(x, 0) =

2 x ≤ 0 − 1 x > 0

The solution contains a shock with shock speed

1 2 u

2 R −^ 1 2 u

2 L uR − uL

uR + uL 2

Try upwinding the quasilinear form. xJ = 0, upwinding quasilinear form u(xJ , 0) > 0,

un J+1 = unJ −

∆t h

unJ

0 ︷ ︸︸ ︷ (unJ − unJ− 1 ) = unJ

un J+1+1 = unJ+1 −

∆t h

< 0 ︷ ︸︸ ︷ unJ+

0 ︷ ︸︸ ︷ (unJ+2 − unJ+1) = unJ

The discrete solution is unj = u^0 j for all j, n, which is unphysical. Because the shock speed is determined by conservation, this suggests that we should use the numerical schemes that respect conservation and the conservation form, i.e., use finite volume method

q jn +1= qnj −

∆t h

F (^) jn+ 1 2 − F (^) jn− 1 2

where q is an average of some function in an interval and

F (^) jn− 1 2

∆t

∫ (^) tn+

tn

f (q(xj− 12 , t)) dt.

1.3 Godunov Scheme

Godunov scheme is one of the REA algorithms.

  1. Reconstruct: Piecewise constant, easy reconstruction.
  2. Evolve: As long as time steps are small enough we only need to solve the Riemann problem at each edge.
  3. Average:

The Riemann problem is of the form

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

qL x ≤ 0 qR x > 0

For Godunov method, we only need the flux at the edge. There are five cases to consider:

  • Shock to the right.
  • Shock to the left.
  • qL > qR > 0
  • qL < qR < 0 In all above cases the solution on the edge (x = 0) is constant (qL or qR) in time.

For Burger’s equation ut + uux = 0, f ′(u) = u, u = x t on the fan. Thus,

u(x, t) =

uL x t ≤ uL x t uL^ <^

x t < uR uR x t ≥ uR

The solution at x = 0 is constant with values qS where f ′(qS ) = 0. For Burgers equation uS = 0.

Godunov scheme F (^) jn− 12 =

∆t

∫ (^) tn+

tn

f (q(xj− 12 , t)) dt.

This is all we need for Godunov scheme. In all five cases the solution is constant on the edges. Algorithm:

  1. Solve the Riemann problem at each edge to determine edge values.
  2. Evaluate the flux at the edges.
  3. Flux difference to update the solution.

F (qL, qR) = f (q∗)

  • f ′(qL), f ′(qR) ≥ 0 =⇒ q∗^ = qL.
  • f ′(qL), f ′(qR) ≤ 0 =⇒ q∗^ = qR.
  • f ′(qL) ≤ 0 ≤ f ′(qR) =⇒ q∗^ = qS where f ′(qS ) = 0.
  • f ′(qL) ≥ 0 ≥ f ′(qR) =⇒ q∗^ =

qL S > 0 qR S < 0

, S =

{ (^) f (q R )−f^ (qL ) qR −qL qR^6 =^ qL f ′(qL) qR = qL

For piecewise constant reconstruction, the solution on the edge is constant if the time step is small enough.

  • Given cell centered values, determine the edge values by solving Riemann problems at each edge q∗ q− 1 2
  • Evaluate the flux F (^) jn− 1 2 = f (q∗ q− 1 2
  • Flux difference.

This is the generalization of upwinding for conservation laws. This method is only first order accurate. This is diffusive and we get smearing of smooth solutions. We like to use methods that are

  • second order accurate when the solution is smooth.
  • captures the right shock.
  • not introducing oscillations near shock.

Conservative form with the correct Riemann solver will ensure that we get the right shock. For systems the Riemann problems may be difficult or expensive to solve. We often use an approximate Riemann solver. Be careful to get the right solution. A natural to generalize REA to higher order is to use the piecewise linear reconstruction. This is difficult to solve exactly; E in REA is hard. There are different way to achieve higher order.

Wave Propagation Idea

For linear advection equation qt + aqx = 0,

Fj− 12 = F (^) jUP− 1 2

|a| 2

∆t h

|a|

δqj− (^12)

where δqj− 12 is the limited version of ∆qj− 12 = qj − qj− 1.

δqj− 12 = φ(θj− 12 )∆qj− 12 ,

θj− 12 =

∆qJup − 1 ∆qj− (^12)

, Jup =

j − 1 a > 0 j + 1 a < 0

(look upwindingly) where φ is the limiter function, 0 ≤ φ ≤ 2. For nonlinear problem,

Fj− 12 = F (^) jGodunov− 12 +

∣Sj− (^12)

∆t h

∣Sj− (^12)

δqj− (^12)

where Sj− 12 is the local wave speed:

Sj− 12 =

f (qj ) − f (qj− 1 ) qj − qj− 1

qj− 1 6 = qj

f ′(qj ) qj− 1 = qj

at the edge. Why this speed for the correction? Rather than use a piecewise linear reconstruction for the function q, we will use a piecewise reconstruction of the flux f.

The wave speed is the derivative of the flux function f ′(q) which is constant near the edges for small time steps.

Fj− 12 =

∆t

∫ (^) tn+

tn

f (q(xj− 12 , t)) dt.

Use the PDE to place the qt, i.e., qt = −f ′(q)qx. Thus

q jL− 1 2 = qjn− 1 +

∆t h

f ′(qnj− 1 )

hqx(xj− 1 , tn) + h.o.t.

q jR− 12 = qjn −

∆t h f ′(qjn )

hqx(xj , tn) + h.o.t.

Use limited differences to approximate this to get high-resolution scheme. E.g., MC limited difference between forward, backward, and centered difference.

1.4 Weak Solutions

Discontinuous functions cannot be solutions to qt + f (q)x = 0 or qt + f ′(q)qx = 0 since they are not differentiable. The original conservation law is in the integral form

d dt

∫ (^) x 2

x 1

q dx = f (q(x 1 , t)) − f (q(x 2 , t)).

∫ (^) t 2

t 1

∫ (^) x 2

x 1

qt + f (q)x dx dt = 0.

To get the PDE. the above integral holds for all [x 1 , x 2 ] and [t 1 , t 2 ].

∫ (^) ∞

0

−∞

(qt + f (q)x ) ϕ dx dt

where

ϕ(x, t) =

1 (x, t) ∈ [x 1 , x 2 ] × [t 1 , t 2 ] 0 otherwise.

We generalize by using φ that is C 1 in space and time and compactly supported (zero outside of a compact set). Now integrate by parts,

∫ (^) ∞

0

−∞

qφt + f (q)φx dx dt = −

−∞

q(x, 0)φ(x, 0) dx.

If q solves the above equation for all φ ∈ C^01 , then it is a weak solution.

  • (Classical) solutions to the PDE are weak solutions.
  • Shocks can be weak solutions but not classical solutions.
  • Weak solutions may not be unique. Eg., the shock solution

q(x, t) =

qL x < tS qR x > tS

, S =

f (qR) − f (qL) qR − qL

is always a weak solution if f ′(qL) < 0 and f ′(qR) > 0, we expect a fan.

Figure 1.1: Left: Fan. Right: Expanding shock

What is the right weak solution? Add a small “viscous” term:

qt + f (q)x = ǫqxx , ǫ ≪ 1.

This term will keep the solution smooth.

As ǫ → 0, we get the vanishing viscosity solutions. This is the right weak solution. Finding the vanishing viscosity solution can be difficult. What is entropy solution that ensures we get the right solution? Lax entropy condition for scalar convex conservation laws. A shock propagating with speeds satisfies

f ′(qL) > S > f ′(qR).

This means that the characteristics must go into the shock (no expansion shock). How do we know our numerical method gives the right shock?

Theorem (Lax-Wendroff Theorem). If the numerical solution of a consistent and conservative scheme converges, then it converges (in 1-norm) to weak solution. For convergence, we need stability. If a method is consistent, conservative, and stable, it converges to weak solution.

One type of stability is total variation stability (TV-stable). TV(qn) :=

j

∣qnj − qjn− 1

∣. A conservative

method is TV-stable if for each initial condition, there exists a ∆t 0 and R > 0 such that

TV(qn) ≤ R

for all n, ∆t with ∆t ≤ ∆t 0 and n∆t ≤ T. TVD methods converge. Godunov scheme, a generalized scheme of upwinding scheme, gives the entropy solution provided the Riemann solver satisfies the entropy condition. Monotone methods: a method is monotone if vnj ≥ unj for all j implies vn j +1 ≥ un j +1 for all j. A consistent monotone method converges to the entropy solution as ∆t → 0 with ∆t/h fixed. (proof is to show the behavior of the viscous term in the modified equation). Monotone methods are at most first order. Example: Godunov, Lax-Friedrichs, Local Lax-Friedrichs. The last two methods needs no Riemann Solvers.

1.5 Multiple Dimension

qt + (f (q))x = 0 in 1D. In higher dimension.

qt + ∇ · (F (q)) = 0.

For example in 2D, F (q) =

[

f (q) g(q)

]

where f and g are fluxes in x and y direction respectively.

∇ · (F (q)) = (f (q))x + (g(q))y ,

qt + (f (q))x + (g(q))y = 0

E.g., advection of q by velocity u = (u, v)T,

qt + ∇ · (uq) = 0 , or qt + (uq)x + (vq)y = 0.

If ∇ · u = 0 (incompressible), we have q∇ · u = 0 and

qt + u · ∇q = 0 , or qt + u∂xq + v∂y q = 0.

The corner transport upwind scheme is stable provided

∆t ≤ h max(|u| , |v|)

For variable velocity, we need to update the fight flux according to the sign of the velocity. Define

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

Start with all fluxes equal zero: Fi− 12 ,j = 0, Gi,j− 12 = 0 for all i, j.

  1. Compute the (normal) upwind flux:

Fi− 12 ,j := Fi− 12 ,j + u+ i− 1 2 ,j^ qi− 1 ,j + u− i− 1 2 ,j^ qi,j

  1. Add transverse corrections to G:

Gi− 1 ,j+ 12 := Gi− 1 ,j+ 12 −

∆t h u− i− 1 2 ,j^ v+ i− 1 ,j+ 1 2 (qi,j − qi− 1 ,j ).

Gi,j+ 12 , Gi− 1 ,j− 12 , Gi,j− 12 are similar.

Same for other direction, normal propagation in y with transverse correction in x.

How to get a high-resolution method? We need to capture qxx and qyy terms (second order corrections in the normal direction) in the Taylor series.

Fi− 12 ,j := Fi− 12 ,j +

∣ui− 12 ,j

∆t h

∣ui− 12 ,j

δqi− 12 ,j ,

and same for Gi,j− 12. We can also use the idea of time and space extrapolation from both sides of each edge, followed by the Riemann solver. E.g.,

q L,n+ (^12) i+ 12 ,j =

upwinding ︷︸︸︷ qni,j +

limited difference ︷ ︸︸ ︷ 1 2

u∆t h

)h(qxn )i,j −

transverse propagation ︷ ︸︸ ︷ v 2

∆t h

upwinding ︷ ︸︸ ︷ (qny )i,j^.