Chemical & Materials
Heat Transfer Lab
Hold the two ends of a rod at fixed temperatures and watch heat diffuse: the profile (and the colour strip) animate from a cold start toward the straight-line steady gradient. It's solved by the explicit finite-difference scheme, which is only stable while α·dt/dx² ≤ ½ — the CFL limit — so it also shows why your time step matters in any transient simulation. Drag the end temperatures and the diffusivity to see how fast equilibrium arrives.
150°
Left end
20°
Right end
85°
Steady midpoint
The method, with your numbers
1D transient conduction
- 1
Pin the end temperatures (boundary conditions)
T(0) = T_left T(L) = T_right
T(0) = 150° T(L) = 20°
Fixed-temperature (Dirichlet) ends: heat pours in at the hot end and out at the cold end — the interior can only respond.
- 2
Check the stability number before stepping
r = α·Δt/Δx² ≤ ½ (CFL limit)
r = 0.4 ≤ 0.5 → stable
The explicit scheme only works below the CFL limit — solvers pick Δt = r·Δx²/α to stay under it. Halve Δx and you must quarter Δt.
- 3
March the heat equation (what the canvas is doing)
Tᵢ ← Tᵢ + r·(Tᵢ₊₁ − 2Tᵢ + Tᵢ₋₁)
Tᵢ ← Tᵢ + 0.4·(Tᵢ₊₁ − 2Tᵢ + Tᵢ₋₁) across 41 nodes, 4× per frame
This is the discrete ∂T/∂t = α·∂²T/∂x²: a node hotter than its neighbours' average cools, a colder one warms. The speed slider just takes more sub-steps per frame.
- 4
Where it ends: the steady state
T_steady(x) = T_left + (T_right − T_left)·x/L
midpoint = 150° + (20° − 150°)/2 = 85°
At steady state ∂T/∂t = 0, so the profile must have zero curvature — a straight line (the dashed guide). Curvature is what drives change.
Drag any control above — every number here recalculates. Want this method for any problem? Step Sheets →
Heat flows from hot to cold until the rod reaches the straight-line steady gradient (dashed). The solver is an explicit finite-difference scheme — stable only while α·dt/dx² ≤ ½, the CFL limit; past it the simulation would explode, which is why your step size matters.
How to use this simulation
Hold the two ends of a rod at fixed temperatures and watch heat diffuse: the profile (and the colour strip) animate from a cold start toward the straight-line steady gradient. It's solved by the explicit finite-difference scheme, which is only stable while α·dt/dx² ≤ ½ — the CFL limit — so it also shows why your time step matters in any transient simulation. Drag the end temperatures and the diffusivity to see how fast equilibrium arrives.
Everything runs in your browser — no sign-up, no download. Change a value and the result updates instantly, so you can build a feel for how each input shapes the outcome. It pairs with Crameleon's practice exams and step sheets when you want to go from intuition to working the problems.