#jsDisabledContent { display:none; } My Account |  Register |  Help
 Flag as Inappropriate This article will be permanently flagged as inappropriate and made unaccessible to everyone. Are you certain this article is inappropriate?          Excessive Violence          Sexual Content          Political / Social Email this Article Email Address:

# MacCormack method

Article Id: WHEBN0015682905
Reproduction Date:

 Title: MacCormack method Author: World Heritage Encyclopedia Language: English Subject: Collection: Publisher: World Heritage Encyclopedia Publication Date:

### MacCormack method

In computational fluid dynamics, the MacCormack method is a widely used discretization scheme for the numerical solution of hyperbolic partial differential equations. This second-order finite difference method was introduced by Robert W. MacCormack in 1969.[1] The MacCormack method is elegant and easy to understand and program.[2]

## The algorithm

The MacCormack method is a variation of the two-step Lax–Wendroff scheme but is much simpler in application. To illustrate the algorithm, consider the following first order hyperbolic equation

\qquad \frac{\partial u}{\partial t} + a \frac{\partial u}{\partial x} = 0 .

The application of MacCormack method to the above equation proceeds in two steps; a predictor step which is followed by a corrector step.

Predictor step: In the predictor step, a "provisional" value of u at time level n+1 (denoted by u_i^{\overline{n+1}}) is estimated as follows

u_i^{\overline{n+1}} = u_i^n - a \frac{\Delta t}{\Delta x} \left( u_{i+1}^n - u_i^n \right)

It may be noted that the above equation is obtained by replacing the spatial and temporal derivatives in the previous first order hyperbolic equation using forward differences.

Corrector step: In the corrector step, the predicted value u_i^{\overline{n+1}} is corrected according to the equation

u_i^{n+1} = u_i^{n+1/2} - a \frac{\Delta t}{2\Delta x} \left( u_i^{\overline{n+1}} - u_{i-1}^{\overline{n+1}} \right)

Note that the corrector step uses backward finite difference approximations for spatial derivative. Note also that the time-step used in the corrector step is \Delta t/2 in contrast to the \Delta t used in the predictor step.

Replacing the u_i^{n+1/2} term by the temporal average

u_i^{n+1/2} = \frac{u_i^n + u_i^{\overline{n+1}}}{2}

to obtain the corrector step as

u_i^{n+1} = \frac{u_i^n + u_i^{\overline{n+1}}}{2} - a \frac{\Delta t}{2\Delta x} \left( u_i^{\overline{n+1}} - u_{i-1}^{\overline{n+1}} \right)

### Some remarks

The MacCormack method is well suited for nonlinear equations (Inviscid Burgers equation, Euler equations, etc.) The order of differencing can be reversed for the time step (i.e., forward/backward followed by backward/forward). For nonlinear equations, this procedure provides the best results. For linear equations, the MacCormack scheme is equivalent to the Lax–Wendroff method.[3]

Unlike first-order upwind scheme, the MacCormack does not introduce diffusive errors in the solution. However, it is known to introduce dispersive errors (Gibbs phenomenon) in the region where the gradient is high.

## References

1. ^ MacCormack, R. W., The Effect of viscosity in hypervelocity impact cratering, AIAA Paper, 69-354 (1969).
2. ^ Anderson, J. D., Jr., Computational Fluid Dynamics: The Basics with Applications, McGraw Hill (1994).
3. ^ Tannehill, J. C., Anderson, D. A., and Pletcher, R. H., Computational Fluid Dynamics and Heat Transfer, 2nd ed., Taylor & Francis (1997).
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.

Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.

By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.