advanced computational fluid dynamics aa215a...

36
Advanced Computational Fluid Dynamics AA215A Lecture 5 Antony Jameson Winter Quarter, 2012, Stanford, CA

Upload: leduong

Post on 19-Mar-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

Advanced Computational Fluid DynamicsAA215A Lecture 5

Antony Jameson

Winter Quarter, 2012, Stanford, CA

Page 2: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

Abstract

Lecture 5 shock capturing schemes for scalar conservation laws

Page 3: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

Contents

1 Shock Capturing Schemes for Scalar Conservation Laws 2

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 The need for oscillation control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.1 Odd-even de-coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Propagation of a step discontinuity . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Iserles’ barrier theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 Stability in the L! norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 Local extremum diminishing (LED) schemes . . . . . . . . . . . . . . . . . . . . . . . 71.6 Total variation diminishing (TVD) schemes . . . . . . . . . . . . . . . . . . . . . . . 81.7 Semi-discrete L! stable and LED schemes . . . . . . . . . . . . . . . . . . . . . . . . 101.8 Growth of the L! norm with a source term . . . . . . . . . . . . . . . . . . . . . . . 111.9 Accuracy limitation on L! stable and LED schemes . . . . . . . . . . . . . . . . . . 121.10 Artificial di!usion and upwinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.11 Artificial Di!usion and LED Schemes for Nonlinear Conservation Laws . . . . . . . . 151.12 The First Order Upwind Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.13 Shock Structure of the Upwind Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 171.14 Upwinding and Conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181.15 The Engquist-Osher Upwind Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . 191.16 The Jameson-Schmidt-Turkel Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 211.17 Essentially Local Extremum Diminishing (ELED) Schemes . . . . . . . . . . . . . . 231.18 Symmetric Limited Positive (SLIP) Schemes . . . . . . . . . . . . . . . . . . . . . . 231.19 Upstream Limited Positive (USLIP) Schemes . . . . . . . . . . . . . . . . . . . . . . 281.20 Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.21 Reconstruction for a Nonlinear Conservation Law . . . . . . . . . . . . . . . . . . . . 301.22 SLIP Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

1

Page 4: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

Lecture 5

Shock Capturing Schemes for Scalar

Conservation Laws

1.1 Introduction

A major achievement in the early development of computational fluid dynamics (CFD) was theformulation of non-oscillatory shock capturing schemes. The first such scheme was introducedby Godunov in his pioneering work first published in 1959 (?). Godunov also showed that non-oscillatory schemes with a fixed form are limited to first order accuracy. This is not su"cient foradequate engineering simulations. Consequently there were widespread e!orts to develop “highresolution” schemes which circumvented Godunov’s theorem by blending a second or higher orderaccurate scheme in smooth regions of the flow with a first order accurate non-oscillatory schemein the neighborhood of discontinuities. This is typically accomplished by the introduction of logicwhich detects local extrema and limits their formation or growth. Notable early examples includeBoris and Books’ flux corrected transport (FCT) scheme published in 1973 (?) and Van Leer’sMonotone Upstream Conservative Limited (MUSCL) scheme published in 1974 (?).

Here we first discuss the formulation of non-oscillatory schemes for scalar conservation laws inone or more space dimension, and illustrate the construction of schemes which yield second orderaccuracy in the bulk of the flow but are locally limited to first order accuracy at extrema. Nextwe discuss the formulation of finite volume schemes for systems of equations such as the Eulerequations of gas dynamics, and analyze the construction of interface flux formulas with favorableproperties such as sharp resolution of discontinuities and assurance of positivity of the pressure anddensity. The combination of these two ingredients leads to a variety of schemes which have provedsuccessful in practice.

1.2 The need for oscillation control

1.2.1 Odd-even de-coupling

Consider the linear advection equaton for a right running wave

!u

!t+ a

!u

!x= 0, a > 0. (1.1)

Representing the discrete solution at meshpoint by vj, a semi-discrete scheme with central di!er-ences is

dvj

dt+

a

2#x(vj+1 ! vj"1) = 0 (1.2)

3

Page 5: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 4

Figure 1.1: Odd-even mode

j−1 j+1j

Figure 1.2: Propagation of right running wave

Then an odd-even modevj = (!1)j (1.3)

givesdvj

dt= 0. (1.4)

Thus an odd-even mode is a stationary solution, and odd-even decoupling should be removedvia the addition of artificial di!usion or upwinding.

1.2.2 Propagation of a step discontinuity

Consider the propagation of a step as a right running wave by the central di!erence scheme. Nowthe discrete derivative

Dxvj =vj+1 ! vj"1

2#x< 0 (1.5)

and hence with a > 0dvj

dt> 0 (1.6)

giving an overshoot. On the other hand the upwind scheme

D"x vj =

vj ! vj"1

#x(1.7)

correctly yieldsdvj

dt= 0. (1.8)

Page 6: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 5

r points s points

wave propagation

Figure 1.3: Barrier theorem

1.3 Iserles’ barrier theorem

Both the need to suppress odd-even modes and the need to prevent overshoots in the propagationof a step discontinuity motivate the use of an upwind scheme. However purely upwind schemes arealso subject to limitations as a consequence of Iserles’ barrier theorem (?).

Consider the approximation of the linear advection equation by a semi-discrete scheme with r

upwind points and s downwind points. The theorem states that the maximum order of accuracyof a stable scheme is

min(r + s, 2r, 2s + 2) (1.9)

This is a generalization of an earlier result of Engquist and Osher that the maximum order ofa accuracy of a stable upwind semi-discrete scheme is two (s = 0 in formula (1.9)). It may alsobe compared to Dahquist’s result that A-stable linear multistep schemes for ODEs are at mostsecond order accurate. One may conclude from Iserles’ theorem that upwind biased schemes maybe preferred over purely upwind schemes as a route to attaining higher order accuracy.

1.4 Stability in the L" norm

Consider the nonlinear conservation law for one dependent variable with di!usion

!u

!t+

!

!xf(u) =

!

!x

!

µ(u)!u

!x

"

, µ # 0. (1.10)

With zero di!usion (1.10) is equivalent in smooth regions to

!u

!t+ a(u)

!u

!x= 0 (1.11)

where the wave speed is

a(u) =!f

!u.

The solution is constant along characteristics

x ! a(u)t = "

so extrema remain unchanged as they propagate unless the characteristics converge to form a shockwave, a process that does not increase extrema. With a positive di!usion coe"cient the right handside of equation (1.10) is negative at a maximum and positive at a minimum. Thus in a truesolution of (1.10) extrema do not increase in absolute value. It follows that L! stability is an

Page 7: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 6

appropriate criterion for discrete schemes consistent with the properties of true solutions of thenonlinear conservation law (1.10).

Consider the general discrete scheme

vn+1i =

#

j

aijvnj (1.12)

where the solution at time level n + 1 depends on the solution over an arbitrarily large stencil ofpoints at time level n. A Taylor series expansion of (1.12) about the point xi at time t yields

v(xi) +#t!vj

!t(xi) +

#t2

2

!2vj

!t2(xi) =

#

j

aij

$

v(xi) + (xj ! xi)!v(xi)

!x+

(xj ! xi)2

2

!2v(xi)

!x2+ ...

%

(1.13)

For consistency with any equation with no source term, as is the case for equation (1.10),

#

j

aij = 1 (1.14)

Also it follows from (1.12) that

|vn+1i | $

#

j

|aij ||vnj | $

#

j

|aij | %vn%! (1.15)

and hence%vn+1%! $ max

i

#

j

|aij|%vn%! (1.16)

where equality is realized ifvnj = sign(aij)

for the row for which&

j |aij | has its maximum value. Thus for L! stability

maxi

#

j

|aij| $ 1 (1.17)

If one writes (1.12) in matrix vector form

vn+1 = Avn,

this may be recognized as the condition that the induced matrix norm

%A%! = supv

%Av%!%v%!

$ 1 (1.18)

Now (1.14) and (1.17) together implyaij # 0 (1.19)

because if any aij < 0, then on taking absolute values in (1.14) the sum would have a value > 1.Therefore the discrete scheme (1.12) is L! stable if and only if the coe"cients aij are non-negative.Note that this also implies that given initial data that is everywhere non-negative, the discrete

Page 8: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 7

scheme (1.12) has the “positivity” property that it will preserve a non-negative solution at everytime step.

Using the consistency condition (1.14), the discrete scheme can be written as

vn+1i =

'

(

#

j

(aij)

)

* vni +

#

j #=i

aij(vnj ! vn

i )

= vni +#t

#

j #=i

aij(vnj ! vn

i ) (1.20)

whereaij = #t(aij).

This displays the scheme as a forward Euler time stepping scheme. Moreover, comparing (1.20)with (1.12)

aii = 1 !#t#

j #=i

aij (1.21)

Thus (1.19) can only be satisfied ifaij # 0

and the time step also satisfies the constraint

#t $1

&

j #=i aij

This is a generalization of the Courant-Friedrichs-Lewy (CFL) condition for schemes with an arbi-trary stencil. In the case of linear advection

!u

!t+ a

!u

!x= 0,

the simplest L! stable scheme is the upwind scheme

vn+1j = vn

j ! #(vnj ! vn

j"1)

= (1 ! #)vnj + #vn

j"1 (1.22)

where # is the CFL number a!t!x and 0 $ # $ 1. Here vn+1 is a convex combination of vn

i and vni"1.

When # = 1 this scheme exactly represents propagation along the characteristics.It should also be noted that the discussion in this section is not limited to the one dimensional

problem, and applies equally to the case of multi-dimensional equations discretized on arbitraryunstructured grids.

1.5 Local extremum diminishing (LED) schemes

L! stability does not exclude the possibility that a monotonically decreasing profile (figure 1.4(a))could develop into an oscillatory profile (figure 1.4(b)). This motivates the stricter requirementthat local extrema cannot grow in the numerical solution, nor can new local extrema be created.Such a scheme will be called local extremum diminishing (LED).

Page 9: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 8

(a) (b)

Figure 1.4: Local oscillation

Consider now the discrete scheme

vn+1i =

#

j

aijvnj (1.23)

where the coe"cients aij &= 0 only for the nearest neighbors to the mesh point i, in one or morespace dimensions. The argument of the previous section can now be repeated where the summationsare now limited to the nearest neighbors of the mesh point i, denoted by the set Ni. For consistencywith an equation with no source term

#

j$Ni

aij = 1, (1.24)

while for no increase in |vi|#

j$Ni

|aij | $ 1. (1.25)

Thus the scheme is LED if for all i

aij # 0,

aij = 0 if j is not a neighbor of i (1.26)

1.6 Total variation diminishing (TVD) schemes

A useful measure of the oscillation of a one dimensional function u(x) is its total variation

TV (u) =

+ b

a

,

,

,

,

!u

!x

,

,

,

,

dx. (1.27)

Correspondingly the total variation of a discrete solution, say vj, j = 0, 1, ..., n, is defined as

TV (v) =n

#

j=1

|vj+1 ! vj |. (1.28)

It was proposed by Harten (?) that a good recipe for the construction of non-oscillatory shockcapturing schemes is to require that the total variation of the discrete solution cannot increase.Such schemes are called total variation diminishing (TVD). This criterion has been widely usedand also extended to the concept of total variation bounded (TVB) schemes which permit only abounded increase in the total variation.

Let xj , j = 1, 2, ..., n!1, be the interior extrema of u(x), and augment there with the endpointsx0 = a and xn = b. Referring to figure 1.5, it can be seen that over an interval in which u(x) is

Page 10: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 9

Figure 1.5: Equivalent LED and TVD schemes (one dimensional case)

increasing, say xj"1 to xj , the contribution to TV (u) is u(xj) ! u(xj"1), while over the followinginterval in which u(x) is decreasing the contribution to TV (u) is u(xj) ! u(xj+1). Thus

TV (u) = 2#

(interior maxima)

!2#

(interior minima)

±(the end values). (1.29)

Similarly in the discrete case

TV (v) = 2#

(interior maxima)

!2#

(interior minima)

±v0 ± vn. (1.30)

If the initial data is, say, monotonically decreasing the total variation is

TV (v0) = v00 ! v0

n.

If the end values are fixed the introduction of any interior extrema will produce an increase in thetotal variation. Thus a TVD scheme preserves the monotonicity of initial data which is monotonic.Also if the end values are fixed the discrete scheme will be TVD if interior maxima cannot increase,interior minima cannot decrease and no new extrema are introduced. Accordingly LED schemesare TVD. The converse is not necessarily true. This is illustrated in figure 1.6, in which the upperand lower profiles have the same total variation with a value equal to 4. Thus a TVD scheme wouldallow a shift from the lower to the upper profile, which would not be permitted by an LED schemebecause it would incur the formation of a new maximum at C

!

. In this sense the LED criterion ismore stringent than the TVD criterion, while still consistent with the properties of the nonlinearconservation law (1.10).

Harten derived conditions for the coe"cients of a 3 point TVD scheme in one dimension thatare essentially equivalent to the positivity condition (1.26) for an LED scheme. The conditions fora multipoint TVD scheme derived by Jameson and Lax (?) would be hard to realize in practice.The LED criterion is directly applicable to multi-dimensional discretizations on both structuredand unstructured meshes whereas the use of

-

D %'u% dS as a measure of total variation can leadto anomalous results on a triangular mesh using any of the standard norms (?). For the foregoingreasons the analysis in the following sections is based on the LED principle.

Page 11: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 10

Figure 1.6: Distinction between LED and TVD schemes

1.7 Semi-discrete L" stable and LED schemes

It is often convenient to separate the formulation of the time stepping and space discretizationscheme by first using a semi-discretization to reduce the continuous equation to a set of ordinarydi!erential equations with the general form

dvi

dt=

#

j

aijvj . (1.31)

or in matrix vector notationdv

dt= Av. (1.32)

Assuming that the discrete values vi(t) correspond to a su"ciently smooth function v(x, t) atx = j#x, a Taylor series expansion yields

dvi

dt=

#

j

aij

.

v(xi) + (xj ! xi)!v(xi)

!x+

!

xj ! xi

2

"2 !2v(xi)

!x2+ ...

/

(1.33)

Accordingly the semi-discrete equation (1.31) is consistent with a di!erential equation with nosource term only if

#

j

aij = 0. (1.34)

Then equation (1.31) can be written as

dvi

dt=

'

(

#

j

aij

)

* vi +#

j #=i

aij(vj ! vi) (1.35)

Page 12: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 11

ordvi

dt=

#

j #=i

aij(vj ! vi) (1.36)

Suppose thataij # 0, j &= i (1.37)

Then if vi is a maximumvj ! vi $ 0 (1.38)

anddvi

dt$ 0 (1.39)

Similarly if vi is a minimumvj ! vi # 0 (1.40)

anddvi

dt# 0 (1.41)

Now %v%! can increase only if the maximum increases or the minimum decreases. But,

,

,

,

dvi

dt

,

,

,

,

$ %A%!%v%! (1.42)

so if |vi| < %v%! there is a time interval (> 0 during which it cannot become an extremum, whileif |vi| = %v%! it follows from (1.39) or (1.41) that

d

dt|vi| $ 0 (1.43)

Thus condition (1.37) is su"cient to ensure that %v%! does not increase.Suppose that condition (1.37) is not satisfied. Then choosing vi = 1, vj = 1 if aij # 0, vj = 0 if

aij < 0, one obtainsdvi

dt> 0 (1.44)

and %v%! will increase. Accordingly the semi-discrete scheme (1.31) is L! stable if and only if thepositivity condition (1.37) is satisfied.

As in the case of the discrete scheme, the semi-discrete scheme will be LED if it is limited toa compact stencil of nearest neighbors with non-negative coe"cients aij # 0, aij = 0 if j is not aneighbor of i because then the same argument can be repeated while examining the behavior of vi

with respect only to its neighbors.

1.8 Growth of the L" norm with a source term

Consider the general semi-discrete scheme

dvi

dt=

#

j

aijvj (1.45)

where#

j

aij = $.

Page 13: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 12

It now follows from a Taylor series expansion as in section 1.7, that the semi-discrete is constantwith the di!erential equation

du

dt= Lu + $u (1.46)

where L is a source free di!erential operator. Subtracting0

&

j aij ! $1

vi the scheme can be

written with no loss of generality as

dvi

dt= $vi +

#

j #=i

aij(vj ! vi). (1.47)

Setvi = wie

!t. (1.48)

Thendvi

dt=

!

dwi

dt+ $wi

"

e!t. (1.49)

Consequentlydwi

dt=

#

j #=i

aij(wj ! wi). (1.50)

Therefore, if aij # 0, %w%! does not increase, and the growth of %v%! is bounded by e!t.

1.9 Accuracy limitation on L" stable and LED schemes

Suppose that the linear advection equation

!u

!t+ a

!u

!x= 0 (1.51)

is approximated on a uniform grid by a fixed scheme with the same coe"cients at every mesh point

vn+1j =

!#

k="!

ckvnj+k. (1.52)

A Taylor series expansion now yields

v(xj) +#t!v

!t(xj) +

#t2

2

!2v

!t2(xj) =

!#

k="!

ck

$

v(xi) + k#x!v(xi)

!x+

k2#x2

2

!2v(xi)

!x2+ ...

%

(1.53)

In order to realize second order accuracy the coe"cients ck must satisfy the conditions

#

k

ck = 1 (1.54)

#

k

kck = !# (1.55)

Page 14: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 13

#

k

k2ck = #2 (1.56)

where

# = a#t

#x.

Since ck # 0 we can set$k =

)ck, %k = k

)ck = k$k (1.57)

Then#

k

$2k = 1 (1.58)

#

k

$k%k = !# (1.59)

#

k

%2k = #2 (1.60)

and consequently2

#

k

$k%k

32

=

2

#

k

$2k

32

#

k

%2k

3

. (1.61)

But by the Cauchy-Schwarz inequality

2

#

k

$k%k

32

$

2

#

k

$2k

32

#

k

%2k

3

. (1.62)

with equality only if the vectors $ and % are aligned, or for some scale r, %k = r$k for all k.According to the definition (1.57) of $k and %k, it follows that there can only be one nonzero ck.Moreover it follows from (1.54) that this must have the value unity. Taking

ck = 0, k &= !1

c"1 = 1 (1.63)

we recover the standard upwind scheme

vn+1j = vn

j ! #(vnj ! vn

j"1) (1.64)

with a CFL number # = 1, for which the scheme corresponds to exact propagation along character-istics. A choice such as ck"2 = 1 corresponds to the upwind scheme applied over double intervalswith # = 1. It is evident that no solution is possible for time steps such that # &= 1.

We conclude that it is not possible for a discrete scheme with fixed non-negative coe"cientsat every mesh point to yield better than first order accuracy. In order to overcome this barrierit is necessary to consider schemes in which the discretization is locally adapted to the solution.Typically these schemes enforce positivity or the LED principle only in the neighborhood of extremawhich can be detected by a change of sign in the slope measured by #vj+ 1

2

= vj+1!vj. The earliest

examples of schemes of this type are Boris and Book’s flux corrected transport (FCT) scheme (?)and Van Leer’s monotone upstream conservative limited (MUSCL) scheme (?).

Page 15: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 14

1.10 Artificial di!usion and upwinding

Taking as the simplest possible example the linear advection equation

!u

!t+ a

!u

!x= 0 (1.65)

which represents right running waves of the form

u(x, t) = f(x ! at) (1.66)

when a > 0, an upwind semi-discretization is

dvj

dt+

a

#x(vj ! vj"1) = 0. (1.67)

This can be equivalently written as

dvj

dt+

1

2

a

#x(vj+1 ! vj"1) !

1

2

a

#x(vj+1 ! 2vj + vj"1) = 0 (1.68)

in which "u"x is approximated by a second order accurate central di!erence formula modified by an

approximation to !12a#x"2u

"x2 . Thus upwinding is equivalent to the addition of artificial di!usion

with a coe"cient proportional to a !t!x , the mesh width multiplied by half the wave speed.

We may consider a class of schemes with artificial di!usion of the form

dvj

dt+

a

2#x(vj+1 ! vj"1) !

$a

2#x(vj+1 ! 2vj + vj"1) = 0 (1.69)

where $ is a parameter to be chosen. This can be written in conservative form as

#xdvj

dt+ hj+ 1

2

! hj" 12

= 0 (1.70)

where the numerical flux is

hj+ 12

=1

2a(vj+1 + vj) !

1

2$a(vj+1 ! vj). (1.71)

Then

hj+ 12

= avj !1

2($ ! 1)a(vj+1 ! vj) (1.72)

and

hj" 1

2

= avj !1

2($ + 1)a(vj ! vj"1) (1.73)

so

#xdvj

dt=

1

2($ ! 1)(vj+1 ! vj) +

1

2($ + 1)a(vj"1 ! vj) (1.74)

and the scheme is LED if $ # 1.We can also consider the energy stability of this scheme. Suppose (1.65) holds in the interval

0 $ x $ L, and it is solved with u(0, t) specified and u(L, t) free, which are the proper boundaryconditions for a right running wave. Multiplying by u and integrating from 0 to L,

+ L

0u!u

!tdx =

d

dt

+ L

0

u2

2dx

= !a

+ L

0u!u

!xdx

=1

2a

4

u(0)2 ! u(L)25

. (1.75)

Page 16: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 15

If u(0, t) is fixed equal to zero, the energy decays if u(L) &= 0.Suppose the semi-discretization is over n equal intervals from x0 = 0 to xn = L. Let v0 be fixed

corresponding to the inflow boundary condition. The outflow boundary value vn should depend onthe solution. To complete the semi-discrete scheme at xn, we use linear extrapolation to establisha value at an extra mesh point xn+1, vn+1 = vn. Now multiplying (1.70) by vj and summing byparts we find that

dE

dt= #x

n#

j=0

vjdvj

dt

= !n

#

j=1

vj(hj+ 12

! hj" 12

)

= h 12

v1 !n"1#

j=1

hj+ 12

(vj+1 ! vj) ! hn+ 12

vn. (1.76)

In the case $ = 0, nowdE

dt=

1

2av0v1 !

1

2av2

n (1.77)

and if v0 = 0 the discrete energy decays if vn &= 0 as in the case of the true solution.If $ > 0, v0 = 0 and vn+1 = vn

dE

dt= !

1

2av2

n !1

2$av2

1 !1

2$a

n"1#

j=1

(vj+1 ! vj)2 (1.78)

Accordingly there is a negative contribution to dEdt from every interior interface. Thus finally the

semi-discrete scheme is neutrally energy stable if $ = 0, energy stable if $ > 0, and LED if $ # 1.

1.11 Artificial Di!usion and LED Schemes for Nonlinear Conser-vation Laws

We now consider scalar nonlinear conservation laws of the form

!u

!t+

!

!xf(u) = 0 (1.79)

in the interval 0 $ x $ L, where the boundary values u(0) and u(L) are specified at an inflowboundary and free at an outflow boundary. We can write the conservation law in integral forms as

d

dt

+ L

0udx + f(u(L)) ! f(u(0)) = 0 (1.80)

Suppose that the domain is divided into a uniform grid of cells of width #xj where cell j extendsfrom xj ! 1

2#x to xj + 12#x. Applying (1.80) separately to each cell we obtain the semi-discrete

finite volume scheme

#xdvj

dt+ hj+ 1

2

! hj" 12

= 0

Page 17: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 16

where vj represents the average value of u in cell j, and hj+ 12

is the numerical flux across the

interface separating cells j and j +1. Introducing artificial di!usion, we define the numerical fluxes

hj+ 12

=1

2(fj+1 + fj) ! $j+ 1

2

(vj+1 ! vj)

wherefj = f(vj)

and $j+ 1

2

is the coe"cient of artificial di!usion. Define also a numerical estimate of the wave speed

a(u) = "f"u as

aj+ 12

=

6 fj+1"fj

vj+1"vj, vj+1 &= vj

"f"u |vj

, vj+1 = vj

Now the numerical fluxes can be expressed as

hj+ 1

2

= fj +1

2(fj+1 ! fj) ! $j+ 1

2

(vj+1 ! vj) = fj ! ($j+ 1

2

!1

2aj+ 1

2

)(vj+1 ! vj)

and

hj" 12

= fj !1

2(fj ! fj"1) ! $j" 1

2

(vj ! vj"1) = fj ! ($j" 12

+1

2aj" 1

2

)(vj ! vj"1)

Thus the semi-discrete scheme reduces to

#xdvj

dt= ($j+ 1

2

!1

2aj+ 1

2

)(vj+1 ! vj) + ($j" 12

+1

2aj" 1

2

)(vj"1 ! vj)

Accordingly it is LED if for all j

$j+ 12

#1

2|aj+ 1

2

|.

1.12 The First Order Upwind Scheme

The least di!usive LED scheme is obtained by setting

$j+ 1

2

=1

2|aj+ 1

2

|

to produce the di!usive flux

dj+ 12

=1

2|aj+ 1

2

|#vj+ 12

wherevj+ 1

2

= vj+1 ! vj

This is the pure first order upwind scheme since if aj+ 12

> 0

dj+ 12

=1

2

fj+1 ! fj

vj+1 ! vj(vj+1 ! vj) =

1

2(fj+1 ! fj)

andhj+ 1

2

= fj

while if aj+ 1

2

< 0

hj+ 12

= fj+1

Thus the upwind scheme is the least di!usive first order accurate LED scheme.

Page 18: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 17

Figure 1.7: Shock structure

Figure 1.8: Convex flux

1.13 Shock Structure of the Upwind Scheme

The first order upwind scheme supports a numerical structure of a stationary shock with a singleinterior point, as illustrated in Figure 1.7, where the upstream and downstream values are denotedby the subscripts L and R, and the transitional value located at cell j is denoted by the subscriptA. The jump condition for a shock moving at a speed S is

fR ! fL = S(uR ! uL)

For a stationary shock fR = fL, and since the characteristics converges on a shock the true wavespeed changes sign. This is also the case for the numerical wave speed. Assuming f(u) is a convexfunction of u, as illustrated in Figure 1.8

aj" 12

=fA ! fL

vA ! vL> 0, aj+ 1

2

=fR ! fA

vR ! vA< 0,

Specifically in the case of Burgers’ equation

f(u) =u2

2, vR = !vL, aj" 1

2

=1

2(vA + vL) > 0, aj+ 1

2

=1

2(vR + vA) < 0

Accordingly the numerical fluxes are

hj" 1

2

= fj"1 = fL, hj+ 1

2

= fj+1 = fR

Page 19: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 18

while the interfaces between cells to the left of j are equal to fL, and those between cells to theright of j are equal to fR. Hence

d

dtvj"1 =

fL ! fL

#x= 0

d

dtvj =

fR ! fL

#x= 0

d

dtvj+1 =

fR ! fR

#x= 0

With an appropriate choice of the numerical flux a single point numerical structure can also beobtained for stationary shock in gas dynamics. Notice also the case where the wave speed changessign from negative to positive

$j" 12

< 0,$j+ 12

> 0

This represents an expansion region, comparable to the inflow boundary of the supersonic zone ina transonic flow. Now

hj" 12

= fj, hj+ 12

= fj

anddvj

dt= 0

1.14 Upwinding and Conservation

In early formulation of upwind schemes the scheme itself was switched according to the sign of thewave speed

dvj

dt+

fj ! fj"1

#x= 0, aj > 0

dvj

dt+

fj+1 ! fj

#x= 0, aj < 0

Suppose that there is a transition between j and j+1

ak > 0, k $ j

ak < 0, k # j + 1

Nowdvj

dt+

fj ! fj"1

#x= 0

corresponding to a numerical fluxhj+ 1

2

= fj

whiledvj+1

dt+

fj+2 ! fj+1

#x= 0

corresponding tohj+ 1

2

= fj+1

Page 20: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 19

Accordingly the scheme is not conservative, since the interior fluxes do not cancel when the solutionvalues are summed over j. In fact, with f0 and fn fixed since both boundaries are inflow boundaries

#x

n"1#

j=1

dvj

dt= !f1 + f0 ! f2 + f1... ! fj + fj"1 ! fj+2 + fj+1... ! fn + fn"1 = f0 ! fn ! fj + fj+1

whereas the true solution satisfies

d

dt

+ xn

x0

udx = !+ xn

x0

!f

!xdx = f(u(x0)) ! f(u(xn))

By upwinding the flux rather than the scheme we ensure that the interior fluxes are cancelled ina telescopic sum, with the result that the correct conservation law is preserved by the numericalscheme.

1.15 The Engquist-Osher Upwind Scheme

An alternative construction of a first order accurate upwind scheme was proposed by Engquist andOsher (?). Assuming that the flux function f(u) is convex, with a minimum at u%, it can be splitas

f(u) = f+(u) + f"(u) (1.81)

where

f+(u) =

6

f(u), u # u%

f(u%), u $ u% (1.82)

and

f"(u) =

6

f(u), u $ u%

f(u%), u # u% (1.83)

In the case of Burger’s equation

f(u) =u2

2

f+(u) =

6

u2

2 , u # 00, u $ 0

f"(u) =

6

u2

2 , u $ 00, u # 0

Now the numerical flux is defined as

hj+ 1

2

= f+(vj) + f"(vj+1)

In zones where the wave speed has a constant sign this is identical to the upwind scheme definedin section 1.12, but it is di!erent in transition zones where the wave speed changes sign.

Consider, for example, the case of Burger’s equation with vj < 0, vj+1 > 0. The Engquist-Osherflux is

hEOj+ 1

2

= f+j + f"

j+1 = 0

Page 21: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 20

Figure 1.9: Shock structure of the Engquist-Osher scheme

while the upwind flux is

huj+ 1

2

=

6 fj if vj+1 + vj > 012(fj + fj+1) if vj+1 + vj = 0

fj+1 if vj+1 + vj < 0

In the case of a shock there may be a transition from left state vj with a(vj) > 0 to a right statevj+1 with a(vj+1) < 0, so that

hEOj+ 1

2

= f+j + f"

j+1 = fj + fj+1

Consider again Burger’s equation where we now examine the numerical structure of a stationaryshock with left and right states vL > 0 and vR < 0.It now turns out that a structure with two interior points is possible, as illustrated in Figure 1.9.Here

vL # vA # 0, 0 # vB # vR

and

hj" 1

2

= fL

hj+ 12

= f+(vA) + f"(vB) = fA + fB

hj+ 32

= fR

Thus every point is in equilibrium if

fA + fB = fL = fR

orv2A + v2

B = v2L = v2

R

Hence, given vA

vB = !7

v2L ! v2

A

Page 22: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 21

1.16 The Jameson-Schmidt-Turkel Scheme

According to section 1.9 an LED scheme with fixed coe"cients is limited to first order accuracy.We now examine ways of constructing switched higher order schemes which revert to first orderaccuracy only in the vicinity of extrema. One of the simplest such formulations is the JamesonSchmidt Turkel (JST) scheme [(?)].

This scheme blends low and high order di!usion using a switch that eliminates the high orderdi!usion at extrema. Suppose that the conservation law

!u

!t+

!

!xf(u) = 0 (1.84)

is approximated by the semi-discrete finite volume scheme

#xdvj

dt+ hj+ 1

2

! hj" 12

= 0 (1.85)

In the JST scheme the numerical flux is

hj+ 12

=1

2(fj+1 + fj) ! dj+ 1

2

(1.86)

where the di!usive flux has the form

dj+ 12

= &(2)

j+ 12

#vj+ 12

! &(4)

j+ 12

(#vj+ 32

! 2#vj+ 12

+#vj" 12

) (1.87)

with#vj+ 1

2

= vj+1 ! vj

Let aj+ 12

be the numerically estimated wave speed

aj+ 12

=

6 fj+1"fj

vj+1"vj, vj+1 &= vj

"f"u |u=vj

, vj+1 = vj

as before. Then we have the following.Theorem: The JST scheme is LED if whenever vj or vj+1 is an extremum

&(2)

j+ 12

#1

2|aj+ 1

2

|, &(4)j+ 1

2

= 0 (1.88)

Proof : Suppose vj is an extremum. Then the second condition ensures that

&(4)

j+ 12

= 0, &(4)j" 1

2

= 0

Hence the scheme reduces to the 3 point scheme

#xdvj

dt= (&(2)

j+ 12

!1

2$j+ 1

2

)#vj+ 12

! (&(2)j" 1

2

+1

2$j" 1

2

)#vj" 12

and according to the first condition the coe"cients of both vj+1!vj and vj"1!vj are non-negative,satisfying the requirements for an LED scheme.

Page 23: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 22

Figure 1.10: JST scheme at an extremum. #vj+ 32

and #vj" 12

have opposite signs. Also #vj+ 12

and

#vj" 32

have oppsite signs. Thus &(4)

j+ 12

= 0 and &(4)

j" 12

= 0

In order to construct coe"cients &(2)

j+ 12

and &(4)

j+ 12

satisfying conditions (1.88) define the function

R(u, v) =

,

,

,

,

u ! v

|u| + |v|

,

,

,

,

q

where q # 1. Then if u and v have opposite signs

R(u, v) = 1

Now set&(2)

j+ 12

= $j+ 12

Qj+ 12

and&(4)

j+ 12

= %j+ 12

(1 ! Qj+ 12

)

whereQj+ 1

2

= R(#vj+ 32

,#vj" 12

)

Since #vj+ 32

and #vj" 12

have opposite signs if either vj or vj+1 is an extremum, the scheme will

be LED if

$j+ 12

#1

2|aj+ 1

2

|

Typically%j+ 1

2

= K|aj+ 12

|

where in the case of steady state calculations K can be tuned to maximize the rate of convergenceto a steady state.

Page 24: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 23

1.17 Essentially Local Extremum Diminishing (ELED) Schemes

The JST scheme as presented in section 1.16 has the disadvantage that it reverts to first orderaccuracy at smooth extrema. In order to circumvent this loss of accuracy we can relax slightlythe requirements of an LED scheme by introducing the concept of an essentially local extremumdiminishing (ELED) scheme, defined as an scheme which becomes LED in the limit as the meshwidth #x * 0.

The JST scheme can be converted to an ELED scheme by redefining the switching function as

R(u, v) =

,

,

,

,

u ! v

max((|u| + |v|), &#xr)

,

,

,

,

q

where a threshold has been introduced in the denominator. The coe"cient & should have thephysical dimensions of u divided by a length scale to the power r. It is shown in [(?)] that thescheme is second order accurate and ELED if

q # 2, r =3

2

1.18 Symmetric Limited Positive (SLIP) Schemes

We now discuss schemes which obtain second order accuracy by subtracting an anti-di!usive termbased on neighboring values to cancel the first order di!usive term, but limit the anti di!usion inthe vicinity of extrema in order to preserve the LED property. This idea was first introduced in theflux corrected transport (FCT) scheme proposed by Boris and Book [(?)]. Their formulation usedtwo stages. The first stage consisted of a first order accurate positive scheme. The second stageadded negative di!usion to cancel the first order error, subject to a limit on its magnitude at anylocation where it would cause the appearance of a new extremum in the solution. In this sectionwe show how the same result can be accomplished with a single stage scheme.

We can subtract the anti-di!usion symmetrically or from the upwind side, leading to schemeswhich will be classified as symmetric limited positive (SLIP) and upstream limited positive (USLIP)schemes respectively. A symmetric scheme of this type was proposed by Jameson [(?)]. A shorttime later Helen Yee proposed a very similar scheme [(?)] which has been popularly known as asymmetric TVD scheme.

The formulation here uses the concept of limited averages [(?)]. A limited average L(u, v) of u

and v is defined as an average with the following properties:

• P1: L(u, v) = L(v, u)

• P2: L($u,$v) = $L(u, v)

• P3: L(u, u) = u

• P4: L(u, v) = 0 if u and v have opposite signs; otherwise L(u, v) has the sign as u and v; orthe same sign as whichever is nonzero if u = 0 or v = 0

The first three properties are satisfied by the arithmetic average. It is the fourth property thatdistinguishes the limited average.

Suppose now that the conservation law

!u

!t+

!

!xf(u) = 0

Page 25: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 24

is approximated by the semi-discrete scheme

#xdvj

dt+ hj+ 1

2

! hj" 1

2

= 0

as before. Define the numerical flux as

hj+ 12

=1

2(fj+1 + fj) ! dj+ 1

2

where dj+ 1

2

is the numerical di!usive flux. Let

#vj+ 12

= vj+1 ! vj

By subtracting 12(#vj+ 3

2

+#vj" 12

) from #vj+ 12

we could produce a di!usive term

dj+ 12

= $j+ 12

!

#vj+ 12

!1

2(#vj+ 3

2

+#vj" 12

)

"

which approximates $#x3 "3u"x3 . However this would lead to a 5 point scheme which does not satisfy

the LED condition.In order to circumvent this we replace the arithmetic average of #vj+ 3

2

and #vj" 12

by their

limited average and define

dj+ 1

2

= $j+ 1

2

!

#vj+ 1

2

! L(#vj+ 3

2

,#vj" 1

2

)

"

Hence $j+ 12

L(#vj+ 32

,#vj" 12

) is a limited anti di!usive term, and it will be verified below that the

scheme is LED if $j+ 1

2

# 12 |aj+ 1

2

|.We first give some examples of limited averages. Define

S(u, v) =1

2(sign (u) + sign (v))

so that

S(u, v) =

6 1 when u > 0 and v > 00 when u and v have opposite sign!1 when u < 0 and v < 0

Some well known limited averages are

• Min mod: S(u, v)min(|u|, |v|)

• Van Leer: S(u, v)2 |u||v||u|+|v|

• Superbee: S(u, v)max

6

min(2|u|, |v|),min(|u|, 2|v|)8

Limited averages can be characterized in the following manner. Define

'(r) = L(1, r) = L(r, 1)

Page 26: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 25

so that by P2, setting $ = 1u

L(1,v

u) =

1

uL(u, v)

HenceL(u, v) = '(

v

u)u

and similarly

L(u, v) = '(u

v)v

It follows on setting u = 1, v = r that

'(r) = r'(1

r)

Also by P4'(r) = 0, r < 0

'(r) # 0, r # 0

Using these properties we can now prove that the SLIP scheme is LED if for all j

$j+ 12

#1

2|aj+ 1

2

|

Proof: Define

r+ =#vj+ 3

2

#vj" 12

, r" =#vj" 3

2

#vj+ 12

ThenL(#vj+ 3

2

,#vj" 1

2

) = '(r+)#vj" 1

2

andL(#vj+ 1

2

,#vj" 32

) = '(r")#vj+ 12

Hence the semi-discrete scheme is reduced to

#xdvj

dt= ! $j+ 1

2

#vj+ 12

!1

2$j" 1

2

#vj" 12

+ $j+ 1

2

(#vj+ 1

2

! '(r+)#vj" 1

2

)

! $j" 12

(#vj" 12

! '(r")#vj+ 12

)

= + {$j+ 12

!1

2aj+ 1

2

+ $j" 12

'(r")}#vj+ 12

! {$j" 12

+1

2aj" 1

2

+ $j+ 12

'(r+)}#vj" 12

Since '(r+) # 0 and '(r") # 0 the coe"cient of #vj+ 12

is non-negative and the coe"cient of #vj" 12

is non-positive under the stated condition. The limiters enable the SLIP scheme to be e!ectivelyrepresented as a 3 point scheme.

Figure 1.11 and 1.12 illustrate the behavior of the SLIP scheme for an odd even mode anda shock wave. For an odd-even mode #vj+ 3

2

and vj" 12

have the same sign, opposite to that of

vj+ 1

2

, and both reinforce vj+ 1

2

as they would in a simple di!usion using fourth di!erences. With

Page 27: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 26

Figure 1.11: SLIP scheme for odd-even mode. #vj" 12

and #vj+ 32

have the same sign leaving

di!usive terms proportional to fourth di!erence in place

Figure 1.12: SLIP scheme at a shock. L(#vj+ 3

2

,#vj" 1

2

) = 0, L(#vj+ 5

2

and #vj+ 1

2

) = 0, yielding a

three point scheme at cell j.

Page 28: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 27

Figure 1.13: Switch ' as a function of r and q

$j+ 12

= 12 |aj+ 1

2

| the scheme allows a stationary shock with one interior point because

L(#vj+ 32

,#vj" 12

) = 0, L(#vj+ 52

,#vj+ 12

) = 0

with the consequence thathj+ 1

2

= fj = fL , hj+ 32

= fj+ 12

= fR

A general class of limiters satisfying conditions P1 - P4 can be constructed as the arithmeticaverage multiplied by a switch:

L(u, v) =1

2D(u, v)(u + v)

where 0 $ D(u, v) $ 1 and D(u, v) = 0 if u and v have opposite signs This is realized by theformula

D(u, v) = 1 !,

,

,

,

u ! v

u + v

,

,

,

,

q

where q is a positive integer. This definition contains some of the previously defined limiters asfollows:

q = 1 gives minmod

q = 2 gives van Leer limiters since1

2(1 !

,

,

,

,

u ! v

u + v

,

,

,

,

2

)(u + v) =2uv

u + v

As q * ", L(u, v) approaches a limit set by the arithmetic mean if u and v have the same sign andzero if they have opposite signs. The corresponding switch '(r) = L(1, r) is illustrated in Figure1.13.

With this class of limiters the SLIP scheme actually recovers a variant of the JST scheme since

D(u, v) = 1 ! R(u, v)

where R(u, v) is the switch used in the JST scheme. Set

Qj+ 1

2

= R(#vj+ 3

2

,#vj" 1

2

)

Page 29: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 28

Then the SLIP scheme can be written as

dj+ 1

2

= $j+ 1

2

6

#vj+ 1

2

!1

2(1 ! Qj+ 1

2

)(#vj+ 3

2

+#vj" 1

2

)

8

= $j+ 12

Qj+ 12

#vj+ 12

!1

2$j+ 1

2

(1 ! Qj+ 12

)(#vj+ 32

! 2#vj+ 12

+#vj" 12

)

This is the JST scheme with K = 12 .

1.19 Upstream Limited Positive (USLIP) Schemes

By adding the anti-di!usive correction purely from the upstream side one may derive a family ofupstream limited positive (USLIP) schemes. Corresponding to the SLIP scheme, a USLIP schemeis obtained by setting

dj+ 1

2

= $j+ 1

2

9

#vj+ 1

2

! L(#vj+ 1

2

,#vj" 1

2

):

if aj+ 12

> 0 and

dj+ 12

= $j+ 12

9

#vj+ 12

! L(#vj+ 12

,#vj+ 32

):

if aj+ 12

< 0. Now an analysis similar to that in section 18 reveals that if aj+ 12

> 0 and aj" 12

> 0

while $j+ 12

= 12aj+ 1

2

the scheme reduces to

#xdvj

dt= !

6

1

2'(r+)aj+ 1

2

+ (1 !1

2'(r"))aj" 1

2

8

#vj" 1

2

where

r+ =#vj+ 1

2

#vj" 12

, r" =#vj" 3

2

#vj" 12

Thus the coe"cient of vj"1!vj is nonnegative and the scheme is LED if '(r) satisfies the additionalconstraint '(r) < 2

1.20 Reconstruction

An alternative approach to constructing a high resolution scheme is reconstruction. This wasfirst introduced by van Leer in the Monotone Upstream-centered Schemes for Conservation Laws(MUSCL) (?). It can be described as follows. Suppose the interface flux hj+ 1

2

of a first order

LED scheme is constructed as a function of vj and vj+1. Instead we evaluate hj+ 12

from values vL

and vR which represent estimates of the solution at the left and right side of the interface whichtake account of the gradient of the solution in cells j and j+1. However, in order to prevent theformation of a new extremum or the growth of an existing extremum, these values are limited basedon a comparison with the gradients in neighboring cells.

In order to illustrate the process consider the case of linear advection

!u

!t+ a

!u

!x= 0

for a right running wave, a > 0. Suppose this is approximated by the semi-discrete scheme

Page 30: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 29

Figure 1.14: Reconstruction for linear advection

#xdvj

dt+ hj+ 1

2

! hj" 12

= 0

Using an upwind flux in a first order scheme

hj+ 12

= avj , hj" 12

= avj"1

and

#xdvj

dt= !a(vj ! vj"1)

which satisfies the conditions for an LED scheme. Suppose that we have an estimate v&j for theslope in cell j. Then in order to improve the accuracy we can set

hj+ 12

= avL

where

vL = vj +1

2#xv&j

Note that since this is a finite volume scheme vj represents the average value of v in cell j. Butwith a linear variation of v in the cell this is also the point value at cell center. With higher orderreconstruction using polynomials of degree > 1 to represent the solution, it becomes necessary todistinguish between the point value at the cell center and the average value in the cell, since theseare no longer the same. Here consistent with the use of an upwind flux, we can estimate v&j fromthe upwind side as

v&j =vj ! vj"1

#x=#vj" 1

2

#x

so that

hj+ 12

= a(vj +1

2#vj" 1

2

)

hj" 12

= a(vj"1 +1

2#vj" 3

2

)

and

#xdvj

dt= !

1

2a(3vj ! 4vj"1 + vj"2) = !2a(vj ! vj"1) +

1

2a(vj ! vj"2)

Page 31: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 30

This is a second order accurate estimate of "v"x , but it violates the conditions for an LED scheme

because the coe"cient of vj"2 ! vj is negative. In order to remedy this we can estimate the slopeas

v&j =1

#xL(#vj+ 1

2

,#vj" 12

)

where L is a limited average satisfying properties P1-P4 in section 1.18. Now define

r+ =#vj+ 1

2

#vj" 12

, r" =#vj" 3

2

#vj" 12

Then, using the notation of section 16,

hj+ 1

2

= a(vj +1

2'(r+)(vj ! vj"1))

hj" 1

2

= a(vj"1 +1

2'(r")(vj ! vj"1))

and

#xdvj

dt= !a(1 +

1

2'(r+) !

1

2'(r"))(vj ! vj"1)

Now to ensure that the coe"cient of vj"1 ! vj is non-negative, we must also require that

'(r+) ! '(r") # !2 (1.89)

If '(r+) # 0 with '(r) = 0 when r $ 0 this is satisfied if '(r) satisfies the additional requirementthat

'(r) $ 2, r > 0

It was pointed out by Spekrizse (?) that actually (1.89) is satisfied if for all r

'(r) #= !$ , '(r) $ 2 ! $

where 0 $ $ $ 2. Thus the class of admissible limiters can be expanded to include limiters whichare negative for some range of r.

For second order accuracy v&j should approach!v

j" 12

!x as #vj+ 12

* #vj" 12

, thus recovering the

second order accurate upwind scheme. This implies

'(1) = 1

consistent with property P3. These constraints are satisfied by the minmod, van Leer and superbeelimiters with the latter reading the limits '(r) $ 2r in the interval 0 < r $ 1

2 and '(r) $ 2 in theinterval 2 $ r $ ". Notice also that when vj is a maximum, as illustrated in Figure 1.14, it is

vL,j" 12

which becomes too large and causes dvj

dt to become positive in the absence of limiters.

1.21 Reconstruction for a Nonlinear Conservation Law

We consider now the case of the nonlinear conservation law

!u

!t+

!

!xf(u) = 0 (1.90)

Page 32: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 31

approximated by the semi-discrete scheme

#xdvj

dt+ hj+ 1

2

! hj" 1

2

= 0 (1.91)

The solution may now contain waves traveling in either direction. Using the Engquist-Osher split-ting we now construct the numerical flux as

hj+ 12

= f+(vL,j+ 12

) + f"(vR,j+ 12

) (1.92)

wheref(u) = f+(u) + f"(u) (1.93)

and!f+

!u= a+(u) # 0,

!f"

!u= a"(u) $ 0 (1.94)

while

vL,j+ 1

2

= vj +1

2L(#vj+ 1

2

,#vj" 1

2

) (1.95)

and

vR,j+ 12

= vj+1 !1

2L(#vj+ 3

2

,#vj+ 12

) (1.96)

Thus

#xdvj

dt= !

0

f"(vR,j+ 12

) ! f"(vR,j+ 12

)1

!0

f+(vL,j+ 12

) ! f+(vL,j+ 12

)1

(1.97)

Now by the mean value theorem

f"(vR,j+ 12

) ! f"(vR,j" 12

)

vR,j+ 12

! vR,j" 12

= a"(v%R) $ 0 (1.98)

andf+(vL,j+ 1

2

) ! f+(vL,j" 12

)

vL,j+ 12

! vL,j" 12

= a+(v%L) # 0 (1.99)

where vR lies in the range between vR,j+ 12

and vR,j" 12

and vL in the range between vL,j+ 12

and

L,j" 12

. Denote the slope ratio as

rj =#vj+ 1

2

#vj" 12

Then

vR,j+ 12

!vR,j" 12

= vj+1!1

2L(#vj+ 3

2

,#vj+ 12

)!vj+1

2L(#vj+ 1

2

,#vj" 12

) = (1!1

2'(rj+1)+

1

2'(

1

rj))#vj+ 1

2

and

vL,j+ 1

2

!vL,j" 1

2

= vj+1

2L(#vj+ 1

2

,#vj" 1

2

)!vj"1!1

2L(#vj" 1

2

,#vj" 3

2

) = (1+1

2'(rj)!

1

2'(

1

rj"1))#vj" 1

2

Thus equation 1.98 can be rearranged as

#xdvj

dt= !a"(v%R)(1!

1

2'(rj+1)+

1

2'(

1

rj))#vj+ 1

2

!a+(v%L)(1+1

2'(rj)!

1

2'(

1

rj"1))#vj" 1

2

(1.100)

Page 33: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 32

The coe"cients of vj+1 ! vj and vj"1 ! vj are both non-negative if for all r and s

'(r) + '(s) # !2

and accordingly the scheme is LED if the limiter satisfies

'(r) # !$,'(r) $ 2 ! $ (1.101)

where 0 $ $ $ 2, as in the linear case. If we use a limiter satisfying

'(r) = 0, r $ 0

0 $ '(r) $ 2, r > 0

then if vj is a maximum or a minimum #vj+ 12

and #vj" 12

have opposite sings so that

L(#vj+ 12

,#vj" 12

) = 0

andvL,j+ 1

2

= vj

If bothand

are positiveL(#vj+ 1

2

,#vj" 12

) $ 2#vj+ 12

andvL,j+ 1

2

$ vj+1

while if both #vj" 1

2

and #vj+ 1

2

are negative

L(#vj+ 12

,#vj" 12

) # !2#vj+ 12

andvL,j+ 1

2

# vj+1

Thus with the class of limiter vL,j+ 12

and similarly vR,j+ 12

lie in the range between vj and vj+1

min(vj , vj+1) $ vL,j+ 12

$ max(vj , vj+1)

andmin(vj , vj+1) $ vR,j" 1

2

$ max(vj , vj+1)

Consider also the fully discrete scheme

vn+1j = vn

j !#t

#x(hj+ 1

2

! hj" 12

) (1.102)

wherehj+ 1

2

= f"(vnR,j+ 1

2

) + f+(vnL,j+ 1

2

) (1.103)

Page 34: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 33

Figure 1.15: Reconstruction for an unstructured mesh

Following the same argument

vn+1j = A"

j+ 1

2

#t

#xvnj+1 + (1 !

#t

#x(A"

j+ 1

2

+ A+j" 1

2

))vnj + A+

j" 1

2

#t

#xvnj"1 (1.104)

where

A"j+ 1

2

= !a"(v%R)(1 !1

2'(rj+1) +

1

2'(

1

rj))

and

A+j" 1

2

= a+(v%L)(1 +1

2'(rj) !

1

2'(

1

rj"1))

Under condition 1.102A"

j+ 12

# 0, A+j" 1

2

# 0.

Also they are both bounded so we can choose #t small enough that the coe"cient of vnj is non-

negative, and the scheme is LED.The reconstruction approach proves to be particularly useful in the construction of high res-

olution schemes on unstructured meshes for multi-dimensional problems. Then one can use anestimate of the gradient of the solution in each cell to recover left and right values at the center ofthe face separating any two cells as illustrated in Figure 1.15. For example at the edge center C

vL = vA + +vA · (!*xC !!*xA)

vR = vB + +vB · (!*xC !!*xB)

where +vA and +vB are appropriately limited estimates of the gradient in cells A and B.

1.22 SLIP Reconstruction

An alternative reconstruction formula can be derived from the SLIP scheme by setting

vL,j+ 12

= vj +1

2L(#vj+ 3

2

,#vj+ 12

) (1.105)

Page 35: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 34

vR,j+ 12

= vj+1 !1

2L(#vj+ 3

2

,#vj" 12

) (1.106)

so that the di!erencevR,j+ 1

2

! vL,j+ 12

= #vj+ 12

! L(#vj+ 32

,#vj" 12

)

is the same as that used in the construction of the artificial di!usion in the SLIP scheme, while thesame slope estimate centered at j + 1

2 is used to calculate both vL,j+ 12

and vR,j+ 12

.

Defining the slope ratios

r+ =#vj+ 3

2

#vj+ 12

, r" =#vj" 3

2

#vj" 12

(1.107)

we now find that

vR,j+ 12

! vR,j" 12

= vj+1 !1

2L(#vj+ 3

2

,#vj" 12

) ! vj +1

2L(#vj+ 1

2

,#vj" 32

)

= #vj+ 12

!1

2'(r+)#vj" 1

2

+1

2'(r")#vj+ 1

2

and

vL,j+ 12

! vL,j" 12

= vj +1

2L(#vj+ 3

2

,#vj" 12

) ! vj"1 !1

2L(#vj+ 1

2

,#vj" 32

)

= #vj" 12

+1

2'(r+)#vj" 1

2

!1

2'(r")#vj+ 1

2

Thus, following the same argument that was used in the previous section, the semi-discrete schemedefined by equations (1.91) - (1.96), can be rearranged as

#xdvj

dt= !a"(v%R)(1+

1

2'(r")+

1

2a+(v%L)'(r")#vj+ 1

2

!a+(v%L)(1+1

2'(r+)!

1

2a"(v%L)'(r+))#vj" 1

2

(1.108)The coe"cients of vj+1 ! vj and vj"1 ! vj are both nonnegative if for all r

'(r) # 0

and correspondingly the semi-discrete scheme is LED.The fully discrete scheme described by equations (1.102) and (1.103) can be expressed in the

form (1.104) where now

A"j+ 1

2

= !a"(v%R)(1 +1

2'(r")) +

1

2a+(v%L)'(r")

and

A+j" 1

2

= a+(v%L)(1 +1

2'(r+)) !

1

2a"(v%R)'(r+)

Again, provided that '(r) is nonnegative

A"j+ 1

2

# 0, A+j" 1

2

# 0

and if '(r) is also bounded0 $ '(r) $ M (1.109)

we can choose #t small enough that the coe"cient of vnj is positive, and the scheme is LED.

Page 36: Advanced Computational Fluid Dynamics AA215A …aero-comlab.stanford.edu/jameson/AA215Lectures/AA215A-Lecture05.pdfLecture 5 Shock Capturing Schemes for Scalar Conservation Laws 1.1

CHAPTER 1. SHOCK CAPTURING SCHEMES FOR SCALAR CONSERVATION LAWS 35

The SLIP reconstruction requires a less restrictive bound on the maximum value of '(r) thanthe upwind reconstruction defined by equations (1.95) and (1.96). This has the advantage thatenables the use of a limiter that is closer to the arithmetic average. In particular one may take

'(r) = 0, r $ 0

'(r) =1

2(1 + r)(1 !

,

,

,

,

1 ! r

1 + r

,

,

,

,

q

), r > 0

for an arbitrary value of q. This approaches the arithmetic average from below more closely as qis increased, while for large values of r

'(r) $ q