CHEM-271 · Lesson 3 of 12 · 23 min
The first law: work, heat and internal energy
▶ Video coming soon A video version of this lesson is on the way.
Energy can enter or leave a system in two ways: as heat, driven by a temperature difference, and as work, any other transfer, such as a piston being pushed or a current being driven through a wire. The first law of thermodynamics says that these two kinds of transfer change one and the same quantity, the internal energy of the system, and that energy is neither created nor destroyed. This lesson states the law precisely, develops the calculation of expansion work, compares reversible and irreversible processes, and works out how an ideal gas behaves when it expands at constant temperature and when it expands with no heat exchange at all.
Joule and the mechanical equivalent of heat
Until the 1840s many scientists thought of heat as a weightless fluid, caloric, that flowed from hot bodies to cold ones and was conserved. The caloric theory explained calorimetry well, but it could not explain why friction produces heat without limit. Benjamin Thompson, Count Rumford, had noted in 1798 that boring a cannon barrel produced heat for as long as the boring continued. Julius Robert Mayer, a ship's doctor, argued in 1842 that heat and mechanical work are interconvertible and estimated the conversion factor from the heat capacities of air.
James Prescott Joule, a brewer's son from Salford near Manchester, measured the conversion directly in a series of experiments through the 1840s. In the most famous version, completed by 1850, falling weights turned a paddle wheel inside an insulated vessel of water, and the temperature of the water rose in proportion to the work done by the weights. Joule obtained a value close to the modern 4.184 J per calorie. He also showed that the same amount of heat appeared whether the work was done mechanically, electrically or by compressing a gas. Heat and work were two ways of transferring a single conserved quantity, which Helmholtz called energy in his 1847 essay on its conservation.
Internal energy and the first law
The internal energy U of a system is the total energy of its molecules: their translational, rotational and vibrational kinetic and potential energy, the energy of their electrons and nuclei, and the potential energy of the forces between them. We cannot measure U absolutely, and we never need to; only changes in U matter. The first law states that for a closed system \(\Delta U = q + w\), where q is the heat absorbed by the system and w is the work done on it. For an infinitesimal change, \(\mathrm{d}U = \delta q + \delta w\). Because U is a state function, its change around any closed cycle is zero: \(\oint \mathrm{d}U = 0\). A machine that returned to its initial state after producing work without absorbing any heat, a perpetual motion machine of the first kind, is therefore impossible.
For an isolated system q = 0 and w = 0, so ΔU = 0: the internal energy of an isolated system is constant. If the universe is regarded as an isolated system, its energy is constant, which is the most compact statement of the first law.
Expansion work
The most common kind of work in chemistry is expansion work, done when a system changes its volume against an external pressure. Consider a gas in a cylinder fitted with a frictionless piston of area A, against which the surroundings exert a pressure \(P_\mathrm{ext}\). If the piston moves outward by dx, the gas does work \(F\,\mathrm{d}x = P_\mathrm{ext}A\,\mathrm{d}x = P_\mathrm{ext}\,\mathrm{d}V\) on the surroundings, so the work done on the gas is \(\delta w = -P_\mathrm{ext}\,\mathrm{d}V\). The total work for a finite change is \(w = -\int P_\mathrm{ext}\,\mathrm{d}V\). The pressure that appears is the external pressure, not the pressure of the gas, and the two are equal only in special cases.
Three cases are important. In a free expansion into a vacuum, \(P_\mathrm{ext} = 0\) and no work is done. Against a constant external pressure, \(w = -P_\mathrm{ext}\Delta V\); a reaction that releases a gas at atmospheric pressure does work of this kind on the atmosphere. In a reversible expansion, the external pressure is adjusted at every moment to be only infinitesimally less than the pressure of the gas, so that \(P_\mathrm{ext} = P\) throughout and the process could be reversed by an infinitesimal change. For an ideal gas held at constant temperature,
\[w_\mathrm{rev} = -\int_{V_1}^{V_2} \frac{nRT}{V}\,\mathrm{d}V = -nRT\ln\frac{V_2}{V_1} = -nRT\ln\frac{P_1}{P_2}.\]
Reversible and irreversible processes
On a graph of pressure against volume, the work done by the gas is the area under the path traced by the external pressure. In a reversible isothermal expansion the path follows the isotherm itself, so the area is as large as it can be: a reversible expansion does the maximum possible work on the surroundings. Any real expansion, against a pressure that is lower than the gas pressure by a finite amount, traces a path below the isotherm and does less work. The difference is not lost energy; because \(\Delta U = 0\) for an isothermal ideal gas, the gas absorbs exactly as much heat as the work it does, and an irreversible expansion simply absorbs less heat and does less work.
A reversible process is an idealization. It would take infinitely long, because at every stage the system is only infinitesimally away from equilibrium. Real processes are always irreversible to some degree. The idea is nevertheless indispensable, because the reversible path gives the limiting values of work and heat, and because the changes in state functions can always be calculated along a reversible path even when the actual process is irreversible. The same holds for compression: a reversible compression requires the least work, and any real compression requires more.
Reversibility also requires the absence of friction, of temperature differences across which heat flows, and of mixing or chemical change that is not balanced at every moment. A useful test is to ask whether an infinitesimal change in some condition would reverse the process. Ice melting in a glass of water at 0 °C is reversible in this sense: a tiny lowering of the temperature would make it freeze again. Ice melting in a warm room at 25 °C is not.
Heat, heat capacity and constant volume
When no work is done, the heat absorbed equals the change in internal energy. If the volume is fixed and only expansion work is possible, then w = 0 and \(\Delta U = q_V\). This is the principle of the bomb calorimeter, a sealed steel vessel in which a sample is burned in excess oxygen; the heat released, measured from the temperature rise of the surrounding water bath, gives the change in internal energy of the combustion directly.
The heat capacity at constant volume is defined as \(C_V = (\partial U/\partial T)_V\), and the molar heat capacity is \(C_{V,\mathrm{m}} = C_V/n\). For a monatomic ideal gas, whose only energy is translational, \(U_\mathrm{m} = \tfrac{3}{2}RT\) and \(C_{V,\mathrm{m}} = \tfrac{3}{2}R = 12.47\ \mathrm{J\,K^{-1}\,mol^{-1}}\), in excellent agreement with measurements on helium, neon and argon. Diatomic gases such as nitrogen and oxygen at room temperature add two rotational degrees of freedom, so \(C_{V,\mathrm{m}} \approx \tfrac{5}{2}R = 20.8\ \mathrm{J\,K^{-1}\,mol^{-1}}\); their vibrations are frozen out until much higher temperatures because the vibrational quanta are large compared with kT. This partial freezing of degrees of freedom was one of the first clues to quantum theory, and PHYS-361 explains it with partition functions.
Joule's free expansion and the internal energy of an ideal gas
In 1845 Joule connected two copper vessels, one filled with air at about 22 atm and the other evacuated, and immersed them in a water bath. When he opened the stopcock and let the air expand into the empty vessel, he could detect no change in the temperature of the water. No work was done, because the gas expanded into a vacuum, and no heat was exchanged, so ΔU = 0. Since the temperature did not change, the internal energy of the gas did not depend on its volume. For an ideal gas this is exact: \((\partial U/\partial V)_T = 0\), and U depends on temperature alone. For a real gas \((\partial U/\partial V)_T\), the internal pressure, is small but positive, because expanding against intermolecular attractions raises the potential energy. In the van der Waals model it equals \(a/V_\mathrm{m}^2\). Joule's apparatus was too insensitive to see it, because the heat capacity of the water bath was far larger than that of the gas.
Adiabatic expansion
In an adiabatic process no heat crosses the boundary, so \(\Delta U = w\). A gas that expands adiabatically does work at the expense of its internal energy and cools; a gas compressed adiabatically warms. For a reversible adiabatic change of an ideal gas, \(\mathrm{d}U = nC_{V,\mathrm{m}}\,\mathrm{d}T = -P\,\mathrm{d}V = -nRT\,\mathrm{d}V/V\). Separating variables and integrating gives \(T V^{\gamma - 1} = \text{constant}\) and \(PV^{\gamma} = \text{constant}\), where \(\gamma = C_{P,\mathrm{m}}/C_{V,\mathrm{m}}\), which is 5/3 for a monatomic gas and about 7/5 for a diatomic gas near room temperature.
Adiabatic processes are common. Air rising in the atmosphere expands as the pressure falls and cools by about 10 K per kilometer if it is dry, which is why mountain tops are cold and why clouds form as moist air rises. A bicycle pump becomes warm because compression is fast enough to be nearly adiabatic. The diesel engine ignites its fuel without a spark by compressing air so quickly and so far that its temperature exceeds the ignition point of the fuel.
A worked example: work in three expansions
Worked problem
Isothermal and adiabatic expansion of argon
One mole of argon, treated as an ideal monatomic gas, expands from 10.0 bar to 1.00 bar starting at 298.15 K. Calculate the work done on the gas for (a) reversible isothermal expansion, (b) isothermal expansion against a constant external pressure of 1.00 bar, and (c) reversible adiabatic expansion.
Show solution
- (a) w = −nRT ln(P₁/P₂) = −(8.314)(298.15) ln 10 = −5708 J. Since ΔU = 0, q = +5708 J.
- (b) V₁ = RT/P₁ = 2.479 L and V₂ = 24.79 L. w = −Pext ΔV = −(1.00 × 10⁵ Pa)(22.31 × 10⁻³ m³) = −2231 J, and q = +2231 J.
- (c) For γ = 5/3, T₂ = T₁(P₂/P₁)^((γ−1)/γ) = 298.15 × 0.1^0.4 = 118.7 K.
- Then w = ΔU = nCV,m(T₂ − T₁) = 1.5 × 8.314 × (118.7 − 298.15) = −2238 J, with q = 0.
Answer: (a) −5.71 kJ; (b) −2.23 kJ; (c) −2.24 kJ, with the gas cooling to about 119 K.
The reversible isothermal expansion does the most work because heat flows in from the surroundings throughout to keep the gas at 298 K. The adiabatic expansion does about the same work as the single-step expansion here, but for a different reason: it receives no heat, and its work comes entirely from its own internal energy, which is why its temperature falls so far.
A program: approaching reversibility in stages
An irreversible expansion can be made more nearly reversible by carrying it out in stages, each against an external pressure only a little below the gas pressure. The program expands one mole of ideal gas isothermally at 298.15 K from 10 bar to 1 bar in N equal pressure ratios and shows that the work approaches the reversible value as N grows. It then does the same for compression, where the work needed falls toward the reversible value from above.
import math
R, T, n = 8.314462618, 298.15, 1.0
P1, P2 = 10.0e5, 1.0e5 # Pa
def staged(P_start, P_end, N):
"""Isothermal ideal-gas change in N steps, each against the final pressure of that step."""
w = 0.0
r = (P_end / P_start) ** (1.0 / N)
P = P_start
for _ in range(N):
Pnext = P * r
V, Vnext = n * R * T / P, n * R * T / Pnext
w += -Pnext * (Vnext - V) # external pressure held at the end-of-step value
P = Pnext
return w
w_rev = -n * R * T * math.log(P1 / P2)
print(f'reversible expansion work {w_rev:9.1f} J')
print(' steps expansion w (J) compression w (J)')
for N in (1, 2, 5, 10, 100, 1000):
print(f'{N:6d} {staged(P1, P2, N):16.1f} {staged(P2, P1, N):18.1f}')
print(f'reversible compression work {-w_rev:8.1f} J')
gamma = 5.0 / 3.0
T2 = T * (P2 / P1) ** ((gamma - 1) / gamma)
print(f'reversible adiabatic expansion: T2 = {T2:.1f} K, w = {1.5 * R * (T2 - T):.1f} J')reversible expansion work -5708.0 J
steps expansion w (J) compression w (J)
1 -2231.1 22310.6
2 -3390.1 10720.4
5 -4574.2 7249.6
10 -5098.5 6418.6
100 -5642.8 5774.2
1000 -5701.4 5714.6
reversible compression work 5708.0 J
reversible adiabatic expansion: T2 = 118.7 K, w = -2238.1 JWith one step the expansion does only 2.23 kJ of work and the compression needs 22.3 kJ, nearly four times the reversible value of 5.71 kJ. With a thousand steps both are within about 7 J of the reversible value. The reversible process is the limit that real processes approach as they are carried out more slowly and more gently.
Common mistakes
MistakeWork in an expansion is −P dV with P the pressure of the gas.
InsteadThe work is −Pext dV; Pext equals the gas pressure only in a reversible process.
MistakeA free expansion into a vacuum does work because the gas moves.
InsteadPext = 0, so no work is done.
MistakeAn irreversible process wastes energy, so energy is not conserved.
InsteadEnergy is conserved in every process; an irreversible expansion simply exchanges less heat and work.
MistakeThe internal energy of an ideal gas depends on its volume.
InsteadFor an ideal gas U depends on T only, as Joule's free expansion shows.
MistakeAn adiabatic process is one at constant temperature.
InsteadAdiabatic means no heat flow; the temperature usually changes.
MistakeJoule's free expansion proves that real gases have no attractions.
InsteadHis apparatus was not sensitive enough; real gases have a small positive internal pressure.
Summary and key terms
- The first law: ΔU = q + w for a closed system, and the internal energy of an isolated system is constant.
- Expansion work is w = −∫Pext dV; it is zero for free expansion and −PextΔV against constant pressure.
- A reversible isothermal expansion of an ideal gas does work −nRT ln(V₂/V₁), the maximum possible.
- At constant volume ΔU = qV, the quantity measured in a bomb calorimeter; CV = (∂U/∂T)V.
- For an ideal gas U depends on T only; for a van der Waals gas (∂U/∂V)T = a/Vm².
- In a reversible adiabatic change of an ideal gas, PV^γ and TV^(γ−1) are constant.
- Internal energy
- The total energy of the molecules of a system, a state function written U.
- First law
- Energy is conserved: ΔU = q + w.
- Expansion work
- Work done when a system changes volume against an external pressure.
- Reversible process
- A process that can be reversed at any stage by an infinitesimal change in conditions.
- Adiabatic
- Describing a process in which no heat crosses the boundary.
- Heat capacity at constant volume
- CV = (∂U/∂T)V, the heat needed to raise the temperature by 1 K at fixed volume.
- Internal pressure
- (∂U/∂V)T, zero for an ideal gas and positive for a real gas with attractions.
Practice problems
Work each problem on paper first, then reveal the answer to check.
A gas expands from 2.0 L to 5.0 L against a constant pressure of 1.5 bar. Find w in joules.
Show answer
w = −PextΔV = −1.5 × 10⁵ Pa × 3.0 × 10⁻³ m³ = −450 J.
Find the reversible isothermal work when 2.00 mol of ideal gas is compressed from 1.0 bar to 5.0 bar at 300 K.
Show answer
w = −nRT ln(P₁/P₂) = −2 × 8.314 × 300 × ln 0.2 = +8.03 kJ.
A system absorbs 1.20 kJ of heat at constant volume. What are w and ΔU?
Show answer
w = 0, ΔU = +1.20 kJ.
Air (γ = 1.40) at 300 K is compressed reversibly and adiabatically to one tenth of its volume. What is its final temperature?
Show answer
T₂ = 300 × 10^0.40 = 754 K.
Estimate CV,m of nitrogen at room temperature.
Show answer
About (5/2)R = 20.8 J/(K mol): three translational and two rotational degrees of freedom.
Why does a single-step compression need more work than a reversible one?
Show answer
The external pressure must exceed the gas pressure throughout, so the area under the Pext path is larger than under the isotherm.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.