Take a deep breath and watch your chest rise. Your lungs swell by about half a litre, and the air around you must be pushed aside to make room. Pushing something through a distance is work. So every breath does work on the atmosphere, about fifteen times a minute, all your life.
A force through a distance
A gas pushes on every wall of its container. On a piston of area \(A\) the gas at pressure \(p\) exerts a force \(F = pA\). Let the piston move out by a small distance \(dx\), so slowly that \(p\) stays the same during the step. The gas does work \(dW = F\,dx = pA\,dx\). But \(A\,dx\) is the small volume \(dV\) swept by the piston. So \(dW = p\,dV\).
For a larger change we add the small steps. The pressure may change as the volume changes, so we integrate. The piston's shape does not matter: any boundary that moves outward sweeps a volume, and the work is \(p\) times that volume. The result holds for a quasi-static process of any gas, ideal or not.
The sign of \(W\) follows the sign of \(dV\). When the gas expands, \(dV\) is positive and the gas does positive work on its surroundings. When the gas is compressed, \(dV\) is negative and \(W\) is negative: the surroundings do work on the gas. The same rule for heat is fixed here too, once for the whole chapter.
In this book \(Q\) is the heat given to the gas: positive when heat flows in, negative when heat flows out. \(W\) is the work done by the gas: positive when the gas expands, negative when it is compressed.
Now the breath. The lungs push back the atmosphere at a steady \(1.013 \times 10^5\,\text{Pa}\) while they swell by \(0.5\,\text{L} = 5 \times 10^{-4}\,\text{m}^3\). The work done on the air is \(p\,\Delta V = 1.013 \times 10^5 \times 5 \times 10^{-4} = 51\,\text{J}\). That is about the work of lifting a \(5\,\text{kg}\) bag of rice through one metre, in every breath.
A gas at \(1.5 \times 10^5\,\text{Pa}\) pushes a piston of area \(0.02\,\text{m}^2\) out by \(5\,\text{cm}\), with the pressure held steady. Find the force on the piston, the work done by the gas and the volume swept.
The force is \(F = pA = 1.5 \times 10^5 \times 0.02 = 3000\,\text{N}\).
The work is \(F\,dx = 3000 \times 0.05 = 150\,\text{J}\).
The volume swept is \(A\,dx = 0.02 \times 0.05 = 1.0 \times 10^{-3}\,\text{m}^3\), one litre. As a check, \(p\,\Delta V = 1.5 \times 10^5 \times 10^{-3} = 150\,\text{J}\).
A gas is compressed at a steady \(200\,\text{kPa}\) from \(6\,\text{L}\) to \(4\,\text{L}\). What work does the gas do, in joules, with its sign?
Work is an area
Draw the path of a quasi-static process on the \(p\)-\(V\) diagram. Over a small step \(dV\), the strip under the path has height \(p\) and width \(dV\). Its area is \(p\,dV\), the work of that step. Adding the strips gives the whole area under the path. So the work done by a gas is the area between its path and the \(V\) axis.
The work done by a gas in a quasi-static process is the area under its path on the \(p\)-\(V\) diagram. It is positive when the path runs towards larger volume and negative when it runs towards smaller volume.
A handy unit makes the areas quick to read. With pressure in kPa and volume in litres, one square of \(1\,\text{kPa} \times 1\,\text{L}\) is \(10^3\,\text{Pa} \times 10^{-3}\,\text{m}^3 = 1\,\text{J}\). Take a gas going along a straight line from \(2\,\text{L}\) at \(200\,\text{kPa}\) to \(6\,\text{L}\) at \(100\,\text{kPa}\). The area under the line is a trapezium, \(\tfrac12(200 + 100) \times 4 = 600\,\text{kPa L}\). So the gas does \(600\,\text{J}\).
A gas expands from \(1\,\text{L}\) to \(5\,\text{L}\) while its pressure falls linearly from \(300\,\text{kPa}\) to \(100\,\text{kPa}\). How much work does it do, in joules?
A gas goes from state 1 (\(10\,\text{L}\), \(300\,\text{kPa}\)) to state 2 (\(30\,\text{L}\), \(150\,\text{kPa}\)). Path A expands first and then lowers the pressure; path B lowers the pressure first and then expands. Which path does more work?
Play each chip in the figure above. Path A does \(6000\,\text{J}\): its whole expansion happens at \(300\,\text{kPa}\), and its drop in pressure at \(30\,\text{L}\) does no work. Path B does \(3000\,\text{J}\). The straight line between the states does \(\tfrac12(300 + 150) \times 20 = 4500\,\text{J}\). Three paths, one start, one end, three amounts of work.
This is a new kind of quantity. The temperature at state 2 is fixed by state 2 alone; it does not care how the gas got there. The work done on the way is not like that. It belongs to the journey, not to the destination. So we never speak of "the work in a gas", only of the work done in a process.
The integral \(\int p\,dV\) uses the pressure of the gas, which needs a quasi-static path. A gas that expands suddenly against a steady outside pressure \(p_\text{ext}\) still does the work \(p_\text{ext}\,\Delta V\) on its surroundings. But that is not an area under any path of the gas, because the gas had no single pressure on the way.
Going round a cycle
A process that returns a gas to its starting state is a cyclic process, or cycle. Choose the cycle chip in the figure above. The gas goes out along path A and does \(6000\,\text{J}\). It comes back along path B, now compressed at \(150\,\text{kPa}\), and \(3000\,\text{J}\) of work is done on it. The net work is \(6000 - 3000 = 3000\,\text{J}\). That is exactly the area enclosed by the loop, \(150 \times 20\).
The net work done by a gas in a cycle is the area enclosed by the cycle on the \(p\)-\(V\) diagram. It is positive when the cycle runs clockwise and negative when it runs anticlockwise.
Why clockwise? In a clockwise loop the gas expands along the upper part, at high pressure, and is compressed along the lower part, at low pressure. It gives out more work than it takes back. An engine runs this way. In an anticlockwise loop the gas expands at low pressure and is compressed at high pressure, so net work is done on it. A refrigerator runs this way. The next chapter builds both.
A gas goes round a triangle on the \(p\)-\(V\) diagram: from \((2\,\text{L}, 100\,\text{kPa})\) to \((6\,\text{L}, 100\,\text{kPa})\), up to \((6\,\text{L}, 300\,\text{kPa})\), and straight back to the start. What is the net work done by the gas?
Other diagrams, read as p-V
A process is often drawn on a graph of \(V\) against \(T\), or \(p\) against \(T\). Read it by asking what stays constant, then redraw it on \(p\)-\(V\). On a \(V\)-\(T\) graph, a straight line through the origin means \(V/T\) is constant. By \(pV = nRT\), the pressure is then constant: an isobar, a horizontal line on \(p\)-\(V\). On a \(p\)-\(T\) graph, a line through the origin means the volume is constant. That is a vertical line on \(p\)-\(V\), and the gas does no work.
At constant pressure, \(p\,\Delta V = nR\,\Delta T\), so the work can be read straight from a \(V\)-\(T\) graph. One mole warmed from \(300\,\text{K}\) to \(400\,\text{K}\) along a line through the origin does \(W = nR\,\Delta T = 1 \times 8.31 \times 100 = 831\,\text{J}\). The pressure itself does not even need to be known.
On a \(p\)-\(T\) graph, a fixed amount of gas goes from A to B along a straight line through the origin. How much work does it do?
On a \(V\)-\(T\) graph, a gas goes from \(3\,\text{L}\) to \(6\,\text{L}\) along a straight line through the origin. Its pressure is \(100\,\text{kPa}\). How much work does it do, in joules?
- Taking the work in a compression as positive.\(W\) is the work done by the gas. The volume falls, so \(W\) is negative; the surroundings do positive work on the gas.
- Thinking the work depends only on the two end states.Work is the area under the path. Two paths between the same states can enclose very different areas.
- Finding work as an area under a \(V\)-\(T\) or \(p\)-\(T\) graph.Only an area on a \(p\)-\(V\) diagram is work. Redraw the process on \(p\)-\(V\) first.