Moved: this study now lives in juw12/cfd-wave-schemes, together with its sister scheme, a tested Python port and a side-by-side comparison. This repo is archived.
The explicit MacCormack scheme for 1-D wave propagation.
A computational fluid dynamics study of a predictor-corrector scheme, with plotted results.
See it in action · Highlights · More by juw12
|
Predictor-corrector A second-order explicit scheme for the 1-D wave equation. |
Plotted results Solutions at several time levels, plotted with Gnuplot. |
Compare schemes Pairs with the Upwind Differencing study. |

Explicit MacCormack Method in use
The one dimensional wave propagation equation is given by
where the initial conditions are to be stated by

Dx is fixed to a value of 0.01, while u’s and dt’s values are given by 0.09 and 0.01
The solution by the explicit two step predictor-corrector Maccormack method is to be given by the equations below.
where the scheme is nonlinear for C ≤1, having an order of accuracy of [(∆𝑡)^2,(∆𝑥)^2].
Released under the MIT License © 2026 Juwen Lie. Contributions are welcome under the same license; see the contributing guide and Code of Conduct.




