Compressing a gas can warm it even without a heater. Work is another path for energy transfer into the system.
English narration · English + 中文 subtitles burned in
9.1
Scope and prerequisites
This handout teaches B.4 Thermodynamics in full, for the course first assessed in 2025. The whole unit is additional higher level (AHL); there is no SL counterpart.
Prerequisites: internal energy and $\overline{E}_k = \frac{3}{2}k_BT$ from B.1; $PV = nRT$, $P$–$V$ diagrams and $U = \frac{3}{2}nRT$ from B.3; work as energy transferred from A.3. Quantitative problems use monatomic ideal gases. Use $R = 8.31\ \text{J K}^{-1}\ \text{mol}^{-1}$ and $k_B = 1.38 \times 10^{-23}\ \text{J K}^{-1}$.
9.2
AHL: Systems and the first law
Why can't a power station use all its fuel energy?
A power-station model receives fuel energy at 1300 MW but delivers only 500 MW of electricity; the rest warms a river or the air through its cooling towers. Better engineering helps, but no design, however perfect, could turn all of that heat into work. Ice melts in a warm drink, but a cold drink never spontaneously freezes into ice while warming the room. Thermodynamics explains both: the first law counts energy, and the second law says which way energy can flow.
A power station is a heat engine: it converts heat into useful work.
Closed and isolated systems
A closed system 封闭系统 exchanges no mass with its surroundings but can exchange energy, as heat or as work. A gas sealed in a cylinder with a piston is a closed system.
An isolated system 孤立系统 exchanges neither mass nor energy. The universe as a whole is an isolated system.
The first law of thermodynamics
The first law of thermodynamics 热力学第一定律 is conservation of energy for a closed system:
$$Q = \Delta U + W$$
$Q$ is the thermal energy supplied to the system: positive if heat enters, negative if heat leaves.
$\Delta U$ is the change in the system's internal energy.
$W$ is the work done by the system: positive when the gas expands, negative when it is compressed (work done on the system).
Worked example: 300 J of heat enters a gas and the gas does 120 J of work pushing a piston out. $\Delta U = Q - W = 300 - 120 = 180\ \text{J}$, so a fixed amount of ideal gas warms. If instead 120 J of work were done on the gas, $W = -120\ \text{J}$ and $\Delta U = 420\ \text{J}$.
Explore
Two sign conventions, one energy change
300 J of heat enters and 120 J of work leaves the gas. Transfer directions determine ΔU; work-by and work-on conventions describe the same physical process.
first law of thermodynamics/fɜːst lɔː ɒv ˌθɜːməʊdaɪˈnæmɪks/
9.3
AHL: Work and internal energy of a gas
Work done when the volume changes
A gas at pressure $P$ pushes a piston of area $A$ with force $PA$. If the piston moves a small distance $\Delta x$, the work done by the gas is $PA\Delta x$:
The piston moves out by $\Delta x$: the gas does work $W = PA\,\Delta x = P\Delta V$
$$W = P\Delta V$$
This holds for constant external resisting pressure. In a slow equilibrium piston process the gas pressure closely matches that pressure; when it changes, the work is the area under the actual $P$–$V$ path between the initial and final volumes. A rapid irreversible change need not have a single uniform gas pressure throughout. Expansion ($\Delta V > 0$) gives positive $W$; compression gives negative $W$.
On a pressure–volume graph, the work done at constant pressure is the area under the line: $W = p\,\Delta V$
Change in internal energy
For a monatomic ideal gas, the internal energy depends only on temperature, so
$$\Delta U = \frac{3}{2}Nk_B\Delta T = \frac{3}{2}nR\Delta T$$
whatever process caused the change. Because $PV = nRT$, this is also $\Delta U = \frac{3}{2}\Delta(PV)$.
Worked example: 0.50 mol of helium at 100 kPa is heated from 300 K to 400 K at constant pressure.
$\Delta V = \frac{nR\Delta T}{P} = \frac{0.50 \times 8.31 \times 100}{1.0 \times 10^5} = 4.2 \times 10^{-3}\ \text{m}^3$, so $W = P\Delta V = 416\ \text{J}$.
Heating the same gas through 100 K at constant volume needs only $Q = \Delta U = 623\ \text{J}$, because no work is done. More heat is needed at constant pressure because part of it leaves again as work.
At constant volume all the heat raises $U$ ($q = \Delta U$); at constant pressure the gas also does work
9.4
AHL: Four thermodynamic processes
Holding one quantity fixed
The named processes specify different constraints: an isovolumetric process 等容过程 keeps the volume fixed and an isobaric process 等压过程 keeps the pressure fixed.
Process
Constant
First law becomes
On a $P$–$V$ diagram
isovolumetric
$V$
$W = 0$, so $Q = \Delta U$
vertical line
isobaric
$P$
$W = P\Delta V$; $Q = \Delta U + P\Delta V$
horizontal line
isothermal
$T$
$\Delta U = 0$, so $Q = W$
isotherm, $PV$ constant
adiabatic
no heat flow, $Q = 0$
$\Delta U = -W$
reversible ideal curve is steeper than an isotherm
The adiabatic curve falls more steeply than the isothermal one because the gas also cools as it does work
Isothermal processes
An isothermal process 等温过程 happens at constant temperature, so $\Delta U = 0$ and all the heat supplied leaves as work, $Q = W$. A slow equilibrium expansion in good thermal contact with a reservoir can maintain constant temperature as heat enters. This is one way to realise an isothermal path, rather than its definition.
Adiabatic processes
In an adiabatic process 绝热过程 no heat enters or leaves, $Q = 0$. It happens when the gas is insulated or the change is so fast that heat has no time to flow. Then $\Delta U = -W$: an ideal gas that expands while doing positive work cools; compression with work done on the gas warms it. In insulated free expansion into vacuum, however, $Q = W = 0$: ideal-gas temperature is unchanged, even though the process is adiabatic and irreversible. This is why a bicycle pump gets hot and why air cools as it rises and expands to form clouds.
For a monatomic ideal gas in a reversible adiabatic change:
$$PV^{5/3} = \text{constant}$$
Worked example: a monatomic gas at 100 kPa and 300 K is compressed reversibly and adiabatically to one eighth of its volume.
Compression heating underlies diesel ignition. This reversible monatomic calculation is not a measurement of a real engine; rapid compression alone does not justify the reversible power law.
A heat engine 热机 takes in heat $Q_h$ from a hot reservoir, does useful work $W$, and gives out heat $Q_c$ to a cold reservoir. To keep running, the gas goes through a cycle 循环 and returns to its starting state, so over one cycle $\Delta U = 0$ and
A cutaway piston engine: each cylinder runs a heat-engine cycle, taking in heat, doing work and rejecting the restEvery heat engine must reject some heat $Q_c$ to a cold reservoir
$$W = Q_h - Q_c$$
On a $P$–$V$ diagram, the net work done in one cycle is the area enclosed by the loop. A clockwise loop is an engine: the gas does more work expanding at high pressure than is done on it compressing at low pressure.
The net work in a cycle is the enclosed area; the engine must reject heat to the cold reservoir
Worked example: the rectangular cycle above, for a monatomic ideal gas. In each stage $\Delta U = \frac{3}{2}\Delta(PV)$ and, at constant pressure, $W = P\Delta V$.
Stage
Process
$W$ / J
$\Delta U$ / J
$Q$ / J
A → B
constant volume
0
+300
+300
B → C
constant pressure
+600
+900
+1500
C → D
constant volume
0
−900
−900
D → A
constant pressure
−200
−300
−500
Net work $= 600 - 200 = 400\ \text{J}$; heat in $Q_h = 300 + 1500 = 1800\ \text{J}$; heat out $Q_c = 1400\ \text{J}$. So $\eta = 400/1800 = 0.22$.
The Carnot cycle and the maximum efficiency
The Carnot cycle 卡诺循环 is an idealized reversible cycle of two isothermal and two adiabatic processes: isothermal expansion at $T_h$, adiabatic expansion to $T_c$, isothermal compression at $T_c$ and adiabatic compression back to $T_h$. No engine working between the same two reservoirs can be more efficient:
Two isotherms joined by two adiabats: the most efficient cycle between two temperatures
$$\eta_{\text{Carnot}} = 1 - \frac{T_c}{T_h}$$
with temperatures in kelvin. A two-reservoir engine model at 800 K and 300 K has maximum efficiency $1 - 300/800 = 0.625$, about 0.63; an actual irreversible engine between these reservoirs has lower efficiency. The only way to approach 100% would be a cold reservoir at 0 K. Efficiency improves with a hotter source or a colder sink.
A steam turbine does work as expanding steam pushes its blades around.
Entropy 熵$S$ is a thermodynamic state quantity, in J K⁻¹, related statistically to the number of accessible microstates. “Disorder” is a useful shorthand, not a definition based on visual untidiness. When thermal energy $\Delta Q$ is transferred reversibly to a system at temperature $T$, its entropy changes by
$$\Delta S = \frac{\Delta Q}{T}$$
Worked example: 1.0 kg of ice melts at 273 K, absorbing $3.34 \times 10^5\ \text{J}$. $\Delta S = 3.34 \times 10^5 / 273 = 1.2 \times 10^3\ \text{J K}^{-1}$: the ordered crystal becomes a disordered liquid.
Microstates
A microstate 微观状态 is one particular arrangement of all the particles; a macrostate 宏观状态 is what we measure, such as the total energy or the number of heads. Accessible microstates are treated as equally likely under the equilibrium counting assumptions used here. For an analogy with 4 independent fair coins: the macrostate "2 heads" can happen in 6 ways (HHTT, HTHT, …) out of 16, but "4 heads" in only 1. Entropy counts microstates:
$$S = k_B \ln \Omega$$
where $\Omega$ is the number of microstates for the macrostate. For "2 heads", $S = 1.38 \times 10^{-23} \ln 6 = 2.5 \times 10^{-23}\ \text{J K}^{-1}$.
With more particles the most disordered macrostates become overwhelmingly the most probable
With 100 independent fair coins the chance of all heads is 1 in $10^{30}$. A real gas has about $10^{23}$ particles, so a gas that spreads through a room never gathers back into one corner: not because it is forbidden, but because it is fantastically improbable.
The second law of thermodynamics 热力学第二定律 can be stated in three equivalent ways:
One law, three statements
Clausius form: thermal energy cannot spontaneously flow from a colder body to a hotter body. A refrigerator moves heat from cold to hot only because work is done on it.
Kelvin form: no heat engine working in a cycle can take heat from one reservoir and turn it completely into work; some heat must be given to a cold reservoir.
Entropy form: the total entropy of an isolated system never decreases. It stays constant in a reversible process and increases in an irreversible one.
Irreversible processes increase entropy
Real processes, with friction, mixing or heat flowing across a temperature difference, are irreversible, so the entropy of a real isolated system always increases. Worked example: 1000 J flows between large reservoirs maintained at 400 K and 300 K.
The hot body loses entropy: $-1000/400 = -2.5\ \text{J K}^{-1}$.
The cold body gains: $+1000/300 = +3.3\ \text{J K}^{-1}$.
Total change $= +0.8\ \text{J K}^{-1}$, an increase. Heat flowing the other way would decrease the total entropy, so it never happens on its own: this is the Clausius form.
Local decreases
The entropy of a non-isolated system can decrease. Water freezing in a freezer becomes more ordered, and a living cell builds ordered molecules. A full account includes heat and any matter transferred to the surroundings; their entropy gain must at least balance the local decrease. Actual irreversible changes increase the total entropy. A refrigerator therefore always releases more heat into the kitchen than it removes from the food.
second law of thermodynamics/ˈsekənd lɔː ɒv ˌθɜːməʊdaɪˈnæmɪks/
9.8
Practice
A gas absorbs 500 J of heat while 200 J of work is done on it. Find the change in its internal energy.
2.0 mol of a monatomic ideal gas cools from 400 K to 250 K. Find $\Delta U$.
A gas expands at a constant pressure of 150 kPa from 2.0 L to 5.0 L. Find the work done by the gas.
0.20 mol of helium is heated at constant volume from 300 K to 450 K. Find $Q$, $W$ and $\Delta U$.
Explain why a fixed ideal-gas sample cools when it expands adiabatically while doing positive work.
A monatomic ideal gas at 200 kPa and 3.0 L expands reversibly and adiabatically to 6.0 L. Find the final pressure.
For a fixed amount of monatomic ideal gas doing only pressure–volume work, identify: (a) a process at constant temperature, (b) a process with no heat transfer, (c) a process at constant volume. State the corresponding first-law simplification.
An engine takes in 2400 J of heat per cycle and rejects 1800 J. Find the work done per cycle and the efficiency.
Find the Carnot efficiency of an engine working between 600 K and 300 K. Explain why a real engine between these temperatures is less efficient.
2.0 kg of water at 100 °C boils into steam ($L_v = 2.26 \times 10^6\ \text{J kg}^{-1}$). Find the entropy change of the water.
Six coins are tossed. Find the number of microstates with 3 heads and the entropy of this macrostate.
600 J of heat flows between large reservoirs maintained at 500 K and 300 K. Find the total entropy change and explain its sign.
State the Kelvin and Clausius forms of the second law.
A refrigerator lowers the entropy of the food inside it. Explain why this does not break the second law.
Answers.
$Q = +500\ \text{J}$, $W = -200\ \text{J}$: $\Delta U = Q - W = 700\ \text{J}$.
(a) Isothermal: $\Delta U = 0$, $Q = W$. (b) Adiabatic: $Q = 0$, $\Delta U = -W$. (c) Isovolumetric: $W = 0$, $Q = \Delta U$. A zero net work value alone does not uniquely identify a constant-volume path.
$\eta = 1 - 300/600 = 0.50$. Real engines have friction, heat leaks and processes that are fast and irreversible, all of which increase entropy and waste energy.
$\Delta S = -600/500 + 600/300 = -1.2 + 2.0 = +0.8\ \text{J K}^{-1}$. Positive, because heat flowing from hot to cold is irreversible.
Kelvin: no cyclic engine can convert heat from a single reservoir completely into work. Clausius: heat cannot spontaneously flow from a colder to a hotter body.
The refrigerator is not isolated. It releases heat (the heat removed plus the work done by the motor) into the room, raising the room's entropy by more than the food's entropy falls, so the total entropy increases.
9.9
Exam tips
Use the IB sign convention: $Q$ is heat to the system, $W$ is work done by the system; work done on the gas is negative.
For a monatomic ideal gas $\Delta U = \frac{3}{2}nR\Delta T$ in every process, not only at constant volume.
Work is the area under the $P$–$V$ graph; in a cycle the net work is the enclosed area.
In $\eta_{\text{Carnot}} = 1 - T_c/T_h$ and $\Delta S = \Delta Q/T$, temperatures must be in kelvin.
When explaining a local entropy decrease, say where the heat goes and that the surroundings gain at least as much entropy.
More topics in International Baccalaureate · IB Diploma · Physics · HL