Sei sulla pagina 1di 13
The Lax-Wendroff Technique
Introduction
• What a kind of techniques is it ?
– The Lax-Wendroff techniques is an explicit,
finite-difference method particularly suited to
marching solutions.
• A brief review on the marching problems
– Hyperbolic and parabolic partial differential
equations
Introduction
An example of hyperbolic equations
The time-marching solution of an invicid flow using the
unsteady Euler equations (2D).
ρ
⎛ ∂ u
ρ
∂ v
∂ ⎞
ρ
Continuity
=− ⎜
ρ
+ u
+
ρ
+ v
(6.1)
t
x
x
∂ y
y
u
⎛ ∂ u
∂ v
1 ∂
p
x momentum
=− ⎜ u
+ v
+
(6.2)
t
x
∂ y
ρ
x
v
⎛ ∂ v
∂ v
1 ∂
p
y momentum
=− ⎜ u
+ v
+
(6.3)
t
∂ x ∂ y
ρ
y
e
⎛ ∂ e
e
p ∂ u
p ∂ v ⎞
Energy
=− ⎜
ρ
+ u
+
+
(6.4)
t
x
y
ρ
x
ρ
y
Procedure
• Predict the the value of the variables at next time step
based on a Taylor series expansion.
• Choose density ρ for purposes of illustration
t
t
2
⎛ ∂ ⎞
ρ
ρ
(
∆ t
) 2
t
+∆ t
t
ρ
=
ρ
+ ⎜
∆+ t
+
(6.5)
i
, j
i , j
⎛ ⎜ ⎜ ∂
2
t
t
2
i , j
⎝ i , j
Procedure
Analogous Taylor series are written for all the other
dependent variables.
t
t
2
∂ u ⎞
∂ u ⎞ ( ∆ t
) 2
t
+∆ t
t
u
= u
+ ⎜
∆+ t ⎜
+
i
, j
i , j
2
(6.6)
t
t
2
i
, j
i , j
t
t
2
∂ v ⎞
∂ v ⎞ ∆ t
(
) 2
t
+∆ t
t
v
= v
+
∆+ t ⎜
+
(6.7)
i
, j
i , j
2
t
t
2
i
, j
i
, j
t
t
2
∂ e ⎞
∂ e ⎞ ∆ t
(
) 2
t
+∆ t
t
e
= e
+
∆+ t ⎜
+
(6.8)
i
, j
i , j
2
t
t
2
i
, j
i
, j
Procedure
t
t
2
⎛ ∂ ⎞
ρ
ρ
(
∆ t
) 2
t
+∆ t
t
ρ
=
ρ
+ ⎜
∆+ t
⎛ ⎜ ∂
+
i
, j
i , j
2
t
t
2
i , j
i , j
• A number for (∂ρ/∂t) is obtained from the continuity
equation, Eq. (6.1)
• The spatial derivative are given by second-order
central differences
t
t
t
t
t
⎛ ∂ ⎞
ρ
u
u
ρ
ρ
(
t
i
+
1,
j
i
1,
j
t
i
+
1,
j
i − 1, j
⎟ =−
ρ
+ u
i , j
i , j
t
2
x
2 ∆ x
i , j
(6.9)
t
t
t
t
v
v
ρ
ρ
t
i
+
1,
j
i
1,
j
t
i
+
1,
j
i − 1, j
+
ρ
+ u
)
i , j
i , j
2
y
2 ∆ y
Procedure
t
t
2
⎛ ∂ ⎞
ρ
ρ
(
∆ t
) 2
t
+∆ t
t
ρ
=
ρ
+ ⎜
∆+ t
⎛ ⎜ ∂
+
i
, j
i , j
2
t
t
2
i , j
i , j
Differentiate Eq. (6.1) with respect to time
2
2
2
2
2
ρ
∂ u ∂ u ∂
ρ
ρ
∂ ∂ u
ρ
∂ v ∂ v ∂
ρ
ρ
∂ ∂ v
ρ
=−
ρ
+
+ u
+
+
ρ
+
+ v
+
2
∂ t
∂∂ x t
∂ x ∂ t
∂∂ x t
x ∂ t
∂∂ y t
∂ y ∂ t
∂∂ y t ∂ y
∂ t
The mixed derivative is found by differentiating Eq.(6.2) with
respect to x
2
2
2
2
2
∂ u
u ⎛ ∂ u ⎞
∂ u
∂ u ∂ v
1
∂ p
1 ∂ p ∂
ρ
=− u
+ ⎜
+ v
+
+
2
2
2
∂∂ x t
x
x
∂∂ x y
∂ y ∂ x
ρ
x
ρ
∂ x ∂ x
Procedure
2
2
2
2
2
∂ u
u ⎛ ∂ u ⎞
∂ u
∂ u ∂ v
1
∂ p
1 ∂ p ∂
ρ
=− u
+ ⎜
+ v
+
+
2
2
2
∂∂ x t
x
x
∂∂ x y
∂ y ∂ x
ρ
x
ρ
∂ x ∂ x
Second-order, centered finite-difference quotients at time t
t
t
t
t
t
t
2
⎛ ⎜ ∂ u ⎞
u
− 2
u
+
u
u
u
t
i
+
1,
j
i , j
i
1,
j
i
+
1,
j
i − 1, j
2
⎟ =− u
+ (
)
i , j
2
⎝ ⎜ ∂∂ x t
(
∆ x )
2
∆ x
i , j
t
t
t
t
t
t
t
t
u
+
u
u
+
u
u
u
v
v
t
i
+
1,
j
+
1
i
1,
j
1
i
1,
j
+
1
i
+
1,
j
1
i , j
+
1
i , j
1
i
+
1,
j
i − 1, j
+ v
+
i , j
4(
∆ ∆
x
)(
y
)
2
y
2 ∆ x
t
t
t
t
t
t
t
1
p
− 2
p
+
p
1
p
p
ρ
ρ
i
+
1,
j
i , j
i
1,
j
i
+
1,
j
i
1,
j
i
+
1,
j
i − 1, j
+
t
2
t
2
ρ
(
∆ x )
(
ρ
)
2
∆ x
2 ∆
x
i , j
i , j
Procedure
2
2
2 ρ
∂ u ∂ u ∂
ρ
∂ 2
ρ
∂ ∂ u
ρ
∂ v ∂ v ∂
ρ
∂ 2
ρ
∂ ∂ v
ρ
=−
ρ
∂∂ x t
+
+ u
+
+
ρ
∂∂ y t
+
+ v
+
2
∂ t
∂ x ∂ t
∂∂ x t
∂ x ∂ t
∂ y ∂ t
∂∂ y t ∂ y
∂ t
• A number for ∂ 2 ρ/ (∂x∂t) is found by differentiating Eq.(6.1) with respect
to x and replacing all derivatives on the right side with second-order
central differences, analogous to the form of ∂ 2 u/ (∂x∂t).
• A number for ∂ 2 v/ (∂y∂t) is found by differentiating Eq.(6.3) with respect
to x with respect to x and replacing all derivatives on the right side with
second-order central differences.
• A number for ∂ 2 ρ/ (∂y∂t) is found by differentiating Eq.(6.1) with respect
to y and replacing all derivatives on the right side with second-order
central differences.
Procedure
2
2
2
2
2
ρ
∂ u ∂ u ∂
ρ
ρ
∂ ∂ u
ρ
∂ v ∂ v ∂
ρ
ρ
∂ ∂ v
ρ
=−
ρ
+
+ u
+
+
ρ
+
+ v
+
2
∂ t
∂∂ x t
∂ x ∂ t
∂∂ x t
x ∂ t
∂∂ y t
∂ y ∂ t
∂∂ y t ∂ y
∂ t
The remaining derivatives are first spatial derivatives, namely, ∂u/∂x,
∂v/∂y,,∂ρ/∂x,and ∂ρ/∂y,replaced by second-order central differences
t
⎛ ∂ u ⎞
u
+
u
i
+
1,
j
i
1,
j
=
x
2
∆ x
i , j
• The other remaining derivatives are first time derivatives, ∂ρ/∂t, ∂u/∂t,
and ∂v/∂t.
• ∂ρ/∂t has already been obtained from (6.9)
• ∂u/∂t, and ∂v/∂t can be obtained, analogous to the form of ∂ρ/∂t
Procedure
t
t
2
⎛ ∂ ⎞
ρ
ρ
(
∆ t
) 2
t
+∆ t
t
ρ
=
ρ
+ ⎜
∆+ t
+
i
, j
i , j
⎛ ⎜ ⎜ ∂
2
t
t
2
i , j
⎝ i , j
• We now have known values at time t for all three terms
on the right side of the above equation.
• This allows the calculation of density at time t+∆t.
• Repeat the above procedures to find the remaining
flow-field variables at grid point (i,j) at time t+∆t.
The essence of the Lax-Wendroff method
Obtain explicitly the flow-field variables at grid point (i,j) at time t+∆t
from the known flow-field variables at grid points (i,j), (I+1,j), (I-1,j),
and (i,j+1) at time t.
Discussion on the technique
• It has second order accuracy in both space and time.
• The idea is straightforward, but algebra is lengthy.
• Most of the lengthy algebra is associated with the second time
derivative in Eqs. (6.6) to (6.8).
t
t
2
⎛ ∂ u ⎞
(
t
) 2
t
+∆
t
t
u
= u + ⎜ ⎛ ∂ u ⎞
∆+ t ⎜
+
(6.6)
i
, j
i , j
2
t
t
2
i , j
i , j
t
t
2
⎛ ∂ v ⎞
⎛ ∂ v ⎞
(
t
) 2
t
+∆
t
t
v
=
v
+
∆+ t ⎜
+
(6.7)
i
, j
i , j
2
t
t
2
i , j
i , j
t
t
2
⎛ ∂ e ⎞
⎛ ∂ e ⎞
(
t
) 2
t
+∆ t
t
e
=
e
+
∆+ t ⎜
+
(6.8)
i
, j
i , j
2
t
t
2
i , j
i , j
Much of this algebra can be cut by MacCormack’s techniques