Heat Engines & Thermodynamic Cycles · Guide · glidepathscience.org
GuideHeat Engines & Thermodynamic Cycles
Contents
This Guide explains the ideas and equations behind every Walkthrough step, Concept Challenge question and Predict round, in the order a textbook takes them. Part 1 prepares the Intro track and Part 2 the Advanced track; each takes about a quarter of an hour to read. Each section ends with a worked example that is not one of the sim’s own problems. One sign convention holds throughout: $Q$ is heat into the gas, $W$ is work done by the gas.
Part 1 · The essentials
Math you’ll need: algebra, areas of rectangles and trapezoids, and the natural logarithm; calculus only in the boxes marked “With calculus”, which you can skip.
An engine is a gas going around a loop
A car engine, a jet, a power plant and a refrigerator look nothing alike, yet each one does the same thing over and over: it takes a working substance, usually a gas, through a sequence of changes and brings it back to where it started. Heat goes in at some stages and out at others; the gas pushes on a piston or a turbine blade at some stages and is pushed back at others. Because the gas returns to its starting state, the machine can repeat the sequence forever. That repeated sequence is a cycle.
The tool for following a cycle is the pV diagram, a graph of the gas’s pressure $p$ against its volume $V$. Every equilibrium state of a fixed amount of gas is one point on it, and every slow change is a curve. This Guide shows that the area under a curve on the diagram is the work the gas does, so the area inside a closed loop is the net work of one cycle. It then keeps the books of energy for each stage, finds how efficient a cycle can be, and turns the loop around to make a refrigerator or a heat pump.
Work is the area under the path
A gas pushes on every wall it touches. If one wall is a piston of area $A$ and the gas’s pressure is $p$, the force on the piston is $pA$. When the piston moves out a small distance $dx$, the gas does work $pA\,dx$ on it, and $A\,dx$ is the small change in volume, $dV$. So the work done by the gas is the pressure times the change in volume. At constant pressure it is simply
$W = pΔV$
where $p$ is the pressure and $ΔV = V_2 − V_1$ is the change in volume. With $p$ in kilopascals and $V$ in liters the product is already in joules, because 1 kPa × 1 L = 10³ Pa × 10⁻³ m³ = 1 J. The sign carries meaning: an expanding gas pushes the piston out and does positive work; a compressed gas has work done on it, so the work it does is negative.
When the pressure changes along the way, add up the small pieces. Each piece $p\,dV$ is a thin strip under the curve on the pV diagram, so the work is the area under the path, counted positive when the volume grows. Under a straight line it is a trapezoid: the average of the two pressures times $ΔV$, not either pressure alone.
The figure makes the key point. Two paths between the same two states sweep different areas, so the gas does different amounts of work. Work depends on the path, not just on where the gas starts and ends. Work is energy on the move, not something a gas contains.
The first law and its signs
A gas’s internal energy $E_{int}$ is the total energy of its molecules’ random motion. Unlike heat and work, it belongs to the state: two samples of the same gas at the same temperature, pressure and volume have the same $E_{int}$, however they got there. Energy can enter or leave the gas in only two ways here: as heat $Q$, which flows because of a temperature difference, and as work $W$. Energy conservation for the gas is the first law of thermodynamics:
$ΔE_{int} = Q − W$
where $Q$ is the heat into the gas and $W$ the work done by it. Heat in raises the internal energy; work done by the gas lowers it, because the gas spends some of its energy pushing the piston. Each quantity carries its sign: heat that leaves is a negative $Q$, and work done on the gas is a negative $W$.
Many students meet the first law first in AP Physics, written $ΔU = Q + W$. That is the same law with another choice of sign: there $U$ is the internal energy and $W$ is the work done on the gas, which is $−W$ in this sim’s notation. Mixing the two, adding this sim’s $W$ to $Q$, is the most common mistake in the whole topic. Pick one convention and say it out loud each time.
The first law also shows why a gas can do work without getting hotter, or get hotter without any heat: only the difference $Q − W$ changes $E_{int}$.
The four processes
Four simple processes make up most cycles, and the first law fills in each one’s books its own way. For an ideal gas the internal energy depends on the temperature alone: for a monatomic gas such as helium, $E_{int} = \tfrac32 nRT$, where $n$ is the amount in moles, $R$ = 8.314 J/(mol·K) and $T$ the absolute temperature. So no change in temperature means no change in $E_{int}$.
| process | held fixed | $W$ | $Q$ | $ΔE_{int}$ |
|---|---|---|---|---|
| isochoric | volume | 0 | $nC_VΔT$ | $= Q$ |
| isobaric | pressure | $pΔV = nRΔT$ | $nC_pΔT$ | $nC_VΔT$ |
| isothermal | temperature | $nRT\ln(V_2/V_1)$ | $= W$ | 0 |
| adiabatic | no heat flows | $= −ΔE_{int}$ | 0 | $nC_VΔT$ |
In an isothermal change the gas sits on a reservoir and changes slowly enough to keep its temperature. Its internal energy does not change, so every joule of work out came in as heat: $Q = W$. No temperature change does not mean no heat. On the pV diagram the path is a hyperbola, $p ∝ 1/V$.
In an adiabatic change no heat flows, either because the gas is insulated or because the change is too fast for heat to move. Then $ΔE_{int} = −W$: a gas squeezed fast ($W$ < 0) gets hotter, which is why a bicycle pump warms up, and a gas that expands with no heat in cools. On the pV diagram an adiabat is steeper than the isotherm through the same point.
In an isobaric change, heated at constant pressure, the gas both warms and lifts the piston, so it needs more heat than the same warming at constant volume.
Heat capacities
The molar heat capacity is the heat needed to warm one mole of a gas by one kelvin, and it depends on how the heat is added. At constant volume no work is done, so all the heat becomes internal energy: $Q = nC_VΔT$, with $C_V = \tfrac32R$ for a monatomic gas. At constant pressure the gas also does work $nRΔT$ lifting the piston, so
$C_p = C_V + R$
Molecules with more than one atom also store energy in rotation. For nitrogen and air, $C_V = \tfrac52R$ and $C_p = \tfrac72R$. The ratio $γ = C_p/C_V$ is 5/3 for a monatomic gas and 7/5 for a diatomic one; it sets the shape of adiabats. Where the $\tfrac32$ and $\tfrac52$ come from, equipartition, is Kinetic Theory & Gas Laws’ story.
At constant pressure the share of the heat that becomes work is $nRΔT/(nC_pΔT) = R/C_p$: 2/5 for helium and 2/7 for nitrogen, which keeps more of its heat as rotation.
Cycles and efficiency
When a gas goes around a closed loop on the pV diagram, it ends in the state it started in, so its internal energy is back where it was: around a cycle $ΔE_{int}$ = 0. The first law then says the net heat into the gas equals the net work it does. Along the top of a clockwise loop the gas expands at high pressure and does a lot of work; along the bottom it is compressed at low pressure and less work is done on it. The difference, the net work, is the area inside the loop. A clockwise loop is an engine; a counterclockwise loop needs net work in.
An engine takes in heat $Q_h$ at the stages where heat flows in and rejects heat $Q_c$ where it flows out; here $Q_h$, $Q_c$ and $W$ are magnitudes. Since $W = Q_h − Q_c$, its efficiency, the share of the heat taken in that comes out as work, is
$e = W/Q_h = 1 − Q_c/Q_h$
Count $Q_h$ carefully: add up the heat on every stage where heat goes in. Dividing by the net heat instead would give 100 % for every engine, since the net heat equals $W$.
Refrigerators and heat pumps
Run a cycle backward, counterclockwise, and it takes heat $Q_c$ in at the cold side and rejects $Q_h$ at the hot side, with work $W$ put in. Energy balance gives $Q_h = Q_c + W$. A refrigerator is rated by how much heat it removes per joule of work, its coefficient of performance, and a heat pump by how much heat it delivers:
$K_R = Q_c/W$ $K_P = Q_h/W = K_R + 1$
Both are often well above 1. That is no free energy: the machine moves heat from one place to another rather than making it, and the work it uses arrives at the hot side too.
This is why a refrigerator with its door open in a closed kitchen warms the kitchen: the heat it takes from the open box comes from the kitchen and goes back into it, plus the compressor’s work.
The second law and Carnot’s limit
Energy conservation would allow an engine that turns all its heat into work. Nature does not. The Kelvin–Planck statement of the second law says no cyclic engine can take in heat from one reservoir and turn all of it into work: some heat must always go to a colder reservoir. The Clausius statement says heat never flows from a colder body to a hotter one on its own, so a refrigerator needs work. They are one law: a perfect engine could drive a refrigerator and together they would move heat uphill with nothing else changed, and a perfect refrigerator paired with an ordinary engine would make a perfect engine.
Sadi Carnot found the best any engine can do. A reversible engine, one that runs so slowly that no heat ever crosses a temperature difference, takes in heat only at $T_h$ and rejects it only at $T_c$. No engine working between the same two temperatures can be more efficient, and every reversible one has the same efficiency:
$e_C = 1 − T_c/T_h$
with both temperatures absolute, in kelvins. In degrees Celsius the ratio means nothing, since 0 °C is not zero temperature. The limit depends on the two temperatures alone, not on the gas, the size or the craftsmanship: a better-built engine can approach it but never pass it.
Part 2 · Going further
Math you’ll need: integrals of $1/V$ and $V^{−γ}$, logarithms and exponents; this part also uses entropy as $∫dQ/T$.
Reversible and irreversible processes
A quasi-static process passes through a continuous series of equilibrium states, slowly enough that the gas has one pressure and one temperature at every moment; drawn on the pV diagram, it is a curve. Real processes happen at finite speed. When the weights on a piston are removed at once, the gas expands against the steady outside pressure, rushes, swirls and settles: the states in between are not equilibrium states, so the process has no path on the diagram. Only its end states are points on it.
The first law still holds, between the end states. In a free expansion, gas rushing into a vacuum inside an insulated box, nothing pushes back, so $W$ = 0; insulated, $Q$ = 0; so $ΔE_{int}$ = 0, and an ideal gas keeps its temperature. In a sudden expansion against a steady outside pressure $p_{ext}$, the gas does $W = p_{ext}ΔV$, less than the reversible $∫p\,dV$ between the same states. If it ends at the same temperature, the work it failed to do is lost for good. Why such a process never runs backward on its own is Entropy & the Second Law’s story.
Adiabats, polytropes, and where a leg’s heat turns
With no heat, the first law for a small step reads $nC_V\,dT = −p\,dV$. Using $p = nRT/V$ and separating variables gives $C_V\,dT/T = −R\,dV/V$; integrating, $T V^{R/C_V}$ is constant. Since $R/C_V = γ − 1$, a reversible adiabat obeys
$TV^{γ−1}$ = constant $pV^γ$ = constant
and its work is $W = (p_1V_1 − p_2V_2)/(γ − 1) = −nC_VΔT$. A polytropic process $pV^k$ = constant generalizes all four: $k$ = 0 is isobaric, $k$ = 1 isothermal, $k$ = γ adiabatic, and $k → ∞$ isochoric. Its molar heat capacity, $C_V − R/(k − 1)$, is negative for $1 < k < γ$: the gas takes in heat while it cools, because it does more work than the heat supplies.
Along a straight leg $p = a + bV$, the heat need not keep one sign. Writing $dQ = dE_{int} + p\,dV$ along the line gives $dQ/dV = a(1 + f/2) + bV(1 + f)$, with $f = 2C_V/R$ (3 for a monatomic gas). It changes sign at $V^{∗}$, where the line is tangent to an adiabat. Before $V^{∗}$ the line crosses adiabats outward and heat flows in; after it, heat flows out. An efficiency calculation must split such a leg: its net heat is not its heat in.
Real cycles: Otto, Diesel, Brayton and Stirling
Engineers analyze engines with air-standard cycles: air treated as an ideal gas of constant γ, the burning of fuel replaced by heat added from outside, no friction or leaks. A gasoline engine’s ideal is the Otto cycle: adiabatic compression by the compression ratio $r = V_{max}/V_{min}$, heat in at constant volume (the spark), adiabatic expansion (the power stroke) and heat out at constant volume (the exhaust). Its efficiency depends on $r$ alone:
$e = 1 − r^{1−γ}$
A Diesel cycle compresses air far more, enough to ignite injected fuel without a spark, and adds its heat at constant pressure while the piston moves out. A jet engine or gas turbine follows the Brayton cycle: a compressor, a combustor at constant pressure, a turbine, and exhaust at constant pressure. With the pressure ratio $r_p$,
$e = 1 − r_p^{−(γ−1)/γ}$
Why do these fall short of Carnot between their own hottest and coldest temperatures? Not through friction, which the model leaves out, but because their heat crosses temperature differences. The Otto cycle takes in heat while its temperature climbs from the end of compression to its peak, and rejects heat while it falls back. The average temperature at which heat enters, the logarithmic mean $(T_3 − T_2)/\ln(T_3/T_2)$ for a constant-volume leg, is well below the peak, and the average for heat out is well above the coldest; between those two mean temperatures Carnot’s formula gives exactly Otto’s efficiency.
The Stirling cycle joins two isotherms by two constant-volume legs. Without help, the hot reservoir must also rewarm the gas on the constant-volume leg, so it falls short of Carnot. A regenerator, a mesh that stores the heat given up on the way down and returns it on the way up, removes that cost; with a perfect one, every exchange with the reservoirs is isothermal and the cycle reaches $1 − T_c/T_h$.
Entropy, the T–S diagram and lost work
Along the hot isotherm of a Carnot cycle the gas takes in $Q_h = nRT_h\ln(V_b/V_a)$; along the cold one it rejects $Q_c = nRT_c\ln(V_c/V_d)$. The adiabats fix $V_b/V_a = V_c/V_d$, so
$Q_h/T_h = Q_c/T_c$
and $e_C = 1 − Q_c/Q_h = 1 − T_c/T_h$ for any ideal gas. The quantity $Q/T$ carried in at the hot side and out at the cold side is a change of entropy. On a reversible path, $ΔS = ∫dQ_{rev}/T$; for an ideal gas this gives $ΔS = nC_V\ln(T_2/T_1) + nR\ln(V_2/V_1)$, which depends only on the end states, so entropy is a state variable. A reservoir that gives up heat $Q$ at temperature $T$ changes by $−Q/T$.
The second law in its general form says the entropy of the universe never decreases: $ΔS_{universe} ≥ 0$, with equality only for reversible processes. For an engine whose gas returns to its start each cycle, only the reservoirs change: $ΔS = −Q_h/T_h + Q_c/T_c$. A claimed engine that makes this negative breaks the second law, even if it conserves energy. A real engine makes it positive, and the work it loses compared with a Carnot engine taking in the same heat is exactly $T_cΔS_{universe}$.
On a T–S diagram, temperature against entropy, the heat on a reversible leg is the area under it, isotherms are horizontal and reversible adiabats vertical. A Carnot cycle is a rectangle whose area is the work; other cycles take in heat over a range of temperatures, which the diagram shows at a glance. What entropy counts at the level of molecules is Entropy & the Second Law’s story; here it is heat over temperature.
Carnot’s refrigerator and heat pump
Run backward between $T_c$ and $T_h$, a Carnot cycle moves heat uphill with the least work possible. Using $Q_h/T_h = Q_c/T_c$ in the definitions of the coefficients gives
$K_R = T_c/(T_h − T_c)$ $K_P = T_h/(T_h − T_c)$
The denominator is the lift, $T_h − T_c$. A small lift makes a large coefficient, which is why heat pumps work best in mild weather and why a freezer, with a larger lift than a refrigerator, needs more work for each joule it removes. As the outdoor temperature falls, a heat pump’s lift grows and its coefficient falls: the trouble is not that cold air holds no heat, but that each joule must be lifted farther.
Real machines fall well below Carnot. Their refrigerant must be colder than the space it cools and hotter than the space it heats, so heat flows at a useful rate, and the compressor has losses. The Heat Pump Lab models both with an illustrative 10 K difference at each coil and 0.60 of Carnot.
Efficiency at maximum power
A Carnot engine is reversible only because it runs infinitely slowly, with no temperature difference across which its heat flows; it therefore delivers no power. A real plant must move heat at a finite rate, which needs temperature differences between the reservoirs and the working substance, and these cost efficiency. Curzon and Ahlborn modeled an engine that is reversible inside but exchanges heat through fixed thermal conductances (an endoreversible engine). Choosing its internal temperatures to give the most power, they found the efficiency at maximum power to be
$e = 1 − \sqrt{T_c/T_h}$
This result holds for that idealized model only, but it often lands closer to real plants’ efficiencies than Carnot’s limit does. An engine built for power runs well below Carnot by design. How fast heat flows through a wall is Heat Transfer & Insulation’s subject.
Reference
Common mistakes
Part 1
- Treating work as something a gas has: work and heat depend on the path; only $E_{int}$ belongs to the state.
- Using AP’s $ΔU = Q + W$ with this sim’s $W$ (work by the gas): with $W$ by the gas, $ΔE_{int} = Q − W$.
- Taking no temperature change to mean no heat (an isotherm takes in heat equal to its work), or no heat to mean no temperature change (an adiabat heats or cools).
- Taking a loop’s net work as zero because the gas returns to its start: only $E_{int}$ returns; the work is the area inside.
- Dividing the work by the net heat to get an efficiency: $Q_h$ is the heat taken in.
- Using degrees Celsius in $1 − T_c/T_h$.
- Expecting an open refrigerator to cool a closed kitchen: it warms it by its compressor’s work.
Part 2
- Counting a leg’s net heat as its heat in: a straight leg can take heat in, then give it out, past $V^{∗}$.
- Using the reversible work $nRT\ln(V_2/V_1)$ for a sudden expansion, which does only $p_{ext}ΔV$.
- Blaming friction for an ideal cycle falling short of Carnot: the cause is heat crossing temperature differences.
The equation sheet
| Part 1 | |
|---|---|
| work | $W = pΔV$; $W = ∫p\,dV$ |
| first law | $ΔE_{int} = Q − W$ |
| internal energy | $E_{int} = \tfrac32 nRT$ |
| isothermal | $W = nRT\ln(V_2/V_1)$ |
| constant volume | $Q = nC_VΔT$ |
| constant pressure | $Q = nC_pΔT$, $C_p = C_V + R$ |
| efficiency | $e = W/Q_h = 1 − Q_c/Q_h$ |
| refrigerators | $K_R = Q_c/W$; $K_P = Q_h/W$ |
| Carnot | $e_C = 1 − T_c/T_h$ |
| Part 2 | |
|---|---|
| sudden step | $W = p_{ext}ΔV$ |
| adiabat | $pV^γ$ and $TV^{γ−1}$ constant; $W = (p_1V_1 − p_2V_2)/(γ − 1)$ |
| Otto | $e = 1 − r^{1−γ}$ |
| Brayton | $e = 1 − r_p^{−(γ−1)/γ}$ |
| Carnot’s books | $Q_h/T_h = Q_c/T_c$ |
| entropy | $ΔS = ∫dQ_{rev}/T$; $ΔS_{res} = −Q/T$ |
| Carnot backward | $K_R = T_c/(T_h − T_c)$; $K_P = T_h/(T_h − T_c)$ |
| maximum power | $e = 1 − \sqrt{T_c/T_h}$ |
Symbols: $p$ pressure (kPa); $V$ volume (L), so $pV$ is in joules; $T$ absolute temperature (K); $n$ amount (mol); $R$ = 8.314 J/(mol·K); $E_{int}$ internal energy; $Q$ heat into the gas; $W$ work done by the gas; $C_V$ and $C_p$ molar heat capacities, $γ = C_p/C_V$; $Q_h$, $Q_c$ the heat at the hot and cold sides and, in engine and refrigerator formulas, $W$ the work, all as magnitudes; $e$ efficiency; $K_R$, $K_P$ coefficients of performance; $r$ a compression ratio and $r_p$ a pressure ratio; $S$ entropy; $p_{ext}$ an outside pressure. Some books write $U$ for $E_{int}$ and $P$ for $p$.
Sources and further reading
- OpenStax, University Physics Volume 2, by Samuel J. Ling, Jeff Sanny and William Moebs (CC BY-NC-SA 4.0): Chapter 3, The First Law of Thermodynamics, and Chapter 4, The Second Law of Thermodynamics. This Guide follows their order and notation in its own words.
- F. L. Curzon and B. Ahlborn, “Efficiency of a Carnot engine at maximum power output,” American Journal of Physics 43, 22 (1975).
- Any engineering thermodynamics text for the air-standard cycles in more depth.
- This sim’s Field Manual (H): the model, its conventions and what it leaves out.
Heat Engines & Thermodynamic Cycles v1.1 · © 2026 Dr. David Meier · CC BY-NC-SA 4.0 · glidepathscience.org