This is a SPH(Smoothed Particle Hydrodynamics) based fluid simulation where the position of each particle is updated on a frame by frame basis according to the Navier-Stokes equation of motion for fluids. The physics computations are done single threaded on the CPU and visualized via OpenGL.
-
Clone this repository
-
From the root of the repository,
xcopy res build\Release\res /E /I mkdir build cd build cmake -G "Visual Studio 17 2022" -A Win32 .. -
Navigate to /build and build the project using release build either in Visual Studio or in terminal via MSBuild.
-
Run build/release/main.exe
- Lots of numerically instable regimes in parameter space.
- Figure out GPU parallelization methods in order to improve framerate
- Background density parameter is incredibly buggy; particles experience clumping when background density is non zero.
- Clean up code
This project uses OpenGL abstraction classes from "The Cherno"'s tutorial series. Also, this paper by Müller et al. on the subject was a very helpful resource as well as this video from the Coding Adventure series by Sebastian Lague.