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 p, density ρ (or specific volume v=1/ρ), temperature T, internal energy U, entropy S. 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,
where R=8.314J/(mol⋅K) is the universal gas constant, M the molar mass, n=N/V the number density, and kB=R/NA Boltzmann’s constant.
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 T, N, V and watch the computed pressure track PV=NkBT. 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.
The internal energy U changes by heat in (TdS) minus work done (pdV). For a closed fluid element (no mass exchange across its boundary), this is the operative form. Three classical paths trade Q, W, and ΔU differently:
Isothermal (T fixed). For an ideal gas, ΔU=0, so Q=W — every joule of heat in becomes a joule of work out.
Adiabatic (Q=0). ΔU=−W — work comes at the expense of internal energy (cooling on expansion).
Isobaric (p fixed). W=pΔV — work is volume change at constant pressure.
Isochoric (V fixed). W=0, so Q=ΔU — heat in raises internal energy directly.
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 W, ΔU, and Q 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
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=const and the adiabatic curve PVγ=const through the current state point. The adiabatic curve is steeper than the isothermal at the same state — by exactly the factor γ in slope. For air, γ=1.4; this 40% extra steepness is what corrects Newton’s isothermal sound-speed calculation to Laplace’s adiabatic one.
Adiabatic: no heat exchanged, entropy fixed. pVγ=const with γ=cp/cv.
For air at audible frequencies, sound oscillations are too fast for the heat conducted in one cycle to matter (∼5μm thermal-diffusion length per millisecond, versus a wavelength of ∼30cm). 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, so dU=−pdV.
For an ideal gas, U depends only on temperature: U=ncvT. So dU=ncvdT.
Substituting and using pV=nRT ⇒ p=nRT/V:
ncvdT=−VnRTdV⟹TdT=−cvRVdV.
Integrate: lnT=−(R/cv)lnV+const, i.e. TVR/cv=const.
Mayer’s relation cp−cv=R gives R/cv=γ−1 with γ=cp/cv. So TVγ−1=const.
Replacing T by pV/(nR):
pVγ=const.
The polytropic envelope
The isothermal and adiabatic processes are the two limits of a more general family: a polytropic process satisfies pVκ=const for some exponent κ in [1,γ]. Real processes choose κ by the ratio of the process timescale to the thermal-diffusion time across the fluid element.
κ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 κ from 1 (isothermal) to γ (adiabatic). The curve sweeps continuously between the two limits. Two physical instances:
A bubble of gas oscillating inside a liquid at frequency ω has a thermal-diffusion time across the bubble of ∼R2/αg. If ωR2/αg≪1 the gas is isothermal; if ≫1 it’s adiabatic. Real bubbles at MHz frequencies typically sit at κ≈1.1–1.3. See Cavitation Ch 3.2.
The atmospheric lapse rate — the temperature drop with altitude in a rising parcel of air — is approximately adiabatic (κ=γ) on short timescales but tends toward isothermal in slowly mixing layers.
The speed of sound, thermodynamically
For any fluid, the speed of small-amplitude pressure waves is
c2=(∂ρ∂p)s,
with the subscript s meaning at constant entropy — the adiabatic derivative. For an ideal gas with p=const⋅ργ,
c2=γρp=γRT/M.
H₂c = 1301 m/svrms = 1904c/vrms = 0.683
Hec = 1007 m/svrms = 1351c/vrms = 0.745
airc = 343 m/svrms = 502c/vrms = 0.683
CO₂c = 268 m/svrms = 407c/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 T-dependence is universal across gases; the ratio c/vrms=γ/3 is gas-independent for each γ (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=TdS−pdV. 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,
per unit mass. The first law for an open, steady-state stream then reads
h1+21u12+gz1=h2+21u22+gz2,
a statement of energy conservation along a streamline that includes the flow-work bookkeeping. Bernoulli’s equation is the incompressible limit (where u is constant so Δh=Δp/ρ); 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 h 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:
(Clausius) No process whose sole result is heat transfer from a cold to a hot reservoir is possible.
(Mathematical) The entropy of an isolated system never decreases: dSuniverse≥0.
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 T, every quadratic degree of freedom carries average energy 21kBT (see kinetic theory). A monatomic gas has three translational degrees of freedom, U=23NkBT, γ=5/3. A diatomic gas at room temperature has three translational + two rotational, U=25NkBT, γ=7/5. The thermal speed 3kBT/m∼500m/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 S defined by dS=δQrev/T — entropy. 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=kBlnW, where W 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.