Mbs-pucks is a project mainly written in Python, it's free.
A multi-body simulation of pucks colliding on an air hockey table.
This is a simulation of the multibody system from the Phy270 Lab class. The simulation is of pucks on an airhockey table. After the simulation is complete, the pucks positions overtime analyzed and placed in bins to determine various global propeties about the distribution. Various aspects of the simulation are mutable including the evevation of the table, the dimentions of the table, as well as various puck properties.
In order to run, the simulation needs a few packages to be installed.
Python 2.6 is what the simulation was developed using. Currently the simulation is not compatible with Python3 but should be backwards compatable at least a few version (I havent tested it though).
Matplotlib is used for generating [most] images and is therefore required.
Gnuplot is not required to run the simulation but is required to produce the heatmaps of puck distributions.
In src/settings.py you'll find a number of configurable options. Change these at will. Some of the values don't make a lot of physical sense. For instance, the FRICTION variable doesn't correspond to any accepted calculation of friction but still functions none the less. This is discussed further later on.
You should run the simulation from the src directory. There are a number of command line options that you can use to alter how the simulation is run and what output it produces.
You can get a full list of CLI params by running,
python simulation.py --help
Three of the possible CLI flags (--images, --files, --gigafile) are especially important. You'll need to specify at least one of these.
The simulation performs some automatic statistics functions for you that roughly correspong to requirements from the original lab. All statistics require that you specify the gigafile flag when running the simulation.
If the flag is specified, two graphs are produced (along with some other random files). The first graph is essentially a histogram of the number of pucks in each bin (although it's not displayed as a histogram, it's displayed as a scatter plot). The second file is a heatmap showing the concentration of pucks across all timesteps.