Why does air push back?
Pump up a bicycle tire and the barrel of the pump gets warm. Block the end of a syringe with your finger and push the plunger, and the air pushes back. Air is invisible, yet it clearly pushes, and squeezing it makes it hotter. What is actually going on in there?
The answer is collisions of molecules far too small to see. At room temperature air molecules fly about at several hundred meters per second, faster than an airliner, colliding billions of times a second. Every bounce off a wall gives the wall a tiny shove, and there are so many shoves that we feel a steady push: pressure.
In this simulation we follow every molecule in a cylinder with a piston. The pressure and temperature shown are not typed in from a formula; they are measured from the molecules' motion. Let's use them to see how pressure, volume and temperature are connected.
The idea that pressure is molecules hitting the walls sounds obvious today, yet a paper explaining it was once dismissed as "nonsense." We'll see why it took so long to be accepted.
Molecules drumming on the walls
The molecules, modeled on argon atoms, fly in straight lines until they hit a wall or each other. The collisions are elastic, so no energy is lost, and remarkably much of the behavior of a gas follows from that one rule.
Start with pressure. When a molecule bounces off a wall, its velocity component perpendicular to the wall, , reverses, so the wall receives an impulse . Molecules keep arriving, so on average the wall feels a steady force; that force divided by the size of the wall is the pressure.
Next, temperature. Temperature is proportional to the average kinetic energy per molecule.
The gas here is two-dimensional, with discs moving on a plane, so pressure is force per unit length of wall, in N/m, and "volume" is an area, in m². The pressure is the total impulse on the walls per unit time divided by their total length, and the temperature is defined so that the average kinetic energy per molecule is
where is Boltzmann's constant.
Why should the ideal gas law come out? Let's derive it, staying in two dimensions. There are a few symbols ahead, but all we are really doing is multiplying "how many times per second molecules hit the wall" by "how hard each hit pushes." Take the right-hand wall and call the velocity component perpendicular to it . A molecule with reaches the wall within a time if it is within of it, and each one delivers an impulse . Both the number arriving and the impulse each delivers are proportional to , so the total goes as . With molecules per unit area, and half of them heading toward the wall,
If no direction is special, , so . Therefore , that is, . Pressure is "number density times how vigorously each molecule moves." It's a bit like the drumming of rain on a tin roof, which depends on how many drops fall and how hard each one lands. Unlike rain, though, molecules bounce back and return, and in a gas they drum on the walls from every direction. Neither the mass nor the kind of molecule survives in the result, which is why every ideal gas obeys the same law.
Real gases are three-dimensional, so the average kinetic energy per molecule is , yet the equation of state is the same, . What changes with dimension is only how many directions the energy is shared between, that is, the degrees of freedom; the fact that pressure comes from molecular collisions does not change at all.
The gas law from chemistry, , is the same equation in different clothes. Multiply Boltzmann's constant by Avogadro's number and you get the gas constant ; count molecules in moles instead of one by one, and becomes .
A small offset from the size of molecules
To be honest, real molecules have a size. The discs here have argon's diameter, 0.34 nm, so they have slightly less room than the box, and the measured is a few percent above 1. Approximately,
with the diameter. This is also a reason real gases deviate from the ideal law, and it is the idea behind the van der Waals equation.
Springy particles or flying ones?
Getting to this picture took a long detour.
That air can push became clear through seventeenth-century work on the vacuum. In England, Robert Boyle studied the properties of air with apparatus built by his assistant Robert Hooke, and in 1660 he published New Experiments Physico-Mechanical, Touching the Spring of the Air, and its Effects. Franciscus Linus and Thomas Hobbes objected, and in the Defence answering them, added to the second edition of 1662, Boyle showed with a table of experimental numbers that the pressure and volume of trapped air are inversely proportional. Boyle himself wrote that the idea of an inverse proportion had been suggested to him by Richard Towneley, who had been studying the expansion of air with Henry Power. In France, Edme Mariotte found the law independently in 1679. The link between volume and temperature was studied by Jacques Charles and Joseph Louis Gay-Lussac around the turn of the nineteenth century.
Yet the air Boyle pictured was made of springy particles at rest, pressing against one another. Newton, in the Principia of 1687, showed that particles repelling each other with a force inversely proportional to their distance would give Boyle's law. The first to say clearly that pressure is particles in motion was the Swiss scientist Daniel Bernoulli, who in his Hydrodynamica of 1738 drew a piston with a weight on it, held up from below by flying particles. The "weighted piston" mode in this simulation is exactly that picture. But the idea was not accepted for a long time.
In the early nineteenth century most scientists thought heat was an invisible fluid called "caloric." In 1845 the Scotsman John James Waterston sent the Royal Society a paper treating a gas as a swarm of bouncing molecules. One referee wrote that it was "nothing but nonsense," and the manuscript was filed away in the Society's archives. Lord Rayleigh found it and had it published in 1892, praising it as an immense advance. By then, after papers by August Krönig in 1856 and Rudolf Clausius in 1857, kinetic theory had already become mainstream.
Why does pushing the piston heat the gas?
Now push the piston in. A molecule hitting an approaching piston bounces back faster than one hitting a stationary wall, just as a ball flies off faster from an oncoming bat. If the piston approaches at speed , then seen from the piston the molecule comes in at and bounces back at the same speed; seen from the ground, it leaves at . So pushing the piston in speeds the molecules up and the temperature rises; pulling it out slows them down and the gas cools.
If the walls touch a heat bath held at a fixed temperature, molecules bounce off them with speeds typical of that temperature, and the extra speed from the piston is soon handed on. A change at constant temperature is isothermal; when the walls let no heat through, it is adiabatic.
In an adiabatic change, the work done by the piston goes straight into the molecules' kinetic energy. Let's put that into equations. In two dimensions each molecule has on average, so the internal energy is . When the piston changes the volume by , the work done on the gas is , so
Adding up the small changes, stays constant, and combined with , so does . This corresponds to the ratio of heat capacities for a two-dimensional monatomic gas. Halve the volume and the temperature doubles while the pressure quadruples. For a three-dimensional monatomic gas, , and the same calculation keeps and constant, which corresponds to . In an isothermal change stays constant, in two dimensions or three, so the pressure only doubles.
The internal energy gained in adiabatic compression equals the work done by the piston: the first law of thermodynamics, , with . In an isothermal change the energy the piston puts in leaks out as heat to the walls, and the internal energy stays put.
In engines, refrigerators and the sky
Adiabatic heating is put to work every day inside engines. A diesel engine has no spark plugs. It squeezes the air in its cylinders so hard that adiabatic compression raises the temperature above the ignition point of the fuel, and when fuel is sprayed in, it simply catches fire.
Refrigerators and air conditioners are relatives of the same idea. A working fluid, the refrigerant, warms up when it is compressed and cools down when it expands. It does not stay a gas the whole time, though: after compression it gives off heat and condenses into a liquid, and after an expansion valve drops its pressure it evaporates, soaking up heat from its surroundings. Repeating this cycle of compression and expansion, condensation and evaporation pumps heat out of the fridge or the room.
Adiabatic changes happen in the sky, too. Rising air expands and cools, by roughly 10 K per kilometer for dry air, which explains cloud formation and the warm, dry föhn winds on the far side of mountains. And a confession about the bicycle pump: part of its warmth comes from friction, so it was a slightly sneaky example.
The speeds sort themselves out
Collisions between molecules make the distribution of speeds settle into the Maxwell distribution, which in two dimensions is
Start every molecule at the same speed and the collisions still reshape the distribution into this curve. Nobody tells them to.
James Clerk Maxwell worked out the distribution of molecular speeds and published it in 1860. It is often called the first statistical law in physics, and Ludwig Boltzmann built it into statistical mechanics.
From random motion to reliable averages
Most important of all, steady quantities such as pressure and temperature emerge from countless molecules moving at random. No single path can be predicted, yet averages over many molecules are extremely reliable. That is the central idea of statistical mechanics.
Even so, the argument over whether atoms really exist went on. It was settled early in the twentieth century. In 1905 Albert Einstein proposed that small particles suspended in water jiggle at random, the motion called Brownian motion, because invisible molecules keep hitting them, and he predicted how large the jiggling should be. From about 1908 the French physicist Jean Perrin confirmed this experimentally and even estimated the number of molecules, Avogadro's number. He received the 1926 Nobel Prize in Physics. That the pressure and temperature you can feel are averages over the motion of invisible molecules became the strongest evidence that atoms exist. The method of moving molecules one by one on a computer, called molecular dynamics, is usually traced to Berni Alder and Thomas Wainwright in the late 1950s, and this simulation is its direct descendant.
The same "move every molecule" calculation as in this simulation is now an everyday tool in research and industry. Molecular dynamics is used to see how a drug molecule fits into a protein, or to predict how ions move inside new materials and batteries. Waterston's "nonsense" now runs on supercomputers every day.
Push the piston yourself
- Under Measured values, look at Pressure P (from wall impulses), Temperature T (from mean KE) and PV ÷ NkT, which should be slightly above 1.
- Predict first: with Walls set to Adiabatic (walls just reflect), press ⬇ Push in (halve the volume). By what factors do temperature and pressure change? Does the point in the P–V diagram follow the isotherm or the adiabat?
- Press ⬆ Pull out (double it) to double the volume again. Does the temperature return to where it started?
- Switch Walls to Isothermal (walls are a heat bath) and push the piston in again. What happens to temperature and pressure now?
- 🔥 Heat (speeds ×1.1) raises the temperature by a factor of 1.21. What happens to the pressure? Turning on Compare with a quantity that is not pressure shows how a quantity often mistaken for pressure, the mean relative speed per collision divided by the height, changes.
- Set Piston speed to 200 m/s and compress; then try 5 m/s. How does the temperature rise differ?
- Set Piston mode to Weighted (constant outside pressure) and press 🔥 Heat a few times. What does the piston do?
- Compare the bars of the speed distribution at the lower right with the red Maxwell curve.
Fine print: the motion is slowed down about fifty billion times, so one second on screen is 20 ps. The gas is two-dimensional and contains at most a few hundred molecules, so the measured pressure and temperature fluctuate. The molecules have the mass and size of argon atoms.
The sum of unseen collisions
The pressure of a gas is the accumulated impulse of molecules bouncing off the walls, and its temperature is simply the average kinetic energy of the molecules, in two dimensions. Measure both from the molecules' motion and holds. A moving piston changes the speeds of the molecules that hit it, so adiabatic compression heats the gas and adiabatic expansion cools it, while collisions between the molecules steer the speeds toward the Maxwell distribution.
The air Boyle imagined as springy particles at rest became Bernoulli's piston held up by flying particles, then Waterston's rejected paper, the statistics of Maxwell and Boltzmann, and finally Einstein and Perrin's proof that atoms exist. The same way of thinking now lives in diesel engines, in the weather, and in computer simulations for drug and battery research.
One last puzzle: if you yank the piston out extremely fast, the molecules cannot catch up with it. Does the gas cool down then? Hint: a molecule's speed only changes when it actually hits the piston.
Sources and further reading
The facts in this article were checked mainly against these sources.
- A Defence of the Doctrine Touching the Spring and Weight of the Air, Robert Boyle, 1662 (the table of the inverse proportion and Boyle's note on Towneley's hypothesis; full text from the Text Creation Partnership)
- Hydrodynamica, Daniel Bernoulli, 1738 (Section 10: the weighted piston held up by moving particles; scan at the Internet Archive)
- Every cloud, Royal Society blog, 2023 (Waterston's paper and the "nonsense" verdict)
- John James Waterston, MacTutor History of Mathematics, University of St Andrews
- Jean Baptiste Perrin – Facts, The Nobel Prize (Nobel Prize in Physics 1926)
Further reading (encyclopedia):