Fluid Simulation Improvements

Over the last few weeks/months? I’ve a lot of my research has dragged me back to the mathematical hell of SPH fluid simulations. Inevitably leading to rather reluctantly writing my 3rd fluid simulation from scratch. However this year around I went about things differently (#NewYearNewMe) and actually learnt a lot about where I had been going wrong in the past. In fact after the completion of this simulation I had been enlightened to original simulation which is nothing short of an abomination. After the though of this haunting me for a few weeks I have finally got around to rectifying the mistakes to make this simulation something slightly closer to an acceptable release.

As usual here is a video, sorry if it drags out a little too much I got a bit carried away. I’ve put some upbeat music over the top to hopefully keep you entertained (Its Mr Probz “Waves” get it cos its a water simulation! XD )

 

Code

This demo has all pressure, viscosity and surface tension forces implemented however there are still improvements that can be made to this. You may notice that the blurring of the normals to make the implicit fluid surface isn’t perfect and still looks very spherical. Furthermore shadows I think would be pretty fun to implement however at the moment as you may see I have no floor to project these onto. Finally there are always improvements that can be made to the performance of the simulation. The next step is to abuse shared memory of blocks to store our particles in.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s