You are on page 1of 20

CFD

Computational
Fluid Dynamics
(with heat and mass
transfer)

MECH3950
Methods of
prediction
 Experimental investigation:
 full scale
 expensive
and often impossible
 measurement errors

 on a small scale model


 simplified
 difficult
to extrapolate results
 measurement errors

 Theoretical calculation:
 analytical solutions
 exist
only for a few cases
 sometimes complex

 numerical solutions
 for almost any problem
Modeling vs.
experimentation
 Advantages of modeling:
 cheaper
 more complete information
 can handle any degree of
complexity as long as…

 Disadvantages of modeling:
 deals with a mathematical
description not with reality
 mathematical description can
be inadequate
 multiple solutions can exist

… and the winner is…


Mathematical description
of transfer processes
Conservation principle leads to
a general differential equation:

     
   u j       S
t x j x j  x j 

where :
j  1,2,3
  1, ui , h, ms , k ,  
Nature of
coordinates

   x j , t    x1 , x2 , x3 , t    x, y, z, t 

 with respect to xj :
1D, 2D, 3D
 with respect to t :
 steady
 unsteady
(transient, time dependent)

 one-way coordinates =>


parabolic problem
 two-way coordinates =>
elliptic problem
Discretization
methods
 analyticalsolution gives a
function (continuous)
 numerical solution gives a
set of numbers (discrete)

x
Example: steady
1D heat conduction
dqx
qx  dx
qx dx
S

 dq x 
qx   qx  dx   Sdx  0
 dx 
dq x
 S 0
dx
d  dT 
k   S  0
dx  dx 
Integration

d  dT 
k   S  0
dx  dx 
dx)w dx)e

w e x
W P E

Dx

 d  dT  
e

w  dx  k dx   S dx  0
Discretization

 dT   dT 
e

 k    k    Sdx  0
 dx e  dx  w w

T TE
Tp

Tw

w e
x
W P E

ke TE  TP  k w TP  TW 
  S Dx  0
dx e dx w
Discretization
equation
ke TE  TP  k w TP  TW 
  S Dx  0
dx e dx w
aPTP  aETE  aW TW  b

aP  aE  aW
ke
aE 
dx e conductances
kw
aW 
dx w
b  S Dx heat generation
Boundary
conditions

1. Given boundary temperature


simple

2. Given boundary heat flux


a) as a constant
b) specified via a
heat transfer coefficient and
the temperature of the
surrounding fluid
Boundary
conditions

B i
I W P E

dx)i

S
qB i qi
B I

Dx
Boundary
conditions

qB  qi  S Dx  0

ki TB  TI 
qB   SC  S PTB Dx  0
dx i
dx)i

S
qB i qi
B I

Dx
Boundary
conditions
 ifqB specified as a constant
then:

aBTB  aI TI  b

aB  aI  S P Dx
kI
aI 
dx i
b  SC Dx  qB
Boundary
conditions
 ifqB specified via a
heat transfer h coefficient
and the temperature of the
surrounding fluid Tf :
qB  hT f  TB 

aBTB  aI TI  b

aB  aI  S P Dx  h
kI
aI 
dx i
b  SC Dx  hT f
Solution of the linear
algebraic equations
 Possibilities
 Iteration
 Gaussian elimination
 Tri-Diagonal-Matrix-Algorithm
TDMA

aPTP  aETE  aW TW  b
W P E

1 i-1 i i+1 N

aiTi  biTi 1  ciTi 1  di


change of notation
TDMA

W P E

1 i-1 i i+1 N

aiTi  biTi 1  ciTi 1  di


i 1 a1T1  b1T2  d1
i  2 a2T2  b2T3  c2T1  d 2

i 3 a3T3  b3T4  c3T2  d 3

 
i  N 1 a N 1TN 1  bN 1TN  c N 1TN  2  d N 1

i  N a N TN  cN TN 1  d N

what happens when


a boundary temperature is given ?
TDMA

W P E

1 i-1 i i+1 N

aiTi  biTi 1  ciTi 1  di


Ti 1  Pi 1Ti  Qi 1

aiTi  biTi 1  ci Pi 1Ti  Qi 1   di

 bi   di  ci Qi 1 
Ti   Ti 1   
 ai  ci Pi 1   ai  ci Pi 1 

Ti  PiTi 1  Qi
TDMA

W P E

1 i-1 i i+1 N

bi d i  ci Qi 1
Pi  Qi 
ai  ci Pi 1 ai  ci Pi 1

a1T1  b1T2  d1 bN  0
P1  b1 a1 PN  0
Q1  d1 a1 TN  QN

Ti  PiTi 1  Qi
TDMA algorithm

 Calculate:
P1=b1/a1 and Q1=d1/a1

 Use recurrence relations to get


Pi and Qi for i=2,3…N.

 Set TN =QN

 Use recurrence relations to get


Ti =Pi Ti+1 +Qi for i=N-1, N-2…3, 2, 1
to obtain
TN-1, TN-2, …T3, T2, T1.

You might also like