1-d MUSCL Solver for the Shallow Water Equations

A conservative finite-volume (FV) implementation of the Saint Venant equations, also known as the shallow water equations (SWE).

https://github.com/wme7/ShallowWaterEquations

You are now following this Submission

Solves the one-dimensional shallow water equations (SWE) for any initial condition, such as a dam break scenario, using a second-order MUSCL-LF, MUSCL-Rusanov and MUSCL-HLL implementations. This snippet includes an exact solver for Riemann problems of the SWE.
As always, I intend this snippet to be readable and easy to study, especially for beginners in the CFD community.

Note that the example with topography is not completed yet. I'll come back later to update this example.

Happy coding! ;D

Cite As

Manuel A. Diaz (2026). 1-d MUSCL Solver for the Shallow Water Equations (https://github.com/wme7/ShallowWaterEquations), GitHub. Retrieved .

Acknowledgements

Inspired by: MUSCL-THINC-BVD and WENO5-THINC-BVD solvers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.0.1

Updated description

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.