Heat Transfer · interactive worked example

Temperature Distribution in a Circular Fin

A pin fin sticks out from a hot base into cooler air, losing heat along its length by convection. The temperature profile has a clean analytic answer — and a finite-difference grid converges to it, node by node, as you refine the mesh.

From the site author's own finite-difference lecture notes.

d²θ/dx² − m²θ = 0,   m² = hP/(kA),   θ = T − T
A 1-D fin equation — the same linear 2nd-order ODE family as the rest of the Numerical Methods track, just with a convective sink term instead of a forcing function.

θ(x) along the fin — analytic curve vs. finite-difference nodes

Analytic θ(x) Finite-difference nodes
m (1/m)
Heat rate at base
Max relative error

What you're seeing

Tip boundary condition

FD subintervals N

6

Fin parameters (the notebook's values)

D=0.025 m, L=1.15 m
h=10 W/m²K, k=398 W/mK
T_base=100°C, T∞=25°C

The same ghost-node trick as a Neumann boundary, generalized

The base is easy — a fixed (Dirichlet) temperature folds straight into the right-hand side of the linear system. The tip is the interesting boundary: an insulated tip means zero flux there, enforced with a "ghost node" reflected back across the boundary, which is exactly why the matrix's last row has a coefficient of 2 instead of 1 — the reflected neighbor counts twice. A convective tip uses the same ghost-node idea, just with the reflection adjusted by a term proportional to h/k to account for the heat actually leaving through that face. Setting that term to zero recovers the insulated case exactly — same matrix, one parameter different.

Watch the mesh converge

At the notebook's original resolution (N=6), the finite-difference tip temperature is off from the analytic answer by about 1.4% — a real, visible discretization error, growing fastest near the tip since that's farthest from the fixed (and therefore exact) base value. Push N up into the dozens and that error collapses toward zero, the signature of a properly second-order finite-difference scheme: each doubling of N should roughly quarter the error.

Why a long fin makes the tip condition stop mattering

For this rod's h and k, the insulated-tip and convective-tip analytic solutions are already nearly identical at the given length — both give a base heat rate within 0.05% of each other. Make the fin long enough relative to 1/m and the temperature decays to ambient well before reaching the tip either way, so whatever is actually happening at the tip stops being able to influence the rest of the fin at all. That's the same physical idea as a "long fin" approximation in any textbook table.

EngineeringCandy · Finite-difference fin solved live · refine the mesh and watch the error shrink