The Laws of Thermodynamics: Zeroth, First, Second and Third Laws Explained with Equations

Four Laws That Govern Every Engine, Pump, Heat Exchanger and Refrigerator

Thermodynamics is the bookkeeping of energy. Four laws, numbered zero to three, set the rules: what temperature means, that energy is conserved, which way heat and processes can go, and what happens as a substance approaches absolute zero. This page gives each law in plain words, the equations engineers actually use, and a short example. Click any figure to enlarge it.

For property data to use with these equations see Thermodynamics Land (400+ fluids) and the enthalpy and entropy of water.

The Laws of Thermodynamics
01

The Four Laws at a Glance

LawIn one sentenceWhat it gives youKey equation
ZerothTwo bodies each in thermal equilibrium with a third are in equilibrium with each other.Temperature, and thermometers\(T_A = T_C,\ T_B = T_C \Rightarrow T_A = T_B\)
FirstEnergy is conserved: it changes form but is never created or destroyed.Energy balances, internal energy, enthalpy\(\Delta U = Q - W\)
SecondHeat flows by itself only from hot to cold, and no engine turns all of its heat into work.Entropy, efficiency limits, direction of processes\(\Delta S_{\text{isolated}} \ge 0\)
ThirdThe entropy of a perfect crystal approaches zero as its temperature approaches absolute zero.Absolute entropy; absolute zero cannot be reached\(\lim_{T\to 0} S = 0\)
Systems and boundaries

Every thermodynamic problem starts by drawing a boundary around the system. Everything outside is the surroundings. What may cross the boundary decides which form of each law you use:

  • Isolated: nothing crosses. Its energy is constant and its entropy can only rise.
  • Closed (control mass): heat and work cross, mass does not. A gas in a cylinder.
  • Open (control volume): mass flows through as well. A pump, turbine, nozzle or heat exchanger.

Temperatures in these laws are absolute: \(T(\text{K}) = T(^\circ\text{C}) + 273.15\) and \(T(^\circ\text{R}) = T(^\circ\text{F}) + 459.67\).

Isolated, closed and open thermodynamic systems, showing which of heat, work and mass cross the boundary Isolated, Closed and Open Systems
02

The Zeroth Law: Thermal Equilibrium and Temperature

Put two bodies in contact and heat flows from the hotter to the colder until it stops. They are then in thermal equilibrium. The zeroth law says this relation is transitive:

Zeroth law. If body A is in thermal equilibrium with body C, and body B is in thermal equilibrium with body C, then A and B are in thermal equilibrium with each other.
Transitivity of equilibrium\[ T_A = T_C \ \text{ and } \ T_B = T_C \;\Rightarrow\; T_A = T_B \]

It sounds obvious, but it is what makes temperature a real property. Body C can be a thermometer: once it has come to equilibrium with A, its reading tells you whether A would exchange heat with B, without A and B ever touching. Every temperature measurement, from a thermocouple on a turbine blade to a bulb thermometer, relies on it.

The law was recognized after the first three had been numbered. It was more basic than all of them, so it was given the number zero.

Bodies A and B each reach equilibrium with thermometer C; then A and B are in equilibrium with each other The Zeroth Law
In practice
  • A thermometer reads its own temperature. Give it time to reach equilibrium with what you are measuring.
  • A sensor that conducts heat away (a heavy probe in a thin gas stream) can change the temperature it is trying to read.
  • Equal temperatures mean no net heat flow, even when the two bodies hold very different amounts of energy.
03

The First Law: Conservation of Energy

First law. Energy can be neither created nor destroyed; it only changes form. The change in a system's energy equals the energy that crosses its boundary as heat and work.
Closed system
Energy balance, closed system\[ \Delta U + \Delta KE + \Delta PE = Q - W \]

\(U\) is the internal energy: the energy of the molecules themselves. For most closed systems the kinetic and potential energy changes are negligible and the balance is simply \(\Delta U = Q - W\).

Sign convention. Here \(Q\) is heat added to the system and \(W\) is work done by the system, the usual engineering convention. Chemistry texts often take work done on the system as positive and write \(\Delta U = Q + W\). Same physics, different signs: check which a source uses.
Boundary (piston) work\[ W_b = \int_{V_1}^{V_2} p\,dV \qquad \begin{aligned} &\text{constant } p:\; W_b = p\,(V_2 - V_1) \\ &\text{ideal gas, constant } T:\; W_b = mRT\ln\frac{V_2}{V_1} \end{aligned} \]

Over a complete cycle the system returns to its starting state, so \(\Delta U = 0\) and the net work out equals the net heat in: \(W_{\text{net}} = Q_{\text{net}}\).

Open system (steady flow)

For a device with fluid flowing through it, the energy carried in and out by the flow is added to the balance. The flow work \(pv\) needed to push fluid across the boundary combines with \(u\) into the enthalpy:

Enthalpy\[ h = u + p\,v \]
Steady-flow energy equation (one inlet, one outlet)\[ \dot Q - \dot W = \dot m \left[ (h_2 - h_1) + \frac{V_2^{\,2} - V_1^{\,2}}{2} + g\,(z_2 - z_1) \right] \]
Steady-flow control volume with mass flow in at state 1 and out at state 2, heat added and shaft work out Steady-Flow Control Volume
  • Turbine, compressor, pump: usually adiabatic with small velocity and height changes, so \(\dot W = \dot m\,(h_1 - h_2)\).
  • Heat exchanger, boiler: no shaft work, so \(\dot Q = \dot m\,(h_2 - h_1)\).
  • Nozzle, diffuser: no work, little heat: enthalpy is traded for velocity.
  • Throttling valve: \(h_2 = h_1\).

For an ideal gas \(\Delta u = c_v\,\Delta T\) and \(\Delta h = c_p\,\Delta T\). In US units, divide the velocity and height terms by \(g_c = 32.174\ \text{lbm·ft/(lbf·s}^2)\) and by 778.17 ft·lbf/Btu to keep everything in Btu/lbm.

04

The Second Law: Entropy and the Limits of Engines

The first law says energy is conserved but not which way processes run. Hot coffee cools in a cold room and never heats itself back up, although energy would be conserved either way. The second law supplies the direction. It has two classic statements, which can be shown to be equivalent:

  • Kelvin-Planck: no device operating in a cycle can take heat from a single reservoir and turn all of it into work. Every heat engine must reject some heat to a colder sink.
  • Clausius: no device operating in a cycle can move heat from a colder body to a hotter one without work input. Refrigerators and heat pumps need power.
Entropy

The second law is written with entropy, \(S\), a property defined by heat transferred reversibly:

Definition and the second law\[ dS = \frac{\delta Q_{\text{rev}}}{T} \qquad \Delta S \ge \int \frac{\delta Q}{T} \qquad \Delta S_{\text{isolated}} = S_{\text{gen}} \ge 0 \]

Real processes always generate entropy, through friction, mixing, heat transfer across a temperature difference and unrestrained expansion. Only an ideal reversible process has \(S_{\text{gen}} = 0\). The more entropy a machine generates, the further it falls short of the ideal.

Ideal gas entropy change\[ s_2 - s_1 = c_p \ln\frac{T_2}{T_1} - R\ln\frac{p_2}{p_1} \]
Heat engine taking QH from a hot reservoir, producing net work and rejecting QC; refrigerator using work input to move QC from cold to hot Heat Engine and Refrigerator
Carnot limits

No engine working between a hot reservoir at \(T_H\) and a cold one at \(T_C\) can beat a reversible (Carnot) engine. Temperatures must be absolute.

Heat engine efficiency\[ \eta = \frac{W_{\text{net}}}{Q_H} = 1 - \frac{Q_C}{Q_H} \;\le\; \eta_{\text{Carnot}} = 1 - \frac{T_C}{T_H} \]
Refrigerator and heat pump, coefficient of performance\[ \text{COP}_R = \frac{Q_C}{W_{\text{in}}} \le \frac{T_C}{T_H - T_C} \qquad \text{COP}_{HP} = \frac{Q_H}{W_{\text{in}}} \le \frac{T_H}{T_H - T_C} \]

Raising \(T_H\) or lowering \(T_C\) raises the ceiling, which is why gas turbines push turbine inlet temperatures as high as the blade materials allow. A COP above 1 does not break any law: a heat pump moves more heat than the work it uses.

05

The Third Law: Absolute Zero

Third law. The entropy of a pure, perfect crystal approaches zero as its temperature approaches absolute zero.
Third law\[ \lim_{T \to 0\,\text{K}} S = 0 \quad \text{(perfect crystal)} \]

A perfect crystal at absolute zero has only one possible arrangement of its atoms, so there is nothing left to be uncertain about. Glasses and crystals with frozen-in disorder keep a small residual entropy.

A consequence is that absolute zero cannot be reached in a finite number of steps. Each cooling step removes a smaller share of the entropy that is left, so the temperature approaches 0 K without arriving.

Why engineers care

The first and second laws only give changes in entropy. The third law fixes the zero, so tables can list absolute entropies, measured from 0 K:

Absolute entropy from heat capacity\[ S(T) = \int_{0}^{T} \frac{c_p(T)}{T}\,dT \;+\; \sum \frac{\Delta H_{\text{phase}}}{T_{\text{phase}}} \]

Absolute entropies are what make it possible to work out the entropy change of chemical reactions, such as combustion, from tabulated data. Steam and refrigerant tables usually set their own reference point instead (for water, zero entropy for saturated liquid at the triple point), which is fine for differences within one substance.

06

Worked Examples

1. Steam turbine power (first law)

Steam enters an adiabatic turbine at \(h_1 = 3000\) kJ/kg and leaves at \(h_2 = 2500\) kJ/kg, with \(\dot m = 2\) kg/s. Velocity and height changes are small.

\[ \dot W = \dot m\,(h_1 - h_2) = 2 \times (3000 - 2500) = 1000\ \text{kW} \]
2. Gas in a rigid tank (first law)

A rigid tank does no boundary work (\(dV = 0\)), so all the heat added raises the internal energy: \(Q = \Delta U = m\,c_v\,\Delta T\). For 1 kg of air (\(c_v \approx 0.718\) kJ/kg·K) heated by 100 K, \(Q \approx 71.8\) kJ.

3. Best possible engine (second law)

A heat engine takes heat from combustion gases at 1500 K and rejects it to the atmosphere at 300 K.

\[ \eta_{\text{Carnot}} = 1 - \frac{300}{1500} = 0.80 \]

No engine between these temperatures can exceed 80 %; real engines reach well under that because of the entropy they generate.

4. Heat pump (second law)

A heat pump warms a house at 293 K (20 °C) from outdoor air at 273 K (0 °C): \(\text{COP}_{HP,\max} = 293 / (293 - 273) \approx 14.7\). Real units manage a fraction of that, but still deliver several kW of heat per kW of electricity.

07

Sources and Further Reading

Cite This Work