Aurora Simulation via Fluid Dynamics

So fellow UAF CS professor Jon Genetti was trying to finish a visualization of the Aurora Borealis for the Hayden Planetarium in Manhattan. 

The tricky part about this is the complicated structure of the aurora's curtain:




I actually took these photos myself, right out my bedroom window in Fairbanks Alaska on the night of 2006/01/25.  You can view and download these aurora pictures here, and use them for any purpose.  There are a variety of good pictures on the web, including "hutch" from Alaska, and cool movies from Finnish all-sky cameras.

It's strange.  The aurora are just ionization glow, from a sheet of charged particles streaming into the upper atmosphere.  The shape of the aurora curtain is a totally deterministic function of the electromagnetic field in the upper atmosphere.  The only problem is that the electromagnetic field in the upper atmosphere is amazingly complicated--it's the result of an interaction between the Earth's magnetic field, the Sun's magnetic field, and the charged particles streaming away from the sun.  It's such a complex and highly coupled system--for example, the incoming charged particles are moved by the magnetic field, but the field is in turn affected by the particles--that the basic physics aren't even well understood.

So at the moment, we're stuck with simulating the effects of the aurora, rather than simulating the underlying physics--that is, we just "fake it".  This is a time-honoured technique in computer graphics!
Dr. Genetti and I had the idea for a two-phase aurora rendering process:
  1. First, we'd generate complicated, fuzzy 2D images of the aurora curtain bases.  Technically, these are 2D incoming electron intensity maps, wrapped around the Earth's surface. My idea was to do this by adding complexity to the curtains using a fluid dynamics simulator I'd been working on.
  2. Then, we'd extrude the base images up into 3D, and volume render.   Technically, this is simulating the deposition of the incoming electrons on the upper atmosphere, where they cause air molocules to fluorese.  Dr. Genetti has done tons of volume rendering, and has an awesome parallel software-raytracing volume renderer capable of handling gigantic volumes.
This page describes the first step--generating complicated intricate curtains in 2D.  For each frame of the animating aurora, I started with a set of spline curves that Bill Brody carefully prepared from a set of aurora expert Syun-Ichi Akasofu's sketches of a typical auroral substorm. The splines are an accurate picture of the overall auroral curtain's shape, and they move quite smoothly, but as simple linear features they were still missing the fractal complexity found in real auroral curtains.

My small contribution to the entire project was to add complexity to the original splines, by running a few steps of a little fluid dynamics solver along the lines of Jos Stam's work.  I convert the original splines into a glowing green dye field, as shown on the left below.  I also need a fluid velocity field, which I create by adding a "shear layer" along each spline--I set up the fluid moving fast in opposite directions along each spline, as shown in the center below.  Evolving under the equations of fluid dynamics, this shear layer immediately curls up into a variety of cool interacting vortices and eddies, as shown on the right below.   We then use this finished fluid simulation as the aurora 2D electron intensity, swept out into 3D as in step 2 above.  I should point out that for the next frame, we just start the process over again with the next frame's splines--nothing is reused between frames, and each frame's simulation is totally independent.

I ran the final simulations at 8192 by 2048 pixels, which only took a few hours for the 2,000 frames in our few minutes of footage. I then hand these images on to Dr. Genetti, who sweeps the volume into 3D and does the volume rendering.  Dr. Genetti also adds a bit of small-scale 3D turbulence, which helps capture sub-gridscale turbulence I can't efficiently simulate.  I'll try to post a shot of the finished product--it looks great!


Original Splines / Initial Conditions, frame 200

Velocity Field, frame 200.  Red is the X velocity, green is the Y velocity.  Middle gray means zero velocity.

Finished 2D Aurora / Advected Fluid, frame 200
Green corresponds to incoming electron density.

Original Splines / Initial Conditions, frame 201

Velocity Field, frame 201

Finished 2D Aurora / Advected Fluid, frame 201

The longer we evolve the fluid to generate the aurora, the more complicated and interesting the interacting vortices get.  However, evolving for too long has disadvantages.  First, if we run for thousands of steps numerical dissipation will eventually smooth out the initial curtains into a uniform dark green blur.  Second, the longer we evolve the system, the further we get from the original spline pattern, which may annoy an illustrator trying to control the process.  Finally, longer evolution amplifies the "butterfly effect", which leads to chaotic frame-to-frame variation.

The "butterfly effect" is the well-known phenomena whereby the flapping of a butterfly's wings in Tokyo affects the path of a hurricane in New York a week later--that is, small changes early on can have big effects later.  This happens in most fluid dynamics systems, and has the annoying effect of making a smooth set of initial conditions (the original splines) into a much choppier set of evolved fluid images.   That is, you can't get nice complicated eddies out of the physics without allowing it to move stuff around!  In general, most cool physics systems have the drawback that they're tough to control.  Since we're just trying to get by anyway, we have found reasonably good results using a simple weighted time average of adjacent simulation frames, in effect interpolating out the jerkiness that the physics added to our smoothly moving splines, while preserving most of the vortex structure.

Overall, I had a lot of fun illustrating the aurora this way, and I think our overall generation scheme achieves better results than previously described schemes.

Orion Sky Lawlor, 2005
Back to Orion's Projects.
Back to Orion's Home Page.