X-Grav:

X-Grav is a simple physics simulation for a large number of
particles. It simulates the effect of gravity, collisions, heat
dissipation and a simple chemical reaction.  The simulation is in no
way meant to be realistic but rather a toy with which you can create
stars, planets and even simple solar systems.  

The best way to understand the behaviour of X-grav is by a
demonstration. Start by compiling xgrav and then start it by doing: 

  'xgrav -s example1.g'

This will start a simulation containing 2000 particles which are all
cold from the begining. After a while these particles will have
collapsed into a few clouds which are warmed up by the friction of the
particles. When the temperature and density of these clouds have
raised enough some of the colliding particles will ignite in a  burst
of fusion. This will lead to a chain reaction igniting a large number
of the  combustible particles, raising the temperature of the cloud so
rapidly that the  particles are blown appart from the increased
pressure. Under most circumstances this sudden reaction will blow out
the initial flames.  

However if you wait a while and if the conditions are right you this
will not happen the second or third time the particles form dense
clouds again. The chain reaction will be a little calmer due to less
combustible material and will rather live on. You will now have a
small star which is fueled by continous reactions of colliding
particles.  

If you let the simulation run for a while you will see that there are
less and less  material left in the stars which can react. As the
stars are cooling down you can note that they are shrinking until they
are cold and dark dwarfs.  

During the simulation you can use the 'a' and 's' keys to zoom in and
out of the center of the simulation. You can also create a new
planetary body that will come crashing into the center by pressing
'c'. Note that it will take a while for it to reach the center (you
can zoom out meanwhile to see it). When you are satisfied with the
demonstration you can use the  escape key to quit the program.

Hopefully this small demonstration will have made you interested in
the simulation.  When we ran this simulation we only used 2000
interacting particles in order to get the results somewhat in real
time. If you are a little more patient you can instead run xgrav with
the 'record' and the 'play' settings. By doing 'xgrav -r foo.dat <
example2.g' you instruct xgrav to save all the simulated particles
continously in the datafile 'foo.dat'. After quiting xgrav you can
later playback and resume the simulation with 'xgrav -p foo.dat'. 

Remember when we started xgrav by passing 'example1.g' as an input
file. This file contains all the paramters which is used during the
simulation. Take a look at one of the example files to see how it is
built up. You can find information about the parameters and command
for  setting up the initial universe in the file: documentation.html 

Enjoy it, and if you happend to find any use of this software please
let me know =)  

/ Mathias Broxvall, mathias.broxvall@gmail.com


