Heat and Work

There are two ways to give a gas energy: warm it or squeeze it. Push a piston, read the work as an area, and find that the total of heat and work is all that counts

Heat and Work

Energy can enter a gas in two ways. Put it beside something hotter and its molecules are jostled faster: that is heat. Push in a piston and its molecules bounce off faster: that is work. The gas keeps no record of which.

Push a Piston

Drag the piston, or squeeze the gas slowly and then in a slam, and watch the account of work, heat and energy. Then keep the walls warm, let the gas rush into an empty space, and magnify a single bounce.

Speed of the piston for the two buttons (molecules move at about 1.25)

Discs
1.000
temperature, measured
1.000
temperature if moved slowly
0.0
work done on the gas
0.0
work if moved slowly
1.600
T × area, measured (began at 1.60)
0.00000000
ΔU − Q − W: energy gained, less heat in, less work in
No heat can pass these walls, yet squeezing the gas warms it: molecules rebound faster from a wall that is coming towards them. Let it out slowly and they rebound slower, and it cools. Now try the same move at other speeds.
work in; the blocks’ area is the workheat inheat outenergy gainedpressure on the piston, slice by slicepressure just nowpredicted for a slow move, insulatedthe constant-temperature curve

The gas is flat: hard discs of radius 0.008 in a box of height 1, in the simulation’s own units with k = 1, so temperature is energy per disc and pressure is force per length of wall. In a flat gas T × area stays constant in a slow insulated move (γ = 2), so halving the area doubles T; argon in three dimensions would warm by a factor of 1.59 and nitrogen by 1.32. The discs’ size raises the prediction by a few per cent. Work counts as positive when it is done on the gas. Measured values scatter: by a few per cent with 200 discs, far more with 20. Collisions conserve energy to rounding, so ΔU = Q + W is checked here, not imposed. “Slow” is 0.08, a fifteenth of a typical molecular speed: not infinitely slow, so a squeeze still costs a few per cent more work than the prediction. While the piston moves it exchanges no heat. A very hot gas may run slower than real time.

Go deeper:The First Law

A molecule meets the piston at speed v. If the piston is coming the other way at speed u, then to someone riding on the piston the molecule arrives at v + u and, in an elastic bounce, leaves at v + u. Back in the box that is v + 2u. Its energy has risen by 2mu(v + u), taken from whoever is pushing. Add up every bounce and you have the work done on the gas. Heat is the same thing without the push: molecules of a hot wall, jiggling at random, on average hand energy to molecules that hit them. The account is

ΔU = Q + W

with Q the heat into the gas and W the work done on it, both counted positive when energy goes in. This is the first law of thermodynamics, and here it is nothing more than the conservation of energy with every collision counted. (Many books take W as the work done by the gas and write ΔU = Q − W. The next demo uses that sign, because there it is an area.) The energy U is a function of state: it depends only on the condition the gas is in now. Heat and work are not; they are two ways of delivering energy, and once it is delivered there is no such thing as the heat “in” the gas. In 1845 James Joule let compressed air expand into an empty vessel and found no change of temperature that he could measure: no heat, no work, the same energy. See also: Momentum and Collisions.

A change in which no heat flows is called adiabatic. If it is also slow, the flat gas here keeps T × A constant, where A is its area, and so PA2 too. In three dimensions, T Vγ − 1 and P Vγ are constant, where γ is 5/3 for single atoms and 7/5 for air. That warms the barrel of a bicycle pump. Squeeze air at 20 °C to an eighteenth of its volume, as a diesel engine does, and the ideal formula gives about 930 K, or 660 °C: enough to light the fuel with no spark. Air rising past a mountain does the reverse. It expands against the thinner air above it, does work, and cools by g/cp = 9.81/1005, about 9.8 °C for each kilometre, as long as no water condenses.

Slow is the cheapest way to squeeze. A fast piston runs into molecules that have had no time to get out of its way, so it meets more pressure than the gas has on average and more work is needed for the same final volume. A piston pulled away fast meets less pressure and gets less work back, and one that outruns the molecules gets none. Squeeze fast and let out fast, and you do not recover what you put in. That loss is a first sight of the second law. See also: Temperature and the Second Law.

The Area Under the Path

Drag from A to B to take the gas along any path you like, and compare the heat, the work and the change of energy in the table. Then switch to a loop and find what its area means.

Drag from A to draw your own path. Draw with

Ready-made paths

Ways each molecule can move, f

+6600 J
work done by the gas: area under the path
+11100 J
heat in: 23100 J in, 12000 J out
+4500 J
change in internal energy
1.400
γ = 1 + 2/f: where they cross, the adiabat is this many times as steep as the isotherm
Paths taken, with heat, work and change of energy
pathendsfheat in, Qwork by gas, WΔU = Q − W
Expand, then coolA to B5+11100 J+6600 J+4500 J
Cool, then expandA to B5+7800 J+3300 J+4500 J
Every path from A to B with this gas gains the same energy, 4.50 kJ, because the energy depends only on where the gas is. The work and the heat depend on how it got there.
path; shaded: area under itheat inheat outenergy gainedisotherm (dots) and adiabat (dashes) from A

One mole of ideal gas in three dimensions, changed slowly enough to have one pressure and one temperature all the way. A kilopascal times a litre is a joule. Here W is the work done by the gas, the opposite sign to the demo above. The background is coloured by temperature. For a loop the shading is the area enclosed. The gas in the cylinder is a cartoon: its dots move at a speed proportional to √T but do not collide.

Go deeper:Paths, Adiabats and the Speed of Sound

When a gas at pressure P pushes a piston of area S through a small distance d, the force is PS and the work is PSd, which is P times the small increase in volume. So the work done by the gas is the area under its path in this diagram, counted negative when the gas is being squeezed. A path can only be drawn if the gas has one pressure and one temperature at every moment, so each change must be slow enough for it to settle. Such a path can be followed in either direction and is called reversible. The slam and the free expansion in the first demo have ends but no path between them.

One mole with f ways of moving has U = f/2 RT. Heating it at constant volume takes f/2 R per kelvin. At constant pressure the gas also does work R per kelvin as it expands, so the total is (f/2 + 1)R. The ratio of the two is γ = 1 + 2/f. With no heat at all, the first law says that the energy lost equals the work done, and working that out step by step gives the adiabat:

isotherm: PV = constant,    adiabat: PVγ = constant

Wherever the two cross, the adiabat is γ times as steep, because a gas that is squeezed with no heat escaping also warms up, and pushes back harder. Nicolas Clément and Charles Desormes measured γ for air in 1819 with little more than a large bottle, a tap and a manometer.

Sound is a train of small squeezes. Newton in effect took them to be at constant temperature, which makes the speed √(kT/m), with m the mass of a molecule: 290 m/s in air at 20 °C. The true value is 343 m/s, so Newton was about 15% low. Laplace saw why. The squeezes come too fast for heat to flow from crest to trough, so they are adiabatic, and the air is stiffer by the factor γ:

c = √(γkT/m) = √(1.4 × 8.314 × 293.15 / 0.02897) = 343 m/s

Timing an echo therefore measures γ, and so counts the ways a molecule of air can move. In a loop the gas returns to its starting energy, so whatever net work came out was paid for by net heat going in. See also: Engines.

How Much Heat It Takes

Warm two gases and see why one needs twice the heat, give molecules room to spin, and heat a kilogram of ice until it is steam. Then warm water with a falling weight and no heat at all.

0.00
heat per disc so far, constant area
0.00
heat per disc so far, constant pressure
0.00
of which, into warming the gas
0.00
of which, into lifting the weight
…
heat capacity per disc at constant area, measured (predicted: 1)
…
heat capacity per disc at constant pressure, measured (predicted: 2)
0
finished runs; this one is at 0 %
Both gases end at the heater’s temperature, give or take their flickering. The locked one keeps all its heat as faster molecules. The other has to lift a weight to make room for itself, and that costs as much again: some of the heat leaves as work.
piston lockedpiston free, lifting a weightpredicted

150 discs each, k = 1. The floor and sides are heat baths raised from T = 1 to T = 2.4. A flat gas takes k per disc at constant area and 2k at constant pressure; in three dimensions a gas of single atoms takes 3/2 k and 5/2 k. At constant area the answer is exactly 1, because these discs have nowhere to put energy except motion; at constant pressure it scatters, because the piston jiggles (the ± is the spread from run to run). “Lifting” is the weight times the change of height at this moment, so it jiggles too; a little energy also goes to the piston’s own motion and friction.

Go deeper:From Caloric to the Joule

In the eighteenth century many chemists thought of heat as a substance, caloric, an invisible and weightless fluid that flowed from hot bodies to cold and could be neither made nor destroyed. It explained mixing very well, since heat lost by one body is heat gained by the other. What it could not explain was friction. In 1798 Benjamin Thompson, Count Rumford, reported on the boring of brass cannon in Munich: a blunt borer turned by horses brought water to the boil, and the heat kept coming as long as the horses kept walking. Something that can be drawn out without limit cannot be a substance stored in the metal.

Julius Robert Mayer in 1842, and James Joule in a long series of experiments through the 1840s, put a number on it. Mayer worked from the difference between a gas’s two heat capacities, the same difference you measured in the first panel. Joule stirred water with falling weights, and his figure of 1850, 772 foot-pounds to warm a pound of water by one degree Fahrenheit, comes to 4.15 joules per gram per degree, within 1% of today’s 4.18. A calorie is the heat that warms a gram of water by one degree, now defined as 4.184 J; the Calorie on a food label is a thousand of them. Heat and work are measured in the same unit because they are the same thing, energy, on the move in two different ways.

Heat capacity counts the places a body has to put energy. Each independent way of moving takes an average of ½kT, so a mole with f of them holds f/2 RT: 3/2 R = 12.5 J/(mol K) for helium and argon, and 5/2 R = 20.8 for nitrogen, whose molecules fly in three directions and tumble about two axes. An atom in a solid shakes in three directions, with motion and stretching counted separately, making 3R = 24.9. That is the rule Dulong and Petit announced in 1819.

And it fails, in an orderly way. Two joined atoms should also vibrate, and nitrogen’s at room temperature do not. Diamond holds only a quarter of 3R. Hydrogen, cooled far enough, stops tumbling and behaves like helium. It is as though each motion were switched off below a temperature of its own, and that was one of the first signs that classical physics was not the whole story. See also: The Boltzmann Distribution, Quantum Gases.

Key Takeaways

  • The energy of a gas changes by the heat put in plus the work done on it, ΔU = Q + W, and it keeps no record of which was which.
  • Squeezing warms a gas because molecules rebound faster from an approaching wall; expanding cools it only if it pushes something.
  • Work is the area under the path in the pressure–volume diagram: it depends on the path, and so does the heat, but the change of energy does not.
  • Heat capacity counts the places energy can go: more ways to move, a weight to lift or ice to melt all take heat without adding as much temperature.

Spot a mistake or have an idea?

Search