🌡️ Heat Equation — 2D Temperature Distribution

Draw heat sources and cold sinks on a 2D plate, then watch the temperature field evolve. Toggle between transient (time-stepping) and steady-state (iterative Gauss-Seidel) modes to explore how heat conducts through materials.

🇺🇦 Українська

Drawing Tool

Simulation

Temperature (°C)

Max
Min
Mean
Step0
50°100°
∂T/∂t = α·∇²T
FDM: T[i][j]n+1 = Tn +
α·Δt/Δx²·(Tleft+Tright+
Tup+Tdown−4·T)
Stability: α·Δt/Δx² ≤ 0.25

Heat Conduction Physics

The heat equation ∂T/∂t = α∇²T describes how temperature diffuses in a medium, where α = k/(ρcₚ) is the thermal diffusivity (thermal conductivity divided by density × specific heat). The finite difference method (FDM) approximates derivatives on a discrete grid: the Laplacian ∇²T ≈ (Ti+1,j + Ti-1,j + Ti,j+1 + Ti,j-1 − 4Ti,j) / Δx². For explicit time-stepping, the stability condition α·Δt/Δx² ≤ 0.25 must be satisfied to prevent numerical blow-up. The steady-state (∂T/∂t = 0, Laplace equation ∇²T = 0) can be found iteratively using Gauss-Seidel relaxation.