Approximate one-dimensional heat diffusion from a centred grid impulse with fixed-zero endpoints.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Each interior value advances by the forward-time centred-space difference uᵢⁿ⁺¹ = uᵢⁿ + r(uᵢ₋₁ⁿ − 2uᵢⁿ + uᵢ₊₁ⁿ). The time-step count keeps r = diffusivity × Δt ÷ Δx² at or below 0.45 while endpoint values stay zero.
Length: 1 Points: 11 Diffusivity: 0.01 Seconds: 1 Initial peak: 100
X Value --- --------- 0 0 0.1 0 0.2 3.703704 0.3 11.111111 0.4 22.222222 0.5 25.925926 0.6 22.222222 0.7 11.111111 0.8 3.703704 0.9 0 1 0
Numerical-method lessons demonstrate diffusion, convergence exercises refine the spatial grid, and heat prototypes export samples for a plot.