Lecture 5.
1: Fourier’s law and the diffusion equation
Matthew Macauley
Department of Mathematical Sciences
Clemson University
http://www.math.clemson.edu/~macaule/
Math 4340, Advanced Engineering Mathematics
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 1 / 11
Partial differential equations
Definition
Let u(x, t) be a 2-variable function. A partial differential equation (PDE) is an equation
involving u, x, t, and the partial derivatives of u.
PDEs vs. ODEs
ODEs have a unifying theory of existence and uniqueness of solutions.
PDEs have no such theory.
PDEs arise from physical phenomena and modeling.
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 2 / 11
Motivation
The diffusion equation is a PDE that can model the motion of a number of physical
processes such as:
smoke in the air,
dye in a solution,
heat through a medium.
Let u(x, y , z, t) be the concentration (or temperature, etc.) at position (x, y , z) and time t.
Let F be the vector field that describes the flow of smoke (or heat, etc.)
Goal. Relate how u varies with respect to time to how it varies in space.
Definition
The diffusion equation (or heat equation) is the PDE
∂2u ∂2u ∂2u
∂u
= k ∇2 u = k ∇ · ∇u = k 2
+ 2
+ = k(uxx + uyy + uzz ).
∂t |{z} | {z } ∂x ∂y ∂z 2
Laplacian div(∇u)
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 3 / 11
Fourier’s law of diffusion
Material flows from regions of greater to lesser concentration, at a rate propotional to the
gradient:
F = −k∇u.
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 4 / 11
Derivation
Steps to deriving the diffusion equation
1. Fourier’s law: F = −k∇u.
∂u
2. Relate F and by the divergence theorem:
∂t ˚ ‹
div F dV = “Flux through S” = (F · n) dS.
D
By the divergence theorem,
˚ ˚ ˚
∂ ∂u
div F dV = − u dV = − dV .
D ∂t D D ∂t
holds for any region D. Thus,
∂u
div F = − .
∂t
Now plug this into F = −k∇u:
∂u ∂u
− = div F = ∇ · F = ∇ · (−k∇u) =⇒ = k∇2 u.
∂t ∂t
∂u ∂2u
In one-dimension, this reduces to = k 2 , or just ut = kuxx .
∂t ∂x
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 5 / 11
Diffusion in one dimension (non-uniform)
Consider a pipe of length L containing a medium. The diffusion equation is the PDE
∂u ∂ ∂u
= D(u, x) , where
∂t ∂x ∂x
u(x, t) = density of the diffusing material at position x and time t
D(u, x) = collective diffusion coefficient for density u and position x.
Assuming that the diffusion coefficient is constant, the diffusion equation becomes
ut = c 2 uxx , c 2 = −D.
Heat flow in one dimension (non-uniform)
Consider a bar of length L that is insulated along its interior. The heat equation is the PDE
∂u ∂ ∂u
ρ(x)σ(x) = κ(x) , where
∂t ∂x ∂x
u(x, t) = temperature of the bar at position x and time t
ρ(x) = density of the bar at position x
σ(x) = specific heat at position x
κ(x) = thermal conductivity at position x.
Assuming that the bar is “uniform” (i.e., ρ, σ, and κ are constant), the heat equation is
ut = c 2 uxx , c 2 = κ/(ρσ).
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 6 / 11
Adding boundary and initial conditions
Example 1a
The following is a boundary / initial value problem (B/IVP) for the heat equation in one
dimension:
ut = c 2 uxx , u(0, t) = u(L, t) = 0 u(x, 0) = x(L − x) .
| {z } | {z } | {z }
heat equation (PDE) boundary conditions initial condition
The following is a picture of what a solution looks like over time.
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 7 / 11
Solving PDEs
PDEs, like ODEs, can be homogeneous or inhomogeneous. Like ODEs, we’ll solve them by:
1. Solving the related homogeneous equation
2. Finding a particular solution (almost always a “steady-state” solution)
3. Adding these two solutions together.
Most common homogeneous PDEs can be solved by a method called separation of variables.
Separation of variables (in one dimension)
How to solve a PDE like
ut = c 2 uxx , u(0, t) = u(L, t) = 0 u(x, 0) = x(L − x) .
| {z } | {z } | {z }
heat equation (PDE) boundary conditions initial condition
1. Assume that there is a solution of the form u(x, t) = f (x)g (t).
2. Plug this back into the PDE and solve for f (x) and g (t). (Separate variables!)
3. You’ll get a BVP for f (x) and an ODE for g (t).
4. Solve these ODEs. You’ll get a solution un (x, t) for each n = 0, 1, 2, . . . .
X∞
5. By superposition, the general solution is u(x, t) = cn un (x, t).
n=0
6. Use the initial condition to find the cn ’s.
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 8 / 11
Solving the heat equation
Example 1a
Recall the following is a boundary / initial value problem (B/IVP) for the heat equation in
one dimension:
ut = c 2 uxx , u(0, t) = u(L, t) = 0 u(x, 0) = x(L − x) .
| {z } | {z } | {z }
heat equation (PDE) boundary conditions initial condition
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 9 / 11
Solving the heat equation
Example 1a (cont.)
The general solution to the BVP for the heat equation
ut = c 2 uxx , u(0, t) = u(L, t) = 0 u(x, 0) = x(L − x) .
| {z } | {z } | {z }
heat equation (PDE) boundary conditions initial condition
∞
X 2
nπx
e −(cnπ/L) t . Finally, we’ll use the initial condition.
is u(x, t) = bn sin L
n=1
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 10 / 11
Solving the heat equation
Example 1a (cont.)
The particular solution to the heat equation that satisfies the following boundary and initial
conditions
ut = c 2 uxx , u(0, t) = u(L, t) = 0 u(x, 0) = x(L − x)
| {z } | {z } | {z }
heat equation (PDE) boundary conditions initial condition
∞
2
L 3
X
[1−(−1)n ] nπx
e −(cnπ/L) t .
is u(x, t) = 4 nπ
sin L
n=1
M. Macauley (Clemson) Lecture 5.1: Fourier’s law and the diffusion equation Advanced Engineering Mathematics 11 / 11