You are on page 1of 29

Heat (or Diffusion) equation in 1D*

Derivation of the 1D heat equation


Separation of variables (refresher)
Worked examples
*Kreysig, 8
th
Edn, Sections 11.4b
Physical assumptions
We consider temperature in a long thin
wire of constant cross section and
homogeneous material
The wire is perfectly insulated laterally, so
heat flows only along the wire
insulation
heat flow
Derivation of the heat equation in 1D
) , ( t x u t x
A
K
by time at point at e temperatur the Denote
is area sectional Cross
is material the of density The
is heat specific The
is wire the in ty conductivi thermal the that Suppose

x
x x +
x
x
u
KA
x
u
KA x x
x
u
KA x
x x
x

2
2
:

+
: : is out flow net the So
: face the At
at face across bar into flow Heat
x
t
u
A x
x
u
KA

2
2

: gives heat of on Conservati

K
c
x
u
c
t
u
=

2
2
2
2
where ,
Boundary and Initial Conditions
0 ) , ( ) , 0 ( = = t L u t u
As a first example, we will assume that the perfectly insulated rod is of finite
length L and has its ends maintained at zero temperature.
0 ) ( ) 0 (
) ( ) 0 , (
) (
= =
=
L f f
x f x u
x f
: conditions boundary the from Evidently,
: condition initial the have we
, by given is rod the in on distributi e temperatur initial the If
Solution by Separation of Variables
1. Convert the PDE into two separate
ODEs
2. Solve the two (well known) ODEs
3. Compose the solutions to the two ODEs
into a solution of the original PDE
This again uses Fourier series
The first step is to assume that the function of two variables has a very
special form: the product of two separate functions, each of one variable,
that is:
Step 1: PDE 2 ODEs
) ( ) ( ) , ( t G x F t x u = : that Assume
2
2
2
2
' '
' '
dx
F d
F
dt
dG
G
G F
x
u
G F
t
u
= =
=

and where


: find we ating, Differenti
&
&
G F c G F ' '
2
=
&
k
F
F
G c
G
= =
' '
2
&
So that
equivalently
0
0 ' '
2
=
=
G kc G
kF F
&
The two (homogeneous) ODEs are:
Step 2a: solving for F*
0 ' ' = kF F
0
0
0
) (
0
2
= =
= +
= +
+ =
> =

B A
Be Ae
B A
Be Ae x F
k
L L
x x
so and


conditions boundary the ng Applyi

: is solution general the case

0
) (
: 0
= =
+ =
=
b a
b ax x F
k
: conditions boundary the Applying

case
0 sin , 0 sin ) (
0 ) 0 (
sin cos ) (
: 0
2
= = =
= =
+ =
< =
pL pL B L F
A F
px B px A x F
p k
so and

find we , conditions boundary the ng Applyi

is solution the case
We have to solve:
x
L
n x F
L
n p
n pL
n

sin ) ( =
=
=

that so

: is that
2
p k = is interest of case only the that follows It
* This analysis is identical to the Wave Equation case we studied earlier
Step 2b: solving for G
L
c
n
L
n p
n

= = denote we equation, wave the for as and, ,


t
n n
n
n
e B t G
G G
2
) (
0
2

=
= +
: is solution general whose
have We
&
Step 2c: combining F&G


=

=
= =
1 1
sin ) , ( ) , (
2
n
t
n
n
n
x
L
n e B t x u t x u
n


: is equation diffusion 1D the to solution The
) ( sin ) 0 , (
1
x f x
L
n B x u
n
n
= =

: condition Initial

=
L
n
xdx
L
n x f
L
B
0
sin ) (
2
: find we equation, wave the for As
Analysing the solution
x
L
n e t x u
t x u B t x u
t
n
n
n n
n

sin ) , (
) , ( ) , (
2
1

=
=
=


where

: as written be can equation diffusion 1D the to solution The

=
= =
L
n
n
n
n
xdx
L
n x f
L
B
B
t L u t u
c L
u
t x u
0
sin ) (
2
0 ) , ( ) , 0 (
,
) , (


since , conditions initial the by determined are weights The (2)
and case; this in
conditions boundary the and ) constants the is, (that
problem generic the by determined completely are functions The (1)
where
functions of sum weighted a is solution the that emphasises This
We now take a closer look at the functions u
n
Sine term
x
L
n

sin : term sine the first Consider


Evidently, the higher the
value of n the higher the
frequency component of
f(x) that is analysed
Exponential term
0011 . 0
158 . 1 100
2
2
1
2
2
=

=
= =

L
c
c L
e
t
L
nc

Then
later) slides 2 (see and that Suppose
: term l exponentia the next Consider
Gabor functions
Gaussian a ...
is term the then and denote
is term l exponentia The
2
2
2
,

s
n
t
L
nc
e
nc
L
s t
e

= =
optics and processing signal to l fundamenta are and functions Gabor called are These
term. sine a by multiplied Gaussian a
with work to have we of instead consider we if so ) , ( ) , ( t x s x
Denis Gabor (born Budapest 1900, died London 1979).
Left Berlin for London during the 1930s. Eventually
professor of electronics at Imperial College. Credited
with invention of the hologram in 1947. Awarded the
Nobel prize for physics in 1971
This appears to be a short burst of sine wave in a
Gaussian shaped envelope. This is fundamental to
AM/FM communications and to wavelets
Recall the solution


=

=
= =
1 1
sin ) , ( ) , (
2
n
t
n
n
n
x
L
n e B t x u t x u
n


: is equation diffusion 1D the to solution The
) ( sin ) 0 , (
1
x f x
L
n B x u
n
n
= =

: condition Initial

=
L
n
xdx
L
n x f
L
B
0
sin ) (
2
: find we equation, wave the for As
Example 1*
x x f
80
sin 100 ) (

= : conditions initial Sinusoidal
cms 80 : bar the of Length
0 ... , 100
80
sin 100 ) (
80
sin ) 0 , (
3 2 1
1
= = = =
= = =

=
B B B
x x f x n B x u
n
n

x e t x u
K
c
K
t
80
sin 100 ) , (
001758 . 0
6400
870 . 9
158 . 1
sec / 158 . 1
92 . 8 092 . 0
95 . 0
092 . 0
92 . 8
95 . 0
001785 . 0
2
1
2

=
= =
=

= =
=
=
=


cm
so
C) cal/(gm
gm/cm
C) sec cal/(cm : Copper
2
o
3
o
*Kreysig, 8
th
Edn, page 603
min 5 . 6 388 50
:
= = = s t 100e
50 to reduce to e temperatur maximum the for required time
0.001785t -
o
Example 2
0
) 0 , ( T x u = : condition Initial
Somewhat more realistically, we assume that the bar is initially entirely at a
constant temperature, then at time t=0, it is insulated and quenched, that is,
the temperatures at its two ends instantly reduce to zero.

> = =
t t x u
t t L u t u
as
all for
: conditions Boundary
, 0 ) , (
0 , 0 ) , ( ) , 0 (
Solution


=

=
= =
1 1
sin ) , ( ) , (
2
n
t
n
n
n
x
L
n e B t x u t x u
n


: is equation diffusion 1D the to solution the that Recall
0
1
) ( sin ) 0 , ( T x f x
L
n B x u
n
n
= = =

: condition Initial

=
=
=

0
0
0
0
0
sin
2
sin
2
sin ) (
2
d n
T
xdx
L
n
L
T
B
xdx
L
n x f
L
B
L
n
L
n


: find we equation, wave the for As
Solving for
n
B
) 1 2 (
2
) 1 2 (
0 2
cos
sin
0
0

=
=

m
m n
m n
n
n
d n
equals it odd, is if
is this then even, is if
Evidently,

=
1
) 1 2 (
0
) 1 2 sin(
2
) 1 2 (
2
) , (
2
m
t
L
c m
x
L
m e
T
m
t x u

find we so, and


Changing the initial condition
L
x
T
T
o
All the other boundary conditions remain the same:
0 ) , ( t x u t
(must eventually cool down to zero)
u(0,t) = 0 for all t > 0
u(L,t) = 0 for all t > 0
(quenched at both ends)



=
L x
L
x L
L
T
L
x x
L
T
x f
2
) (
2
2
0
2
) (
0
0
if
if
initially that Suppose
Solution


=

=
= =
1 1
sin ) , ( ) , (
2
n
t
n
n
n
x
L
n e B t x u t x u
n


: is equation diffusion 1D the to solution the that Recall
) ( sin ) 0 , (
1
x f x
L
n B x u
n
n
= =

: condition Initial
We have to solve for the coefficients using Fourier series.
Instead of orthogonality, we consult HLT
f()

A
-A
/2

which is
.....) 3 cos
9
1
(cos
A 8
) ( f
2
+ + =

Lets shift this by /2 in the direction: =-/2 to give:


/2
.....) ) 2 ( 3 cos
9
1
) 2 (cos(
A 8
) 2 ( f ) ( g
2
+ + + + = + =

=
+ + =
1 n
n
2
n sin B .....) 3 sin
9
1
(sin
A 8

g()
A
-A

This is now what we need between


0 < < with =

So,
2 2
0
n
) 1 n 2 (
T 8
B

and the final solution for this problem is

=
2
2 2
2 2
0
1
) 1 2 (
exp
) 1 2 (
sin
) 1 2 (
8
) , (
L
t n k
L
x n
n
T
t x T
n

Compare this with our previous example of constant


initial temperature distribution:

=
2
2 2
0
1
) 1 2 (
exp
) 1 2 (
sin
) 1 2 (
4
) , (
L
t n k
L
x n
n
T
t x T
n

Derivation from electrostatics: the Telegraph Equation


x
I(x)
V(x)
Rx
I(x+x)
V(x+x)
Cx
R: Resistance per unit length
C: Capacitance per unit length
( ) ( )
t
V
x C x I x x I

= +
: find we , From
t
V
C I

=
( ) ( ) x IR x V x x V = +
Ohms law:
( ) ( ) x
x
I
x I x x I

+ = +
( ) ( ) x
x
V
x V x x V

+ = +
t
V
C
x
I

RI
x
V
=

We find
t
V
RC
x
V
2
2

The diffusion
equation
Example from electrostatics
0 , 0 ) , (
0 , ) , 0 (
0
> =
> =
t t L u
t V t u
all
all
: conditions Boundary
L x x u = 0 , 0 ) 0 , ( for
: conditions Initial
Initially, a uniform conductor has zero potential throughout. One end (x=0) is
then subjected to constant potential V
0
while the other end (x=L) is held at zero
potential. What is the transient potential distribution?
We again use separation of variables; but we need to start from scratch
because so far we have assumed that the boundary conditions were
0 ) , ( ) , 0 ( = = t L u t u
but this is not the case here.
We now retrace the steps for the original solution to the heat equation,
noting the differences
The first step is to assume that the function of two variables has a very
special form: the product of two separate functions, each of one variable,
that is:
Step 1: PDE 2 ODEs
) ( ) ( ) , ( t G x F t x u = : that Assume
2
2
2
2
' '
' '
dx
F d
F
dt
dG
G
G F
x
u
G F
t
u
= =
=

and where


: find we ating, Differenti
&
&
G F c G F ' '
2
=
&
k
F
F
G c
G
= =
' '
2
&
So that
equivalently
0
0 ' '
2
=
=
G kc G
kF F
&
The two (homogeneous) ODEs are:
No change here!!
Step 2a: solving for F&G .. k0
0 ' ' = kF F
before as which from that so
: is solution general the case
0 0 ) 0 ( ) ( ) 0 , (
) ( 0
2
= = = =
+ = > =

B A G x F x u
Be Ae x F k
x x

=
= + = =
= =
+ =
=
L
x
V x F
L
V
a b aL L F
b V F
b ax x F
k
1 ) (
, 0 ) (
) 0 (
) (
: 0
0
0
0
that so
so

: conditions boundary the Applying

case
We have to solve:
(ignore) constant is that so , have we Since G G k 0 , 0 = =
&
Step 2b: Solving for F&G k<0
0 sin , 0 sin ) (
0 ) 0 (
sin cos ) (
: 0
2
= = =
= =
+ =
< =
pL pL B L F
A F
px B px A x F
p k
so and

find we , conditions boundary the ng Applyi

is solution the case
x
L
n x F
L
n p
n pL
n

sin ) ( =
=
=

that so

: is that
L
c
n
L
n p
n

= = denote we before, as and, ,


t
n n
n
n
e B t G
G G
2
) (
0
2

=
= +
: is solution general whose
have We
&
This case is as before
Step 2c: combining F&G

=
1
0
sin 1 ) , (
2
n
t
n
x
L
n e B
L
x
V t x u
n


: is equation diffusion 1D the to solution the case, this In

=
= +

=
1
0
0
0
0
0
0
0
1
0
sin
1 2
1 ) , (
1
.
2
sin 1
2
sin 1
2
0 sin 1 ) 0 , (
2
n
t
L
n
n
n
x
L
n e
n
V
L
x
V t x u
n
V
d n
V
xdx
L
n
L
x
V
L
B
x
L
n B
L
x
V x u
n

: is Solution
list) earlier on last to next HLT use (or parts) (by which


that so
: condition Initial

You might also like