chp 3: scalar advection and linear hyperbolic...

74
Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw S. Balsara 1

Upload: others

Post on 19-May-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Chp 3: Scalar Advection and Linear Hyperbolic Systems

ByProf. Dinshaw S. Balsara

1

Page 2: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.1) Introduction

We have seen the need for consistency and stability in FDAs of PDEs. However, for the advection equation, which is linear, the approach failed badly for square pulses. We study why in this chapter.

Our analysis is based on a pictorial approach for advection. Concept of total variation diminishing (TVD) schemes that is later formalized.

Need two insights for treating systems:1) How to treat linear hyperbolic systems w/o oscillations (this chapter).2) How to deal with non-linearities in the hyperbolic system (next 3 chapters).

Will also discuss the Riemann problem for linear hyperbolic systems.

These topics are important building blocks that will be used over and over again later in scheme design. Also address boundary conditions.2

Page 3: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.2) Qualitative Introduction to Non-Linear Hybridization for Scalar AdvectionThe Dilemma: Godunov’s theorem : There are no linear, second order schemes for treating linear advection which would always remain positivity preserving. Free of oscillations monotinicity preserving.

The Way Out: van Leer designed inherently non-linear schemes for treating the linear advection problem, thereby escaping the clutches of Godunov’s theorem!

We follow Godunov’s original idea of literally moving slabs of fluid in order to show the evolution of fluid from time tn to tn+1 = tn + ∆t .

We focus on what happens to the discontinuity in the ith zone when we do that. Consider ∆x = 1 and ∆t = 0.4 , i.e. CFL of 0.4.

The blue represents the fluid (i.e. flux) that flows into zone i . The pinkrepresents the flux flowing out of the same zone i. 3

Page 4: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

4

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

−1

1uni

+−

1uni

+

11un

i+

+ 12un

i+

+

Questions: Can we develop a notion of monotonicity preserving advection?Can we visually show that this advection is monotonicity preserving?

Page 5: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

1/21/2 1

1/21/2

1 1/2 1/21/2 1/2

Time average of left flux : f = (a ) u

Time average of right flux : f = (a ) u

Conservation law in integral form : u u f f

n ni i

n ni i

n n n ni i i i

t t

t t

x x t t

+− −

++

+ + +− +

∆ ∆

∆ ∆

∆ = ∆ + ∆ − ∆

( ) ( )11 1 u u u u = u u

Question: What can you say about for the above sc e?

1

hem

n n n n n ni i i i i i

positivity

µ µµ+− −⇔ − − −= +

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

−1

1uni

+−

1uni

+

11un

i+

+ 12un

i+

+

5

Page 6: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

6

1/21/2 1

1/21/2

1 1/2 1/21/2 1/2

Time average of left flux : f = (a ) u

Time average of right flux : f = (a ) u

Conservation law in integral form :

u u f f

n ni i

n ni i

n n n ni i i i

t t

t t

x x t t

+− −

++

+ + +− +

∆ ∆

∆ ∆

∆ = ∆ + ∆ − ∆ ⇔ ( ) ( )11 1 u u u u = 1 u un n n n n n

i i i i i iµ µ µ+− −= − − − +

Page 7: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We see by sheer construction that the first order upwind scheme will produce no new extrema because each mesh point at tn+1 is a convexcombination of two neighboring mesh points at time tn .

A scheme with such a property of not generating any new extrema in the solution that were not present initially is called a monotonicitypreserving scheme.

We wish to explore monotonicity preserving schemes which are second order accurate extensions of the first order upwind scheme.

To get to second order accuracy, endow slabs with slopes. 3 choices:1) Left-biased 2) Central difference 3) Right-biased

Formally, this is called reconstruction . We are carrying out piecewise linear reconstruction. Reconstruction is an important building block in scheme design. We have:

( ) ( )uu u u is called a " " or undivided differencen

nin nii i i slopex x x

x∆

= + − ← ∆∆ 7

Page 8: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

8

Questions: Can we visually show that this second order advection is not monotonicity preserving?

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

11un

i+

1uni

+

11un

i+

+ 12un

i+

+

Page 9: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( )

( )

1/211/2 1

1/21/2

1

1Time average of left flux : f = (a ) u 1 u21Time average of right flux : f = (a ) u 1 u2

Conservation law in integral form : u u

nn nii i

nn nii i

ni i

t t

t t

x x

µ

µ

+−− −

++

+

∆ ∆ + − ∆ ∆ ∆ + − ∆

∆ = ∆

( ) ( )( )1/2 1/2

1/2 1/2

111

f f

positiv

u u u u 1 u u2

Question: What can you say about for the above schemei y ?t

n n ni i

n nn n n ni ii i i i

t tµµ µ

+ +− +

+−−

+ ∆ − ∆

⇔ = − − − − ∆ − ∆

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

11un

i+

1uni

+

11un

i+

+ 12un

i+

+

9

Page 10: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

10

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

11un

i+

1uni

+

11un

i+

+ 12un

i+

+

a t∆

ub

uc

( ) ( )b c1A = a t u u2

∆ +

Page 11: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

11

( )

( )

1/211/2 1

1/21/2

1

1Time average of left flux : f = (a ) u 1 u21Time average of right flux : f = (a ) u 1 u2

Conservation law in integral form : u u

nn nii i

nn nii i

ni i

t t

t t

x x

µ

µ

+−− −

++

+

∆ ∆ + − ∆ ∆ ∆ + − ∆

∆ = ∆

( ) ( )( )1/2 1/2

1/2 1/2

111

f f

u u u u 1 u u2

n n ni i

n nn n n ni ii i i i

t tµµ µ

+ +− +

+−−

+ ∆ − ∆

⇔ = − − − − ∆ − ∆

Page 12: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We see that we have generated a new extremum.

Right slopes yield Lax-Wendroff scheme; central slopes yield Fromm scheme; left slopes yield Beam-Warming scheme. All choices are ill!

The only solution lies in restricting, i.e. limiting, the piecewise linear profile within each zone so that it does not produce any new extrema in the advected profile that were not initially present in the original slabs of fluid.

Such limiters are called slope limiters. A simple example – the MinModlimiter (i.e. choose between the left and right slopes based on which one is smaller; 0 if opposite slopes) :

There are several other/better limiters in the text. All limiters are non-linear.

Thus success on linear advection came at the cost of non-linear hybridization.

( ) ( )( ) ( )1 1 1 11u sgn u u sgn u u min u u , u u2

n n n n n n n n ni i i i i i i i i+ − + −∆ = − + − − −

12

Page 13: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

a b

a t∆

i-2 i-1 i i+1 i+2 i-2 i-1 i i+1 i+2

2uni− 1un

i−

uni

1uni+ 2un

i+

12un

i+

−1

1uni

+−

1uni

+

11un

i+

+ 12un

i+

+

Question: Based on the minmod limiter, justify the slopes in the profile to the left.

With limiter, the spurious extrema are gone!

This does come at a price: The order of the method is locally reduced by a limiter in those zones where it is activated. The limiter achieves its salutary effect by providing strong dissipation (and order reduction) where it is needed to prevent dispersive ripples that would otherwise form in a second order scheme. 13

Page 14: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

a b

Notice that the square pulse is oscillation free. However, the top of the Gaussian has been clipped!Even the Lax-Wendroff scheme did better than the non-linearly hybridized schemes. The reason :

Limiter

1

1

Can't tell the difference between a

physical extremum

u u left

and a s

slope only examines the ratio : = u u right slope

. Whe

purious oscillation , the limiter reduces to central di1

n

i

n ni i

i n ni i

θ

θ −

+

−= ⇒

fference, which is good and stable.When , slopes are truncated, whether that is g1 or 1 ood or not.i iθ θ

14

Page 15: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

a b

All limiters clip extrema. The better ones, like the MC limiter shown above, fare better. However, even the MC limiter clips the top of the Gaussian.

Only recourse lies in schemes like WENO or PPM with larger stencils.

We call the MC limiter a compressive limiter because it allows the scheme to use larger slopes. As a result, it yields a sharper profile. 15

Page 16: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Comparing reconstuction by MinMod limiter to MC limiter. Latter produces steeper slopes sharper profiles.

Questions: Can you justify the slopes to the left and right based on the form of the limiters? Dissipation α jumps. Which limiter dissipates less?

( ) ( ) ( )( ) ( )

( ) ( ) ( )( )1 1 1 1 1 1

1 1 1 1 1 1 1 1

1u minmod u u , u u = sgn u u sgn u u min u u , u u2

1 1u MC u u , u u sgn u u sgn u u min u u ,2 u u ,2 u u2 2

n n n n n n n n n n n n ni i i i i i i i i i i i i

n n n n n n n n n n n n n n ni i i i i i i i i i i i i i i

+ − + − + −

+ − + − + − + −

∆ = − − − + − − −

∆ = − − = − + − − − −

16

Page 17: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.3) The Total Variation Diminishing Property and Understanding the LimitersMonotonicity preserving property is hard to formulate mathematically; total variation diminishing (TVD) is much easier to formulate.

A TVD scheme is monotonicity preserving – Harten. Helps with positivity.

{ }

( )

( ) ( )

1 1

1

1

For a mesh function u ..., u , u , u , .... at time we define the

as:

TV u = u u

We say that the scheme is (TVD) if we have:

TV u TV u

n n n n ni i i

n n ni i

i

n n

t

total variation

total variation diminishing

− +

+=−∞

+

Check out the graph to see that the scheme is not TVD.If it were TVD, could the wiggles arise?Question: Can you evaluate TV for the plot to the right?

17

Page 18: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) ( )1, 1/2 1 , 1/2 1

, 1/2 , 1/2

Harten realized that many update schemes can be written as:

u u u u u u

If the scheme is - , and may have stronglynon-linear de

n n n n n ni i i i i i i i

i i

C C

non linearly stabilized C C

+− − − + + +

− − + +

= − − + −

, 1/2 , 1/2 , 1/2 , 1/2

11

pendence on the mesh function.

' : When 0, 0 and 1 for all zones "i", the scheme is TVD.

Proof: By shifting indices in the above equation we get

u

i i i i

ni

Harten s Theorem C C C C− − + + − − + +

++

≥ ≥ + ≤

= ( ) ( )

( ) ( )( )( )

1 , 1/2 1 , 3/2 2 1

1 11 , 1/2 1 , 1/2 , 1/2 1

, 3/2 2 1

u u u u u

subtracting one from the other we write:

u u u u + 1 u u

+ u u

n n n n ni i i i i i i

n n n n n ni i i i i i i i i

n ni i i

C C

C C C

C

+ − + + + + + +

+ ++ − − − − + + + +

+ + + +

− − + −

− = − − − −

18

Page 19: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) ( )1 1 11 , 1/2 , 1/2 1

, 1/2 1

Now apply the Schwartz inequality (i.e. ) to get:

TV u u u 1 u u

+ u u

n n n n ni i i i i i

i i

n ni i i

i

a b a b

C C

C

∞ ∞+ + +

+ − + + + +=−∞ =−∞

− − −=−∞

+ ≤ +

≡ − ≤ − − −

∑ ∑

( ) ( )

, 3/2 2 1

1 1 11 , 1/2 , 1/2 1

+ u u

Now shifting the summation indices in the last two sums gives:

TV u u u 1 u u

n ni i i

i

n n n n ni i i i i i

i i

C

C C

+ + + +=−∞

∞ ∞+ + +

+ − + + + +=−∞ =−∞

≡ − ≤ − − −

∑ ∑

( )

, 1/2 1 , 1/2 1

1

+ u u + u u

u u TV u

This completes our proof!

n n n ni i i i i i

i i

n n ni i

i

C C∞ ∞

− + + + + +=−∞ =−∞

+=−∞

− −

= − ≡

∑ ∑

The TVD property is a very important building block for numerical schemes for hyperbolic systems. It ensures a positivity & monotonicity preserving properties in the resulting scheme. Positivity for systems is much harder. 19

Page 20: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

20

Studying our schemes in the context of Harten’s theorem:

The scheme will be TVD if the fluxes have a special form.The first order upwind scheme is monotone but has diffusive fluxes.The fluxes for the second order schemes have extra terms. We call these extra underlined terms the antidiffusive fluxes. (Question:Why“anti”?) They reduce diffusion in the 2nd order scheme. But reduce dissipation carefully, or else oscillations appear.

The inclusion of the antidiffusive terms in red (underlined), turn the donor cell fluxes into the Lax-Wendroff fluxes

1/21/2 11/2

1/2

1/21/2 1

(Donor cell): f = a u ;

1Second order flux

f = a u

(Lax-Wendroff): f

First orde

es

r fluxes

= a2

u 1

n ni in ni i

n ni i

+− −

++

+− − + −( )( )

( )( )

1

1/21 1/2

;

f

u u

1 1 = a u u u2

n ni

n ni i

n ni ii

µ

µ+

+ +

− −

+

Page 21: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

1

1

The previous second order Lax-Wendroff fluxes, with their anti-diffusive parts, are not TVD!

u uSince the Limiter only depends on the ratio we write the u u

with limiter TVD flu axes s

n ni i

i n ni i

θ −

+

−=

( ) ( ) ( )( ) ( ) ( )

( ) ( ) ( )

( )( )

1 1 1

1/21/2 1

1/21/2

1

1

1

(Use u u u u ):

f = a u ;

f = a u

1 1 u u2

1 1 u

seek a limiter

We with the following attributes:

0 for

u2

n ni i

n

n n n ni i i i i

n ni i

n n

i

in

ii

i

i i

φ

φ θ

φ θ

µ

φ

µ

θ

θ

φ θ

− − −

+− −

++

− −

+

− −

− −

− → −

+ +

=1)

( )( )

0, i.e. to avoid extrema.

0 for 0, i.e. slope has correct sign.

1 for 1, i.e. to be second order accurate for smooth flow.

θ

φ θ θ

φ θ θ

<

> >

= =

2)

3) 21

Page 22: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

22

( )

The second order accurate scheme becomes: (Questions: Can you demonstrate that the eqn below retrieves the Donor Cell

and Lax-Wendroff schemes? For what functional choice of will it retrieve the B

iφ θ

( )

( ) ( ) ( ) ( ) ( ) ( )

1 1/2 1/21/2 1/2

11 1 1 1

eam-Warming scheme?)

u u f f

u u u u 1 u u u u2

n n n ni i i i

n n n n n n n ni i i i i i i i i i

tx

µµ µ φ θ φ θ

+ + ++ −

+− + − −

∆= − −

= − − − − − − −

Page 23: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

23

( )

( ) ( ) ( ) ( ) ( ) ( )

( ) ( )

( ) ( ) ( ) ( )

1 1/2 1/21/2 1/2

11 1 1 1

11

11 1

u u f f

u u u u 1 u u u u2

u uUse u u to rewrite it as:

u u 1 u u2

n n n ni i i i

n n n n n n n ni i i i i i i i i i

n ni in n

i ii

in n n ni i i i i

i

tx

µµ µ φ θ φ θ

θ

φ θµµ µ φ θθ

+ + ++ −

+− + − −

−+

+− −

∆= − −

= − − − − − − −

−− =

= − + − − −

( ) ( ) ( ), 1/2 1 , 1/2

, 1/2

1 a

Harten's Theorem requires

nd 02

0 1

ii i i

i

i

C C

C

φ θµµ µ φ θθ− − − + +

− −

⇒ = + − − =

≤ ≤

Page 24: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) ( )

( )( )

( ) ( )

, 1/2

1

1

1

0 1 which for 0 1 implies :

2 2

Since and are independent, and

and

Harten's Theore

are +ve, the only way out is to take:

0

m require

2 and

s

0

i

ii

i

i i i

i

C µ

φ θφ θ

θθ θ φ θ

φ θ

φ θφ θ

θ

− −

≤ ≤ ≤ ≤

− ≤ − ≤

≤ ≤ ≤ 2

Questions: Where does the DonorCell scheme fit in the TVD region?What about Lax-Wendroff scheme?What about Beam-Warming sch

This gives us

eme?What about

the

Fromm scheme?

TVD region

0 1 2 3

2

1

φ (θ)

24

Page 25: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

25

( )( )

The scheme should also be .Thus should lie within the limits blocked out by :

a) the Lax-Wendroff scheme with its right-biased slopes ( 1)

b) the Beam-Warming scheme with its lef

t-b

second orderφ θ

φ θ =

4)

( )

( ) ( )

This further restricts the TVD region (iased slopes ( )

The limiter should also

1

be

/

)

:

Swe

symmetrica

b

l

y regionφ θ θ

φ θφ θ

θ

=

=

5)

0 1 2 3

2

1

φ (θ)

Lax-Wendroff,φ (θ)=1

Beam-Warming, φ (θ)=θ

Page 26: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

a b

c d

0 1 2 3

2

1

φ (θ)Minmod

0 1 2 3

2

1

φ (θ)

van Leer

0 1 2 3

2

1

φ (θ)MC

0 1 2 3

2

1

φ (θ)Superbee

26Question: Identify the least and most compressive limiter. What are the consequences?

Page 27: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.4) Linear Hyperbolic Systems and the Riemann Problem(Review §1.5)3.4.1) Solution of Linear Hyperbolic PDEs for Continuous Initial Data

We will need to learn how to classify different hyperbolic PDEs. We take only a first step here.

We have seen that any conservation law Ut + Fx = 0 can be linearized as Ut + A Ux = 0 . For linear hyperbolic PDEs we literally have F = A U . We focus on such PDEs. A is an M×M matrix with constant entries.

The M×M hyperbolic system Ut + A Ux = 0 is strictly hyperbolic if we have real disjoint eigenvalues : λ1 < λ2 < …< λM .

Physically, it means that the waves are well-separated.

Mathematically, it means that we have linearly independent eigenvectors. Sensible solution methods within reach. 27

Page 28: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

28

Several very important hyperbolic systems are non-strictly hyperbolic, i.e. we still have real eigenvalues but : λ1 ≤ λ2 ≤ … ≤ λM .

Question: Give an example of such a system.

Physically, under favorable circumstances (i.e. when we have linearly degenerate eigenvalues), waves may still remain well-separated.

Mathematically, we have to examine eigenstructure more closely. Need to work on solutions for each specific case.

Page 29: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We consider the simple case where “A” is a constant M×M matrix and has well-separated eigenvalues.A ; A = 1,...,We can build the matrix of right eigenvectors and left eigenvectors as before t A ; A ; A ; A = o get:

Recall:

Left-mul

ti

m m m m m m

R

r r l l m MR L

R L L L R R L

λ λ

= Λ = Λ = Λ Λ

= =

+ 0 U

ply U + A U = 0 by to get : for 1,..,where is called the .

Notice from that the characteris

or

tic variable move

+ sw

0

mt x

t

m m mt x

m m

m m m ht x

w ww l eigenweight characteristic variable

l m M

w w m

λ

λ

==

=

ith speed along the characteristic of the hyperbolic system.hm tmλ 29

1 1

1 2 2 2

0 0 0 0

; ; =

0 0

M

M M

lr r r l

R L

l

λλ

λ

= = Λ

Page 30: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

The characteristic decomposition described above is one of the standard building blocks used in designing numerical schemes.

Physically, It tells us that the characteristic variables undergo simple advection with a speed that is given by the eigenvalue.

It helps us solve the Cauchy problem for hyperbolic systems: Given differentiable initial conditions on non-characteristic surfaces in space-time, the system can be evolved further in time at least for a small time.

( )( ) ( ) ( )

0

0 0 0

Thus given initial conditions U , we form the characteristic variables

U for 1,..., i.e. are known functions of .

Then to evolve the system in time, advect the profiles to get :

m m m

x

w x l x m M w x x= = ←

( )( ) ( )

0

01

The solution at a later time is given by : U ,

m m

Mm m m

m

w x t

x t w x t r

λ

λ=

= −∑

30

+ 0m m mt xw wλ =

Page 31: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

31

3.4.2) Solution of Linear Hyperbolic PDEs for Discontinuous InitialData: Simple waves and the Riemann Problem

Linear hyperbolic PDEs also admit discontinuous solutions (weak solutions).

For first order conservation laws, one can have discontinuous solutions even though the differential form of the PDE does not admit them. Reason: The integral form of the PDE admits such weak solutions.

Study weak solutions in two stages:

a) Simple waves

b) Riemann Problem

Page 32: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( )

( ) ( ) ( )

( ) ( )

( )

0 0

0

Integral form U + A U = 0 gives:

XU X U X + A U T U T = 0 A U U U UT

X must match up with an eigenvalue of A : A U U U UT

Thus with initial conditions: U =

t T x X

t xt x

L R R L R L R L

mR L R L

dx dt

x

λ

= =

= =

− − ⇔ − = −

− = −

∫ ∫

( )

( ) ( )

0

th

U for <0 ; U = U = U for 0

The is given by:U , = U for < ; U , = U = U for

m mL R L

m m m mL R L

x x r x

mx t x t x

simple wa er

vt x t

α

λ α λ

+ ≥

+ ≥ 32

Page 33: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

33

x

t

(X,0)

(0,T)

UL UR

(X,T)

(0,0)

Discontinuity ( )0 0

Integral form U + A U = 0t T x X

t xt x

dx dt= =

= =∫ ∫

( ) ( )XA U U U U match up with A T

m m mR L R L r rλ− = − =

Page 34: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Notice: A simple wave is a very special wave structure where the jump UR−UL is restricted to lie parallel to the mth right eigenvector.

Question: What if we have a very general jump UR−UL with no particular arrangement between left and right state?

Answer: Then we have to solve the Riemann problem!

As long as the space of right eigenvectors is complete (which is guaranteed for a strictly hyperbolic linear system) we can always make the projection:

αm is an eigenweight of rm .But what does it mean physically?

It means that we have a set of M−1 constant states between UL and URwhere the mth constant state U(m) lies between x=λm t and x=λm+1 t

( )1

U U where U UM

m m m mR L R L

mr lα α

=

− = ≡ −∑

34

Page 35: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( )

( )

1

1

1 1

U , = U for

= U U U for , 1,..., 1

= U

L

m Mm p p p p m m

L Rp p m

R

xx tt

xr r m Mt

λ

α α λ λ +

= = +

<

≡ + = − < < = −∑ ∑

for M xt

λ <

Physically: We have a similarity solution with m simple waves.

The Riemann problem is a super-important building block for numerical schemes.

35

Page 36: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

36

x

t

UL

x = λ1 t

x = λ2 t

U(1)

x = λ3 t

U(2)

UR

U(M−1)x = λM t

x = λM−1 t( )0U m

0mx tλ= 0 1mx tλ +=

(1)

(2)

(3)

U

U

U

=

=

=

Page 37: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

37

x

t

UL

x = λ1 t

x = λ2 t

U(1)

x = λ3 t

U(2)

UR

U(M−1)x = λM t

x = λM−1 t( )0U m

0mx tλ= 0 1mx tλ +=

( 1)

( 2)

( 3)

U

U

U

M

M

M

=

=

=

Page 38: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.4.3) The Riemann Problem as a Building Block for the Numerical Solution of Hyperbolic Systems

Here we focus on formulating a first order (Godunov) scheme for linear hyperbolic systems that can handle discontinuities.

Higher order monotonicity preserving schemes will also produce jumps at zone boundaries, albeit the jumps will be smaller. Either way, we have to learn how to handle such jumps for the case of hyperbolic systems.

The Riemann problem from the previous section is well-suited for doing that and comes to our rescue.

The Riemann solver is a very important building block for schemes that solve linear and non-linear hyperbolic problems.

38

Page 39: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

39x

i−2 i−1 i i+1 i+2

tn

tn+1

t

xi−2 i−1 i i+1 i+2

u

xi−2 i−1 i i+1 i+2

u

Page 40: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

{ }

( )11/2 1/2

Let us start with a 1d mesh function U on a mesh with zone size x.

For Godunov's method, we wish to evolve the solution from time to :

U U F F

The goal is to find properl

ni

n n

n n n ni i i i

t t t

tx

++ −

+ ∆

∆= − −

1/2y at the zone boundaries, i.e. fluxes that build in the realization that there are discontinuities in the solution and incorporate the fact that the discontinuity at each boundary

F

wil

niupwinded +

l split into a of simple waves that move in different directions..

Shift coordinate system so that the origin lies at the zone boundary of

interest.

Riemann fan

40

Page 41: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

41

x

t

UL

x = λ1 t

x = λ2 t

U(1)

x = λ3 t

U(2)

UR

U(M−1)x = λM t

x = λM−1 t( )0U m

0mx tλ= 0 1mx tλ +=

Page 42: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We seek the , i.e. the solution of the Riemann problem that overliesthe zone boundary =0 of interest. It will then be easy to average that state in

space and time to get the or

x

numerical

resolved state

( ) ( )

( ) ( )

0

0 0

0

1 See previous fig. Find state that overlies time axis . I.e. we want state

with the property that .

= U

U U

0

U U

mRS

m m

mRSL

λ λ +

< ≤

resolved flux

00 0

0

1

1

1 1

if 0

= U U if 0

= U if 0

Not the resoice that lved st

m Mm mp p p p

L Rp p m

MR

r r

λ

α α λ λ

λ

+

= = +

<

+ = − < ≤

∑ ∑

( ) ( )

0 0 1

Obtaining the requires us to between waves that move to theright and those that move to the left.

F

resolve

A U

Becau

ate is bounded by the characteristics and .

s

d f

e

u

t

l x

RS

m m

RS

xdistinguish

t x tλ λ +

= =

he resolved flux is of importance to us, we obtain compact, computationally efficient expressions for it.

great42

Page 43: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) ( ), ,

Distinguishing between waves that move to the right and those that move to the leftis most easily done by defining:

max ,0 ; min ,0

The left and right fluxes are also best written a

m m m mλ λ λ λ+ −≡ ≡

( )

( )

,

1

,

1

1

s: F A U ; F A U

expressions for are then obtained as:

= F

F

1 1 = F F

2 2ues

F

Q

L L R R

MRS m m m

LmM

m m mR

mM

m m mR L

m

Automatic evaluating the resol

r

ved fl

r

ux

r

λ α

λ α

λ α

=

+

=

=

≡ ≡

+

= −

+ −

( )

tion: What makes the eqns. above so desirable for ?

Set U U in the above formulae to obtain even more compact expressions

.

m mR L

computer implementation

lα ≡ −

43

Page 44: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

44

( ) ( )

( ) ( )

00 0 0 1

1U U = U if 0

To find the flux, do F A U

mmRS m mp p

Lp

RS RS

rα λ λ +

=

≡ + < ≤

( ) ( ), ,

1F = F with min ,0

MRS m m m m m

Lm

rλ α λ λ− −

=

+ ≡∑

Page 45: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

45

( ) ( )

( ) ( )

0 0 0

0

1

1U U = U if 0

To find the flux, do F A U

MmRS m mp p

Rp m

RS RS

rα λ λ +

= +

≡ − < ≤

( ) ( ), ,

1F = F with max ,0

MRS m m m m m

Rm

rλ α λ λ+ +

=

− ≡∑

Page 46: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

46

( ) ,

1

,

1

F = F

F

MRS m m m

LmM

m m mR

m

r

r

λ α

λ α

=

+

=

+

= −

( ) ( )1

1 1F = F F 2 2

MRS m m m

R Lm

rλ α=

+ − ∑

Page 47: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) ( )( )

( ) ( )

{ } { }{ }

+ +,1 +,2 +,M ,1 ,2 ,M

1 2

+

F = F A U U

F A U U1 1 = F F A U U2 2

with the definitions:

Λ diag λ , λ ,..., λ ; Λ diag λ , λ ,..., λ ;

Λ diag λ , λ ,..., λ ;

A Λ ;

RSL R L

R R L

R L R L

M

R L

+

− − − −

+

+ −

= − −

+ − −

≡ ≡

≡ A Λ ; A Λ R L R L− −≡ ≡

Our final computer-friendly expressions for the resolved flux are:

The matrices A , A and A are evaluated once and for all for a givenlinear hyperbolic system!

+ −

47

Page 48: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

48

( ) ( ),

1F = F with U U

MRS m m m m m

L R Lm

r lλ α α−

=

+ = −∑

( ) ( )F = F A U U with A ΛRSL R L R L− − −+ − =

Page 49: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

49

( ) ( ),

1F F with U U

MRS m m m m m

R R Lm

r lλ α α+

=

= − = −∑

( ) ( ) +F = F A U U with A ΛRSR R L R L+ +− − =

Page 50: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Notice that we can now show consistency of our scheme.

The present Riemann solver goes through with small modifications for non-linear hyperbolic systems, hence its great importance.

( ) ( )

( )11/2 1/2

F F U is guaranteed when U U and U U.

As a result, the FDA U U F F will converge

to the PDE U A U 0 .

RSL R

n n n ni i i i

t x

tx

++ −

→ → →

∆= − −

∆+ =

50

Page 51: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

x0 0

x x0 x0

20 0 x0

1 2 3x0 0 x0 x0 0

Example: The linearized Euler system

v 01v + 0 v v = 0

P P0 c v

Recall the = v c ; = v ; = v c

t x

characteristic analysis

ρρ ρ

ρρ

λ λ λ

∂ ∂ ∂ ∂

⇒ − +

0 01 2 3

0 02 2

0 0 0 0

1 2 32 2 2

0 0 0 0 0 0 0

1

= c ; = 0 ; = c c 0 c

1 1 1 1 1 = 0 ; = 1 0 ; = 02 c 2 c c 2 c 2 c

Now consider the Riemann

r r r

l l l

ρ ρ

ρ ρ

ρ ρ

− −

( ) ( )

( ) ( )

( ) ( ) ( ) ( )

12

0 0 0

2 32 20 0 0 0

problem with U , v ,P and U , v ,P .1 1Our are given by: v v P P ;

2 c 2 c1 1 1P P ; v v P Pc 2 c 2 c

T TL L xL L R R xR R

xR xL R L

R L R L xR xL R L

eigenweights

ρ ρ

αρ

α ρ ρ αρ

= =

−≡ − + −

≡ − − − ≡ − + − 51

Page 52: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

52

1 2 32 2 2

0 0 0 0 0 0 0

1 1 1 1 1 = 0 ; = 1 0 ; = 02 c 2 c c 2 c 2 c

Now consider the Riemann problem with U v and U v .P P

L R

L xL R xR

L R

l l lρ ρ

ρ ρ

−−

= =

( ) ( )

( ) ( ) ( ) ( )

12

0 0 0

2 32 20 0 0 0

1 1Our are given by: v v P P ; 2 c 2 c

1 1 1P P ; v v P Pc 2 c 2 c

xR xL R L

R L R L xR xL R L

eigenweights αρ

α ρ ρ αρ

−≡ − + −

≡ − − − ≡ − + −

Page 53: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

( ) 0 0

(1) 1 1 2 2 3 3

The solution to the is then given by:

U , U for v c

= U U = U for

L x

L R

Riemann Problemxx tt

r r rα α α

= < −

≡ + − − 0 0 0

(2) 1 1 2 2 3 30 0 0

0 0

v c v

= U U = U for v v c

= U for v +c

Taking the transoni

x x

L R x x

R x

xt

xr r rt

xt

α α α

− < <

≡ + + − < < +

<

( )

( )

0 0 0

(1) 1 1 1

2 2 2 3 3 3

1 1 1 2 2 2

c case 0 < v c we get =1.

The is now given by:

F = A U = A U = A U

1 1 = A U A U + +2 2

x

RSL

R

R L

m

Resolved Flux

rr r

r r

λ α

λ α λ α

λ α λ α

<

+

− −

+ − ( )3 3 3 rλ α53

Page 54: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.5) Numerical Boundary Conditions for Linear Hyperbolic Systems

Recall that for scalar advection ut + a ux = 0 with a>0, we only need to specify the boundary conditions at the left boundary. Specifying them at the right boundary would overspecify the problem.

We want to understand how it goes for the “M” component linear hyperbolic system Ut + A Ux = 0.

54

Page 55: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

55

Because we apply limiters to obtain the slopes, we will need two zones out from each physical boundary. Called ghost zones. Question: Why two?

Page 56: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

56

Say we have m0 left-going waves and M−m0 right going waves:

At left boundary: m0 waves leave and M−m0 enter the domain.

At right boundary: M-m0 waves leave and m0 enter the domain.

x

t

UL

x = λ1 t

x = λ2 t

U(1)

x = λ3 t

U(2)

UR

U(M−1)x = λM t

x = λM−1 t( )0U m

0mx tλ= 0 1mx tλ +=

Page 57: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We classify boundary conditions as follows:

Boundary conditions that permit a wave to leave the computational domain without generating a back-reaction are called radiative or non-reflective boundary conditions.

Boundary conditions that specify the amplitude of a wave that should flow into a computational domain are called inflow boundary conditions.

Our philosophy in developing the boundary conditions is that we should apply the same numerical algorithm, if this is at all possible, to all the zones of the mesh.

57

Page 58: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

0

0

The individual waves obey : 0Consider the left boundary:

We may want the first waves to leave the domain without generating anyback reaction. I.e. we want :

0 for we should cont

m m mt x

mt

w w

m

w m m

λ+ =

= < ⇒ 0

1 0 1 0

0

rive to have 0 for .Solution: Do this by setting : for .

For m> , the waves are coming into the domain from the left. We are freeto specify them as we wish in accordance wit

mx

m m m

w m mw w w m m

m

= <

= = <

0 1 0

h the physics of our problem.Solution: For m> , you are free to set and in accordance with your needs.

The Result: We have all the characteristic weights determined for zones

1 and 0. So we

m mm w w−

− 0 0 1 11 1

can set : U and U M M

n m m n m m

m mw r w r− −

= =

= =∑ ∑ 58

Page 59: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

0 1 1 1 1 2 2

1 0 1

For we set : U = U , U = U , U = U , U = U

For at left boundary we set : U U U

n n n n n n n nN N N N

n n n

periodic boundary conditions

outflow boundary conditions

− − + +

− = =

59

Page 60: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.6) Second Order Upwind Schemes for Linear Hyperbolic Systems

Three Schemes:A) Lax-WendroffB) Two-stage Runge-KuttaC) Predictor-Corrector

Each of the three schemes described here can be extended to non-linear hyperbolic systems.

The latter two are also relatively easy to extend to higher orders.

Consider the same mesh that we used for describing boundary conditions.

60

Page 61: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

61

{ }1 2 1

:- u + a u = 0

Start with mesh function at time : u , u ,..., u , u ,

Using a limiter, const

Recap Lax

ruct l

-Wendroff for scalar

imited undivided diff

adve

eren

1)

2 ces

ction

u in each zone.)

t x

n n n n nI I

ni

t −

1/21/2

11

1 1/

Construct fluxes at zone boundaries:

1f = a u 1 a u for a 02

1 = a u 1 a u for a 02

Upd

3)

4 ate: u) u f

nn nii i

nnii

n n ni i

tx

tx

tx

++

++

+ +

∆ + − ∆ ≥ ∆ ∆ − − ∆ < ∆

∆= −

∆( )2 1/2

1/2 1/2 f ni i

++ −−

Page 62: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.6.1) Second Order Accurate Extension of the Lax-WendroffScheme with Limiters

Envision the computational problem in : U for 1,..., with w w 0

In words, we should form the char

characteristic v

acteristic varia

1)

2 ble

ari

s of the mesh function

able

an a

s

)d

m m n m m mi i t xw l m M λ= = + =

( )1 1

undivided differencdvect them around with second order accuracy. To do that, we first

reconstruct the in each zone:

, for 1,...

es

3)

,

Using these, we could of course

m m m m mi i i i iw Limiter w w w w m M+ −∆ = − − =

1/2

fluxes

Small proble

construct the at the zone boundaries, .

: Now some waves can be left-going while other waves may be

f , for the characteristic variable

right-going. We need an upgrade fom

u

s

r o

mi+

r flux formula. 62

Page 63: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

, ,1/2 1/2 1 1/2

1/2,

1

1 1f 1 12 2

with for 0

= for 0 (Notice, only one of

m m m m m m m m mi i i i i

m m mi i

m mi

t tw w w wx x

w ww

λ λ λ λ

λ

λ λ

+ −+ + + +

+

++

∆ ∆ = + − ∆ + − − ∆ ∆ ∆

∆ = ∆ ≥

∆ < ,

1

1

/21/

/21/2 1/

1

2

2

o

flux for the whole system F f

A

r is non-zero)

The resulting can be written as :

The flux can be written in a more elegant form that is more instructive as:

F

Mn m m

i im

m m

ni

r

λ −

+

+

++

=

++

=

=

( )1 1/2 1/21/

1/2

2 1/

1/ /21 2 11

2

+ + where

Question: Interpret the terms in the above flux formula.

Finally the Update :

A 1F F 1 U2

F

U

U U F4)

ni

Mm m

n n n ni i

n

i i

im m

i i im

t w r

t

x

x

λ λ−+

+

+ +

+

=

++ −

+

∆ = − ∆ ∆

∆= − −

63

Page 64: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

64

, ,1/2 1/2 1 1/2

1/21/2 1/2

1

1 1f 1 12 2

F f

m m m m m m m m mi i i i i

Mn m m

i im

t tw w w wx x

r

λ λ λ λ+ −+ + + +

++ +

=

∆ ∆ = + − ∆ + − − ∆ ∆ ∆

= ∑

1/21/2 1 1/2 1/2 1/2

1

1F A U + A U + F where F 1 2

Mn n n m m m m

i i i i i im

t w rx

λ λ+ + −+ + + + +

=

∆ = = − ∆ ∆ ∑

Page 65: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.6.2) Second Order Accurate, Two-Stage Runge-Kutta Scheme with LimitersThe methods described here are amongst the most popular ones. Reason: They have a very appealing plug-and-chug quality.

Each stage of a Runge-Kutta method looks exactly like the other. While each stage only needs to attain the desired spatial accuracy, the whole scheme will have the desired spatial and temporal accuracy. Thus RK schemes are called method of lines or semi-discrete methods. Ut = −Fx

It is possible, though, to obtain schemes that are more efficient than Runge-Kutta. Two possible second order accurate Runge Kuttaschemes:

( ) ( )( )( ) ( )( )

1/21/2 1/2

1 1/2 1/2 1/2 1/21/2 1/2

:

U U

Modified Euler Approxima

F U F U2

U U F U F

tion

U

n n n n n ni i i i

n n n n n ni i i i

tx

tx

++ −

+ + + + ++ −

∆= − −

∆∆

= − −∆

( ) ( )( )( ) ( ) ( )( )

(1)1/2 1/2

1 (1) (1) (1) (1) (1)1/2 1/2

:

U U F

Improved Euler Approximat

U F U

1U U U F U F U2

io

2

n

n n n n ni i i i

n ni i i i i

tx

tx

+ −

++ −

∆= − −

∆∆

= + − −∆ 65

Page 66: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

66

Page 67: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

We only need to describe one stage, since they all look alike:

Step 1: We have to obtain the undivided differences of the conserved variables. This can be done using two different styles of limiting:

( )1 1

:

a) Obtain characteristic variables : U

b) Limit characteristic variables : ,

c) Project back to obtain undivided diffe

Limiting on the Characteristic Variablesm mi i

m m m m mi i i i i

w l

w Limiter w w w w+ −

=

∆ = − −

( )

1

1 2

rences in conserved

variables : U

:

a) Write conserved variables as vector : U u , u ,..., u

L

b) Limit each of the components of the v

imiting on the Conserved Variable

ec

s

tor:

u

Mm m

i im

TMi i i i

mi

w r

L

=

∆ = ∆

∆ =

( ) ( )1 2

1 1u u , u u gives U u , u ,..., u

Question: What are the strengths and weaknesses of each limiting strategy?

TMm m m mi i i ii i i iimiter + −− − ∆ ≡ ∆ ∆ ∆

67

Page 68: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Step 2: Obtain the left and right states at the zone boundary:(i.e. since we know the variation within the zone, we can obtain the values of the solution at any point in the zone, including the face-centers.)

Step 3: Treat the Riemann solver as a machine that accepts two states and spits out a flux. Feed the above left and right states into the Riemann solver and obtain a properly upwinded flux.

Step 4: These fluxes can be used in each of the two stages, as needed, to obtain the full update.

1; 1/2 ; 1/2 11 1U U + ΔU ; U U ΔU2 2

i iL i i R i i ++ + +≡ ≡ −

( )1/2 ; 1/2 ; 1/2F F U , Ui RS L i R i+ + +=

68

Page 69: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

69

It is very interesting and important to show that the improved Euler Runge-Kutta scheme is strong stability preserving; i.e. if each stage is TVD in a certain sense, then the whole scheme is TVD. Question: But in which variables is it TVD?To see this, make the transformation:

( ) ( )( )( ) ( )( )

( )

(1)1/2 1/2

(2) (1) 1/2 (1) (1)1/2 1/2

1 (2)

U U F U F U

U U F U F U

1U U U2

n n n n ni i i i

n ni i i i

n ni i i

tx

tx

+ −

++ −

+

∆= − −

∆∆

= − −∆

= +

( ) ( )( )( ) ( )( )

( )

,

,(1) , , ,1/2 1/2

,(2) ,(1) ,(1) ,(1)1/2 1/2

, 1 , ,(2)

1 , 1

1

U do this for all 1,...,

f f

f f

12

U

m n m ni i

m m n m m n m m ni i i i

m m m m m mi i i i

m n m n mi i i

Mn m n mi i

m

w l m Mtw w w wx

tw w w wx

w w w

w r

+ −

+ −

+

+ +

=

≡ =

∆= − −

∆∆

= − −∆

= +

≡ ∑

( ) ( )( ) ( )

( ) ( ) ( ) ( ) ( ) ( )

,(1) ,

,(2) ,(1)

, 1 ,(2) , ,(1) , ,

Since the first stage is TVD, we have : TV TV

Since the second stage is TVD, we have: TV TV

So 1,.., we can write:1 1TV TV TV TV TV TV2 2

m m n

m m

m n m m n m m n m n

w w

w w

m M

w w w w w w+

∀ =

≤ + ≤ + ≤

Convex combination

Page 70: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

70

( ) ( )( )( ) ( )( )

( )

(1)1/2 1/2

(2) (1) 1/2 (1) (1)1/2 1/2

1 (2)

u u f u f u

u u f u f u

1u u u2

n n n n ni i i i

n ni i i i

n ni i i

tx

tx

+ −

++ −

+

∆= − −

∆∆

= − −∆

= +

Page 71: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.6.3) Predictor-Corrector FormulationIt is based on the idea that if we have the piecewise linear slopes within a zone, we can also predict the time-evolution of the hyperbolic system for at least a small time interval within that zone.

71

i-1 i i+1x

u(x)

1uni−

uni

1uni+

( ) ( )uu unin n

i i ix x xx

∆= + −

1/2; 1/2un

R i+

1/2; 1/2un

L i+

+

The panel to the left shows a mesh function that is not decreasing with x. The panel to the right shows a mesh function that is not increasing with x. We solve the advection equation ut + a ux = 0 with a>0. In each case the dashed line shows the piecewise linear reconstructed profile in x at time tn while the dotted line shows the same profile at time tn + ∆t / 2 .

i-1 i i+1x

u(x)

1uni+

uni

1uni−

( ) ( )uu unin n

i i ix x xx

∆= + −

1/2; 1/2un

L i+

+

1/2; 1/2un

R i+

Page 72: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

72

Step 1: We have to obtain the undivided differences of the conserved variables; same as before.

Step 2: Realize that we can obtain the time evolution within a zone because:

This is the predictor step.

1/2; 1/2

U U A 0

Use this to directly obtain time-centered left and right states at the zone boundaries. This time-centering makes the scheme second order.

1U U + ΔU2

nii

nn niL i i

t x

++

∆ ∆+ =

∆ ∆

1/2 11; 1/2 1

1 11

U1 2

1 1 = U + ΔU A ΔU2 2

U1 1U U ΔU 2 21 1 = U ΔU A ΔU2 2

i

n nni ii

nn n iiR i i

n nni ii

tt

tx

tt

tx

+ +++ +

+ ++

∆ + ∆ ∆ ∆

−∆

∆ ≡ − + ∆ ∆ ∆

− −∆

Page 73: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

Step 3: Treat the Riemann solver as a machine that accepts two states and spits out a flux. Feed the above left and right states into the Riemann solver and obtain a properly upwinded flux.

Step 4: Use the fluxes to obtain the update step:

This is the corrector step.

Questions: How would the speed of this method compare to that of the Runge-Kutta method? Which steps are repeated in the Runge-Kuttamethod? Which steps dominate the cost?

( )1/2 1/21/2 ; 1/2 ; 1/2F F U , Un n

i RS L i R i+ +

+ + +=

( ) ( )( )1 1/2 1/2 1/2 1/2; 1/2 ; 1/2 ; 1/2 ; 1/2U U F U , U F U , U n n n n n n

i i RS L i R i RS L i R itx

+ + + + ++ + − −

∆= − −

73

Page 74: Chp 3: Scalar Advection and Linear Hyperbolic Systemsdbalsara/Numerical-PDE-Course/ch3/Chp3_LinAdvect... · Chp 3: Scalar Advection and Linear Hyperbolic Systems By Prof. Dinshaw

3.6.4) Numerical Results from the Previous Three SchemesQuestion: Compare and contrast the results of the three schemes:

74