Professional Documents
Culture Documents
Heat (Or Diffusion) Equation in 1D
Heat (Or Diffusion) Equation in 1D
heat flow
Derivation of the heat equation in 1D
x x + δx
Suppose that the thermal conductivi ty in the wire is K
The specific heat is σ
The density of the material is ρ
Cross sectional area is A
Denote the temperatur e at point x at time t by u ( x, t )
∂u
Heat flow into bar across face at x : − KA
∂x x Conservati on of heat gives :
∂u ∂ 2u ∂u
At the face x + δx : KA KA 2 δx = σρA δx
∂x x +δx ∂x ∂t
∂ 2u
So the net flow out is : : KA 2 δx
∂x
∂u 2 ∂ u
2
K
=c , where c 2
=
∂t ∂x 2 σρ
Boundary and Initial Conditions
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.
u (0, t ) = u ( L, t ) = 0
If the initial temperatur e distribution in the rod is given by f ( x),
we have the initial condition : u ( x,0) = f ( x)
Evidently, from the boundary conditions : f (0) = f ( L) = 0
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
Step 1: PDE Î 2 ODEs
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: Assume that : u ( x, t ) = F ( x)G (t )
Differentiating, we find :
∂u
= FG&
∂t So that FG& = c 2 F ' ' G
∂ 2u
= F ''G
∂x 2
G& F''
dG d 2
F
equivalently
2
= =k
&
where G = and F ' ' = 2 cG F
dt dx
∞ ∞
π
u ( x, t ) = ∑ un ( x, t ) =∑ Bn e − λ2n t
sin n x
n =1 n =1 L
∞
π
Initial condition : u ( x,0) = ∑ Bn sin n x = f ( x)
n =1 L
2 π L
As for the wave equation, we find : Bn = ∫ f ( x) sin n xdx
L0 L
Analysing the solution
The solution to the 1D diffusion equation can be written as :
∞
u ( x, t ) = ∑ Bnun ( x, t )
n =1
where
π
u n ( x, t ) = e −λnt sin n
2
x
L
This emphasises that the solution is a weighted sum of functions un ( x, t )
where
(1) The functions un are completely determined by the generic problem
(that is, the constants L, c ) and the boundary conditions
u (0, t ) = u ( L, t ) = 0 in this case; and
(2) The weights Bn are determined by the initial conditions, since
2
L
π
Bn = ∫ f ( x) sin n xdx
L0 L
Then λ = ⎜ ⎟ = 0.0011
2
1
⎝ L ⎠
Gabor functions
⎛ ncπ ⎞
2
−⎜ ⎟ t
⎝ L ⎠
The exponential term is e
⎛ L ⎞
denote t = s and σ n = ⎜ ⎟, then the term is
⎝ ncπ ⎠
s2
−
σ2
e ... a Gaussian
so if we consider ( x, s) instead of ( x, t ) we have to work with
a Gaussian multiplied by a sine term.
These are called Gabor functions and are fundamental to signal processingand optics
∞ ∞
π
u ( x, t ) = ∑ un ( x, t ) =∑ Bn e − λ2n t
sin n x
n =1 n =1 L
∞
π
Initial condition : u ( x,0) = ∑ Bn sin n x = f ( x)
n =1 L
2 π L
As for the wave equation, we find : Bn = ∫ f ( x) sin n xdx
L0 L
Example 1*
∞
π π
Length of the bar :80 cms u ( x,0) = ∑ Bn sin n x = f ( x) = 100 sin x
π n =1 80 80
Sinusoidal initial conditions : f ( x) = 100 sin x
80 B1 = 100, B2 = B3 = ... = 0
Copper : K = 0.95 cal/(cm sec o C)
ρ = 8.92 gm/cm 3
σ = 0.092 cal/(gm o C)
so
K 0.95
c2 = = = 1.158 cm2 / sec
ρσ 0.092 ⋅ 8.92
9.870
λ12 = 1.158 = 0.001758
6400
π
u ( x, t ) = 100e −0.001785t sin x
80
Boundary conditions :
u (0, t ) = u ( L, t ) = 0, for all t > 0
u ( x, t ) → 0, as t → ∞
Solution
Recall that the solution to the 1D diffusion equation is :
∞ ∞
π
u ( x, t ) = ∑ un ( x, t ) =∑ Bn e − λ2n t
sin n x
n =1 n =1 L
∞
π
Initial condition : u ( x,0) = ∑ Bn sin n x = f ( x) = T0
n =1 L
2 π L
As for the wave equation, we find : Bn = ∫ f ( x) sin n xdx
L0 L
2T0 π L
Bn =
L 0∫ sin n xdx
L
π
2T0
=
π ∫ sin nθdθ
0
Solving for Bn
π
π ⎡ cos nθ ⎤
Evidently, ∫0 sin n θdθ = ⎢⎣− n ⎥⎦
0
⎛ ( 2 m −1) cπ ⎞
2
∞
2 2T −⎜ ⎟ t π
and so, we find u ( x, t ) = ∑ ⋅ 0e ⎝ L ⎠
sin( 2m − 1) x
m =1 ( 2m − 1) π L
Changing the initial condition
T
To
⎧ 2T0 L
L
⎪ x if 0 ≤ x ≤
Suppose that initially f ( x) = ⎨ L 2
2T L
⎪ 0 ( L − x) if ≤ x ≤ L
⎩ L 2
∞ ∞
π
u ( x, t ) = ∑ un ( x, t ) =∑ Bn e − λ2n t
sin n x
n =1 n =1 L
∞
π
Initial condition : u ( x,0) = ∑ Bn sin n x = f ( x)
n =1 L
π
π/2 θ
-A
8A 1
g( θ ) = f ( θ + π 2 ) = (cos( θ + π 2 ) + cos 3( θ + π 2 ) + .....)
π 2
9
∞
8A 1
= 2 (sin θ + sin 3θ + .....) ≡ ∑ Bn sin nθ
π 9 n =1
8T0
So, Bn = 2
π ( 2 n − 1 )2
∞
8T0 (2n − 1)πx ⎛ k (2n − 1) 2 π 2t ⎞
T ( x, t ) = ∑ sin exp − ⎜⎜ ⎟⎟
n =1 (2n − 1) π
2 2
L ⎝ L 2
⎠
∞
4T0 (2n − 1)πx ⎛ k (2n − 1) 2 π 2t ⎞
T ( x, t ) = ∑ sin exp − ⎜⎜ ⎟⎟
n =1 (2n − 1)π L ⎝ L 2
⎠
Derivation from electrostatics: the ‘Telegraph Equation’
I(x) Rδx R: Resistance per unit length
I(x+δx)
C: Capacitance per unit length
∂I
Cδx I ( x + δx ) = I ( x ) + δx
V(x) V(x+δx) ∂x
∂V
V ( x + δx ) = V ( x ) + δx
δx ∂x
∂V
From I = C , we find :
Ohm’s law: ∂t
∂V
V ( x + δx ) − V ( x ) = − IRδx I ( x + δ x ) − I ( x ) = − Cδ x
∂t
∂I ∂V
− =C
∂x ∂t ∂ 2V ∂V The diffusion
We find = RC
∂V ∂x 2
∂t equation
− = RI
∂x
Example from electrostatics
Initially, a uniform conductor has zero potential throughout. One end (x=0) is
then subjected to constant potential V0 while the other end (x=L) is held at zero
potential. What is the transient potential distribution?
Initial conditions :
u ( x,0) = 0, for 0 ≤ x ≤ L
Boundary conditions :
u (0, t ) = V0 , all t > 0
u ( L, t ) = 0, all t > 0
We now retrace the steps for the original solution to the heat equation,
noting the differences
Step 1: PDE Î 2 ODEs
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: Assume that : u ( x, t ) = F ( x)G (t )
Differentiating, we find :
∂u
= FG&
∂t So that FG& = c 2 F ' ' G
∂ 2u
= F ''G
∂x 2
G& F''
dG d 2
F
equivalently
2
= =k
&
where G = and F ' ' = 2 cG F
dt dx
⎛ x⎞ ∞ π
u ( x, t ) = V0 ⎜1 − ⎟ + ∑ Bn e −λnt sin n x
2
⎝ L ⎠ n =1 L
⎛ x⎞ ∞ π
Initial condition : u ( x,0) = V0 ⎜1 − ⎟ + ∑ Bn sin n x = 0
⎝ L ⎠ n =1 L
so that
2 L ⎛ x⎞ π
L ∫0
Bn = − V0 ⎜ 1 − ⎟ sin n xdx
⎝ L⎠ L
π
− 2V0 ⎛ θ ⎞
π ∫0 ⎝ π ⎠
= ⎜1 − ⎟ sin nθdθ
− 2V0 1
which (by parts) = . (or use HLT next to last on earlier list)
π n
⎛ x ⎞ 2V0 ∞ 1 −λ2nt π
Solution is : u ( x, t ) = V0 ⎜1 − ⎟ −
⎝ L ⎠ π n =1 n
∑ e sin n x
L