Sie sind auf Seite 1von 35

Chapter 8: Finite Volume Method for

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

( ) div( u ) div( grad ) S


t

(8.1)

by replacing the volume integrals of the convective and


diffusive terms with surface integrals as before (see section
2.5) and changing the order of integration in the rate of
change term we obtain:
t t
t t

CV t t ( )dt dV t A n ( u )dA dt
(8.2)
t t
t t

n ( grad )dA dt S dVdt


t A
t CV

ME555 : Computational Fluid Dynamics

I. Sezai Eastern Mediterranean University

Introduction
Unsteady one-dimensional heat conduction is governed by the equation

T T
k
S
t x x

(8.3)

In addition to usual variables we have c, the specific heat of material


(J/kg/K).

Consider the one-dimensional control volume in Figure 8.1. Integration of


equation (8.3) over the control volume and over a time interval from t to
t+t gives
t t

T
CV c t dVdt

t t

T
CV x k x

dVdt

t t

sdVdt
t

CV

This may be written as


e t t
t t
t t

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)

I. Sezai Eastern Mediterranean University

The left hand side can be written as


t t T
0
(8.6)

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

ME555 : Computational Fluid Dynamics


TP TW
kw A
xWP

t t

dt S Vdt

t

(8.7)

I. Sezai Eastern Mediterranean University

To calculate the integrals we have to make an assumption


about the variation of TP, TE and TW with time, we could use
temperatures
at time t, or
at time t+t
or combination of both.

Integral of temperature TP with respect to time can be written


as;
t t
IT TP dt TP (1 )TP0 t
(8.8)
t
Hence

IT

TP0 t

1/ 2

1
TP TP0 t TP t
2

= a weighting parameter between zero and one.


ME555 : Computational Fluid Dynamics

I. Sezai Eastern Mediterranean University

Using formula (8.8) for TW and TE in equation (8.7), and


dividing by At throughout, we have
ke TE TP kw TP TW
TP TP0
c

PE
WP

ke TE0 TP0
kw TP0 TW0
1

xWP
xPE

S x

(8.9)

which may be re-arranged to give


x
ke
kw

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

I. Sezai Eastern Mediterranean University

The source term is linearized as b=Su+SPTP. Now we identify the coefficients of TW


and TE as aW and aE and write equation (8.10) in familiar standard form:

a pTP aW TW aETE (1 )aW TW0 (1 )aETE0


aP0 (1 )aW (1 )aE TP0 b

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

I. Sezai Eastern Mediterranean University

8.2.1 Explicit scheme


In the explicit scheme the source term is linearized as b=Su+SpTp0.
Now the substitution of = 0 into (8.11) gives the explicit
discretisation of the unsteady conductive heat transfer equation:

aPTP aW TW0 aETE0 aP0 aW aE SP TP0 Su


where

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

I. Sezai Eastern Mediterranean University

All coefficients should be positive aP0- aW - aE >0


or if k = const. and xPE= xWP=x, this condition can
be written as

Or

x 2k
c

t x

(8.13a)

t c
2k

(8.13b)

This inequality sets a stringent maximum limit to the


time step size and represents a serious limitation for
the explicit scheme.
Not recommended for the explicit scheme problems.
ME555 : Computational Fluid Dynamics

I. Sezai Eastern Mediterranean University

8.2.2 Crank Nicolson scheme


The Crank Nicolson method results from setting = in eqn.
(8.11). Now the discretised unsteady heat conduction equation is
a pTP

a
a
1
1
1
1

aW TW aETE aW TW0 aETE0 aP0 W E TP0 b


2
2
2
2
2
2

(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

ME555 : Computational Fluid Dynamics

10

I. Sezai Eastern Mediterranean University

Schemes with 1 are unconditionally stable for all values


of time step t.
However, for physically realistic results all coefficients should
be positive. Then, coefficients of TP0 should be positive, or
aW aE
0
aP

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

I. Sezai Eastern Mediterranean University

The fully implicit scheme


When =1 we obtain the fully implicit scheme. The source term is
linearized as b=Su+SPTP. The discretised equation is

a pTP aW TW aETE aP0TP0 Su


where

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

I. Sezai Eastern Mediterranean University

8.3 Illustrative examples


Example 8.1
A thin plate is initially at a uniform temperature of 200 C. At a certain time t=0 the
temperature of the east side of the plate is suddenly reduced to 0C. The other
surface is insulated. Use the explicit finite volume method in conjunction with a
suitable time step size to calculate the transient temperature distribution of the slab
and compare it with the analytical solution at time (i) t = 40s, (ii) t = 80s and (iii) t =
120s. Recalculate the numerical solution using a time step size equal to the limit
given by (8.13) for t = 40s and compare the results with the analytical solution. The
data are: plate thickness L=2cm, thermal conductivity k = 10 W/m/K and c = 10
106 J/m3/K.
Solution: the onedimensional transient heat conduction eqn is

T T
k
S
t x x

(8.17)

The initial and boundary conditions:


T 200 at
T
0 at
t
T 0 at

t 0
x 0, t 0
x L, t 0

ME555 : Computational Fluid Dynamics

13

I. Sezai Eastern Mediterranean University

The analytical solution is given in Ozisik (1985) as

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.

ME555 : Computational Fluid Dynamics

14

I. Sezai Eastern Mediterranean University

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

ME555 : Computational Fluid Dynamics

15

I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

16

I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

17

I. Sezai Eastern Mediterranean University

Example 8.2 solve the problem of Example 8.1


again, using the fully implicit method and compare
the explicit and implicit method solutions for a time
step of 8 s.

ME555 : Computational Fluid Dynamics

18

I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

19

I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

20

I. Sezai Eastern Mediterranean University

8.4 Implicit Method for Two-and Three- dimensional Problems

Transient diffusion equation in three-dimensions is governed by



(8.27)
c
k
k
k
S
t x x y y z z
A three dimensional control volume is considered for the
discretisation. The resulting equation is
aPP aW W aEE aSS aNN aBB aT T

(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

ME555 : Computational Fluid Dynamics

21

I. Sezai Eastern Mediterranean University

A summary of the relevant neighbour coefficients is given below


aW
w Aw
xWP

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

ME555 : Computational Fluid Dynamics

22

I. Sezai Eastern Mediterranean University

8.5 Discretisation of transient convection-diffusion equation

The unsteady transport of a property is given by

(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)

ME555 : Computational Fluid Dynamics

23

I. Sezai Eastern Mediterranean University

The discretised equation at location P with degree of implicitness is


a pP aW W aEE aSS aNN (1 )aW W0 (1 )aEE0 (1 )aSS0 (1 )aNN0
(1 ) aW (1 ) aE (1 ) aS (1 ) aN P0 S
S sCbodyVP S trans S dc S pres (1 ) sPbodyP0 ,

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

x V [( pe pw ) / x]V ( pe pw )y for x-momentum equation

p V [( pn ps ) / y ]V ( pn ps )x for y-momentum equation


y

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,

(ue , uw , vn , vs are found by MIM method)

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

I. Sezai Eastern Mediterranean University

8.6 Worked example of transient convection-diffusion using QUICK differencing

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

I. Sezai Eastern Mediterranean University

Solution convection-diffusion of a property subjected to a


distributed source term is governed by
u

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

I. Sezai Eastern Mediterranean University

The velocity is u=2.0m/s and the cell width is x=0.0333 so F=u=2.0


and D=/x=0.9 everywhere. The Hayase et al formulation gives at
cell faces by means of the following formulae:
1
(8.33)
e P 3E 2P W
8
1
w W 3P 2W WW
(8.34)
8

(8.35)
ME555 : Computational Fluid Dynamics

27

I. Sezai Eastern Mediterranean University

A time step t = 0.01 is selected, which is well within


stability limit for explicit schemes
Start with an initial field of P0 =0 at all nodes.
Solve iteratively for values until a converged solution
is obtained
Set P0 P and proceed to the next time level
To monitor whether steady state reached:
if P P0 < steady state . ( may be 10-9)

ME555 : Computational Fluid Dynamics

28

I. Sezai Eastern Mediterranean University

The Analytical Solution


Under the given boundary conditions the solution to the problem is as
follows:
a0
Px 1
2
P

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

ME555 : Computational Fluid Dynamics

29

I. Sezai Eastern Mediterranean University

The analytical and numerical steady state solutions are compared


in Figure 8.9. as can be seen the use of the QUICK scheme and a
fine grid for spatial discretisation ensure near-perfect agreement

ME555 : Computational Fluid Dynamics

30

I. Sezai Eastern Mediterranean University

8.7 Solution procedures for unsteady flow calculations


8.7.1 Transient SIMPLE
The continuity equation in a transient two-dimensional flow is given by
u v
(8.42)

0
t
x
y
The integrated form of this eqn over a two-dimensional scalar CV is

P
P

V uAe uAw uAn uAs 0

(8.43)

The equivalent of pressure correction equation (5.32) for a two-dimensional


transient flow will take the form

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

ME555 : Computational Fluid Dynamics

31

I. Sezai Eastern Mediterranean University

A higher order differencing scheme may also be used for time


derivative
A second order accurate scheme with respect to time is
T
1
n 1
n
n 1

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.

ME555 : Computational Fluid Dynamics

32

I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

33

I. Sezai Eastern Mediterranean University

8.8 Steady state calculations using the pseudo-transient


approach

It was mentioned in chapter 6 that under-relaxation is


necessary to stabilize the iterative process of obtaining
steady state solutions. The under-relaxed form of the twodimensional u-momentum equation, for example, takes the
form
ai , J

ui , J anbunb pI 1, J

ai , J ( n 1) (8.46)

pI , J Ai , J bi , J 1 u
ui , J
u

Compare this with the transient (implicit) u-momentum


equation

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

ME555 : Computational Fluid Dynamics

34

(8.47)

I. Sezai Eastern Mediterranean University

In equation (8.46) the superscript n-1 indicates the previous


iteration and in equation(8.47) superscript 0 represents the
previous time level. We immediately note a clear analogy
between transient calculations and under-relaxation in
steady state calculations. It can be easily deduced that
ai , J i0, J V
(8.48)
1 u
u
t
This formula shows that it is possible to achieve the effects
of under-relaxed iterative steady state calculations from a
given initial field by means of a pseudo-transient
computation starting from the same initial field by taking a
step size that satisfies (8.48).
ME555 : Computational Fluid Dynamics

35

I. Sezai Eastern Mediterranean University

Das könnte Ihnen auch gefallen