MacCormack Method
   HOME

TheInfoList



OR:

In
computational fluid dynamics Computational fluid dynamics (CFD) is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problems that involve fluid flows. Computers are used to perform the calculations required to simulate th ...
, the MacCormack method is a widely used discretization scheme for the numerical solution of
hyperbolic partial differential equation In mathematics, a hyperbolic partial differential equation of order n is a partial differential equation (PDE) that, roughly speaking, has a well-posed initial value problem for the first n-1 derivatives. More precisely, the Cauchy problem can be ...
s. This second-order
finite difference method In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time interval (if applicable) are di ...
was introduced by Robert W. MacCormack in 1969. The MacCormack method is elegant and easy to understand and program.


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 + a \frac = 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^) is estimated as follows : u_i^ = u_i^n - a \frac \left( u_^n - u_i^n \right) The above equation is obtained by replacing the spatial and temporal derivatives in the previous first order hyperbolic equation using
forward difference A finite difference is a mathematical expression of the form . If a finite difference is divided by , one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for the ...
s. Corrector step: In the corrector step, the predicted value u_i^ is corrected according to the equation : u_i^ = u_i^ - a \frac \left( u_i^ - u_^ \right) Note that the corrector step uses backward finite difference approximations for spatial derivative. 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^ term by the temporal average : u_i^ = \frac to obtain the corrector step as : u_i^ = \frac - a \frac \left( u_i^ - u_^ \right)


Some remarks

The MacCormack method is well suited for nonlinear equations (Inviscid
Burgers equation Burgers' equation or Bateman–Burgers equation is a fundamental partial differential equation and convection–diffusion equation occurring in various areas of applied mathematics, such as fluid mechanics, nonlinear acoustics, gas dynamics, and tr ...
,
Euler equations 200px, Leonhard Euler (1707–1783) In mathematics and physics, many topics are named in honor of Swiss mathematician Leonhard Euler (1707–1783), who made many important discoveries and innovations. Many of these items named after Euler include ...
, 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 The Lax–Wendroff method, named after Peter Lax and Burton Wendroff, is a numerical method for the solution of hyperbolic partial differential equations, based on finite difference A finite difference is a mathematical expression of the form . ...
.Tannehill, J. C., Anderson, D. A., and Pletcher, R. H., Computational Fluid Mechanics and Heat Transfer, 2nd ed., Taylor & Francis (1997). Unlike first-order
upwind scheme In computational physics, the term upwind scheme (sometimes advection scheme) ''typically'' refers to a class of numerical discretization methods for solving hyperbolic partial differential equations, in which so-called upstream variables are used ...
, the MacCormack does not introduce diffusive errors in the solution. However, it is known to introduce dispersive errors (
Gibbs phenomenon In mathematics, the Gibbs phenomenon, discovered by Available on-line at:National Chiao Tung University: Open Course Ware: Hewitt & Hewitt, 1979. and rediscovered by , is the oscillatory behavior of the Fourier series of a piecewise continuousl ...
) in the region where the gradient is high.


See also

*
Lax–Wendroff method The Lax–Wendroff method, named after Peter Lax and Burton Wendroff, is a numerical method for the solution of hyperbolic partial differential equations, based on finite difference A finite difference is a mathematical expression of the form . ...
*
Upwind scheme In computational physics, the term upwind scheme (sometimes advection scheme) ''typically'' refers to a class of numerical discretization methods for solving hyperbolic partial differential equations, in which so-called upstream variables are used ...
*
Hyperbolic partial differential equation In mathematics, a hyperbolic partial differential equation of order n is a partial differential equation (PDE) that, roughly speaking, has a well-posed initial value problem for the first n-1 derivatives. More precisely, the Cauchy problem can be ...
s


References

{{DEFAULTSORT:Maccormack Method Computational fluid dynamics Numerical differential equations