Smoothed Particle Hydrodynamics

Smoothed Particle Hydrodynamics is a method for simulating fluid dynamics. It uses discrete particles to represent the water, each particle has a density, pressure and velocity. Each particle has a ‘Smoothing Kernel’ that describes its field of influence on other particles, this is then used with equations to calculate the density and pressure of each particle, the resultant velocity is then modified by a viscosity function to make the fluid act like water.

This project was also part of my Advanced Tech module for university and I wrote a simple DirectX renderer with Instanced rendering to allow it to draw lots of particles efficiently. The final prototype can simulate 64,000 particles at 30fps on the CPU.

Alt text