Algorithms for Simulating Fluid Flow

Kristopher Johnson picture Kristopher Johnson · Jan 9, 2009 · Viewed 11.6k times · Source

I've got a game idea that requires some semi-realistic simulation of a fluid flowing around various objects. Think of a pool of mercury on an irregular surface that is being tilted in various directions.

This is for a game, so 100% physical realism is not necessary. What is most important is that the calculations can be done in real time on a device with the horsepower of an iPhone.

I'm thinking that some sort of cellular automaton or particle system is the way to go, but I don't know where to start.

Any suggestions?

Answer

MandyK picture MandyK · Jan 9, 2009

Lattice-Boltzmann methods are a pretty common way to simulate fluid in a discretised, cellular automaton-like way.

However, for the sake of real time performance on an iPhone, it may be more effective to simulate the fluid as a particle system and then work out a way to render the particles as a volumetric mass. I suspect this is the approach taken by games like Aqua Forest.