second- and third-order noncentered difference schemes for nonlinear hyperbolic equations

8

Click here to load reader

Upload: harvard

Post on 25-Dec-2016

217 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

VOL. 11, NO. 2, FEBRUARY 1973 AIAA JOURNAL 189

Second- and Third-Order Noncentered Difference Schemesfor Nonlinear Hyperbolic Equations

R. F. WARMING,* PAUL KUTLER,* AND HARVARD LoMAxfNASA Antes Research Center, Moffett Field, Calif.

Second- and third-order, explicit finite-difference schemes are described for the numerical solution of thehyperbolic equations of fluid dynamics. The schemes are uncentered in the sense that spatial derivatives are generallyapproximated by forward or backward difference quotients. The advantages of noncentered methods over the moreconventional centered schemes are: programing logic is simpler, nonhomogeneous terms are easily included, andgeneralization to multidimensional problems is direct. The von Neumann stability analysis for the proposed methodsis reviewed and second- and third-order methods are compared with regard to dissipative and dispersive errors andshock-capturing ability.

Introduction

THIS paper deals with the construction of explicit finite-difference approximations for the solution of initial-value

problems for hyperbolic systems in the conservation-law form

r>0 (1)

where u, Ft, and H are JV-component vectors andx = (xlf x2,..., xd)'. The schemes proposed are of second- andthird-order and are uniformly accurate in both the time andspace increments. The numerical algorithms are based on theRunge-Kutta method for ordinary differential equations and thusto advance the solution u(t) one time increment to w(t-hAt) asequence of one or more iterates denoted as w ( 1 ) ,w ( 2 ) , . . . isrequired. Before application of the Runge-Kutta method, thespatial derivatives of Eq. (1) are replaced by appropriatedifference quotients. We propose to use, in general, noncentereddifference operators, such as forward or backward operators, asopposed to the more common technique of using centereddifferences. This approach was motivated by the efficient second-order noncentered scheme devised by MacCormack.1'2

The fundamental distinction between centered and non-centered schemes is the fact that noncentered schemes requireevaluation of the dependent variables only at the grid points.On the other hand, centered schemes such as the third-ordermethods of Rusanov3 and Burstein and Mirin,4 requires com-putations at one or more time levels to be made on a staggeredmesh displaced usually \ of a spatial increment from the primarymesh. At least three advantages accrue when the dependentvariables are only calculated on the primary mesh points: a) theprograming logic is simpler, b) the inclusion of the nonhomo-geneous or source term H of the system (1) into the finite-difference scheme is trivial, and c) the generalization of a schemeconstructed for one space dimension to several space dimensionsis simple and direct. The numerical algorithms presented in thispaper are new in the following sense: the second-order schemeis more general than MacCormack's original version in that thepredictor t/(1) can be evaluated at an arbitrary time level; thethird-order method uses noncentered differences in the first twosteps as opposed to the completely centered scheme of Rusanov3

and Burstein and Mirin.4The second-order (MacCormack) scheme is well suited for usePresented as Part II of AIAA Paper 72-193 at the AIAA 10th Aero-

space Sciences Meeting, San Diego, January 17-19, 1972; submittedFebruary 16, 1972; revision received September 21, 1972.

Index category: Supersonic and Hypersonic Flow.* Research Scientist, Computational Fluid Dynamics Branch.

Member AIAA.t Chief, Computational Fluid Dynamics Branch. Member AIAA.

as a shock-capturing technique5 since the method is capable ofnumerically predicting the locaton and intensity of predominantshock waves without explicit use of a shock-fitting procedure.The practical value of using a scheme of third rather than ofsecond order in both time and space as a shock-capturing methodhas yet to be firmly established. The reason to examine a third-order method is fairly straightforward when viewed in the lightof harmonic decomposition. It is well known that the harmonicanalysis of a periodic step function contains a finite amplitudefor all the harmonics. A third-order method differs from asecond-order one principally with regard to the error indispersion (phase shift) of the higher frequencies. Thus when adiscontinuity is propagated through a mesh by numericalmethods based on continuous curve fits, third-order methodspermit the higher frequency terms of the harmonic decompositionto more accurately keep pace with lower frequency ones. As thewave progresses, second-order methods display an oscillationbehind the wave front that should, therefore, be less noticeablein solutions obtained by third-order schemes.

In another article6 of this Journal, both second- and third-order noncentered schemes are used as a shock-capturing tech-nique to determine the in viscid, supersonic flowfield surroundinga space shuttlelike configuration. The complicated flowfieldsurrounding such a vehicle provides a good test problem for acomprehensive comparison of second- and third-order methods.

Construction of Noncentered SchemesThe numerical algorithms constructed in this paper for the

solution of hyperbolic systems are based on the Runge-Kuttatechnique for the ordinary differential equation

du/dt = u' =f(u, t) (2)To advance the numerical solution one time step Af from timet = n&t, the second-order Runge-Kutta scheme can be written inpredictor-corrector form as7

^Va^Wn + aiAtw,/ (3a)

The superscript (1) indicates a predicted value at a time indicatedby the subscript, the primes denote differentiation with respectto time, and the constants ap w0, and \v1 are determined so thatthe scheme is of second-order accuracy. Likewise, the third-orderRunge-Kutta scheme can be written in predictor-corrector formas

(4a)(4b)(4c)

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 2: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

190 WARMING, KUTLER, AND LOMAX AIAA JOURNAL

In this section we consider the one-dimensional versiondu/dt + dF(u, x, t)/dx + H(u, x, t) = 0 (5)

of the hyperbolic system (1) where u, F, and H are TV-dimensionalvectors. A numerical mesh is introduced in x — t space withincrements Ax and At with indexing defined such that

t = tn = nAt, x = x. = /Ax, M." = M(xf, fn)To apply algorithms (3) or (4) to the partial differential equationsystem (5), the spatial derivative dF/dx must be replaced by anappropriate finite-difference approximation in each step of thepredictor-corrector sequence. Nearly all the popular finite-difference methods8'9 of the Runge-Kutta type used to solvehyperbolic systems are centered schemes in the sense that thespatial derivatives are approximated by a combination of thecentral-difference operators10

Wi = Fi+ii2-Fi-ii2 (6a)and

lidFi = (Fi+l-Fi^)l2 (6b)where the averaging operator // is defined by

t*Fi = (Fi+ii2 + Fi-ll2)/2 (6c)An exception is the method of MacCormack1'2 which uses theforward and backward operators

^Ft = Fi+1-Fif VFi = Fi-Fi.l (7)In this paper a scheme is called noncentered unless all the spatialdifference operators are central.

Before considering the proposed noncentered differenceschemes, we discuss briefly a natural symmetry in spacedifferencing which arises in certain problems. This point isexemplified by considering the initial-value problem for the linearscalar equation

du/dt + cdu/dx = Q, t >0 (8)where

M(x,0) = h(x)The general solution of this equation is

u(x,t) = h(x-ct) (9)Since the exact solution of Eq. (8) is constant along the charac-teristic line x — ct = const., a wave profile travels with speed \c\in the direction of either the positive or the negative x axisdepending on the sign of c. Thus, it is desirable that a numericalscheme be able to handle either a left- or right-moving wavewith equal facility and accuracy.

A further desirable symmetry trait can be explained as follows.From the exact solution (9), one can show that on a finite-difference mesh there exists a perfect shift condition

uin+1=ui

n±mf v = + m , m = l , 2 , . . . (10)

wherev-cAr/Ax (11)

is defined to be the Courant number. Consequently, a numericalscheme satisfying condition (10) for a particular choice of Courantnumber is compatible with the local characteristics. Here again,since the constant c can be positive or negative, the shift conditionindicates that the spatial mesh points contributing numerical datato the calculation of u"+i by the algorithm should besymmetrically distributed about index i.

To pursue the matter of symmetry in more detail, we notefor the linear equation (8) that any second-order accuratealgorithm using data from only three points xt, xi± x to advancethe solution one time step can be reduced to a unique differenceoperator. The result in terms of the central-difference operators(6a, b) is

"i"+1 = uf-vuduf + t f f f i d 2 ^ (12)It is easy to verify that the preceding equation satisfies the shiftcondition (10) for m = 1.

To construct a third-order scheme it is necessary to use morethan three space points to advance the solution one time step.Consider an algorithm for the scalar equation (8) constructedfrom five points centered at xf having the form

M 1 " + 1 = E Ak"i + kn

k=-2

The symmetry condition for left- and right-moving waves is

(13)

(14)The assumption of third-order accuracy in conjunction with thesymmetry condition (14) determines the coefficients Ak and therefollows the difference operator

v3(ljfi3/6)uin-(a)/24)d\n (15)

where the parameter b is arbitrary. The last term on the right of(15) is a fourth-order spatial operator with the arbitrary multi-plicative factor co and was appended to the scheme for reasonsto be explained below. Its presence, however, does not affect thethird-order accuracy.

If the shift condition (10) is to be satisfied for v = ±1, thenb and co are related by

b = co/24, v = ± l (16)In addition, if the shift condition (10) is to be satisfied forv = ±2, then

86-60/12= 1, (17)From the above Eqs. (16) and (17), it is clear that the shift con-dition (10) cannot be satisfied, in general, without the addition ofthe fourth-order operator 64 to Eq. (15). Although we have statedabove that the parameter b is arbitrary, in practice this is notreally the case. The reason is that once a nonlinear scheme isconstructed for the system (5), and then applied to the linearscalar equation (8), some particular number for b will result.

Several points should be made from the preceding discussionof the linear problem (8). A numerical algorithm using noncentereddifference operators in one or more steps of a predictor-correctorsequence should reduce to a symmetric form, i.e., one containingonly central-difference operators, when reduced to a single-stepformula. When the Courant number, as defined by Eq. (11),equals ±m, the shift property should be satisfied for at leastm = 1. Finally, the general shift conditions (16) and (17) cannotbe satisfied for a third-order three-step scheme without theaddition of a higher order difference operator as appended toEq. (15). It should be mentioned that this operator is alsonecessary for numerical stability as will be discussed in asubsequent section.

We return now to the general nonlinear problem (5). Theessential difficulty in the construction of noncentered finite-difference approximations is the proper selection of the differenceoperators to replace dF/dx in the partial differential equation (5)so that the Runge-Kutta formula (3) or (4) can be applied. Tocomplicate matters, the requisite spatial difference operatorsgenerally differ for each time derivative required in either Eqs. (3)or (4). The situation is relatively simple for second-order accuracybut is certainly more subtle for third order. Ultimately, theoperators are chosen so that the number of mesh points at whichdata are used to advance the solution one time step equals theminimum number required under the constraint of symmetry fora difference scheme of a specified order of accuracy. If the orderof accuracy is greater than two, there is considerable algebrainvolved in deriving the desired difference schemes. Our purposehere is not to go into these details but, suffice it to say, thealgebra can be systematized in such a way as to be quite tractable,even for obtaining fourth-oi;der methods.

Second-Order Finite-Difference SchemeUnder the constraints of the preceding section, it is rather easy

to devise a noncentered second-order method for the hyperbolicsystem (5) based on the two-step formula (3). The result is

w.d) = M/I-a1Ar[(l-eV)(AF£B/Ax) + H/1] (18a)

M.»+1 = Ui n-w0At[(l + KV)(AFI."/Ax) + //;"]-

] (18b)

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 3: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

FEBRUARY 1973 SCHEMES FOR NONLINEAR HYPERBOLIC EQUATIONS 191

where here the superscript denotes the time variable and thesubscript the spatial variable. The predictor w f

( 1 ) is evaluated attime (n + aJAf but this is not indicated explicitly in the notation.Thus

u» = U(xit t"), u t( l ) = w(1)(x,, f + o^Ar) (19a)

F? = F(utn, xif tn\ Ft

(1) = F(I)(M£(I), xif f + o^Af) (19b)

and similarly for H. The parameters in (18) must satisfyWi#i = i, WQ + W! = 1, £ = 0, or 1 (20a)

WO/C + WJE = ilwi-wo) (20b)If £ = 0, the predictor (18a) uses a forward difference and thecorrector (18b) uses a backward difference on Ff

(1). If £ = 1, thedifferencing is simply reversed because of the identities

(1-V)A = V, (1+A)V = A (21)Two commonly used specializations of the Runge-Kutta

formulas (3) for ordinary differential equations correspond toaj_ = \ and to o^ = 1. In the first case the weight w0 is zero,which would certainly simplify (18b). However, this special caseis incompatible with Eq. (20b) and so we have the curiousresult that evaluation of the predictor at half-step time leveln + ̂ is excluded for the partial differential equation algorithm(18).

For «! = 1, it follows from Eqs. (20) that \v1 = w0 = \ andK = — s. In this case the bracket expression of Eq. (18a) isidentical with the first bracket of Eq. (18b) and consequently thefinite-difference scheme can be rewritten as

(22a))] (22b)

where the predictor is evaluated at the new time level n+ 1, i.e.,MI.(1) = M (1 )(x / ,f"+1)

This is precisely the noncentered scheme proposed byMacCormack.1'2 Subsequently, we shall refer to both (22) and themore general scheme (18) as MacCormack's method. It shouldbe noted that a reduction in computer storage requirementsand arithmetic operations is achieved in Eqs. (22) as comparedto the original form (18).

Third-Order Finite-Difference SchemeWe have not derived a completely general third-order non-

centered scheme where w(1) and u(2} can be evaluated at arbitrarytimes (rc-f-aJAr and (rc + a2)Af. However, the scheme consideredbelow is probably the simplest third-order noncentered schemewith regard to computational efficiency.

A direct approach to the derivation of a third-order schemeis to consider the possibility of using MacCornack's second-ordermethod (18) to compute the first two steps w(1) and w(2) of a three-step method based on Eqs. (4). Of course, this implies that u(2)

is second-order, a condition not generally required of a third-order scheme. An examination of the derivation of Eqs. (4) forordinary differential equations shows that if u(2} is of secondorder, then a2 must equal f, i.e., the second step is evaluatedat (n-hf)Af. The assumption a2 = f led to the following third-order algorithm for the partial differential equation (5):

[ AF" 1(1-eV)—- + //•" (23a)

, VF <

' 24 ' •H?

(2)

where ut(1> = u(1\xi,tn+ <*!&), ut

(2) = u(2\xt> fparameters in (23) must satisfy

(23b)

(23c)

and the

(n + i)At(n+2/3)At(n+a,)At

- K/'\- X X X X

- s\- < K < K

1 N. 1 N. 1 X. 1 v

i-2 i-i i i+i i+2CENTERED

i-2 i-i i i+i i+2NONCENTERED

Fig. 1 Comparison of grid point clusters for a centered and noncenteredthird-order scheme.

> = i £ = 0, or 1 (24a)= lK0i-0o) (24b)

The fourth-order operator cod4 appearing in (23c) is the sameterm that was appended to Eq. (15). The role of the free para-meter co in the finite-difference scheme will be discussed in detailin the following two sections. It should be pointed out that thethird step (23c) is identical to the third step of the centered third-order scheme proposed by Rusanov3 (for the special casea2 = f) and also by Burstein and Mirin.4 In fact, Burstein andMirin note that, in principle, any second-order differenceoperator can be used to generate ut

(2) in their scheme, and thuswe propose using the noncentered MacCormack scheme (18).Figure 1 compares the grid point cluster for a centered scheme4

and the above noncentered scheme to advance the solution tou"+1 using numerical data from five points centered at i at timelevel n.

In the special case o^ = f, the corrector w/2) can be rewrittenin a form analogous to (22b) for the second-order method. Thus

Ui(1) = same as right side of (23a) with oq = f (25a)u .<2> = i(Wl." + wi

(1))-iAr[(l+£A)VFi(1)/Ax + //i

(1)] (25b)ut

n+1 = same as right side of (23c) (25c)where now w f

( 1 ) and ut(2) are both evaluated at time level

(« + f)Af.It is appropriate to mention that if we had originally imposed

the condition ax = a2 rather than making the assumption thatw(2) was to be of second order, then the only possible solutionis «! = a2 = f. Thus one cannot construct a scheme, centered ornoncentered, with w(1) and w(2) evaluated at the same time levelother than at (n + f)Af. A proof of this fact for third-orderRunge-Kutta methods was given by Ralston.11

Stability of One-Dimensional OperatorsTo perform a von Neumann stability analysis,8 the second-

order scheme (18) and the third-order scheme (23) are applied tothe linearized homogeneous version of the hyperbolic system (5)rewritten as

where A is the Jacobian matrix dF/du with A assumed to beconstant. In this linear case F = An and the algorithm (18) canbe reduced to a single difference operator by insertion of (18a)into (18b). Likewise, the third-order algorithm (23) is reduced toa single difference operator by substitution of (23a) into (23b) andthe result into (23c). The resulting linear difference operators areidentical to the linear versions of the second-order Lax-Wendroffscheme (see, e.g., Richtmyer and Morton,8 p. 302) and thecentered third-order scheme of Rusanov3 and Burstein andMirin.4 This, of course, is no accident since the noncenteredschemes were constructed to reduce to single-step symmetricdifference operators for linear problems. The von Neumannstability analysis for the Lax-Wendroff scheme is well knownand we do not repeat it here.

A linear-stability analysis for the third-order scheme as appliedto Eq. (26) has been carried out by Burstein and Mirin.4 Thepertinent results are summarized as follows. The amplificationmatrix is

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 4: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

192 WARMING, KUTLER, AND LOMAX AIAA JOURNAL

Fig. 2 Stable range of free parameter CD and v for third-order scheme.

Ari -— A sin 6Ax

where / is the identity matrix, i = (— 1)1/2,6 — /cAx, k is the wavenumber, and 0 ̂ 0 ̂ n. Since the amplification matrix (27) is apolynomial function of the matrix A whose eigenvalues aredenoted by a, the eigenvalues g of G are given by

where(28)

v = <j(Ar/Ax) (29)Stability of the linear difference operator is ensured if \g\ ̂ 1,and Burstein and Mirin4 have shown that this is the case if andonly if

H ^ 1 (30a)and

4v2-v4 <co < 3 (30b)for all eigenvalues o of A. The shaded region of Fig. 2 shows therange of co for stability as a function of |v .

Rusanov3 based his stability analysis on the scalar equation (8).For this linear equation the third-order scheme (23) reduces tothe single-step formula (15) where the constant b has the values of£. In this case the amplification factor is given by formula (28)except that c replaces a in (29). Rusanov arrives at the samestability criterion (30), and the remarks that the stability con-dition based on the difference analog of the scalar equation (8)is valid for the linear system (26) if c is replaced by the maximumeigenvalue modulus |cr|max of A. In the following section, ouranalysis of dissipative and dispersive errors will be based on thescalar equation (8).

We remarked earlier on the need to append a fourth-orderoperator cod4 to the difference operator (15) in order to satisfythe perfect shift conditions. It is evident from the inequality(30b) with CL> = 0 that the addition of this fouth-order operatoris also required to achieve numerical stability. The additionalshift condition (17) need not be considered further because of thestability constraint (30a).

Dispersive and Dissipative ErrorsThe product of the amplification factor g(k) and the Fourier

coefficient u"(k) corresponding to a given wave number k yieldsthe Fourier coefficient at the next time step, i.e.,

un+\k) = g(k}un(k) (31)Since g(k) is complex it may be rewritten as

g(k) = \g(k)\e^ (32)The square of the modulus of the amplification factor (28) for thethird-order method is

= l-fz2S(z) (33a)where

• 7 #z = sm2- (33b)

z2[4v2(l - v2)2 - (co - 3v2)2] (33c)and v = cAr/Ax. The phase shift </> per time step of the finite-difference approximation can be computed by the formula

</> = sin~1 {[0(fe)]imag/|0(fc)|} (34)A Fourier coefficient of an exact periodic solution of Eq. (8)

has the amplification factorg(k) = e-id*t (35)

which has unit modulus and a phase shift per time incrementAt of

(j)e = -c/cAr = -v0 (36)Hence the relative phase error is given by the ratio of (34) and(36).

Dissipative (amplitude distortion) and dispersive (phase shift)errors can be conveniently represented as polar plots of \g(k)\and (j)/(j)e as a function of 9 = /cAx. Figure 3 shows plots of theamplification factor modulus and phase error of the third-ordermethod for v = cAr/Ax = 0.7 and for several values of the freeparameter co in the stable range (30b). If for a given 0 = /cAxthe phase error exceeds 1, the numerical solution of the cor-responding Fourier mode moves faster than the exact solutionwith the reverse being the case for a phase error less than 1.

It is apparent from Fig. 3 that the free parameter co affectsboth dissipative and dispersive errors. The following discussionis intended to provide some rationale in the selection of codepending on the desired properties of the numerical solutionwith regard to damping and phase errors.

The von Neumann stability analysis can be supplemented byconsidering a modified partial differential equation analog of thedifference scheme (see, e.g., Hirt12). The modified equationrepresents the actual partial differential equation solved by thedifference equation and is obtained by expanding each term of thedifference scheme in a Taylor series expansion about u". Thehigher order time derivatives in the resulting equation areeliminated by algebraic manipulations to obtain an equation ofthe form

du du dpu(37)

In particular, for the linear difference scheme (15) with b = £,the first five coefficients /i(p) are

/x(2) = /z(3) = 0 (38a)//(4) = - (Ax4/24Ar) (co - 4v2 + v4) (38b)= (cAx4/120)[-5w-h(4v2 + l)(4-v2)] (38c)x6/144AO[-co(l + 3v2) + 2v2(4-v2)(l + v2)] (38d)

A heuristic stability analysis13 shows that a necessary conditionfor stability is that the coefficient //(4) be nonpositive; henceco — 4v2 + v4 ^ 0 a result consistent with condition (30b).

1 CU = 1.71992 (JJ = 2.07793 CU = 2.50004 O) = 3.0000

7T/2

Fig. 3 Amplification factor modulus \g(k)\ and phase error (f)/(j)e of thethird-order method for v = 0.7.

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 5: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

FEBRUARY 1973 SCHEMES FOR NONLINEAR HYPERBOLIC EQUATIONS 193

' w FOR MINIMUM DISSIPATION2 ^ FQR M|N(MUM

-—— SECOND ORDER

Igool

Fig. 4 Comparison of amplification factor modulus \g(k)\ and phaseerror 4>/4>e for second- and third-order methods.

The coefficients (38) play an important role in the selectionof the free parameter co if one desires to minimize eitherdispersive or dissipative errors. Hence, if /a(4) is equated tozero

ao = 4v2 — v4 (minimum dissipation) (39)or if ju(5) is equated to zero

co = (4v2 + l)(4 — v2)/5 (minimum dispersion) (40)These two curves are plotted in Fig. 2, and one would expectthat a practical choice of the free parameter CD for a givenCourant number |v| g 1, should fall in the region bounded bythe curves 1 and 2 of the figure. Curves 1 and 2 of Fig. 3 cor-respond to values of to calculated from Eqs. (39) and (40).

Comparison of Second- and Third-Order MethodsTo assess the relative merits of second- and third-order

difference schemes we compare the dissipative and dispersiveerrors for both methods. The second-order scheme (18) whenapplied to the linear equation (8) reduces to the single differenceoperator (12). The amplification factor for this operator is

g(k) =l-ivsin0-2v2sin20/2 (second order) (41)where

|0(*)|2=l-4v2(l-vV (42)and z = sin2($/2). The modulus of g(k) remains bounded by 1for 0 ^ z rg 1 if and only if |v ^1 which is the stability con-dition for the second-order method.

The modified equation (37) corresponding to the differenceoperator (12) has the following values for the first threecoefficients

H(2) = 0 (43a)= -(cAx2/6)(l-v2) (43b)

= - (Ax4/8A£)v2( 1 - v2) (43c)The lowest odd derivative (dispersive term) for the second-ordermethod is a third derivative term with a coefficient of orderAx2 while the lowest odd derivative for the third-order scheme[see Eqs. (38)] is a fifth derivative with coefficient of order Ax4.On the other hand, the lowest even derivative (dissipative term)for both methods is a fourth-order derivative. Consequently, onthe basis of the modified equation analysis one would expectthat the most significant improvement in accuracy achieved ingoing to a third-order scheme would be a decrease in dispersiveerror.

Figure 4 compares the modulus of the amplification factorand the phase error for second- and third-order schemes forseveral values of v in the stable range. For each v, the two curvesfor the third-order method correspond to values of to forminimum dissipation and dispersion as given by Eqs. (39) and(40). It is evident from the figure that the phase error has beennoticeably decreased by the third-order scheme.

From the aforementioned discussion it should be clear that theprimary advantage of a third-order method for smooth flowregions is reduction in phase error. This has been verifiednumerically by Burstein and Mirin4 for a two-dimensionalscalar problem using their centered third-order method. In theremainder of this section we attempt to gain some insight intowhat to expect if one attempts to use a third-order scheme forshock-capturing or through-computation of flowfields contain-ing discontinuities.

Consider the simple scalar equationdu/dt + (l/n)dif/dx = Q (44a)

with a step function initial condition'1, x ^ Ou(x, 0) =0, x > 0 (44b)

If n = 1, the equation is linear and the step function propagatesto the right with speed 1, and if n = 2, the equation is nonlinearand there exists a weak solution14 that propagates to the rightbut with shock speed \. For the preceding model equation andinitial condition, the Courant number is v = Ar/Ax for both thelinear and nonlinear cases.

We first consider the linear case. Figure 5a, b compares asecond-order solution and a third-order solution with co chosenfor minimum dissipation for v = 0.1. This figure illustrates thefact that oscillations behind a discontinuity can become severeas the Courant number v becomes small. The bottom curves ofFig. 4 show for the two cases computed in Fig. 5a, b that there islittle damping and large dispersive errors. In contrast, if co ischosen for minimum dispersion, there follows a considerableincrease in damping as seen on the bottom left curve of Fig. 4.The corresponding numerical result for the step function isexhibited in Fig. 5c. The oscillations have been greatly reducedbut at the expense of an increase in the smearing of the wavefront. It is important to observe a slight oscillation ahead of thewave for the third-order result due to the fact that Fourier modescan precede the exact harmonics for the third-order method. Thisphenomenon does not generally occur for the second-orderscheme since the phase error cp/cf)e remains bounded by 1 except

n SECOND ORDER—— EXACT

a)

oTHIRD ORDER oTHIRD ORDERcu = 0.0399 cu = 0.8299MINIMUM DISSIPATION MINIMUM DISPERSION

b) C)

Fig. 5 Comparison of second- and third-order solutions for a linearproblem with v = 0.1 after 60 time steps.

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 6: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

194 WARMING, KUTLER, AND LOMAX AIAA JOURNAL

D

JJ-Q D

a SECOND ORDER o THIRD ORDER o THIRD ORDER—— EXACT cu = 0.0399 CJ =0.8299

MINIMUM DISSIPATION MINIMUM DISPERSION

a) b) c)

Fig. 6 Comparison of second- and third-order solutions for a nonlinearproblem with v = 0.1 after 60 time steps.

for large wave numbers when v > 1/(2)1/2 and consequently theharmonics of the numerical solution trail the exact ones.

For the third-order scheme, the above discussion of the simplelinear problem indicates that a reduction in oscillation effects inthe neighborhood of a discontinuity can be achieved if co is chosenfor minimum dispersion. Although the linear analysis ofdissipative and dispersive errors is, strictly speaking, invalid fornonlinear problems, it should provide a rough guide of what toexpect in the nonlinear case. Figure 6 depicts the solution ofthe nonlinear problem (44) (with n = 2) for v = 0.1 and the samevalues of the parameters co and v used in Fig. 5. It is seen thatthe qualitative behavior has not changed from the linear versionof Fig. 5 with regard to the control of the oscillations or thesteepness of the smeared shock by the choice of co. The non-linear solutions shown in Figs. 6-8 were calculated using scheme(22) for second order and (25) for third order. The parameter ewas chosen to be 1 if the time-step index n was even and 0 if thetime-step index was odd, i.e., e alternated between 0 and 1 onsuccessive time steps.

For values of v closer to 1, the spectrum of \g(k)\ favors thesecond-order method when crossing discontinuities. The top pairof curves of Fig. 4 for v = 0.9 indicate little difference in phaseerror between second and third Order but \g(k)\ shows moreattenuation for second order. Figure 7 compares the nonlinearshocks for the two methods. As |v| approaches 1, the curves ofminimum disperson and dissipation (see Fig. 2) converge to thesame value, namely, co = 3. Thus for values of |v| near 1, thenumerical solution becomes less dependent on the selection ofco. This is apparent for the two third-order solutions of Fig. 1for v ='0.9.

Local Variation of the Free ParameterIn the previous section, we found that the resolution of dis-

continuities computed by the third-order method is rathersensitive to the choice of the parameter co. In complicated flowpatterns with multiple shocks, an optimum choice of co at somespatial point will probably result in poor shock-capturing abilityin other regions of the flowfield if co is constant throughout theflow. Figure 8a depicts a weak shock computed in the presenceof a strong shock for the nonlinear Eq. (44). The numericalsolution was computed for a Courant number v = a max&t/Ax =0.9, At/Ax = 0.225, and with co = co(0.9) = 2.7051 calculated fromEq. (40). The local value of the Courant number for the weakshock is v = 0.225 and consequently the value of co used is too

SECOND ORDEREXACT

a)

o THIRD ORDER o THIRD ORDEROJ = 2.5839 CJ = 2.7051MINIMUM DISSIPATION MINIMUM DISPERSION

b) C)

v = 0.9THIRD ORDERSECOND ORDER

- EXACT

= 2.705la) b) c)

Fig. 8 Calculation of a weak shock in the presence of a strong shock:a) third-order method with a constant co, b) third-order method with a

variable co, and c) second-order method.

high for this lower Courant number, resulting in a rathersmeared shock.

Thus it seems plausible to consider the possibility of makingco a local function of v rather than keeping it constant through-out the computational mesh. In doing this it is important thatthe fourth-order difference operator cod4 of Eq. (23c) be replacedby a conservative form. J There is no unique way of accomplish-ing this, but we use the right side of the expression

cod4utn -> coi+ l/2M2ui

n-coi_ 1/2VS2uin (45)

to replace cod4 in the difference formula (23c). Since(46a)(46b)VS2ut = Ax3 83u/dx3 • + 0(Ax4)

and if coi±1/2 is expanded in a Taylor series about co., it followsthat the right side of (45) is still a fourth-order operator andso does not affect the required third-order accuracy of thealgorithm.

We assume that co = co(v), i.e., co will be determined as afunction of v by a formula such as (39) or (40) wherev = am Af/Ax and am is the local maximum modulus of the eigen-values of the Jacobian matrix A. The value of coi + 1/2 requiredin Eq. (45) is computed from

^£+1/2 = ̂ + 1/2) (47a)and

(47b)

Figure 8b shows the same double-shock system as Fig. 8aexcept that co was assumed to be a variable calculated locallyfor minimum dispersion from Eq. (40). The result, while notshowing dramatic improvement, indicates that the weak shock isless smeared since the jump that takes essentially three meshintervals in Fig. 8a has been reduced to two mesh intervals inFig. 8b. For comparison, Fig. 8c illustrates the double-shocksolution using the second-order method.

Extension to More Space DimensionsOne of the primary advantages of a noncentered scheme is

that its extension to several space dimensions is immediate.Consider the hyperbolic system in two space dimensionsdu/dt + dF(u,x,y,t)/dx + dG(u,x,y,t)/dy + H(u,x,y,t) = 0 (48)A numerical mesh is introduced with increments Ax, Ay, andA? with indexing

ullj = u(xt, yjt tn\ F?tj = F(u?j, xif yr tn\ etc.The second-order method (18) for the one-dimensional Eq. (5)

can be generalized directly to Eq. (48) by applying the same one-dimensional spatial difference operators premultiplying Ft in (18)to F and G of Eq. (48). Of course, one must make a distinction

Fig. 7 Comparison of second- and third-order solutions for a nonlinearproblem with v = 0.9 after 60 time steps.

} The importance of using a conservative form for this differenceoperator was pointed out to us by P. Lax. We have found that ifco is given a spatial dependence and used in the left side of (45), thenshock speeds can be in error.

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 7: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

FEBRUARY 1973 SCHEMES FOR NONLINEAR HYPERBOLIC EQUATIONS 195

as to which spatial coordinate index i or j a particular operatorapplies to, so we define, for example,

*XFiJ=FH-l,j-FiJ> \Fi,j = Fi,j+l-Fi,j

Thus, the second-order noncentered scheme for the hyperbolicsystem (48) is

(49a)

r v F.(I)"lA^d+s.AJ^ d+e,Ay

and

1

(49b)

(50a)

(50b)

(50c)

The permissible values of £x and sy can be chosen independently;indeed, there are four possible pairs of values (ex, £y). The cor-responding values of KX and Ky are then determined by Eq. (50c).

If oq is chosen to be 1, there follows the same simplificationin the algorithm that led to (22) for the one-dimensional case:

u^] = same as right side of (49a) with ax = 1 (51a)

x x Ax y y Ay(51b)

This is precisely the finite-difference scheme devised byMacCormack1'2 for the two-dimensional Eq. (48). Accuracy andstability of the method has been analyzed in detail byMacCormack.

The third-order scheme (23) can also be directly generalizedfor the two-dimensional nonlinear system (48). The result is

UM = same as right side of Eq. (49a) (52a)u\2)- = same as right side of Eq. (49b) with w0 and \v1

replaced by /?0 and /?1? respectively (52b)

TK'-r5--I"

Ax Ay

[ X Ax'' + " A y ' +H|''2'J(52c)

^ |_ AX Ay "' jwhere

« i0 i=i 0i + 0o = f (53a)

(53b)

(53c)

Here cox and coy denote the free parameters in the x and ydirections; this allows the possibility of using separate values ofco in each of the two coordinate directions. With some tediousalgebra, it can be verified that the algorithm is uniformly third-order accurate in space and time. A plausibility argument fora stability condition is given in Ref. 6.

The preceding algorithms (49) and (52) can easily be generalized

to three spatial dimensions in the same obvious way that theone-dimensional case was extended to two dimensions. Theextension of centered schemes to two or more space dimensionsis quite complicated because of the staggered mesh required tocompute w(1). Rusanov3 devised a centered scheme correspondingto (52) with the aid of a computer having the capability ofperforming formal analytic manipulations to handle the algebrainvolved. Even then, Rusanov omitted the H term because, ashe states, the algebra became unwieldy. The complication, in part,comes from the fact that in order to compute M[ +1 /2 ,7+1 /2 - one

needs //"+i/2, j + i / 2 > which is unknown and must be computedby some sort of interpolation. On the next step, the algorithmrequires H i t j

( 1 ) but now H is only known on the staggered mesh.In any case, no matter how the H term is handled through thealgorithm, third-order accuracy of u"j 1 must be achieved in thefinal step.

Concluding Remarks

MacCormack's second-order finite-difference scheme has be-come an increasingly popular5'15 method for numericallyintegrating the gasdynamic equations. The method has beenused both in a shock-capturing technique5 with the governingequations in conservation law form and in sharp shockmethods15 with the equations in nonconservative form. Webelieve that it is not widely recognized that the virtues ofMacCormack's method stem from the inherent noncenterednessof the spatial differencing. Here we have attempted to empha-size the advantages (listed in the introduction) of noncenteredschemes as opposed to conventional centered schemes, and togive some insight as to their origin. We have constructed a generalsecond-order scheme which includes the original MacCormackalgorithm as a special case. A third-order scheme has beenconstructed which uses a noncentered second-order method inthe first two steps.

As with other third-order algorithms3'4 the final step 01 .....method includes a fourth-order spatial operator with a free para-meter co as a multiplicative coefficient. For real fluid flow prob-lems in which the Courant number is a local function of thedependent variables at each grid point, it is proposed that theparameter co be varied as a function of the local eigenvaluestructure of the flowfield. Since in this case co becomes a functionof the spatial coordinates, it is necessary that the fourth-orderspatial difference operator be replaced by a conservative formas given by Eq. (45). We recommend that co be computed usingthe minimum dispersion formula (40) when the third-ordermethod is applied to flow problems containing discontinuities.

In regard to accuracy, the primary advantage of going to athird-order method is a reduction of dispersive error. To providea realistic numerical test for the comparison of second- and third-order methods on a physical problem involving flow discon-tinuities, we have used both schemes to compute the inviscid,supersonic flowfield about a space shuttlelike vehicle. Thesecalculations are presented in the following article of this Journal.

References1 MacCormack, R. W., "The Effect of Viscosity in Hypervelocity

Impact Cratering," AIAA Paper 69-354, Cincinatti, Ohio, 1969.2 MacCormack, R. W., "Numerical Solution of the Interaction of a

Shock Wave with a Laminar Boundary Layer," Proceedings SecondInternational Conference on Numerical Methods in Fluid Dynamics,edited by M. Holt, Springer-Verlag, Berlin, 1971, pp. 151-163.

3 Rusanov, V. V., "On Difference Schemes of Third Order Accuracyfor Nonlinear Hyperbolic Systems," Journal of Computational Physics,Vol.5, 1970, pp. 507-516.

4 Burstein, S. Z. and Mirin, A. A., "Third Order Difference Methodsfor Hyperbolic Equations," Journal of Computational Physics, Vol. 5,1970, pp. 547-571.

5 Kutler, P. and Lomax, H., "Shock-Capturing, Finite-DifferenceApproach to Supersonic Flows," Journal of Spacecraft and Rockets,Vol. 8, No. 12, Dec. 1971, pp. 1175-1182.

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449

Page 8: Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations

196 WARMING, KUTLER, AND LOMAX AIAA JOURNAL

6 Kutler, P., Warming, R. F., and Lomax, H., "Computation of SpaceShuttle Flowfields Using Noncentered Finite-Difference Schemes,"AIAA Journal, Vol. 11, No. 2, Feb. 1973, pp. 196-204.

7 Lomax, H., "An Operational Unification of Finite DifferenceMethods for the Numerical Integration of Ordinary DifferentialEquations," TR-262, 1967, NASA.

8 Richtmyer, R. D., and Morton, K. W., Difference Methods forInitial-Value Problems, Wiley, New York, 1967.

9 Burstein, S. Z., "Finite-Difference Calculations for HydrodynamicFlows Containing Discontinuities," Journal of Computational Physics,Vol. 2, 1967, pp. 198-222.

10 Ames, W. F., Numerical Methods for Partial Differential Equations,Barnes and Noble, New York, 1969.

11 Ralston, A., "Runge-Kutta Methods with Minimum Error

Bounds," Mathematics of Computation, Vol. 16, 1962, pp. 431^-37.12 Hirt, C. W., "Heuristic Stability Theory for Finite-Difference

Equations," Journal of Computational Physics, Vol. 2, 1968, pp. 339-355.

13 Lomax, H., Kutler, P., and Fuller, F. B., "The NumericalSolution of Partial Differential Equations Governing Convection,"AGARD-AG-146-70, 1970.

14 Lax, P. D., "Weak Solutions of Nonlinear Hyperbolic Equationsand Their Numerical Computation," Communications on Pure andApplied Mathematics, Vol. 7, 1954, pp. 159-193.

15 Moretti, G., Grossman, B., and Marconi, F., Jr., "A CompleteNumerical Technique for the Calculation of Three-DimensionalInviscid Supersonic Flows," AIAA Paper, 72-192, San Diego, Calif.,1972.

FEBRUARY 1973 AIAA JOURNAL VOL. 11, NO. 2

Computation of Space Shuttle Flowfields UsingNoncentered Finite-Difference Schemes

PAUL KUTLER,* R. F. WARMING,* AND HARVARD LOMAX|NASA Ames Research Center, Moffett Field, Calif.

The three-dimensional supersonic flowfield surrounding a configuration representing a space shuttle orbiter isdetermined using a shock-capturing, finite-difference approach. The governing hyperbolic partial differentialequations in cylindrical coordinates are normalized between the body and an outer boundary which completelyencompasses the disturbed flow region. The equations are then cast in conservation-law form and integrated froman initial data plane downstream over the body using either a second- or third-order noncentered finite-differencescheme. Existing shocks that form as a result of protuberances such as the canopy or wing are capturedautomatically and do not require the use of any shock-fitting procedures. Numerical results are compared withexperimental data to demonstrate the capability of the method to accurately predict the inviscid flowfield aboutshuttle-like configurations. Three-dimensional shock-shock intersections that result in a coalesced shock and a slipsurface posed no problem for the numerical procedure.

Introduction

THE capability of computing numerically the inviscid flow-field structure surrounding a space shuttle vehicle (SSV) or

some representative configuration at supersonic velocities is ofconsiderable importance in the prediction of heat-transfer rates,boundary-layer effects, sonic booms, and the aerodynamic loadsassociated with such vehicles. The large angles of attack at whichthe SSV is designed to enter the earth's atmosphere, at leastinitially, result in large regions of embedded subsonic flow nearthe nose of the vehicle. In addition, the complicated geometryof the shuttle gives rise to a multishocked flowfield. The wingand canopy of a typical SSV configuration generate secondaryand embedded shocks which, in some instances, intersect themain bow shock. Conventional sharp shock theories (those thatisolate a shock and apply the Rankine-Hugoniot shock relations

Presented as Part III of AIAA Paper 72-193 at the AIAA 10thAerospace Sciences Meeting, San Diego, Calif, January 17-19, 1972;submitted February 16, 1972; revision received September 21, 1972.

Index categories: Supersonic and Hypersonic Flow; Entry Vehiclesand Landers.

* Research Scientist, Computational Fluid Dynamics Branch.Member AIAA.

t Chief, Computational Fluid Dynamics Branch. Member AIAA.

across it) are limited in their capability of handling the shock-shock intersection problem and the formation of all embeddedshock waves. Consequently, our approach in tackling thiscomplex problem is to use a shock-capturing technique which,unlike conventional sharp shock theories, is capable of numeri-cally predicting the location and intensity of all predominantshock waves without the explicit use of any shock-fitting pro-cedures. The success of the shock-capturing technique (SCT)in correctly predicting complicated, multishock flowfields hasbeen demonstrated in Refs. 1 and 2.

For purposes of this analysis, a delta-wing shuttle configurationis modeled. It is known from wind-tunnel experiments that formoderate angles of attack of such a configuration the surroundingflowfield is entirely supersonic except for a small region near thenose. The governing three-dimensional steady flow equations are,therefore, hyperbolic and with suitable initial data this becomesa well-posed initial-value problem. The equations in conservation-law form are differenced using either a second- or third-ordernoncentered finite-difference scheme.3 Then starting from aninitial data plane near the nose of the body, the differenceequations are integrated downstream over the body. The startingsolutions are obtained by representing the nose of the vehicle byeither a pointed cone or a blunt sphere-cone.

Noncentered algorithms3 use, in general, forward or backward

Dow

nloa

ded

by G

EO

RG

IA I

NST

OF

TE

CH

NO

LO

GY

on

May

31,

201

4 | h

ttp://

arc.

aiaa

.org

| D

OI:

10.

2514

/3.5

0449