Wednesday, September 19, 2007

Fluid-like simulation (preliminary)

Existing fluid simulations based on solving the Navier-Stokes equations or its derivatives are slow algorithms. For games, we need something faster, perhaps at the cost of quantitative realism.

I aim to invent a simulation algorithm to satisfy these requirements:
  • Fast; must run in real-time
  • Scalable; i.e. O(N) or better
  • Qualitatively similar to real fluids
  • Simple to implement and modify
  • 3D
  • Interacts with other entities
  • Multiple immiscible fluids (e.g. water and air, including surface rendering)
  • Combustion
I will use an ad-hoc simulation using something akin to point vortices that interact with their nearest neighbors .

You can get more info from my website: http://www.fiea.ucf.edu/~mgourlay/Fluid/

Earlier this week I managed to create some preliminary results of a fluid-like simulation of something like a vortex ring moving through something like a fluid, including these features:
  • Nearest neighbor tracking
  • Particle rendering
  • Particle interaction

These simulations share in common with real fluids vortex self-advection due to nearest neighbors and vortex diffusion. Mathematically these properties differ from those of real fluids but qualitatively this simulation has those properties. As you can see from the simulations, the vortex ring does indeed propagate as you would expect from such a ring in a real fluid. The aggregate speed is probably wrong though.

These preliminary simulations lack a number of features present in actual fluid dynamics, including vortex stretching and tilting (important for cascading from laminar to turbulent flow), no-slip boundary conditions (necessary for generation of vorticity such as generating wakes and lift) and potential (i.e. irrotational) flow (necessary for bulk fluid motions such as occurs in shear flow far from the shear layer itself). The simulation code currently includes propagating long-range interactions. I intend to add the other features soon.

You can find some movies and more details here:

http://www.fiea.ucf.edu/~mgourlay/Fluid/2007sep17/

No comments: