The Particle Box: Kinetic Molecular Theory Simulator<br>The Particle Box: Kinetic Molecular Theory<br>Heat, squeeze, and cool a live box of atoms to watch pressure, the speed distribution, and even melting and boiling emerge from the collisions. Kinetic theory you can play with.<br>Everything you see is measured live from the colliding particles. Drag the controls and watch the pressure, the speed curve, and the state of matter respond.<br>Temperature<br>0.0
Pressure<br>0.0
State<br>Gas
Each dot is an atom; its colour shows its speed (blue = slow → yellow = fast). The indigo bar is a movable piston. Temperature and pressure are in the model's own relative units (proportional to the real quantities, not °C/K or pascals); 0 temperature is absolute zero.
TemperatureCoolcoldhot
Volume100%smallbig
Particles130fewmany
CohesionNoneloosesticky
PlayReset<br>Try an experiment<br>Freeze itMake it boilBoyle's law
Speed distribution (Maxwell–Boltzmann)bars = measured · curve = theory · slides right as you heat · 2D ⇒ Rayleigh form (starts at zero)<br>Pressure vs Volume (trace as you change volume)volume → · pressure ↑ · drag Volume at fixed Temperature
A 2D teaching model in relative units, but the physics is real. The atoms attract and repel through a genuine pair potential (Lennard-Jones in spirit), integrated with velocity-Verlet; the underlying dynamics conserve energy, and a thermostat then nudges energy in or out each frame to hold the temperature you set. Pressure (wall hits), the Maxwell–Boltzmann curve, the gas laws, and temperature-driven condensation all emerge, and are verified in the build. "Cohesion" sets how strongly the atoms attract; turn it up and cool down to condense the gas, and pressure correctly drops to ~zero as the clumped atoms stop hitting the walls.
A box of atoms you can play with
Everything about a gas (its temperature, its pressure, whether it’s even a gas<br>at all) comes from one simple picture: tiny particles in constant motion,<br>colliding . That’s the kinetic molecular theory , and this is it, live. The<br>box above isn’t an animation playing back a recording; it’s a real simulation of<br>a few hundred particles bouncing. The pressure and speed distribution are<br>measured straight from those collisions, and the temperature is held at<br>whatever you set on the slider (like a thermostat).
Temperature is a measure of the particles’ average kinetic energy, set by you.
Pressure is how hard and how often they hit the walls.
Colour shows each particle’s speed: blue is slow, yellow is fast.
What temperature really measures: kinetic energy
Kinetic energy is the energy a thing has because it is moving. A particle of<br>mass m moving at speed v carries a kinetic energy of
KE = ½ m v²
so a particle that moves twice as fast carries four times the kinetic energy. In<br>this box every atom has the same mass, so kinetic energy comes down to speed alone:<br>the fast yellow atoms carry the most, the slow blue ones the least, and the<br>colour ramp is really an energy map.
Here is the key idea the whole simulator rests on: temperature is the average<br>kinetic energy per particle . Not the energy of any one atom (some are always fast,<br>some slow) but the average across all of them. That’s why dragging the<br>Temperature slider works the way it does: it gently rescales every atom’s speed<br>until the average kinetic energy, the number in the Temperature readout,<br>matches what you asked for. Slide it all the way down and every atom stops dead. That<br>point is absolute zero : zero average kinetic energy, zero motion, zero pressure.
The ideal gas law, one variable at a time
Drag the sliders and the gas laws stop<br>being formulas to memorize and become things you can watch. All of them are pieces<br>of a single equation, the ideal gas law :
P V = n R T
Every symbol in it is something you can see or set in the box:
P (pressure) is the Pressure readout: how hard and how often the atoms hit the walls.
V (volume) is the Volume slider: the size of the box (its area here, since the box is 2D).
n (amount of gas) is the Particles slider: how many atoms are in the box.
T (temperature) is the Temperature readout: the average kinetic energy per particle.
R (the gas constant) is a fixed number that just makes the units balance. You never touch it.
Read together, the law says P V is proportional to n T . So if you hold two of<br>those quantities still and change a third, the fourth has no choice but to follow.<br>That is exactly how Boyle, Gay-Lussac, and Avogadro each found their gas law: change<br>one thing, hold the rest fixed, watch what moves. Do the same here.
Investigate<br>Heat the gas at constant volume (Gay-Lussac's law)<br>Predict. Leave the box the same size and add no atoms, but make the particles move faster. What should happen to the pressure?<br>Do. Don’t touch Volume or Particles. Drag Temperature from cold up to hot and watch the Pressure readout climb.<br>Notice. Pressure rises roughly in step with temperature: warm it up and the reading climbs, cool it and it...