Skip to content

Thermodynamics


This page is written in collaboration with Michael Zhao.


Theorem (Zeroth Law of Thermodynamics). If systems AA and BB are each in thermal equilibrium with a third system CC, then AA and BB are in thermal equilibrium with each other.

This is what lets temperature be a well-defined property: a thermometer (system CC) can be used to compare any two systems. Two systems placed in thermal contact eventually reach the same temperature.

The temperature scales are related by

TC=Tβˆ’273.15,TF=1.8 TC+32,T_C = T - 273.15, \qquad T_F = 1.8\,T_C + 32,

where TT is in kelvin. The triple point of water defines the kelvin,

Ttr=273.16Β K.T_{\text{tr}} = 273.16\text{ K}.

A constant-volume gas thermometer measures temperature through the pressure of a fixed volume of gas, read off as a height difference hh in a mercury manometer. Extrapolating the pressure of a dilute gas to zero defines absolute zero.

Most materials expand when heated due to the increased motion of its atoms. For a solid, the change in any length is

Ξ”L=Ξ±L ΔT,\Delta L = \alpha L\,\Delta T,

where Ξ±\alpha is the coefficient of linear expansion.

For an isotropic solid (same material everywhere) the fractional change Ξ”L/L=α ΔT\Delta L/L = \alpha\,\Delta T is the same for every line in the body β€” length, thickness, face diagonal, body diagonal, and the diameter of a hole punched in it. The expansion behaves like a photographic enlargement in three dimensions. Consequently, area and volume scale as

Ξ”A=2Ξ±A ΔT,Ξ”V=3Ξ±V ΔT.\Delta A = 2\alpha A\,\Delta T, \qquad \Delta V = 3\alpha V\,\Delta T.

A common trap: a hole in a plate gets larger when the plate is heated, not smaller, because every line lengthens in the same ratio.

For a liquid we describe expansion by volume directly,

Ξ”V=Ξ²V ΔT,\Delta V = \beta V\,\Delta T,

where Ξ²\beta is the coefficient of volume expansion (so Ξ²=3Ξ±\beta = 3\alpha for an isotropic solid). Water is the famous exception to Ξ²>0\beta > 0: between 0∘C0^\circ\text{C} and about 4∘C4^\circ\text{C} it contracts on heating, reaching maximum density (minimum specific volume) near 4∘C4^\circ\text{C}. This is due to IMFs and other chemical properties that won’t be discussed here.

Thermal expansion comes from the asymmetry of the interatomic potential energy curve U(r)U(r). Near the equilibrium separation r0r_0 the well is steeper on the close-in side than on the far side. As temperature and vibrational energy rise, the average separation ⟨r⟩\langle r\rangle creeps outward even though r0r_0 does not change. A perfectly symmetric (parabolic) well would give no expansion.

A bimetallic strip bonds two metals with different Ξ±\alpha (e.g. brass and steel). Heating bends the strip toward the lower-Ξ±\alpha metal; coiling it into a helix turns this into a thermometer or thermostat switch.

Example. Railroad track is laid in 25Β m25\text{ m} steel segments at 10∘C10^\circ\text{C}. How wide must the expansion gap between consecutive segments be so the rails do not buckle when the temperature rises to 50∘C50^\circ\text{C}? Take Ξ±steel=1.1Γ—10βˆ’5 ∘Cβˆ’1\alpha_{\text{steel}} = 1.1\times 10^{-5}\ ^\circ\text{C}^{-1}.

Each segment lengthens by

Ξ”L=Ξ±L ΔT=(1.1Γ—10βˆ’5)(25)(40)=1.1Γ—10βˆ’2Β m.\Delta L = \alpha L\,\Delta T = (1.1\times 10^{-5})(25)(40) = 1.1\times 10^{-2}\text{ m}.

So a gap of about 11 mm11\text{ mm} is needed. Note that we used the installed length and the temperature change (the size of a degree is the same in ∘C^\circ\text{C} and ∘K^\circ\text{K}); the absolute temperature never enters.

Theorem (Ideal Gas Law). Pressure, volume, temperature, and amount of gas are tied together by

PV=nRT=NkBT.PV = nRT = Nk_BT.

Here

kB=1.38Γ—10βˆ’23Β J/K,NA=6.02Γ—1023Β molβˆ’1,N=nNA,k_B = 1.38\times 10^{-23}\text{ J/K}, \qquad N_A = 6.02\times 10^{23}\text{ mol}^{-1}, \qquad N = nN_A,

and the molar gas constant is

R=kBNA=8.31Β J/(molβ‹…K).R = k_B N_A = 8.31\text{ J/(molΒ·K)}.

nn is the number of moles of gas (see AP Chemistry for more information), NN is the number of particles, PP is pressure, VV is volume, TT is temperature (in Kelvin), NAN_A is Avogadro’s number, and kBk_B is Boltzmann’s constant.

The model rests on a handful of assumptions:

  1. The gas is made of particles in random motion obeying Newton’s laws (no quantum effects).
  2. The number of molecules is very large.
  3. The molecules occupy a negligible fraction of the container volume.
  4. No forces act on a molecule except during collisions (with walls or other molecules).
  5. All collisions are elastic and of negligible duration.

Robert Brown observed fine particles suspended in a fluid jittering randomly. Einstein modeled this as the cumulative effect of molecular bombardment: for a sphere of radius aa suspended in a gas of viscosity Ξ·\eta,

⟨(Ξ”x)2⟩=RT3πηaNA Δt.\langle(\Delta x)^2\rangle = \frac{RT}{3\pi\eta a N_A}\,\Delta t.

Note that ⟨⟩\langle\rangle denotes the average. Jean Baptiste Perrin used measurements of ⟨(Ξ”x)2⟩\langle(\Delta x)^2\rangle to deduce NA∼6Γ—1023N_A \sim 6\times 10^{23}. Qualitatively, a larger NAN_A would mean the bombardment on opposite sides nearly balances (less jitter); a smaller NAN_A would mean bigger fluctuations.

Treating wall collisions as elastic momentum reversals and extrapolating from one dimension to three gives

p=13ρ⟨v2⟩,p = \tfrac13 \rho \langle v^2\rangle,

where ρ\rho is the mass density. Solving for the root-mean-square speed,

vrms=⟨v2⟩=3pρ=3kBTm=3RTM.v_{\text{rms}} = \sqrt{\langle v^2\rangle} = \sqrt{\frac{3p}{\rho}} = \sqrt{\frac{3k_BT}{m}} = \sqrt{\frac{3RT}{M}}.

Example. Find the rms speed of nitrogen molecules (N2\text{N}_2, molar mass M=0.028Β kg/molM = 0.028\text{ kg/mol}) in air at T=300Β KT = 300\text{ K}.

Using vrms=3RT/Mv_{\text{rms}} = \sqrt{3RT/M},

vrms=3(8.31)(300)0.028=2.67Γ—105β‰ˆ517Β m/s.v_{\text{rms}} = \sqrt{\frac{3(8.31)(300)}{0.028}} = \sqrt{2.67\times 10^{5}} \approx 517\text{ m/s}.

This is comfortably faster than the speed of sound in air (∼340Β m/s\sim 340\text{ m/s}), which makes sense β€” sound propagates through the same molecular collisions, just slower than the typical molecular speed.

A molecule sweeps out a cylinder as it moves; treating it as having effective diameter 2d2d (all other molecules being points) and counting collisions gives the mean free path

Ξ»=VNΟ€d2.\lambda = \frac{V}{N\pi d^2}.

Two refinements: using pV=NkBTpV = Nk_BT converts this to

Ξ»=kBTΟ€d2p,\lambda = \frac{k_BT}{\pi d^2 p},

and accounting for the fact that the relative speed between molecules exceeds the average speed introduces a factor of 2\sqrt 2:

Ξ»=kBT2 πd2p.\lambda = \frac{k_BT}{\sqrt2\,\pi d^2 p}.

For NN molecules of mass mm at temperature TT, the number with speeds in [v,v+dv][v, v+dv] is N(v) dvN(v)\,dv, where

N(v)=4Ο€N(m2Ο€kBT)3/2v2eβˆ’mv2/2kBT,N=∫0∞N(v) dv.N(v) = 4\pi N\left(\frac{m}{2\pi k_BT}\right)^{3/2} v^2 e^{-mv^2/2k_BT}, \qquad N = \int_0^\infty N(v)\,dv.

Three characteristic speeds come from this distribution:

vp=2kBTm=2RTM(mostΒ probable),v_p = \sqrt{\frac{2k_BT}{m}} = \sqrt{\frac{2RT}{M}} \quad(\text{most probable}), vav=1N∫0∞v N(v) dv=8kBTΟ€m=8RTΟ€M,v_{\text{av}} = \frac1N\int_0^\infty v\,N(v)\,dv = \sqrt{\frac{8k_BT}{\pi m}} = \sqrt{\frac{8RT}{\pi M}}, ⟨v2⟩=1N∫0∞v2N(v) dv=3kBTm,vrms=3RTM.\langle v^2\rangle = \frac1N\int_0^\infty v^2 N(v)\,dv = \frac{3k_BT}{m}, \qquad v_{\text{rms}} = \sqrt{\frac{3RT}{M}}.

Their fixed ratio is worth memorizing:

vp:vav:vrms=1:1.128:1.225.v_p : v_{\text{av}} : v_{\text{rms}} = 1 : 1.128 : 1.225.

The average translational kinetic energy per molecule is

Ktrans=32kBT.K_{\text{trans}} = \tfrac32 k_BT.

Changing variables with E=12mv2E = \tfrac12 mv^2 gives the Maxwell–Boltzmann energy distribution

N(E)=2NΟ€1(kBT)3/2 E1/2eβˆ’E/kBT.N(E) = \frac{2N}{\sqrt\pi}\frac{1}{(k_BT)^{3/2}}\,E^{1/2}e^{-E/k_BT}.

For real gases the ideal gas law is the first term of the virial expansion

pV=nRT[1+B1nV+B2(nV)2+⋯ ],pV = nRT\left[1 + B_1\frac{n}{V} + B_2\left(\frac nV\right)^2 + \cdots\right],

which reduces to the ideal gas law as the density n/V→0n/V \to 0. The van der Waals equation corrects separately for molecular volume and intermolecular attraction:

(p+an2V2)(Vβˆ’nb)=nRT.\left(p + \frac{an^2}{V^2}\right)(V - nb) = nRT.

The constant a>0a>0 for attractive forces: a molecule approaching the wall is pulled back by the others behind it, softening its impact and lowering the pressure. The constant bb accounts for the finite volume the molecules themselves occupy.

Heat is energy that flows between a system and its environment because of a temperature difference. By convention Q>0Q>0 when heat flows into the system. Crucially, heat and work are not state functions (a function that has the same value regardless of path) since a system does not β€œcontain” heat or work. They are associated with a process, with the transfer between states, not with the states themselves.

For a slab of thickness Ξ”x\Delta x and cross-section AA, the rate of heat flow is

H=kAΞ”TΞ”x,H = kA\frac{\Delta T}{\Delta x},

where kk is the thermal conductivity (units W/mΒ·K). In differential form,

H=βˆ’kAdTdx,H = -kA\frac{dT}{dx},

with the minus sign because heat flows down the temperature gradient. For a rod of length LL between fixed temperatures TH>TLT_H > T_L,

H=kATHβˆ’TLL.H = kA\frac{T_H - T_L}{L}.

Building materials are rated by the R-value (thermal resistance)

R=Lk.R = \frac Lk.

Conductances in series add like resistances (same HH, temperature drops add); in parallel the areas add.

Example. Two slabs with thicknesses L1,L2L_1, L_2 and conductivities k1,k2k_1, k_2 are stacked face to face. The outer faces are held at T1T_1 and T2T_2 (with T2>T1T_2 > T_1). In steady state, find the rate of heat flow and the interface temperature TxT_x.

In steady state no energy piles up at the interface, so the same HH flows through both slabs:

H=k1A(Txβˆ’T1)L1=k2A(T2βˆ’Tx)L2.H = \frac{k_1 A (T_x - T_1)}{L_1} = \frac{k_2 A (T_2 - T_x)}{L_2}.

Solving the right-hand equality for TxT_x and substituting back gives a result that looks exactly like resistors in series β€” the thermal resistances L/kL/k add:

H=A(T2βˆ’T1)L1k1+L2k2,Tx=k1L2 T1+k2L1 T2k1L2+k2L1.H = \frac{A(T_2 - T_1)}{\dfrac{L_1}{k_1} + \dfrac{L_2}{k_2}}, \qquad T_x = \frac{k_1 L_2\,T_1 + k_2 L_1\,T_2}{k_1 L_2 + k_2 L_1}.

The same idea extends to any number of layers: just sum all the Li/kiL_i/k_i in the denominator.

Convection transfers heat through bulk fluid motion: warmed fluid expands, becomes less dense, and rises while cooler fluid sinks, setting up a circulation.

Radiation transfers energy by electromagnetic waves, requiring no medium. Every object emits radiation depending on its temperature; the power radiated scales as the fourth power of the Kelvin temperature (see Stellar Physics). Earth’s average temperature levels off near 300Β K300\text{ K} because at that temperature it radiates energy away as fast as it absorbs it from the Sun.

The heat capacity of a body and the specific heat of its material are

C=QΞ”T,c=Cm=Qm ΔT.C = \frac{Q}{\Delta T}, \qquad c = \frac Cm = \frac{Q}{m\,\Delta T}.

Therefore the heat to change temperature is

Q=mcΞ”T,Q=m∫TiTfc dTQ = mc \Delta T, \qquad Q = m\int_{T_i}^{T_f} c\,dT

if cc varies with temperature. For a phase change at constant temperature, the latent heat (heat of transformation) gives

Q=Lm,Q = Lm,

with LfL_f for fusion (melting/freezing) and LvL_v for vaporization (boiling/condensing).

A useful empirical fact: the molar heat capacity (specific heat times molar mass) of most solids approaches about 25Β J/(molβ‹…K)25\text{ J/(molΒ·K)} at high temperature (the Dulong–Petit value), falling off toward zero at low temperature.

Example. How much heat is needed to turn 50Β g50\text{ g} of ice at βˆ’10∘C-10^\circ\text{C} into water at 20∘C20^\circ\text{C}? Use cice=2100Β J/(kgβ‹…K)c_{\text{ice}} = 2100\ \text{J/(kgΒ·K)}, cwater=4186Β J/(kgβ‹…K)c_{\text{water}} = 4186\ \text{J/(kgΒ·K)}, and Lf=3.34Γ—105Β J/kgL_f = 3.34\times 10^{5}\ \text{J/kg}.

Do the problem in three stages β€” never melt and warm in one step, because melting happens at constant temperature.

  1. Warm the ice from βˆ’10∘C-10^\circ\text{C} to 0∘C0^\circ\text{C}: β€…β€ŠQ1=mcice ΔT=(0.050)(2100)(10)=1050Β J.\;Q_1 = mc_{\text{ice}}\,\Delta T = (0.050)(2100)(10) = 1050\text{ J}.
  2. Melt the ice at 0∘C0^\circ\text{C}: β€…β€ŠQ2=mLf=(0.050)(3.34Γ—105)=16,700Β J.\;Q_2 = mL_f = (0.050)(3.34\times 10^{5}) = 16{,}700\text{ J}.
  3. Warm the meltwater from 0∘C0^\circ\text{C} to 20∘C20^\circ\text{C}: β€…β€ŠQ3=mcwater ΔT=(0.050)(4186)(20)=4186Β J.\;Q_3 = mc_{\text{water}}\,\Delta T = (0.050)(4186)(20) = 4186\text{ J}.

The total is

Q=Q1+Q2+Q3β‰ˆ2.2Γ—104Β J=22Β kJ.Q = Q_1 + Q_2 + Q_3 \approx 2.2\times 10^{4}\text{ J} = 22\text{ kJ}.

The melting step requires much more heat because latent heats are typically much larger than the heat for a modest temperature change.

When the temperature difference Ξ”T\Delta T between a body and its surroundings is small, the cooling rate is proportional to that difference:

d ΔTdt=βˆ’A ΔTβŸΉΞ”T=Ξ”T0 eβˆ’At.\frac{d\,\Delta T}{dt} = -A\,\Delta T \quad\Longrightarrow\quad \Delta T = \Delta T_0\,e^{-At}.

The excess temperature decays exponentially. This is Newton’s Law of Cooling.

Theorem (First Law of Thermodynamics). Energy is conserved when we count both heat and work:

Ξ”Eint=Q+W.\Delta E_{\text{int}} = Q + W.

In this sign convention, QQ is the heat added to the system and WW is the work done on the system, so both positive QQ and positive WW raise the internal energy.

The work done on the gas during a volume change is

W=βˆ’βˆ«p dV.W = -\int p\,dV.

The sign is the subtle part: when the gas expands (dV>0dV>0) it does positive work on its surroundings, so negative work is done on the gas. On a pVpV diagram the magnitude of the work is the area under the curve, and work is path-dependent β€” different paths between the same endpoints give different work.

The internal energy of an ideal gas depends only on temperature. With ff degrees of freedom (talked about in the next section),

Eint=f2nRT,Ξ”Eint=f2nR ΔT=nCV ΔT.E_{\text{int}} = \frac f2 nRT, \qquad \Delta E_{\text{int}} = \frac f2 nR\,\Delta T = nC_V\,\Delta T.

The total kinetic energy of a molecule splits among independent quadratic terms (translational, rotational, and for some molecules vibrational):

K=12mvx2+12mvy2+12mvz2+12Ixωx2+12Iyωy2+⋯K = \tfrac12 mv_x^2 + \tfrac12 mv_y^2 + \tfrac12 mv_z^2 + \tfrac12 I_x\omega_x^2 + \tfrac12 I_y\omega_y^2 + \cdots

The equipartition theorem says each independent degree of freedom carries an average energy 12kBT\tfrac12 k_BT. Therefore

Eint=N(f2kBT)=f2nRT,E_{\text{int}} = N\left(\frac f2 k_BT\right) = \frac f2 nRT,

with

  • monatomic gas: f=3f = 3, so Eint=32nRTE_{\text{int}} = \tfrac32 nRT;
  • diatomic gas: f=5f = 5 (3 translational + 2 rotational), so Eint=52nRTE_{\text{int}} = \tfrac52 nRT;
  • polyatomic gas (nonlinear): f=6f = 6, so Eint=3nRTE_{\text{int}} = 3nRT.

A linear molecule like CO2\text{CO}_2 has no kinetic energy for rotation about its own axis, so that mode does not count. Vibration adds further degrees of freedom at high temperature.

How much heat raises the temperature depends on how the heat is added.

At constant volume no work is done, so

Q=Ξ”Eint,CV=Qn ΔT=Ξ”Eintn ΔT=f2R.Q = \Delta E_{\text{int}}, \qquad C_V = \frac{Q}{n\,\Delta T} = \frac{\Delta E_{\text{int}}}{n\,\Delta T} = \frac f2 R.

At constant pressure the gas also does expansion work. Substituting Q=nCpΞ”TQ = nC_p\Delta T and W=βˆ’nRΞ”TW = -nR\Delta T into the first law (with Ξ”Eint\Delta E_{\text{int}} the same as the constant-volume path between the same isotherms) gives Mayer’s relation:

Cp=CV+R.C_p = C_V + R.

The ratio of heat capacities,

Ξ³=CpCV,\gamma = \frac{C_p}{C_V},

is called the adiabatic gas constant and controls adiabatic processes. Collecting values:

GasCVC_VCpC_pΞ³\gamma
Monatomic32R=12.5\tfrac32 R = 12.552R=20.8\tfrac52 R = 20.85/3β‰ˆ1.675/3 \approx 1.67
Diatomic52R=20.8\tfrac52 R = 20.872R=29.1\tfrac72 R = 29.17/5=1.407/5 = 1.40
Polyatomic72R=24.9\tfrac72 R = 24.94R=33.34R = 33.34/3β‰ˆ1.334/3 \approx 1.33

(Heat capacities in J/(molΒ·K).)

Each type of process is a different constraint applied to the first law. The table at the end summarizes them.

No volume change means no work:

W=0,Ξ”Eint=Q=nCV ΔT.W = 0, \qquad \Delta E_{\text{int}} = Q = nC_V\,\Delta T.

All heat goes into internal energy.

W=βˆ’p ΔV,Q=nCp ΔT,Ξ”Eint=Q+W.W = -p\,\Delta V, \qquad Q = nC_p\,\Delta T, \qquad \Delta E_{\text{int}} = Q + W.

For an ideal gas Ξ”Eint=0\Delta E_{\text{int}} = 0, so Q=βˆ’WQ = -W. The path is a hyperbola pV=constpV = \text{const}, and

W=βˆ’βˆ«ViVfp dV=βˆ’nRTln⁑VfVi.W = -\int_{V_i}^{V_f} p\,dV = -nRT\ln\frac{V_f}{V_i}.

This work is negative when the gas expands (Vf>ViV_f > V_i) and positive when it is compressed.

With Q=0Q = 0,

Ξ”Eint=W.\Delta E_{\text{int}} = W.

The gas follows

pVΞ³=const,TVΞ³βˆ’1=const,TΞ³p1βˆ’Ξ³=const.pV^\gamma = \text{const}, \qquad TV^{\gamma-1} = \text{const}, \qquad T^\gamma p^{1-\gamma} = \text{const}.

Since Ξ³>1\gamma > 1, an adiabat is steeper than an isotherm through the same point, so an adiabatic expansion does less work and cools the gas. Carrying out the integral,

W=βˆ’βˆ«ViVfp dV=1Ξ³βˆ’1(pfVfβˆ’piVi).W = -\int_{V_i}^{V_f} p\,dV = \frac{1}{\gamma-1}\left(p_fV_f - p_iV_i\right).

Example. A diatomic ideal gas (Ξ³=7/5\gamma = 7/5) initially at Ti=300Β KT_i = 300\text{ K} is compressed adiabatically to half its volume. Find the final temperature.

Along an adiabat TVΞ³βˆ’1TV^{\gamma-1} is constant, so

Tf=Ti(ViVf)Ξ³βˆ’1=300 (2)0.4.T_f = T_i\left(\frac{V_i}{V_f}\right)^{\gamma-1} = 300\,(2)^{0.4}.

Since 20.4=e0.4ln⁑2β‰ˆ1.322^{0.4} = e^{0.4\ln 2} \approx 1.32,

Tfβ‰ˆ300(1.32)β‰ˆ396Β K.T_f \approx 300(1.32) \approx 396\text{ K}.

The gas heats up even though no heat was added β€” all of the compression work went into internal energy. This is the principle behind a diesel engine igniting fuel without a spark plug.

Over a complete cycle the system returns to its initial state, so Ξ”Eint=0\Delta E_{\text{int}} = 0 and Q=βˆ’WQ = -W: the net heat absorbed equals the net work done by the gas, which is the area enclosed by the cycle on a pVpV diagram.

In a free expansion a gas rushes into vacuum: no work is done (W=0W=0) and no heat is exchanged (Q=0Q=0), so Ξ”Eint=0\Delta E_{\text{int}} = 0 and for an ideal gas Ξ”T=0\Delta T = 0. This is an irreversible, nonequilibrium process β€” the pVpV path is not even well defined between the endpoints, though the endpoints themselves are equilibrium states, and cannot be reversed (unless you vacuum the surroundings) because gas will flow from high pressure to low pressure.

Underlined results apply to ideal gases only.

ProcessRestrictionFirst lawOther results
AllnoneΞ”Eint=Q+W\Delta E_{\text{int}} = Q + WΞ”Eint=nCVΞ”Tβ€Ύ\underline{\Delta E_{\text{int}} = nC_V\Delta T}, W=βˆ’βˆ«p dVW = -\int p\,dV
AdiabaticQ=0Q = 0Ξ”Eint=W\Delta E_{\text{int}} = WW=(pfVfβˆ’piVi)/(Ξ³βˆ’1)β€Ύ\underline{W = (p_fV_f - p_iV_i)/(\gamma-1)}
Constant volumeW=0W = 0Ξ”Eint=Q\Delta E_{\text{int}} = QQ=nCVΞ”TQ = nC_V\Delta T
Constant pressureΞ”p=0\Delta p = 0Ξ”Eint=Q+W\Delta E_{\text{int}} = Q + WW=βˆ’pΞ”VW = -p\Delta V, Q=nCpΞ”TQ = nC_p\Delta T
IsothermalΞ”Eint=0\Delta E_{\text{int}} = 0Q=βˆ’WQ = -WW=βˆ’nRTln⁑(Vf/Vi)β€Ύ\underline{W = -nRT\ln(V_f/V_i)}
CycleΞ”Eint=0\Delta E_{\text{int}} = 0Q=βˆ’WQ = -W
Free expansionQ=W=0Q = W = 0Ξ”Eint=0\Delta E_{\text{int}} = 0Ξ”T=0β€Ύ\underline{\Delta T = 0}

Most naturally occurring processes proceed in one direction only; they are irreversible (there are reversible reactions (like in Chemistry) but for most purposes processes are irreversible without active heat input). Entropy SS is the state function that picks out that direction.

For a reversible process,

Ξ”S=∫ifdQT,\Delta S = \int_i^f \frac{dQ}{T},

and for a reversible isothermal transfer,

Ξ”S=QT.\Delta S = \frac QT.

Entropy is a state property: Ξ”S\Delta S depends only on the endpoints, not the path. For an ideal gas this gives the very useful general form

Ξ”S=nCVln⁑TfTi+nRln⁑VfVi=nCpln⁑TfTiβˆ’nRln⁑pfpi.\Delta S = nC_V\ln\frac{T_f}{T_i} + nR\ln\frac{V_f}{V_i} = nC_p\ln\frac{T_f}{T_i} - nR\ln\frac{p_f}{p_i}.

Specializing: Ξ”S=nRln⁑(Vf/Vi)\Delta S = nR\ln(V_f/V_i) for an isothermal process, nCVln⁑(Tf/Ti)nC_V\ln(T_f/T_i) for isochoric, and nCpln⁑(Tf/Ti)nC_p\ln(T_f/T_i) for isobaric.

To find Ξ”S\Delta S for an irreversible process (like free expansion), invent any reversible process connecting the same two states and compute Ξ”S\Delta S along it β€” since SS is a state function, the answer carries over.

Theorem (Second Law of Thermodynamics). In a closed system entropy never decreases:

Ξ”Sβ‰₯0,\Delta S \ge 0,

with equality only for reversible processes. Equivalently, heat flows spontaneously from hot to cold, and energy does not spontaneously concentrate.

Example. One mole of an ideal gas free-expands into a vacuum until its volume doubles. Find the entropy change of the gas and of the universe.

Free expansion is irreversible, so we cannot integrate dQ/TdQ/T along the actual path. But entropy is a state function, and the endpoints have the same temperature (Ξ”T=0\Delta T = 0 for a free expansion). So connect them with a reversible isothermal expansion, for which

Ξ”Sgas=nRln⁑VfVi=(1)(8.31)ln⁑2β‰ˆ5.76Β J/K.\Delta S_{\text{gas}} = nR\ln\frac{V_f}{V_i} = (1)(8.31)\ln 2 \approx 5.76\text{ J/K}.

The surroundings exchanged no heat (Q=0Q = 0 in the real process), so Ξ”Ssurr=0\Delta S_{\text{surr}} = 0 and

Ξ”Suniv=5.76Β J/K>0,\Delta S_{\text{univ}} = 5.76\text{ J/K} > 0,

confirming the process is irreversible β€” exactly what the second law demands.

A heat engine uses a working substance cycling through thermodynamic processes to extract heat and produce work. Because it returns to its starting state each cycle, Ξ”Eint=0\Delta E_{\text{int}} = 0, so the net work equals the net heat. Drawing heat ∣QH∣\lvert Q_H\rvert from a hot reservoir and dumping ∣QL∣\lvert Q_L\rvert to a cold one,

∣W∣=∣QHβˆ£βˆ’βˆ£QL∣,\lvert W\rvert = \lvert Q_H\rvert - \lvert Q_L\rvert,

and the efficiency is

Ο΅=whatΒ youΒ getwhatΒ youΒ payΒ for=∣W∣∣QH∣=1βˆ’βˆ£QL∣∣QH∣.\epsilon = \frac{\text{what you get}}{\text{what you pay for}} = \frac{\lvert W\rvert}{\lvert Q_H\rvert} = 1 - \frac{\lvert Q_L\rvert}{\lvert Q_H\rvert}.

The Carnot cycle is two isotherms (at THT_H and TLT_L) joined by two adiabats. On a TT–SS diagram it is simply a rectangle: the isotherms are horizontal, and the adiabats are vertical (constant entropy, β€œisentropic”, although this term is rarely used). Heat enters reversibly at THT_H and leaves reversibly at TLT_L, so

∣QH∣TH=∣QL∣TL.\frac{\lvert Q_H\rvert}{T_H} = \frac{\lvert Q_L\rvert}{T_L}.

Substituting into the efficiency gives the result below.

Theorem (Carnot efficiency). A reversible engine operating between reservoirs at THT_H and TLT_L has efficiency

Ο΅=1βˆ’TLTH.\epsilon = 1 - \frac{T_L}{T_H}.

No engine operating between two reservoirs can beat this, because the Carnot cycle is fully reversible β€” no energy is lost to friction, turbulence, or unrestrained heat conduction.

Proof (Carnot efficiency is the maximum efficiency). Suppose an engine X were more efficient than a Carnot engine between the same reservoirs. Use X’s work output to drive a Carnot engine backwards as a refrigerator. The combination would move heat from cold to hot with no net work input β€” a perfect refrigerator β€” which violates the Second Law. Hence Ο΅X≀ϡCarnot\epsilon_X \le \epsilon_{\text{Carnot}}.

Example. A Carnot engine operates between reservoirs at TH=500Β KT_H = 500\text{ K} and TL=300Β KT_L = 300\text{ K} and absorbs QH=1000Β JQ_H = 1000\text{ J} from the hot reservoir each cycle. Find its efficiency, work output, and heat rejected.

The efficiency is

Ο΅=1βˆ’TLTH=1βˆ’300500=0.40.\epsilon = 1 - \frac{T_L}{T_H} = 1 - \frac{300}{500} = 0.40.

So the work per cycle is ∣W∣=ϡ∣QH∣=400Β J\lvert W\rvert = \epsilon\lvert Q_H\rvert = 400\text{ J}, and the heat dumped is ∣QL∣=∣QHβˆ£βˆ’βˆ£W∣=600Β J\lvert Q_L\rvert = \lvert Q_H\rvert - \lvert W\rvert = 600\text{ J}.

As a check, ∣QH∣/TH=1000/500=2 J/K\lvert Q_H\rvert/T_H = 1000/500 = 2\text{ J/K} equals ∣QL∣/TL=600/300=2 J/K\lvert Q_L\rvert/T_L = 600/300 = 2\text{ J/K}: the entropy drawn from the hot reservoir exactly matches that given to the cold one, which is the hallmark of a reversible cycle.

The Carnot formula applies only to reversible engines using exactly two reservoirs. The ideal Stirling engine replaces Carnot’s two adiabats with two constant-volume processes, so heat is exchanged in all four legs. Its efficiency is therefore lower than a Carnot engine between the same two temperatures.

A refrigerator uses work to push heat from a cold reservoir to a hot one β€” the reverse of an engine. By the First Law,

∣W∣=∣QHβˆ£βˆ’βˆ£QL∣.\lvert W\rvert = \lvert Q_H\rvert - \lvert Q_L\rvert.

Its performance is measured by the coefficient of performance KK, β€œwhat you want over what you pay for”:

K=∣QL∣∣W∣⟹KCarnot=TLTHβˆ’TL.K = \frac{\lvert Q_L\rvert}{\lvert W\rvert} \quad\Longrightarrow\quad K_{\text{Carnot}} = \frac{T_L}{T_H - T_L}.

An air conditioner is a refrigerator whose cold reservoir is the room. A heat pump is the same machine run to heat a room β€” now the room is the hot reservoir, and the relevant quantity is ∣QH∣\lvert Q_H\rvert.

For cooling (AC, refrigerator) the goal is QLQ_L:

KL=∣QL∣∣W∣=TLTHβˆ’TL.K_L = \frac{\lvert Q_L\rvert}{\lvert W\rvert} = \frac{T_L}{T_H - T_L}.

For heating (warming a house) the goal is QHQ_H:

KH=∣QH∣∣W∣=THTHβˆ’TL.K_H = \frac{\lvert Q_H\rvert}{\lvert W\rvert} = \frac{T_H}{T_H - T_L}.

The two are related by

KH=KL+1,K_H = K_L + 1,

which follows directly from ∣QH∣=∣QL∣+∣W∣\lvert Q_H\rvert = \lvert Q_L\rvert + \lvert W\rvert.

Microscopically, entropy counts arrangements. Every individual microstate of an isolated system is equally probable, but the configurations (macroscopic descriptions, e.g. β€œhow many molecules in the left half”) are not, because some configurations correspond to far more microstates.

For NN molecules split as N1N_1 and N2N_2 between two halves of a box, the multiplicity is

w=N!N1! N2!.w = \frac{N!}{N_1!\,N_2!}.

This is sharply peaked at the even split: for N∼1022N \sim 10^{22} the configuration with the molecules essentially evenly distributed dominates so overwhelmingly that we never observe spontaneous compression into one half.

Boltzmann’s entropy ties this to the macroscopic definition:

S=kBln⁑w.S = k_B\ln w.

This explains the two combination rules β€” probabilities of independent subsystems multiply, while their entropies add β€” and the change in entropy between two configurations is

Ξ”S=kBln⁑ΩfΞ©i.\Delta S = k_B\ln\frac{\Omega_f}{\Omega_i}.

For large factorials, Stirling’s approximation for factorials is used to approximate entropy:

ln⁑N!β‰ˆNln⁑Nβˆ’N.\ln N! \approx N\ln N - N.

A β€œspread out” configuration has higher multiplicity, hence higher entropy, than an ordered one (wresting>wswirlingw_{\text{resting}} > w_{\text{swirling}}, so Sresting>SswirlingS_{\text{resting}} > S_{\text{swirling}}) β€” the statistical statement of the Second Law.


Read the process first, then pick the constraint that turns the first law into something solvable: