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?

Isothermal and adiabatic expansion from 10 liters to 20 liters on a pressure-volume diagram 0 10 20 0 100 200 300 Volume (L) Pressure (kPa) 300 kPa, 10 L isothermal 2,079 J adiabatic 1,665 J
The monatomic gas of the worked example expanding from 10 L to 20 L. The isothermal curve (solid) ends at 150 kPa and the adiabatic curve (dashed) falls faster, to 94.5 kPa. The work is the area under each curve, so the isothermal expansion does more work (2,079 J against 1,665 J). The area under the adiabatic curve is shaded.

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.

Rectangular pressure-volume cycle with enclosed area equal to net work 0 10 20 30 0 100 200 Volume (L) Pressure (kPa) A B C D W = 2,000 J
The rectangular cycle A → B → C → D → A of the worked example. The gas expands at 200 kPa (+4,000 J) and is compressed at 100 kPa (−2,000 J). The loop runs clockwise, and its enclosed area, 100 kPa × 20 L = 2,000 J, is the net work done by the gas per cycle.

Basic processes compared

Work done by an ideal gas in the four basic processes
Process Constant Shape on PV diagram Work by the gas
IsobaricpHorizontal linepΔV
IsochoricVVertical line0
IsothermalTHyperbolanRT ln(V2/V1)
AdiabaticQ = 0Steeper curve, pVγ constant(p1V1 − p2V2) ÷ (γ − 1)

Worked example: work in different processes

  1. 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.
  2. 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.
  3. Isochoric heating. The gas is heated at constant volume: W = 0, and all the heat goes into the internal energy.
  4. 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.
  5. 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.
1.5 0.945 3.0 1,665 J 2,079 J 0.010 0.020 m3 105 Pa
A B C D +2,000 J +4,000 J − 2,000 J 0.010 0.030 1.0 2.0 m3 105 Pa

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.