Directions
This simulation computes the steady-state temperature distribution in a two-dimensional square slab. Begin by selecting a preset material from the drop-down menu (or choose "Custom Material" and enter your own thermal conductivity \(k\)). Next, set the boundary condition for each of the four edges of the slab: choose "Fixed Temp" to hold an edge at a constant temperature, "Convective" to expose an edge to a surrounding fluid (enter the ambient temperature \(T_\infty\) and the heat transfer coefficient \(h\)), or "Insulated" for an adiabatic edge with no heat flow. Adjust the grid mesh slider to change the resolution of the finite-difference grid, and set the initial temperature of the slab interior. Press "Start Simulation" to iterate toward steady state; the color map shows the temperature at every point in the slab, with the legend below the figure relating color to temperature. The labels on each edge of the figure summarize the current boundary conditions. Press "Reset Grid" to return the slab to its initial state after changing any inputs.
Details
The simulation solves the steady-state heat conduction (Laplace) equation in two dimensions with constant thermal conductivity and no heat generation:
$$ \frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 0 $$
The slab is discretized on a uniform square grid, and the equation is solved iteratively. Each interior node is set to the average of its four neighbors:
$$ T_{i,j} = \frac{T_{i+1,j} + T_{i-1,j} + T_{i,j+1} + T_{i,j-1}}{4} $$
Boundary nodes on convective or insulated edges are computed from an energy balance on a half control volume, which balances conduction from the adjacent interior node and along the edge with convection to the surroundings:
$$ T_{edge} = \frac{T_{interior} + \tfrac{1}{2}\left(T_{left} + T_{right}\right) + \mathrm{Bi}\, T_{\infty}}{2 + \mathrm{Bi}} \qquad \text{where} \qquad \mathrm{Bi} = \frac{h\, \Delta x}{k} $$
For an insulated edge, \(h = 0\) so \(\mathrm{Bi} = 0\), and the balance reduces to the adiabatic (zero-flux) condition. Fixed-temperature edges are held at the specified value, and corner nodes are taken as the average of the two adjacent boundary nodes. Iteration continues until the maximum temperature change per step is below a convergence tolerance, at which point the slab is at steady state.
Symbols
\(T\) = temperature (°C)
\(T_{i,j}\) = temperature at grid node \((i, j)\) (°C)
\(T_\infty\) = ambient (surrounding fluid) temperature (°C)
\(k\) = thermal conductivity of the slab (W/m·K)
\(h\) = convective heat transfer coefficient (W/m²·K)
\(\mathrm{Bi}\) = Biot number based on grid spacing (dimensionless)
\(\Delta x\) = grid spacing (m); the slab width is normalized to 1 m
\(x, y\) = spatial coordinates (m)
\(i, j\) = grid node indices
About
This simulation was generated by Professor David L. Silverstein of the University of Mississippi using xxx AI.