Explicit FDM: $T_i^{n+1}= T_i^n + r(T_{i+1}^n - 2T_i^n + T_{i-1}^n)$ with stability criterion $r = \alpha\Delta t/\Delta x^2 \leq 0.5$. Watch 1D heat conduction evolve in real time with multiple boundary condition types.
The core physics is governed by the 1D heat conduction equation (Fourier's Law):
$$\frac{\partial T}{\partial t}= \alpha \frac{\partial^2 T}{\partial x^2}$$Here, `T(x,t)` is temperature, `t` is time, `x` is position, and `α` is the thermal diffusivity (a material property). This equation says the rate of temperature change at a point is proportional to the spatial curvature (second derivative) of the temperature profile.
The Explicit Finite Difference Method discretizes this equation in space and time. The key update formula for each interior grid point `i` at time step `n+1` is:
$$T_i^{n+1}= T_i^n + r\,(T_{i+1}^n - 2T_i^n + T_{i-1}^n)$$Where `r = αΔt/Δx²` is the stability parameter. The term `(T_{i+1}^n - 2T_i^n + T_{i-1}^n)` is the finite difference approximation of the second spatial derivative `∂²T/∂x²`. For numerical stability, we must enforce `r ≤ 0.5`. This condition links the physical property (α), the numerical grid (Δx), and the time step (Δt).
Building Insulation Design: Engineers use this 1D analysis to model heat transfer through walls. By simulating different materials (changing α) and thicknesses (L), they can predict heat loss over time and optimize for energy efficiency, crucial for designing green buildings.
Electronic Cooling: Predicting temperature rise in a silicon chip or a heat sink fin is often modeled as 1D conduction. The explicit method allows for rapid simulation of transient "hot spots" after a processor starts a heavy computation, informing heatsink design.
Materials Processing: In quenching or annealing metals, controlling the cooling rate is vital to achieve desired material properties. Simulating the temperature history through a steel plate's thickness helps design the process to avoid cracks or residual stresses.
Geothermal Analysis: Modeling how temperature varies with depth in the Earth's crust over daily or seasonal cycles is a classic 1D heat conduction problem. This principle is used to design ground-source heat pump systems.
First, do not confuse "thermal diffusivity α" with "thermal conductivity k". While you directly manipulate thermal diffusivity α in the simulator, material data sheets in practice often list thermal conductivity k. Their relationship is $\alpha = k / (\rho c_p)$. For example, copper has high thermal conductivity (about 400 W/mK), so α is also large, meaning heat spreads quickly. Conversely, polystyrene foam has low thermal conductivity, so α is small, and heat tends to stay localized. When setting parameters, you must consider density ρ and specific heat $c_p$ together as a set.
Next, note that "grid size Δx and time step Δt cannot be chosen independently". The stability condition $r \le 0.5$ can be satisfied by either decreasing Δt or increasing Δx. For instance, if you refine Δx from 1mm to 0.5mm, the spatial resolution improves, but you must then reduce Δt to a quarter of its previous value; otherwise, r becomes too large. Consequently, the number of calculation steps needed to simulate the same real-time duration explodes, increasing computation time. In practice, you should always be mindful of the trade-off between "accuracy" and "computational cost".
Finally, be aware that the heat transfer coefficient h in the Robin boundary condition varies greatly depending on the situation. While you can change h to values like 10 or 100 in this tool, in reality, the order of magnitude differs significantly between natural convection (approx. 5–25 W/m²K in air), forced convection (approx. 25–250 W/m²K with a fan), or water cooling (approx. 500–10,000+ W/m²K). If you set this value too far from reality, your valuable simulation results will fail to reflect the real world. Therefore, it is essential to verify this carefully using literature or experimental data.
The concept behind this 1D heat conduction simulator is the partial differential equation that describes "diffusion phenomena" itself. In other words, the exact same mathematical model for temperature diffusion appears in many other engineering fields.
For example, mass diffusion (chemical engineering). The diffusion of dopants in semiconductor manufacturing or the movement of lithium ions inside a battery is described by "Fick's second law", which has the exact same form as the heat diffusion equation. You simply replace temperature T with concentration C, and thermal diffusivity α with diffusion coefficient D. Boundary conditions like "fixed surface concentration (Dirichlet)" or "surface chemical reaction (similar to Robin)" are also very similar to heat conduction.
Another is groundwater flow (hydrology/civil engineering). The flow of groundwater in an aquifer is modeled under incompressible flow conditions by the "Laplace equation" or a "diffusion-type equation". Here, temperature corresponds to hydraulic head (water pressure height), and thermal diffusivity corresponds to hydraulic conductivity. The condition of pumping water from a well is similar to placing a heat source as a boundary condition.
Furthermore, it can also be applied to parts of structural mechanics (materials engineering). Whether it's the fundamental equation for beam deflection or simplified models for time-dependent creep phenomena, although the physical quantities differ, the structure is common: "the change in a quantity is proportional to the spatial curvature (second derivative) of that quantity." The "stability condition" and "influence of boundary conditions" you experienced with this simulator become powerful foundational knowledge when learning numerical simulation in these fields.
Once you are comfortable with this tool, next learn about the existence and significance of the "implicit method". The explicit method is computationally simple but has a strict constraint on the time step Δt (r≤0.5), right? The implicit method solves a system of equations that includes the temperatures of neighboring points at the future time step (n+1), so in principle, the calculation does not blow up no matter how large Δt is. However, the computation per step becomes heavier. In practice, advanced techniques like "implicit-explicit methods" are used, applying the implicit method with large Δt to parts with slow heat conduction and the explicit method with fine Δt to parts with rapid changes.
Regarding mathematical background, understanding "the classification of partial differential equations" is recommended. The heat conduction equation dealt with here is called "parabolic", possessing the property that the influence of initial conditions decays smoothly over time. In contrast, the wave equation (hyperbolic) or the electrostatic field equation (elliptic) have completely different properties. This difference fundamentally determines the applicable numerical methods and how boundary conditions are set.
As a practical next step, try challenging yourself with 2D heat conduction simulation. The concept is exactly the same as in 1D: the next temperature of a point is determined from "its current temperature" and the "temperatures of the four surrounding points (up, down, left, right)". The formula becomes something like $T_{i,j}^{n+1} = T_{i,j}^n + r(T_{i+1,j}^n + T_{i-1,j}^n + T_{i,j+1}^n + T_{i,j-1}^n - 4T_{i,j}^n)$. In 2D, you can handle more practical and interesting problems, such as the efficiency of an L-shaped heat sink or how multiple heat sources interfere with each other.