You are on page 1of 33

Partial Differential Equation

PDEs
Differential Equation

There are two types of Differential Equation:

– Ordinary Differential Equation.


• The function has one independent variable

– Partial Differential Equation.


• The function has 2 or more variables
Linear 2nd Partial Differential Equations
Partial Differential Equation especially linear 2nd Partial
Differential Equation is often found in engineering
problems. Such equations are in the following form
2 f 2 f 2 f f f
A 2  2B C 2  D  E  F  f G  0
x xy y x y
B2-4AC Type Example
<0 Elliptic 2 f 2 f
 0
x 2 y 2

=0 Parabolic f C  2 f

x D y 2

>0 Hyperbolic 2 f C 2 f

x 2 A y 2
Initial and Boundary Conditions
Partial Differential Equation are normally associated
with initial and boundary conditions in order to obtain
unique solutions. The initial and boundary condition of
PDEs can be classified into 4 categories
• Dirichlet conditions
• Neumann conditions
• Cauchy conditions
• Robbins conditions
Boundary conditions
Dirichlet conditions
The values of the dependent variable are given at fixed
values of the independent variable
f ( x, y )  C
Neumann conditions
The derivative of the dependent variable are given at
fixed values of the independent variable (as a constant
or as a function of the independent variable)
f f
 C1 or  C2  g ( x , y )
x x, y y x, y
Boundary conditions
Cauchy conditions
conditions that combines both Dirichlet and Neumann
conditions

Robbins conditions
The derivative of the dependent variable are given at
fixed values of the independent variable as a function
of the dependent variable itself
f
 C  G( f )
x x, y
Elliptic Equations
Elliptic equations are typically used to characterize
steady-state boundary value problems. The classic
example of elliptic equations is “ The Laplace equation”
which describe steady state heat transfer. Such
equation is in the form of (3 dimensions)
 T  T  T
2 2 2
 2  2 0
x 2
y z
which always accompany with heat flux equation
T T T
qx  k x C q y  k y C qz  k z C
x y z
Elliptic Equations with Dirichlet B.C.
Consider a 2 dimension heat transfer on a square plate
 2T  2T
 2  0 , T (0, y )  75C , T (10, y )  50C
x 2
y
, T ( x,0)  10C , T ( x,10)  100C

Given boundary conditions can be graphically shown as


100C

75C 50C

10C
Elliptic Equations
Finite Difference Approach can be used to solve Elliptic
Equations (Centered Difference)
d T Ti 1  2Ti  Ti 1
2 d 2T T j 1  2T j  T j 1
 
dx 2
x 2 dy 2
y 2
can be substituted in the Laplace Equation for 2
dimensional heat transfer
Ti 1, j  2Ti , j  Ti 1, j Ti , j 1  2Ti , j  Ti. j 1
 0
x 2
y 2

if x  y Ti 1, j  Ti 1, j  Ti, j 1  Ti. j 1  4Ti, j  0


Elliptic Equations
Ti 1, j , Ti 1, j , Ti, j 1, Ti. j 1, Ti, j Can be graphically shown as

Ti , j 1
y

Ti 1, j Ti , j Ti 1, j
x

Ti , j 1
Elliptic Equations
The plate is then treated as a grid of discrete points
100C

T7 T8 T9

75C T4 T5 T6 50C

T1 T2 T3

10C
applying Ti 1, j  Ti 1, j  Ti, j 1  Ti. j 1  4Ti, j  0 to T1-T9
result in
75  T2  10  T4  4T1  0
T1  T3  10  T5  4T2  0
T2  50  10  T6  4T3  0
75  T5  T1  T7  4T4  0
T4  T6  T2  T8  4T5  0
T5  50  T3  T9  4T6  0
75  T8  T4  100  4T7  0
T7  T9  T5  100  4T8  0
T8  50  T6  100  4T9  0
thus Elliptic PDEs is then converted to a set of linear
equations
obtained equations can be written in Matrix form as
 4 1 0 1 0 0 0 0 0   T1    85 
 1 4 1 0 1 0 0 0 0  T    10 
  2   
0 1 4 0 0 1 0 0 0  T3    60 
    
1 0 0 4 1 0 1 0 0  T4    75 
0 1 0 1 4 1 0 1 0  T5    0 
    
0 0 1 0 1 4 0 0 1  T6    50 
0 0 0 1 0 0 4 1 0  T7    175
    
0 0 0 0 1 0 1  4 1  T8    100
0   T    150
 0 0 0 0 1 0 1 4  9   
Since the matrix is a diagonal matrix, Gauss Seidel
Iteration can be used to solve the problem efficiently
solving for T1 – T9
100C

79.3 77.1 70.4

75C 65.0 58.8 54.3 50C

47.1 38.5 38.2

10C
Elliptic Equations
as previous mentioned, there’re also heat flux
equations (2 dimension)
T T
qx  k x C q y  k y C
x y
Finite Difference can also be applied (Centered
Difference, assume kx = ky = k) results in

Ti 1, j  Ti 1, j Ti , j 1  Ti , j 1
qx  kC q y  kC
2x 2y
Elliptic Equations
for a given value of k y C , q x and q y can be calculate.
The resultant heat flux can be calculated

Total heat flux q  qx2  q 2y

1 
qy 
Direction   tan  
 qx 
solving for heat flux
100C

75C 50C

10C
Elliptic Equations with Cauchy B.C.
 2T  2T
 2  0 , T (0, y )  75C , T (10, y )  50C
x 2
y
T
, ( x,0)  10, T ( x,10)  100C
y
Given boundary conditions can be graphically shown as
100C

75C 50C

T
( x,0)  10
y
the problems can be solved as the problems with
Dirichlet B.C.. The only difference is there are 3 added
unknown at the insulation
100C

T7 T8 T9

75C T4 T5 T6 50C

T1 T2 T3

T10 T11 T12


T
( x,0)  10
y
at the Neumann boundary condition

T
qy   10 apply Centered Difference result in
y 0 y y 0

Ti ,1 T Ti ,1  Ti , 1
 0
y 2y

Ti 1,0 Ti ,0 Ti 1,0
T
Ti , 1  Ti ,1  2y
y
T Ti ,1
( x,0)  10
y
Imaginary point
Imaginary Point can be graphically shown as
100C

T7 T8 T9

75C T4 T5 T6 50C

T1 T2 T3

T10 T11 T12


T
( x,0)  10
y
Ta Tb Tc
apply Ti 1, j  Ti 1, j  Ti, j 1  Ti. j 1  4Ti, j  0 to every inner points
75  T2  T10  T4  4T1  0
T1  T3  T11  T5  4T2  0
T2  50  T12  T6  4T3  0
75  T5  T1  T7  4T4  0
T
T4  T6  T2  T8  4T5  0 apply Ti , 1  Ti ,1  2y
at y0
y
T5  50  T3  T9  4T6  0 to the last 3 equations
75  T8  T4  100  4T7  0
T7  T9  T5  100  4T8  0
T8  50  T6  100  4T9  0 T
75  T11  (T1  2y )  T1  4T10  0
y
75  T11  Ta  T1  4T10  0
T
T10  T12  Tb  T2  4T11  0 T10  T12  (T2  2y )  T2  4T11  0
y
T11  50  Tc  T3  4T12  0
T
T11  50  (T3  2y )  T3  4T12  0
y
Irregular Boundaries

 2 y

 2 x
1x

1y
Irregular Boundaries

 T  Ti , j 1  Ti , j
  
 y  j 1, j  2 y
 T  Ti , j  Ti 1, j
  
 x i 1,i 1x

 T  Ti 1, j  Ti , j
  
 2 y  x i ,i 1  2 x

1x  2 x
1y  T  Ti , j  Ti , j 1
  
 y  j , j 1 1y
Irregular Boundaries
second derivative can be derived from the first
derivative
 T   T 
    
 T
2
  T   x i ,i 1  x i 1,1
  
x 2
x  x  1x   2 x
2
 T   T 
    
 T   T   y  j 1, j  y  j , j 1
2
   
y 2
y  y  1y   2 y
2
Irregular Boundaries
collecting terms yields
T2
2  Ti 1, j  Ti , j Ti 1, j  Ti , j 
 2   
x x 1 (1   2 )  2 (1   2 ) 
2

T2
2  Ti , j 1  Ti , j Ti , j 1  Ti , j 
 2   
y y  1 ( 1   2 )  2 ( 1   2 ) 
2

which can be used instead of normal Centered


Difference, Example for Laplace equation resultsin
2  Ti 1, j  Ti , j Ti 1, j  Ti , j  2  Ti , j 1  Ti , j Ti , j 1  Ti , j 
      0
x 2 
 1 1(   2 )  2 ( 1   2 
) y 2
 1 ( 1   2 )  2 ( 1   2 ) 
Elliptic Equations with Irregular B.C.
 2T  2T
 2 0
x 2
y

Given boundary conditions


100C

50C

80C

50C
50C
100C

50C T7 T8 T9

T4 T5 T6 80C

T1 T2 T3
50C
50C

Centered Difference will be applied to T2 – T9


Equation for Irregular B.C. will be applied only for T1
Parabolic Equations
Parabolic equations are typically used to characterize
time-variables problems. Fourier’s Law of Heat
Conduction will be used as an example (1 dimension)

 2T T
k 2 
x t
Parabolic Equations
Finite Difference Approach can also be used to solve
Parabolic Equations (Centered Difference for spatial
variable and Forward Difference for time variable)
d 2T Ti l 1  2Ti l  Ti l 1 dT Ti l 1  Ti l
 
dx 2
(x) 2 dt t
substituted in the Parabolic Equation
Ti l 1  2Ti l  Ti l 1 Ti l 1  Ti l
k 
(x) 2
t
which can be solved for
kt
Ti l 1
 Ti 
l

(x) 2
T l
i 1  2Ti
l
 Ti 1 
l
Parabolic Equations
l l l l 1
T , Ti , T , Ti
i 1 i 1 Can be graphically shown as

l 1 l 1 l 1
T i 1 Ti Ti 1
t (time)

x (space)
l l l
T i 1 Ti T i 1
Implicit Method
Finite Difference Approach can also be used to solve
Parabolic Equations (Centered Difference for spatial
variable and Forward Difference for time variable)
d 2T Ti l 11  2Ti l 1  Ti l 11 dT Ti l 1  Ti l
 
dx 2
(x) 2 dt t
substituted in the Parabolic Equation
Ti l 11  2Ti l 1  Ti l 11 Ti l 1  Ti l
k 
(x) 2
t
which can be solved for
kt l 1  kt  l 1 kt l 1
Ti  
l
T  1  2
2 i 1
T 
2  i
T
2 i 1
(x)  (x)  (x)
Crank-Nicolson Method
Finite Difference Approach can also be used to solve
Parabolic Equations (Centered Difference for spatial
variable and Forward Difference for time variable)
d 2T 1  Ti l 1  2Ti l  Ti l 1 Ti l 11  2Ti l 1  Ti l 11  dT Ti l 1  Ti l
    
dx 2
2 (x) 2
(x) 2
 dt t
substituted in the Parabolic Equation
1  Ti l 1  2Ti l  Ti l 1 Ti l 11  2Ti l 1  Ti l 11  Ti l 1  Ti l
k   
2 (x) 2
(x) 2
 t
which can be solved for
kt l 1  kt  l 1 kt l 1 kt l 1  kt  l 1 kt l 1
2 i 1

T  21  T 
2  i
T 
2 i 1

T  21 
2 i 1
T 
2  i
T
2 i 1
(x)  (x)  (x) (x)  (x)  (x)