2D Predictive-Corrective Smoothed Particle Hydrodynamics (SPH) implementation in Rust with WASM + WebGL
Since Github Pages does not support setting HTTP headers, this project is deployed on Netlify after building with Github Actions.
npm install rustup install nightly
Compile WASM, run webpack, and spawn a local server (note you might need to download additional rust-src, etc. with rustup)
npm run serve
This solver is not exactly PCISPH, but can be viewed as 1-iteration of SPH relaxation plus sub-stepping. The “prediction-relaxation” scheme of my implementation actually comes mainly from the (much easier to follow) paper "Particle-based Viscoelastic Fluid Simulation”, as opposed to "Predictive-Corrective Incompressible SPH”.