
Tsunami
For the semester project of the ETHZ course “Physically-based Simulation”, I have implemented a basic Smoothed Particle Hydrodynamics (SPH) fluid simulator. I have implemented simple 2D versions of the same algorithm in the past, but wanted to take it a step further during this project. The main objective has been to implement stable simulation of fluids consisting of millions of particles at reasonable performance. For simplicity and easier debugging, I opted for a CPU-only solution written in C++11. The following features have been implemented:
- Interactive GUI with basic OpenGL visualization
- JSON based scene description
- Wavefront OBJ support
- Index-sorted uniform grid for neighbour search
- WCSPH and PCISPH solvers
- PCISPH with adaptive time-stepping
- Boundaries using boundary particles
- Surface tension forces
- Fluid mesh generation using marching cubes
- Cache system to cache particles and meshes
- Render application using either OpenGL visualization or SmallLuxGPU4
Source code and additional information is available on GitHub.