lecture100.pdf

21
Department of Mechanical & Aerospace Engineering CARLETON UNIVERSITY AERO 4304: Computational Fluid Dynamics Winter 2013 Lecture 10: Solution of Non-Linear PDEs Lecture summary In this lecture, we will discuss review of non-linearity in the governing equations methods for solving inviscid Burgers equation methods for solving viscous Burgers equation solution of non-linear algebraic systems of equations 1 Non-linearity in the governing conservation equa- tions A feature of the Navier-Stokes equations and a number of its simplified models is that the equations are non-linear. In a non-linear equation, the coefficients multiplying the spatial and/or temporal derivatives are also variables. Non-linearity has a signif- icant impact on the behaviour governed by the PDE. A good illustration is found by studying wave propagation. Recall that in the linear convection equation (i.e. the wave equation studied in Lecture 8), the coefficient multiplying the convection term (the ∂u/∂x term) represents the wave speed, and it is a constant, c. However, in a non-linear equation, the coefficient multiplying the convection term is the unknown solution variable u. This means that the speed at which waves propagate depends on the local speed of the fluid in which they are travelling. The effect of this non-linear dependence of wave speed is vividly demonstrated in surface waves, such as tsunamis, where the velocity of the wave is dependent on the wave depth. In deep water the wave velocity is very large while the amplitude is rather small, but as the depth de- creases, the wave velocity decreases. Because the energy is (mostly) conserved, the wave amplitude increases. Since the water is deeper for the top of the waves, these move slightly faster than the bottom of the waves, leading to a progressive steepening of the waves until the wave eventually breaks. This mechanism is illustrated in Fig. 1(a) for a medium without viscosity. When viscous dissipation is present, viscosity causes damping of the wave and reduces its amplitude, as shown in Fig. 1(b).

Transcript of lecture100.pdf

Page 1: lecture100.pdf

Department of Mechanical & Aerospace EngineeringCARLETON UNIVERSITY

AERO 4304: Computational Fluid DynamicsWinter 2013

Lecture 10: Solution of Non-Linear PDEs

Lecture summary

In this lecture, we will discuss

• review of non-linearity in the governing equations

• methods for solving inviscid Burgers equation

• methods for solving viscous Burgers equation

• solution of non-linear algebraic systems of equations

1 Non-linearity in the governing conservation equa-

tions

A feature of the Navier-Stokes equations and a number of its simplified models is thatthe equations are non-linear. In a non-linear equation, the coefficients multiplyingthe spatial and/or temporal derivatives are also variables. Non-linearity has a signif-icant impact on the behaviour governed by the PDE. A good illustration is found bystudying wave propagation. Recall that in the linear convection equation (i.e. thewave equation studied in Lecture 8), the coefficient multiplying the convection term(the ∂u/∂x term) represents the wave speed, and it is a constant, c. However, in anon-linear equation, the coefficient multiplying the convection term is the unknownsolution variable u. This means that the speed at which waves propagate depends onthe local speed of the fluid in which they are travelling. The effect of this non-lineardependence of wave speed is vividly demonstrated in surface waves, such as tsunamis,where the velocity of the wave is dependent on the wave depth. In deep water thewave velocity is very large while the amplitude is rather small, but as the depth de-creases, the wave velocity decreases. Because the energy is (mostly) conserved, thewave amplitude increases. Since the water is deeper for the top of the waves, thesemove slightly faster than the bottom of the waves, leading to a progressive steepeningof the waves until the wave eventually breaks. This mechanism is illustrated in Fig.1(a) for a medium without viscosity. When viscous dissipation is present, viscositycauses damping of the wave and reduces its amplitude, as shown in Fig. 1(b).

Page 2: lecture100.pdf

AERO 4304 Lecture 10 2

f

t0 t1 t2

f

t0t1

t2

t

t

(a) Non-linear convection without viscosity

(b) Non-linear convection with viscosity

Figure 1: Non-linear wave convection in an (a) inviscid and (b) viscous medium

A simple analogue of the non-linear Navier-Stokes equations is the viscous Burgersequation, named after the Dutch fluid dynamicist Johannes Martinus Burgers (1895-1981)1. In one dimensions, this equation has the form:

∂u

∂t+ u

∂u

∂x= µ

∂2u

∂x2. (1)

Equation 1 is parabolic with the viscous term included. An analogue of the non-linearEuler equations in one dimensions is the inviscid Burgers equation, which differs fromviscous Burgers equation simply by the absence of viscous dissipation. The resultinghyperbolic equation has the form:

∂u

∂t+ u

∂u

∂x= 0. (2)

The process of wave steepening in Burgers equations is similar to that of surface waves;the non-linearity of the convection term propagates a region with large values of ufaster that a region where the values of u are smaller. A consequence of the changingwave speed is the coalescence of characteristics and the formation of discontinuous

1Prof. Burgers is one of the historical greats in fluid mechanics, despite the fact that

his formal academic training was conducted in atomic physics. An interesting biography

is maintained by The Burgers Program for Fluid Dynamics at the University of Maryland

http://www.burgers.umd.edu/burgers.html

Page 3: lecture100.pdf

AERO 4304 Lecture 10 3

solutions similar to shock waves in fluid mechanics. This means that the class ofsolutions that involve discontinuities can be studied through the viscous and inviscidBurgers equations. In today’s lecture, we will analyze methods for solving such non-linear equations.

2 Methods for the inviscid Burgers equation

The inviscid Burgers equation as shown in Eqn. 2 is in a non-conservative form. ThePDE can be altered to be in conservation form as follows:

∂u

∂t+

∂F

∂x= 0 (3)

where the unknown function F (u) depends on the specific form of the particulargoverning equation of interest. For the inviscid Burgers equation, it is obvious thatF = u2/2. We may write Eqn. 3 as

∂u

∂t+ A

∂u

∂x= 0 (4)

where A = A(u) is the Jacobian matrix ∂Fi/∂uj for the general case and is dF/dufor our simple equation.

2.1 Explicit methods

2.1.1 Lax method

While first-order-accurate methods are infrequently used due to the dissipative char-acter of the numerical error that arises with such methods, they still hold relevance forhistorical reasons and because they demonstrate application to a non-linear equation.For the Lax method, we expand in a Taylor series about the point (x, t), retainingonly the first two terms:

u(x, t+∆t) = u(x, t) + ∆t

(

∂u

∂t

)

x,t

+ · · · (5)

and then use Eqn. 3 to substitute for the time derivative to obtain

u(x, t+∆t) = u(x, t)−∆t

(

∂F

∂x

)

x,t

+ · · · (6)

Now, using centered differences and averaging the first term yields the Lax method:

un+1j =

unj+1 + un

j−1

2−

∆t

∆x

F nj+1 − F n

j−1

2(7)

Page 4: lecture100.pdf

AERO 4304 Lecture 10 4

u = 1

u = 0

Exact solution

Δt/Δx= 0.6

Δt/Δx= 1.0

Figure 2: Numerical solution of Burgers’ equation using Lax method

Recall that this scheme is first-order accurate, with a truncation error of O[(∆x)2,∆t].The amplification factor in this case is

G = cos β − i∆t

∆xA sin β (8)

where β = k∆x as before. The A term is called the function Jacobian, defined asA = dF/du, which is just the single element u for Burgers’ equation. From theamplification factor it is easy to discern that the stability requirement is

∆t

∆xumax

≤ 1 (9)

where umax is the maximum velocity in the solution domain.The performance of the Lax method for simulating a right-moving discontinuity

(a step function with u = 1 on the left of the discontinuity, u = 1 on the right, and thediscontinuity is traveling towards the right) is shown in Fig. 2. We may note that thelocation of the discontinuity is correctly predicted by the Lax method, but the shape is“smeared” out; that is, the sharpness and abruptness of the discontinuity is reducedby the numerical dissipation of the scheme, as if the scheme possess some viscousdamping forces. It is for this reason that numerical dissipation is often looked at as anartificial numerical viscosity. As noted in Section 9, the dissipation of the Lax methodbecomes worse at lower Courant numbers. Another important point to note about theLax method is that the solution is monotonic; there are no oscillations in the solutionin the vicinity of the discontinuity, which is desirable. Godunov (1959) demonstratedthat this is because the Lax method is first-order accurate. In contrast, Godunov(1959) also showed that there are no second-order-accurate schemes with monotonebehaviour. Unfortunately, we must reconcile this desirable monotonic property of theLax method with its dissipative nature.

Page 5: lecture100.pdf

AERO 4304 Lecture 10 5

2.1.2 Lax-Wendroff method

As discussed in Section 9, the Lax-Wendroff scheme is a second-order-accurate scheme.To apply this scheme to non-linear equations, we again begin with a Taylor series,this time retaining the first three terms:

u(x, t+∆t) = u(x, t) + ∆t

(

∂u

∂t

)

x,t

+(∆t)2

2

(

∂2u

∂t2

)

x,t

+ · · · (10)

The first time derivative can be directly replaced using Eqn. 3, but to deal with thesecond-derivative term, we need to examine it more closely. Let’s consider Eqn. 3again:

∂u

∂t= −

∂F

∂xTaking the time derivative of this function yields

∂2u

∂t2= −

∂2F

∂t∂x= −

∂2F

∂x∂t= −

∂x

(

∂F

∂t

)

(11)

where the order of differentiation has been interchanged. Now F = F (u), whichpermits us to write

∂u

∂t= −

∂F

∂x= −

∂F

∂u

∂u

∂x= −A

∂u

∂x(12)

and∂F

∂t=

∂F

∂u

∂u

∂t= A

∂u

∂t(13)

Hence we may replace ∂F/∂t with

∂F

∂t= −A

∂F

∂x(14)

so that∂2u

∂t2=

∂x

(

A∂F

∂x

)

(15)

It is clear that the Jacobian A contains a single element for the Burgers’ equation,but it is a matrix when u and F are vectors in treating a system of equations. Makingthe appropriate substitution in the Taylor series expansion for u, we obtain

u(x, t+∆t) = u(x, t)−∆t∂F

∂x+

(∆t)2

2

∂x

(

A∂F

∂x

)

+ · · · (16)

and after using central differencing, the Lax-Wendroff method is obtained:

un+1j = un

j −∆t

∆x

F nj+1 − F n

j−1

2

+1

2

(

∆t

∆x

)2[

Anj+1/2(F

nj+1 − F n

j )− Anj−1/2(F

nj − F n

j−1)]

(17)

Page 6: lecture100.pdf

AERO 4304 Lecture 10 6

Figure 3: Solution of Burgers’ equation using the Lax-Wendroff method

The Jacobian matrix is evaluated at the half interval, that is,

Aj+1/2 = A

(

uj + uj+1

2

)

(18)

In Burgers’ equation, F = u2/2 and A = u. In this case, Aj+1/2 = (uj + uj+1)/2 andAj−1/2 = (uj + uj−1)/2. The amplification factor for this method is

G = 1− 2

(

∆t

∆xA

)2

(1− cos β)− 2i∆t

∆xA sin β (19)

and the stability requirement reduces to |(∆t/∆x)umax| ≤ 1.The results obtained when the Lax-Wendroff method is applied to our sample

problem of a moving discontinuity are shown in Fig. 3. The right-moving discon-tinuity is correctly positioned and—unlike the dissipative Lax method—is sharplydefined. The dispersive nature of this method is clear, however, through the presenceof oscillations (overshoots and undershoots) on the upwind side of the discontinuity.Furthermore, the oscillations are greater for the lower Courant number; in general,the solution quality obtained from the Lax-Wendroff method degrades as the Courantnumber is reduced.

2.1.3 MacCormack method

The predictor-corrector method described by MacCormack (1969) is much easier toapply to the Burgers’ equation because the Jacobian A does not appear. Whenapplied to the inviscid Burgers’ equation, the MacCormack method becomes

un+1j = un

j −∆t

∆x

(

F nj+1 − F n

j

)

un+1j =

1

2

[

unj + un+1

j −∆t

∆x

(

F n+1j − F n+1

j−1

)

] (20)

Page 7: lecture100.pdf

AERO 4304 Lecture 10 7

u = 1

u = 0

Exact solution

Δt/Δx= 0.6

Δt/Δx= 1.0

Figure 4: Solution of Burgers’ equation using the MacCormack method

The amplification factor and stability requirements are the same as presented for theLax-Wendroff method. The results are shown in Fig. 4. Again, the right-moving dis-continuity is well defined. The solutions at the same Courant numbers are differentfrom those obtained using the Lax-Wendroff scheme, despite having the same am-plification factor, because of the switched differencing in the predictor and correctorsteps and also due to the non-linearity of the governing PDE. In general, Fig. 4 showsthat the MacCormack method provides good resolution at discontinuities. It shouldbe noted that reversing the order of differencing in the predictor and corrector stepsleads to very different results; the best resolution is obtained when the differencingin the predictor step is in the direction of propagation of the discontinuity.

2.2 Implicit methods

A second-order accurate implicit scheme can be obtained if the two Taylor-seriesexpansions

un+1j = un

j +∆t(ut)nj +

(∆t)2

2(utt)

nj +

(∆t)3

6(uttt)

nj + · · · (21)

unj = un+1

j −∆t(ut)n+1j +

(∆t)2

2(utt)

n+1j −

(∆t)3

6(uttt)

n+1j + · · · (22)

(23)

are subtracted and (utt)nj is replaced with

(utt)n+1j = (utt)

nj +∆t(utt)

nj + · · · .

The resulting expression becomes

un+1j = un

j +∆t

2

[

(ut)n + (ut)

n+1]

j+O[(∆t)3] (24)

Page 8: lecture100.pdf

AERO 4304 Lecture 10 8

The time differencing in this equation is known as trapezoidal differencing. Uponsubstituting the inviscid Burgers equation, we obtain

un+1j = un

j −∆t

2

[

(

∂F

∂x

)n

+

(

∂F

∂x

)n+1]

j

(25)

It is immediately apparent that we have a non-linear problem, and some sort oflinearization or iteration technique must be used to solve Eqn. 25.

2.2.1 Beam-Warming method

Beam & Warming (1976) have suggested that we linearize Eqn. 25 by writing

F n+1 = F n +

(

∂F

∂u

)n

(un+1 − un) = F n + An(un+1 − un)

and thus

un+1j = un

j −∆t

2

{

2

(

∂F

∂x

)n

+∂

∂x

[

A(

un+1j − un

j

)]

}

.

If the x derivatives are replaced by second-order central differences, then we obtain

−∆tAn

j−1

4∆xun+1j−1 + un+1

j +∆tAn

j+1

4∆xun+1j−1 = −

∆t

∆x

F nj+1 − F n

j−1

2

−∆tAn

j−1unj−1

4∆x+ un

j +∆tAn

j+1

4∆xunj+1

(26)

The Jacobian A has the single element u for Burgers’ equation, and a further sim-plification of the right side is possible. We see that linearization applied by Beam& Warming (1976) leads to a linear system of algebraic equations at the next timelevel. This is a tridiagonal system and may be solved using the Thomas algorithm.As pointed out in previous lectures, this implicit method is stable for any time stepsize. When the amplification factor for the Beam-Warming scheme is plotted, it isseen that there is no dissipative-type numerical error for any value of ∆x or ∆t. Asa result, extreme oscillations can form in the vicinity of discontinuities and artificialsmoothing needs to be added to the scheme. Usually the fourth-order difference,

−ω

8

(

unj+2 − 4un

j+1 + 6unj − 4un

j−1 + unj−2

)

(27)

is added to Eqn. 26. Because the difference is fourth-order, it does not affect theorder-of-accuracy of the Beam-Warming scheme. The implicit formula (Eqn. 26)with explicit damping added is stable if

0 < ω ≤ 1.

The results of applying the Beam-Warming scheme to the right-moving discon-tinuity is shown in Fig. 5. It is clear that the Beam-Warming scheme is highlydispersive without the explicit damping added. When explicit damping is added,much better results are obtained.

Page 9: lecture100.pdf

AERO 4304 Lecture 10 9

Figure 5: Solution of Burgers’ equation using the Beam-Warming method

2.2.2 A note on explicit and implicit methods

Solutions of the inviscid Burgers’ equation computed with an implicit scheme (Fig. 5)are inferior to the second-order-accurate schemes computed with an explicit scheme(e.g. Fig. 3 and 4), and more computational effort is required per integration step. Inaddition, because the temporal flow development is often desired, the larger timestepsizes that can be used in implicit schemes are not a major advantage. Therefore,explicit methods are generally recommended over implicit methods for solving theinviscid Burger’s equation.

2.3 Godunov schemes

The numerical methods that have been applied to solve Burgers’ equation in thissection have used Taylor series to establish appropriate expressions for the valuesof the dependent variables at the next time level. In applying the finite differencemethod, we assumed that the series expansion is an appropriate means of approxi-mating the variables of interest, be they velocity, pressure, temperature, density, etc.However, at this point we should keep in mind the requirement for the application ofTaylor series: the series will converge everywhere provided that the function being ap-proximated (i.e. velocity/pressure/temperature/density/etc.) is sufficiently smooth,which requires that the functions are continuous and have continuous derivatives atleast through the order of the difference approximation. In other words, the den-sity distribution, say, must be continuous and the first derivative must be continuousthroughout the solution domain in order for a series solution to converge. This is ob-viously not the case when discontinuities such as shock waves are present. Thus, therequirement for differentiability makes finite-difference methods fundamentally un-suitable for discontinuities solutions. Godunov (1959) recognized this basic problem

Page 10: lecture100.pdf

AERO 4304 Lecture 10 10

and found a way to avoid the requirement of differentiability by using a finite-volumemethod to solve the conservation equations and evaluated the fluxes at the interfacesof the cells by the solution of a Riemann problem. Without going into the mathe-matics to a great detail, we will now describe the application of the Godunov schemeto the inviscid Burgers equation. Consider the inviscid Burgers equation (Eqn. 3),and a finite-volume approximation with a control volume as shown in Fig. 6. For anexplicit method, the control volume extends from t to t +∆t and from x−∆x/2 tox+∆x/2. If a control volume centered at (j, n+ 1

2) is selected, the resulting numerical

approximation for the dependent variable may be written as

un+1j = un

j −∆t

∆x

[

F(

uj+ 1

2

)

− F(

uj− 1

2

)]

(28)

where the overline (u) represents the averaged value of u over the volume of theelement:

uj =1

∆x

x+∆x/2∫

x−∆x/2

u(x, t)dx

and the flux term is the time-averaged value of the flux at the control-volume interface:

F =1

∆t

t+∆t∫

t

Fdt

The Godunov method solves a local Riemann problem at each cell interface in orderto obtain a value of the flux necessary to advance the solution. The Riemann problemspecifically for the Burgers’ equation is

∂u

∂t+

∂x

(

u2

2

)

= 0 (29)

with initial conditions

u(x, 0) =

{

uj x ≤ 0

uj+1 x > 0

The geometry of the problem is shown in Fig. 7. The averaged values of the dependentvariable give the appearance of a bar-chart-like variation in the distribution, leadingto a discontinuity at each cell interface. At each cell interface, either a shock wave oran expansion wave is initiated and propagates in time, shown schematically by thediagrams sketched above each interface in Fig. 7.

There are several cases to consider in solving this problem, for which we will usethe following notation:

cj+ 1

2

=

(

dx

dt

)

j+ 1

2

=uj + uj+1

2

Page 11: lecture100.pdf

AERO 4304 Lecture 10 11

x

t

j-1 j j+1

n+1

n

CV

Figure 6: Control volume for Godunov method

u, t

x

uj-1

uj

uj+1

uj+2

Wave diagram for Riemann problem

Piecewise u

values at time t

j-1 j j+1 j+2

Figure 7: Wave diagram for the Godunov method

Page 12: lecture100.pdf

AERO 4304 Lecture 10 12

u = 1

u = 0

AnalyticalNumerical

Figure 8: Solution of inviscid Burgers equation through the Godunov method

Case 1: Shock waves (uj > uj+1):

u =

{

ujxt< cj+ 1

2

uj+1xt> cj+ 1

2

Fj+ 1

2

=

{

12u2j cj+ 1

2

> 012u2j+1 cj+ 1

2

< 0

(30)

Case 2: Expansion waves (uj < uj+1):

u =

ujxt< uj

xt

uj <xt< uj+1

uj+1xt> uj+1

Fj+ 1

2

=

0 uj < 0 < uj+1

12u2j cj+ 1

2

> 0, uj+1 > uj > 012u2j+1 cj+ 1

2

< 0, uj < uj+1 < 0

(31)

An assumption that is implied is that waves from adjacent cells do not interact.This is required in order to write a simple solution for the state variables at the cellboundaries. To assure that the waves do not interact, they can travel at most half ofone cell in distance. As a consequence, this imposes the stability restriction on theGodunov scheme of

umax∆t

∆x

≤1

2

Using Eqn. 28, we can now integrate to obtain a solution of Burgers’ equation wherethe flux is evaluated using the solution of the Riemann problem. A typical solutionis shown in Fig. 8, which illustrates that the Godunov method is superior for shockpropagation. The solution for an expansion wave (not shown) is comparable.

Page 13: lecture100.pdf

AERO 4304 Lecture 10 13

2.3.1 Roe method

The solution of the Burgers’ equation using the Godunov method is easily accom-plished, but when this method is applied to the real equations that govern fluid flow(e.g. Euler equation), it becomes necessary to employ an inefficient iterative tech-nique. To prevent this, one idea that has been used is to solve an approximate Rie-mann problem rather than having to deal with the exact non-linear iterative scheme.One of the most popular is due to Roe (1980, 1981) who suggested that the linearproblem

∂u

∂t+ u

∂u

∂x= 0, (32)

where u is an averaged based on the local conditions at the cell interface, be solved inplace of the non-linear problem. In this scheme, Eqn. 28 is solved with the numericalflux at the cell interface approximated by

Fj+ 1

2

=Fj + Fj+1

2−

1

2

∣uj+ 1

2

∣(uj+1 − uj) (33)

and the average value uj+ 1

2

is given by

uj+ 1

2

=

{

(uj + uj+1)/2 uj 6= uj+1

uj uj = uj+1

(34)

and

uj+ 1

2

=

{

uj+ 1

2

uj+ 1

2

≤ ǫ

ǫ uj+ 1

2

< ǫ(35)

where

ǫ = max

(

0,uj+1 − uj

2

)

.

The solution obtained using the Roe method is shown in Fig. 9. The case of ǫ = 0corresponds to a right-moving compression wave, and the Roe scheme uses the averageof the cell velocities to propagate the discontinuity associated with this compressionwave, as shown in Fig. 9(a). In the case of a expansion fan, ǫ = (uj+1 − uj)/2, andthe Roe method uses half the difference in the cell velocities to gradually increasethe velocity associated with the expansion, as shown in Fig. 9(c). Without the ǫcorrection of Eqn. 35, expansion “shocks” (discontinuities opposite to a compressionwave) can form in the solution, as shown in Fig. 9(b), which are not physical. TheRoe method is an explicit scheme, and as a result, it has the same stability boundsas other explicit schemes, namely that the Courant number must be less than 1.

2.3.2 Enquist-Osher scheme

In the previous section, the Roe scheme was seen to replace both shock and expansionwaves by discontinuities. In order to prevent the creation of expansion shocks, the

Page 14: lecture100.pdf

AERO 4304 Lecture 10 14

u = 1

u = 0

AnalyticalNumerical

(a) Compression shock (b) Unphysical expansion "shock" (c) Corrected expansion wave

u = 1 u = 1

u = -1u = -1

Figure 9: Solution of the inviscid Burgers’ equation through the Roe method for (a)a compression shock (b) expansion wave without Eqn. 35 and (c) expansion wavewith Eqn. 35.

modification of the numerical flux was introduced through the ǫ parameter to correctthe physical behaviour. In contrast, rather than using discontinuities to representthe change in dependent variables, the scheme introduced by Enquist and Osher(1980, 1981) treats that change as a continuous transition to produce a method thatis monotone and conservative and correctly treats both shock and expansion waves.The shock discontinuities are treated as smooth compression waves resolved with atmost two interior points. The Enquist-Osher method—like the Roe method—is anexplicit approximate Riemann solver and hence the Courant number must be lessthan 1.

For the inviscid Burgers’ equation, the Enquist-Osher represents the interface fluxin Eqn. 28 as

Fj+ 1

2

=

{

u2j+1/2 uj < 0 and uj+1 < 0

u2j/2 uj > 0 and uj+1 > 0

(36)

If uj and uj+1 are of opposite sign, then

Fj+ 1

2

=

{

0 uj < 0 < uj+1

(u2j + u2

j+1) uj > 0 > uj+1

(37)

2.4 Higher-order upwind schemes

In the Godunov-type methods described above, state variables were assumed to beconstant within control volumes, which results in a first-order accurate schemes. How-ever, if the state variables are assumed to vary within a control volume, it leadsto a higher-order extrapolation of the flux or state variables at the cell boundaries.Schemes of this type—where the state variables are assumed to vary within the controlvolume, and this variation is used to extrapolate the flux across the cell boundaries—are termed “monotone upstream-centered schemes for conservation laws,” or MUSCL(van Leer, 1979). In such a scheme, the values assigned to each cell (i.e. at the j,

Page 15: lecture100.pdf

AERO 4304 Lecture 10 15

u, t

x

u

j-1 j j+1

1

2j-l

u 1

2j-r

u 1

2j+l

u 1

2j+r

Figure 10: Assumed linear variation of u in each cell j.

j + 1, etc. locations) correspond to the averages over each cell, and depending onthe accuracy desired, the dependent variable distribution within each cell may be acurve fit with a polynomial of arbitrary order. Figure 10 shows the piecewise linearrepresentation where the variation of u is a linear function of the position in the cell,and the average value of u is assigned to the cell. From the figure, it is clear thatfor a cell j, the expressions for the independent variables will have a right and a leftside. To arrive at an extrapolation for the control-volume boundaries, a Taylor-seriesrepresentation is employed where the derivatives are evaluated using cell averages.The usual expressions for the right and left extrapolations are

ulj+ 1

2

= uj +1− κ

4

(

uj − uj−1

∆x

)

+1 + κ

4

(

uj+1 − uj

∆x

)

(38)

urj+ 1

2

= uj+1 +1 + κ

4

(

uj+1 − uj

∆x

)

+1− κ

4

(

uj+2 − uj+1

∆x

)

(39)

where the value of κ determines the type of method:

κ =

{

−1 Upwind scheme

1 Central difference(40)

We can now use these higher-order extrapolations of the boundary velocities to obtaina higher-order approximation of the boundary fluxes. To obtain the second-orderfluxes, simply replace the velocities used in the first-order fluxes with the values givenin Eqns. 38 and 39. For example, consider the Roe scheme, where the first-order fluxis given by Eqn. 33. The second-order approximation of the flux is obtained by

Page 16: lecture100.pdf

AERO 4304 Lecture 10 16

u = 1

u = 0.5

Analytical

Numerical

Figure 11: Second-order Roe scheme applied to Burgers’ equation without limiting.

replacing uj, uj+1 in Eqn. 33 with right and left velocities:

F(2)

j+ 1

2,Roe

=1

2

[

F(

ulj+ 1

2

)

+ F(

urj+ 1

2

)

−∣

∣uj+ 1

2

(

ulj+ 1

2

− urj+ 1

2

)]

(41)

where

uj+ 1

2

=F(

urj+ 1

2

)

− F(

ulj+ 1

2

)

urj+ 1

2

− ulj+ 1

2

. (42)

The stability restriction of the second-order scheme depends on whether the upwindor centered differences are used to extrapolate the boundary fluxes (Eqns. 38 and39); a Courant number less than 1 is necessary for the central scheme, while the lessrestrictive value of 2 may be used in the upwind case. Using the second-order fluxin Eqn. 28 and solving the inviscid Burgers’ equation produces the results shownin Fig. 11. As seen previously, it is clear that the second-order scheme results inunphysical oscillations near the discontinuity. The oscillations are observed whethera second-order upwind scheme or a central-difference scheme is employed. Therefore,some way of controlling this behaviour is desired, which has led to the developmentof limiters that avoid the overshoots and undershoots shown in typical higher-ordersolutions.

2.5 Total variation diminishing (TVD) schemes

To avoid the oscillations that occur with higher-order schemes, exemplified in Fig.11, we must place a limit on the total variation of physically possible solutions. Lax(1973) showed that for a scalar conservation law in the form of Burgers’ equation, thetotal variation (TV) of physically possible solutions does not increase in time. The

Page 17: lecture100.pdf

AERO 4304 Lecture 10 17

TV is given by

TV =

∫∣

∂u

∂x

dx (43)

and the TV for the discrete case is

TV (u) =∑

j

|uj+1 − uj|. (44)

A numerical method is said to be TV diminishing, or TVD, if

TV (un+1) ≤ TV (un) (45)

Harten (1983) proved that

1. A monotone scheme is TVD

2. A TVD scheme is monotonicity preserving

Thus, if higher-order TVD schemes can be constructed, these schemes will be mono-tonicity preserving. The central idea is to develop a method that will avoid oscillationsand exhibit properties near discontinuities that are similar to those of a monotonescheme, and yet achieve higher-order accuracy in smooth regions. For such schemes,the solution is first order near discontinuities and higher order in smooth regions, andthe transition from first to higher order is accomplished by the use of slope limiterson the dependent variables. Unwanted oscillations can be avoided if the slopes ofthe variables used in the extrapolations are limited in such a way that the end pointvalues do not create a new maximum or minimum. In other words, for the case ofuj−1 < uj+1, it is desired that

urj− 1

2

≥ uj−1 (46)

ulj+ 1

2

≤ uj+1 (47)

These limits are depicted schematically in Fig. 12. In Fig. 12(a), the dependentvelocity uj has a slope such that the end point values are between uj−1 and uj+1, sothe slope is acceptable and does not need to be limited. In Fig. 12(b) and (c), theslopes are such that one of the end points creates a new local minimum or maximum,and so they need to be limited.

An easy control is devised by introducing slope limits in the following way:

ulj+ 1

2

= uj +1− κ

4δ+uj− 1

2

+1 + κ

4δ−uj+ 1

2

(48)

urj+ 1

2

= uj −1 + κ

4δ+uj+ 1

2

−1− κ

4δ−uj+ 3

2

(49)

Page 18: lecture100.pdf

AERO 4304 Lecture 10 18

u, t

x

u

j-1 j j+1

j-1

u j+1

u j

u, t

x

u

j-1 j j+1

j-1

u r

u 1

2j+l

u j+1u j

1

2j-

u 1

2j+l

u r1

2j-

(a) Acceptable slope (b) local maximum

u, t

x

u

j-1 j j+1

j-1

u r

u 12j+

l

u j+1

u j

12j-

(c) local minimum u 12j+

l u r12j-

Figure 12: Schematic illustration of the end values required to ensure that a schemeis TVD.

where the quantities δ±uj are limited slopes. A number of different limits may beused, a simple choice being the minmod limiter defined by

δ−uj+ 1

2

= minmod

(

uj+1 − uj

∆x, ω

uj − uj−1

∆x

)

(50)

δ+uj+ 1

2

= minmod

(

uj+1 − uj

∆x, ω

uj+2 − uj+1

∆x

)

(51)

The minmod function selects the smallest number from a set when all have the samesign but is zero if they have different signs. For example,

minmod(x, y) =

x if |x| < |y| and xy > 0

y if |x| > |y| and xy > 0

0 if xy < 0

(52)

with the limits on ω being

1 ≤ ω ≤3− κ

1− κ(53)

and the values of κ not equal to 1. When these limiters are applied to the second-orderRoe scheme used to solve the inviscid Burgers’ equation, the results shown in Fig. 13are obtained. In comparison to Fig. 11, it is clear that the limiter greatly improvesthe quality of the solution. The MUSCL approach indeed provides a good way ofcalculating a higher-order solution that is dramatically improved by using limiters.

3 Methods for the viscous Burgers equation

As introduced at the start of this lecture, the complete non-linear Burgers’ equationis a non-linear convection-diffusion equation given by Eqn. 1. It is a parabolic PDE

Page 19: lecture100.pdf

AERO 4304 Lecture 10 19

u = 1

u = 0.5

Analytical

Numerical

Figure 13: Second-order Roe scheme applied to Burgers’ equation using the minmodlimiter.

and can serve as a model of the boundary-layer equations, the “parabolized” Navier-Stokes equations, and the complete Navier-Stokes equations. To better model thesteady boundary-layer equations, the independent variables x and t can be replacedwith x and y to give

∂u

∂x+ u

∂u

∂y= µ

∂2u

∂y2. (54)

where x is the marching direction.For simplicity, the linearized Burgers’ equation,

∂u

∂t+ c

∂u

∂x= µ

∂2u

∂x2. (55)

is often used in place of Eqn. 1. Note that if µ = 0, the wave equation is obtained,and if c = 0, the heat equation is obtained. Equations 1 and 55 can be combined intoa generalized equation:

ut + (c+ bu)ux = µuxx (56)

where c and b are free parameters. If b = 0, the linearized Burgers’ equation isobtained, and if c = 0 and b = 1, the non-linear Burgers equation is obtained. Finally,Eqn. 56 can be put into conservation form as

ut + Fx = µuxx (57)

where F is defined by

F = cu+bu2

2. (58)

For the linearized case (b = 0), F reduces to F = cu. If we let A = ∂F/∂u, then Eqn.57 becomes

ut + Aux = µuxx (59)

Page 20: lecture100.pdf

AERO 4304 Lecture 10 20

where A = u for the non-linear Burgers’ equation (c = 0, b = 1) and A = c for thelinear Burgers’ equation (b = 0).

The various schemes described previously for the inviscid Burgers’ equation canequally be applied to the viscous Burgers’ equation by adding a second-order (orhigher) central-difference expression for the viscous term uxx, although some methodsare especially formulated for the viscous Burgers equation. To illustrate, let’s lookat the Roe method applied to the complete viscous Burgers equation. The algorithmbecomes

un+1j = un

j −∆t

2∆x

[

(

F nj+1 − F n

j−1

)

−∣

∣unj+ 1

2

(

unj+1 − un

j

)

+∣

∣unj− 1

2

(

unj − un

j−1

)

]

+ r(

unj+1 − 2un

j + unj−1

)

(60)

where F = u2/2, r = µ∆t/(∆x)2 and

unj+ 1

2

=unj + un

j+1

2.

When the Roe scheme is applied to Eqn. 56, where

F = cu+bu2

2,

then uj+1/2 can be computed as follows:

uj+ 1

2

=F nj+1 − F n

j

unj+1 − un

j

= c+b

2

(

unj+1 + un

j

)

. (61)

The explicit one-step Roe method is first-order accurate with a truncation error ofO[∆t, (∆x)2]. Higher-order versions of the Roe scheme can be obtained using theMUSCL techniques discussed above.

References

Beam, R.M. & Warming, R.F. 1976 An implicit finitie-difference algorithm forhyperbolic systems in conservation law form. Journal of Computational Physics 22,87–110.

Enquist, B. & Osher, S. 1980 Stable and entropy satisfying approximations fortransonic flow calculations. Mathematics of Computation 34, 45–75.

Enquist, B. & Osher, S. 1981 One-sided difference approximations for nonlinearconservation laws. Mathematics of Computation 36, 321–352.

Godunov, S.K. 1959 A difference scheme for numerical solution of discontinuoussolution of hydrodynamic equations. Matematicheskii Sbornik 47, 271–306. Trans-lated by the US Joint Public Research Service, JPRS 7225 Nov. 29, 1960.

Page 21: lecture100.pdf

AERO 4304 Lecture 10 21

Harten, A. 1983 High-resolution schemes for hyperbolic conservation laws. Journalof Computational Physics 49, 357–385.

Lax, P.D. 1973 Hyperbolic Systems of Conservation Laws and the Mathematical The-

ory of Shock Waves . Philadelphia, PA: Society for Industrial and Applied Mathe-matics.

MacCormack, R.W. 1969 The effect of viscosity in hypervelocity impact cratering.AIAA Paper 69-354 pp. Cincinnatti, OH.

Roe, P.L. 1980 The use of the riemann problem in finite-difference schemes. InLecture Notes in Physics , , vol. 141. New York: Springer-Verlag.

Roe, P.L. 1981 Approximate riemann solvers, parameter vectors and differenceschemes. Journal of Computational Physics 45, 357–372.

van Leer, B. 1979 Towards the ultimate conservation difference scheme, V: Asecond-order sequel to Godunov’s method. Joural of Computational Physics 32,101–136.