Finite Volume Data Presentation
Finite Volume Data Presentation
Unsteady Flows
Ibrahim Sezai
Department of Mechanical Engineering
Eastern Mediterranean University
Spring 2013-2014
8.1 Introduction
The conservation law for the transport of a scalar in an
unsteady flow has the general form
(8.1)
CV t t ( )dt dV t A n ( u )dA dt
(8.2)
t t
t t
Introduction
Unsteady one-dimensional heat conduction is governed by the equation
T T
k
S
t x x
(8.3)
T
CV c t dVdt
t t
T
CV x k x
dVdt
t t
sdVdt
t
CV
T T
T
w t c t dt dV t kA x e kA x w dt t S Vdt
ME555 : Computational Fluid Dynamics
(8.4)
(8.5)
c
dt
dV
c
T
P
P
CV t t
In equation(8.6) superscript o refers to temperatures at time t.
Temperatures at time level t+t are not superscripted.
Eqn(8.6) could also be obtained by substituting
T TP TP0
t
t
So, first order (backward) differencing scheme has been used. If we
apply central differencing to rhs of eqn (8.5),
c TP TP0 V
t t
TE TP
k e A
xPE
TP TW
kw A
xWP
t t
dt S Vdt
t
(8.7)
IT
TP0 t
1/ 2
1
TP TP0 t TP t
2
PE
WP
ke TE0 TP0
kw TP0 TW0
1
xWP
xPE
S x
(8.9)
t
xPE xWP
ke
kw
0
0
P
E
E
W
W
xPE
xWP
x
ke
kw 0
c
1
1
TP S x
xPE
xWP
t
(8.10)
ME555 : Computational Fluid Dynamics
where
and
with
aP aW aE aP0 S P
x
a c
t
0
P
aW
kw
xWP
For
(8.11)
aE
ke
xPE
b
Su (1 ) S PTP0
= 0 explicit scheme
0 < < 1 implicit scheme, for = 0.5 Crank-Nicolson scheme
= 1 Fully implicit scheme
ME555 : Computational Fluid Dynamics
and
(8.12)
aP aP0
x
a c
t
0
P
aW
kw
xWP
aE
ke
xPE
The right hand side of eqn (8.12) only contains values at the old time
step so the left hand side can be calculated by forward marching in
time. The scheme is based on backward differencing, and is of first
order accurate.
ME555 : Computational Fluid Dynamics
Or
x 2k
c
t x
(8.13a)
t c
2k
(8.13b)
a
a
1
1
1
1
(8.14)
1
1
0
where aP aW aE aP S P
2
2
and
x
a c
t
0
P
aW
kw
xWP
aE
ke
xPE
b
1
Su S PTP0
2
10
which leads to
x 2
t c
(8.15)
k
This time step limitation is only slightly less restrictive than (8.13)
associated with the explicit method
The method is based on central differencing Second order
accurate in time
Is more accurate than explicit method
ME555 : Computational Fluid Dynamics
11
and
(8.16)
aP aP0 aW aE SP
aP0 c
x
t
aW
aE
kw
ke
with
xWP xPE
Both sides of the equation contains temperatures at the new time step,
and a system of algebraic equations must be solved at each time level
is unconditionally stable for any t
is only first order accurate in time
small time steps are needed to ensure accuracy of results
ME555 : Computational Fluid Dynamics
12
T T
k
S
t x x
(8.17)
t 0
x 0, t 0
x L, t 0
13
T ( x, t ) 4 (1) n 1
2
exp n t cos n x
(8.18)
200
n 1 2n 1
(2n 1)
where n
and k / c
2L
The numerical solution with the explicit method is generated
by dividing the domain width L into five equal control
volumes with x = 0.004m. The resulting one-dimensional
grid is shown in Figure 8.2.
14
The time step for the explicit method is subject to the condition that
c x
2k
10 10 0.004
t
2 10
t 8s
6
15
16
17
18
19
20
(8.28)
a Su
0 0
P P
where
aP aW aE aS aN aB aT aP0 SP
V
a c
t
S = (Su + SPP) is the linearized source
0
P
21
aE
e Ae
xPE
aS
aN
aB
aT
2D
w Aw
xWP
e Ae
xPE
s As
ySP
n An
yPN
3D
w Aw
xWP
e Ae
xPE
s As
ySP
n An
yPN
b Ab
z BP
t At
z PT
1D
The following values for the volume and cell face areas apply in three
cases:
1D 2 D
3D
V
Aw Ae
An As
Ab At
x xy xyz
1
y
yz
x
xz
xy
22
(8.29)
( ) div( u ) div( grad ) S
t
Here, we quote the implicit/hybrid difference form of the
transient convection-diffusion equations.
Transient three-dimensional convection-diffusion of a general
property in a velocity field u is governed by
t
x
y
z
S
x x y y z z
(8.30)
23
P0VP
(transient terms), s body = sCbody +sPbodyP (body forces per unit volume in the differential equation)
t
y
y
x
x
aE e max Fe , 0 ,
aW w
max Fw , 0 , aN n max Fn , 0 ,
aS s max Fs , 0
xe
xw
yn
ys
V
aP (aE aW aN aS ) P P sPbody xy F ,
t
F Fe Fw Fn Fs ,
S trans aPoPo , aPo
S pres
S dc max Fe , 0 e P max Fe , 0 e E
max Fw , 0 w P max Fw , 0 w W
max Fn , 0 n P max Fn , 0 n N
max Fs , 0 s P max Fs , 0 s S
Fe u e y,
Fw u w y,
Fn v n x,
Fs v s x,
e , w , n , s = face values found from a high order (higher than 1st order) convection scheme such as QUICK or CD
ME555 : Computational Fluid Dynamics
24
Example 8.3 consider convection and diffusion in the onedimensional domain sketched in Figure 8.7. Calculate the transient
temperature field if the initial temperature is zero everywhere and the
boundary conditions are =0 at x=0 and /x=0 at x=L. the data are
L=1.5m, u=2m/s, =1.0kg/m3 and =0.03kg/m/s.
the source distribution defined by Figure 8.8 applies at times t>0 with
a=-200, b=100, x1= 0.6m, x2= 0.2m. Write a computer program to
calculate the transient temperature distribution until it reaches a steady
state using the implicit method for time integration and the Hayase et
al variant of the QUICK scheme for the convective and diffusive
terms and compare this result with the analytical steady state solution
ME555 : Computational Fluid Dynamics
25
S
(8.32)
t
x
x x
We use a 45 point grid to subdivide the domain and perform all calculations
with a computer program. It is convenient to use the Hayase et al
formulation of QUICK (see section 5.9.3)since it gives a tri-diagonal system
of equations which can be solved iteratively with the TDMA (see section
7.2).
ME555 : Computational Fluid Dynamics
26
(8.35)
ME555 : Computational Fluid Dynamics
27
28
L
n x n
an
P sin L L
n
n 1
( x) C1 C2e Px
with
(8.41)
n x
cos
a0
an
P
; C2 2 PL PL cos n
Pe
n 1 e
2 n 2
P
L
2 n 2
P
L
2 n 2
P
L
x1 x2 ax1 b bx1
and a0
2L
n x1 x2
2 L a x1 x2 b
n x1 ax1 b
an 2 2
cos
cos
a
n
x2
L
x
L
a0
and C1 C2 P 2 an
n 1
29
30
0
t
x
y
The integrated form of this eqn over a two-dimensional scalar CV is
P
P
(8.43)
aP pP aW pW aE pE aS pS aN pN b
aE ( Ad )e
aW ( Ad ) w
aN ( Ad )n
aS ( Ad )s
(8.44)
aP aw ae as an
( Po P )V
b u A u A v A v A
w
e
s
n
t
31
3
T
4
T
t 2t
(8.45)
Tn and Tn-1 are known from previous time steps they are
treated as source terms and are placed on the rhs of the
equation.
32
33
ui , J anbunb pI 1, J
ai , J ( n 1) (8.46)
pI , J Ai , J bi , J 1 u
ui , J
u
i0, J V
ai , J
t
i0, J V 0
ui , J
ui , J anbunb pI 1, J pI , J Ai , J bi , J
t
34
(8.47)
35