0% found this document useful (0 votes)
8 views

Unit 4

The document provides an overview of Partial Differential Equations (PDEs), including their basic concepts, classifications, and examples such as the Laplace, Heat, and Wave equations. It discusses solution methods, particularly the Finite Difference Method for solving Laplace’s and Poisson’s equations, and emphasizes the importance of boundary conditions. Additionally, it outlines the classification of PDEs into linear, nonlinear, homogeneous, and nonhomogeneous types, and their relevance in engineering problems.

Uploaded by

Lap Sang Ho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Unit 4

The document provides an overview of Partial Differential Equations (PDEs), including their basic concepts, classifications, and examples such as the Laplace, Heat, and Wave equations. It discusses solution methods, particularly the Finite Difference Method for solving Laplace’s and Poisson’s equations, and emphasizes the importance of boundary conditions. Additionally, it outlines the classification of PDEs into linear, nonlinear, homogeneous, and nonhomogeneous types, and their relevance in engineering problems.

Uploaded by

Lap Sang Ho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

(EE3006/3006A)

Unit 4. Partial Differential Equations


1. Partial differential equations (PDEs)
• Basic concepts
• Examples of second-order PDEs
• Solution methods for PDEs
2. Finite difference method
(for Laplace’s and Poisson’s equations)
• Finite difference formula
• Liebmann’s method
• Accelerated Liebmann’s method
1

(EE3006/3006A)

1. Partial Differential Equations (PDEs)


1.1 Basic concepts
=> A partial differential equation (PDE) is an equation involving
one or more partial derivatives of an unknown function, e.g., u, that
depends on two or more independent variables.

• Example:
 2 u ( x, t )  u ( x , t )
 0
x 2 t

 Only some simple physical systems can be modeled by ODEs, while


most engineering problems in e.g., heat transfer, electromagnetic
theory, elasticity, and quantum mechanics require PDE.
2
(EE3006/3006A)

 The Order of a PDE


=> the order of the highest-order derivative in a PDE

• 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

 Second-order PDEs are the most important ones in various


engineering problems.

(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 xt 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

 A PDE is called quasilinear if it is linear in the highest derivative.


4
(EE3006/3006A)

 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.

• Example of a homogeneous PDE:


 2u 2  u
2
 c
t 2 x 2
• Example of a nonhomogeneous PDE:
 2u u
  sin(3 x )
x 2  t

(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.

 Linear and quasilinear second-order PDEs are important sets of


equations that are used to model many systems in many different
fields of science and engineering.

6
(EE3006/3006A)

 Linear and quasilinear second-order PDEs


• A second-order quasilinear PDE with two independent variables x
and y is of the form:
Au xx  Bu xy  Cu yy  f ( x, y, u, u x , u y )
where u is an unknown function of x and y, f is a given function of the
indicated variables.

• Depending on the discriminant B2 - 4AC, the PDE is classified as:


o Elliptic type: B 2  4 AC  0

o Parabolic type: B 2  4 AC  0

o Hyperbolic type: B 2  4 AC  0

(EE3006/3006A)

1.2 Examples of second-order PDEs


=> PDEs are used to model many systems in different fields of
science and engineering.

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”)

 Widely used to describe the steady state distribution of heat in a body


and the steady state distribution of electric charges in an object.
 The general theory of solutions to Laplace's equation is known as
potential theory.

(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 cylindrical coordinates (x=r cosθ; y=r sinθ; z=z)


1  u 1  2u  2u
 2u  (r )  2  0
r r r r  2 z 2

 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

further include heat source or heat sink: f (x, y)

 2 T ( x, y )  2 T ( x , y )
  f ( x, y ) (Poisson’s equation: f ≠0)
x 2 y 2

T : steady state temperature at the point (x, y)

A  1, B  0, C  1
B2  4 AC  4  0 Elliptic

11

(EE3006/3006A)

1.3 Solution methods for PDEs


i. Analytic solutions, which are usually possible for some simple and
special (idealized) cases only.
(e.g., Method of separation of variables, Laplace transformation, …)

ii. According to the nature of the equations, various numerical methods


can be used to solve different classes of PDEs:

 Finite element method (FEM)

 Finite difference method (FDM)

12
(EE3006/3006A)

 Boundary conditions
=> to uniquely determine the solution of a PDE, a set of boundary
conditions are needed.

• Dirichlet: u provided along all edges;

• Neumann: ∂u/ ∂n (derivative in normal direction) provided


along all edges;

• Mixed: u provided for some of the edges and


∂u/ ∂n for the remainder of the edges.

13

(EE3006/3006A)

 Three approaches to represent the solution:

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)

• Solve the heat equation


Different curves are used
for different values of t

Heat Heat Temperature Temperature at


sink A sink B T different x when t=0
x
 T ( x, t )  T ( x, t )
2
 0
x 2 t
T (0, t )  T (1, t )  0
T ( x,0)  T0 sin( x )
Position x

Temperature at different x
when t=ti

=> How to numerically find the solutions?


16
(EE3006/3006A)

2. Finite Difference Method


(for Laplace’s and Poisson’s equations)
=> Strategy of the method:
1) Divide the region of interest into mesh grids, e.g., divide the range
along x into (n+1) sub-intervals, each of width h, and divide the range
along y into (m+1) sub-intervals, each of width k;
y h
2) Replace the derivatives by using
k
finite difference formulas; m

3) With the boundary conditions,


write out n×m equations for 1

u(xi=1:n, yj=1:m) or n×m unknowns; x


1 n

4) Solve this banded system by using a numerical scheme.


17

(EE3006/3006A)

2.1 Finite difference formula


The Poisson’s equation (or Laplace’s equation when f=0 ) is:
 2 u( x, y)  2 u( x, y)
  f ( x, y)
x 2 y 2
i = 0, 1, 2 N

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)

Taylor’s expansion for a function f (x) at x0+h (around x0) is:


f '( x0 ) f (2) ( x0 ) 2 f ( n ) ( x0 ) n
f ( x0  h)  f ( x0 )  h h  ...  h  O (h n 1 )
1! 2! n!
Thus, the function u at the points of E and W can be written as
1 1
u ( x  h, y )  u ( x, y )  hu x ( x, y )  h 2u xx ( x , y )  h 3u xxx (x, y )  (a)
2 6
1 2 1 3
u ( x  h, y )  u ( x , y )  hu x ( x , y )  h u xx ( x , y )  h u xxx (x, y )   (b)
2 6
Subtracting (b) from (a), one can obtain the first derivative ux(x, y):
1
u x ( x, y )  [u ( x  h, y)  u ( x  h, y )]
2h
Similarly, one can obtain (centered difference approximation)
1
u y ( x, y )  [u ( x, y  k )  u ( x, y  k )]
2k
19

(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

Finite Difference Formula


20
(EE3006/3006A)

If let h=k, the discrete Poisson equation becomes


u ( x  h, y )  u ( x, y  h)  u (x  h, y )  u (x, y  h)  4u ( x, y )  h 2 f ( x, y ) (c)

It can also be rewritten as: N

u ( E )  u ( N )  u (W )  u ( S )  4u ( x, y )  h 2 f ( x, y ) h
which is a 5-point approximation of h22u
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)

2.2 Liebmann’s method


1) Set up an equation for each unknown point by using finite
difference formula.
2) Incorporate boundary conditions to create the banded system of
equations.
3) Solve the system of equations by Gauss-Seidel iteration scheme.
=> for Laplace’s and Poisson’s equations

 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

T0,2  T1,3  T1,1  T2,2  4T1,2  0

100  0  T1,1  T2,2  4T1,2  0


27

(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

Then, the iteration formula can be obtained as:


T1,1(k 1)  0.25T2,1(k ) 0.25T1,2(k ) 50
( k 1)
T2,1  0.25T1,1( k ) 0.25T2,2(k ) 50
T1,2(k 1)  0.25T1,1( k ) 0.25T2,2(k ) 25
( k 1)
T2,2  0.25T2,1(k ) 0.25T1,2(k ) 25

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)

2.3 Accelerated Liebmann’s method


1) Set up an equation for each unknown point by using finite
difference formula.
2) Incorporate boundary conditions to create the banded system of
equations.
3) Solve the system of equations by using Gauss-Seidel iteration scheme
with a recursive method.
=> for Laplace’s and Poisson’s equations
 1 
 
1  4 1 u  h 2 f ( x, y ).
 1 
 
1
ui ,( kj 1)  ui(k1,1)j  ui(k1,) j  ui(,kj1)1  ui(,kj)1   h 2 f i,( kj ) / 4
4
30
(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

T1,0 100 T2,0 100 To be determined 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

Then, the iteration formula can be obtained as:

T1,1( k 1)  0.25T2,1( k ) 0.25T1,2 ( k ) 50


( k 1)
T2,1  0.25T1,1( k 1) 0.25T2,2 ( k ) 50
T1,2( k 1)  0.25T1,1( k 1) 0.25T2,2 ( k ) 25
( k 1) ( k 1) ( k 1)
T 2,2  0.25T 2,1 0.25T1,2 25

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

0 x (initial guess values)


35

(EE3006/3006A)

Reference:
( E. Kreyszig, Advanced Engineering Mathematics, Wiley International Edition,
2006)

1. Partial Differential Equations (pp. 535)


2. Methods for Elliptic PDEs (pp. 909)

36

You might also like