PIC/FLIP fluid simulation

During the spring 2012, a fellow student and I took a course in advanced fluid simulation. It was held by two Ph.D’s in mathematics at Linköping University.

Since we had already implemented an Eulerian fluid, during our third year, we wanted to do something that would result in an improvement. The method of choice was a PIC/FLIP solver. Particles are used for the advection step, to propagate velocity, and the pressure is solved on a staggered grid. We use a PCG (preconditioned conjugate gradient) solver to do this.

We also looked more deeply into the surface reconstruction, and implemented a method, using anisotropic kernels, to get a smooth surface that keeps the smaller details of the fluid, such as splashes. This was based on an article written by Jihun Yu and Greg Turk that can be found here.

The result is a fluid that can be run well in real-time on a 64x32x32 grid with 200000 particles. Even with the particle number increased to about a million, the simulation still runs in a few fps. This time, the implementation was done completely on the CPU.