Mean Free Path Simulator Back
Statistical Mechanics Simulator

Mean Free Path Simulator — Kinetic Theory of Gases

Compute the hard-sphere mean free path lambda, mean speed, collision frequency nu, and number density n in real time from temperature T, pressure P, molecular diameter d, and molar mass M_g. A molecular-box animation and a log-log lambda vs P plot make the kinetic theory of gases tangible.

Parameters
Temperature T
K
Pressure P
kPa
Molecular diameter d
pm
Molar mass M_g
g/mol

Defaults are nitrogen N2 (d ~ 370 pm, M_g = 28 g/mol) at room conditions. Boltzmann constant k = 1.380649e-23 J/K and Avogadro's number N_A = 6.02214076e23 are used.

Results
Mean free path lambda
Mean speed <v>
Collision frequency nu
Number density n
Molecular box dynamics (hard-sphere model)

Blue circles = gas molecules (hard spheres) / arrows = velocity vectors / yellow circle = highlighted molecule / yellow dashed line = expected free path lambda (in box scale) / molecule count grows with number density n

Mean free path lambda vs pressure P (log-log)

X = pressure P (kPa, 0.01 to 1000, log) / Y = mean free path lambda (m, log) / yellow dot = current (P, lambda) / lambda is proportional to 1/P, slope -1 in log-log

Theory & Key Formulas

The kinetic theory of gases models molecules as hard spheres and uses the Maxwell-Boltzmann velocity distribution to derive the mean speed, the collision frequency, and the mean free path. Combined with the ideal gas equation of state, these closed-form expressions follow.

Mean free path (hard-sphere model with the sqrt 2 relative-velocity correction):

$$\lambda = \frac{k\,T}{\sqrt{2}\,\pi\,d^2\,P}$$

Maxwell-Boltzmann mean speed:

$$\langle v\rangle = \sqrt{\frac{8\,k\,T}{\pi\,m}}$$

Collision frequency and number density:

$$\nu = \frac{\langle v\rangle}{\lambda},\qquad n = \frac{P}{k\,T}$$

Here $k = 1.380649\times10^{-23}$ J/K is the Boltzmann constant, $d$ is the molecular diameter [m], $P$ the pressure [Pa], $T$ the temperature [K], $m = M_g \times 10^{-3} / N_A$ the mass of one molecule [kg], with $M_g$ the molar mass [g/mol] and $N_A = 6.02214076\times10^{23}$ Avogadro's number.

What is the Mean Free Path Simulator?

🙋
In high school I was told that gas molecules are flying around in all directions, but how far does a real molecule actually travel between collisions? In ordinary air, is it something like a few millimeters?
🎓
Good question. In nitrogen at room temperature and 1 atm the mean free path is only about 67 nm — slightly shorter than the wavelength of visible light, and thousands of times smaller than a millimeter. Far shorter than intuition suggests. The hard-sphere model gives lambda = kT / (sqrt 2 pi d^2 P), proportional to T and inversely proportional to P. Set T = 300 K, P = 101.32 kPa, d = 370 pm (the effective diameter of N2) and M_g = 28 in this simulator and look at the result.
🙋
Then how long does the mean free path become at high vacuum? A semiconductor process chamber is not even one meter across, right?
🎓
Drag the pressure slider down to 0.01 kPa (10 Pa). Because lambda scales as 1/P it grows by 10^4, so 67 nm becomes about 0.67 mm. Push it further to 10^-3 Pa and you reach lambda about 6.7 m. Once that exceeds the chamber dimension, the gas is no longer "a gas" but rather a collection of particles flying independently from wall to wall. That is the molecular-flow regime, exactly the world of semiconductor processing and electron microscopes.
🙋
The collision frequency is shown as 7 GHz. Are nitrogen molecules really colliding seven billion times per second?
🎓
They really are. nu = mean speed / mean free path = 476 m/s divided by 67 nm is about 7e9 Hz. Nitrogen molecules move at about 470 m/s but the mean free path is only 67 nm, which gives a few collisions every nanosecond. So an atmospheric gas is "always colliding," and that is precisely what produces the macroscopic viscosity, thermal conductivity, and diffusion coefficient. In high vacuum the collisions stop and you enter molecular flow, where ordinary fluid mechanics no longer applies.
🙋
Does changing the molecular diameter d change the result a lot? How is d determined in the first place?
🎓
Because lambda is proportional to 1/d^2, doubling d cuts lambda by a factor of four. The diameter is a "collision diameter" derived from the intermolecular potential — for example from the Lennard-Jones sigma parameter, or experimentally from the temperature dependence of viscosity. Typical values are H2 about 270 pm, N2 about 370 pm, O2 about 360 pm, CO2 about 460 pm, CH4 about 410 pm. The 50 to 800 pm range of this slider covers essentially all common gases.

Frequently Asked Questions

If you assume only the tagged molecule moves and the others are at rest, the swept collision volume per second is mean speed times pi d^2 times n, giving lambda = 1/(pi d^2 n). In reality the other molecules follow the same Maxwell distribution, and the average relative speed is sqrt 2 times the mean speed. This raises the collision frequency by sqrt 2 and shortens the mean free path by 1/sqrt 2. Substituting the ideal gas law P = n k T then yields lambda = kT/(sqrt 2 pi d^2 P). Maxwell's derivation of this sqrt 2 factor brought the theory into agreement with measured viscosity and thermal conductivity.
From the Maxwell-Boltzmann distribution we get three characteristic speeds: most probable v_p = sqrt(2kT/m), mean speed v = sqrt(8kT/(pi m)), and rms speed v_rms = sqrt(3kT/m). Their ratio is 1 : sqrt(4/pi) : sqrt(3/2), about 1 : 1.128 : 1.225. This tool displays the mean speed because it is the relevant one for the collision frequency. For nitrogen at 300 K, v_p is about 422 m/s, the mean speed is about 476 m/s, and v_rms is about 517 m/s, all well above the speed of sound (about 350 m/s).
This tool uses the double approximation of an ideal gas (P = n k T) and a hard-sphere molecule (the collision diameter d is independent of speed). Two regimes break that down. First, at high pressure intermolecular forces become important and a van der Waals correction is needed. Second, at low temperature the collision diameter itself becomes temperature-dependent (Sutherland model: d^2 proportional to 1/(1 + S/T)). Between roughly room temperature and several atmospheres, and 100 to 1000 K, this tool is accurate to within a few percent and is more than enough for everyday gas engineering. Near liquefaction or under extreme pressure you need PVT data or Enskog theory.
Kinetic theory gives the approximations eta about (1/3) n m v lambda for viscosity and kappa about (1/3) n c_v v lambda for thermal conductivity. The interesting fact is that the product n times lambda equals 1/(sqrt 2 pi d^2), which is independent of pressure. As a result the viscosity of a gas is independent of pressure — a famous prediction of Maxwell that was confirmed experimentally. Both eta and kappa do, however, scale as sqrt T because the mean speed does. Vary T in this tool and you can directly see the sqrt T dependence that drives gas viscosity and conductivity.

Real-World Applications

Vacuum design for semiconductor processing: Sputter, CVD and epitaxy all run in the molecular-flow regime where the mean free path is comparable to or larger than the chamber size. A typical PVD sputter chamber (about 30 cm across) is operated with argon at 0.5 to 2 Pa (5 to 20 mTorr) so that lambda is below 10 cm. Set P = 0.001 kPa (1 Pa) in this tool and you see lambda about 7 mm, which gives the right amount of scattering between target and substrate. At still lower pressures (e-beam lithography or molecular beam epitaxy) lambda reaches meters, and the tool runs in pure molecular flow.

Choice of vacuum pump: The right pump depends on Knudsen number Kn = lambda / L. For Kn below 0.01 (viscous flow) rotary or dry pumps are used, for Kn around 0.1 to 10 (transitional) turbomolecular pumps, and above Kn = 10 ion pumps or titanium sublimation pumps are needed. Using lambda from this tool to compute Kn at each operating pressure tells the designer which pumping technology is most efficient.

Vacuum insulation in a Dewar flask: The space between the double walls of a thermos is held below about 10^-3 Pa, so that lambda exceeds the wall gap of a few millimeters and gas-borne heat conduction essentially vanishes. With P = 10^-6 kPa (10^-3 Pa) in this tool, lambda becomes about 6.7 m and Kn far exceeds unity — pure molecular flow. The only remaining heat path is radiation, which a silvered coating then suppresses.

Brownian motion of nanoparticles and DLS: Dynamic light scattering uses D = kT / (6 pi eta r) for the diffusion coefficient, but that is the continuum approximation Kn far less than one. Once particle radius shrinks to the order of lambda you must apply the Cunningham correction C = 1 + Kn (1.257 + 0.4 exp(-1.1 / Kn)). Knowing lambda from this tool lets you decide when the correction is needed — important for aerosol science and PM2.5 analysis.

Common Misconceptions and Pitfalls

The most common misconception is to think "the mean free path is the same for any gas." In fact lambda is proportional to 1/d^2, the inverse square of the molecular diameter, so H2 (about 270 pm) and CO2 (about 460 pm) differ by roughly a factor of three under identical conditions. Switch d in this tool between 270 pm and 460 pm and confirm the change. The same temperature dependence (lambda proportional to T) is also easy to forget; extrapolating a room-temperature value to 1000 K gives an error of three to four times.

Next is the belief that "a long mean free path means slow molecules." The opposite is true: lambda is the inter-collision distance, the mean speed is the speed itself, and the collision frequency nu = mean speed / lambda are three independent quantities. The mean speed depends only on temperature (proportional to sqrt T), not on pressure. For example nitrogen at 1 atm has a mean speed of about 476 m/s and nitrogen at 10^-3 Pa also has about 476 m/s at the same temperature — only the collision interval changes. Vary P at fixed T in this tool and you can verify that the mean speed is unchanged.

Finally, the "hard-sphere model is too crude for real gases" attitude is excessive. Real molecules do interact softly, but representing the effective collision cross section by an equivalent hard-sphere diameter d agrees with measured viscosity, thermal conductivity, and diffusion coefficients to within a few percent from room temperature and 1 atm up to medium vacuum and a few atmospheres. Most CFD, aerodynamics, and semiconductor process simulations use exactly this approximation. Lennard-Jones or Chapman-Enskog theory is needed only near liquefaction, ultra-high pressure, or for chemically reactive species — and the values from this tool make a good starting point.