The idea: heat in hot, heat out cold, work in between

A heat engine takes heat from something hot, turns part of it into work, and dumps the rest into something cold. Sadi Carnot asked in 1824 how much of the heat any engine could turn into work. His answer is an ideal engine that runs a gas round four slow strokes, the Carnot cycle. On the page the gas is 1 mol of helium in a cylinder. It stands on a hot block (the hot reservoir, Th), an insulator, or a cold block (the cold reservoir, Tc). Plot its pressure P against its volume V and the four strokes close into a loop.

P–V diagram of the Carnot cycle between 500 K and 300 K: the red isotherm A to B, the grey adiabat B to C, the blue isotherm C to D and the grey adiabat D to A form a clockwise loop whose shaded area is W = 1152 J; heat Q_h = 2881 J enters on A→B and Q_c = 1729 J leaves on C→D; efficiency 1152 / 2881 = 40%
The four strokes form a clockwise loop: heat enters only on the hot isotherm, leaves only on the cold one, and the area inside is the work.

The four strokes

An isothermal stroke keeps the temperature fixed: the gas touches a reservoir, so heat flows to keep T steady. An adiabatic stroke lets no heat through (Q = 0): the gas pays for the work out of its own energy and cools, or is warmed by the work done on it. For a monatomic gas T·V2/3 stays constant on an adiabat, so an adiabat falls more steeply than an isotherm. With Th = 500 K and Tc = 300 K (Demo: one cycle):

strokestandVQ inW by gasΔU
A→B isothermal expansionhot, 500 K10 → 20 L+2881 J+2881 J0
B→C adiabatic expansioninsulator20 → 43.0 L0+2494 J−2494 J
C→D isothermal compressioncold, 300 K43.0 → 21.5 L−1729 J−1729 J0
D→A adiabatic compressioninsulator21.5 → 10 L0−2494 J+2494 J

Each row obeys the first law, Q = W + ΔU. An ideal gas's energy depends only on T, so ΔU = 0 on the isotherms and Q = W there: Q = nRT·ln(Vend/Vstart) = 8.314 × 500 × ln 2 = 2881 J. On the adiabats W = n·Cv·ΔT = 1.5 × 8.314 × 200 = 2494 J, once out and once in, so they cancel.

Why the loop's area is the work

When the gas pushes the piston out by a small volume dV it does work P·dV, a thin strip under the curve. Expanding along the top of the loop (A→B→C) the gas does the whole area under the top edge. Compressing along the bottom (C→D→A) the flywheel does the area under the bottom edge on the gas. What is left over, top minus bottom, is the area inside the loop: W = ∮ P dV. A clockwise loop gives positive work (an engine); counter-clockwise gives negative work (work goes in). The page shades the loop when a cycle is done.

Efficiency depends only on the two temperatures

After a full cycle the gas is back at A, so ΔU = 0 and W = Qh − Qc. The efficiency is the share of the heat that became work, η = W/Qh. Both isotherms have the same volume ratio (2 here), so Qh/Th = Qc/Tc = nR·ln 2 = 5.76 J/K. That gives

η = 1 − Qc/Qh = 1 − Tc/Th

The gas, the volumes and the size of the engine drop out. Only the temperatures (in kelvin) matter:

ThTcQhQcWη = 1 − Tc/Th
500 K300 K2881 J1729 J1152 J40%
600 K300 K3458 J1729 J1729 J50%
400 K300 K2305 J1729 J576 J25%
600 K400 K3458 J2305 J1153 J33%

A hotter source widens the loop (Demo: hotter source); a small gap makes it thin (Demo: small gap). The same 200 K gap is worth less at higher temperatures: 600 → 400 K gives 33%, not 40% (Demo: same 200 K gap).

Run backwards: a refrigerator

Every Carnot stroke is reversible, so the loop can be run the other way: A→D→C→B→A, counter-clockwise. Now the gas expands on the cold block and takes in Qc, is compressed on the hot block and gives out Qh, and the flywheel must put in W = 1152 J. That is a refrigerator (or heat pump). Its figure of merit is the coefficient of performance, COP = Qc/W = Tc/(Th − Tc) = 1729/1152 = 1.5 (Demo: run it backwards).

Two energy-flow diagrams side by side. Engine: 2881 J flows from the 500 K hot reservoir into the gas, 1152 J leaves as work and 1729 J flows to the 300 K cold reservoir. Refrigerator: 1152 J of work goes in, 1729 J is taken from the cold reservoir and 2881 J is dumped into the hot one
The same three numbers with every arrow reversed: an engine turns heat into work, a refrigerator uses work to pump heat uphill.

Why nothing beats Carnot

Suppose some engine had a higher efficiency than a Carnot engine between the same reservoirs. Use its work to drive the Carnot engine backwards as a refrigerator. The pair would move heat from cold to hot with no work from outside, which the second law of thermodynamics forbids (Clausius). So no engine between Th and Tc can beat 1 − Tc/Th, and every reversible engine reaches it. In entropy terms, the gas takes entropy Qh/Th = 5.76 J/K from the hot side and hands exactly 5.76 J/K to the cold side; any friction or heat leak would create extra entropy and lower η. A real power plant with steam at 800 K and a river at 300 K could reach at most 62%; real ones get about 40%.

See also the ideal gas and the Maxwell–Boltzmann distribution, which explains why temperature is the average kinetic energy of the molecules and where P = nRT/V comes from, and the heat equation for how heat spreads through a solid.

What the page leaves out

A Carnot engine must run infinitely slowly: heat only flows through a temperature difference, so a real isotherm needs the gas slightly cooler than the hot block, which costs efficiency and is why real engines run other cycles (Otto, Diesel, Rankine, Stirling, Brayton). The page has no friction, no heat leaks and no flywheel drawn, uses an ideal monatomic gas with a fixed 2:1 isothermal volume ratio, and does not show entropy on a T–S diagram, where the Carnot cycle is a rectangle.