Showing posts with label computational fluid dynamics. Show all posts
Showing posts with label computational fluid dynamics. Show all posts

Sunday, August 2, 2009

Fluid Simulation for Video Games, part 2: Fluid Simulation Techniques

The second in a series of articles I wrote for Intel:

http://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-2/

...and related videos:

Atomic vortex ring
Cannonball through smoke
Dragons, bunnies and magic

Make sure to watch them in HD!

The third article will include the source code for a complete real-time fluid simulation with two-way fluid-body interaction.

Future articles will refine and speed up that simulation.

Friday, November 14, 2008

Airfoil with lift


Fluid flow past an airfoil.

Any ideas for how to use this in a game?

Maybe a puzzle game where you have to get a paper airplane to strike a target...?

Sunday, July 27, 2008

Vortex splitting



Vortices which separated now spawn new particles, maintaining a contiguous thread of them.
Have a look.

See you at SIGgraph.

Wednesday, June 25, 2008

Fluid simulation update: SIGgraph 2008 poster

SIGgraph 2008 accepted my poster and I've prepared source material for it. Jon Tran and Todd Deery are working on the actual poster and Jon's first few passes at it look great. I'll provide a link to the PDF when it's ready for public consumption.

Meanwhile here are some new movies.

Tuesday, April 29, 2008

Thursday, February 28, 2008

Tree-based far-field interactions

I added tree-based far-field interactions.



I provided two movies: pretty and nifty.



This diagram tries to explain how the influence algorithm works. Obviously I need to throw more words at that, which of course I will do in the near future. Stay tuned!

Wednesday, November 21, 2007

Merging, lighting and sorting


I added lighting to the fluid simulation.




This version also includes vortex merging and depth sorting so I can crank up the opacity, which makes the smoke look thicker, lets you get away with fewer particles and lets you see the detail more clearly.

Friday, November 16, 2007

Smoke and Mirrors



I found these results mesmerizing and I wondered about the etymology of that word so naturally I looked it up. The word comes from an 18th century French physician named Mesmer who concocted the notion of "animal magnetism" which (he conjectured) involved the flow of a mysterious magnetic fluid that supposedly flows through all beings.

Perhaps I'll name my fluid-like simulation "mesmeric fluid" because both his fluid and mine are fictional but captivating.

Some earlier results:

Wednesday, October 3, 2007

Fluid simulation, Atari 2600 programming

Fluid simulation update

I added more features to my fluid simulation. Follow the links to see movies:

I also submitted an abstract to GDC for 2008.

Atari 2600 Programming

I collect Atari games, consoles, controllers and other Atari-branded stuff from the 1970's and 1980's. I'm also beginning to program the 2600. Its CPU is a 6507 which has the same instruction set as the 6502 but has fewer address pins. Many computers from that era used the 6502 including other Atari consoles and computers (5200, 7800, 400, 800, etc.), Commodore computers and the original Nintendo (NES). It's the first CPU for which I learned assembly programming. The Atari retro development community is quite active and even now, around 30 years following its release, people continue to pioneer new ways to get more out of that console, e.g. higher image resolution. Each year at the Classic Gaming Expo people release several new games for the Atari 2600, and they usually sell out immediately.

I recently obtained a collection of EPROMs (which currently have Atari games burned onto them) and 2 modified Atari 2600 cartridges with ZIF sockets that fit these EPROMs. I put the chips into a conductive plastic container I got from Skycraft Surplus for $2. This gives the appearance I'm engaging in industrial espionage.

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/