← Back to Labs

2D Heat Diffusion — Fourier's Law

α = 0.50
T = 1.00
r = 6

The Heat Equation — Joseph Fourier, 1822

Heat flows from regions of high temperature to low, governed by Fourier's law. The temperature field T(x,y,t) evolves according to the heat equation:

∂T/∂t = α ∇²T = α (∂²T/∂x² + ∂²T/∂y²)

where α = κ/(ρcₚ) is the thermal diffusivity. This is solved numerically here using explicit finite differences: T[i,j]ⁿ⁺¹ = T[i,j]ⁿ + αΔt/h² (T[i+1,j] + T[i-1,j] + T[i,j+1] + T[i,j-1] − 4T[i,j]).

Stability requires αΔt/h² ≤ 1/4 (von Neumann condition). The fundamental solution is a Gaussian: T ∝ exp(−r²/4αt)/t — heat spreads as a diffusing Gaussian, widening as √(αt). Click and drag on the canvas to add heat sources or cold spots.