A Model-based Toolkit and Curriculum for Exploring Ideal Gases and Statistical Mechanics


The GasLab project was designed to help students visualize and explore the physical behavior of an ideal gas and relate the idealized microscopic molecular rules to the measurable observable quantities that emerge. This set of models simulates the behavior of gas molecules in a closed container under various conditions. It was one of the original Connected Mathematics StarLogoT models (under the name GPCEE) and is now ported to StarLogoT as part of the Connected Mathematics "Making Sense of Complex Phenomena" Modeling Project.


The GasLab models are examples of "extensible models". They are basic seed models that allow students to "peek under the hood" of the model and see how it works. Interested students can then modify the underlying model, creating an experiment or a new variant of the GasLab model.

The GasLab models are all variations of the basic model called Gas-in-a-Box. All variations use the same basic Newtonian (billiard ball) rules for what happens when gas molecules collide. Each model has different features in order to show different aspects of the behavior of gases. Many other extensions of the core Gas-in-a-Box model have been explored by students.

Gas In A Box

This model shows the basic model and plots the speed and energy distribution in an ideal gas.

Free Gas

This model removes the box walls.

Single Collision

This model shows the collision of two molecules, so that the underlying rules (conservation of energy and momentum) can be studied.

Isothermal Piston

This model looks at pressure, volume and temperature of a gas under a piston.


This model has two chambers and two kinds of molecules that can mix.


This model imposes a gravitational field on the gas.

Adiabatic Piston

This model has a piston with mass that can move up or down in response to its weight and the counterbalancing collisions of the gas molecules. Mechanical energy thus passes to and from the gas.

Maxwell's Demon

This model demonstrates a famous thought experiment that relates the concepts of energy and information.


Principal Investigator - Uri Wilensky
Curriculum Developer - Ed Hazzard
Complexity Programmer and Rearcher - Robert Froemke
Consultants - Joshua Mitteldorf (University of Pennsylvania), Walter Stroup (University of Texas), Chris Smick (Nobles Academy),


Book version - Wilensky, U. (1999).GasLab: an Extensible Modeling Toolkit for Exploring Micro- and Macro- Views of Gases. In Roberts, N., Feurzeig, W. & Hunter, B. (Eds.) Computer Modeling and Simulation in Science Education. Berlin: Springer Verlag.

Expanded Journal version - Wilensky, U. (2003). Statistical Mechanics for Secondary School: The GasLab Modeling Toolkit. International Journal of Computers for Mathematical Learning, Special Issue on agent-based modeling 8(1), 1-4 .

Wilensky, U., Hazzard, E & Froemke, R. (1999). An Extensible Modeling Toolkit for Exploring Statistical Mechanics. Proceedings of the Seventh European Logo Conference - EUROLOGO '99, Sofia, Bulgaria.

Wilensky, U. & Resnick, M. (1999). Thinking in Levels: A Dynamic Systems Perspective to Making Sense of the World. Journal of Science Education and Technology. Vol. 8 No. 1.