maccormack
TRANSCRIPT
-
8/11/2019 Maccormack
1/2
CHMLTECH 501 Computational Fluid Dynamics
MacCormacks Method
MacCormacks method, first introduced in 1969. It is the most popular explicit finite-difference method for solving fluid flows. It is closely related to the Lax-Wendroff method,but is easier to apply. Let us use the same nozzle problem, figure (1).
Figure 1: Subsonic-supersonic isentropic flow through a convergent-divergent nozzle.
MacCormacks method, like the Lax-Wendroff method, is based on a Taylors series
expansion in time. Let us consider the density at grid point i,
t+ti =ti+
t
ave
t (1)
Equation (1) is a truncated Taylors series that looks first-order accurater, however,t
ave
is an average time derivative taken between time t and t+ t. this derivative is evaluatedin such a fashion that the calculation oft+ti from Equation (1) becomes second-order ac-curate. The average time derivative inEquation(1) is evaluated from a predictor-correctorphilosophy as follows.
Predictor stepContinuity equation,
t =
1
Au
A
x u
x
u
x (2)
In Equation (2), calculate the spatial derivatives from the known flow field values attime t using forward differences. That is, from Equation (2),
t
ti
= 1
Atiu
ti
Ai+1 Ai
x
uti
ti+1
ti
x
ti
uti+1 u
ti
x
(3)
1
-
8/11/2019 Maccormack
2/2
Obtain a predictedvalue of density, t+ti , from the first two terms of a Taylors series, asfollows
t+ti =ti+
t
ti
t (4)
In Equation (4), ti is known, andt
t
iis a known number from Equation (3); hence,
t+ti is readily obtained. ina similar fashion, from the momentum and energy eqautions,predicted values of the other flow variables such as ut+ti , e
t+ti , etc. are obtained.
Corrector step
Here, we first obtain a predicted value of the time derivative,t
t+ti
, by substituting the
predictedvalues ofut+ti , t+ti , etc. into Equation (2), usingrearward differences.
t
t+ti
=
1At+ti u
t+ti
Ai
Ai1
x
ut+ti
t+ti
t+ti1
x
t+ti
ut+ti u
t+ti1
x
(5)
Now calculate the average time derivative as the arithmetic mean between Equation (3)and (5), i.e.
t
ave
=12
t
t
i
+t
t+
t
i
(6)
where numbers for the two terms on the right-hand side of Equation (6) come from Equation(3) and (5) respectively. Finally, we obtain the correctedvalue oft+ti from Equation (1),repeated below:
t+ti =ti+
t
ave
t (7)
The above predictor-corrector approach is carried out for all grid points throughout thenozzle, and is applied simultaneously to the momentum and energy equations in order to
generateut+ti ,et+ti . In this fashion, the flow field through the entire nozzle at timet+ tis calculated. This is repeated for a large number of time steps until the steady state isachieved.
2