The Lax-Wendroff Technique

finite-difference method particularly suited to marching solutions. • A brief review on the marching problems – Hyperbolic and parabolic partial differential equations .Introduction • What a kind of techniques is it ? – The Lax-Wendroff techniques is an explicit.

3) (6.Introduction • An example of hyperbolic equations – The time-marching solution of an invicid flow using the unsteady Euler equations (2D).2) ⎛ ∂v ∂v ∂v 1 ∂p ⎞ ⎟ = −⎜ u + v + ⎜ ∂x ∂t ∂y ρ ∂y ⎟ ⎠ ⎝ ⎛ ∂e ∂e ∂e p ∂u p ∂v ⎞ ⎟ = −⎜ ρ + u + + ⎜ ∂x ∂t ∂y ρ ∂x ρ ∂y ⎟ ⎝ ⎠ (6.4) Energy . Continuity ⎛ ∂u ∂ρ ∂ρ ∂v ∂ρ ⎞ = −⎜ ρ +u +ρ +v ⎟ ⎜ ∂x ∂t ∂x ∂y ∂y ⎟ ⎝ ⎠ (6.1) x momentum y momentum ⎛ ∂u ∂u ∂v 1 ∂p ⎞ ⎟ = −⎜ u +v + ⎜ ∂x ∂t ∂y ρ ∂x ⎟ ⎝ ⎠ (6.

j t (6.Procedure • Predict the the value of the variables at next time step based on a Taylor series expansion. j ⎛ ∂ ρ ⎞ (∆t ) 2 ⎛ ∂ρ ⎞ + = ρ + ⎜ ⎟ ∆t + ⎜ 2 ⎟ ⎜ ∂t ⎟ ⎝ ∂t ⎠i . j ⎝ ⎠i .5) . j 2 t 2 t i. • Choose density ρ for purposes of illustration ρ t + ∆t i.

+j∆t ⎛ ∂ 2u ⎞ (∆t ) 2 ⎛ ∂u ⎞ = uit.+j∆t ⎛ ∂ v ⎞ (∆t ) 2 ⎛ ∂v ⎞ = vit. j ⎝ ⎠i .8) .Procedure • Analogous Taylor series are written for all the other dependent variables. j ⎛ ∂ e ⎞ (∆t ) 2 ⎛ ∂e ⎞ = e + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i . j 2 t t (6. j ⎝ ⎠i . j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i . uit. j 2 t 2 t (6. j ⎝ ⎠i . j t (6.6) vit. j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠ i . j 2 t 2 t i.7) e t + ∆t i.

1) • The spatial derivative are given by second-order central differences ⎛ ∂ρ ⎞ t ⎜ ⎟ = −( ρ i . j ρ it+1. (6. j vit+1. j ⎝ ⎠i . j − ρ it−1. j − uit−1. j + uit.+j∆t ⎛ ∂ ρ ⎞ (∆t ) 2 ⎛ ∂ρ ⎞ = ρ it. j 2∆x 2∆y (6. j − vit−1. j 2 t 2 t • A number for (∂ρ/∂t) is obtained from the continuity equation.Procedure ρ it. j − ρ it−1. j ρ it+1. Eq. j 2∆x 2∆y + uit. j ⎝ ∂t ⎠i . j ) . j t uit+1. j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i .9) + ρ it.

1) with respect to time ∂ 2 ρ ∂ρ ∂v ∂ 2 v ∂v ∂ρ ∂ 2 ρ ∂ρ ∂u ∂ 2u ∂u ∂ρ ∂2ρ + +v + +ρ + +u + = −ρ 2 ∂y∂t ∂y ∂t ∂y∂t ∂y ∂t ∂x∂t ∂x ∂t ∂x∂t ∂x ∂t ∂t The mixed derivative is found by differentiating Eq.2) with respect to x ∂ 2u ∂u ∂v 1 ∂ 2 p 1 ∂p ∂ρ ∂ u ⎛ ∂u ⎞ ∂u − 2 + + = −u 2 + ⎜ ⎟ + v 2 ρ ∂x ∂x ∂x∂y ∂y ∂x ρ ∂x ∂x ⎝ ∂x ⎠ ∂x∂t 2 2 2 .Procedure ρ t + ∆t i. (6.(6. j t Differentiate Eq. j 2 t 2 t i. j ⎝ ⎠i . j ⎛ ∂ ρ ⎞ (∆t ) 2 ⎛ ∂ρ ⎞ = ρ + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i .

Procedure ∂ 2u ∂u ∂v 1 ∂ 2 p 1 ∂p ∂ρ ∂ u ⎛ ∂u ⎞ ∂u − 2 + + = −u 2 + ⎜ ⎟ + v 2 ρ ∂x ∂x ∂x∂y ∂y ∂x ρ ∂x ∂x ⎝ ∂x ⎠ ∂x∂t 2 2 2 Second-order. j + uit−1. j + pi −1. j −1 4(∆x)(∆y) + uit. j uit+1. j (∆x) ( ρi . j + t − t 2 2 ρi . j − vit−1. j −1 vit+1. j 2 t + vit. j +1 + uit+1. centered finite-difference quotients at time t uit+1. j − uit−1. j − 2 pi . j 1 pi +1. j −1 − uit−1. j +1 − uit. j +1 + uit−1. j ) 2∆x 2∆x . j 2 ⎛∂u⎞ ⎜ ⎟ = −uit. j +( ) 2 ⎜ ∂x∂t ⎟ (∆x) 2∆x ⎝ ⎠i . j − 2uit. j 2∆y 2∆x t t t t t t t 1 pi +1. j ρi +1. j − ρi −1. j − pi −1. j uit+1.

A number for ∂2ρ/ (∂y∂t) is found by differentiating Eq.Procedure ∂ 2 ρ ∂ρ ∂v ∂ 2 v ∂v ∂ρ ∂ 2 ρ ∂ρ ∂u ∂ 2u ∂u ∂ρ ∂2ρ + +v + +ρ + +u + = −ρ 2 ∂y∂t ∂y ∂t ∂y∂t ∂y ∂t ∂x∂t ∂x ∂t ∂x∂t ∂x ∂t ∂t • A number for ∂2ρ/ (∂x∂t) is found by differentiating Eq. • • .1) with respect to y and replacing all derivatives on the right side with second-order central differences.1) with respect to x and replacing all derivatives on the right side with second-order central differences.(6. A number for ∂2v/ (∂y∂t) is found by differentiating Eq. analogous to the form of ∂2u/ (∂x∂t).(6.(6.3) with respect to x with respect to x and replacing all derivatives on the right side with second-order central differences.

∂ρ/∂t. ∂ρ/∂t has already been obtained from (6.replaced by second-order central differences t ui +1.Procedure ∂ 2 ρ ∂ρ ∂v ∂ 2 v ∂v ∂ρ ∂ 2 ρ ∂ρ ∂u ∂ 2u ∂u ∂ρ ∂2ρ + +v + +ρ + +u + = −ρ 2 ∂y∂t ∂y ∂t ∂y∂t ∂y ∂t ∂x∂t ∂x ∂t ∂x∂t ∂x ∂t ∂t • The remaining derivatives are first spatial derivatives. j • • • The other remaining derivatives are first time derivatives. ∂u/∂x. analogous to the form of ∂ρ/∂t . and ∂v/∂t. and ∂v/∂t can be obtained. j + ui −1. ∂u/∂t. namely.∂ρ/∂x.and ∂ρ/∂y. ∂v/∂y.9) ∂u/∂t.. j ⎛ ∂u ⎞ ⎜ ⎟ = 2∆x ⎝ ∂x ⎠i .

+j∆t ⎛ ∂ ρ ⎞ (∆t ) 2 ⎛ ∂ρ ⎞ = ρ it. j 2 t 2 t • We now have known values at time t for all three terms on the right side of the above equation. • Repeat the above procedures to find the remaining flow-field variables at grid point (i.j) at time t+∆t. . j ⎝ ⎠i . • This allows the calculation of density at time t+∆t. j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i .Procedure ρ it.

.j).j) at time t+∆t from the known flow-field variables at grid points (i. (I+1.j). and (i.j).j+1) at time t.The essence of the Lax-Wendroff method Obtain explicitly the flow-field variables at grid point (i. (I-1.

+j∆t ⎛ ∂ 2 v ⎞ (∆t ) 2 ⎛ ∂v ⎞ t = vi . j ⎝ ⎝ ⎠i .8) • Much of this algebra can be cut by MacCormack’s techniques . but algebra is lengthy. uit. j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i . j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ + ⎜ ∂t ⎟ ⎝ ∂t ⎠i . j 2 ⎝ t t (6. (6.+j∆t ⎛ ∂ 2 e ⎞ (∆t ) 2 ⎛ ∂e ⎞ t + = ei . Most of the lengthy algebra is associated with the second time derivative in Eqs. j ⎝ ⎠i . The idea is straightforward.8).+j∆t ⎛ ∂ 2u ⎞ (∆t ) 2 ⎛ ∂u ⎞ t = ui .7) eit. j t t (6. j ⎠i . j + ⎜ ⎟ ∆t + ⎜ 2 ⎟ ⎜ ∂t ⎟ 2 ∂t ⎠i .Discussion on the technique • • • It has second order accuracy in both space and time.6) to (6. j 2 t t (6.6) vit.