The one-dimensional heat equation governs how temperature evolves along a thin rod. The parameter represents thermal diffusivity. With fixed temperatures at both ends of the rod, the solution illustrates diffusion and smoothing phenomena that appear across physics and engineering.
Analytic solutions exist for simple boundary conditions, often using Fourier series expansions. However, many real-world scenarios require numerical methods. This calculator employs an explicit finite difference scheme, updating the temperature at each interior point using where . Stability demands . By discretizing space and time, we approximate how heat diffuses from the initial temperature profile.
We divide the interval into segments with spacing . Time advances in steps of chosen so that satisfies the stability condition. The algorithm starts by sampling the initial temperature at each grid point. At each time step, boundary values remain zero (or more generally, fixed), while interior points are updated via the explicit formula above. After steps, the resulting array approximates .
Because depends on both and , finer spatial grids require smaller time steps for stability. The explicit scheme is conceptually simple but not the most efficient for stiff problems; still, it provides an excellent introduction to numerical PDEs and is adequate for moderate resolutions, as implemented here.
If the rod starts with temperature distribution and zero boundary conditions, the analytic solution separates into exponentially decaying Fourier modes. Our calculator can reproduce this behavior numerically. You will see that the sinusoidal shape flattens over time as energy dissipates through the boundaries. By experimenting with different initial functions, you can explore how diffusion smooths sharp features and transports heat from hotter regions to cooler ones.
The same equation also models other processes, from pollutant diffusion in soil to the pricing of certain financial derivatives. As such, learning to approximate solutions has wide-reaching applications. Understanding stability conditions and discretization error builds foundational skills for computational science. This calculator aims to make the subject approachable by providing instant numerical results alongside a concise explanation of the underlying method.
Estimate how gravity slows the passage of time near massive objects using general relativity.
Determine the molar mass of a compound by entering its chemical formula. Useful for stoichiometry and laboratory preparations.
Calculate the diffraction-limited angular resolution of a telescope using wavelength and aperture diameter. Learn how aperture size influences your ability to separate close celestial objects.