You are on page 1of 14

MacCormacks Techniques

Introduction

Original (1969) method is 2nd order accurate (both in space and time),
explicit method

It is a modified form of the Lax-Wendroff scheme, but is much simpler


in its applications

For purposes of illustration, we now again address the Euler equations.


Continuity

v

=
+u
+ + v
t
x
y
y
x

x momentum

u
u
v 1 p

= u
+v +

y momentum

v
v
v 1 p

= u + v +
t
y y
x

Energy

e
e
e p u p v

= + u +
+
t

(6.1)

(6.2)

(6.3)
(6.4)

General expression
The following expression shows how density for the next time level
is calculated using the calculated average value of the derivative

n +1
i


= +
t.........(6.13)
t avg
n
i

Similarly, relations for the other flow-field variables


n +1
i

u
= u + t.........(6.14)
t avg
n
i

v
vin +1 = vin + t.........(6.15)
t avg
n +1
i

e
= e + t.........(6.16)
t avg
n
i

Step 1: Predictor step

In continuity equation, replace the spatial derivatives on the righthand side with forward differences

t
t
t
t
t
u

i +1, j
i, j
i +1, j
i, j
t
t
(
=

+
u
i, j
i, j

x
x

i , j

+ it, j

vit+1, j vit, j
y

+ vit, j

it+1, j it, j
y

In above equation, all flow variables


at time t are known

Step 1: Predictor step

Predicted value from the first two terms of a Taylor series


t
= i , j +
t
t i , j
t

t
it,+
j

(6.18)

It is only first order accurate

Similar equations can be written for the predicted values of the


other variables
t
uit,+
j

u
= uit, j + t
t i , j

(6.19)

t
vit, +
j

v
= vit, j + t
t i , j

(6.20)

t
eit, +
j

e
= eit, j + t
t i , j

(6.21)

Step 2: Corrector step

We first obtain a predicted value of the time derivatives at time


t+t, by substituting the predicted value of , u, and v into the
right side of the continuity equation, replacing the spatial
derivative with rearward differences
t+ t

t i, j

= ( it,+j t
+ it,+j t

u it, +j t u it+1, jt
x

v i t, +j t v i t, +j 1t

( 6 .2 1)

+ u it, +j t

+ v i t, +j t

it,+j t it+1, tj
x

it,+j t it,+j 1t
y

Step 3: Average Value


Now find average value of the time derivative as

t avg

1
=
2

t i , j

t +t

t i , j

From Eq. (6.17) , predictor


t
uit+1, j uit, j
it+1, j it, j

t
t
+ ui , j
= ( i , j
x
x
t i , j

t
i, j

vit+1, j vit, j
y

+v

t
i, j

it+1, j it, j
y

(6.22)

From Eq. (6.21), corrector


t+ t

t i, j

= (
+

t+ t
i, j

t+ t
i, j

u it, +j t u it+1, jt
x

v i t, +j t v i t, +j 1t
y

+u

+ v

t+ t
i, j

t+ t
i, j

it,+j t it+1, tj
x

it,+j t it,+j 1t
y

Step 4: Value at time t+t


Corrected value of the density at time t+t

t
t AV
t

t
t
=
it,+

j
i, j +

The predictor-corrector sequence is repeated at all


grid points to obtain the density throughout the flow
field at time t+t.
We can use the same technique to calculate u,v, and
e at time t+t.

Summary of MacCormacks Technique

The method has a predictor step and a corrector step.

An average value of the time derivative is first calculated.

Average value of the time derivative are calculated by using a


predictor step and a corrector step.

Solution is advanced to the next time level using the average


value of the time derivative.

Both forward and backward differences are used for space


derivatives in calculating the average value of the time
derivative.
The reason is for second order accuracy.

Discussion on MacCormacks Technique


Because of using forward difference for the predictor and
backward difference for the corrector steps, the method
has 2nd order accuracy as the Lax-Wendroff method.
But it is much easier to apply, because there is no need
to evaluate the second time derivatives.
The MacCormacks technique can be used for solutions
of the unsteady N-S equations by means of timemarching solutions as we have done for solutions of
Euler equations.

Example
Problem
Investigate the subsonic compressible flow over the
Wotmann airfoil.
What are differences between laminar and turbulent
flow over this airfoil for Re= 100,000 ?

Governing equations
2-D N-S equations for viscous flow

Numerical technique
The MacCormacks technique

Example
Laminar flow & Turbulent flow

Fig 1.3

Example

Lift coefficient versus angle of attack for a Wormann airfoil


Re=100,000; M=0.5

The laminar flow value of


cl is not even close to the
experiment measurement

The turbulent value of cl is


in close agreement with
the experiment data.

Example

Drag coefficient versus angle of attack for a Wormann airfoil


Re=100,000; M=0.5

For the laminar flow value,


the agreement with
experiment is poor.

The turbulent value of cl is


in close agreement with
the experiment data.

You might also like