Divergence-Free SPH for Fluid Simulations in Computer Graphics

16 Jan 2017

This has been one of my largest projects yet, spanning over an entire semester. It was the main focus in a PhD course (TN1008) of Advanced simulation and visualization of fluids in computer graphics. The task was to recreate the result from Jan Bender et al. publication. See what it looks like!

The biggest issues we had was to get our pressure solver to work correctly and efficiently. Since the pressure force is dependant on a particle’s neighbours velocities and densities is a method for efficient sorting required. The difference with the method from Jan Bender et al. compared to other SPH fluid simulation methods is that two distinct solvers are to minimise the divergence and density error whereas most other methods uses only one. This allows for fast convergence which leads to fewer iterations.

The report discussing the method in depth can be found here and the code is available on github. There’s a released version with a guide on how to compile it, so go on and try it!