Gas in a Box

This model simulates the behavior of gas molecules in a closed container. As the molecules collide with each other and bounce off of the walls, energy and velocity are transferred among the particles. Molecules start with the same mass and speed, but as the simulation proceeds, the distribution of energy and velocity among the particles begins to resemble a classic Maxwell-Bolzman distribution. Particles are colored according to speed -- blue for slow, green for average, and red for fast. One molecule stamps a yellow trail as it moves, so that its path can be observed. Gas in a Box is the first in a collection of GasLab models that all use the same basic rules for expressing what happens when gas molecules collide. Each of the GasLab models has different features in order to show different aspects of the behavior of gases.

For detailed instructions on using the program, take a look at the info window from the Gas in a Box model.

Download the StarLogoT source code for the Gas in a Box model:
Download gasinabox

To run this file you need StarLogoT2002 for the Macintosh.
(download StarLogoT)

Click on one of the pictures to see a quicktime movie of the model:
The movie shows typical molecular motion, with the path of one molecule traced in yellow. The graphs show a) the relative numbers of molecules with different speeds and b) the velocity distribution.