🫧Kinetic Theory Gas Simulator - Maxwell–Boltzmann, Pressure, Graham's Law
A box of a few hundred hard-disk molecules collides elastically in real time (spatial hashing keeps it fast); speeds are real m/s and the temperature is real kelvin. The speed histogram settles onto the Maxwell distribution on its own, the pressure measured from wall impulses is compared with PA = NkT and with a hard-disk equation of state, and collision counting gives the mean free path, checked against the dilute-gas formula and the Enskog correction. Push the piston in to see the gas heat up, heat or cool it with a click, or trace a single molecule's zig-zag path. Two more scenes show Graham's law (light molecules leak through a pinhole faster) and two gases mixing once the partition is pulled. The last tab is a 3D Maxwell–Boltzmann calculator for H₂, He, N₂, O₂, CO₂ and UF₆.
Free · No sign-up · Runs in your browserLast updated:
How to use Kinetic Theory of Gases Simulator
- 1Pick the molecule box, Graham effusion, gas mixing or the Maxwell distribution calculator
- 2Choose the gases and set the number of particles, temperature and particle size
- 3Play the simulation, drag the piston, heat or cool, or remove the partition
- 4Compare the histogram with theory and read the temperature, pressure, mean free path and rate ratios
FAQ
- Why does the simulated speed distribution peak further left than the textbook Maxwell curve?
- The simulation is two-dimensional, so each molecule has two translational degrees of freedom and the speed distribution is f(v) = (m/kT)·v·e^(−mv²/2kT) with v_p = √(kT/m). A 3D gas has one more degree of freedom, giving a v² factor instead of v and v_p = √(2kT/m), so the peak moves right. Both come from each velocity component being Gaussian; the tool plots the 2D curve for the simulation and the 3D curve in the calculator.
- Why is the measured PA/NkT a little above 1?
- The ideal gas law treats molecules as points. The simulated molecules are disks with real size: they take up part of the area and pass momentum across their diameter when they collide, so the pressure ends up slightly higher. The Henderson equation for hard disks, PA/NkT = (1 + η²/8)/(1 − η)² with η the area fraction, captures this well — bigger, denser particles deviate more. It is the same physics as the b term in the van der Waals equation.
- What does Graham's law say, and why is uranium enriched as UF₆?
- In effusion through a small hole, the number of molecules escaping per second is proportional to number density times mean speed, and at a given temperature the mean speed goes as 1/√M, so the rates of two gases are in the ratio √(M_B/M_A). For ²³⁵UF₆ and ²³⁸UF₆ the mass ratio is only 1.0086, giving a separation factor of about 1.0043 per stage, so gaseous diffusion plants needed over a thousand stages. UF₆ is used because it turns to gas near room temperature and fluorine has a single stable isotope, so it adds no mass spread of its own.
- How fast do air molecules move, and how far do they travel between collisions?
- At room temperature the RMS speed of N₂ is about 517 m/s — faster than sound — and H₂ about 1,930 m/s. Yet at atmospheric pressure an N₂ molecule travels only about 70 nm between collisions and collides some seven billion times a second, which is why smells spread by slow random diffusion. The high-speed tail also explains why Earth has lost its hydrogen and helium: a small fraction of those molecules always exceeds escape velocity.