Professional Documents
Culture Documents
MATH 461: Fourier Series and Boundary Value Problems: Chapter I: The Heat Equation
MATH 461: Fourier Series and Boundary Value Problems: Chapter I: The Heat Equation
Problems
Chapter I: The Heat Equation
Greg Fasshauer
Fall 2015
1 Mathematical Modeling
2 Introduction
Why "approximate"?
model usually idealized/simplified (e.g., infinite resources above;
relativity theory applies to large scale problems, quantum
mechanics to small scales → want unified theory (string theory?))
modeling errors possible (e.g., different assumptions on how
traffic or heat flows)
data obtained from physical problem could be inaccurate
(measurement errors)
may need to truncate infinite series solutions to get practical
answer
possible roundoff or truncation errors in numerical solutions
fasshauer@iit.edu MATH 461 – Chapter 1 4
Mathematical Modeling Example 1: Traffic Flow
Physical Problem
Cars traveling on the Chicago highway system.
How long does it take to get from A to B? How fast are cars able to
travel at any specific position and time?
Mathematical Model
Cars travel on an idealized one-lane road (no on- or off-ramps, no
passing) – lots of simplification.
Consider a bunch of cars on our road. For each instance in time, t,
each car will be at a specific position xi (t) moving with velocity vi (t),
and we have
dxi
vi (t) = (t), i = 1, . . . , N.
dt
If we view the traffic flow as a whole then it’s more appropriate to
introduce a velocity field v such that v (x, t) denotes the velocity of the
traffic at position x and time t.
Then the velocity of a car at position x(t) (starting out at x(t0 ) = x0 ) is
given by the solution of the first-order ODE
dx
(t) = v (x(t), t) , x(t0 ) = x0 .
dt
See the example in the Mathematica notebook Traffic.nb.
fasshauer@iit.edu MATH 461 – Chapter 1 6
Mathematical Modeling Example 1: Traffic Flow
Therefore,
change in # cars on AB = {# cars entering at A − # cars leaving at B}
or
d
N(t) = φ(A, t) − φ(B, t), (1)
dt
where Z B
N(t) = ρ(x, t)dx. (2)
A
∂ ∂
ρ(x, t) = − [ρ(x, t)v (x, t)]
∂t ∂x
is a first-order PDE it is more complicated to study than the
second-order equations we will be looking at in this course since the
traffic flow equation may develop a discontinuous solution or shock –
even for a smooth initial condition (see the image in Traffic.nb).
Modeling Summary
There are many other kinds of mathematical modeling situations such
as
data fitting (e.g., find the best approximation – from a certain
linear/nonlinear function class – to given measurement data)
parameter estimation (e.g., find the best parameters for one of the
models used earlier – drag coefficient, birth/death rate, etc.)
statistical/probabilistic modeling (e.g., non-deterministic models in
finance or weather prediction)
discrete modeling (e.g., determining the best location of a fire
department or hospital on a network of roads)
geometric modeling (e.g., used for CAD systems)
asymptotic modeling (focus on extreme or limiting cases, can
usually be done analytically)
An entertaining overview of the field of mathematical modeling is
provided by Charlie’s activities on the TV show NUMB3RS.
fasshauer@iit.edu MATH 461 – Chapter 1 11
Introduction
Heat Flow
Our models will also require certain initial and boundary conditions
such as the entire temperature distribution at the beginning and the
temperature on the boundary at any time t.
Possible heat sources Q(x, t), i.e., the amount of heat energy per
unit volume generated per unit time.
Conservation of Energy
Remark
Note that all of these are rates of change per unit of time.
or Z b
∂ ∂
e(x, t) + φ(x, t) − Q(x, t) dx = 0.
a ∂t ∂x
fasshauer@iit.edu MATH 461 – Chapter 1 21
Heat Conduction in a 1D Rod A PDE for heat energy
Since Z b
∂ ∂
e(x, t) + φ(x, t) − Q(x, t) dx = 0
a ∂t ∂x
holds for arbitrary a, b we have
∂ ∂
e(x, t) + φ(x, t) − Q(x, t) = 0
∂t ∂x
or
Conservation of energy (differential form):
∂ ∂
e(x, t) = − φ(x, t) + Q(x, t) (4)
∂t ∂x
Remark
Equation (3) is more general than (4) since it also applies if e and φ
are not continuous.
These quantities are all related via the energy density. Namely,
Units:
J J kg ◦
= [ C]
m kg ◦ C m
fasshauer@iit.edu MATH 461 – Chapter 1 23
Heat Conduction in a 1D Rod The heat equation via Fourier’s law of heat conduction
∂ ∂
e(x, t) = − φ(x, t) + Q(x, t)
∂t ∂x
to become
∂ ∂
[c(x)ρ(x)u(x, t)] = − φ(x, t) + Q(x, t)
∂t ∂x
or
∂ ∂
c(x)ρ(x) u(x, t) = − φ(x, t) + Q(x, t) (5)
∂t ∂x
Remark
This is still not ideal since it involves both temperature and energy flux.
We need to unify further.
∂ ∂2
u(x, t) = k 2 u(x, t) (6)
∂t ∂x
is the standard heat equation or diffusion equation.
Remark
The same form of equation also applies to many other situations, such
as diffusion of pollutants, etc.
Initial Condition
In order to obtain a unique solution for a differential equation one
needs to specify additional conditions – usually one for every
derivative.
∂u
Since the heat equation contains we usually add an initial condition
∂t
such as
∂2u
The two conditions demanded by are discussed next.
∂x 2
Remark
As we will see later, one cannot just add any set of conditions. They
should be chosen such that the problem is well-posed, i.e., it should
allow for the existence of a unique solution that depends continuously
on the given conditions.
fasshauer@iit.edu MATH 461 – Chapter 1 29
Initial and Boundary Conditions
Boundary Conditions
∂u ∂u
(0, t) = (L, t) = 0, t > 0.
∂x ∂x
u(0) = T1 , u(L) = T2 .
1
but should be consistent with the BCs
fasshauer@iit.edu MATH 461 – Chapter 1 34
Equilibrium (or steady-state) Temperature Distribution Controlled End Temperature
u(x) = C1 x + C2
u(0) = T1 = C2
T2 − T1
u(L) = T2 = C1 L + T1 ⇒ C1 =
L
Therefore
T2 − T1
u(x) = T1 +
x,
L
i.e., the temperature distribution interpolates linearly between the fixed
end temperatures.
Remark
We will later see that the time dependent PDE problem
∂u ∂2u
(x, t) = k 2 (x, t)
∂t ∂x
u(x, 0) = f (x)
u(0, t) = T1 , u(L, t) = T2
has (in the limit – for very large time) the steady-state solution we just
computed, so in this case one can just solve the simple equilibrium
problem from the previous slide.
Insulated Boundaries
Now we have
Problem:
∂u ∂2u
(x, t) = k 2 (x, t)
∂t ∂x
u(x, 0) = f (x) (initial condition)
∂u ∂u
(0, t) = (L, t) = 0 (BCs)
∂x ∂x
The steady-state ( ∂u
∂t ≡ 0) ODE problem then is
u 00 (x) = 0
(7)
u 0 (0) = u 0 (L) = 0
u(x) = C1 x + C2 .
u(x) = C2 .
d L
Z Z L
e(x, t)dx = φ(0, t) − φ(L, t) + Q(x, t)dx
dt 0 0
Since the total heat energy is constant for all time we must have
We will need only the normal component of the flux, i.e., the
component of φ along n̂.
φ · n̂
cos θ =
kφk kn̂k
|{z}
=1
Therefore
projn̂ φ = φ · n̂ (8)
∂ ∂ ∂
where ∇ · f = ∂x f1 + ∂y f2 + ∂z f3 = div f and n̂(x, y , z) is the unit
outward normal vector to R at the point (x, y , z) of ∂R.
Remark
This is the 3D-analogue of the FT of Calculus.
In 2D we would be using Green’s theorem.
Using only the normal component of the heat flux (see (8)) we get the
rate of heat energy flowing through boundary surface:
ZZ
− φ(x, y , z, t) · n̂(x, y , z) dS (11)
∂R
Remark
The “−” sign appears since outward flow φ is positive, but such a flow
reduces the heat energy.
In order to get the heat equation in PDE form we need to convert the
surface integral ZZ
φ · n̂ dS
∂R
now becomes
ZZZ ZZZ ZZZ
∂
cρ u dV = − ∇ · φ dV + Q dV
∂t
R R R
or ZZZ
∂
cρ u + ∇ · φ − Q dV = 0.
∂t
R
∂
c(x, y , z)ρ(x, y , z) u(x, y , z, t) = −∇ · φ(x, y , z, t) + Q(x, y , z, t).
∂t
In its 3D
form the fluxφ is proportional to the temperature gradient
∂ ∂ ∂
∇u = ∂x u, ∂y u, ∂z u , i.e.,
Special case:
Q = 0 with c, ρ, K0 = const results in
∂ K0
u = k ∇2 u, k= ,
∂t cρ
or
∂
u = k ∆u,
∂t
where the Laplacian is defined as
∂2 ∂2 ∂2
∆u = ∇2 u = 2
u+ 2
u + 2u
∂x ∂y ∂z
or
∂ ∂u ∂ ∂u ∂ ∂u
∆u = ∇ · ∇u = + +
∂x ∂x ∂y ∂y ∂z ∂z
i.e.,
∆u = div(grad u).
fasshauer@iit.edu MATH 461 – Chapter 1 51
Derivation of the Heat Equation in 2D and 3D
Boundary conditions
Prescribed boundary temperature:
φ · n̂ = 0 ⇐⇒ ∇u · n̂ = 0,
H
∇u · n̂ = − [u − uB ] on the boundary ∂R
K0
Remark
If u > uB then heat flows outward, i.e., the temperature gradient is negative.
Thus we need to have H > 0 for everything to make sense.
Note that n̂ = i and n̂ = −i correspond to 1D end conditions.
For example,
∂u ∂u ∂u ∂u
∇u · i = , , · (1, 0, 0) =
∂x ∂y ∂z ∂x
∇2 u(x, y , z, t) = 0.
fasshauer@iit.edu MATH 461 – Chapter 1 54
Derivation of the Heat Equation in 2D and 3D
Remark
Now the steady state equations are PDEs, and we need to
postpone their solution until later.
In 2D these equations look the same, except that we use the 2D
Laplacian
∂2u ∂2u
∇2 u = + .
∂x 2 ∂y 2
The Laplacian of u
∇2 u
plays a central role in the formulation of the heat equation.
We often have to deal with regions R that are better expressed in
cylindrical or spherical coordinates.
=⇒ need to convert the Laplacian to cylindrical and spherical
coordinates
Cylindrical Coordinates
x = r cos θ
y = r sin θ
z = z
y
p
These coordinates imply r = x 2 + y 2 and θ = tan−1 x and so
First calculate
∂u ∂u ∂r ∂u ∂θ
= +
∂x ∂r ∂x ∂θ ∂x
∂u 2x ∂u − xy2
= +
∂θ 1 + y 2
q
∂r
2 x2 + y2 | {z }x
| {z } −y −y
=r = =
x 2 +y 2 r2
∂u x ∂u y
−
=
∂r r ∂θ r 2
Using x = r cos θ and y = r sin θ we get
∂u ∂u sin θ ∂u
= cos θ −
∂x ∂r r ∂θ
and so the differential operator
∂ ∂ sin θ ∂
= cos θ −
∂x ∂r r ∂θ
Next, using ∂ ∂
= cos θ ∂r
∂x − sinr θ ∂θ
∂
three times we get
∂2u
∂ ∂u ∂ ∂u sin θ ∂ ∂u
= = cos θ −
∂x 2 ∂x ∂x ∂r ∂x r ∂θ ∂x
∂ ∂u sin θ ∂u sin θ ∂ ∂u sin θ ∂u
= cos θ cos θ − − cos θ −
∂r ∂r r ∂θ r ∂θ ∂r r ∂θ
2 2
Differentiation using the product rule along with ∂r∂∂θ = ∂θ∂r
∂
gives us
∂2u ∂ 2 u sin θ ∂u sin θ ∂ 2 u
= cos θ cos θ + 2 −
∂x 2 ∂r 2 r ∂θ r ∂r ∂θ
2 cos θ ∂u sin θ ∂ 2 u
sin θ ∂u ∂ u
− − sin θ + cos θ − −
r ∂r ∂r ∂θ r ∂θ r ∂θ2
Therefore
∂2u 2 ∂ u
2 sin θ cos θ ∂u sin θ cos θ ∂ 2 u
= cos θ + 2 − 2
∂x 2 ∂r 2 r2 ∂θ r ∂r ∂θ
2 2 2
sin θ ∂u sin θ ∂ u
+ +
r ∂r r 2 ∂θ2
fasshauer@iit.edu MATH 461 – Chapter 1 59
Derivation of the Heat Equation in 2D and 3D
We just calculated
∂2u ∂2u sin θ cos θ ∂u sin θ cos θ ∂ 2 u sin2 θ ∂u sin2 θ ∂ 2 u
2
= cos2 θ 2 + 2 2
−2 + + 2
∂x ∂r r ∂θ r ∂r ∂θ r ∂r r ∂θ2
Analogously
∂2u ∂2u sin θ cos θ ∂u sin θ cos θ ∂ 2 u cos2 θ ∂u cos2 θ ∂ 2 u
2
= sin2 θ 2 −2 2
+2 + +
∂y ∂r r ∂θ r ∂r ∂θ r ∂r r 2 ∂θ2
Therefore
∂2u ∂2u ∂2u
∇2 u = 2
+ 2
+
∂x ∂y ∂z 2
! !
∂2u sin2 θ cos2 θ ∂u sin2 θ cos2 θ ∂2u ∂2u
= cos2 θ + sin2 θ + + + + +
∂r 2 r r ∂r r2 r2 ∂θ2 ∂z 2
or
Laplacian in cylindrical coordinates:
∂ 2 u 1 ∂u 1 ∂2u ∂2u
∇2 u = + + +
∂r 2 r ∂r r 2 ∂θ2 ∂z 2
fasshauer@iit.edu MATH 461 – Chapter 1 60
Derivation of the Heat Equation in 2D and 3D
Spherical Coordinates
x = ρ sin ϕ cos θ
y = ρ sin ϕ sin θ
z = ρ cos ϕ
∂2u
2 1 ∂ 2 ∂u 1 ∂ ∂u 1
∇ u= 2 ρ + 2 sin ϕ +
ρ ∂ρ ∂ρ ρ sin ϕ ∂ϕ ∂ϕ ρ2 sin2 ϕ ∂θ2
fasshauer@iit.edu MATH 461 – Chapter 1 61
Derivation of the Heat Equation in 2D and 3D
Example
Let u(r , θ) denote the temperature, independent
of z, in a long rod parallel to the z-axis whose
cross-section in the xy -plane is given by the
circular sector 0 ≤ r ≤ 1, 0 ≤ θ ≤ π2 .
(a) Show
∂u ∂u ∂u
= −y +x
∂θ ∂x ∂y
(b) Use the result of (a) to show that if the rod is
insulated on its planar surfaces, where θ = 0
and θ = π2 , then u must satisfy the boundary
conditions
∂u ∂u π
(r , 0) = 0, (r , ) = 0, 0 < r < 1.
∂θ ∂θ 2
Solution
(a) We use polar coordinates
x = r cos θ, y = r sin θ
Then u(x, y ) = u(x(r , θ), y (r , θ)) and the chain rule gives
∂u ∂u ∂x ∂u ∂y
= +
∂θ ∂x ∂θ ∂y ∂θ
∂u ∂u
= (−r sin θ) + (r cos θ)
∂x ∂y
∂u ∂u
= −y +x
∂x ∂y
(b) Let n̂ be the unit outer normal vector and remember that insulated
means that
Fourier’s law
φ · n̂ = 0 ⇐⇒ −K0 ∇u · n̂ = 0
so that ∇u · n̂ = 0, where ∇u = (ux , uy ).
Face θ = 0: Here n̂ = (0, −1) (in cartesian coordinates). Therefore
∂u
∇u · n̂ = (ux , uy ) · (0, −1) = −
∂y
Now
∂u (a) ∂u ∂u
(r , 0) = −y (r , 0) (r , 0) + x(r , 0) (r , 0)
∂θ ∂x ∂y
∂u ∂u
= − r sin θ|θ=0 (r , 0) + r cos θ|θ=0 (r , 0)
| {z } ∂x ∂y
=0 | {z }
=0 (∇u·n̂=0)
Therefore
∂u
(r , 0) = 0.
∂θ
fasshauer@iit.edu MATH 461 – Chapter 1 64
Derivation of the Heat Equation in 2D and 3D
(b) (cont.)
Face θ = π2 : Here n̂ = (−1, 0) so that ∇u · n̂ = − ∂u
∂x .
Now
∂u π (a) π ∂u π π ∂u π
(r , ) = −y (r , ) (r , ) + x(r , ) (r , )
∂θ 2 2 ∂x 2 2 ∂y 2
π ∂u π π ∂u π
= −r sin (r , ) +r cos (r , )
2 |∂x {z 2 } | {z 2} ∂y 2
=0 (∇u·n̂=0) =0
Therefore
∂u π
(r , ) = 0.
∂θ 2
References I
R. Haberman.
Applied Partial Differential Equations.
Pearson (5th ed.), Upper Saddle River, NJ, 2012.
J. Stewart.
Calculus.
Cengage Learning (8th ed.), Boston, MA, 2015.