SPHM: a MATLAB package for Smoothed Particle Hydrodynamics simulations
Official code: MarcoSutti/SPHM (15 stars, MATLAB, GPL-3.0, last commit 2026-09-12).
Abstract
We present a MATLAB code that implements the Smoothed Particle Hydrodynamics (SPH) method. The paper reviews the continuous Navier-Stokes equations as well as their SPH approximation, adopting a coherent notation that allows to make easy reference to the code.
Show full abstractHide
The MATLAB implementation was heavily inspired by the earlier FORTRAN code of G. R. Liu and M. B. Liu, 2003. The code can be used for simple computational fluid dynamics simulations. Two classical benchmark problems are used to validate the algorithm: a one-dimensional shock tube and a two-dimensional shear cavity problem.