Lesson 2 of 15

Energy & the First Law

Work as an area, heat as energy in transit, internal energy as what a system keeps — and the first law that balances the books for every process and every cycle, from a piston to a power plant.

8 min3 live simulations
you are here
The question

A power plant burns fuel and sends out electricity. A refrigerator draws electricity and pumps heat out of your food. A falling weight stirs a tank of water and the water gets warm. Energy changes form in all three, but none of it is ever created or lost. Where does the energy go, and how do you keep the books?

Energy, in three accounts

From mechanics you already know two forms of energy. A mass mm moving at speed VV carries kinetic energy 12mV2\tfrac12 mV^2; lifted to height zz, it stores gravitational potential energy mgzmgz. In mechanics, work done on a body changes these and nothing else.

Thermodynamics adds a third account: internal energy, UU. It is everything stored inside the matter — the jiggling, spinning and vibrating of its molecules, the energy of their chemical bonds, the energy holding nuclei together. We never need its absolute value, only how it changes. A system's total energy is

E=U+12mV2+mgz.E = U + \tfrac12 mV^2 + mgz.

There are exactly two ways to change EE for a closed system: work and heat. Both are energy in transit across a boundary. A system contains energy; it does not contain work or heat.

Work is an area

Thermodynamics takes the mechanical definition of work, force times distance, and broadens it: work is any energy transfer across the boundary whose sole effect outside could have been the lifting of a weight. A spinning shaft, an electric current and a moving piston all qualify.

Sign convention. Following Moran and Shapiro, W\cwork{W} is positive when the system does work on its surroundings — a gas pushing a piston out, steam spinning a turbine — and negative when work is done on the system.

The most important kind for us is the work of a moving boundary. Gas at pressure pp pushes on a piston of area AA with force pApA; if the piston moves dxdx, the gas does work pA dx=p dVpA\,dx = p\,dV. Over a quasi-equilibrium process,

W=∫V1V2p dV,\cwork{W} = \int_{V_1}^{V_2} p\,dV,

which is just the area under the process curve on a p–V diagram. Many real expansions and compressions follow a polytropic path pVn=constantpV^n = \text{constant}, and the exponent nn tells you a lot about what is going on:

ExploreWork is an area
01234500.511.52volume V (litres)pressure p (bar)12W = 89 J300 KQ in+0 JW out+89 JΔU−89 JQ = ΔU + W
1.40 · adiabatic
3.00 · expansion
Final state0.21 bar193 K
Work by the gas89 J
Heat into the gas0 J
Challenges0/3
  • Find the exponent at which no heat crosses the boundary.
  • Make the gas do work while its internal energy stays the same.
  • Compress the gas so that it gets hotter even though heat flows out of it.
A polytropic process, pVⁿ = constant, for air (ideal gas, constant specific heats). The shaded area under the path is the boundary work W = ∫p dV. The first law then fixes the heat: Q = ΔU + W. Red arrows show heat flowing in, blue flowing out.

The first thing the diagram teaches is that work depends on the path. Two processes between the same pair of states can have completely different areas under them. Work is not a property of a state; it is a property of a process. That is why we write δW\delta W for a little bit of it, not dWdW.

ExploreSame start, same end, different bills
0123401234volume V (litres)pressure p (bar)ABdrag meQ (heat in)+800 JW (work out)+400 JΔU (fixed!)+400 J
Work400 J
Heat800 J
ΔU400 Jsame for every path
Challenges0/3
  • Find a route on which the gas does less than 200 J of work.
  • Find a route on which it does more than 800 J.
  • Try six routes with clearly different work.
Air goes from state A (1 L, 2 bar) to state B (3 L, 1.2 bar) by way of the corner you drag. The internal energy change depends only on the end states; the work — the area under the path — and so the heat, depend on the route.

Heat is energy crossing because of a temperature difference

Heat, Q\cheat{Q}, is energy transferred across a boundary because of a temperature difference — and only that. Its sign convention is the opposite of work's: Q\cheat{Q} is positive when heat flows into the system. (The two conventions together reflect the steam engine: heat in, work out, both positive.) A process with Q=0\cheat{Q} = 0 is adiabatic.

Heat travels in three ways:

  • Conduction, through a material, by molecules passing on their agitation: Fourier's law, Q˙=−kA dT/dx\dot Q = -kA\,dT/dx.
  • Convection, between a surface and a moving fluid: Q˙=hA(Ts−Tf)\dot Q = hA(T_s - T_f).
  • Radiation, as electromagnetic waves, needing no medium at all: Q˙=εσAT4\dot Q = \varepsilon \sigma A T^4 from a surface at absolute temperature TT.

Thermodynamics tells you how much heat must cross; these rate laws, the province of heat transfer, tell you how fast it will.

The first law

Two hundred years ago, heat was thought to be a fluid — "caloric" — that flowed from hot bodies to cold ones and was conserved in its own right. James Joule killed the idea in the 1840s by showing that work could do exactly what heat does. Stir water hard enough, and it warms just as if it had been heated:

ExperimentJoule’s paddle wheel
20 kg2.0 m20.00 °C
20 kg
2.0 m
1.0 kg
Work done on the water0 Jmgh = 392 J per drop
Temperature rise0.000 Kexpect W / (m c) = 0.000 K
One drop of 20 kg through 2.0 m is 392 J — enough to warm 1.0 kg of water by 0.094 K. Joule measured this ratio, the “mechanical equivalent of heat”, as 4.15 J per calorie.
Challenges0/2
  • Warm the insulated water by at least 1 °C.
  • Warm the water, then remove the insulation and watch the energy leave as heat.
James Joule’s 1840s experiment: a falling weight turns a paddle wheel in an insulated tank of water, and the water warms. No heat is added — only work — yet the water ends up exactly as if it had been heated. With the insulation off, the warmth leaks away as heat to the room.

Joule's experiments, and every experiment since, establish the First lawEnergy is conserved: for a closed system, ΔE = Q − W. Energy can change form and cross boundaries, but never appears or disappears.: energy is conserved. For a closed system,

ΔKE+ΔPE+ΔU=Q−W.\Delta KE + \Delta PE + \Delta U = \cheat{Q} - \cwork{W}.

The change in the energy stored equals the net energy that crossed the boundary as heat and work. On the left, a change in a property — it depends only on the end states. On the right, two quantities that depend on the path. The magic of the first law is that their difference doesn't.

Check your intuition
A sealed, rigid tank of gas sits in the sun and warms up. Which statement is correct?

Cycles: the books must balance to zero

A cycle returns a system to its starting state, so every property — internal energy included — comes back to where it was. Over a whole cycle ΔE=0\Delta E = 0, and the first law collapses to

Wcycle=Qin−Qout.\cwork{W}_\text{cycle} = \cheat{Q}_\text{in} - \cheat{Q}_\text{out}.

The net work out of a cycle is the net heat into it. That single line underlies every engine and every refrigerator in this course. Three kinds of cycle matter:

Power cycles take in heat Qin\cheat{Q}_\text{in} from a hot source, deliver work, and reject the rest. Their figure of merit is the thermal efficiency,

η=WcycleQin=1−QoutQin.\eta = \frac{\cwork{W}_\text{cycle}}{\cheat{Q}_\text{in}} = 1 - \frac{\cheat{Q}_\text{out}}{\cheat{Q}_\text{in}}.

Refrigeration cycles take work and use it to pull heat Qin\cheat{Q}_\text{in} out of a cold space. Their measure is the Coefficient of performanceUseful heat moved divided by work in: Q_C/W for a refrigerator, Q_H/W for a heat pump. It can exceed 1., β=Qin/Wcycle\beta = \cheat{Q}_\text{in} / \cwork{W}_\text{cycle}.

Heat-pump cycles are the same machine, valued for the heat they deliver to a warm space: γ=Qout/Wcycle=β+1\gamma = \cheat{Q}_\text{out} / \cwork{W}_\text{cycle} = \beta + 1.

Estimate first
A large coal-fired steam plant produces 600 MW of electricity at 38% efficiency. How much heat, in MW, must its cooling towers reject?
101001,00010,000100,000
Drag along the line to place your guess — each tick is ten times the last.
Check your intuition
An inventor claims a heat engine that takes in 100 kJ of heat, delivers 60 kJ of work and rejects 50 kJ. What is wrong?
Going deeper
Going deeper: why the polytropic exponent tells you about heat

For an ideal gas with constant specific heats, UU depends only on temperature: ΔU=mcv(T2−T1)\Delta U = mc_v(T_2 - T_1). Along pVn=pV^n = constant, the work is W=(p2V2−p1V1)/(1−n)W = (p_2V_2 - p_1V_1)/(1-n) for n≠1n \ne 1, and p1V1ln⁡(V2/V1)p_1V_1\ln(V_2/V_1) for n=1n = 1. Combining these with the first law gives the heat:

Q=W γ−nγ−1,γ=cp/cv.Q = W\,\frac{\gamma - n}{\gamma - 1},\qquad \gamma = c_p/c_v.

So for an expansion (W>0W > 0), heat flows in when n<γn < \gamma and out when n>γn > \gamma; at n=γn = \gamma the process is adiabatic. For compression the signs reverse. When 1<n<γ1 < n < \gamma, something curious happens in a compression: the gas gets hotter even as heat flows out — the work done on it raises its internal energy faster than the heat loss lowers it. Internal-combustion engine compression strokes live in exactly this range.

Recap
What to carry forward
  • A system's energy is internal + kinetic + potential. It changes only by work and heat crossing the boundary.
  • Boundary work is ∫p dV\int p\,dV, the area under the path on a p–V diagram. Work and heat depend on the path; ΔU\Delta U does not.
  • Sign convention: W>0\cwork{W} > 0 when the system does work, Q>0\cheat{Q} > 0 when heat flows in.
  • First law: ΔE=Q−W\Delta E = \cheat{Q} - \cwork{W}. Joule showed that work and heat are interchangeable ways of changing UU.
  • Over a cycle, W=Qin−Qout\cwork{W} = \cheat{Q}_\text{in} - \cheat{Q}_\text{out}. Efficiency η=W/Qin\eta = W/Q_\text{in}; refrigerators and heat pumps are rated by coefficients of performance.

Next: to use the first law on real substances we need their properties. Why does water boil at 70 °C on Everest — and how do engineers read a steam table?

Finished this lesson?Mark it complete to track your progress through the course (saved in this browser).
Up next · Lesson 3Evaluating PropertiesWhy does water boil at 100 °C in Paris but 70 °C on Everest?Keep going →