SPH Fluid Simulator

This is a fluid simulation project I built for UCSD's CSE 291 course in Physics Simulation. I wrote an entirely GPU-based smoothed-particle hydrodynamics (SPH) solver, then rendered some results using an early version of Dino GPU. My solver is written in C++, and uses CUDA for simulation and meshing, and OpenGL for the interactive viewer.

Features

Interactive Viewer

The interactive viewer lets you watch the simulation unfold in real-time with a controllable camera. Properties such as physics framerate, gravity, and viscosity can be modified and take immediate effect in the simulation. The video below shows a demo of the viewer running on a GeForce 1060 GPU. On a more powerful GeForce RTX 2080 GPU, I achieved consistent 60 FPS simulation and display for up to 1 million particles.