Lately I’ve been playing around (again) with a very interesting program called Gravity Simulator. I’ve been using it on and off for the past four years or so, and it’s proved to be a very useful tool for worldbuilding.
Gravity Simulator is a Windows-based program that allows you to create celestial objects orbiting eachother and see what happens to their orbits under the influence of gravity. You can create planets orbiting stars, satellites orbiting planets, and even asteroid belts – if it can orbit something, it can be made to work here. The algorithms used in the program don’t quite account for everything (for example, the change in orbit caused the transfer of angular momentum between two bodies by tidal forces is not calculated), but the results are still very accurate.
The good points are that it’s a very powerful orbital modelling tool, and known phenomena such as orbital resonances and the Kozai mechanism (where a planet’s eccentricity can be increased by interactions with a nearby massive object in an inclined orbit) have been known to naturally come out of the simulations. It can also output to a data file that you can then use to plot graphs of parameters using Excel (e.g. semimajor axis vs time), and can output screenshots too so that you can make animations if you have movie-making software.
To create a system, you just enter the mass and orbital parameters for all the objects and then set it going – you can even create entire asteroid belts by getting it to create many objects with a range of parameters that you specify (though the more objects you have, the more processing is required which obviously slows things down). The program uses a ‘timestep’ system, in which it recalculates everything once per timestep – a smaller timestep means that the resolution of the interactions is higher and they are more accurate as a result, but the downside is that it takes longer to do the calculations. If the timestep is set too large however then the accuracy can be compromised – so the trick is to find a value that is a balance between processing speed and accuracy, which varies depending on what you’re looking at. If you do it right though, you can run a simulation for hundreds of thousands (or millions) of years of simulated time if your system is left running for long enough. This literally brings stuff that formerly was done on supercomputers into the hands of desktop users!
To show off a bit, here’s a relatively basic example of a sim I made – 10 closely spaced planets the same size and mass as Earth, separated by 0.1 AU between 1 and 2 AU from the sun. This is what happens when the system is left to run for 175000 years (every second of video corresponds to the passage of 747 years of simulated time) – all of the action is in the first 2:50 mins of the video, after that nothing much happens other than a bit of precession of the remaining orbits. The planets start off in circular orbits but then they start to get unstable and individual worlds eventually start making close approaches to eachother, which really disrupts their orbits. This one has it all – orbital precession, collisions, and planets thrown into very eccentric orbits! At the end of the run, only four planets are left, and I suspect that if I’d left it running for longer one or two of those might eventually be lost too.
There’s a good discussion forum for it too, and the author of the program is there quite often and is very helpful. Being a rather specialised program, only a handful of people post to the forums on a regular basis (I am one of them – I post there as “EDG”) but there’s a lot of interesting material posted there (especially by frankuitaalst, who posts a lot of very interesting animations and graphs of resonances). I’ve done some investigations myself of the Kozai mechanism, and used the program to track the evolution of asteroid orbits while a star loses mass as it changes from red giant to white dwarf.
This is why I think Gravity Simulator is so great – it’s an excellent tool for curiosity-driven science (the best kind of science, I think!). I know that more often than not I didn’t have a clue what the result would be when I started running my simulations, and it’s really fun to see how a complex system turns out. As a result, it’s fantastically educational too.
The downside is that the program is a little fiddly to use, and it’s probably going to be a bit scary at first if you haven’t had any previous experience with orbital dynamics. There are example simulations that you can download from the gravity simulator website though, and you can find the Tutorial/Help File there too which explains how everything works (you can also access this page through the Help menu in the program). Plus you can always ask for help on the forums if you’re stuck!
Another thing to be aware of is that the version of the program that you can download from the website via the download page there is somewhat old – once you’ve installed it from there, you should grab the latest beta of the executable from the forums, copy that into the folder you installed it to, and use that as the executable instead. This adds some very handy functionality, including the ability to create new objects with a range of values (handy for asteroid belts) and to dynamically vary the timestep so that it slows down when objects get close enough to gravitationally interact.
Overall, Gravity Simulator is a great educational tool and produces some fascinating results. It’s pretty much unsurpassed as an general orbital modelling tool (I’m sure orbital dynamicists use their own custom programs that are way more technical, but this is great for us non-professionals!), and there’s a lot of support for it (many sample simulations can be found on the rest of website as well as on the forums). It’s well worth checking out and playing around with anyway, and if you have any interest in orbital dynamics then it’s a must-have!