Heat flows from hot to cold — always. Three mechanisms do this work: conduction through solids, convection through fluids, and radiation through empty space. Together they govern everything from a cup of coffee cooling to the temperature of the Earth's surface.
Every heat-transfer problem involves one or more of these three mechanisms. They differ fundamentally in the medium required and the governing equation:
Energy transported through direct molecular contact in a solid or stationary fluid. No bulk material movement.
Energy carried by the bulk motion of a fluid (liquid or gas). Can be natural (buoyancy-driven) or forced (fan/pump).
Energy emitted as electromagnetic waves — requires no medium and is the dominant mode in vacuum (e.g., from the Sun).
Jean-Baptiste Joseph Fourier showed in 1822 that the heat flux through a material is proportional to the temperature gradient and the material's thermal conductivity:
The total heat flow rate through an area A of thickness L is:
Thermal resistance behaves exactly like electrical resistance — series layers (wall + insulation) simply add: R_total = Σ(Lᵢ/kᵢAᵢ).
When a fluid moves past a solid surface, it carries heat away from (or toward) that surface. Newton's law of cooling parameterises this with a convective heat transfer coefficient h:
The coefficient h is not a material constant — it depends on fluid velocity, geometry and flow regime (laminar vs. turbulent). It is determined via the dimensionless Nusselt number Nu = hL/k_fluid, which correlates with the Reynolds (Re) and Prandtl (Pr) numbers.
In natural (free) convection the fluid motion is driven by buoyancy — warm fluid rises, cool fluid sinks. Typical h values range from 5–25 W/(m²·K) in air. Forced convection (a fan blowing over a heat sink) raises h to 25–250 W/(m²·K). Liquid cooling (water, oil) reaches 100–20 000 W/(m²·K) because liquids have much greater thermal capacity per unit volume.
Every body above absolute zero emits electromagnetic radiation. Josef Stefan (1879) and Ludwig Boltzmann (1884) derived the total emitted power for a perfect black body:
Real surfaces are not perfect black bodies. Their emissivity ε (0 ≤ ε ≤ 1) scales the emission: Q̇ = εσAT⁴. Net heat exchange between two parallel surfaces is:
The peak wavelength of emission shifts with temperature: λ_peak · T = 2.898 × 10⁻³ m·K. At 5778 K (Sun) λ_peak ≈ 500 nm (green light). At 300 K (room temperature) λ_peak ≈ 9700 nm (mid-infrared) — invisible to the human eye but detected by thermal cameras.
Combining Fourier's law with the conservation of energy in a continuum gives the heat equation — one of the most important PDEs in physics:
In 1D, the discretised finite-difference update is:
The following solves the 1D heat equation on a rod using an explicit finite-difference scheme, plus a lumped-body cooling model with all three modes combined.
// 1D heat diffusion — explicit finite differences
class HeatRod {
/**
* @param {number} n - number of spatial nodes
* @param {number} alpha - thermal diffusivity [m²/s]
* @param {number} dx - node spacing [m]
*/
constructor(n, alpha, dx) {
this.T = new Float64Array(n).fill(300); // K
this.T2 = new Float64Array(n);
this.n = n;
this.alpha = alpha;
this.dx = dx;
// max stable dt: alpha*dt/dx² ≤ 0.5
this.dt = 0.4 * dx*dx / alpha;
}
step() {
const { T, T2, n, alpha, dx, dt } = this;
const r = alpha * dt / (dx * dx);
// interior nodes
for (let i = 1; i < n - 1; i++) {
T2[i] = T[i] + r * (T[i+1] - 2*T[i] + T[i-1]);
}
// Dirichlet boundary: fix left end hot, right end cold
T2[0] = T[0];
T2[n-1] = T[n-1];
T2.copyWithin(0);
T.set(T2);
}
// Neumann BC: zero gradient (insulated end) at index i
insulate(i) {
const mirror = i === 0 ? 1 : this.n - 2;
this.T[i] = this.T[mirror];
}
}
// Lumped body: conduction + convection + radiation cooling
function lumpedCool(T0, Tamb, params, totalTime, dt) {
const { m, Cp, A, h, epsilon, k, L } = params;
const sigma = 5.67e-8;
let T = T0, t = 0;
const history = [{ t, T }];
while (t < totalTime) {
const qConv = h * A * (T - Tamb); // W
const qRad = epsilon * sigma * A * (T**4 - Tamb**4); // W
const qCond = k * A / L * (T - Tamb); // contact to substrate, W
const dT = -(qConv + qRad + qCond) / (m * Cp) * dt;
T += dT;
t += dt;
history.push({ t, T });
}
return history;
}
// Example: a steel sphere (r=0.05m) cooling from 600K in 300K air
const sphere = {
m: 4.1, // kg = ρ·V = 7900·(4/3π·0.05³)
Cp: 490, // J/(kg·K)
A: 0.0314, // m² = 4π·0.05²
h: 15, // W/(m²·K) natural convection in air
epsilon: 0.8, // oxidised steel
k: 0, // no conduction path (suspended)
L: 1 // ignored when k=0
};
const curve = lumpedCool(600, 300, sphere, 3600, 1); // 1h @ 1s steps
console.log(`After 1 hour: ${curve.at(-1).T.toFixed(1)} K`);
Real objects lose heat via all three modes simultaneously. A hot metal plate suspended in air loses heat by:
The relative importance changes dramatically with temperature. At 300 K a blackened surface in still air loses roughly 60% by convection, 40% by radiation. At 1000 K radiation accounts for ~85% of total heat loss.
Watch Rayleigh-Bénard convection cells form as a temperature gradient is applied to a fluid layer — heat transfer made visible.