Sie sind auf Seite 1von 19

Chapter 8: Finite Volume Method for Unsteady Flows

Ib hi Sezai Ibrahim S i
Department of Mechanical Engineering Eastern Mediterranean University

Spring 2008-2009

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 + ( ) dt dV n ( u ) dA + dt t CV t t A (8.2) t +t t +t = n ( grad )dA dt + S dVdt t A t CV
ME555 : Computational Fluid Dynamics 2 I. Sezai Eastern Mediterranean University

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

T T = k t x x

+S

(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

This may be written as e t +t t +t t +t T T T c dt dV kA kA dt S Vdt = + t x e x w w t t t


ME555 : Computational Fluid Dynamics 3

CV

T dVdt = t

t + t

CV

T k x x

dVdt +

t + t

sdVdt
t CV

(8.4) (8.5)

I. Sezai Eastern Mediterranean University

The left hand side can be written as t +t T (8.6) dt dV = c TP TP0 V c t CV t I equation(8.6) ti (8 6) superscript i t o refers f to t temperatures t t t time ti t. In at 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 T ) V =
0 P t +t

TP TW TE TP ke A kw A xPE xWP
4

t +t dt + S Vdt t

(8.7)

ME555 : Computational Fluid Dynamics

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 t +t as; 0 IT = TP dt = (8.8) TP + (1 )TP t Hence
t

IT

0 TP0 t

1/ 2

= a weighting parameter between zero and one.


ME555 : Computational Fluid Dynamics 5 I. Sezai Eastern Mediterranean University

1 TP + TP0 t TP t 2

Using formula (8.8) for TW and TE in equation (8.7), and dividing by At throughout, we have
c
ke (TE TP ) k w (TP TW ) TP TP0 x = xWP t xPE 0 ke TE0 TP0 k w TP0 TW + (1 ) xPE xWP

+ S x

(8.9)

which may be re-arranged to give


x k k + e + w c xPE xWP t ke k 0 + w TW + (1 ) TW TE + (1 ) TE0 TP = x x PE WP x k k + c (1 ) e (1 ) w TP0 + S x xPE xWP t

(8.10)
ME555 : Computational Fluid Dynamics 6 I. Sezai Eastern Mediterranean University

Now we identify the coefficients of TW and TE as aW and aE and write equation (8.10) in familiar standard form:
0 0 a pTP = aW TW + (1 ) TW + aE TE + (1 ) TE 0 0 aP (1 ) aW (1 ) aE TP + b +

(8.11)

where and with

0 aP = ( aW + aE ) + aP
0 = c aP

x t
aE ke xPE b S x

aW kw xWP
For

= 0 explicit scheme 0 < < 1 implicit scheme, for = 0.5 Crank-Nicolson scheme = 1 Fully implicit scheme
ME555 : Computational Fluid Dynamics 7 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:
0 0 TP0 + Su aPTP = aW TW + aETE0 + aP ( aW + aE S P )

(8.12)

where and

0 aP = a P
0 aP = c

x t

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 8 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
c

Or

x 2k > t x
2k

(8.13a) (8.13b)

( x ) t < c

q y sets a stringent g maximum limit to the This inequality time step size and represents a serious limitation for the explicit scheme. Not recommended for the explicit scheme problems.
ME555 : Computational Fluid Dynamics 9 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
T + T 0 T + T 0 0 aW aE 0 a pTP = aW W W + aE E E + aP TP + b 2 2 2 2

(8 14) (8.14)

1 0 Where aP = 1 ( aW + aE ) + aP SP 2 2

And

0 = c aP

x t

aW kw xWP

aE ke xPE

b 1 Su + S PTP0 2
10 I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

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 a + aE 0 aP > W 2 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
0 0 a pTP = aW TW + aETE + aP TP + Su

(8.16)

where and

0 aP = aP + aW + aE S P
0 = c aP

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

x t

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 = 120 Recalculate R l l the h numerical i l solution l i using i a time i step size i equal l to the h limit li i 120s. 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 x 106 J/m3/K. Solution: the onedimensional transient heat conduction eqn is

T T = k t x x
t =0

+S

( ) (8.17)

The initial and boundary conditions:


T = 200 at T = 0 at t T = 0 at x = 0, t > 0 x = L, t > 0
13 I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

The analytical solution is given in Ozisik (1985) as

T ( x, t ) 4 (1) n +1 = exp ( n2t ) cos ( n x ) (8.18) n =1 2n 1 200 (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

t <

c ( x )
2k

10 106 ( 0.004 ) t < 2 10 t < 8 s

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

10

8.4 Implicit Method for Two-and Three- dimensional Problems

Transient diffusion equation in three-dimensional is governed by (8.27) = k c + k + k +S t x x y y z z di i l control t l volume l i considered id d for f the th A th three dimensional is discretisation. The resulting equation is aPP = aW W + aEE + aSS + aN N + aBB + aT T where
0 0 + aP P + Su

(8.28)

0 aP = aW + aE + aS + aN + aB + aT + aP SP
0 aP = c

V t S = (Su + SPP) is the linearized source


ME555 : Computational Fluid Dynamics 21 I. Sezai Eastern Mediterranean University

A summary of the relevant neighbour coefficients is given below


1D 2D 3D aW w Aw xWP w Aw xWP w Aw xWP aE e Ae xPE e Ae xPE aS s As ySP aN n An yPN aB aT

xPE

e Ae

ySP

s As

yPN

n An

z BP

b Ab

z PT

t At

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 y yz 1 x
22

xz xy
I. Sezai Eastern Mediterranean University

ME555 : Computational Fluid Dynamics

11

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 + ( u ) x y z = + + + S x x y y z z (8.30)
23 I. Sezai Eastern Mediterranean University

( v )

( w )

ME555 : Computational Fluid Dynamics

The fully implicit discretisation equation is

aPP = aW W + aEE + aSS + aN N + aBB + aT T


0 0 + aP P + Su

(8.31)

where with and d

0 aP = aW + aE + aS + aN + aB + aT + aP + F S P
0 aP = c

V t

S V = Su + S PP

The neighbour coefficients of this equation for the hybrid differencing scheme are as follows:
ME555 : Computational Fluid Dynamics 24 I. Sezai Eastern Mediterranean University

12

One-dimensional flow aW aE aS aN aB aT F F max Fw , Dw + w , 0 2 F max Fe , De e , 0 2 Fe Fw

Two-dimensional flow F max Fw , Dw + w , 0 2 F max Fe , De e , 0 2 F max Fs , Ds + s , 0 2 F max Fn , Dn n , 0 2 Fe Fw + Fn Fs


25

Three-dimensional flow F max Fw , Dw + w , 0 2 F max Fe , De e , 0 2 F max Fs , Ds + s , 0 2 F max Fn , Dn n , 0 2 F max Fb , Db + b , 0 2 F max Ft , Dt t , 0 2 Fe Fw + Fn Fs + Ft Fb

ME555 : Computational Fluid Dynamics

I. Sezai Eastern Mediterranean University

In the above expressions the values of F and D are calculated with the following formulae:
Face F D w

( u )w Aw
w Aw xWP

e ( u )e Ae e Ae xPE

( v )s As
s As ySP

n ( v )n An n An yPN

b ( w )b Ab b Ab z BP

t ( w )t At t At zPT

The volumes and cell areas given in section 8.4 apply here as well. Other schemes such as linear upwind or QUICK may be incorporated into these equations by substituting the appropriate expression for the coefficients as will be demonstrated in the following example
ME555 : Computational Fluid Dynamics 26 I. Sezai Eastern Mediterranean University

13

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 L 1.5m, u 2m/s, =1.0kg/m 1.0kg/m3 and =0.03kg/m/s 0.03kg/m/s.

the source distribution defined by Figure 8.8 applies at times t>0 with a=-200, a= 200 b=100, b=100 x1= 0.6m, 0 6m x2= 0.2m 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 27 I. Sezai Eastern Mediterranean University

Solution convection-diffusion of a property subjected to a distributed source term is governed by ( ) ( u ) + = + S (8.32) (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 28 I. Sezai Eastern Mediterranean University

14

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 The implicit discretisation equation at a general node with Hayases et al QUICK scheme is given by
0 ( P P ) x

1 + Fe P + ( 3E 2P W ) 8 t 1 Fw W + ( 3P 2W WW ) 8 = De (E P ) Dw (P W )
29

(8.35)

ME555 : Computational Fluid Dynamics

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 30 I. Sezai Eastern Mediterranean University

15

The Analytical Solution


Under the given boundary conditions the solution to the problem is as follows:
( x) = C1 + C2 e Px
a0 ( Px + 1) P2 L n x n n x an + cos P sin L L L n n =1

(8.41)
2 n 2 P + L

with

P=

; C2 =

2 n 2 a0 an + n cos ( ) P + P 2 e PL n =1 e PL L

2 n 2 P + L x1 + x2 )( ax1 + b ) + bx1 ( and a0 = 2L a ( x1 + x2 ) + b n ( x1 + x2 ) 2L n x1 ax1 + b an = 2 2 cos cos a + n x2 L L x2 a0 and C1 = C2 + P 2 + an n =1


ME555 : Computational Fluid Dynamics 31 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

32

I. Sezai Eastern Mediterranean University

16

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 Th integrated i t t d form f f this thi eqn over a two-dimensional t di i l scalar l c.v. is i The of

0 P )

V + ( uA )e ( uA ) w + ( uA )n ( uA )s =0

(8.43)

The equivalent of pressure correction equation (5.32) for a two-dimensional transient flow will take the form

= aW pW + aE pE + aS pS + a N p aP pP N +b
aE = ( Ad )e b = u* A aW = ( Ad ) w aN = ( Ad ) n aS = ( Ad ) s
o (P P )V t

(8.44)

aP = aw + ae + as + an

) (
w

u * A + v* A v* A +
e s n

) (

) (

ME555 : Computational Fluid Dynamics

33

I. Sezai Eastern Mediterranean University

With neighbour coefficients

( dA)i , J ( dA)i +1, J ( dA) I , j ( dA) I , j +!


A higher order differencing scheme may also be used for time derivative A second order accurate scheme with respect to time is
T 1 = 3T n +1 4T n + T n 1 ) ( t 2t

aI 1, J

aI +1, J

aI , J 1

aI , J +1

(8.45)

Tn and Tn-1 are known from previous time stepsthey are treated as source terms and are placed on the rhs of the eqn.
ME555 : Computational Fluid Dynamics 34 I. Sezai Eastern Mediterranean University

17

ME555 : Computational Fluid Dynamics

35

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 equation, for example example, takes the form
ai , J a ui , J = anb unb + ( pI 1, J pI , J ) Ai , J + bi , J + (1 u ) i , J ui(,nJ1) (8.46) u u

Compare this with the transient (implicit) u-momentum equation ti


i0, J V ai , J + t i0, J V 0 ui , J = anbunb + ( pI 1, J pI , J ) Ai , J + bi , J + t ui , J
36

(8.47)

ME555 : Computational Fluid Dynamics

I. Sezai Eastern Mediterranean University

18

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 ) = t u This formula shows that it is possible to achieve the effects of from a f under-relaxed d l d iterative it ti steady t d state t t calculations l l ti f 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 37 I. Sezai Eastern Mediterranean University

19

Das könnte Ihnen auch gefallen