The Heat Equation

Pick a starting temperature profile, or draw one on the plot, and a material. Both ends of the rod are held at 0 °C. The page solves the heat equation exactly and runs the clock, with the starting profile left behind as a ghost.

Loading interactive simulation...

Lesson

The theory — The Heat Equation

The heat equation ∂u/∂t = κ ∂²u/∂x² says that the temperature at a point changes at a rate set by the curvature of the profile there: a point colder than the average of its neighbours warms, a point hotter than them cools. κ = k/(ρcp), the thermal diffusivity, is the conductivity divided by the heat capacity per unit volume. For a rod of length L whose ends are held at 0, the solution from a starting profile f(x) is u = Σ bk sin(kπx/L) e−k²π²κt/L², with bk = (2/L) ∫ f(x) sin(kπx/L) dx over the rod.

What each symbol means

u
the temperature at position x and time t, in °C
κ
the thermal diffusivity in m²/s: 1.157 × 10−4 for copper, 1.17 × 10−5 for carbon steel
τ
κt/L², the time as the equation counts it; two rods started from the same profile have the same shape at the same τ
b_k
the size of sine mode k at the start, worked out from the starting profile

A hot rod loses its sharp edges first 🖖

Press Middle third, copper. The dashed ghost is where the rod started, a block of 100 °C with vertical walls. Any starting profile can be written as a sum of sine modes that vanish at both ends, mode k having k humps, and the table below gives their sizes: b1 = 63.662, b3 = −42.441, b5 = 12.732. Each mode decays on its own clock, as e−k²π²κt/L², so mode 3 dies nine times as fast as mode 1 and mode 5 twenty-five times. The vertical walls are built from the fast modes, which is why they go first. By τ = κt/L² = 0.05, 7.2 minutes in a metre of copper, the profile differs from the first mode alone by at most 1.27% of its peak and the centre reads 39.4 °C. From there the shape hardly changes; what falls is its height. On the log plot each mode is a straight line, k² times as steep as the first. This is the series Fourier Series Builder builds, and Fourier wrote it for heat: his Théorie analytique de la chaleur (1822) grew from a memoir he sent to the Institut de France at the end of 1807.

Twice the length takes four times as long 🖖

Press Middle third, copper, then Copper, half a metre. The profiles are identical, because the equation keeps only one clock, τ = κt/L²: the rod's length enters squared and the material only through κ, its thermal diffusivity. So the metre of copper reaches τ = 0.05 after 432.2 s and the half metre after 108.0 s, a quarter. The first mode's own time to fall by a factor e is L²/(π²κ): 875.7 s for a metre of copper, 8,659.9 s for carbon steel, whose κ is 9.89 times smaller, and 36.1 hours for Pyrex. Heat does not travel at a speed. The distance it has spread grows as the square root of the time, which is why the same square root turns up in a classical random walker's spread on Quantum Random Walk.

The rod forgets which side was heated 🖖

Press Left half hot. All the heat starts on the left, and it is natural to expect the rod to stay lopsided until it is cold. The lopsidedness fades long before the heat does. The lopsided part of the profile is its even modes, each with as many humps up as down. The largest and slowest of them, mode 2, one hump up and one down, starts exactly as large as the first mode: b2 = b1 = 63.662. It dies four times as fast. At τ = 0.1, 14.4 minutes in copper, mode 2 has 0.0193 of itself left against the first mode's 0.3727, the hottest point has walked to 0.468 m, 3.2 cm from the middle, and the quarter-point on the heated side is only 2.5 °C warmer than its mirror, while 30.21% of the heat is still in the rod. Draw any profile you like and the same thing happens, unless its first mode is exactly zero. Every mode dies faster than the first, so every such profile ends as the same arch, and in the end all the rod remembers of where it started is one number, b1, the arch's height.

Problem solved in full

  1. How long until the middle of a steel bar is cold? 3 steps

    A carbon-steel bar 1 m long has its middle third at 100 °C and both ends in ice. How long until the centre is below 1 °C? The time slider stops at τ = 0.3, before the answer. Press Middle third, steel first: the page gives b1 and the first mode's time to fall by a factor e.

    Open this problem in the tool

    1. Long before the centre reaches 1 °C, every mode but the first has gone (at τ = 0.1 the profile is already within 0.02% of one arch). So the centre is b1e−π²τ, and setting it to 1 gives τ:

    2. Since τ = κt/L² and T1 = L²/(π²κ), the time is ln(b1) first-mode e-folding times:

    3. Check that mode 3, the largest of the rest, really has gone by then:

    Answer

    Just under ten hours: 35,970 s. The answer is ln(63.662) = 4.15 e-folding times, whatever the material, so the same bar in copper takes 4.1536 × 875.7 s = 3,637 s, about an hour. Mode 3 is down to 2.5 × 10−15 °C by then, so the single-arch formula is exact to far more places than any thermometer reads.

Learning path

The heat, wave and Laplace equations

References (2)