Lecture2 PDF
Lecture2 PDF
c p
T
2T
2T
2T
2
k(
T q
2
2
2
t
x
y
z
Numerical Methods
Due to the increasing complexities encountered in the development
f(x+h/2)
f'(x)
f(x-h/2)
x-h
x-h/2
x+h/2
x+h
f ( x h / 2) f ( x h / 2)
f ' ( x)
h
f ' ' ( x)
f ( x h) 2 f ( x ) f ( x h)
h2
m,n+1
Dx
m-1,n
Dy
m,n
m+1, n
m,n
m,n-1
m-,n
m+,n
Discretization of differential
equation
Take the example of heat diffusion equation:
q 1 T
2
T
k t
k
where
is thermal diffusivity, and q is the heat generation.
C p
Assuming steady state and no heat generation, 2T 0
The 1st order differential at intermediate points (m+1/2,n) & (m-1/2,n)
T
x
T
x
( m 12 , n )
( m 12 , n )
DT
Dx
DT
Dx
( m 12 , n )
( m 12 , n )
Tm 1,n Tm,n
Dx
Tm ,n Tm1,n
Dx
Finite Difference
Approximation (contd...)
Discretization of the second order differentiation at (m,n)
2T
x 2
T
x
x
m 12 , n
Dx
( m,n )
m 12 , n
2T
y 2
( m ,n )
Tm ,n 1 Tm ,n 1 2Tm,n
( Dy ) 2
Finite Difference
Approximation (contd...)
2
2
Tm1,n Tm1, n 2Tm, n Tm, n 1 Tm, n 1 2Tm,n
T
2
T 2 2
2
2
y
(
D
x
)
(
D
y
)
( m,n)
The nodal equations derived above are valid for all interior points.
For each node, there is one such equation.
For example: for nodal point m=2, n=3, the equation is
T3,3 + T1,3 + T2,4 + T2,2 - 4T2,3 =0
Hence, the temperature at (2,3) can be expressed as
T2,3=(1/4)(T3,3 + T1,3 + T2,4 + T2,2)
...
Numerical Solutions
Matrix form: [A][T]=[C].
The solution for temperature would be:
[A]-1[A][T]=[A]-1[C], [T]=[A]-1[C]
where [A]-1 is the inverse of matrix [A].
Usually, for most practical problems, the order of matrix will
be quite high as N would be large. As this will require
enormous amount of computational effort, direct matrix
inversion for solution of temperature will be impractical.
For high order matrix, iterative methods are usually more
efficient.
The popular Jacobi & Gauss-Seidel iteration
methods are introduced subsequently.
a T
ij
j 1
aiiTi
a T
ij
Bi
j i 1
Ti
(k )
N a
Bi i 1 aij ( k )
ij
T j T j( k 1)
aii j 1 aii
j i 1aii
aPTP anbTnb b
Or,
*
a
T
nb nb b
TP
aP
W ( x) R( x) 0
i
Galerkins Method
p y( x) Qy dx 0 (1)
2
t ( x, y ) a1 a2 x a3 y
a1
a1 a2 x a3 y 1 x y a2
a
3
T N i ti N j t j N m t m
In matrix form :
ti
T N i N j N m t j
t m
N j N m
ti
x x
tj
N j N m
tm
y y
1 i j m
B N
x
x i j m
q y
0 K yy
k B DBdV hN N dS
T
tAB D B
T
AK xx
1 - 1
- 1 1
x
L 1
L x x
hP
dx
1
x L L
0
L
hPL 2 1
6 1 2
1
T
QV
f Q Q V dV 1 for constant heat source
3
V
1
F K t
Solve for Nodal Temperatures
Solve for Element Temperature Gradient & Heat Flux
Solving PDEs
Finite element method
Finite difference method (our focus)
Converts PDE into matrix equation
Linear system over discrete basis elements
Class of Linear
Second-order PDEs
Linear second-order PDEs are of the form
Auxx 2Buxy Cu yy Eux Fuy Gu H
Parabolic PDEs: B2 - AC = 0
(transient heat transfer equations)
Consider a medium in which the finite difference formulation of a general interior node is
given in its simplest form as
Is heat transfer in this medium steady or transient?
Is heat transfer one-, two-, or three-dimensional?
Is there heat generation in the medium?
Is the nodal spacing constant or variable?
Is thermal conductivity of the medium constant or variable?