/WaterSimulation

[Complete] Smoothed Particle Hydrodynamics: simulation of water particles subject to gravity, viscosity, and pressure. Spatial hashing enabled. Boundary collisions handled.

Primary LanguageC++

This is an implementation of water simulation using SPH(smoothed particle hydrodynamics). Simplified Navier-Stokes theorem is used to compute acceleration at each time step and forward Eulerian integration to compute corresponding velocity and position.

The following are demo videos of the water simulation with low and high viscosity, respectively: https://youtu.be/TgGMLTFl2nM

https://youtu.be/a7vZs67Dcsw

Below is a screenshot of the demo: