This is my first draft of a particle based fluid simulation implemented using CUDA.

It displays 2 non-mixing liquids with different densities, lets say oil (yellow) and water (blue). From time to time I apply some push-force somewhere in the scene to cause some action. You can see pressure waves running through the fluid, waves and breakers appearing at the surface as well as drops and filaments forming and other surface tension effects.

The simulation consists of 65536 particles and each of it interacts only with its local neighborhood. By exchanging appropriate forces all of them together will form the fluid. All the phenomena written above are not programmed explicitly, but emerge from local particle/particle interactions. The simulation runs at 60 fps on a GeForce285GTX.

The video plays back at half tempo because it is set up to 30fps where the original rendering was 60fps.

My plan is to add (particle based) rigid bodies as well and to perform finite element analysis on them so they can break apart if external forces exceed the bonding forces.

« »