Fluid dynamics is the study of fluids in motion. Simulating the interactions of gas and liquid in motion is a highly processor intensive task requiring many iterations of thousands of calculations.
It is impossible to research fluid dynamics without hearing the name Jos Stam, the principle scientist at Autodesk (and winner of Academy Award for his work on subdivision surfaces).
The example above is an implementation of Jos Stams Real-Time Fluid Dynamics for Games paper. It utilizes an 80×80 grid and is pure AS3 (no Alchemy or Pixel Bender). To achieve a decent framerate at that grid size certain liberties had to be taken with the algorithm. For example by assuming both diffuse and viscosity are 0 many of the calculations can be simplified.
The multiple iterations per frame step were also removed as with this type of soft smoke/cloud effect they are not necessary for a satisfactory result On top of that I have optimized as much as possible, for example I was able to remove a good 80% of multiplication’s from the original paper.
Next step, Pixel Bender and/or Alchemy…
Anton Volkov
I like your experiments! Thank you.
Did you see another fluid-demo? http://blog.inspirit.ru/?p=339
Oct 05, 2009 @ 6:31 pm
Ben
@Anton thanks! I did indeed, it’s linked at the end of this post!
Oct 05, 2009 @ 6:44 pm
Eugene
Nice Work!
and you linked the pure AS3 coded one.
BTW @Anton linked Alchemy version of Fluids
Oct 06, 2009 @ 5:55 am
Ben
@Eugene thanks! I love the particles in your solver! I added a link to the Alchemy version.
Oct 06, 2009 @ 10:48 am