Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Control Volume Discretisation

Ganapathi Bhat

<gbhat@aero.iitb.ac.in>
Department of Aerospace Engineering
Indian Institute of Technology - Bombay

[AE780 Classroom material - IIT-Bombay]


Control volume approach

1. Generate sufficient number of cells (i.e.control volumes) inside


the given domain
2. Apply conservation equations for each cell
3. Conservation Equations:
I Mass (state)
I Momentum (velocity field)
I Energy (thermal field)
4. Solve for each cell for all the ’field’ equations
5. Check for Global (model level) and Local (cell level)
conservation
6. Apply suitable correction method and iterate till conservation
is achieved
Governing Equations


@(⇢m ) @(⇢m uj ) @ @
+ = e↵ +S
@t @xj @xj @xj

e↵ S Equation
1 0 0 Continuity
@P
u µe↵ @x + ⇢m Bx + Sothersx U momentum
@P
v µe↵ @y + ⇢m B y + Sothersy V momentum
@P
w µe↵ @z + ⇢m Bz + Sothersz W momentum
ke↵
h (Cp )m Q̈ Energy (enthalpy)
h i
ke↵ Q̈
T (Cp )m (Cp )m Energy (temperature)
!k ⇢m De↵ Rk Mass transfer (species k)

Above table is based on the book ”Introduction to computational fluid dynamics - Anil W. Date”

3/1
Governing equation - Temperature field
I Generic energy balance equation (in Temperature form) :
 
@(⇢m T ) @(⇢m uj T ) @ @T
Cp + = ke↵ +S
@t @xj @xj @xj
I ’Conduction only’ equation:
2 3
* 0 
4 @(⇢m T ) @(⇢m uj T ) 5 @ @T
Cp + = ke↵ +S
@t @xj @xj @xj

I Steady state conduction:

*0 
@(⇢m T ) @ @T
Cp = ke↵ +S
@t @xj @xj
I Steady state conduction - 1D:

  *0 
@ @T @ @T @ ⇠⇠ :0

ke↵ + ke↵ + ⇠⇠k⇠ ⇠@T +S =0
e↵
@xi @xi @xj @xj ⇠
@xk @xk
Discretization of 1D conduction equation

I Steady state conduction - 1D (cartesian frame - x,y,z):



@ @T
ke↵ +S =0
@x @x
I Replacing partial operator @ with d and ke↵ with k:

d dT
k +S =0
dx dx
I Integrating from ’east face’ to ’west face’:
✓ ◆ ✓ ◆ Z e
dT dT
k k + Sdx = 0
dx e dx w w
Discretization of 1D conduction equation

I Replacing di↵erential with point (node) values:

ke (TE TP ) kw (TP TW )
+ S( x)P = 0
( x)PE ( x)WP

where
I ( x)P is the distance between east-face and west-face of the
cell
I ( x)PE is the distance between node points E and P
I ( x)WP is the distance between node points P and W
I Splitting the source term S into a constant part SC and
variable part SP TP :

AE (TE TP ) AW (TP TW ) + (SC + SP TP )( x)P = 0

where AE = ke /( x)PE and AW = kw /( x)WP


Discretization of 1D conduction equation

I After rearranging the terms:

AE TE +AW TW +SC xP AE TP AW TP +SP TP ( x)P = 0

I Further rearrangement gives:

AP TP = AE TE + AW TW + SC ( x)P

where AP = AE + AW SP ( x)P
I In a compact form above form can be written as:

AP TP = ⌃Anb Tnb + SC ( x)P

where AP = ⌃Anb SP ( x)P


with nb corresponding to neighbours (or neighbouring nodes)
General rules for solution stability

1. Representation of the flux across the adjacent control volume


faces must be same
2. Coefficients AP and Anb must be positive
3. Source term is split (S = SC + SP TP ), with negative slope
linearisation for SP term
4. AP = ⌃Anb
Governing equation - Transient conduction

I Conduction equation:

@ @ @T
(⇢Cp T ) = k +S (1)
@t @xj @xj

I Conduction - 1D (j=1):

@ @ @T
(⇢Cp T ) = k +S (2)
@t @x1 @x1
I Conduction - 1D (cartesian system) with constant ⇢, Cp ; and
source term S=0 :

@T @ @T
⇢Cp = k (3)
@t @x @x
Discretization of steady state conduction equation - 1D
X-direction
Discretization of 1D conduction equation
I Integrating (3) from west-face to east-face for time t:
Z e Z t+ t Z e Z t+ t 
@T @ @T
⇢Cp t x= k t x
w t @t w t @x @x
(4)
I LHS of the equation (4) can be written as:
Z e Z t+ t
@T
⇢Cp t x = ⇢Cp x(TP TPo ) (5)
w t @t

where TPo represents previous-time-step value of temperature


at P
I Integrating (4) from ’west-face’ to ’east-face’:
Z t+ t ✓ ◆ ✓ ◆
dT dT
⇢Cp x(TP TPo ) = k k t (6)
t dx e dx w
I T on the RHS of the equation (6) can be integrated wrt time,
which can be expressed in terms of T and T o using a
weighing factor f , with 0  f  1:
Z t+ t
Tdt = [fT + (1 f )T o ] t (7)
t

– Implicit scheme (f =1) : T=T (i.e. current time step value)


– Explicit scheme (f =0) : T=To (i.e. pervious time step value)
Variation of nodal value as a function of scheme

Figure: Implicit and explicit functional representation1

1
Figure obtained from the book NHTFF by SVPatankar
I Using the equation (7):

ke (TE TP ) kw (TP TW )
⇢Cp x(TP TPo ) =f +
( x)PE ( x)WP

ke (TEo TPo ) kw (TPo TWo )
(1 f)
( x)PE ( x)WP
(8)

⇢Cp x(TP TPo ) = f [AE (TE TP ) AW (TP TW )] +


(1 f ) [AE (TEo TPo ) AW (TPo o
TW )]
(9)
I Equation (9 ) can be written as:

AP TP = AE [fTE + (1 f )TEo ] + AW [fTW + (1 o


f )TW ]
+ [AoP (1 f )AE (1 f )AW ] TPo
(10)

– where AoP = ⇢Cp x/ t


– and AP = fAE + fAW + AoP
I For Implicit (f = 1) condition, equation (10) gives:

AP TP = AE TE + AW TW + AoP TPo (11)

– where AP = AE + AW + AoP
I For Explicit (f = 0) condition, equation (10) gives:

AP TP = AE TEo + AW TW
o
+ (AoP AE AW )TPo (12)

– where AP = AoP
I Above equation (12) leads to ’time-step size’ constraint given
below for explicit solvers :
" #
( x)2
t < ⇢CP (13)
2k
E↵ect of convection
!
Convection Modeling

£401 +8,440)-ftp.T#g.)ts -①

consider steady state: fµ0)=o


A s s u m e 5=0
Also a s s u m e Yo u t o be 1 -D

face =
EH84) - ②

Similar to conduction equation


integrate ② across the control v o l u m e
e.

[fat 1%481)dn -

lpuode-kuobw.lt#n)e-fiIf)w

- ④
4 q ace
E cnodeb
)

W P
, ,
0 0 0
I I

_¥p'kdT¥
! ""
Central Differencing:
Define 0e= KC0E +0ps} Central
% = kC0pt0w) Differencing
F =
f u
D = TYAx
the Et#p)-fUw(0pI0w_ )

= ¥I⑤
-Tw4
AE = D e - Ek - ⑥
Aw =
D i r t FW12 -70
Ap = D @ + FE12-1DW-FW12
=
A E t Aw t f Fe - E r ) -80
From ⑥ , if F E 7 2DE A E 2 0

Similarly, i f FW2 2DW Aw<0

[ r e coefficients] divergence
UPWIND differencing:

¥Egf
P

0e=0p if F e >0 (Fe=eue)


O1E-0IE if Feld

Fe 0 e = % LIFE, O31-0EI-Fe, 031


4
( Ma x of thetwo)
AP0P =
AE0E + AW0W
AE =D@tftFe.id
=D.net/fFw.0D-
Aw

Ap=DetEFe,oItDwtffFwPD--
AEtAwtLFe-Fw)
" !" "
General s o l u t i o n (analytical):
fall =
dance I f )
Boundary conditions:
Faq}
2 2 0 0=0/0 I n local (grid)
b .= L co-ordinate system

Pq#¥f
P =
fY¥ P - c e l l Pellet
number

:⇐÷.
µ 0T (when µ=o)
! !" " ""
" ! !

"
"it
H I b

jq
variation
a t Y=e
T

Global coordinates transformation into grid coordinates:

"im
a-1 a)
of
o r

With above
a 2 & 0 will
"
b e o n l y between 0 4 1
0 < a l I j o c 02 1
❤ " !
" "

¥,-P¥a=o - ①
Roots of t h e a b ove equation a r e

V = O a n d r =p

i. 0 = Ae"" + Be" - ②
= A + Beth
Bcs for t h e cell a r e :

2 = 0 ; 0=0
2 2 1 ; 0 = I
A t B t o
B

is A =


-
=

Substituting A d B i n ②

=-i +


I -③
Generalized scheme:
AE0E-1AW}
Ap0pE
A E = D e A G p D t THE,oD
Aw-DWALIPDTIFw.FI/-
Ap=AEtAwt(Fe-Fw)

Scheme: Fo r m u l a fo r A- Gpl)
Central 1 -
0.51101
UPWIND 1

Hybrid [ 0 , I-0.511011
Power l a w 40,11-0.1110151
Exponential IPl/feapC1pD-D
( exa c t )
! !
UPWIND- (1st o r d e r )

w-iq.ee
w!

F l o w direction

0e=0p

¢ I 1
,

E
i

w 0
e
\
" !
!

UPWIND-(2nd order)

w!
q e¥

Thisdirection
% = f t 0 p, w )

N h
I I I A

W E
e
i
E↵ect of Peclet number variable evaluation

Figure: Variation of as a function of Peclet number variation2

2
Figure obtained from the book NHTFF by SVPatankar
A(|P|) for di↵erent schemes

Figure: Variation of A(|P|) for di↵erent convection schemes3

3
Figure obtained from the book NHTFF by SVPatankar
Evaluation of variable as a function of Peclet number

Figure: P evaluation as a function of Peclet number4

4
Figure obtained from the book NHTFF by SVPatankar
Discretised 3D N-S equation

AP P = AE E + AW W + AN N + AS S + AT T + AB B +b

AE = De A(|Pe |) + max( Fe , 0)
AW = Dw A(|Pw |) + max(Fw , 0)
AN = Dn A(|Pn |) + max( Fn , 0)
AS = Ds A(|Ps |) + max(Fs , 0)
AT = Dt A(|Pt |) + max( Ft , 0)
AB = Db A(|Pb |) + max(Fb , 0)
⇢oP x y z
AoP =
t
AP = AE + AW + AN + AS + AT + AB + AoP SP x y z
Discretised 3D N-S equation - contd..

e y z
Fe = (⇢u)e y z De =
xPE
w y z
Fw = (⇢u)w y z Dw =
xWP
n z x
Fn = (⇢u)n z x Dn =
yPN
s z x
Fs = (⇢u)s z x Ds =
ySP
t x y
Ft = (⇢u)t x y Dt =
zPT
b x y
Fb = (⇢u)b x y Db =
zBP
b = SC x y Z + AoP o
P

You might also like