Differential Equations › Section I · Partial differential equations › Topic I.1

The heat equation

Temperature along a metal bar changes from place to place and from moment to moment, so it depends on two variables at once. The heat equation, built from conservation of energy and Fourier's law, is the partial differential equation that governs it.

Equations with more than one variable

Every equation so far in this course had one independent variable. Temperature in a bar is a function \(u(x, t)\) of position \(x\) and time \(t\). An equation linking an unknown function of several variables to its partial derivatives is a partial differential equation, or PDE. We write subscripts for partial derivatives: \(u_t\) is the rate of change at a fixed point, \(u_x\) is the slope of the temperature profile at a fixed instant, and \(u_{xx}\) is that profile's concavity. This section builds three classic PDEs and then solves them.

The setting: a thin, insulated bar

Take a bar of length \(L\) lying along \(0 \le x \le L\). Assume the temperature is the same at every point of each cross-section, so it varies only with \(x\), and assume the curved side of the bar is perfectly insulated, so heat can travel only along the bar. Good lagging makes this nearly true. Four quantities appear: the specific heat \(c\), the density \(\rho\), the heat flux \(\varphi(x, t)\), which is the heat flowing to the right per unit area per unit time, and \(Q(x, t)\), any heat generated per unit volume per unit time, such as from an electric current.

Conservation of energy

Look at a thin slice of the bar between \(x\) and \(x + \Delta x\), with cross-sectional area \(A\). Its heat energy rises at the rate \(c\rho\, u_t\, A\,\Delta x\). That must equal the heat flowing in at the left face, minus the heat flowing out at the right face, plus any heat generated inside:

c\rho\, u_t\, A\,\Delta x = \big[\varphi(x, t) - \varphi(x + \Delta x, t)\big]A + Q\,A\,\Delta x

Divide by \(A\,\Delta x\) and let \(\Delta x \to 0\). The bracket becomes a derivative, and the balance law is

c\rho\, u_t = -\varphi_x + Q

It has two unknowns, \(u\) and \(\varphi\), so one more law is needed.

Fourier's law of conduction

Fourier's law links the flux to the temperature gradient:

\varphi = -K\,u_x

where \(K > 0\) is the thermal conductivity, in W/(m·K). (The physics course writes it \(k\); here \(k\) is saved for another constant.) The law captures three facts. A uniform temperature, \(u_x = 0\), means no flow. If it is hotter to the right, \(u_x > 0\), so \(\varphi < 0\) and heat flows left, from hot to cold. And a steeper gradient drives a larger flow. For a slab with a steady, straight-line profile it gives the familiar conduction rate \(KA\,\Delta T/d\).

Worked example: heat flux in an aluminium rod

An aluminium rod, with \(K \approx 240\) W/(m·K), has a temperature that falls by 50 °C per metre as \(x\) increases. Find the heat flux and the power carried through a cross-section of 2.0 cm². 1. The gradient is \(u_x = -50\) °C/m, which is the same as −50 K/m. 2. Fourier's law: \(\varphi = -240 \times (-50)\), which is 12,000 W/m². 3. Power: 12,000 W/m² times \(2.0 \times 10^{-4}\) m² is 2.4 W. 4. Check the sign: the rod is hotter on the left, and \(\varphi > 0\) means flow to the right, from hot to cold, as it should be.

The heat equation

Substitute Fourier's law into the balance law: \(c\rho\, u_t = (K u_x)_x + Q\). If the bar is uniform, so \(c\), \(\rho\) and \(K\) are constants, divide by \(c\rho\):

u_t = k\,u_{xx} + \frac{Q}{c\rho}, \qquad k = \frac{K}{c\rho}

The constant \(k\) is the thermal diffusivity, in m²/s; it measures how quickly temperature differences even out, not how much heat flows. With no heat sources, \(Q = 0\), this is the equation solved in the rest of the section: \(u_t = k\,u_{xx}\).

Reading the equation

The source-free equation says that the rate of change at a point is proportional to the concavity of the profile there. Where the profile is concave up, \(u_{xx} > 0\), the point is cooler than the average of its neighbours, and it warms. Where it is concave down, as at a hot spot, it cools. Where the profile is a straight line, \(u_{xx} = 0\), the temperature does not change. So the heat equation smooths: peaks sink, dips fill in, and sharp corners round off at once. It also models chemical diffusion, hence its other name, the diffusion equation.

Worked example: how fast a hot spot cools

A copper bar has \(K \approx 400\) W/(m·K), \(c \approx 385\) J/(kg·K) and \(\rho \approx 8960\) kg/m³. At one instant, near a point, its temperature is \(u = 40 + 300x - 1500x^2\) °C, with \(x\) in metres. How fast is that region changing? 1. Diffusivity:

k = \frac{400}{385 \times 8960} \approx 1.16 \times 10^{-4}\ \mathrm{m^2/s}

2. Concavity: \(u_{xx} = -3000\) °C/m². 3. With no sources, \(u_t = k\,u_{xx} \approx -0.35\) °C/s. 4. Check: the profile is concave down, a local hot region, so it should cool, and \(u_t < 0\) agrees.

Initial and boundary conditions

As with ordinary equations, the number of conditions matches the order, counted per variable. One time derivative needs one initial condition, the starting profile \(u(x, 0) = f(x)\). Two space derivatives need two boundary conditions, one at each end. A prescribed temperature, or Dirichlet condition, fixes \(u(0, t)\) and \(u(L, t)\). A prescribed heat flux, or Neumann condition, fixes \(-K\,u_x\) at an end; a perfectly insulated end has \(u_x = 0\). An end cooled by surrounding fluid at temperature \(g_1(t)\) obeys Newton's law of cooling, a Robin condition:

-K\,u_x(0, t) = -H\big[u(0, t) - g_1(t)\big], \quad H > 0

More boundary conditions and higher dimensions

At the right end the Robin condition has no minus sign on the right-hand side,

-K\,u_x(L, t) = H\big[u(L, t) - g_2(t)\big]

because a hot end there loses heat by flowing right, in the positive direction. The two ends may have different types. A thin ring, cut and laid along \(-L \le x \le L\), has periodic conditions: \(u(-L, t) = u(L, t)\) and \(u_x(-L, t) = u_x(L, t)\). In a plate or a solid block, \(u_{xx}\) becomes the Laplacian \(\nabla^2 u\), the sum of \(u_{xx}\), \(u_{yy}\) and \(u_{zz}\), and the uniform heat equation is

u_t = k\,\nabla^2 u + \frac{Q}{c\rho}

Common mistakes to avoid

First, dropping the minus sign in Fourier's law, which sends heat from cold to hot. Second, confusing conductivity with diffusivity: \(K\) sets how much heat flows, while \(k = K/(c\rho)\) sets how fast temperatures even out. Third, giving the heat equation two initial conditions: it has only a first time derivative, so only the starting temperature is given. Fourth, writing an insulated end as \(u = 0\); insulation stops the flux, so it is \(u_x = 0\). Fifth, copying the Robin condition's sign from one end to the other without checking the direction of flow.

Key takeaways

The temperature \(u(x, t)\) in a thin bar with insulated sides obeys energy balance, \(c\rho\, u_t = -\varphi_x + Q\), and Fourier's law, \(\varphi = -K\,u_x\). For a uniform bar these give \(u_t = k\,u_{xx} + Q/(c\rho)\), with diffusivity \(k = K/(c\rho)\). Without sources, the rate of change is proportional to the concavity, so the equation smooths profiles. One initial condition and two boundary conditions are needed: prescribed temperature, prescribed flux (insulated means \(u_x = 0\)), Newton cooling, or periodic for a ring. In two or three dimensions, \(u_t = k\,\nabla^2 u\).

Flashcards

Flashcard

PDE

An equation for an unknown function of several variables and its partial derivatives

Temperature u(x, t) depends on place and time.

Test your understanding

Question 1 of 5

In a rod with K = 200 W/(m·K), the temperature rises by 30 °C per metre as x increases. What is the heat flux φ?

Question 2 of 5

A material has K = 50 W/(m·K), c = 500 J/(kg·K) and ρ = 8000 kg/m³. What is its thermal diffusivity k?

Question 3 of 5

In a uniform bar with no heat sources, the profile at one instant is u = 60 − 2x + 5x² near a point, with k = 0.01 m²/s. What is uₜ there?

Question 4 of 5

The right end, x = L, of a bar is perfectly insulated. Which boundary condition describes it?

Question 5 of 5

How many initial and boundary conditions does the heat equation uₜ = k uₓₓ on 0 ≤ x ≤ L need?

← Previous topicNext topic →