Unit 4
Unit 4
(EE3006/3006A)
• Example:
2 u ( x, t ) u ( x , t )
0
x 2 t
• Example:
u ( x , t ) u ( x , t )
i. The first-order PDE: 0
t x
2 u( x , t ) u ( x, t )
ii. The second-order PDE: 0
x 2 t
(EE3006/3006A)
Linear/Nonlinear PDEs:
=> A PDE is linear if it is linear in the unknown function and its
derivatives; Otherwise, it is called nonlinear PDE.
• Example of linear PDEs:
2u u u
2 3 4 0
x 2 t x
2u 2u 2u u
2 2 3 2 4 cos(2t ) 0
x xt t x
• Examples of nonlinear PDEs:
2 u xx u xt 3 utt 0 2 u ( x, t )
2
u xx
x 2
u xx 2 u xt 3 ut 0 u ( x, t )
2
u xt
x t
Homogeneous/Nonhomogeneous PDEs:
=> A PDE is homogeneous if each term of the equation contains either
unknown function or one of its partial derivatives; Otherwise, it is
called nonhomogeneous.
(EE3006/3006A)
Classification of PDEs
Classification is important because:
• Each category of PDEs usually relates to a specific kind of
engineering problem;
• Different approaches get used to solve different categories of
equations.
6
(EE3006/3006A)
o Parabolic type: B 2 4 AC 0
o Hyperbolic type: B 2 4 AC 0
(EE3006/3006A)
Important examples:
2 u ( x, y ) 2 u ( x, y )
• Laplace Equation: x 2
y 2
0
(Elliptic type) (B2-4AC=-4 < 0)
2 u ( x, t ) u ( x , t )
• Heat Equation : 0
(Parabolic type) x 2 t (B2-4AC=0)
• Wave Equation : 2u ( x, t ) 2 u ( x, t )
c2 0
(Hyperbolic type) x 2 t 2 (B2-4AC=4c2 > 0)
8
(EE3006/3006A)
Laplace’s equation
=> Laplace's equation is a second-order partial differential equation
named after Pierre-Simon Laplace:
u 0 or 2u 0
where ∆ = ∇² is the Laplace operator and u is a scalar function.
(Read as “nabla or del”)
(EE3006/3006A)
In Cartesian coordinates
2 u ( x, y ) 2u ( x, y )
2u 0, or
x 2 y 2
2 u ( x , y , z ) 2u ( x , y , z ) 2 u ( x , y , z )
2u 0
x 2 y 2 z 2 z
In spherical coordinates (x=r cosθ sinϕ; y=r sinθ sinϕ; z=z cosϕ)
1 2 u 1 u 1 2u
2u (r ) 2 (sin ) 2 2 0
r r
2
r r sin r sin 2
10
(EE3006/3006A)
Example:
Studying the distribution of heat T in a body:
2 T ( x, y ) 2 T ( x, y )
0 (Laplace equation)
x 2 y 2
2 T ( x, y ) 2 T ( x , y )
f ( x, y ) (Poisson’s equation: f ≠0)
x 2 y 2
A 1, B 0, C 1
B2 4 AC 4 0 Elliptic
11
(EE3006/3006A)
12
(EE3006/3006A)
Boundary conditions
=> to uniquely determine the solution of a PDE, a set of boundary
conditions are needed.
13
(EE3006/3006A)
T t=0 T ( x1 , t1 ) t T=5.2
t=1
t=2
T=2.6
t1
x x1 x
A group of curves Three-dimensional Mesh grid in which the
can be used to surface plot of the values of the function are
describe different function T(x, t) displayed at the grid
values of one of the points
two independent
variables
14
(EE3006/3006A)
Example:
Consider the heat distribution in a thin metal rod insulated everywhere
except at the two ends. At t=0, the rod is placed into ice liquid.
Heat Heat t
sink A sink B
0 1 x
2 T ( x, t ) T ( x , t ) region of
0 (Heat Equation) interest
x 2 t
T (0, t ) T (1, t ) 0
T ( x,0) T0 or T0 sin( x ) 0 1 x
(obtained by using e.g. the Method of Separation of
Variables with the boundary condition T(0, 0)=T(1,0)=0)
Dirichlet problem!
15
(EE3006/3006A)
Temperature at different x
when t=ti
(EE3006/3006A)
k
uxi,j+1
ij+1 h h
W E
ui,j
uxi-1,j
i-1, j uxi,jij uxi+1,j
uxi,j-1
i+1, j
k
i, j+1
S
j=2
j=1
(h, k are called as mesh size)
j=0 18
(EE3006/3006A)
(EE3006/3006A)
For the second derivatives, one can add (a) and (b), which results in
u ( x h, y ) u ( x h, y ) 2u ( x, y ) h 2u xx ( x, y ) .
Solving for uxx, one has
1
u xx ( x, y ) [u ( x h, y ) 2u ( x, y ) u (x h, y )]
h2
Similarly, one can obtain
1
u yy ( x, y ) [u ( x, y k ) 2u ( x, y ) u ( x, y k )]
k2
Thus, one has the discrete Poisson equation as
1 1 2( h 2 k 2 )
[ u ( x h , y ) u ( x h , y )] [ u ( x , y k ) u ( x , y k )] u( x , y ) f ( x, y )
h2 k2 h 2k 2
u ( E ) u ( N ) u (W ) u ( S ) 4u ( x, y ) h 2 f ( x, y ) h
which is a 5-point approximation of h22u
with the h h
W E
u(x, y)
coefficient scheme or stencil (also called as pattern
h
or star)
1
S
1 4 1
1
Then, equation (c) can be written as
1
1 u h f ( x, y )
2
1 4
1 21
(EE3006/3006A)
* Example 1:
The finite difference method is used to solve the two-dimensional equation:
2V 2V
2 g ( x ).
x 2 y 2
The below figure shows an unequally spaced mesh (i.e., h ≠ k) of points
which can be applied to curved or skewed boundaries. Derive the finite
difference formula of the above partial differential equation.
K
F H
G
y
x
C
22
(EE3006/3006A)
Solution:
Use VG, VF, VH, VK, VC to represent V(x, y), V(x-h, y) , V(x+h, y) , V(x, y+k) , V(x, y-k),
respectively. From Talyor series expansion, VF, VH, VK, VC can be written as
V h 2 2V
VF VG h G G ...
x 2 x 2
V h V
2 2
VH VG h G G ...
x 2 x 2
V k V
2 2
VC VG k G G ...
y 2 y 2
V k 2 2V
VK VG k G G ...
y 2 y 2
Thus, we have
2V 1 2V 1
G [VF VH 2VG ]; G [VC VK 2VG ]
x 2 h2 y 2 k2
Therefore,
2 1 2V 2V
(VF VH 2VG ) 2 (VC VK 2VG ) g ( xG) 2 g ( x ).
h2 k x 2 y 2
2 1 4 k 2 2h 2
2
(VF VH ) 2 (VC VK ) VG g ( xG) 23
h k h 2k 2
(EE3006/3006A)
1
1 4 1 u h 2 f ( x, y ).
1
1
ui ,( kj 1) ui(k1,) j ui(,kj)1 ui(k1,) j ui(,kj)1 h 2 fi ,( kj ) / 4
4
24
(EE3006/3006A)
Example 2:
The four sides of a square plate (of unit size) made of a homogeneous
material are kept at constant temperature 0 oC and 100 oC as shown in the
below figure. The steady state solution of heat equation is Txx+Tyy=0. Use
Liebmann’s method and 3×3 grids to find the steady-state temperature at the
mesh points. (use 100 oC as the guess values; iterate 6 times)
y
T=0
T=100 R T=100
T=100 x
25
(EE3006/3006A)
Solution:
Firstly, divide the region of interest into 3×3 grids. The known points
and unknown points can be listed:
i = 0, .. T1,3 0 T2,3 0
T1,2 T2,2
T0,2 100 T3,2 100
T1,1 T2,1
T0,1 100 T3,1 100
.
. Known points
j=0
T1,0 100 T2,0 100 Unknown points
26
(EE3006/3006A)
Continue:
For each unknown point, e.g., T1,2 , one can write a finite difference
equation:
T1,3 0 T2,3 0
T1,2 T2,2
T0,2 100
T1,1 T2,1
T0,1 100
(EE3006/3006A)
Continue:
The discrete system of equations can be obtained after write the finite
difference equations for all mesh points:
T1,1 => 4T1,1 T2,1 T1,2 200
T2,1 => T1,1 4T2,1 T2,2 200
T1,2 => T1,1 4T1,2 T2,2 100
T2,2 => T2,1 T1,2 4T2,2 100
28
(EE3006/3006A)
Continue:
Starting from the guess values, T1,1=100, T2,1=100, T1,2=100, T2,2=100,
one can calculate the equations through iterations:
k T1,1 T2,1 T1,2 T2,2
0 100 100 100 100
1 100 100 75 75
2 93.75 93.75 68.75 68.75
3 90.625 90.625 65.625 65.625
4 89.0625 89.0625 64.0625 64.0625
5 88.2813 88.2813 63.2813 63.2813
6 87.8906 87.8906 62.8907 62.8907
Remarks:
The exact solution of the system of equations is T1,1=T2,1=87.5, T1,2=T2,2=62.5.
29
(EE3006/3006A)
Example 3:
The four sides of a square plate (of unit size) made of a homogeneous
material are kept at constant temperature 0 oC and 100 oC as shown in the
followed figure. The steady state solution of heat equation is Txx+Tyy=0. Use
the accelerated Liebmann’s method and 3×3 grids to find the steady-state
temperature at the mesh points. (use 100 oC as the guess values; iterate 6
times)
y
T=0
T=100 R T=100
T=100 x 31
(EE3006/3006A)
Solution:
Firstly, divide the domain into 3×3 grids. The known points and
unknown points can be listed:
T1,3 0 T2,3 0
T1,2 T2,2
T0,2 100 T3,2 100
T1,1 T2,1
T0,1 100 T3,1 100
Known points
32
(EE3006/3006A)
Continue:
The discrete system of equations can be obtained after write the finite
difference equations for all mesh points:
T1,1 => 4T1,1 T2,1 T1,2 200
T2,1 => T1,1 4T2,1 T2,2 200
T1,2 => T1,1 4T1,2 T2,2 100
T2,2 => T2,1 T1,2 4T2,2 100
33
(EE3006/3006A)
Continue:
Starting from the guess values, T1,1=100, T2,1=100, T1,2=100, T2,2=100,
one can calculate the equations through iterations:
k T1,1 T2,1 T1,2 T2,2
0 100 100 100 100
1 100 100 75 68.75
2 93.75 90.625 65.625 64.0625
3 89.0625 88.2813 63.2813 62.8906
4 87.8906 87.6953 62.6953 62.5977
5 87.5977 87.5488 62.5488 62.5244
6 87.5244 87.5122 62.5122 62.5061
Remarks:
The exact solution of the system of equations is T1,1=T2,1=87.5, T1,2=T2,2=62.5;
The exact solution of the actual problem are 88.1 and 61.9, respectively.
34
(EE3006/3006A)
Classwork 4:
Q1. The four sides of a square plate (of unit size) made of a homogeneous material are
kept at the constant temperatures of 80, 100, 40 and 0 oC, respectively, as shown
in the following left figure. The steady state solution of heat equation is known as
Txx+Tyy=0. Use Liebmann’s method and 4×4 grids to find the steady-state
temperature at the mesh points. The initial guess values are provided in the
following figure on the right. (Repeat for 3 iterations)
y 100
75 62.5 50
75 62.5 50
80 T 40
75 62.5 50
(EE3006/3006A)
Reference:
( E. Kreyszig, Advanced Engineering Mathematics, Wiley International Edition,
2006)
36