God, I hate most current videogames. None of them satisfy my primal need to destroy very large objects in a realistic manner. I spent most of the past week sick, so I decided to use my enforced free time to do something about it.
Turns out that there is enough information available on this Interweb thingy to reverse-engineer the hydrodynamic modeling programs used to simulate Big Things Go Boom physics. You know, shaped charges, nuclear weapons, meteor strikes, the origin of the Moon, et cetera.
It's kind of funny that books on game physics ignore this. There is a niche here to be filled, people!
So let's start large. Let's smash planets.

The simulation of celestial mechanics has been covered extensively in the popular programming literature already. Most often, masses are treated as point sources that "collide" when a minimum distance is reached, in order to prevent crazy numerical divergences. There are sophisticated techniques to get around this problem, for close manuevers and so on. But each planet is tracked individually.
This approach is sometimes called Lagrangian simulation. Each individual mass has its coordinates tracked through space, like a fly on a screen door. But there's another possibility, where each spot on the screen's grid has its mass tracked. This is called the Eulerian method.
Already one can sense a problem with the Eulerian approach: the number of spots on the grid to be analyzed goes up as the size of the volume one is interested in. If you want to see jets of debris extending millions of miles -- and who doesn't? -- you're a little out of luck.
State of the art planet-smashing programs use a modified Lagrangian approach. Planets are composed of bundles of 'kernels', where the mass of each kernel is already spread out over a volume by means of a clever hack. Originally, programs fuzzed the mass using a Gaussian bell curve, the same sort sometimes used to grade exams around an average. But the area under a bell curve is a little time consuming to calculate cleanly, which is why statistics textbooks still have enormous tables in back.
The first simulation of the single impact lunar formation theory -- roughly, another planet strikes the early Earth, and some of the debris consolidates to form the Moon -- published by Benz, Slattery and Cameron in 1986 in the journal

*Icarus*, used a slightly different method. There, the amount of mass in each kernel decayed exponentially from the kernel's center. This was much more mathematically tractable, though the math-savvy will see that a significant fraction of the kernel's mass must extend to infinity. More recent simulations make the math even simpler, using a smooth, quick-to-calculate curve called a spline, that has a sharp cut-off at the kernel's edge. Another simplification made in the original*Icarus*paper was to use only the hydrostatic (read: easy) part of the stress tensors in the calculations for the proto-Moon and the proto-Earth. Basically, this means the planets act as giant droplets of liquid. But, as the authors dryly note, "As long as the impact occurs at hypervelocity, shear strength is not important, at least during the impact and for some time afterwards". The treatment of the shock of impact is interesting. Turns out von Neumann and Richtmyer were looking into this in the 1940s, for what reasons I couldn't begin to imagine. "In the investigation of phenomena arising in the flow of a compressible liquid, it is frequently desirable to solve the equations of fluid motion by stepwise numerical procedures," by which Johnny here means computer programs, "but the work is usually severely complicated by the presence of shocks." To get around this problem, von Neumann and Richtmyer added a new, non-physical variable to spread the shock out over the sharp edge of impact. "Our idea is to introduce (artificial) dissipative terms into the equations so as to give the shocks a thickness comparable to (but preferably larger than) the spacing of the points of the network." These terms had the same mathematical form as the equations for viscosity, the thickness of a liquid, and so this is sometimes called the artificial viscosity. Last but not least, we need an equation to describe the behavior of materials under extreme conditions. For some things, the equation is easy. Even in the US, high school kids learn the ideal gas equation: P * V = n * R * T where P is the pressure of a gas, V the volume, n the number of moles (don't ask), R a constant, and T the absolute temperature. This can be tweaked to: P = (gamma - 1) * rho * E where rho is the density of the gas, E the internal energy, and gamma for an ideal gas exactly 5/3. It turns out you can use this for the Sun and only be a percent or two off. Of course, planets, even when they are simulated as giant droplets of liquid, don't behave like ideal gases. At least, of course, until they are vaporized by impact. Turns out a guy named Tillotson in 1962 hacked together a reasonably fast formula to deal with regular Joe solids that might suddenly vaporize. It was first published in a General Atomics report, I couldn't say why. Tillotson's formula comes in two parts, the first for when the internal energy of the material is less than the energy needed to begin vaporization (the cold part), and the second after the internal energy has passed the point of complete vaporization (the hot part). The cold part is: P =**a * rho * E**+ (b * rho * E / (E / (E_0 * eta ^ 2 + 1))) + A * mu + B * mu ^ 2 Apologies for the alphabet soup. P, rho, and E are as before; eta is the current density divided by the standard density; and mu is that number minus 1. E_0, a, b, A, and B are all material dependent constants. The hot part is somewhat worse: P =**a * rho * E**+ ((b * rho * E / (E / (E_0 * eta ^ 2 + 1))) + A * mu * exp(-beta * ((1 / eta) - 1)) * exp(-alpha * ((1 / eta) - 1) ^ 2) where alpha and beta are also material dependent constants that control how quickly the material begins to act like an ideal gas. Pressures in between are extrapolated linearly, easy enough. Note the parts I have put in bold. They're similar to the above equation for an ideal gas, no? Theoretically, a should be exactly 2/3. Observationally, for most materials, a = 0.5 works better. Also, some tweaking shows that A behaves very similar to a bulk modulus, so you can pull out a speed of sound = sqrt(A / the standard density). Still, most of these coefficients are a little difficult to calculate (or frankly, even to find). So I've compiled a list, taken mainly from Melosh's*Impact Cratering*. The current state of the art goes straight to the thermodynamic state variables, but perhaps some game designer or recreational programmer might find these of use. For aluminum, the standard density is 2700 kg per cubic meter, A 75.2 gigapascals, B 65 GPa, E_0 5 megajoules per kg, the energy of incipient vaporization 3.0 MJ/kg, the energy of complete vaporization 13.9 MJ/kg; a 0.5, b 1.63, alpha 5, and beta 5. For basalt, the standard density is 2700 kg/m^3, A 26.7 GPa, B 26.7 GPa, E_0 487 MJ/kg, the energy of incipient vaporization 4.72 MJ/kg, the energy of complete vaporization 18.2 MJ/kg; a 0.5, b 1.5, alpha 5, and beta 5. For granite, the standard density is 2680 kg/m^3, A 18 GPa, B 18 GPa, E_0 16 MJ/kg, the energy of incipient vaporization 3.5 MJ/kg, the energy of complete vaporization 18 MJ/kg; a 0.5, b 1.3, alpha 5, and beta 5. For iron, the standard density is 7800 kg/m^3, A 128 GPa, B 105 GPa, E_0 9.5 MJ/kg, the energy of incipient vaporization 2.4 MJ/kg, the energy of complete vaporization 8.67 MJ/kg; a 0.5, b 1.5, alpha 5, and beta 5. For limestone, the standard density is 2700 kg/m^3, A 40 GPa, B 67 GPa, E_0 10 MJ/kg, the energy of incipient vaporization 2.5 MJ/kg, the energy of complete vaporization 14 MJ/kg; a 0.5, b 0.6, alpha 5, and beta 5. For water ice, the standard density is 917 kg/m^3, A 9.47 GPa, B 9.47 GPa, E_0 10 MJ/kg, the energy of incipient vaporization 0.773 MJ/kg, the energy of complete vaporization 3.04 MJ/kg; a 0.3, b 0.1, alpha 10, and beta 5. (The B value for water ice is extrapolated; it possibly should be significantly higher. Also, note that a is low. This is due to the effects of molecular water. You'd expect this effect in ammonia or methane ice as well.) Alas, I don't have any values on hand for exotic materials like diamond or metallic hydrogen (the latter, I am not sure if anyone does), so smashing open Jupiter is a little difficult. But smashing terrestrial planets open, or even colliding stars, should be well within the reach of current videogame platforms. L.B. Lucy in 1977 simulated a protostar spinning apart with 300 particles in four minutes on an IBM 360. Benz, Slattery and Cameron used 2048 particles in their lunar impact simulation less than a decade later. Surely Moore's Law has caught up to the point where this could be done on an Xbox or a Play Station?
Metallic Hydrogen Properties: (paired metal)

Electronic energy band gap: 15 eV - uncompressed insulator

Electronic energy band gap: 0.3 eV - Metal @ 4000� K and 1.4 Mega-atmospheres (Matm)

Electrical Resistivity: ~0 ohm*m - Type II Superconductor @ 4000� K and 1.4 Mega-atmospheres (Matm)

Standard Density: 2696.487 kg*m^-3 (2.696 g*cc^-1)

Metallic Density: 24268.3899 kg*m^-3 @ 4000� K (24.268 g*cc^-1)

Tensile Strength: ~40-50 kg*mm^-2 @ 4000� K

Propellant Efficiency: 5*liquid H2/O2

Incipient vaporization: ???

Complete vaporization: ???

What can be learned from Shoemaker-Levy 9 ?

Posted by: Larry | December 26, 2004 at 06:53 AM

Hi Larry! Thanks for the data. Unfortunately, none of the waves detected when Shoemaker-Levy hit Jupiter seem to correspond to deep seismic waves, which is a shame.

Posted by: Carlos | December 26, 2004 at 04:54 PM

I love you, man.

Doug M.

Posted by: douglas | December 26, 2004 at 10:49 PM

Hey Doug, is there something going on between you and my husband? Or is it Carlos that you love? Or both of them? As for the post -- EEEK! I barely passed basic physics and calculus. My eyes were crossed...

Natalie

Posted by: Natalie | December 27, 2004 at 05:19 AM

Very cool, dude.

Quick, Robin, to the MATLAB!

Posted by: Bernard Guerrero | December 27, 2004 at 03:34 PM

Since I begin to expect a birthday present in 2029 for which these calculations are pertinent, I'm pleased to see thought going into it.

Posted by: Pouncer | December 27, 2004 at 07:30 PM

Pouncer, here are some sadly recently applicable equations:

For impacts in deep water r kilometers away, the wave height is roughly equal to 6.5 meters * (1000 km / r) * (the yield of impact in gigatons) ^ 0.54

For impacts in shallow water, the wave height is roughly equal to 1450 meters * (the depth of water / the distance away in the same units) * (the yield of impact in gigatons) ^ 0.25

The maximum wave run-in is roughly 1 kilometer * (the wave height / 10 meters) ^ (4/3)

Remind me to write about Vrancea before it becomes pertinent.

C.

Posted by: Carlos | December 27, 2004 at 10:42 PM

By George, Carlos, you've given me an Idea. Not ripping moons apart, as fun as that would be. But all this got me thinking...

Posted by: Bernard Guerrero | December 28, 2004 at 01:36 PM

Problem is, Bernard, a 1% difference in (say) the hydrodynamic balance for the Sun would cause it to collapse in less than an hour. I don't think the US has _ever_ had that level of accuracy in its balance of payments accounts.

Posted by: Carlos | December 29, 2004 at 12:43 AM

Very minor quibble: In the second equation, gamma is exactly equal to 5/3 in the case of a *monatomic* ideal gas (i.e. ok for the sun, not for the earth's atmosphere.)

Posted by: Robert | December 29, 2004 at 01:28 AM

Ah, good catch!

A little more on gamma: it's exactly 7/5 for an ideal diatomic gas -- and pretty close to that for air, not that the Earth's atmosphere is going to show up at this level of resolution -- and gets closer to one as the gas molecule gets more complex. (Not that I need to tell Robert this.)

I gather it's part of the reason that the state of the art has moved away from Tillotson to Sandia's ANEOS (ANalytic Equations Of State) and M-ANEOS programs (molecular ANEOS, insert Hands of Fate reference here).

C.

Posted by: Carlos | December 30, 2004 at 03:12 AM

and what's more... it is art.

http://www.evelynrosenberg.com/process.html

Posted by: dennis | January 01, 2005 at 04:08 PM