Heat, work and energy
A system has energy. It never has heat, and it never has work. Those two are things that happen at the boundary, for as long as they are happening and not a moment longer — and almost every mistake in a first thermodynamics course comes from forgetting that.
Ordinary speech treats heat as a substance. A cup of coffee has heat in it, the heat leaks away, the room takes the heat up. The picture is harmless enough for a kitchen and fatal for an energy balance, because it quietly assumes that heat is something a body can contain, and therefore something you could in principle count. It is not. What the coffee contains is energy. Heat is only the name for that energy while it is on the move, and only while it is on the move for one particular reason. Getting this straight is the whole of this topic, and everything that follows — the first law, entropy, cycles — is bookkeeping on top of it.
Energy is a property
Draw a boundary, decide what is inside it, and you have a system — the move made in basic concepts and definitions. That system holds a definite amount of energy at any instant, and the total is written \(E\). It splits, by convention, into the energy the system has because of where it is and how fast it is going as a whole, and everything else:
The two macroscopic terms are the ones you already know from mechanics. They are measured relative to something outside the system — a frame you have chosen to call still, a height you have chosen to call zero — and they vanish entirely for a tank bolted to the floor, which is why most closed-system problems drop them without comment. Nothing subtle is going on there.
The internal energy \(U\) is the whole of the rest, and it is the sum of every microscopic form at once. Molecules translating, rotating and vibrating: the sensible part, the part whose size tracks temperature. The energy stored in breaking the intermolecular bonds that hold a liquid together: the latent part, which is why boiling water takes energy at no change of temperature at all. The energy in the chemical bonds themselves, which combustion releases, and the energy in the nucleus, which fission releases. Ordinary engineering thermodynamics leaves the last two alone, not because they are absent but because they do not change, and a quantity that does not change drops out of every difference you take.
What matters is the word property. A property is fixed by the state of the system and by nothing else, so \(E\) and \(U\) can be tabulated, looked up, and subtracted. Two kilograms of steam at 300 kPa and 200 °C have one internal energy and one only, no matter what was done to get them there — heated from ice, compressed from a vacuum, stirred with a paddle for an hour. The history is gone, and the state is all that survives it.
Now the point of the section. There is no property called heat and no property called work. You cannot write “the heat of the system” any more than you can write “the rainfall of the reservoir”. The reservoir holds water; rain is how some of that water arrived. Ask how much rain is in the reservoir and the question has no answer, because the arriving stopped being rain the moment it landed. Energy behaves exactly like the water, and heat and work behave exactly like the rain and the inflow from the river: two different mechanisms of arrival, indistinguishable once they are in.
Which means the only honest way to talk about heat or work is to name a boundary and an interval of time. Not “how much heat does the gas have” but “how much heat crossed this surface between state 1 and state 2”. Every well-posed thermodynamics question is phrased that way, and every ill-posed one is not.
A system, drawn wherever you chose to draw it.
Heat in transit
Heat is energy that crosses the boundary of a system because of a temperature difference between the system and its surroundings. Three clauses, and all three are load-bearing. It must cross a boundary, so heat is defined only with reference to a system you have drawn. It must be crossing, so heat has no existence before or after. And the cause must be a temperature difference, which is what separates it from the other way energy gets across, which is work.
The symbol is \(Q\) for the total amount transferred over a process, in joules, and \(\dot{Q}\) for the rate, in watts. Divide by mass and you have \(q = Q/m\), the transfer per kilogram, which is the form the tables and the steady-flow equations prefer. A process with no heat transfer at all is called adiabatic, and there are two quite different ways to get one: insulate the boundary so well that nothing gets through, or arrange for the system and its surroundings to sit at the same temperature so that nothing is driving anything through.
Adiabatic does not mean isothermal, and confusing the two is the standard error. An adiabatic process is one with \(Q = 0\); an isothermal process is one with \(\Delta T = 0\). A gas compressed quickly in a lagged cylinder gets hotter while exchanging no heat whatever, because work crossed the boundary instead and work raises internal energy just as effectively. In the other direction, a gas expanding slowly against a piston while sitting in a bath stays at one temperature precisely because heat is flowing in to replace what the work is taking out. The two conditions are independent, and a process can have either, both or neither.
The mechanisms by which heat actually gets across are three: conduction through a material by molecular contact, convection between a surface and a fluid moving past it, and radiation by electromagnetic waves through no medium at all. Each has its own rate law — Fourier, Newton, Stefan-Boltzmann — and its own body of theory, which is the subject of heat transfer rather than of thermodynamics.
The distinction between the two subjects is worth stating plainly. Thermodynamics tells you how much energy must cross for a system to get from one state to another; it is indifferent to the route and silent about the clock. Heat transfer tells you how fast it crosses given a particular wall, a particular fluid, a particular geometry. A thermodynamic analysis that says 200 kJ must leave the block is complete and correct whether the block takes a second or a fortnight. For this course the mechanisms can be named and set aside; \(Q\) enters the energy balance as a number, and where that number came from is somebody else’s chapter.
A system, its surroundings, and a difference in temperature.
Moving boundary work
Work is the other way energy crosses a boundary: an interaction that is not driven by a temperature difference. The mechanical definition survives intact — a force acting through a distance — and the most important case in closed-system thermodynamics is the one where the boundary itself moves. A gas in a cylinder pushes the piston out, or the piston is pushed in against the gas. This is variously called moving boundary work, expansion work, or simply \(P\,dV\) work.
Take a piston of area \(A\) with gas at pressure \(P\) beneath it. The force the gas exerts on the face is \(PA\). Let the face rise by a small distance \(dx\), small enough that the pressure has not appreciably changed while it moved. The work done in that step is the force times the distance, and the area cancels against itself:
Integrate over the whole stroke and you have the work for the process:
That integral cannot be evaluated until you know how \(P\) varies with \(V\) along the way, and that is not a mathematical inconvenience, it is the physics. Two numbers — the initial and final volumes — do not determine the answer. You need the entire function between them. This is why a thermodynamics problem is never fully specified by its endpoints alone; it must also tell you the process, whether that is at constant pressure, at constant temperature, polytropic with some exponent \(n\), or something given only as a graph.
There is a condition attached, and it is easy to slide past. The \(P\) in the integral is the pressure at the face of the piston, and the step is only usable if that is also the pressure of the gas as a whole. That requires the process to be slow enough for the gas to stay very nearly uniform throughout, which is the quasi-equilibrium assumption. Let a piston fly outwards and the gas immediately behind it drops in pressure while the gas at the far end has not yet noticed; there is then no single \(P\) to integrate, the states in between are not equilibrium states, and the process cannot be drawn as a line on a property diagram at all. Real machines are close enough to quasi-equilibrium to be modelled this way, which is a piece of luck the subject depends on completely.
Now the reading that makes it stick. Plot the process on a diagram with \(V\) across and \(P\) up. The quantity \(P\,dV\) is the area of a thin vertical strip under the curve, and the integral is the sum of all of them, so the work done is the area under the process line. That single sentence turns an integral into something you can see. Expansion runs left to right and sweeps out positive area, so the system does work on the surroundings. Compression runs right to left and sweeps out the same area with the opposite sign. And a process that changes pressure at constant volume — heating a sealed rigid tank, say — is a vertical line, which encloses no area whatever, so no boundary work is done no matter how far the pressure climbs.
Once work is an area, the fact that two processes joining the same two states give different answers stops being surprising and becomes obvious. Different curves between the same two points enclose different areas. That is not a subtlety of thermodynamics; it is a fact about integrals, and thermodynamics simply refuses to hide it.
The gas presses on the face with the pressure it happens to be at.
Other forms of work
The moving boundary is the form that dominates closed-system problems, but it is not the only way energy crosses as work, and a system whose volume never changes can still have a great deal of work done on it. The others come up constantly, and they are worth having by name.
Shaft work is what a rotating shaft delivers through a boundary it pierces — a paddle wheel stirring a fluid, a compressor rotor, a turbine blade row. A shaft carrying a torque \(T\) through an angle \(\theta\) transmits
where \(n\) is the number of revolutions. Note what this does to a rigid tank. The volume is fixed, so there is no boundary work, and yet a paddle can pour energy in indefinitely and the temperature will climb. Joule’s experiment was exactly this, and it is the cleanest demonstration that work and heat are interchangeable as far as the energy of a system is concerned.
Spring work is the work stored in stretching or compressing an elastic element. For a linear spring the restoring force is \(F = kx\) measured from the undeformed length, so the work done moving from one deflection to another is the integral of that force:
The squares are the part students drop. It is not \(\tfrac{1}{2}k(x_2 - x_1)^{2}\), and the two agree only when the spring starts from its free length. Electrical work is the same idea with electrical quantities: a potential difference \(V\) driving a current \(I\) across the boundary of a system does work at a rate \(VI\), so over an interval \(W_{e} = \int VI\,dt\), which is \(VI\,\Delta t\) when both are steady. The resistance heater in a water tank is doing work on the water, not transferring heat to it, however strongly the name suggests otherwise — the boundary crossing is electrical, and there is no temperature difference driving it.
Set the three side by side and the pattern is unmistakable. Torque through an angle. Force through a distance. Voltage through a charge. In every case work is a generalised force multiplied by the generalised displacement it drives:
That is the honest definition, and pressure times volume change fits it as neatly as the rest, with pressure as the force and volume as the displacement. The same structure runs through the method of virtual work in statics, where a system is nudged through a small compatible displacement and the work of every force is added up. The pairing of a driving intensity with the thing it moves is not a thermodynamic invention; thermodynamics only widens the list of what counts as a force and what counts as a displacement.
A shaft turns a paddle. Torque through an angle.
Path and state
Everything above converges on one distinction, and the whole subject rests on it. Energy is a property, so it is a function of state: its value belongs to the state and its change over a process is the difference of two lookups. Heat and work are not properties. They are modes of transfer, and how much of each occurs depends on the route taken between the two states.
Notation is used to keep the two apart, and it is not decoration. A state function gets an exact differential, written \(d\), and integrates to a difference:
A path function gets an inexact differential, written \(\delta\), and integrates to a total that is not a difference of anything:
There is no \(W_2\) to subtract from, because the system at state 2 has no work. Writing \(\Delta W\) or \(\Delta Q\) is not a slip of the pen; it asserts that work and heat are stored quantities, which is precisely the error this topic exists to prevent.
The sharpest consequence appears when a system is taken round a cycle and returned to the state it started in. Every property comes back to the value it had, so the integral of every property around the loop is zero:
The path functions do no such thing. The net work round a cycle is the area enclosed by the loop on the \(P\)–\(V\) diagram, and unless the loop has no interior that area is not zero. Traverse it clockwise and the outbound expansion sweeps more area than the return compression takes back, so net work comes out. Traverse it anticlockwise and net work goes in. Every engine, every refrigerator and every heat pump is that observation turned into hardware.
One last thing has to be nailed down before any of this can be computed, and it is the sign convention. The classical one, and the one used here, is that heat added to the system is positive and work done by the system is positive, which lines the first law up as \(Q - W = \Delta U\) and reads naturally for an engine: heat in, work out. It is not universal. Much of the chemistry literature, and a good deal of modern physics, counts work done on the system as positive and writes \(Q + W = \Delta U\) instead. Neither is more correct than the other, and a great many wrong answers are a correct calculation carrying somebody else’s sign.
So state the convention at the top of the page before writing a single equation, and hold it for the whole problem. Then a negative \(Q\) means the system was cooled and a negative \(W\) means it was compressed, and the arithmetic will tell you which way things went even when your physical intuition guessed wrong. With energy, heat and work all defined, the accounting that ties them together is the first law for closed systems, and it is one line long.