Thermodynamics · Chapter 4

Engines, Refrigerators and Heat Pumps

Every car engine, power plant and refrigerator runs on one idea: heat flowing from hot to cold can be made to do work, and work can push heat back uphill. In 1824 a young French engineer, Sadi Carnot, worked out the best any such machine could ever do. Here you’ll run his ideal engine and watch the heat and work flow to scale. You’ll push it toward 100% and find out why it can never get there, then run it backward as a refrigerator and a heat pump. Then meet a Stirling engine that runs on a cup of coffee.

Run it as

Live numbers (per cycle, 0.04 mol of gas)

Missions

    What you’re seeing

    The cylinder. A little helium (0.04 mole, 0.16 gram) is trapped under a piston. Under the cylinder slides a strip with three blocks: a hot block at Th, an insulating block, and a cold block at Tc. The gas glows red when hot and blue when cold, and its atoms jiggle faster when it’s hotter. Wavy arrows show heat crossing the bottom.

    The four steps. (1→2) On the hot block the gas expands slowly, staying at Th: heat Qh flows in and the gas pushes the piston out. (2→3) On the insulator the gas keeps expanding and cools down to Tc. (3→4) On the cold block the piston squeezes the gas, which gives heat Qc to the cold block. (4→1) On the insulator again, the squeezing warms the gas back to Th. This is the Carnot cycle.

    The P–V diagram. Pressure against volume. The red curve is the hot isotherm (constant temperature), blue is the cold one, and the two pale curves are the adiabats (no heat in or out). When the gas expands, it does work equal to the area under the curve; when it’s squeezed, work is done on it. The difference, the shaded area inside the loop, is the net work out per cycle.

    The energy flow. Band widths are to scale. Qh enters from the hot side and splits: W leaves as work, and Qc must go to the cold side. The bands light up as each part of the cycle happens. In the backward mode the arrows flip: work goes in, heat is taken from the cold side, and more heat comes out at the hot side.

    The best any engine can do

    A heat engine takes heat Qh from something hot, turns part of it into work W, and gives the rest, Qc, to something cold. Energy is conserved (the first law), so W = Qh − Qc. The efficiency is the share that becomes work:

    e = W / Qh = 1 − Qc / Qh

    Why not make Qc zero? That’s what the Kelvin–Planck statement of the second law forbids: no engine running in a cycle can turn heat from one source completely into work. Entropy explains it. Taking heat Qh out of the hot side lowers its entropy by Qh/Th. The engine returns to its starting state every cycle, so its own entropy doesn’t change. The total can’t go down, so the cold side must gain at least as much: Qc/Tc ≥ Qh/Th. The best case is equality, which a perfectly reversible engine like Carnot’s reaches. That gives the Carnot limit:

    eCarnot = 1 − Tc / Thmaximum efficiency of any engine working between a hot side at Th and a cold side at Tc (both in kelvin)

    Nothing about the engine’s design appears in it, only the two temperatures. As Carnot wrote, the motive power of heat doesn’t depend on what you use to produce it. Steam, air, helium: the limit is the same.

    Worked example: a nuclear power plant

    In OpenStax’s example, a reactor heats pressurized water to 300 °C (573 K), and the steam is condensed at 27 °C (300 K).

    1. Carnot limit: e = 1 − 300/573 = 0.476, or 47.6%.
    2. Real plants: in 2024, U.S. nuclear plants burned 10,443 Btu of heat for every kilowatt-hour they made (their heat rate, from the EIA). One kilowatt-hour is 3,412 Btu, so e = 3,412/10,443 = 32.7%, about 0.7 of the limit.
    3. Heat thrown away per kilowatt-hour sent out: 10,443 − 3,412 = 7,031 Btu, about 2.1 kWh.

    For every unit of electricity on the wires, about two units of heat go into the river, lake or air. That’s what cooling towers are for. They aren’t a sign of waste that better engineering could remove; the second law demands somewhere cold to dump Qc.

    Try this: start at Th = 600 K and Tc = 300 K (50%). Raise Th by 100 K and note the efficiency. Put it back and lower Tc by 100 K instead. Lowering the cold side helps more (67% against 57%), because Tc/Th changes more. But the cold side is usually the air or a river, and you can’t choose its temperature.
    Try this: drag Tc toward zero and watch the cylinder. To cool the gas from Th to Tc with no heat flow, it must expand by (Th/Tc)1/(γ−1). For helium going from 600 K to 20 K that’s 301.5 ≈ 164 times. At 0 K it would be infinite. Turn on the log scales to see the whole cycle.
    Common mistake: “Better engineering could reach 100% efficiency”

    Friction, leaks and heat lost through the walls all make real engines worse, and engineers fight them every day. But even a perfect engine with no friction at all can’t beat 1 − Tc/Th. That limit isn’t about how well the engine is built; it comes from the second law. Reaching 100% would need a cold side at absolute zero, which can’t be reached in any finite number of steps (that’s Chapter 5), and, as the cylinder shows, an infinitely long expansion.

    Real engines against the limit

    How close do real machines get? The bars show actual efficiencies from U.S. government data, beside a few limits worked out from the formulas on this page.

    Carnot engine on this page, 600 K → 300 K50% limit
    Nuclear plant, Carnot limit (300 °C steam, 27 °C cooling)47.6% limit
    U.S. nuclear plants, 2024 average32.7%
    U.S. coal plants, 2024 average31.7%
    Natural-gas turbines alone, 202431.0%
    Natural-gas combined-cycle plants, 202445.2%
    Ideal Otto cycle, compression ratio 10, air60.2% ideal
    Gasoline car: share of fuel energy that moves the car16–25%

    Striped bars are limits worked out from formulas; solid bars are real machines. Plant efficiencies are 3,412 Btu ÷ the EIA’s 2024 average heat rates: nuclear 10,443, coal 10,777, gas turbines 10,999 and combined cycle 7,548 Btu per kWh. A combined-cycle plant burns gas in a turbine, then uses the turbine’s hot exhaust to make steam for a second turbine, so it gets two engines out of one fire. The car figure is the DOE’s range for combined city and highway driving; most of the rest leaves as heat.

    The Otto cycle. A gasoline engine runs, roughly, on the Otto cycle: squeeze the air–fuel mixture fast (no time for heat to leave), burn it almost instantly, let the hot gas push the piston out, and throw out the exhaust. For an ideal Otto cycle the efficiency depends only on the compression ratio r:

    eOtto = 1 − 1 / rγ − 1    with r = 10 and γ = 1.4: 1 − 10−0.4 = 60.2%

    Real car engines get far less than that, between friction, heat lost through the cylinder walls and coolant, pumping air in and out, and running at part throttle most of the time. See the engine up close in How Cars Work: The Engine, and feel a gas heat up when it’s squeezed fast in the bike-pump scene of Gas in a Box.

    A Stirling engine you can watch

    In 1816 Robert Stirling, a Scottish minister, patented an engine that runs on any outside heat source: air sealed inside is heated and cooled over and over, and never leaves. The patent also covered his “economiser”, a store of heat that the air passes through, now called a regenerator. The version below is a low-temperature-difference engine, the kind sold as desk toys that can run on a hot drink. The big foam disk is the displacer: it doesn’t push anything, it just shuffles the air between the hot bottom plate and the cool top plate. The small piston on top does the work. The two are connected to the flywheel a quarter turn apart.

    How it runs. When the displacer rises, the air moves down to the hot plate, warms and expands, and pushes the piston up. When the displacer sinks, the air moves up to the cool plate, contracts, and the pressure drops, so the outside air pushes the piston back down. Because the displacer moves a quarter turn ahead of the piston, the pressure is high while the piston rises and low while it falls, so each turn leaves some work for the flywheel. That’s the loop on the pressure–volume graph: its area is the work per turn.

    What to try. On the coffee, give it a spin and it settles into a steady speed where the work per turn balances friction. On the hot plate it runs faster. On the table, nothing: with no temperature difference the loop has no area. On ice, the bottom plate is colder than the top, so the loop runs the other way. Spin it backward and it keeps going in reverse, taking heat from the warm room air and giving it to the ice.

    Refrigerators and heat pumps

    Run the cycle backward and it becomes a refrigerator: work goes in, heat Qc is pulled out of the cold side, and heat Qh = Qc + W comes out at the hot side. A fridge’s cold side is the food; its hot side is the coils on the back, warming your kitchen. A heat pump is the same machine aimed the other way: the cold side is the outdoors and the hot side is your house. Both are rated by a coefficient of performance, what you get divided by what you pay for:

    refrigerator: KR = Qc / W ≤ Tc / (Th − Tc)     heat pump: KP = Qh / W ≤ Th / (Th − Tc)

    The smaller the temperature difference, the bigger the COP. Unlike an efficiency, a COP is usually bigger than 1. Try the calculator:

    Worked example: heating a house

    Indoors 21 °C (294.15 K), outdoors 0 °C (273.15 K). The best possible heating COP is 294.15/(294.15 − 273.15) = 294.15/21 = 14.0.

    Real heat pumps get far less. The DOE says they can provide up to three times more heat than the energy they use. Why the gap? Heat only flows from hot to cold, so the refrigerant in the outdoor coil must be colder than the outdoor air to soak up its heat, and the refrigerant indoors must be hotter than the room to give heat away. Suppose the coils run at −10 °C and 45 °C: then the limit is 318.15/55 = 5.8. Friction, the fans and the pump take the rest.

    Now let it get cold: at −15 °C (5 °F) outside, the limit falls to 294.15/36 = 8.2. The DOE’s Cold Climate Heat Pump Challenge asked makers for a COP of at least 2.1 to 2.4 at that temperature. Even so, every unit of electricity brings in more than two units of heat. An electric baseboard heater gives exactly one.

    Common mistake: “A heat pump makes heat”

    A heat pump doesn’t make heat; it moves it. A furnace or an electric heater turns fuel or electricity into heat, and can never give more heat than the energy you put in. A heat pump uses electricity to carry heat that’s already outdoors (yes, even in freezing air, which still holds plenty of thermal energy) up to the warmer house. The heat delivered is the heat moved plus the electricity used: Qh = Qc + W. Energy is conserved; nothing comes from nowhere. And it gets harder as the outdoors gets colder, because the heat must be lifted across a bigger temperature difference. The same machine runs backward in summer as an air conditioner. To learn how real systems are installed and serviced, see the HVAC course.

    A little history

    Sadi Carnot (1796–1832) was a French military engineer. In 1824, when steam engines were spreading fast but no one could say how good they could get, he published a short book, Réflexions sur la puissance motrice du feu et sur les machines propres à développer cette puissance (“Reflections on the motive power of fire and on machines fitted to develop that power”), in Paris. In it he imagined the ideal cycle now named for him, and saw that only the temperatures matter:

    La puissance motrice de la chaleur est indépendante des agens mis en œuvre pour la réaliser ; sa quantité est fixée uniquement par les températures des corps entre lesquels se fait en dernier résultat le transport du calorique.

    “The motive power of heat is independent of the agents employed to realize it; its quantity is fixed solely by the temperatures of the bodies between which is effected, finally, the transfer of the caloric.”

    Sadi Carnot, Réflexions sur la puissance motrice du feu (Paris: Bachelier, 1824); English from the translation edited by R. H. Thurston (1890; 2nd ed. 1897). The spelling “agens” is the 1824 original.

    Carnot still thought of heat as a fluid, “caloric”, that falls from hot to cold like water turning a mill wheel. That part was wrong, but his limit survived. The book got little notice at first, and Carnot died of cholera at 36. Émile Clapeyron drew his cycle on a pressure–volume graph in 1834. In the 1850s William Thomson (Lord Kelvin) and Rudolf Clausius rebuilt Carnot’s ideas on the conservation of energy, and the second law was born.

    Where you see it

    • Cars: the radiator and the hot tailpipe are where Qc goes. How Cars Work: The Engine shows the four strokes.
    • Power plants: coal, gas and nuclear plants are all heat engines, and most need a river, lake, sea or cooling tower for their cold side.
    • Refrigerators and air conditioners: the warm coils on the back of a fridge and the hot air blowing out of an air conditioner’s outdoor unit are Qh.
    • Heat pumps: they heat homes in winter, cool them in summer, and heat water too. The HVAC course covers them in practice.
    • Bike pumps and diesel engines: squeezing a gas fast warms it, like steps 4→1 here. A diesel squeezes air so hard that fuel sprayed in ignites by itself.

    How the simulation works

    The Carnot engine. Nothing here is stepped in time: the cycle follows exact formulas for 0.04 mol of ideal gas, starting from 1 liter at Th. On the isotherms PV = nRT with T fixed, and the heat is Q = nRT ln(Vend/Vstart). On the adiabats TVγ−1 stays the same and the work is nCVΔT. The animation moves the volume smoothly along each curve. Helium (γ = 5/3) and air (γ = 7/5) are treated as ideal gases; R = 8.314462618 J/(mol·K), exact.

    The Stirling engine. An ideal “isothermal” model: the air touching each plate has that plate’s temperature, the pressure is the same everywhere, P = nR/(Vhot/Th + Vcold/Tc), and the air was sealed in at room temperature and pressure. The displacer sweeps 31 cm³, the piston is 16 mm across with a 12 mm stroke, and there are 16 cm³ of gaps. The flywheel (moment of inertia 10−4 kg·m²) feels the gas torque, a small dry friction and a drag growing with speed; it is stepped 40 times per frame. Real air never fully takes on the plate temperatures, so real engines of this size turn slower and give less power than this ideal one.

    The heat pump. The curve is the Carnot limit between indoor and outdoor air. The pink mark is the DOE’s cold-climate requirement, not a measurement of any one machine.

    How it was checked (Node.js tests):

    • Carnot cycle, four cases (600 K→300 K, 1500 K→300 K in air, 400 K→350 K, 600 K→20 K): ∮P dV by the midpoint rule with 80,000 steps matched Qh − Qc to 4 decimals (69.1578 J for 600→300 K); W/Qh equaled 1 − Tc/Th; Qh/Th − Qc/Tc = 0; the gas’s entropy returned to its start (error 10−16 J/K) and the cycle closed exactly.
    • Volume ratios: 5.7 for helium from 600 K to 300 K with V2/V1 = 2; 329 when Tc = 20 K.
    • Stirling engine: the work per turn (Simpson’s rule) agreed to 14 digits with 720 and 7,200 slices; it was 15.7 mJ on the coffee, 28.0 mJ on the hot plate, exactly 0 on the table and −9.2 mJ on ice. Steady speeds: 3.1 turns per second on the coffee, 6.3 on the hot plate, 1.1 backward on ice, and it stops on the table. Over a 70-second run, the gas’s work equaled friction losses plus the flywheel’s change in kinetic energy to within 0.001%.
    • Heat rates: 3,412/10,443 = 32.7%, 3,412/10,777 = 31.7%, 3,412/10,999 = 31.0%, 3,412/7,548 = 45.2%; Otto with r = 10: 60.2%; heat pump limits for 21 °C indoors: 14.0 at 0 °C, 8.2 at −15 °C, 6.4 at −25 °C.

    Check yourself

    1. An engine runs between 500 K and 300 K. What is the most efficient it could possibly be?

      Show the answer

      1 − 300/500 = 0.40. No engine between these temperatures can do better, however well it’s built.

    2. Why does a power plant need a cooling tower, a river or the sea?

      Show the answer

      That’s the Kelvin–Planck statement: no engine can turn all the heat it takes in into work. The rest, Qc, must go somewhere colder.

    3. A heat pump with a COP of 3 uses 1 kWh of electricity. Where do the 3 kWh of heat come from?

      Show the answer

      Qh = Qc + W: the heat delivered is the heat moved from outdoors plus the electricity used. Energy is conserved.

    4. Why does a heat pump’s COP fall in very cold weather?

      Show the answer

      The bigger Th − Tc, the more work it takes to move each joule. Cold air still holds heat; it just takes more effort to pump it uphill.

    5. A Carnot engine runs between 600 K and 300 K. Which raises its efficiency more?

      Show the answer

      1 − 300/700 = 57%, but 1 − 200/600 = 67%. A 100 K change at the cold end is a bigger fraction of its temperature.

    6. The Stirling engine sits on a table at room temperature, the same as the air above it. What happens when you spin it?

      Show the answer

      With no temperature difference the pressure–volume loop has no area, so the gas does no net work. Friction stops it.

    Sources

    Saved on this device only.
    @teddyrookbook GitHub