MacCormack method

MacCormack method

In computational fluid dynamics, the MacCormack method is a widely used discretization scheme for the numerical solution of hyperbolic partial differential equations (hyperbolic PDEs). This second-order finite difference method is introduced by R. W. MacCormack in 1969. [MacCormack, R. W., The Effect of viscosity in hypervelocity impact cratering, AIAA Paper, 69-354 (1969).] The MacCormack method is very elegant and easy to understand and program. [Anderson, J. D., Jr., Computational Fluid Dynamics: The Basics with Applications, McGraw Hill (1994).]

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 one-dimensional linear wave 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 ight)It may be noted that the above equation is obtained by replacing the spatial and temporal derivatives in the wave 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}{2Delta x} left( u_i^{overline{n+1 - u_{i-1}^{overline{n+1 ight)Note that the predictor step uses backward finite difference approximations for both spatial and temporal derivatives. 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}{2Delta x} left( u_i^{overline{n+1 - u_{i-1}^{overline{n+1 ight)

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 scheme. [Tannehill, J. C., Anderson, D. A., and Pletcher, R. H., Computational Fluid Dynamics and Heat Transfer, 2nd ed., Taylor & Francis (1997).]

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.

See also

*Lax-Wendroff method
*Upwind scheme
*Hyperbolic partial differential equations

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Method of lines — The method of lines (MOL, NMOL, NUMOL) (Schiesser, 1991; Hamdi, et al., 2007; Schiesser, 2009 ) is a technique for solving partial differential equations (PDEs) in which all but one dimension is discretized. MOL allows standard, general purpose… …   Wikipedia

  • Spectral method — Spectral methods are a class of techniques used in applied mathematics and scientific computing to numerically solve certain Dynamical Systems, often involving the use of the Fast Fourier Transform. Where applicable, spectral methods have… …   Wikipedia

  • Crank–Nicolson method — In numerical analysis, the Crank–Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations.[1] It is a second order method in time, implicit in time, and is numerically …   Wikipedia

  • Multigrid method — Multigrid (MG) methods in numerical analysis are a group of algorithms for solving differential equations using a hierarchy of discretizations. They are an example of a class of techniques called multiresolution methods, very useful in (but not… …   Wikipedia

  • Schwarz alternating method — In mathematics, the Schwarz alternating method, named after Hermann Schwarz, is an iterative method to find the solution of a partial differential equations on a domain which is the union of two overlapping subdomains, by solving the equation on… …   Wikipedia

  • Collocation method — In mathematics, a collocation method is a method for the numerical solution of ordinary differential equations, partial differential equations and integral equations. The idea is to choose a finite dimensional space of candidate solutions… …   Wikipedia

  • Discontinuous Galerkin method — Discontinuous Galerkin methods (DG methods) in mathematics form a class of numerical methods for solving partial differential equations. They combine features of the finite element and the finite volume framework and have been successfully… …   Wikipedia

  • Neumann–Dirichlet method — In mathematics, the Neumann–Dirichlet method is a domain decomposition preconditioner which involves solving Neumann boundary value problem on one subdomain and Dirichlet boundary value problem on another, adjacent across the interface between… …   Wikipedia

  • Shock capturing methods — In computational fluid dynamics, shock capturing methods are a class of techniques for computing inviscid flows with shock waves. Computation of flow through shock waves is an extremely difficult task because such flows results in sharp,… …   Wikipedia

  • List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”