1-D Heat Equation Solver
Solve the one-dimensional heat or diffusion equation on a normalized interval with zero endpoint temperatures. Choose diffusivity, spatial grid, time step, final time and an initial profile, then inspect snapshots and the Fourier-number stability test.
How this tool works
FTCS uses uᵢⁿ⁺¹ = uᵢⁿ + r(uᵢ₋₁ⁿ−2uᵢⁿ+uᵢ₊₁ⁿ), where r=αΔt/Δx². In one dimension the standard linear stability limit is r≤1/2.
Example
Start from sin(πx) with α=0.01. The profile should preserve its sine shape while its amplitude decays as heat diffuses toward the zero-temperature boundaries.
Common questions
What happens if r is greater than 0.5?
The explicit FTCS scheme is outside its standard one-dimensional stability range and may develop oscillations or numerical blow-up.
What if I need a larger time step?
Use the Crank–Nicolson heat solver, which is implicit and unconditionally stable for the linear diffusion equation, while still requiring adequate resolution for accuracy.