Thermodynamics in one page

Equation of state, internal energy, adiabatic processes, polytropic envelope, enthalpy.

Thermodynamics is the bookkeeping of energy, heat, and work in equilibrium systems. The Sound book uses a thin slice of it — enough to derive the speed of sound and the adiabatic equation of state for a gas — but the same machinery underlies open-system flows, free energy, and phase change. This chapter takes the slice slowly, with an interactive per central equation.

State variables and the equation of state

A fluid at equilibrium is described by a handful of state variables: pressure pp, density ρ\rho (or specific volume v=1/ρv = 1/\rho), temperature TT, internal energy UU, entropy SS. Not all are independent — any two of them determine the rest via an equation of state.

For an ideal gas the equation of state is

p  =  ρRT/M  =  nkBT,p \;=\; \rho R T / M \;=\; n k_B T,

where R=8.314J/(mol⋅K)R = 8.314\,\text{J/(mol·K)} is the universal gas constant, MM the molar mass, n=N/Vn = N/V the number density, and kB=R/NAk_B = R/N_A Boltzmann’s constant.

box side: 348 px · area V = 100% of max
80
300 K
100%
mean speed
0.00
pressure P
0.00
PV / NkT
0.00

The simulation is a 2-D ideal gas at adjustable temperature, number density, and volume. Slide TT, NN, VV and watch the computed pressure track PV=NkBTPV = N k_B T. The ideal-gas law is the macroscopic shadow of the kinetic-theory picture: pressure as molecular momentum delivery, temperature as mean translational kinetic energy.

The first law of thermodynamics

Conservation of energy for a closed fluid element:

dU  =  δQ    δW  =  TdS    pdV.dU \;=\; \delta Q \;-\; \delta W \;=\; T\, dS \;-\; p\, dV.

The internal energy UU changes by heat in (TdST\, dS) minus work done (pdVp\, dV). For a closed fluid element (no mass exchange across its boundary), this is the operative form. Three classical paths trade QQ, WW, and ΔU\Delta U differently:

0.511.521234VpCumulativework W = ∫p dV0.811ΔU (ideal gas)0.000heat Q = ΔU + W0.811monatomic ideal gasU = (3/2) pV
Process:

Each path realises a different bargain among ΔU (internal energy), W (work done by the gas), and Q (heat in). Isothermal: ΔU = 0, so Q = W. Adiabatic: Q = 0, so ΔU = −W. Isobaric: W = p ΔV. Isochoric: W = 0, so Q = ΔU. The first law dQ = dU + dW is the universal balance behind all four.

Pick a process and traverse it. The shaded area is the work; the readouts show cumulative WW, ΔU\Delta U, and QQ at each step. For an ideal gas the relations among the three are completely fixed by the path type and the equation of state.

Adiabatic vs. isothermal — the two limits that matter for sound

V (volume) →P (pressure) ↑0.511.522.50.511.522.5PV = const (isothermal)PVγ= const (adiabatic)

The adiabatic curve is *steeper* than the isothermal one at the same state. Compressing a gas adiabatically heats it (raises P faster than V drops); compressing isothermally lets the heat flow away and is comparatively soft. For diatomic air γ = 7/5 = 1.4; for monatomic helium γ = 5/3 ≈ 1.67.

The interactive plots both the isothermal curve PV=constPV = \text{const} and the adiabatic curve PVγ=constPV^\gamma = \text{const} through the current state point. The adiabatic curve is steeper than the isothermal at the same state — by exactly the factor γ\gamma in slope. For air, γ=1.4\gamma = 1.4; this 40% extra steepness is what corrects Newton’s isothermal sound-speed calculation to Laplace’s adiabatic one.

For air at audible frequencies, sound oscillations are too fast for the heat conducted in one cycle to matter (5μm\sim 5\,\mu\text{m} thermal-diffusion length per millisecond, versus a wavelength of 30cm\sim 30\,\text{cm}). The compressions are effectively adiabatic — Laplace’s correction. The viscosity & diffusion chapter develops this scale comparison.

Deriving pV^γ = const for an adiabatic ideal gas

Start with the first law and the ideal-gas relation. For a closed fluid element undergoing an adiabatic process, δQ=0\delta Q = 0, so dU=pdVdU = -p\, dV.

For an ideal gas, UU depends only on temperature: U=ncvTU = n c_v T. So dU=ncvdTdU = n c_v\, dT.

Substituting and using pV=nRTpV = nRTp=nRT/Vp = nRT/V:

ncvdT  =  nRTVdVdTT  =  RcvdVV.n c_v\, dT \;=\; -\frac{nRT}{V}\, dV \quad\Longrightarrow\quad \frac{dT}{T} \;=\; -\frac{R}{c_v}\,\frac{dV}{V}.

Integrate: lnT=(R/cv)lnV+const\ln T = -(R/c_v) \ln V + \text{const}, i.e. TVR/cv=constTV^{R/c_v} = \text{const}.

Mayer’s relation cpcv=Rc_p - c_v = R gives R/cv=γ1R/c_v = \gamma - 1 with γ=cp/cv\gamma = c_p/c_v. So TVγ1=constTV^{\gamma - 1} = \text{const}.

Replacing TT by pV/(nR)pV/(nR):

pVγ  =  const.pV^\gamma \;=\; \text{const}.

The polytropic envelope

The isothermal and adiabatic processes are the two limits of a more general family: a polytropic process satisfies pVκ=constpV^\kappa = \text{const} for some exponent κ\kappa in [1,γ][1, \gamma]. Real processes choose κ\kappa by the ratio of the process timescale to the thermal-diffusion time across the fluid element.

0.511.522.530.5123V (volume)p (pressure)κ = 1 (isothermal)κ = γ = 1.4 (adiabatic)(V₀, p₀)
κ1.40
regimeadiabatic (γ)

The polytropic family interpolates between isothermal (κ = 1, perfect heat exchange with surroundings) and adiabatic (κ = γ, no heat exchange). Real processes sit somewhere in between, with κ chosen by the ratio of process timescale to thermal-diffusion timescale: slow processes are isothermal, fast processes are adiabatic. Oscillating bubble interiors hover at frequency-dependent κ that the Cavitation book exploits.

Slide κ\kappa from 1 (isothermal) to γ\gamma (adiabatic). The curve sweeps continuously between the two limits. Two physical instances:

The speed of sound, thermodynamically

For any fluid, the speed of small-amplitude pressure waves is

c2  =  (pρ)s,c^2 \;=\; \left(\frac{\partial p}{\partial \rho}\right)_s,

with the subscript ss meaning at constant entropy — the adiabatic derivative. For an ideal gas with p=constργp = \text{const}\cdot\rho^\gamma,

c2  =  γpρ  =  γRT/M.c^2 \;=\; \gamma\,\frac{p}{\rho} \;=\; \gamma\, R T / M.
2004006008001000500100015002000250030003500T (K)speed (m/s)H₂HeairCO₂
H₂ c = 1301 m/s vrms = 1904 c/vrms = 0.683
He c = 1007 m/s vrms = 1351 c/vrms = 0.745
air c = 343 m/s vrms = 502 c/vrms = 0.683
CO₂ c = 268 m/s vrms = 407 c/vrms = 0.658

Sound speed is always √(γ/3) ≈ 0.68 (diatomic) or √(5/9) ≈ 0.75 (monatomic) of the rms thermal speed — and this ratio is gas-independent for each γ. Lighter gases give faster sound; the curves are √T-shaped, just like thermal speeds. CO₂ has lower γ (more active rotational modes), shifting it slightly relative to air.

The square-root TT-dependence is universal across gases; the ratio c/vrms=γ/3c/v_\text{rms} = \sqrt{\gamma/3} is gas-independent for each γ\gamma (0.68 for diatomic, 0.75 for monatomic). Lighter molecular mass — H₂, He — gives faster sound at the same temperature. The Sound book’s four-route derivation lives at Sound Ch 4; this is the cleanest of them.

Enthalpy and the first law for open systems

A closed fluid element exchanges no mass with its surroundings; the first law reads dU=TdSpdVdU = T\,dS - p\,dV. A control volume through which mass flows in and out — a slab in a sound wave, a turbine, a Rayleigh–Plesset bubble — needs an extra term. The in-flowing fluid does work against the pressure at the boundary to push itself across; the out-flowing fluid is pushed out by pressure work done by the system.

The clean way to absorb that flow-work is to define the enthalpy

h    u+p/ρ  =  u+pv,h \;\equiv\; u + p/\rho \;=\; u + pv,

per unit mass. The first law for an open, steady-state stream then reads

h1+12u12+gz1  =  h2+12u22+gz2,h_1 + \tfrac{1}{2}u_1^2 + g z_1 \;=\; h_2 + \tfrac{1}{2}u_2^2 + g z_2,

a statement of energy conservation along a streamline that includes the flow-work bookkeeping. Bernoulli’s equation is the incompressible limit (where uu is constant so Δh=Δp/ρ\Delta h = \Delta p/\rho); the Rankine–Hugoniot energy condition across a shock front is another instance.

Enthalpy is “the natural energy variable for things that flow through control volumes.” Whenever you see hh in the bookshelf, the underlying argument is open-system energy conservation.

Entropy and the second law (briefly)

The first law alone does not forbid heat flowing from cold to hot. The second law does, in two equivalent statements:

For our purposes the second law enters in two places: (i) it picks out the adiabatic isentrope as the relevant compression curve for sound, and (ii) it provides the foundation for the free-energy chapter — the right thermodynamic potential to minimise at fixed external conditions follows from “total entropy ≥ 0” applied to system + reservoir.

Equipartition and γ from molecular structure

For a classical gas in equilibrium at temperature TT, every quadratic degree of freedom carries average energy 12kBT\tfrac12 k_B T (see kinetic theory). A monatomic gas has three translational degrees of freedom, U=32NkBTU = \tfrac32 N k_B T, γ=5/3\gamma = 5/3. A diatomic gas at room temperature has three translational + two rotational, U=52NkBTU = \tfrac52 N k_B T, γ=7/5\gamma = 7/5. The thermal speed 3kBT/m500m/s\sqrt{3 k_B T / m} \sim 500\,\text{m/s} for air at 20°C is the same scale as the speed of sound — not a coincidence.

The history — Clausius, Mayer, Joule, and the invention of entropy

The first law of thermodynamics was put together by Julius Mayer (1841–1845), James Prescott Joule (1845), and Hermann von Helmholtz (1847) — three independent threads. Mayer argued from cosmological principles that heat and mechanical work were forms of the same thing; Joule made the meticulous calorimetric measurements (his famous water-paddle experiment) that pinned down the mechanical equivalent of heat; Helmholtz gave the first systematic statement.

The second law was harder. Sadi Carnot’s 1824 analysis of heat engines contained the key insight — that engine efficiency depends only on the temperatures of the hot and cold reservoirs — but in the language of caloric theory, a now-discarded model treating heat as a conserved fluid. Rudolf Clausius restated Carnot’s results in 1850 in compatible terms with the new first law, and in 1865 introduced the state function SS defined by dS=δQrev/TdS = \delta Q_\text{rev}/Tentropy. He coined the word from the Greek tropē (transformation) with the prefix en- to parallel “energy”; the two potentials are conceptual partners.

Boltzmann then connected entropy to molecular disorder in 1877: S=kBlnWS = k_B \ln W, where WW is the number of microstates compatible with the macroscopic state. This statistical-mechanical interpretation closed the gap between Clausius’s macroscopic thermodynamics and the kinetic theory of the previous chapter.

For the cross-book applications — adiabatic speed of sound, polytropic bubble interior, enthalpy in Rankine–Hugoniot shock relations, equipartition setting γ — see the key examples sub-page.