Skip to content

Boltzmann Distribution and the Heat Engine

Updated Β· Split thermodynamics into three lessons and added Maxwell’s equations and electromagnetic waves. What changed?
  1. β€” Split thermodynamics into three lessons and added Maxwell’s equations and electromagnetic waves.

These notes were written in collaboration with Michael Zhao.

A small system at temperature TT can exchange energy with a large reservoir. If the system takes energy EiE_i, the reservoir has energy Etotβˆ’EiE_{\rm tot}-E_i. Its entropy changes by approximately βˆ’Ei/T-E_i/T because βˆ‚Sres/βˆ‚E=1/T\partial S_{\rm res}/\partial E=1/T. Since the number of reservoir microstates is proportional to eSres/kBe^{S_{\rm res}/k_B}, the probability of a particular system microstate is

Pi=eβˆ’Ei/(kBT)Z,Z=βˆ‘ieβˆ’Ei/(kBT).P_i=\frac{e^{-E_i/(k_BT)}}{Z},\qquad Z=\sum_i e^{-E_i/(k_BT)}.

If gig_i distinct microstates share an energy, the probability of measuring that energy is giPig_iP_i. In continuous phase space, integrate a probability density over the desired range of positions and momenta. Integrating over unwanted coordinates gives the marginal distribution for those that remain.

In a uniform classical gas, the kinetic energy is a sum of three squared velocity components. The Boltzmann weight factors into three independent Gaussians with mean zero and variance kBT/mk_BT/m. To find the speed distribution, count every velocity direction. The shell between radii vv and v+dvv+dv in velocity space has volume 4Ο€v2 dv4\pi v^2\,dv. This is why the speed density peaks at a positive speed even though each velocity component peaks at zero.

Maxwell speed distributions showing how higher temperature broadens the distribution and shifts its peak to higher speed

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}.

The change of variables preserves particle count, N(E) dE=N(v) dvN(E)\,dE=N(v)\,dv. Combining the velocity-shell factor with dv/dE=1/(mv)dv/dE=1/(mv) gives the factor of E\sqrt E.

Let nd=N/Vn_d=N/V and take positive vxv_x toward a small flat wall patch. In time dtdt only molecules within distance vxdtv_xdt can hit the patch. Integrating this count over positive normal velocities in the Gaussian fxf_x gives the one-sided molecular flux

Ξ“=nd∫0∞vxfx(vx) dvx=ndkBT2Ο€m=14nd⟨v⟩.\Gamma=n_d\int_0^\infty v_xf_x(v_x)\,dv_x =n_d\sqrt{\frac{k_BT}{2\pi m}}=\frac14n_d\langle v\rangle.

Weight each impact by the momentum 2mvx2mv_x transferred in an elastic reflection. The momentum per area per time is the pressure:

p=2mnd∫0∞vx2fx(vx) dvx=mnd⟨vx2⟩=ndkBT.p=2mn_d\int_0^\infty v_x^2f_x(v_x)\,dv_x =mn_d\langle v_x^2\rangle=n_dk_BT.

The integral over positive velocities gives half the full mean square because the Gaussian is even. This local wall argument works for containers of different shapes.

The molecular energy now includes mgzmgz. Its Boltzmann weight factors into the same velocity distribution at each height and a position factor that decreases exponentially. The characteristic scale height is H=kBT/(mg)H=k_BT/(mg), giving

nd(z)=nd(0)eβˆ’z/H,p(z)=p(0)eβˆ’z/H.n_d(z)=n_d(0)e^{-z/H},\qquad p(z)=p(0)e^{-z/H}.

For a column of area AA, height LL, and NN molecules, integrating And(z)An_d(z) gives nd(0)=N/[AH(1βˆ’eβˆ’L/H)]n_d(0)=N/[AH(1-e^{-L/H})]. The pressure difference p(0)βˆ’p(L)=Nmg/Ap(0)-p(L)=Nmg/A supports the gas’s weight. This model assumes both gg and TT are uniform.


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.

Example. A monatomic gas is heated at fixed volume from (V0,p0)(V_0,p_0) to (V0,2p0)(V_0,2p_0). It expands isothermally to (2V0,p0)(2V_0,p_0), then compresses at constant pressure back to the initial state. Find its efficiency.

The first leg adds 32p0V0\tfrac32p_0V_0 of internal energy and does no work. The isothermal leg produces work 2p0V0ln⁑22p_0V_0\ln 2 and absorbs an equal amount of heat. Compression costs p0V0p_0V_0 of work and rejects heat. Only the first two legs contribute to heat input, so

Ο΅=2ln⁑2βˆ’132+2ln⁑2β‰ˆ0.134.\epsilon=\frac{2\ln 2-1}{\tfrac32+2\ln 2}\approx0.134.

The ideal Stirling cycle joins two isotherms by two constant-volume processes. With perfect regeneration, heat stored during constant-volume cooling is recovered during constant-volume heating. External heat is then exchanged only at the two reservoir temperatures and the efficiency reaches Carnot’s.

The Otto and Diesel models both compress and expand the gas reversibly and adiabatically. Otto adds heat at constant volume, while Diesel adds heat at constant pressure and the gas expands during that leg. Both reject heat at constant volume.

Pressure-volume diagrams contrasting vertical constant-volume heat input for the Otto cycle and horizontal constant-pressure heat input for the Diesel cycle

Label the states 1β†’2β†’3β†’4β†’11\to2\to3\to4\to1, with compression on 1β†’21\to2. Define the compression ratio r=V1/V2r=V_1/V_2 and Diesel cutoff ratio rc=V3/V2r_c=V_3/V_2. Both models reject nCV(T4βˆ’T1)nC_V(T_4-T_1). In the Otto model the input is nCV(T3βˆ’T2)nC_V(T_3-T_2), and the adiabats give T2/T1=T3/T4=rΞ³βˆ’1T_2/T_1=T_3/T_4=r^{\gamma-1}. In the Diesel model the input is nCp(T3βˆ’T2)nC_p(T_3-T_2), with T3/T2=rcT_3/T_2=r_c and T4/T1=rcΞ³T_4/T_1=r_c^\gamma. Substituting gives

Ο΅Otto=1βˆ’r1βˆ’Ξ³,Ο΅Diesel=1βˆ’r1βˆ’Ξ³rcΞ³βˆ’1Ξ³(rcβˆ’1).\epsilon_{\rm Otto}=1-r^{1-\gamma},\qquad \epsilon_{\rm Diesel}=1-r^{1-\gamma}\frac{r_c^\gamma-1}{\gamma(r_c-1)}.

These formulas assume ideal gases with constant heat capacities. A compression ratio of 1010 and Ξ³=1.4\gamma=1.4 give an ideal Otto efficiency of about 60%60\%.

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} \le \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} \le \frac{T_H}{T_H - T_L}.

The upper bounds are reached in the reversible limit. For any cycle, 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.