An engine cannot expand forever; it must come back to where it started and go again. A path on the P–V diagram that returns to its starting state is a cycle. Using the processes you know, we can do the bookkeeping for a whole cycle.
Why it works
Internal energy belongs to the state. Back at the starting $P$ and $V$, the gas is back at its starting $T$ and $U$, so $\Delta U = 0$ around any cycle. Then the first law gives $Q_{\text{net}} = -W_{\text{net}}$: the net heat that flows in equals the net work the gas does. The gas does positive work while it expands and negative work while it is compressed; if it expands at a higher pressure than it is compressed at, the difference is the area inside the loop.
Key idea
Around a cycle, $\Delta U = 0$ and $Q_{\text{net}} = W_{\text{by}}$. The net work done by the gas equals the area enclosed: positive for a clockwise cycle (an engine), negative for a counterclockwise one (a refrigerator).
Worked examples
Worked example: Net work of a rectangle
A gas goes around A $(200\,\text{kPa}, 2.0\,\text{L})$ → B $(200\,\text{kPa}, 5.0\,\text{L})$ → C $(80\,\text{kPa}, 5.0\,\text{L})$ → D $(80\,\text{kPa}, 2.0\,\text{L})$ → A. Find the net work done by the gas.
- A→B: expands at $200\,\text{kPa}$: $W_{\text{by}} = 200 \times 3.0 = +600\,\text{J}$.
- B→C and D→A: constant volume, no work.
- C→D: compressed at $80\,\text{kPa}$: $W_{\text{by}} = 80 \times (-3.0) = -240\,\text{J}$.
- Net: $600 - 240 = 360\,\text{J}$, the enclosed area $(120\,\text{kPa})(3.0\,\text{L})$.
Answer: $360\,\text{J}$ by the gas
Worked example: Bookkeeping the legs
For a monatomic gas on the same cycle, find $Q$ for each leg and check the totals.
- Use $\Delta U = \tfrac{3}{2}\Delta(PV)$ and $Q = \Delta U - W$, with $W$ on the gas.
- A→B: $\Delta U = \tfrac{3}{2}(1000 - 400) = 900$, $W = -600$, $Q = 1500\,\text{J}$. B→C: $\Delta U = \tfrac{3}{2}(400 - 1000) = -900$, $W = 0$, $Q = -900\,\text{J}$.
- C→D: $\Delta U = \tfrac{3}{2}(160 - 400) = -360$, $W = +240$, $Q = -600\,\text{J}$. D→A: $\Delta U = \tfrac{3}{2}(400 - 160) = 360$, $W = 0$, $Q = 360\,\text{J}$.
- Totals: $\Delta U = 0$, $W = -360\,\text{J}$, $Q = 1500 - 900 - 600 + 360 = 360\,\text{J}$. The net heat equals the net work by the gas.
Answer: $Q$: $1500$, $-900$, $-600$, $360\,\text{J}$; net $360\,\text{J}$
Worked example: A triangle
A gas goes from $(100\,\text{kPa}, 1.0\,\text{L})$ up to $(300\,\text{kPa}, 1.0\,\text{L})$, along a straight line to $(100\,\text{kPa}, 4.0\,\text{L})$, and back at constant pressure. Find the net work by the gas.
- The cycle runs clockwise, so the net work by the gas is the enclosed area, positive.
- Area $= \tfrac{1}{2}(3.0\,\text{L})(200\,\text{kPa}) = 300\,\text{J}$.
Answer: $300\,\text{J}$
Common mistake
Adding up the work of each leg without signs, which gives the whole area under the paths ($600 + 240 = 840\,\text{J}$ above) instead of the area enclosed ($360\,\text{J}$). Expansion and compression have opposite signs. Check: the net work can never be more than the area inside the loop.