Work Done by Gases and PV Diagrams
When a gas expands against an external pressure it does work W = ∫p dV on its surroundings, which on a pressure-volume (PV) diagram is the area under the curve; for constant pressure W = pΔV, for an isothermal process of an ideal gas W = nRT ln(V2/V1), and for a cycle the net work equals the area enclosed by the loop. In brief: expansion does positive work by the gas; compression means that the surroundings do work on the gas. No work is done in a constant-volume (isochoric) process. The work depends on the path between the initial and final states, not just on the end points. Clockwise cycles on a PV diagram produce net work (engines), and anticlockwise cycles consume it (refrigerators).
Engines, pumps and compressors involve gases doing or receiving work. PV diagrams are the standard tool for visualizing them. This guide derives the work of a gas for the basic processes, shows how to read areas on a PV diagram, compares the four basic processes in a table, works through numerical examples including a rectangular cycle and corrects common mistakes.
How does a gas do work?
Consider a gas in a cylinder with a piston of area A. If the gas pressure is p, the force on the piston is pA. If the piston moves by dx, the work done by the gas is dW = pA dx = p dV, where dV = A dx is the increase in volume. For a finite change from V1 to V2, W = ∫p dV, the area under the curve on the PV diagram. For constant pressure, W = p(V2 − V1) = pΔV. Sign convention (used here): W is positive when the gas expands (work done by the gas), and negative when it is compressed. Some textbooks define work done on the gas, with the opposite sign; the sign must be checked when using the first law.
What are the basic processes?
- Isobaric (constant pressure): a horizontal line on the PV diagram. W = pΔV.
- Isochoric (constant volume): a vertical line. W = 0.
- Isothermal (constant temperature): a hyperbola, p = nRT/V. W = nRT ln(V2 ÷ V1) = p1V1 ln(V2 ÷ V1). Heat must flow in to keep the temperature constant, equal to the work for an ideal gas.
- Adiabatic (no heat exchange): a steeper curve than the isotherm, pVγ = constant, with γ = Cp/Cv (5/3 for a monatomic gas, 7/5 for a diatomic gas). W = (p1V1 − p2V2) ÷ (γ − 1). The gas cools as it expands, using its internal energy.
How are cycles read on a PV diagram?
In a cyclic process the system returns to its initial state. The net work for the cycle equals the area enclosed by the loop: positive if the loop is traversed clockwise (the expansion at the higher pressure is larger than the compression at the lower pressure), and negative if anticlockwise. Since the internal energy returns to its initial value over a full cycle, the net heat added equals the net work: Qnet = Wnet. For a heat engine, the area of the loop represents the useful work per cycle. A larger loop (greater pressure difference or volume change) gives more work per cycle.
Basic processes compared
| Process | Constant | Shape on PV diagram | Work by the gas |
|---|---|---|---|
| Isobaric | p | Horizontal line | pΔV |
| Isochoric | V | Vertical line | 0 |
| Isothermal | T | Hyperbola | nRT ln(V2/V1) |
| Adiabatic | Q = 0 | Steeper curve, pVγ constant | (p1V1 − p2V2) ÷ (γ − 1) |
Worked example: work in different processes
- Isobaric expansion. A gas expands at a constant pressure of 1.0 × 105 Pa from 0.010 m3 to 0.020 m3: W = pΔV = 1.0 × 105 × 0.010 = 1,000 J.
- Isothermal expansion. 1.0 mol of ideal gas at 300 K expands to double its volume: W = nRT ln 2 = 1.0 × 8.314 × 300 × 0.693 = 1,729 J. Heat input Q = 1,729 J (ΔU = 0 for an ideal gas at constant T). The pressure halves.
- Isochoric heating. The gas is heated at constant volume: W = 0, and all the heat goes into the internal energy.
- Rectangular cycle. A gas goes through four steps: A (p = 1.0 × 105 Pa, V = 0.010 m3) → B (2.0 × 105 Pa, 0.010 m3) → C (2.0 × 105 Pa, 0.030 m3) → D (1.0 × 105 Pa, 0.030 m3) → A. Steps AB and CD are isochoric (W = 0). Step BC (isobaric expansion): W = 2.0 × 105 × 0.020 = 4,000 J. Step DA (isobaric compression): W = 1.0 × 105 × (−0.020) = −2,000 J. Net work = 4,000 − 2,000 = +2,000 J, which equals the area of the rectangle: (2.0 − 1.0) × 105 × 0.020 = 2,000 J. The cycle is clockwise, so the net work is positive.
- Adiabatic expansion. A monatomic gas (γ = 5/3) at 3.0 × 105 Pa and 0.010 m3 expands adiabatically to 0.020 m3. p2 = p1(V1/V2)γ = 3.0 × 105 × 0.51.667 = 3.0 × 105 × 0.315 = 9.45 × 104 Pa. W = (3.0 × 105 × 0.010 − 9.45 × 104 × 0.020) ÷ (2/3) = (3,000 − 1,890) × 1.5 = 1,665 J. Compare with an isothermal expansion between the same volumes: W = 3,000 × ln 2 = 2,079 J, which is larger because the adiabatic pressure falls faster.
How were these ideas developed?
James Watt invented the “indicator diagram” in the 1790s to measure the pressure in steam engines against the piston position; it was kept secret and became widely known in the 1820s. Émile Clapeyron introduced the PV diagram into thermodynamic theory in 1834 to analyze Carnot’s cycle. The area under the curve as work was central to the development of the first law, in the 1840s.
Which mistakes are common?
Mistake 1: Using W = pΔV for non-constant pressure
The formula applies to isobaric processes. In others, integrate or find the area under the curve.
Mistake 2: Confusing the sign of work
Expansion: positive work by the gas. Check the sign convention of your course.
Mistake 3: Thinking that work is a state function
It depends on the path. Different paths between two states have different areas.
Mistake 4: Counting the area under the loop instead of inside
For a cycle, the net work is the enclosed area.