The Four Laws of Thermodynamics
Thermodynamics is built on four laws that, together, define energy, temperature, and the direction physical processes are allowed to run. The zeroth law establishes that if two systems are each in thermal equilibrium with a third, they are in thermal equilibrium with each other — this is what allows temperature to be defined and measured consistently with a thermometer. The first law is conservation of energy: energy is neither created nor destroyed, only converted between forms or transferred as heat and work. The second law establishes that energy transformations have a preferred direction — heat flows from hot to cold, not the reverse, without external work — and it sets an absolute upper limit on the efficiency of any heat engine. The third law states that the entropy of a perfect crystal approaches zero as its absolute temperature approaches zero, which anchors the absolute scale of entropy used in property tables. Nearly every calculation in applied thermal and fluid systems design — from a boiler's heat balance to a chiller's coefficient of performance — is an application of the first and second laws to a specific piece of hardware.
Internal Energy, Enthalpy, and Entropy
Internal energy (U, or u per unit mass) is the energy stored in a substance from molecular motion and molecular bonds; it changes with temperature and, for real fluids, with pressure and phase as well. Enthalpy (h = u + Pv) is a combined property that accounts for both internal energy and the flow work needed to push a fluid into or out of a control volume, which makes it the natural energy variable for anything that flows — turbines, compressors, heat exchangers, and boilers are all analyzed in terms of enthalpy change rather than internal energy alone. Entropy (S, or s per unit mass) is a property that quantifies the degree of disorder or the unavailability of energy to do work; the second law requires that the total entropy of an isolated system can only stay constant (for a reversible, idealized process) or increase (for any real, irreversible process) — it can never decrease. This is expressed as the Clausius inequality, dS ≥ δQ/T, with equality only in the reversible limit. Every real machine — every pump, turbine, compressor, and heat exchanger — generates some entropy, and quantifying that generation is how thermodynamics explains why no real engine can reach the theoretical Carnot efficiency limit, η = 1 − Tc/Th, between a hot reservoir at Th and a cold reservoir at Tc (both in absolute temperature).
The Ideal Gas Law and Property Relations
For gases far from their condensation point, the ideal gas law relates pressure, volume, and temperature:
Pv = RT (per unit mass, with v as specific volume) or PV = mRT (total volume basis)
where R is the specific gas constant for the gas in question, R = Ru/M, with the universal gas constant Ru = 8.314 kJ/(kmol·K) and M the gas's molar mass. For air, M ≈ 28.97 kg/kmol, giving R ≈ 0.287 kJ/(kg·K).
Worked check: standard atmospheric air at P = 101.325 kPa and T = 293 K (20°C) has a density of ρ = P/(R·T) = 101.325 / (0.287 × 293) = 101.325 / 84.09 ≈ 1.205 kg/m³, which matches the commonly cited standard air density used throughout HVAC airflow calculations.
For an ideal gas, internal energy and enthalpy depend on temperature alone, u = u(T) and h = h(T), through the specific heats cv = du/dT and cp = dh/dT, with cp − cv = R for an ideal gas. Real fluids used in power and refrigeration cycles — steam, refrigerants — depart substantially from ideal-gas behavior near their saturation conditions, which is why those calculations rely on steam tables or refrigerant property charts rather than the ideal gas law.
The First Law for Closed and Open Systems
For a closed system (fixed mass, no flow across the boundary), the first law is an energy balance between heat and work crossing the boundary and the change in the system's stored internal energy:
ΔU = Q − W
with Q positive for heat added to the system and W positive for work done by the system on its surroundings.
For an open system (a control volume with mass flowing in and out, such as a turbine, compressor, pump, or heat exchanger) operating at steady state, the balance must also account for the energy carried by the flowing mass itself, including flow work, kinetic energy, and potential energy. This is the steady-flow energy equation:
Q̇ − Ẇs = ṁ [ (h2 − h1) + (V2² − V1²)/2 + g(z2 − z1) ]
where Q̇ is the rate of heat transfer, Ẇs is shaft work (the useful work crossing the boundary, such as a turbine or pump shaft), ṁ is mass flow rate, and the bracketed term is the change in specific enthalpy, kinetic energy, and potential energy of the fluid between inlet (1) and outlet (2). This single equation is the basis for analyzing every major piece of equipment in a thermal power or HVAC plant: for a turbine or pump, Q̇ ≈ 0 and the shaft work is found directly from the enthalpy change; for a boiler or condenser, Ẇs = 0 and the heat transfer is found directly from the enthalpy change.
The Rankine Cycle
The Rankine cycle is the idealized power cycle underlying steam turbine generation and, in its reversed form (the vapor-compression refrigeration cycle), underlying the chillers this site's HVAC content already covers in applied terms. In its basic form it consists of four steady-flow processes: (1-2) an isentropic (constant-entropy) pressure increase of liquid condensate in a pump; (2-3) constant-pressure heat addition in a boiler, which heats, evaporates, and typically superheats the fluid; (3-4) an isentropic expansion through a turbine that extracts shaft work; and (4-1) constant-pressure heat rejection in a condenser, which returns the fluid to saturated (or slightly subcooled) liquid. The cycle's thermal efficiency is the net work produced divided by the heat supplied:
η = Wnet/Qin = (Wturbine − Wpump) / Qboiler = 1 − Qcondenser/Qboiler
Because the pump only compresses liquid (see the first FAQ below for why that matters), Wpump is typically only one to two percent of Wturbine, so the cycle's efficiency is dominated by how much energy the turbine extracts relative to how much heat the boiler supplies. Real Rankine cycles used in central power and utility plants add reheat and regenerative feedwater heating stages specifically to push the achievable efficiency closer to the Carnot limit for the same boiler and condenser temperatures, but the four-process idealized cycle above is the version tested on fundamentals and PE-level exam questions.
The Continuity Equation
The continuity equation is conservation of mass applied to a flowing fluid: for steady flow through a duct or pipe of varying cross-section, the mass flow rate must be the same at every section:
ṁ = ρ1·A1·V1 = ρ2·A2·V2
For an incompressible fluid (ρ constant, an excellent assumption for liquids and for low-speed gas flow such as most HVAC ductwork), this reduces to A1·V1 = A2·V2 — velocity increases wherever the cross-sectional area decreases, and vice versa. This single relationship is why a nozzle speeds flow up, why a diffuser slows it down, and why a nominal duct or pipe velocity is often the very first number an engineer checks when sizing a passage for a required flow rate.
Bernoulli's Equation
Bernoulli's equation follows from applying the first law and Newton's second law to an inviscid, incompressible, steady flow along a streamline with no shaft work and no heat transfer. Written in head form (each term has units of length), it states that the sum of pressure head, velocity head, and elevation head is constant along the streamline:
P1/(ρg) + V1²/2g + z1 = P2/(ρg) + V2²/2g + z2
Worked example (Torricelli discharge): A large open tank holds water 5 m above a small discharge orifice near the bottom. Both the tank's free surface and the jet exiting the orifice are at atmospheric pressure, and the surface velocity is negligible because the tank is large. Applying Bernoulli's equation between the surface (point 1) and the jet (point 2), the pressure terms cancel (both atmospheric) and the surface velocity term drops out, leaving:
V2²/2g = z1 − z2 = 5 m → V2 = √(2 × 9.81 × 5) = √98.1 ≈ 9.90 m/s
If the orifice is 25 mm in diameter (area = π/4 × 0.025² ≈ 4.91×10⁻⁴ m²), the discharge flow rate is Q = V·A = 9.90 × 4.91×10⁻⁴ ≈ 4.86×10⁻³ m³/s, or about 4.9 liters per second. This result — exit velocity depending only on the height of fluid above the opening, independent of the fluid's density — is Torricelli's theorem, and it is simply Bernoulli's equation applied to a special case.
Reynolds Number and Laminar/Turbulent Flow
The Reynolds number is a dimensionless ratio of inertial to viscous forces in a flow, Re = ρVD/μ = VD/ν, where μ is dynamic viscosity and ν = μ/ρ is kinematic viscosity. In a round pipe, flow is generally laminar (smooth, layered, dominated by viscosity) below Re ≈ 2,300, transitional between roughly 2,300 and 4,000, and turbulent (chaotic, dominated by inertia and mixing) above Re ≈ 4,000. The flow regime is not just a label — it determines which friction correlation is physically valid, as the next section shows.
Worked check: water at 20°C (ρ ≈ 1000 kg/m³, μ ≈ 0.001 Pa·s) flows at V = 2 m/s through a pipe of internal diameter D = 0.1 m. Re = ρVD/μ = (1000 × 2 × 0.1) / 0.001 = 200,000, well into the turbulent range.
The Darcy-Weisbach Equation and Pipe Friction Loss
Head lost to friction as a fluid moves through a pipe is calculated with the Darcy-Weisbach equation:
hf = f · (L/D) · V²/2g
where f is the dimensionless Darcy friction factor, L is pipe length, and D is internal diameter. For laminar flow, f can be found in closed form as f = 64/Re. For turbulent flow, f depends on both Reynolds number and the pipe's relative roughness (ε/D) and is found from the Colebrook equation or read from a Moody chart.
Worked example: continuing the pipe from the Reynolds number check above (D = 0.1 m, L = 50 m, V = 2 m/s, Re = 200,000, turbulent), assume commercial steel pipe with a relative roughness ε/D ≈ 0.00045. Reading the Moody chart at this Reynolds number and roughness gives a friction factor of approximately f ≈ 0.02.
hf = f·(L/D)·V²/2g = 0.02 × (50/0.1) × (2²/(2×9.81)) = 0.02 × 500 × 0.204 ≈ 2.04 m of head.
Converting to a pressure drop: Δp = ρ·g·hf = 1000 × 9.81 × 2.04 ≈ 20,000 Pa, or about 20 kPa over the 50 m run. A designer would compare this pressure drop against the available pump head to confirm the piping run does not starve downstream equipment, and would repeat the calculation for the system's other pipe segments and fittings (each fitting contributing its own minor-loss coefficient, K, in an additional K·V²/2g term) to build the full system curve.
Pumps, Fans, and the Affinity Laws
Centrifugal pumps and fans obey a set of scaling relationships called the affinity laws, which connect how flow, head, and power change when the impeller speed (or, at fixed speed, the impeller diameter) changes. For a fixed impeller running at a new speed N2 compared to its rated speed N1:
| Quantity | Scaling relationship |
|---|---|
| Flow rate | Q2/Q1 = N2/N1 |
| Head | H2/H1 = (N2/N1)² |
| Shaft power | P2/P1 = (N2/N1)³ |
These relationships are the fluid-mechanics reason a variable-frequency drive can produce such large energy savings on a variable-flow pump or fan system: because power scales with the cube of speed, a modest speed reduction yields a much larger reduction in energy consumed (see the FAQ below for a worked ratio). This article treats the affinity laws only as the underlying fluid-mechanics relationship; this site's dedicated pump-selection content covers how they are applied to real pump curves, NPSH, and variable-speed control strategy in HVAC systems.