AshPhys
← Back to The Kinetic Particle Model of Matter
Chapter 9 · The Kinetic Particle Model of Matter — Lessons 9.3 & 9.5

Gas in a Box: Kinetic Theory & the Gas Laws

Hard-sphere molecular dynamics with nothing scripted: every particle obeys Newton's laws and the pressure dial reads only the measured impulse of wall bombardment. Three laws, one box: in Boyle mode drag the piston and watch measured dots trace the pV = NkT hyperbola; in Pressure Law mode heat the bath at fixed volume and the p–T dots form a straight line aimed at absolute zero; in Charles mode the piston floats freely under a fixed load, so heating the gas physically pushes it outward and the V–T dots pass through the origin — the reason the gas laws demand kelvin. Slam the piston for adiabatic heating, add particles to double the pressure, and open the technical overlay to watch the Maxwell–Boltzmann distribution emerge from collisions alone.

Kinetic Theory Bench · 160 particleslive

Every particle obeys Newton's laws; the pressure dial reads nothing but the accumulated impact of particles on the walls. Squeeze the gas with the brass piston and the measured dots on the p–V chart trace out Boyle's hyperbola on their own. Particle colour shows speed: blue slow, red fast.

The bath holds T fixed while you set V and the gas answers with p.

300 K
129k u²
Particles N160
Live Readings
Pressure p (measured)0.0 u
Gas temperature (measured)300 K
Product p × V0k
Ideal-gas N·k·T0k
Agreement pV / NkT

Watch p × V while you move the piston slowly: the product holds nearly constant while p and V change by more than double each. That constancy IS Boyle's law — and it emerges from nothing but Newton's laws.

Try This

1. Clear the chart trail, then compress SLOWLY from full volume to minimum. The brass dots trace the green dashed hyperbola: p₁V₁ = p₂V₂, live.

2. Now slam the piston in fast and watch the thermometer: the red column jumps above the green bath marker. Compressing a gas does work on it and heats it — then the bath cools it back. That spike is why a bicycle pump gets hot.

3. Double the particles from 140 to 280 at fixed volume: the dial doubles. Pressure is bombardment, and twice the particles means twice the hits.

4. Heat the bath from 300 K to 600 K at fixed volume: particles turn red, hit harder and more often, and p doubles — the pressure law.

5. Open the speed distribution: the histogram isn't drawn from a formula — it's counted from the particles, and collisions alone push it onto the red theory curve.

6. Switch to the Pressure Law, clear the trail, then sweep the bath from 100 K to 600 K at fixed volume. The dots form a straight line aimed at the origin — extend it backwards and it hits p = 0 at T = 0: absolute zero, discovered by extrapolation.

7. Switch to Charles's Law: the piston now floats on the gas under a fixed load. Heat the bath and watch the gas physically push the piston out — the V–T dots make a straight line through the origin. This only works with kelvin: that's WHY the gas laws use it.

p₁V₁ = p₂V₂
at constant temperature (Boyle's law)

What Each Variable Means

p

Pressure. Force per unit wall length from particle bombardment. Not programmed — measured from the impulse of every collision with the walls.

V

Volume. The area of the box (this is a 2D gas). Drag the piston or use the slider to change it.

T

Temperature. Proportional to the average kinetic energy of the particles. The bath (green marker) sets it; fast compression can push the gas above it briefly.

N

Number of particles. More particles, more collisions per second, more pressure — in exact proportion.