Lax Wendroff 1D Burgers
Simple implementation of the Taylor-Galerkin discretization for the 1D Burgers equation, which reduces to the Lax-Wendroff scheme when the element size is constant. Description of derivation included. For a practical usage, run a coarse mesh/time-step size combination and, based on the max(abs(u)), re-estimate dt using a finer mesh and CFL = 0.8. Although a higher value is technically more accurate, in practise the spurious oscillations (typical of LW scheme for hyperbolic conservation) impose and additional, hard-to-predict penalty on stability. Implementation of a "real" viscous term helps controlling the oscillations, but imposes another restriction on mesh/time-step size ratio (B = u_max*((dt^2)/(dx^2)) ). Remark that, even with oscillating solution near discontinuities, it is still better at capturing shocks than 1st order upwinding methods.
Cite As
Lucas Gasparino (2026). Lax Wendroff 1D Burgers (https://www.mathworks.com/matlabcentral/fileexchange/66642-lax-wendroff-1d-burgers), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
