I am created Shiva, destroyer of worlds

Contributed by
Mar 1, 2010
<?xml encoding="utf-8" ?>

This is totally cool: an animated simulator that lets you make model solar systems! It's put together by the PhET Interactive Simulations group at -- hey! -- the University of Colorado at Boulder.

All you have to do is put in the masses, locations, and initial velocities of the objects (up to four) and then hit "go". What you'll probably find is that for almost any parameters you use, you won't get a stable system. You'll fling off the tiny moon, or drop a planet into the star, or collide two planets (when you do, one survives after a brief comical flash). There are preset conditions that will put together a stable simulation, so I suggest you start there and then tweak the numbers. The most fun thing is to fiddle with the mass and see what happens.

mysolarsystem

You'll note a slider that says Accurate vs. Fast. That has to do with bin size. Basically, a simulation like this calculates the force of gravity of each object on every other object using Newton's law. But it needs a time interval to do this: where will all the objects be after some period of time? You can pick that time step, but the smaller the time step the more accurate it will be. That's because gravity works continuously. If you take the Earth's current position and velocity and ask where it will be a year from now by just adding a year to the program, it'll extrapolate the Earth's current velocity direction! The program will take that velocity (about 30 km/sec) and multiply it by one year, and get a distance of about a billion kilometers. It'll then place the Earth there. But that's not right, because the Earth orbits the Sun; the Sun's gravity is continuously changing the direction of Earth's motion. So the smaller the time step, the more accurate the program will be.

At least, I think that's what's going on here. I've fiddled with programs like this before, and that's what I've found. Roundoff error can be bad too; because the program can't do the calculations exactly -- the decimal value has to cut off somewhere -- every step has a little bit of error in it. That adds up, and after a few orbits things can go wonky. This one does a pretty good job of that, it looks like.

Anyway, go play god with your very own cosmic erector set. It's fun, and before you know it a long time will have passed... but you might get a feel for orbital mechanics. It's worth it.