Beruflich Dokumente
Kultur Dokumente
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
(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)
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
CV
T dVdt = t
t + t
CV
T k x x
dVdt +
t + t
sdVdt
t CV
(8.4) (8.5)
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)
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
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)
(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)
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.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 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
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
(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
T T = k t x x
t =0
+S
( ) (8.17)
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.
14
The time step for the explicit method is subject to the condition that
t <
c ( x )
2k
15
16
17
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.
18
19
20
10
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
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
11
(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 )
(8.31)
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
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
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)
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
(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
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
32
16
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
) (
) (
33
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
35
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
(8.47)
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