{
  "id": "enwiki-001328722757",
  "slug": "maccormack-method",
  "title": "MacCormack method",
  "qid": "",
  "lead": "In computational fluid dynamics, the MacCormack method (/məˈkɔːrmæk ˈmɛθəd/) 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. The MacCormack method is elegant and easy to understand and program.",
  "body": "In computational fluid dynamics, the MacCormack method (/məˈkɔːrmæk ˈmɛθəd/) 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. The MacCormack method is elegant and easy to understand and program. \\frac{\\partial u}{\\partial t} + \\frac{\\partial f(u)}{\\partial x} = 0 To update this equation one timestep \\Delta t on a grid with spacing \\Delta x at grid cell i , the MacCormack method uses a \"predictor step\" and a \"corrector step\", given below \\begin{align} &u_i^p = u^n_i - \\frac{\\Delta t}{\\Delta x}\\left(f^n_{i+1} - f^n_i\\right) \\\\ &u^{n+1}_i = \\frac{1}{2}(u^n_i + u^p_i) - \\frac{\\Delta t}{2\\Delta x}(f^p_i - f^p_{i-1}) \\end{align} \\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^p ) is estimated as follows u_i^p = u_i^n - a \\frac{\\Delta t}{\\Delta x} \\left( u_{i+1}^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 differences. Corrector step: In the corrector step, the predicted value u_i^p 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^p - u_{i-1}^p \\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^{n+1/2} term by the temporal average u_i^{n+1/2} = \\frac{u_i^n + u_i^p}{2} to obtain the corrector step as u_i^{n+1} = \\frac{u_i^n + u_i^p}{2} - a \\frac{\\Delta t}{2\\Delta x} \\left( u_i^p - u_{i-1}^p \\right) ==References==",
  "categories": [
    "20480503",
    "23603337",
    "26220375",
    "26709307"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1328722757",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1766322557.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001328722757",
    "type": "webpage",
    "title": "MacCormack method",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/maccormack-method",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          15
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          15
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001328722757",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1328722757",
    "note": "Immutable snapshot enwiki-001328722757"
  }
}