This action might not be possible to undo. Are you sure you want to continue?

# Modern Numerical Methods for Fluid Flow

P. Colella and E. G. Puckett

I. Compressible Flow

1. Finite difference methods for linear scalar problems

We would like to numerically model the behavior of a compressible fluid. We begin with a study of the one-dimensional scalar advection equation. We seek a solution u ( x, t ) of the following partial differential equation: ∂u ∂u +a = 0 ∂t ∂x where a is a positive constant. The initial conditions are given as: u ( x, 0 ) = ψ ( x ) The solution to this problem is known to be: u ( x, t ) = ψ ( x − at )

(3) (2) (1)

It is useful to start with a problem for which the solution is known in order to test the accuracy of our numerical methods. In the following section we discuss finite-difference methods for solving this PDE. We will assume that the mesh spacing, ∆x, and the time step, ∆t, are constant. This means that the continuous value of the solution at some location and time, u(x, t), can be expressed as u(j∆x, n∆t). We will represent the analogous discretized solution at the mesh cell j and time level n as u n . We represent this graphically in x-t space as j : t x (j-1)∆x j∆x (j+1)∆x

Figure 1. Discretization in space and time

(n+1)∆t n∆t

The solution u n is defined at the nodes which are placed at the cell centers in physical j space. We discretize the partial differential equation by replacing the derivatives in equation (1) with one-sided finite difference approximations:

n un − uj − 1 un + 1 − un j j j + O ( ∆t ) + a + O ( ∆x ) = 0 ∆t ∆x

Draft of January 30, 1998

1

Modern Numerical Methods for Fluid Flow

P. Colella and E. G. Puckett

This numerical scheme uses one-sided forward differencing in time and upwind differencing in space. Dropping the error terms and rewriting this equation, we obtain the discrete evolution equation for ujn: un + 1 = un + j j a∆t n (u − un ) j ∆x j − 1

(4)

a∆t The term is the CFL (Courant, Friedrichs, and Lewy) number, sometimes denoted by ∆x σ. It plays a pivotal role in determining the stability of a scheme such as this one. More generally, we will consider finite difference schemes of the form u n + 1 = Lu n = j j

s ≤S

∑

c s u n+ s j

where c s is independent of u and j and s is an integer set by the specific spatial discretization used. We often write this as a discrete evolution operator acting on sequences, i.e. u = { u j } : u n + 1 = Lu n Note that in this case, the operator L is linear, i.e., L ( αv + w ) = αL ( v ) + L ( w ) , where α is a real or complex number, and v, w are grid vectors. Also note that the evolution operator is explicit, i.e., u n + 1 is a only function of the values at the current time step, u n+ s , j j where s ≤ S .

n n

**1.1 Consistency, stability, and convergence
**

So far, we have adequately expressed the discretized form of the governing equation to define the linear operator L. We would like to evaluate how well this operator stacks up against the exact solution. In addition, we would also like to know whether or not a specific numerical scheme will converge. To address these issues, we will carefully define a benchmark value against which to compare the computed solution. Let us denote u e = u e ( x, t ) as the exact solution to the original differential equation (1), ∂u e ∂u e +a = 0 ∂t ∂x

(5)

We can evaluate this exact solution at the discrete points in space and time where the nun merical solution is defined. We define u e, j ( t ) = u e ( j∆x, t ) and u e, j = u e ( j∆x, n∆t ) . We also denote the sequences u e ( t ) = { u e, j ( t ) } j and u

n e

= {u

n

e, j } j .

The local truncation error (LTE) of a scheme measures how much the discrete evolution differs from the exact solution after one time step and is given by:

Draft of January 30, 1998

2

Modern Numerical Methods for Fluid Flow LTE = u n + 1 − Lu n e e Graphically, in u e space: ue ( t )

P. Colella and E. G. Puckett

(6)

Lu n e

un + 1 e un e LTE

Figure 2. Graphical depiction of the local truncation error

We say that a numerical scheme is consistent if the LTE → 0 as ∆x, ∆t → 0 : LTE = u n + 1 − Lu n = O ( ∆t e e

p, q ≥ 0, p + q = l

∑

∆t p ∆x q )

(7)

where l ≥ 1 . The order of the LTE is given by l+1, while the global error of the numerical scheme is of order l. What is the local truncation error for upwind differencing? We showed earlier in equation (4) that the evolution equation is:

n ( Lu n ) j = u e, j + σ ( u e, j − 1 − u n, j ) e e n

(8)

**where σ is the CFL number defined by: σ = The LTE can therefore be written:
**

n LTE = u n, + 1 − [ u n, j + σ ( u e, j − 1 − u n, j ) ] e j e e

a∆t ∆x

(9)

=

∂u e ∂u e ∆t + O ( ∆t 2 ) + σ ∆x + σO ( ∆x 2 ) ∂t ∂x = ( ∂u e ∂u e +a ) ∆t + O ( ∆x∆t + ∆t 2 ) , ∂t ∂x

Draft of January 30, 1998

3

Modern Numerical Methods for Fluid Flow

P. Colella and E. G. Puckett

where all derivatives are evaluated at ( j∆x, n∆t ) . From the PDE, we know that the first term on the right-hand side above is zero. We can thus express the LTE as: LTE = ∆tO ( ∆x + ∆t )

(10)

The coefficients multiplying the bounds on the local truncation error are all proportional to second derivatives of the solution (and therefore, of the initial data). They are uniformly bounded as long as those derivatives are also bounded. Looking back at the requirement for consistency above in equation (7), we can say that upwind differencing is consistent to first order globally. Notice that we used in an essential way that u n is the exact solution to e the PDE evaluated at discrete points in space and time. Suppose that we had two discrete solutions at a given time, u n and u n . Let’s apply the ope erator L to both solutions and look at how far they move apart in one time step. Consider: un + 1 − un + 1 e = u n + 1 − Lu n + Lu n − Lu n e e e

(11)

≤ u n + 1 − Lu n + Lu n − Lu n . e e e

The first term on the right-hand side of equation (11) above is by now familiar to us as the local truncation error, a measure of the consistency error. The second term measures how far apart two discrete solutions are after one time step. A method is stable if Lu n − Lu n e − can be bounded appropriately by u n− u n , multiplied by a constant which is independent e n n of both u and u e . This leads to the Lax equivalence theorem, which states that stability and consistency for a given numerical scheme imply its convergence. Analysis of the stability for a given linear difference scheme is simplified by the fact that stability implies boundedness (and vice versa) for any L. So we would like to show that: Lu − Lv = L ( u − v) = Lε Lu − Lv ≤ ( 1 + K∆t ) ε The following questions arise: • What is the proper choice for the norm ?

(12)

• What is the constant K in the stability bound? For the first question, we can take a hint from the analogous bounds in the exact solution, i.e., that the solution translates with shape unchanged for all time. The L ∞ norm takes as its value the maximum magnitude over the domain, i.e.:

Draft of January 30, 1998

4

Modern Numerical Methods for Fluid Flow δ = max x δ ( x )

**P. Colella and E. G. Puckett
**

(13)

∞

Looking at the form of the exact solution to the advection equation, we deduce that the L ∞ norm does not change in time. However, the analogous restriction on the discrete formulation is inconvenient for a numerical scheme. Ultimately, the goal is to create a numerical scheme which is at least second-order accurate. We shall show later (Godunov’s Theorem) that a linear scheme which is consistent and max-norm stable is only first order accurate. Therefore, we will instead use the L2 norm, defined by: δ = [ ∫ δ 2 dx ]

1 2

2

(14)

Again, it is clear that this norm does not change in time for the exact solution. We take as the discrete norm δ =

2

∑ δ2 ∆x j

j

1 2

(15)

This also answers the question of what K ought to be in equation (12). Since the exact solution doesn’t grow with time, we would like to ensure that no growth occurs in the numerical solution, which can be assured if we choose K = 0. Now let’s prove the Lax equivalence theorem, which is so important that we will give its statement a special paragraph all of its own: Lax Equivalence Theorem: Stability + Consistency → Convergence

Proof:

u n − u n ≤ Lu n − 1 − Lu n − 1 + Lu n − 1 − u n e e e e ≤ u n − 1 − u n − 1 + ∆tO ( e ≤ u 0 − u 0 + n∆tO ( e

p+q = l

∑

( ∆x ) p ( ∆t ) q )

p+q = l

∑

( ∆x ) p ( ∆t ) q )

As ∆t → 0 , n∆t → T , and the desired result is proven. Recall that l is the global order of the method, while l+1 is the order of the LTE.

**1.2 The Von Neumann stability analysis
**

We will now restrict the problem further: instead of considering solutions on the entire real line, we will consider them on the interval [0, D] with periodic boundary conditions and given initial conditions:

Draft of January 30, 1998 5

k = 0. M − 1 and j the mesh spacing ∆x = 1 ⁄ M . Puckett (16) (17) (18) Equivalently.Modern Numerical Methods for Fluid Flow ∂u ∂u +a = 0 ∂t ∂x u ( 0. these exponentials formally diagonalize the ∂ e ∂x 2πikx D operator: 2πik = ( )e D 2πikx D M−1 (26) Can we find an analogous basis for the discrete solutions { u n } j = 0 that diagonalizes L? j We define the following inner product on complex M-dimensional vectors: Draft of January 30. j = 1. ± 1. we still have an exact solution u e ( x. 1998 6 . We can define the linear fij j nite-difference schemes as the sum of shifts: Lu n = or L = ∑ cs uj + s ∑ cs S s (19) (20) This shift notation represents location relative to cell j and is defined by ( Su ) j = u j + 1 . so that u n+ Mp = u n for all integers p. The discrete solution is given by u n = { u n } where the range of j is j = 0. For the purposes of computing boundary conditions. t ) = u ( D. M − 1 At the endpoints of the periodic domain: ( Su ) M − 1 = u 0 = u M ( S −1 u ) 0 = u M − 1 = u −1 integrable functions on the interval [0. j = 0. u n is extended periodically. t ) = u ( x − at. …. we can consider periodic initial data on the real line. G. M − 2 ( S −1 u ) j = u j − 1 . t ) u ( x. from that point of view. … ∂ ∂x (25) In addition. ± 2. …. D]: ( k) (21) (22) (23) (24) The following complex exponentials form the orthonormal basis for the set of all square- W ( x) = e 2πikx D . 0 ) = ψ ( x ) P. Colella and E. …. 0 ) = ψ ( x − at ) .

w ( k′ ) 1…if…k = k′ 〉 = { 0…otherwise ° (29) Compute: 〈w ( k) . Puckett 1 〈 u. this is possible only if k = k’. v 〉 = M ∑ uj vj (27) where the overbar denotes the complex conjugate. G. where p is an integer. Colella and E. Continuing: 〈w ( k) .Modern Numerical Methods for Fluid Flow M−1 j=0 P. ….w ( k′ ) 1 〉 = M = 1 M M − 1 2πi ( k − k′ ) j∆x D j=0 ∑e M−1 j=0 where z = e 2πi ( k − k′ ) ∆x D ∑ zj 1 zM − 1 M z−1 . k = − + 1. …. as the values of the continuous exponentials evaluated 2 2 at discrete points: ( k) wj = W ( k) ( j∆x ) = e 2πikj∆x D (28) There are two useful results which follow from this definition: (i) The vectors w ner product: 〈w Proof: ( k) ( k) form a complete orthonormal basis with respect to the in- . 1998 7 ( k) = e w = e −i β iβ ( k) (30) ( k) w ( k) (31) . we define the M M ( k) vectors w . Saying that z = 1 is equivalent to saying that D For k and k’ in the range of − M + 1. Assuming that M is even. 2 2 = { 1…if…z = 1 (ii) The second feature is that the application of the shift operator becomes ridiculously easy: Sw and S −1 w where Draft of January 30. M .w ( k′ ) 〉 = 0…if…z ≠ 1 ( k − k′ ) ∆x = p .

Modern Numerical Methods for Fluid Flow 2πk∆x D P. G. u can then be expanded in terms of the w M 2 ’s: u = where b k = 〈 u. ( k) Let u be some vector. …. ( k) iβ ( k) Given the basis vectors w . In addition. j = 0. we can arrive at a particularly simple criterion for stability. 1998 8 . Colella and E. L acts on the w ’s by simple complex multiplication: S2 w ( k) = S ( Sw ( k) ) = S (e w iβ ( k) ) = e 2iβ w ( k) (40) This procedure can be repeated so that we can write: Lw ( k) = ( ∑ cs S ) w s ( k) = We define the coefficient λ ( β ) = ∑ cs e ∑ cs e iβs w ( k) (41) iβs to be the symbol of L. w ( k) ∑ k=− bk w ( k) (42) M +1 2 〉 and u 2 = ∑ bk 2 . Define the norm to be that given by the inner product: u 2 = 〈 u. We also note that ( k) ( k) the basis w diagonalizes L. Then ( k) Lu = L ∑ b k w (43) Draft of January 30. 2πik∆x 2πik ( M − 1 ) ∆x D D (38) (39) = e wM − 1 . M − 2 This still holds at the edge of the domain ( Sw ( k) ) M − 1 = w0 e ( k) = 1 (37) = e The procedure for S −1 is similar. Puckett β = Proof: Compute: (32) ( Sw ( k) ) j = wj + 1 ( k) (33) = e = e = e wj iβ 2πik ( j + 1 ) ∆x D (34) 2πik∆x 2πikj∆x D D e (35) (36) ( k) . u 〉.

This means big trouble.e. This is difﬁcult to do in all but the simplest cases. (b) If ( C q < 0 ) . Colella and E. G. i.. or possibly graph λ ( β ) − 1 . (ii) Verify the bound computationally. we may be able to damp these scales. To check stability for all M → ∞ . In practice. 1998 (47) 9 . When we see instability for β ∼ 0 . Puckett ( k) ∑ bk λ ( β ) w = (44) ∑ bk 2 λ ( β ) 2 (45) If λ ( β ) ≤ 1 . 1. we need only look at a single function λ ( β ) . this means that k∆x « 1 and long-wavelength signals are unstable.1 Upwind Differencing For this case. then the scheme may be stable (is stable for long 2 = 1 + Cq βq + O ( βq + 1 ) (46) . sample λ ( β ) and see whether it is less than or equal to 1.Modern Numerical Methods for Fluid Flow = and Lu 2 P. When β ∼ π and we see wavelengths on the order of 2∆x. Note that the range of β is contained in − π < β ≤ π . 1. a combination of (ii) and (iii) above give the most insight on “complicated” schemes. (iii) Compute a Taylor series around β = 0 of: λ ( β) (a) If Cq > 0 grow without limit. then Lu ≤ u .3. the discretized PDE is given as follows: n un − uj − 1 un + 1 − un j j j + O ( ∆t ) + a + O ( ∆x ) = 0 ∆t ∆x Draft of January 30. The various options for determining the stability of a particular numerical discretization are: (i) Analytically verify a bound of the form λ ( β ) ≤ 1 for − π < β ≤ π . then the scheme is unstable and the solution will wavelengths).3 Some simple ﬁnite difference schemes Let’s get into the specifics of stability calculations for a number of common finite-difference schemes.

n∆t n uj + 1 − un j + O ( ∆x ) ∆x (52) Draft of January 30. Colella and E. (For this range of σ. Puckett (48) (49) We can write the discretized evolution equation in shift notation: Lu n = u n + σ ( S −1 − I ) u n (50) where I is the identity. the symbol λ ( β ) can also be seen to be a linear interpolation be− iβ tween 1 and e by a geometric argument. as in upwind differencing above. For upwinding: λ ( β ) λ ( β ) = ( ( 1 − σ ) + σe − iβ ) ( ( 1 − σ ) + σe ) iβ − iβ iβ = ( 1 − σ ) 2 + 2σ ( 1 − σ ) ( e + e ) + σ2 = 1 − 2σ + 2σ 2 + 2σ ( 1 − σ ) cos β β 2 = 1 − 2σ + 2σ 2 − 2σ ( 1 − σ ) ( ( cos ) + 1 ) 2 β 2 = 1 − 4σ ( 1 − σ ) ( sin ) 2 From this result. The symbol for this scheme is deduced from the form above in equation (50).) 1.2 Downwind Differencing For this scheme. then λ ( β ) ≤ 1 and the scheme is stable. but replace the spatial derivative with downwind differencing: ∂u ∂x = j∆x. G.3.Modern Numerical Methods for Fluid Flow or rewriting as an explicit evolution equation: u n + 1 = u n + σ ( u n− 1 − u n ) j j j j where σ is the CFL number. defined as: σ = a∆t ∆x P. 1998 10 . we will keep the same forward differencing in time. we can see that if 0 < σ < 1. λ ( β) = 1 + σ ( e or λ ( β ) = ( 1 − σ ) + σe − iβ −i β − 1) (51) The constraint on the CFL number arises from the requirement that λ ( β ) ≤ 1 for all β.

1998 11 .3 Centered Differencing This time.3. this scheme has the undesirable property that is unstable for all σ > 0! 1. G.Modern Numerical Methods for Fluid Flow The evolution equation is: n un + 1 = un + σ ( un − uj + 1 ) j j j P. this scheme is also unstable. we’ll replace the partial derivative with respect to x by the following centered difference approximation: n n uj + 1 − uj − 1 ∂u = + O ( ∆x 2 ) ∂x 2∆x (57) resulting in the following evolution equation: un + 1 = un + j j so that the symbol for this scheme is: λ ( β) = 1 + and λ ( β ) = [ 1 + σ 2 ( sin β ) 2 ] Therefore. in terms of shift notation: L = I + σ ( I − S) The symbol is: λ ( β) = 1 + σ ( 1 − e ) or λ ( β ) = ( 1 + σ ) −σ e iβ iβ (54) (55) (56) Although the truncation error indicates that this scheme has the same order accuracy as forward differencing. 1⁄2 σ n n (u − uj + 1 ) 2 j−1 (58) σ −iβ iβ ( e + e ) = 1 − iσ sin β 2 (59) ≥1 (60) Draft of January 30. Colella and E. Puckett (53) We can see from equation (53) above that the linear operator L should be.

we will have to find values for the points in open circles. + + 12⁄ 2 = C ( ( j + ) ∆x ) ∆x + O ( ∆x 3 ) e j 2 (64) (63) Draft of January 30. + + 12⁄ 2 − u n. i. we would like to solve for the values at (n+1)∆t.4 The Two-Step Lax-Wendroff Scheme This predictor / corrector method adds an extra step in solving for half-step values in time (the “predictor” step) and a subsequent evolution to the next time level (the “corrector” step) based on those half-step values. Puckett 1. How are we going to do this? In the predictor step. In order to calculate this. Colella and E. we will solve for the half-step values: σ 1 n n ˜j + 1 2 u n+ 1 ⁄ ⁄2 = ( u n + u j + 1 ) + ( u n − u j + 1 ) + O ( ∆x 2 ) j 2 j 2 In the subsequent corrector step: ˜n + 1 2 ˜n + 1 2 u n + 1 = u n + σ ( u j + 1 ⁄ ⁄2 − u j − 1 ⁄ ⁄2 ) j j (62) (61) We would like to show that this scheme is globally second-order accurate. We can think of this graphically as solving for the discrete values of u at the points in space/time shown by the circles in below..3. G. 1998 12 . then we must show that the local truncation error is: u n + 1 − L ( u e ) = O ( ∆x 3 ) e We will do this in two parts. First we need to show that: 1 2 1⁄ ˜e j 1 ⁄ u n.Modern Numerical Methods for Fluid Flow P. We know the values at n∆t before the start of the time step. The scheme has the dual advantages of a global spatial error of O ( ∆x 2 ) and is stable for reasonable values of σ. if ue is the exact solution. t x +1 +1 u n− 1 u n + 1 u n+ 1 j j j (n+1)∆t (n+1/2)∆t n uj − 1 un j n uj + 1 n∆t Figure 3.e. Discretization for the Lax-Wendroff predictor / corrector method The solid circles represent quantities at the full-time step.

+ + 12⁄ 2 − u n. Using the expression for the half-step values from equation (61) above: σ 1 1⁄ 1⁄ n ˜e j 1 ⁄ u n. + 1 − u n. + + 12⁄ 2 e j − u n. j + u e. ( j + 1 ⁄ 2 ) ∆x ) . + + 12⁄ 2 − ( ( u n. + 1 − L ( u n ) j = u n. + + 12⁄ 2 − u e.Modern Numerical Methods for Fluid Flow P. + + 12⁄ 2 = u n. we have arrived at the desired result: 1 ˜e j 1 ⁄ u e. j + 1 ⁄ 2 = u e ( ( j + ) ∆x. G. we will assume implicitly that all derivatives are evaluated at the point ( n∆t. j − u n. Continuing: 1⁄ u n. + + 12⁄ 2 e j − ˜e j 1 ⁄ u n. ∆t 3 ) 2 8 a 8 ∂x 2 ∂t which means that if ue is smooth. ( n + ) ∆t ) and C denotes a smooth function of the 2 2 quantities in parentheses. Puckett 1 1 n+1⁄2 where u e. + − 12⁄ 2 ) e j e e j e j 1 1 + σ∆x 2 ( C ( ( j + ) ∆x ) − C ( ( j − ) ∆x ) ) + O ( ∆x 3 ) 2 2 Draft of January 30. Colella and E. we can now show that the local truncation error is of O ( ∆x 3 ) : ˜e j 1 ⁄ ˜n j 1 ⁄ u n. ( j + ) ∆x 2 From this point. j + 1 ⁄ 2 e 2 1 ∆x 2 ∂ u e + ( ) 2 2 ∂x 2 + O ( ∆x 3 ) 1 n∆t. + + 12⁄ 2 − u n. j + 1 ⁄ 2 n + 1 ⁄ 2 − u n. + 1 − u n. 1998 13 . j + 1 ) + ( u n. + + 12⁄ 2 = C ( ( j + ) ∆x 2 + O ( ∆x 3 ) ) 2 With this result in hand. + − 12⁄ 2 ) e j e e j e 1⁄ 1⁄ = u n. j + σ ( u n. + + 12⁄ 2 2 2 ∆x 2 ∂ u e ∆t ∂u e ∆t 2 ∂ u e 3 = + + O ( ∆t ) − + O ( ∆x 3 ) 8 ∂x 2 8 ∂t 2 2 ∂t + a∆t ∂u e + O ( ∆x 3 ) 2 ∂x 2 2 ∂u e ∆t ∂u e ∆x 2 ∂ u e ∆t 2 ∂ u e 3 +a = + + O ( ∆t ) − + O ( ∆x 3 ) 2 ∂t 8 ∂t 2 8 ∂x 2 ∂x = 2 2 1 σ 2 ∂ ue 1 ∂ ue ( ) − ∆x 2 + O ( ∆x 3. j + σ ( u n. ( j + ) ∆x 2 + ∂u e σ ∆x 2 ∂x + O ( ∆x 3 ) 1 n∆t. j + 1 ) ) e j e j e e 2 e 2 = 1⁄ u n.

j∆x 2 + O ( ∆x 3 ) 1 ( n + ) ∆t. Draft of January 30. Colella and E. The first assumption begs the question of what happens at shocks and other discontinuities. Although the Lax-Wendroff scheme is unstable for σ > 1 . λ ( β) 2 = 1 + ( σ 4 − σ 2 ) ( cos β − 1 ) 2 σ4 − σ2 4 β + O ( β6 ) 4 (69) (70) = 1+ Thus we get lucky. G. let’s take a look at the stability. it is stable in the long-wavelength limit for σ ≤ 1 . because: 1 − λ ( β) 2 = ( σ 4 − σ 2 ) ( cos β − 1 ) 2 (71) which will be true for σ ≤ 1 . The second brings up the question of irregular grids. Is this stable? We can check this by performing a Taylor expansion. j∆x 2 = ∆t ∂u e ∂u e +a + O ( ∆x 3. Puckett = ∆t + O ( ∆t 3 ) + σ∆x 1 ( n + ) ∆t. We can write the equation for the predictor step in shift notation as: σ 1 ˜ un + 1 ⁄ 2 = { [ I + S ] + [ I − S ] } un 2 2 Putting this into the expression for the corrector step: u n + 1 = { I + σ ( S −1 − I ) σ 1 ( I + S) + ( I − S) 2 2 } un (66) (65) This means that we can write the symbol as: λ ( β) = 1 + σ ( e or in simpler form λ ( β ) = σ 2 cos β + ( 1 − σ 2 ) − iσ sin β (68) − iβ − 1) σ 1 iβ iβ (1 + e ) + (1 − e ) 2 2 (67) Recall that β = 2πk∆x ⁄ D . The delicate cancellations of the above procedure depended in a critical way on the following assumptions: (a) that the function u is smooth.Modern Numerical Methods for Fluid Flow ∂u e ∂t ∂u e ∂x P. Now that we have examined the accuracy of this method. 1998 14 . ∆t 3 ) ∂t ∂x Note that the term in brackets is zero. and (b) that the grid spacing is uniform.

In an upwinding scheme.t) over the jth cell at time n∆t: 1 ( j + ) ∆x 2 un ≈ j 1 ∆x 1 ( j − ) ∆x 2 ∫ u ( x. Using single-sided differencing (forward in time. Suppose we wanted to find the function u(x. Thus.Modern Numerical Methods for Fluid Flow P. rewriting.t) (j-1)∆x j∆x (j+1)∆x Draft of January 30. momentum. 1998 15 . to evaluate something at point j∆x. etc. We can interpret ujn as the average value of the function u(x. n∆t ) dx (75) where u n ∆x is the total amount of the conserved quantity in cell j. G. σ = a∆t/∆x. we might express the discrete evolution of u as: u n + 1 = u n + σ ( u n− 1 − u n ) j j j j (74) where the CFL number. Graphically: u x u(x.g. Puckett 1. we think of the direction of information transfer as flowing from the upstream to the downstream locations. mass..4 Upwind schemes and the geometric interpretation of ﬁnite differences. e. we only need data from upstream locations. Colella and E. j energy. the finite-difference representation of equation (72) above is: n uj − 1 − un un + 1 − un j j j +a = 0 ∆x ∆t (73) Or. is a positive number. backward in space).t) which satisfies the scalar hyperbolic equation: ∂u ∂u +a = 0 ∂t ∂x (72) and appropriate boundary conditions for some constant a ≥ 0 .

. i. u n ∆x .t) (j-1)∆x j∆x (j+1)∆x Figure 5. derive a conservation equation in the form: ∆xu n + 1 = ∆xu n + F in − F out j j (76) where F represents a flux through the cell edge. j 2 2 uI(x) u x u(x. G. We can treat each cell as a control volume and. i. assuming no generj ation within the cell. The broad outline for the classical finite-difference scheme can be broken up into the following steps: (i) Given un. We therefore require that uI(x) satisfy: 1 ( j + ) ∆x 2 u n ∆x = j 1 ( j − ) ∆x 2 ∫ u I ( x ) dx (77) The quantity u n ∆x thus represents a constraint on the choice of uI(x). Piecewise constant interpolation function uI(x).e. 1 1 u I ( x ) = u n for ( j − ) ∆x < x < ( j + ) ∆x . 1998 16 .Modern Numerical Methods for Fluid Flow Figure 4. A trivial example of j such an interpolating function might be simply a piecewise constant interpolation. The geometric interpretation of the numerical solution.t).. P. we would like j to find a suitable interpolating function uI(x) at every time step which is easy to calculate but does not violate the conservation constraint. construct uI(x) Draft of January 30. In order to compute u n ∆x . Colella and E.e. Puckett The area of the shaded rectangle represents an approximation to the area under the function u(x.

using the interpolated function at time n∆t : u n. Puckett (ii) Compute the exact solution to the differential equation. 1998 17 . Fromm’s scheme (i.. The error is therefore governed entirely by the interpolation procedure.e. This observation would suggest that the next logical step would be to improve this step of the numerical method. i. Geometric representation of ﬂuxes moving through cell j The advantage of this formulation is that the second and third steps outlined above are exact.e. ( n + 1 ) ∆t ) over the ﬁnite = 1 ( j − ) ∆x 2 ∫ u I ( x − a∆t ) dx or simply 1 ( j + ) ∆x − a∆t 2 un + 1 = j 1 ∆x 1 ( j − ) ∆x − a∆t 2 ∫ u I ( x ) dx (78) A geometric representation of this process is shown in Figure 6 u x a∆t a∆t ﬂux in ﬂux out (j-1)∆x j∆x (j+1)∆x Figure 6. ( n + 1 ) ∆t ) = u I ( x − a∆t ) I (iii) Calculate ujn+1 to be the average of u I difference cell: un + 1 = j 1 n. G. n + 1 ( x. ( n + 1 ) ∆t ) dx ∆x ∫ I 1 ∆x 1 ( j + ) ∆x 2 n.Modern Numerical Methods for Fluid Flow P. n + 1 ( x. n + 1 u ( x. Colella and E. Draft of January 30. second-order upwinding) utilizes a piecewise linear interpolation function for uI(x).

or the finite-difference approximation to: ∆u j ≅ ∂u ∂x ∆x j∆x For example. An equivalent form is: Draft of January 30. 1998 18 . Conservation considerations for piecewise linear interpolation We know that the integral of uI(x) over each cell is constrained by u n ∆x so that we can exj press the conservation form of the finite-difference representation as ∆xu n + 1 = ∆xu n + F in − F out j j (81) where the flux in. Puckett uI ( x ) = un + j (79) where ∆uj is the undivided difference. is shown in the figure above by the cross-hatched region and is given by: a∆t 1 F in = a∆tu I ( j − ) ∆x − 2 2 The interpolation function is evaluated at the location specified in the brackets.Modern Numerical Methods for Fluid Flow ( x − j∆x ) ∆u j ∆x P. Colella and E. G. this numerical scheme uses central differencing: ∆u j = n n uj + 1 − uj − 1 2 (80) Note that this method is not necessarily continuous at the cell edges: u x a∆t uI(x) (j-1)∆x j∆x (j+1)∆x Figure 7. Fin.

In addition. since it is actually the first-order accurate approximation to the time-centered value of the solution at the cell edge. Fromm’s scheme keeps track of whether the wave speed is positive or negative. The local truncation error is O(∆x3). G. The flux out is given by substituting the subscript j for j-1 in (82). and then interpolating from that spatial location to the next time increment (n+1)∆t: 1 2 u 1 j+ 2 n+ 1 2 u 1 j+ 2 n+ 1 1 ≅ u ( ( j + ) ∆x. and alters the direction of information transfer accordingly.Modern Numerical Methods for Fluid Flow 1 ( 1 − σ ) ∆u j − 1 2 P. the local truncation error is O(∆x3). ( n + ) ∆t ) 2 2 ∆x ∂u 2 ∂x + j∆x = un + j ∆t ∂u 2 ∂t +… n∆t Next. using the PDE to substitute for the temporal derivative 1 2 u 1 j+ 2 n+ = un + j ∆x a∆t ∂u − 2 2 ∂x +… j∆x or rewriting 1 2 u 1 j+ 2 n+ = un + j 1 ( 1 − σ ) ∆u j 2 (83) which is the same as before. Another way to arrive at the evolution equation is by interpolating ujn from j to j+1/2 at time level n∆t. which can be readily proved if enough terms of the Taylor expansion are retained. Draft of January 30. Puckett n F in = a∆t u j − 1 + (82) Let us denote the term in the brackets above by uj-1/2. since: λ ( β) 2 = 1 + ( σ − 1) σ ( σ2 β4 − σ + 1) +… 4 (85) where β = ( 2πk∆x ) ⁄ D . Colella and E. in the sense of the predictor-corrector formulation of Lax-Wendroff. 1 2 u 1 j+ 2 n+ 1 = u n − ( 1 + σ ) ∆u j j 2 (84) This scheme is stable for σ ≤ 1. 1998 19 .

11e-03 responding to the times that those errors were computed. we also find that for a fixed mesh spacing. we also notice that the Lax Wendroff and Fromm schemes have considerably different errors from each other for a given mesh spacing. Thus the errors go to zero at a ε ( 2∆x. n∆t ) e j 2 (86) For these three schemes. 1998 20 . defined by: ue − un = n M⁄2 ( −M ⁄ 2) + 1 ∑ u n. M⁄2 Let f j = −M⁄2+1 ∑ b k w j be the discrete Fourier transform of the M-vector f. we will develop more refined analytical tools that will enable us to distinguish between the two second-order schemes and will provide some more general design principles for finite difference methods. However.92e-03 1. We can check to see whether these estimates are reliable indicators of the actual performance of these methods. where l is the global order of accuracy. In this section.42e-02 1. Colella and E. From our truncation error analysis for these schemes.11e-02 3. we give the values of the error. the Lax-Wendroff method. In the following table. The function M⁄2 k fS ( x) = −M⁄2+1 ∑ bk Wk ( x ) (87) Draft of January 30. and Fromm’s method. and that for Lax-Wen2 droff and Fromm it is O ( ∆x ) . Comparing the actual values of ε for each of the schemes.66e-02 1. For these schemes. We also show plots of the solution corTable 1L2 error in various schemes for smooth Gaussian pulse Method Upwind Lax-Wendroff Fromm M= 32 4.5 Fourier analysis and accuracy We have derived and analyzed three stable schemes: upwind differencing. the Fromm scheme appears to be more accurate. Puckett 1.32e-02 3. G. T ) rate consistent with the assumption that the higher order terms in the truncation error estimate (74) are negligible. we know that the global error for the upwind scheme is O ( ∆x ) .95e-03 M=128 1. the first order upwind method has much larger errors than either of the second order schemes.62e-02 5. in particular. j − u n ∆x = ε ( ∆x.62e-02 M=64 2. relative to the leading order terms.Modern Numerical Methods for Fluid Flow P. for different values of M . we find that ε ( ∆x. T ) −l = 2 .

Then ϕ S ( x ) interpolates the discrete data. We can apply this to the discretization of (1). Draft of January 30. n∆t ) − u n is an excellent approximation to u ( j∆x. u S ( x. the function uI ( x ) = n M⁄2 −M⁄2+1 (90) ∑ bk λ ( β ) n Wk ( x ) (91) Since the discrete Fourier transform diagonalizes the difference operator L. Thus we can view the finite difference j method as defining a discrete time dynamics on the set of all sums of finite Fourier series of the form (75). D ] is an interpolation function for the values f j : M⁄2 f S ( j∆x ) = −M⁄2+1 ∑ b k W k ( j∆x ) = f j (88) Furthermore. we have u I ( j∆x ) = u n . Colella and E. we can also apply Fourier interpolation to the numerical solution u n . and (76) for any fixed q as M → ∞ . 1998 21 . From equation (76) we find that. then f ( x) − fS ( x) uniformly in x . if f j = f ( j∆x ) for j = 0…M − 1 . Let ϕ j = ϕ ( j∆x ) . G. the spectrally accurate solution differs from the exact solution by an amount that is much smaller that the difference between either of them and the solutions obtained from the finite difference methods described above. and let M⁄2 = O( 1 M q+1 ) (89) ϕj = −M⁄2+1 ∑ bk wj k be the discrete Fourier transform of the M-vector ϕ . Thus. where ϕ ( x ) is infinitely differentiable data for (1). for sufficiently large q . t ) − u ( x. j j Second. We can dej fine. with initial data ϕ S ( x ) : u S ( x. for some q-times continuously differentiable function f ( x ) .We can define a spectrally accurate (approximate) solution on M points to be the exact solution to (1). n∆t ) − u n . Puckett defined on the interval [ 0. for each n . t ) = ϕ S ( x − at ) . and by the inn terpolation property (75). In particular. t ) = ϕ S ( x − at ) − ϕ ( x − at ) = O ( ∆x q + 1 ) .Modern Numerical Methods for Fluid Flow P. u S ( j∆x.

we must determine the degree to which the symbol λ(β) approximates e-iσβ. Note that for a single Fourier mode e λ ( β ) b k ≤ b k . Colella and E. To illustrate the utility of these ideas. due to the division by σ . AE.5. In fact. In general. we can use the symbol to compute the local truncation error of a finite difference method. with k fixed. For initial data in the form of a finite Fourier sum (75). is: AE = 1 − λ ( β ) b k = b k and that since |e-iσβ| = 1. 1. the LTE is given by n+1 ue − n Lu e M⁄2 = −M⁄2+1 ∑ bk ( e − iσβ −λ ( β ) ) e − iσβn k w . we can infer the form of the truncation error from the symbol.Modern Numerical Methods for Fluid Flow P. so that the amplitudes of Fourier modes tend to decrease as a function of − iσβ time. the symbol can be expressed as a function of β: Draft of January 30. G. but it is not since C = O ( σ ) if the scheme is consistent. If e − iσβ − λ ( β ) = C ( iβ ) l+1 + O ( βl + 2 ) then the LTE can be written in the form n+1 ue − n Lu e l+1 Ca ( ∆x ) l ∂ u e = ∆t l+1 σ ∂x + O ( ( ∆x ) ( j∆x. The amplitude error. Puckett Finally. (93) In particular. the statement that − iσβ l+1 the LTE is O ( ( ∆x ) ) is the same as saying that e − λ ( β ) = O ( βl + 1 ) . 1998 22 . From this expression for u S . for a single Fourier mode of wavenumber k. n∆t ) = −M⁄2+1 ∑ bk e iσβn Wk ( x ) (92) where β = 2πk∆x ⁄ D and σ = a∆t ⁄ ∆x . and that the numerical solution gives an error exactly to the extent iσβ that the symbol λ ( β ) differs from e .1 Amplitude error To determine the difference between the amplitudes of the numerical and exact solutions. we can write u s ( x. n∆t ) l+1 ) (94) This may look like a somewhat singular expression. it is clear that the spectrally accurate discrete time dynamics on the Fourier modes is given by multiplying iσβ each amplitude by e . n∆t ) in such a way so as to easily compare it to u n ( x ) : I M⁄2 u S ( x.

Taylor expansions for several common discretizations yield the results shown in Table 2. 1998 23 . β ) = e λ ( β) The range of η is from -π to π. Amplitude error for various schemes Scheme Upwind 1+ 1+ λ(β) σ2 − σ 2 β +… 2 σ4 − σ2 4 β +… 8 Lax-Wendroff Fromm ( σ − 1 ) σ ( σ2 − σ + 1 ) 4 β +… 1+ 8 Since β is proportional to the mesh spacing ∆x for fixed k. of O(∆x4). for compressible flow.Modern Numerical Methods for Fluid Flow λ ( β ) = 1 + Cq βq + … P. 1. Colella and E.5. Table 2.2 Phase errors The phase error is a measure of how accurately the finite difference scheme is translating each Fourier mode in space. n∆t ) = −M⁄2+1 ∑ b k W ( x − an∆t ) n k (96) We wish to compute the corresponding quantity for u I . Multiplication by e k gument of W by η ( σ.. one might set the optimal σ at 0. Define η by: λ ( β) − iη ( σ. G. For reasonable CFL numbers (e. we want Cq to be negative in order to yield a stable numerical scheme.9). Puckett (95) As we have previously discussed. β ) ⁄ ( 2πk ⁄ D ) . The exact solution at time level n+1 looks like a translation of the Fourier mode by σβ/k = a∆t: M⁄2 u s ( x. upwind differencing does indeed give a negative Cq. so that − iη ( σ. β ) (97) corresponds to shifting the ar- Draft of January 30. and one can predict that the Fourier modes will be damped by Ο(∆x2).g. the amplitude error for both Fromm and Lax-Wendroff is quite small.

δ ⁄ ( 2πk ⁄ D ) is the error in the displacement of the k-th Fourier component after the solution has evolved for a time ∆x ⁄ a . the length of a finite difference cell. β ) ⁄ ( 2πk ⁄ D ) ) M⁄2 k (98) = −M⁄2+1 ∑ bk λ ( β ) n e − iη ( σ. the nu− iη ( σ. β ) n W ( x) k While the exact solution would yield a multiplier of e-iσβ in equation (xx) above. Puckett n uI ( x) = −M⁄2+1 ∑ b k λ ( β ) n W ( x − nη ( σ. G. We can use Taylor expansions of the left-hand side of (98) to evaluate δ in the limit of β → 0 . (e iσβ λ ( β) ) λ ( β) 1⁄σ = 1 − iC 2q + 1 β2q + 1 + O ( β2q + 3 ) = 1 − iδ + O ( δ2 ) (100) where 2q = l if l is even. However. the leading order term in the expansion for each of the schemes is shown in Table 3. Table 3. To leading order. comparing phase error for different values of σ . one can compute C 2q + 1 β2q + 1 . this definition of phase error does not permit us to treat the time step as a parameter. In that case. we can define the phase error using the following expression: (e iσβ λ ( β) ) λ ( β) 1⁄σ = e − iδ (99) In this case. and 2q = l + 1 if l is odd. β ) merical solution gives a multiplier of e . Colella and E. A definition that allows us to make such comparisons is to define the error in the phase after a length of time required for the solution to move a fixed distance. 1998 24 . Given sufficient effort (or a symbolic manipulation package). Phase error for various schemes Scheme Upwind Phase error (100) − ( 2σ2 − 3σ + 1 ) 3 ( ) β + O ( β5 ) 6 ( σ2 − 1 ) 3 β + O ( β5 ) 6 Lax-Wendroff Draft of January 30.Modern Numerical Methods for Fluid Flow M⁄2 P. A natural choice of such a distance is ∆x .

5 ≤ σ ≤ 1 . it is given by δc = λ−λ 1 d iσβ λ ( β ) (e ) λ ( β) − i dσ = σ=0 d ( Im ( λ ) ) dσ (101) σ=0 where Im ( λ ) = . and that one runs using a CFL number that is as large as possible. Phase error for various schemes Scheme Fromm Phase error (100) ( 2σ 2 − 3σ + 1 ) β3 + O ( β5 ) 12 It is particularly instructive to plot the polynomials in σ that multiply the leading order terms in the phase error (figure needed here) for the case of Fromm’s scheme and the LaxWendroff scheme. the coefficients differ by a factor of 8. to leading order in β . In terms of the definiσ→0 tion (98).Modern Numerical Methods for Fluid Flow P. we see that. In addition. The classical definition of phase error is given by lim δ = δ c ( β ) . for 0. and sometimes misleading picture of how schemes will behave. It is not difficult to show that δ c depends only on the terms in the finite difference scheme that are first order in σ Draft of January 30. it is necessary to reduce ∆x by a factor of two in the Lax-Wendroff scheme to obtain the same accuracy as that obtained in Fromm’s scheme. for this value of the CFL number. Puckett Table 3. In particular. for σ = 0. This analysis provides an explanation of what has been observed in much more complicated nonlinear problems in several space dimensions [Woodward and Colella. Thus it gives only a partial. only twice as large as that for Fromm. since wave speeds vary in space over the grid. as well as for that for either scheme for 0 ≤ σ ≤ 0. This conclusion is supported by the convergence study described at the beginning of the section. Since the leading order term in the phase error is cubic in ∆x. Overall. It is easy to see from the table above that the classical phase error for 2i Lax-Wendroff is. the phase error for Fromm’s scheme is much smaller that for Lax-Wendroff. 1984]: that the improvement in going from Lax-Wendroff to Fromm is worth about a factor of two mesh refinement. The advantage is that it is precisely this part of the phase error that is most easily improved. However. we see that the phase error for Fromm’s scheme is smaller than that for the Lax-Wendroff scheme. 1998 25 . G. this implies that.75 .5 . the value in that range for which the phase error for Fromm has the largest magnitude. As a practical matter. it is typical of a large class of practical applications that the CFL condition is constrained by the behavior of the solution in the region of greatest interest. Colella and E. it is usually not possible to run an algorithm at a specified CFL number.

Modern Numerical Methods for Fluid Flow n n n n P. for details. say that we want to compute f ' ( 0 ) . In particular. G. Given a smooth function f(x). Zalesak (1984). given values on a grid with grid spacing ∆x . We can now use this to define a Lax-Wendroff scheme with fourth-order spatial accuracy (LW4) and lower classical phase error. Puckett ( Lu ) j = u j + σ ( u j − 1 ⁄ 2 − u j + 1 ⁄ 2 ) + O ( σ2 ) . ∆x ∂x ( j∆x. see. We can use Taylor expansions to obtain the following error estimates for centered difference approximations to f ' ( 0 ) 2 fj + 1 − fj − 1 ( ∆x ) 4 = f ' ( 0) + f ''' ( 0 ) + O ( ∆x ) 6 2∆x 2 fj + 2 − fj − 2 ( 2∆x ) 4 = f ' ( 0) + f ''' ( 0 ) + O ( ∆x ) 6 4∆x We can take linear combinations of these two expressions to obtain a fourth-order accurate expression for f ' ( 0 ) : f ' ( 0) = 4 fj + 1 − fj − 1 1 fj + 2 − fj − 2 − + O ( ∆x ) 4 3 3 2∆x 4∆x (102) We can write this expression in flux form. 1998 (104) 26 . one can reduce the classical phase error by improving the accuracy with n n uj − 1 ⁄ 2 − uj + 1 ⁄ 2 ∂u which approximates . Colella and E. and flux forms derived. It is given by: un + 1 j where 1 2 u 1 j+ 2 n+ = un j n+ n+ 2 2 +σ u 1 −u 1 j− j+ 2 2 1 1 (103) = σ 1 7 n ( uj − 2 − uj − 1 ) + ( un − uj + 1 ) ( uj + uj + 1 ) − j 12 12 2 Draft of January 30..g. n∆t ) We can use Richardson extrapolation to construct higher order approximations to spatial derivatives. as follows: f ' ( 0) = where fj + 1 ⁄ 2 = 7 1 (f + f ) − (f +f ) 12 j j + 1 12 j − 1 j + 2 fj + 1 ⁄ 2 − fj − 1 ⁄ 2 ∆x This process can be continued to any order of accuracy. e.

∂x ∂4 u Instead. C < 0 for σ ≤ 1 . Comparison of accuracy. This does not mean that we can neglect the short wavelengths however. the use of 2q-th order centered differences in (xxx) leads to a classical phase error δ c = O ( β2q + 1 ) . Even-order derivatives are dissipative. if one computes λ ( β ) for the full range 0 ≤ β ≤ π . 1998 27 . The numerical method is then given as follows: 1 2 u 1 j+ 2 n+ = σ 7 1 n ( uj + uj + 1 ) − ( uj − 2 − uj − 1 ) + ( un − uj + 1 ) + 12 2 j 12 σ3 1 n + ( + ) ( u n+ 2 − u j − 1 − 3 ( u n+ 1 − u n ) ) j j j 4 16 (106) In the long-wavelength limit. A little artificial viscosity can be added to damp out the linear instability. The global phase error in the longwavelength limit is given by δ = σ2 3 β + O ( β5 ) . Table 4. Colella and E. A Taylor expansion of the amplitude error indicates that the scheme as stated is unstable in the long-wavelength limit: λ ( β ) = 1 + Cβ4 where C > 0 . as well as ranges of CFL number for which stability is anticipated. error and stability of various schemes Scheme Upwind LW2 Fromm Accuracy O(∆x) O(∆x2) O(∆x2) Phase Error O(β3) O(β3) O(β3) Amplitude Error O(β2) O(β4) O(β4) Stability 0≤σ≤1 0≤σ≤1 0≤σ≤1 Draft of January 30. G. the first two terms on the right-hand side of equation (104) have replaced (uj + uj+1)/2. Puckett As compared to second-order Lax-Wendroff (LW2). however. so ∂2 u we might try adding a term like ∆t∆x 2 . try adding something like ∆t∆x3 4 . this would wreak havoc with our error.6 . Table 4 summarizes the phase and amplitude errors for a number of numerical schemes. Consider the effect of fourth-order deriva∂x tives: ∂4 u ∂u ∂u +a +C 4 = 0 ∂x ∂t ∂x (105) The last term on the left-hand side of equation(94) above acts to reduce the amplitudes of the Fourier modes.Modern Numerical Methods for Fluid Flow P. as claimed at the outset. one finds that this scheme is stable only for σ ≤ 0. In general. 6 Thus the use of higher order differencing eliminates the leading order term in σ of the phase error.

for example. error and stability of various schemes Scheme LW4 Accuracy O(∆x2) Phase Error O(β5) (σ→0) O(β3) (ﬁnite σ) With the exception of upwinding.6 1. If we define n u M. from the standpoint of accuracy. one observes that locally in time. the phase error swamps the amplitude error for the above schemes. it is the phase error which is of the most concern. we define the modified solution u M as the solution to the following differential equation: ∂u M ∂u M ∂l + 1 uM +a − C∆x l = 0 ∂t ∂x ∂x l + 1 (108) for which the expression for Lu e implied by (107) is a consistent discretization in time. Comparison of accuracy. we look to develop an intuition about the behavior of errors in difference schemes by deriving a differential equation . Thus.that models the behavior of the error. u M will better describe what the difference scheme is doing than u e . Amplitude Error O(β4) Stability 0 ≤ σ ≤ 0. while we do have a substantial understanding of how solutions to differential equations behave.6 The modiﬁed equation. then the difference between the modified solution at time level n+1 and the evolved modified solution is: u n + 1 − Lu n = ∆tO ( ∆x l + 1 ) M M Draft of January 30. For that reason. at least.Modern Numerical Methods for Fluid Flow P. G. Puckett Table 4. j . From this expression. analogously to n u e. the effect of replacing the exact solution operator by the result from the difference scheme is to add to the result from the exact solution a quantity of the form ∆t times the spatial derivatives in the brackets. n∆t ) l+1 ) (107) Where the coefficient can be determined from the leading order term in the Taylor expansion of the symbol. Discrete systems are not objects that we have a great deal of intuition about. We start by expressing the local truncation error in the following form n+1 u e. j to be the solution to this differential equation evaluated at grid points. j − n ( Lu e ) j l+1 C ( ∆x ) l ∂ u e = ∆t l+1 ∂x + O ( ( ∆x ) ( j∆x. Colella and E. 1998 (109) 28 .called the modified equation .Thus. in this section. So.

e. ( 1 − σ) +a = 2 ∂t ∂x ∂x 2 (112) The effect of the numerical error in upwind differencing is. x 1 …x p such that the following limits exist x → xp . A qualitative picture of the evolution of the modiﬁed and numerical solutions. uE n+1 LuEn LunMOD unE unMOD Figure 8. Colella and E. 1998 29 . 1. to add a dif( 1 + σ ) a∆x fusion term to the PDE with a diffusion coefficient of magnitude .Modern Numerical Methods for Fluid Flow For the discrete solution u n + 1 − Lu n = 0 For the exact solution u n + 1 − Lu n = ∆tO ( ∆x l ) E E P. to leading order. a function that is continuous. Example: Upwind differencing The modified equation for upwind differencing is given as ∂u M ∂u M ∂2 uM a∆x . G. except at a finite number of points. x > xp lim ϕ ( x) Draft of January 30. Second-order 2 schemes are found to be dispersive in an analogous fashion. as illustrated in the figure below..7 Discontinuities We would like to know whether we can design finite difference methods for the case where ϕ is a discontinuous function. x < xp lim ϕ ( x ) = ϕL ( xp ) ≠ ϕR ( xp ) = x → xp .. Puckett (110) (111) thus we find that the discrete dynamics are approximated to one higher order of accuracy by the solution to the modified equation that by the solution to the original differential equation. i.

and the numerical solution u j . finite difference methods have the same convergence properties as spectral meth1 2 ods in the presence of discontinuities. Upwind differencing. Puckett For such initial data. it is well-known (Dym and McKean) that Fourier interpolation / approximation of discontinuities does not converge uniformly. i. depending on the location of the grid points relative to the oscillations. one obtains an overshoot / undershoot in the neighborhood of the discontinuity. the qualitative behavior of these methods varies considerably. G. t ) = ϕ S ( x − at ) . the exact solution formula (xx) is still well-defined. However.Thus. Colella and E. with magnitude of approximately ± 14\% . and is known as Gibb’s phenomenon. We can construct the discretized initial data ϕ j by evaluating ϕ at grid points. Overall. an example is shown in Figure 9. The numerical solutions converge in L or L . so that the solution converges in L or L . Gibbs. This failure of Fourier approximations to converge. depending on the method. that max x ϕ ( x ) − ϕ S ( x ) does not approach zero as M → ∞ .e. u S ( x. Using that discrete data. but not uniformly. the spectrally accurate approximate solun tion u S ( x. Consequently.. We consider first the convergence properties of the spectrally accurate solution. and we will sample the Gibbs oscillations at the grid points. Draft of January 30. does not introduce any new maxima or minima that were not already present in the solution. was first observed by J. even though the derivatives appearing in the differential equation are not.Modern Numerical Methods for Fluid Flow P. we can take that formula as the definition of what we mean by a solution to the differential equation. as the solution evolves in time. Instead. as we have discussed above. and taking ϕ j = ϕ L ( j∆x ) at points for which the data is discontinuous. we can define both the Fourier interpolant ϕ S ( x ) . In that case. 1998 30 . t ) . the Gibbs’ oscillations occupy a decreasingly narrow interval in the neighbor1 2 hood of the discontinuity as M → ∞ . In spite of this problem. and the nature of the lack of convergence.W.

In Figures 10-12 we show several examples of the behavior of difference schemes in the presence of discontinuities. to the n n extent that the finite difference solution u I ( x ) approximates u S ( x ) .e. Colella and E. Puckett Figure 9. In fact. This is considerably different from the behavior of the spectrally accurate solution. In all cases. for fixed t . one can analytically estimate the width of the transition for this scheme. 1998 31 . it is given by O ( ( t∆x ) ) . i. can lead to oscillations that are larger that the Gibbs oscillations. phase errors. Both Lax-Wendroff and Fromm also produce oscillations near discontinuities. First. which produces new extrema. there are many mesh points in the transition.. the amplitudes of the short-wavelength Fourier components are sufficiently large ( b k ∼ k −1 for k large ) that errors in the locations of these Fourier modes.e.Modern Numerical Methods for Fluid Flow P. 1⁄2 O ( M ) mesh points wide. we expect to see Gibbs oscillations in the solution (these do not appear in the upwind differencing results because the short-wavelength components that lead to these oscillations are sufficiently strongly damped). 1⁄2 at time t . however. One can think of these oscillations as coming from two sources. The upwind differencing represents the discontinuity as a smooth monotone transition. a transition region which is. This is consistent with the model of the upwind difference Draft of January 30. We plot the Fourier interpolant of the step function at ten times the number of interpolation points. as well as to the continuous Fourier interpolant. we compare the results with the exact solution. Gibbs’ phenomenon for 64 and 256 interpolation points. In addition. i. G.

Lax Wendroff. 1998 32 . Colella and E.Modern Numerical Methods for Fluid Flow P. A somewhat different. For both the Fromm and Lax-Wendroff schemes. The Fourier interpolant is plotted as in Figure 9. the qualitative character of the oscillation is consistent with the phase error properties of the schemes discussed previously. In addition. the phase error is a lagging phase error. the Fourier interpolant and the exact solution on a grid with 128 mesh points. and more spatially localized explanation of what oscillations occur can be obtained by looking in detail at what the various finite difference schemes produce Draft of January 30. Figure 10. there is smoothing of the solution in front of the discontinuity due to the displacement of the short wavelengths that had initially represented the sharp transition. causing short-wavelength to propagate a speeds less than the exact propagation speed. Puckett method that comes from the modified equation analysis that models the error in upwind differencing acting like an added diffusion term in the differential equation. This leads to enhanced oscillatory behavior in back of the exact location of the shock. For both schemes. with diffusion coefficient proportional to ∆x . in addition. G. we see oscillations whose amplitudes and spatial extent exceed those due to Gibbs’ phenomenon in the spectrally accurate calculation.

Puckett Figure 11. Upwind differencing and the exact solution on a grid of 128 mesh points.Modern Numerical Methods for Fluid Flow P. Colella and E. Figure 12. Fromm. G. Draft of January 30. The Fourier interpolant plotted as in Figure 9. the Fourier interpolant and the exact solution on a grid with 128 mesh points. 1998 33 .

G. Over / undershoot of the numerical solution near a discontinuity using Fromm’s scheme for discontinuous initial data at the end of one time step. In figure 13. in that cell. we show the case of Fromm’s scheme.Modern Numerical Methods for Fluid Flow u x uI(x) P. u x a∆t (j-2)∆x (j-1)∆x j∆x (j+1)∆x Figure 14. the amount of mass exiting from the left is greater than the amount of mass entering from the right. Puckett (113) (j-2)∆x (j-1)∆x j∆x (j+1)∆x Figure 13. Colella and E. Since the initial value of the average is equal to the minimum value to the right of the discontinuity. In the j − 1 cell. the amount of mass leaving the cell is smaller than the amount of mass coming from the right. Overshoot of the numerical solution near a discontinuity using Lax-Wendroff Draft of January 30. this leads to an overshoot. this leads to an undershoot. Similarly. in the j + 1 cell. In this case. In Figure 14 we show the corresponding result for the Lax-Wendroff scheme. 1998 34 . The shaded regions represent the total mass crossing the various cell edges. we observe only the an overshoot in the j − 1 cell due to the lower value of the mass moving out across the right edge. since the average of u is already at the maximum value to the left of the discontinuity.

1. Similarly. 1998 35 . all three of these conditions are equivalent. a reflection of the fact that the other two schemes are second-order accurate. various quantities derived from the density may not be well-defined. if the solution represents a concentration or mass fraction. the density must remain positive. finally. There are three ways of specifying this requirement. if the u j ≥ 0 implies that u j ≥ 0 . On the other hand. that the Lax-Wendroff and Fromm schemes are not max-norm bounded. Puckett (j-2)∆x (j-1)∆x j∆x (j+1)∆x Figure 15.preserving if u j ≥ u j + 1 for all j implies that u j ≥ u j + 1 .Modern Numerical Methods for Fluid Flow On the other hand. upwinding avoids this problem altogether. while upwind differencing is first order accurate. u x a∆t P. it is important that the values remain between 0 and 1. Second. it is often important that the solution to an advection equation of the form (1) not exceed the range of values defined by the initial data. otherwise. If the solution represents the density of a fluid in a compressible flow calculation.7. the observed empirical accuracy of upwind differencing is much lower than that of the other two schemes. we say that a scheme is max-norm bounded if Lu where the max norm is defined by: u ∞ ∞ ≤ u ∞ (114) = max j ( u j ) (115) For linear schemes. Could it be that we have been insuffiDraft of January 30.1 Max-norm boundedness and Godunov’s Theorem On physical grounds. It is clear from the examples given above. while upwind differencing is. we say that a scheme is monoton+1 n+1 n n nicity . G. We say that a scheme is positivity n+1 n preserving. Behavior of numerical solution near a discontinuity using upwinding. Colella and E.

G. i. Godunov’s theorem: Let ( Lu ) j = ∑ cs uj + s s (116) be a linear scheme that is consistent and max . c s ≥ 0 for all s . u ( Lu ) 0 = = 1 and = ∑ cs us ∑ cs . is no. . we could come up with a second-order accurate linear scheme which is also max-norm bounded? The answer. First. Assume that this is not true. Then.Proof: We shall prove this in two steps. we show that L being stable in the max norm is equivalent to saying that the coefficients of the scheme are nonnegative. unfortunately. Since ∑ cs = 1 and ∃s such that c s < 0 . in other words that equation (116) holds for some cs which is negative. as indicated by the following theorem. ∞ >1 < Lu ∞ The second part of the proof is a simple calculation using the symbol. 1998 36 . Colella and E. if: us = { Then uj = 0 if j ∈ 1… ( c s > 0 ) − 1… ( c s < 0 ) ∞ (117) { s ( c s = 0 ) } . and that if we looked further. For example.e. then q ≥ 4.norm bounded and assume at least two of the coefficients c s are nonzero. This can be written as λ ( β) 2 = ∑ cs e ∑ cs′ e iβs s s′ − iβs′ Draft of January 30. Then the scheme is first-order accurate. Puckett ciently clever in constructing our methods. For first order λ ( β) 2 = 1 + C2 β2 + O ( β4 ) (119) with C2 < 0 for stability.Modern Numerical Methods for Fluid Flow P. By (82) λ ( β) 2 = 1 + Cq βq + O ( βq + 2 ) (118) If the scheme is to be better than first order. this implies that: ∑ cs and u which is a contradiction.

it will behave qualitatively like upwind differencing. conservative ﬁnite difference methods and the LaxWendroff theorem. even for the linear problem (1). then the coefficient multiplying β2 is nonzero. we pay a price in doing this. any scheme that is consistent must have at least two nonzero cs for σ not equal to an intes ger. how can we develop schemes that are higher-order accurate but still satisfy a maximum principle? The answer is to allow the schemes to be nonlinear. 1998 37 .0) for a general nonlinear system of equations: ∂U ∂F ( U ) + = 0 ∂t ∂x (121) where U = U ( x.8 Weak solutions.e. Puckett = s. and the use of Fourier analysis. In addition. Given initial data U(x. s' ∑ ( s − s' ) 2 c s c s' β2 + O ( β4 ) . in the sense that it will tend to smooth out discontinuities. in the sense that. t ) ∈ ℜ n and F = F ( U ( x. for regions where the solution is smooth. to talk about convergence for all parts of the solution. s' ∑ β2 2 β2 2 ( c s c s' ) ( 1 − i βs − s ) ( 1 + iβs' − s' ) + O ( β4 ) 2 2 1− s. we have that ∑ c s s = − σ . for example. So. to be of the form un+1 = £un (120) where £ is a nonlinear operator. by performing a modified equation analysis following that of equation (82). This is easily seen. t ) ) ∈ ℜn . we need to develop some machinery. i. 1. and the result is proven. Our strategy will be to allow us to use the results from linear analysis “almost everywhere”. assume that a smooth solution exists over the domain.. we obtain λ ( β) 2 P. consequently. However. 2 If at least two of the c s are nonzero. Colella and E.Thus for almost all choices of σ . our nonlinear schemes will reduce to linear ones. However. in the form of equation (82). G. The engineering definition of a weak solution is that the solution Draft of January 30.equivalence of stability and boundedness. and whose properties we understand. a linear finite difference scheme that is max-norm bounded will be first-order accurate. in that we lose our linear analysis machinery . By consistency.Modern Numerical Methods for Fluid Flow Performing a Taylor expansion on the exponential.

even in the case when the derivatives in (110) are not defined.Modern Numerical Methods for Fluid Flow P. t N . We can take this to be the definition of a solution. All of the methods (so far) satisfy the discrete analog of the weak solution. t ) ) dt + ∫ F ( U ( x R. Flux through three cells Fj-1/2 Fj+1/2 Fj+3/2 Uj n+1 = Un + j ∆t − F 1 F ∆x j − 1 j+ 2 2 where F represents the numerical fluxes at the cell boundaries. t ) dx = O xL ∫ U ( x.a total “mass”. Incidentally. t ) ) dt t0 t0 (122) For any x L. Ψ ( U o. …. By the divergence theorem. Puckett must be integrable.e. Then (111) can be interpreted as the usual flux-balance relation over a control volume: mass at the new time is equal to the mass at the old time plus the net fluxes on the left and right edges. U o ) = F ( U o ) . We can think of the integral of U over an interval in space as being the total amount of conserved quantity at some time . t ) dx + ∫ F ( U ( x L. x R.. of the familiar control-volume formulation of continuum mechanics. xR xR N tN 0 tN xL ∫ U ( x. G. this is just an expression in mathematical terms. i. …. A finite-difference method is in conservation form if it can be written as. The discrete analogue of equation (111) above is j = jL ∑ jR U n + 1 ∆x j = j = jL ∑ jR U n ∆x j + ∆t F 1 −F 1 j+ j− 2 j = jL 2 ∑ jR (123) Draft of January 30. in some generalized sense. Colella and E. t . U n+ s ) j j and if we stuff a constant value Uo into Ψ. (n+1)∆t Fj-3/2 n∆t Figure 16. The weak consistency condition says that if we express the flux as F 1 j+ 2 = Ψ ( U n− s. 1998 38 .

we have the following mass balance relation: ∆x j = jL ∑ jR N Uj n = ∆x j = jL ∑ jR N Uj o NN − 1 + ∆t ∑ NO NN − 1 Fj L −1⁄2 − ∆t ∑ NO Fj R +1⁄ (124) This is a consistent discretization of the integral relation (111) defining weak solution. we show the exact solution to a discontinuous initial value problem plotted with the solution obtained by a conservative finite difference scheme. Draft of January 30. Figure 17. Conservative ﬁnite difference calculation of a discontinuity versus the exact solution. Puckett At any jth cell. This implies that the only fluxes which count are those at the edges of the domain. this enables us to compute discontinuous solutions. 1998 39 . G. In figure 17 below. The fact that the scheme is conservative implies that the integral under the numerical solution curve is identical to that for the exact solution.Modern Numerical Methods for Fluid Flow P. More generally. In particular. the flux coming from the j-1th cell is equal to the flux leaving the j-1th cell. The rate of change of the mass of in these three cells is given by F 3 −F 1 + F 1 −F 1 + F 1 −F 3 = F 3 −F 3 j− j+ j+ j− j+ j− 2 j− 2 j+ 2 2 2 2 2 2 Notice that all the terms on the right-hand side cancel except for the first and last terms. Colella and E. Consider a domain which is three cells wide as below.

say 1 2 U∞(x. u j + s ) = F j+ 1 2 Φ ( u 0. G.order accuracy for smooth solutions and positivity preservation by hybridizing first order and second order schemes. …. The goal of linear Draft of January 30. The high-order flux comes from our arsenal of linear difference schemes with order greater than two. this looks like having an exact and a diffusive flux.Modern Numerical Methods for Fluid Flow P.9 Limiters Consider discontinuous solutions to the hyperbolic equation: ∂u ∂u +a = 0 ∂t ∂x (126) Reasonable design criteria for a numerical scheme which solves this equation would need to include consistency and conservation. in some norm such as L or L . Puckett The Lax-Wendroff theorem: Assume that the finite-difference scheme under consideration is consistent and in conservation form. At the discrete level. then it will converge. as follows. Given a second order scheme with scheme with flux FH and a first-order scheme with flux FL. 1998 40 . F 1 j+ 2 = αj + 1 ⁄ 2 FH = FL 1 j+ 2 + ( 1 − αj + 1 ⁄ 2 ) FL j+ 1 2 1 j+ 2 + αj + 1 ⁄ 2 FH 1 − FL 1 j+ j+ 2 2 Here. 1. while the low-order flux satisfies the maximum principle. we can take a linear combination of the two fluxes to obtain a hybrid scheme. …. If Ujn converges to some function. 0 ≤ α ≤ 1 . then U∞ is a weak solution to ∂U ∂F ( U ) + = 0 ∂t ∂x (125) Note that this is not equivalent to saying that if the scheme is consistent and in conservation form.t). 2 The consistency condition indicates that: Φ ( u j − s. Lax-Wendroff doesn’t guarantee existence of a weak solution. Colella and E. The discretized equation could be written in the form: un + 1 = un + j j where F j+ 1 2 ∆t F − F 1 ∆x j − 1 j+ 2 2 (127) = au j+ 1. u 0 ) = au 0 We will attempt to obtained the properties of second.

if the low-order scheme satisfies a maximum principle. in the sense of a modified equation analysis. Ac 1 j+ 2 = αj + 1 ⁄ 2 Fh 1 − Fl 1 j− j+ 2 2 (130) With all of these new definitions in place. Puckett hybridization is to keep the solution from straying outside some maximum/minimum bounds. we define the corrected flux Ac as follows. we require FH to be Fourier stable. simply evolve u for one time step using the lowerorder scheme. Zalesak (1979) has a good discussion of this method. then the hybrid scheme will do so. in order to obtain uTD.1 Flux-corrected transport Flux-corrected transport was an early version of this approach. to leading order in ∆x .9. Finally. Godunov’s theorem shows that α=α(u) for the hybridized scheme to be secondorder accurate in regions where the solution is smooth. equivalently. The basic idea is to choose α so that no overshoot or undershoot can occur. The initial work was done by Boris and Book in the early 1970’s. A 1 j+ 2 = FH 1 j+ 2 − FL j− 1 2 (128) The quantity A j + 1 ⁄ 2 . we want to compute the corrected flux so that it as nearly equal to A j + 1 ⁄ 2 as possible. Draft of January 30. as well. in such regions. if we choose a sufficiently large window over which to define the range TD of minimum and maximum values of u . the discrete evolution equation for u is given by u n + 1 = u TD + j ∆t c A − Ac 1 ∆x j − 1 j+ 2 2 (131) The strategy for computing the hybridization parameter α j + 1 ⁄ 2 or. Since notation is free. We also define the transported and diffused velocity by: u TD = u n + j ∆t L − FL 1 F ∆x j − 1 j+ 2 2 (129) In other words. In addition. we would expect α = 1 1. First. looks like a flux for a backwards diffusion term. A c + 1 ⁄ 2. 1998 41 .Modern Numerical Methods for Fluid Flow P. subject to the constraint that the outcome of applying TD (130) will not exceed the range of values defined by nearby values of u . the scheme should reduce to the linear high-order scheme in regions where the solution is sufficiently smooth to be resolved on the grid. let’s denote the anti-diffusive flux as follows. G. hence its name. Thus. Colella and E. Since we don’t want any high-frequency amplification (a nontrivial requirement). j is based on the following ideas.

If the antidiffusive fluxes are all in the diTD rection of the local solution gradient. Puckett Finally. 1998 42 . acting together. The problem with this last criterion is that it is possible for two fluxes. Colella and E. =u TD Aj − 1 ⁄ 2 Aj + 1 ⁄ 2 Figure 18. although each flux. The solution to this problem obtained by Boris and Book is to use the intuition that A j + 1 ⁄ 2 is an antidiffusive flux. Draft of January 30. so that it has the same sign as the local gradient.Modern Numerical Methods for Fluid Flow P. as defined by u . to cause a value to exceed the max and min limits. We illustrate this idea in the following figure. one would like an algorithm that looks at each edge independently from the others. acting separately. Partial cancellation of the antidiffusive ﬂuxes at adjacent cell edges. might remain in bounds. G. and for that reason partially cancel. the two antidiffusive fluxes will have the same sign.

subject to the constraint that its use in (131) with the fluxes set to zero at the other Draft of January 30. Colella and E. since the extent to which it will cause the solution to exceed the range of values defined by u TD will be bounded by the extent to which that will occur with the fluxes at the other edges set to zero. u TD limiting n+1 values for u Aj + 1 ⁄ 2 Figure 20. The combination of these two conditions allows us to limit each corrected flux separately. Limiting of the corrected antidiffusive ﬂux. the corresponding corrected flux will be set to zero. if any antidiffusive flux fails to satisfy this condition. 1998 43 . G. Specifically. Cancellation of a corrected ﬂux that is not antidiffusive.Modern Numerical Methods for Fluid Flow P. Puckett On the other hand. we will take the corrected flux to be as nearly equal to A j + 1 ⁄ 2 . u TD Aj + 1 ⁄ 2 = 0 Aj + 1 ⁄ 2 c Figure 19.

u j . G. so that the interpolation function n uI((j+1/2)∆x) stays in the range defined by ujn and u j ± 1 as shown in Figure 21. the ∆uj’s.e.2 Geometric limiters The basic idea of geometric limiters is to first apply a limiter to an interpolation function uI(x). Ac where ∆x TD ∆x TD TD TD K = min A 1 .Modern Numerical Methods for Fluid Flow P. 1998 44 .: Ac 1 j+ 2 = min ( ∆x TD ∆x TD TD TD ( uj − uj − 1 ) . u j + 2 (Figure 20). this constraint is given as follows. i. K ) (133) (134) = sign A 1 j + 2 (135) 1. Van Leer’s scheme adjusts the slopes. the corrected flux can be written as follows. Draft of January 30. S 1 ( uj + 2 − uj + 1 ) . nor u j + 1 to go j TD TD outside the range defined by u j + 1. Aj + 1 ⁄ 2 ) ∆t ∆t j + 2 (132) Combining these two conditions. (u − uj + 1 ) . and accounting for all the possible combinations of signs. which combines Fromm’s method with a geometric limiter.. Colella and E. Puckett TD TD n+1 edges does not allow u n + 1 to go outside the range defined by u j − 1. One example is van Leer’s scheme.9. S 1 ( uj − uj − 1 ) j + ∆t j + 2 j + 2 ∆t 2 and S 1 j+ 2 j+ 1 2 = S j+ 1 max 2 ( 0. Algebraically. and then use an upwind method to calculate the fluxes and advance the solution.

2 u j − u j − 1 . The implications of this are that this method retains the high-order accuracy of Fromm’s scheme in smooth regions of the solution. Puckett u x van Leer slope Fromm slope Figure 21. σ is the CFL number and the van Leer slopes are: ∆ VL u 1 S j • min ( 2 u j + 1 − u j . anyways. G. . We can write the flux as: F where u j+ 1 2 j+ 1 2 = au j+ 1 2 (136) = u n + ( 1 − σ ) ∆u VL j j (137) In the above equation. An example of slope limiting. the discretized evolution equation drops to first-order accuracy.) Draft of January 30.Modern Numerical Methods for Fluid Flow P. (This is a reasonable thing to do since you probably don’t have enough derivatives in this region. 1998 45 . u j + 1 − u j − 1 ) …if…ϕ > 0 2 = 0…otherwise j (138) where Sj now denotes the sign of the gradient S j = sign ( u j + 1 − u j − 1 ) and the quantity ϕ is given by ϕ = ( uj + 1 − uj ) • ( uj − uj − 1 ) n n n n n n (139) (140) This scheme “naturally” detects a discontinuity and modifies its behavior accordingly. but where discontinuities are detected. Colella and E.

then we can write the van Leer flux as. Colella and E. j j+ 2 F j+ 2 VL = F L + α ( F Fromm − F L ) 1 = au n + a ( 1 − σ ) ∆ VL u j j 2 = au n j ∆ VL u j 1 Cu + a ( 1 − σ) ∆ j 2 ∆C uj If we choose α to be the term in brackets above. 1998 46 . then we can write FVL as: F VL = au n + α ( F Fromm − F L ) j (144) 1. if we consider F H 1 ↔ F Fromm and F L 1 ↔ au n . Consider F j+ 1 2 = au j+ 1 2 where the cell edge velocity is defined for van Leer’s scheme as u 1 j+ 2 = uj + 1 ( 1 − σ ) ∆ VL u j 2 (141) The van Leer slope ∆ VL u j was defined previously in equation (127). Draft of January 30.Modern Numerical Methods for Fluid Flow P. we have identified a general set of techniques for constructing schemes with limiters. For Fromm’s scheme. (ii) A linear high-order scheme that is linearly stable.9. the analogous quantity is u 1 j+ 2 = uj + 1 ( 1 − σ ) ∆c uj 2 (142) where the slope is defined as simply ∆c uj = 1 (u − uj − 1 ) 2 j+1 (143) To conform to the notation adopted at the beginning of this section on limiters. Puckett We note finally that the van Leer scheme is actually a linear hybridization of Fromm’s scheme and upwinding with a special choice of the hybridization parameter α. The ingredients are: (i) A linear low-order scheme that satisﬁes a maximum principle.3 Design criteria for schemes with limiters Thus far. G.

we find that the interaction of the phase error properties of the high-order scheme with the limiter dominate the accuracy with which discontinuities are represented on the grid. 1998 47 . the interpolation profile is constrained so that. On of the consequences of this kind of construction is that. leading to a smoothed out profile. When we combine these second-order schemes with limiters. due to the influence of the limiter. In order for this last condition to be satisﬁed. the narrower this oscillatory / smooth structure representing the discontinuity was. the overall scheme would general no new extrema. Colella and E. the hybridization coefﬁcient α j + 1 ⁄ 2 must depend on the solution values. the solution is chopped off to be flat. after a few time steps. we saw that the effect of the leading-order dispersive errors of second order schemes was to cause a lagging or leading oscillatory wave train (depending on the sign of the phase error) due to the errors in the transport of the large wavenumber Fourier modes. Puckett (iii) A hybridization switch between the two. by some measure. This is in contrast with the first-order linear schemes. G. and reduces to the highorder scheme for smooth solutions.Modern Numerical Methods for Fluid Flow P. for which the number of mesh points in the transition representing a discontinuity increases 1⁄2 like O ( n ) . while Draft of January 30.7. In the FCT case. Roughly speaking. designed so that it the resulting hybrid scheme introduces no new local extrema. In addition. the discrete profile representing a discontinuity approaches something very close to a discrete travelling wave solution. with the number of mesh points in the transition across the discontinuity increasing only very slowly as a function of time. In section 1. that high-wavenumber component of the solution is still being extracted from the side opposite the oscillatory region. Thus to a high degree of accuracy. independent of the CFL number σ . the minimum amount of the low-order scheme necessary to prevent new extrema from forming. the effect of the limiter is to replace the oscillatory region near a discontinuity with a flat profile. The way we have accomplished the third criterion is to construct the hybridization switch so that it blends in. the lower the phase error of the scheme. the extraction of the high-wavenumber modes from one side of the discontinuity caused the side opposite that of the oscillations to be smoothed out. where n is the number of time steps. we would like to make the argument that the accuracy with which hybrid schemes of the form discussed above represent discontinuities is intimately tied to the phase error properties of the scheme. Next. For the van Leer scheme. in the region in which the linear high-order scheme would otherwise be oscillating. the measure was that the solution must remain within bounds set by the transported and diffused solution. Overall. However.

Thus. Puckett leaving the smoothed-out portion of the solution from the second-order linear scheme unchanged. The solution profiles support this scenario for the interaction of the phase error of the high-order scheme with the treatment of discontinuities. Draft of January 30. if we compare the FCT/ Lax-Wendroff and van Leer schemes for this run. Finally. and between the Fromm and van Leer schemes. the lower phase error of the Fromm scheme is worth about a mesh refinement over the Lax-Wendroff scheme. In Figure 22 we show comparisons between the Lax-Wendroff and FCT / LaxWendroff schemes. Colella and E. we find that the number of mesh points in the van Leer representation of the discontinuities is about half that in the FCT / Lax Wendroff representation of the discontinuity. even in the case of hybrid schemes and discontinuous solutions. 1998 48 . G.Modern Numerical Methods for Fluid Flow P.

G. Colella and E.Modern Numerical Methods for Fluid Flow P. 1998 49 .75 and time t = 5. CFL = 0. Lax-Wendroff / FCT comparison (bottom) on a grid with 128 mesh points. Draft of January 30. Puckett Figure 22. Fromm / van Leer comparison (top).

Colella and E. 1998 50 . Puckett Draft of January 30. G.Modern Numerical Methods for Fluid Flow P.