Department of civil Engineering
Fluid Mechanics Group
The effect of the cell-Reynolds number in the
numerical solution of the convection-diffusion
equation
C.B. Vreugdenhil
March 1982
I. Introduction 2. 3. 4. 5. 6.
Central differences and the cell-Reynolds number
Alternative methods
3. I First-order upstream scheme 3.2 A monotone second-order scheme
3.3 Fromm's zero-average-phase-error scheme
3.4
QUICK 3.5 A characteristic scheme 3.6 Truncation error 3.7 Discussion Numerical tests 4.1 Analytical solution 4.2 Numerical results Conclusions References 34
4
5 6 7 7 9 10 12 12 13 15 161. Introduction
In the numerical solution of convection-diffusion equations a difficulty is commonly met in the occurrence of "standing waves" or spatial oscillations of a numerical origin. This has given rise to a considerable number of methods designed to avoid oscillations, often by means of upstream differencing or a similar approach in finite elements. In the present report, a short analysis of the phenomenon and some methods of remedy are given. The discussion is by no mea.ns complete, but it gives some general trends. For simplicity, the ana-lysis is restricted to steady-state solutions of a linear convection-diffusion equation with constant coefficients and in one space dimension :
where
dC
u dX
S'
c dependent variable (concentration) x space coordinate
u convection velocity (assumed positive) D diffusion coefficient
S' source term
( 1 • 1 )
Non-dimensionalizing the variables with the length L of the interval considered gives the basic equation for this report :
S ( 1 .2)
,\There
Re uL/D Reynolds number
x dimensionless distance
[0,1]
S S'L/u dimensionless source termThe phenomenon of spatial oscillations is observed in the numerical solution of this equation, as discussed in chapter 2. Similar oscillations ,\Till develop In transient conditions. Various possible ways of overcoming the difficulty are discussed in chapter 3 and tested for a simple case in chapter 4.
Although analysis is limited to finite difference schemes, similar results will apply to finite-element methods, as discussed, e.g. by Jensen and Fin-layson (1980). Different test cases can, of course, be considered (see, e.g. Huffenus and Khaletzky, 1981) but the conclusions will generally be similar to the present ones.
Methods can be distinguished of an "Eulerian" type,
i.e.
working on a fixed
grid, and of a "Lagrangian" or characteristic type. The latter can usually be
formulated as difference schemes on a fixed grid, as shown for one example
(section 3.5), so that there does not seem to be an essential difference
be-tw"een the two approaches. Some methods exist in which the Lagrangian aspect is
further exploited, such as the one by Egan and Mahoney (1972, see also Pedersen
and Prahm, 1974).
The latter method
~snot so easily converted into a difference scheme and it
has not been investigated in this report.
Only linear problems are discussed here. It may be assumed that similar
pheno-mena will be observed in non-linear problems. Additional difficulties may be
met, such as those discussed by Kellogg et al (1980). They show that the
uniqueness of numerical solutions of a non-linear convection-diffusion equation
is related to the cell-Reynolds number.
C e n t r a l d i f f e r e n c e s and t h e c e l l - R e y n o l d s number F o r r e a s o n s e x p l a i n e d i n c h a p t e r 1, o n l y t h e s t e a d y s t a t e i s c o n s i d e r e d . A c e n t r a l - d i f f e r e n c e a p p r o x i m a t i o n o f Eq. ( 1 . 2 ) i s ; " (c,.,,-c,._,) - A ( c , , , - 2 c + r . _ , ) = S' ( 2 . 1 ) 2Ax
' k+1 k - r
Ax2^"k+1
k k - r k
o r , i n d i m e n s i o n l e s s f o r m (c,., ,-c,._,) - -ïrri-y (c,.,,-2c,+c,.^,) = S,. ( 2 . 2 ) 2Ax ' k+1 k - r ReAx2 ^"k+1 k k-K kw h e r e Ax = R/Re and R = uAx/D i s t h e c e l l - R e y n o l d s number.
A p a r t f r o m a p a r t i c u l a r s o l u t i o n r e l a t e d w i t h t h e s o u r c e t e r m S, E q . ( 2 . 2 ) has
s o l u t i o n s o f t h e f o r m
c^ = r*" ( 2 . 3 )
w i t h r j = 1 and r ^ = ( 2 + R ) / ( 2 - R ) ( 2 . 4 )
These c o r r e s p o n d t o t h e s o l u t i o n s o f t h e homogeneous E q . ( 1 . 2 ) w h i c h can be
w r i t t e n i n t h e same f o r m o f E q . ( 2 . 3 ) i f
r j = 1 and r ^ = e'^ ( 2 . 5 )
Two r e m a r k s can be made :
( i ) F o r s m a l l R ( i . e . f o r s m a l l A x ) , E q . ( 2 . 4 ) a p p r o x i m a t e s t h e c o n t i n u o u s s o l u t i o n ( 2 . 5 ) ( i i ) I f R>2, t h e n u m e r i c a l s o l u t i o n o s c i l l a t e s and c e r t a i n l y does n o t a p p r o x -i m a t e t h e c o n t -i n u o u s s o l u t -i o n . The l a t t e r o b s e r v a t i o n g i v e s r i s e t o t h e c e l l - R e y n o l d s - n u m b e r r e s t r i c t i o n R = ^ < 2 ( 2 . 6 ) t o a v o i d o s c i l l a t o r y s o l u t i o n s . I t w i l l be c l e a r t h a t t h i s c o n d i t i o n a p p l i e s o n l y i f t h e c o r r e s p o n d i n g s o l u t i o n o f t h e homogeneous e q u a t i o n s i s o f any i m p o r t a n c e i n t h e t o t a l s o l u t i o n . The p h y s i c a l i n t e r p r e t a t i o n o f t h e c o n d i t i o n ( 2 . 6 ) i s t h a t t h e m e s h - w i d t h Ax must be s m a l l enough t o a l l o w a r e s o l u t i o n o f v a r i a t i o n s w i t h t h e l e n g t h
s c a l e D/U. T h i s i s t o t a l l y i n d e p e n d e n t o f t h e t i m e d i s c r e t i z a t i o n and has
n o t h i n g t o do w i t h i n s t a b i l i t y . I t i s j u s t a m a t t e r o f a c c u r a c y as r e m a r k ( i ) i n d i c a t e s .
3, A l t e r n a t i v e methods
A g r e a t number o f n u m e r i c a l schemes, e i t h e r i n f i n i t e d i f f e r e n c e s o r i n f i n i t e e l e m e n t s , have b e e n p r o p o s e d t o c i r c u m v e n t c o n d i t i o n ( 2 . 6 ) , w h i c h can be r a t h e r a n u i s a n c e i n many a p p l i c a t i o n s . Some o f them a r e d i s c u s s e d b e l o w .
The f a v o u r i t e s o l u t i o n o f t h e " c e l l - R e y n o l d s p r o b l e m " i s t h e use o f u p s t r e a m d i f f e r e n c e s . A s s u m i n g u > 0 , t h i s means o r i n d i m e n s i o n l e s s f o r m
A i ^ v v i ) - R ^ ^ ^ k . r ^ w i ) = \ ^'-'^
S o l u t i o n s o f t h e homogeneous e q u a t i o n a r e now g i v e n by ( 2 . 3 ) w i t h r j = 1 and r ^ = 1 + R ( 3 . 3 ) w h i c h i s a l w a y s p o s i t i v e and t h e r e f o r e n e v e r p r o d u c e s o s c i l l a t i o n s . However, t h i s has b e e n o b t a i n e d a t t h e expense o f a c c u r a c y , w h i c h can be s e e n i n two ways : ( i ) t h e a p p r o x i m a t i o n o f e b y 1+R i s w o r s e t h a n f o r t h e c e n t r a l scheme ( i i ) E q . ( 3 . 1 ) a p p r o x i m a t e s t h e c o n t i n u o u s case w i t h a t r u n c a t i o n e r r o r u l . , 9 ^ c l . 8 ^ c / o / \ A Ï 2 9 Ï ^ = 2 ( 3 - 4 ) T h i s i n t r o d u c e s a n u m e r i c a l d i f f u s i o n t e r m s u c h t h a t t h e t o t a l ( e f f e c t i v e ) d i f f u s i o n c o e f f i c i e n t becomes D = D + 77 uAx e f f 2w h i c h i s l e s s t h a n 2 f o r any R. T h e r e f o r e , t h e s u p p r e s s i o n o f o s c i l l a t i o n s can be e x p l a i n e d b y t h e a d d i t i o n o f a r t i f i c i a l d i f f u s i o n t o s u c h an e x t e n t t h a t t h e c e l l - R e y n o l d s c r i t e r i o n i s a l w a y s met. 3.2 A monotone s e c o n d - o r d e r scheme The f i r s t - o r d e r t r u n c a t i o n e r r o r , o c c u r r i n g i n t h e u p s t r e a m scheme, c a n be a v o i d e d by i n t r o d u c i n g s e c o n d - o r d e r v a r i a t i o n s t o t h e c e n t r a l - d i f f e r e n c e scheme. I n g e n e r a l , t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n c a n be a p p r o x i m a t e d by a t h r e e - p o i n t scheme : 9 9^ a c , + a, c + a, ^ ,c, ^ = u ^ - D + O(Ax^) ( 3 . 6 ) k-1 k-1 k k k+1 k+1 9x dx^ A s e c o n d - o r d e r a p p r o x i m a t i o n i s o b t a i n e d i f
V l ^ \ ^ \ + i
= Y^^"' A x ( - a ^ _ j + \ + ] ) = u +Y2Ax^ ( 3 . 7 ) A v a r i e t y o f schemes c a n be o b t a i n e d by s p e c i f i c c h o i c e s f o r Y i 2 3. As ane x a m p l e , Yi=Y2=0 i s c h o s e n and Ys i s made d i m e n s i o n l e s s as Ya = Bu^/D.
S o l u t i o n s o f t h e homegeneous f i n i t e - d i f f e r e n c e e q u a t i o n t h e n f o l l o w f r o m t h e q u a d r a t i c e q u a t i o n
V i ^ ' ^
V ^ V l =
0 Due t o t h e f i r s t l i n e o f E q . ( 3 . 7 ) , t h e r e i s a r o o t r i = 1, t h e o t h e r one i s r - i = In . T h e l a t t e r 1's n n s i t n ' v p ^ ' w h i r h n r e o l n d p s n s n ' 1 1 a t i n n s " ) i f ry, k - 1 ' "k+1 " '^
" k - 1and Cij^^j h a v e t h e same s i g n , and c o n s e q u e n t l y a^^ has t h e o p p o s i t e s i g n . W i t h
t h e p a r t i c u l a r c h o i c e f o r Y i , 2 , 3 ) one f i n d s u D „ u^
\ + l -
2Ax Ax2 As ^ 0, t h e c o n d i t i o n f o r a v o i d i n g o s c i l l a t i o n s i s + " - ° _ r " ^ < n - 3R^+ ^ R - 1 < 0 T h i s i s t r u e f o r any v a l u e o f R i f 3 ^ 1/16. ( 3 . 8 ) ( 3 . 9 )T a k i n g t h e minimum v a l u e , t h e e f f e c t i v e d i f f u s i o n c o e f f i c i e n t i s ,2 \ f f " ° ^ T6D R /16) ( 3 . 1 0 ) and uAx R e f f D 1 + R2/16 e f f ( 3 . 1 1 ) T h i s i s a g a i n a l w a y s l e s s t h a n 2. T h e r e f o r e , t h e e f f e c t i s n o t d i f f e r e n t f r o m t h e u p s t r e a m scheme: a d d i t i o n a l d i f f u s i o n i s added t o s a t i s f y t h e c e l l - R e y n o l d s c r i t e r i o n . The a d v a n t a g e o f t h e p r e s e n t a p p r o a c h i s t h a t i t i s more a c c u r a t e f o r s m a l l v a l u e s o f R. Some s i m i l a r schemes a r e g i v e n by S t o y a n ( 1 9 7 9 ) ; t h e y have s i m i l a r p r o p e r t i e s . 3.3 Fromm's z e r o - a v e r a g e - p h a s e - e r r o r scheme A s e c o n d - o r d e r u p s t r e a m scheme i s o b t a i n e d u s i n g f o u r b a s i c g r i d p o i n t s . Fromm ( 1 9 6 8 ) p r o p o s e d t h e f o l l o w i n g scheme ( i n d i m e n s i o n l e s s f o r m ) : { c , ^ . , - c , , _ , - a ( c , ^ - 2 r +c,,_,) - i ( l - a ) ( c , . ^ -3c + 3 r , _ - c , , _ J } + 2Ax ' k+1 k-1 ^ k+1 k k - r 2 '
^ ' k+1 k k-1
k-2' ( c , . ^ , - 2 c , + c , . _ J = S,. ( 3 . 1 2 ) ReAx2 ' k + 1 k k - r kw h i c h i s a member o f a f a m i l y o f s u c h schemes (Van L e e r , 1 9 7 7 ) . A t t h e f i r s t
g r i d p o i n t f r o m t h e u p s t r e a m b o u n d a r y , a s e p a r a t e scheme must be u s e d . I n o r d e r t o s a t i s f y t h e d i s c r e t e m a s s - b a l a n c e e q u a t i o n , V r e u g d e n h i l ( 1 9 7 9 ) p r o p o s e d ^ {C3+2C2-3C1-0(C3-2C2 + C i ) } - (C3-2C2 + C i ) = S2 ( 3 . 1 3 ) The p a r a m e t e r O i s t h e C o u r a n t number O = ( 3 . 1 4 ) Ax w h i c h e v i d e n t l y p l a y s a p a r t even i n t h e s t e a d y - s t a t e s o l u t i o n . The r o o t s o f t h e c h a r a c t e r i s t i c e q u a t i o n s a r e r i = 1 V2 ( 3 . 1 5 ) -2(R+1) ± [ 4 ( R + 1 ) ^ + R ( l - a ) { R ( l - a ) - 4 } ] r 2 .3 = R ( l - a ) - 4 The d i s c r i m i n a n t i s p o s i t i v e - d e f i n i t e i f a ^ 1. The r o o t r 2 w i t h t h e m i n u s s i g n c o r r e s p o n d s w i t h t h e p h y s i c a l l y c o r r e c t one; i t i s e a s i l y shown t h a t i t i s p o s i t i v e i f R < 4 ( l - a ) ~ ^ ( 3 . 1 6 ) The s t r o n g e s t r e s t r i c t i o n R < 4 i s f o u n d f o r 0 = 0 and c o r r e s p o n d s w i t h t h e
s t a n d a r d r e s t r i c t i o n , t a k i n g i n t o a c c o u n t t h a t two u p s t r e a m p o i n t s a r e i n
-v o l -v e d . The t h i r d r o o t r s i s p a r a s i t i c , b u t i t i s o f t h e o r d e r R and t h e r e f o r e a t most i n t r o d u c e s s l o w o s c i l l a t i o n s .
3 . 4 QUICK
L e o n a r d ( 1 9 8 0 ) p r o p o s e d a n o t h e r s e c o n d - o r d e r u p s t r e a m scheme, named QUICK, vv'hich f o r t h e p r e s e n t case r e a d s i n d i m e n s i o n l e s s f o r m
' + c , _ , ) = S,, ( 3 . 1 7 )
ReAx2 ^ k+ 1 k k - r k
A t t h e p o i n t ( k= 2 ) a d j a c e n t t o t h e b o u n d a r y , a s p e c i a l scheme c a n be d e r i v e d i n t h e same way as f o r t h e Fromm scheme :
i ^ ^ ^ - ^ ^ ^ - 8^;^ ^^3- 2c2+ c O - ^ (C3- 2C2+ c i ) = S2 ( 3 . 1 8 ) The r o o t s o f t h e c h a r a c t e r i s t i c e q u a t i o n a r e r i = 1 and r2,3= [ - | R - 2 + { ( | R + 2) 2 + R ( | R - 2) } ^ / 2 j / ^ 3 ^ ^ ^ ^ ^ ^ o f w h i c h xz ( w i t h t h e m i n u s s i g n ) c o r r e s p o n d s t o t h e p h y s i c a l l y c o r r e c t s o l u t i o n . The d i s c r i m i n a n t i s p o s i t i v e d e f i n i t e so t h a t r 2 ^ a a r e a l w a y s r e a l . The r e l e v a n t r o o t r z i s p o s i t i v e u n d e r t h e c o n d i t i o n R < 8 / 3 ( 3 . 2 0 ) T h e r e i s a g a i n a p a r a s i t i c r o o t r s o f o r d e r R. 3 . 5 A c h a r a c t e r i s t i c scheme V i o l l e t e t a l ( 1 9 8 1 ) p r o p o s e d a h i g h e r - o r d e r u p s t r e a m scheme b a s e d on t h e method o f c h a r a c t e r i s t i c s f o r t h e c o n v e c t i v e p a r t o f t h e e q u a t i o n , w h i c h i s t r e a t e d i n an i n t e r m e d i a t e s t e p : c* = c''(kAx - u A t ) ( 3 . 2 1 ) K, where n i n d i c a t e s t h e t i m e l e v e l and t h e r i g h t h a n d s i d e i s o b t a i n e d , b y c u b i c i n t e r p o l a t i o n o f a s p l i n e t y p e : c " ( k A x - u A t ) = ( l- a) 2( l+ 2 a ) c^ + { 1 -( l- o ) ^ (l+ 2 a ) ) c^_^ + a( l- a) 2 Ax 4 ^ dx 2 A dc + (1-0)0-" Ax , k
w i t h O = u ( C o u r a n t number) The g r a d i e n t s a t t h e i n t e r n a l g r i d p o i n t s a r e o b t a i n e d b y c e n t r a l d i f f e r e n c e s ; t h o s e a t b o u n d a r y p o i n t s b y o n e - s i d e d d i f f e r e n c e s . F o r i n t e r n a l p o i n t s , t h i s r e s u l t s i n 4 a^ ( l- a) ( c ^ ^ , - 3 c ^ + 3 c ^ _ , - c^ _ P ( 3 . 2 2 ) and f o r p o i n t 2 : c f - C2 = - | - a( C 3 - C i ) + ^ 0^ ( 2- 0 )( C 3 - 2C2+Ci) The s e c o n d s t e p i s n + l _ ^* ^ DAt n+1 _ n+J. n+1 "^k ''k Ax2 ^''k k - r ^ D r o p p i n g t h e t i m e i n d e x f o r s t e a d y s t a t e and s u b s t i t u t i n g DAt/Ax^ = a / R g i v e s f o r i n t e r n a l p o i n t s - (c, ^,-2c,+c, _ , ) + 2Ax ' k+1 k - r 2Ax ' k+1 k k STId f o i r p o i n t 2 ï ( C 3 - C 1 ) - ( c 3 - 2 c 2 + c i ) - — i - ^ ( c 3 - 2 c 2 + c i ) = S2 ( 3 . 2 5 ) 2Ax 2Ax ' ' ReAx2
The r o o t s o f t h e c h a r a c t e r i s t i c e q u a t i o n a r e : r i 1 + 2 rz.B = 1 + 1 R ( l+ 3 a - 2 a ^ ) + d ^'-''^ 2 -
R
( l - 0
) 2
w h e r e t h e d i s c r i m i n a n t d i s g i v e n b y d = { 1 + ^ R ( 1+ 3 0- 2 0 ^ ) } ^ - 2aR ( 1- a ) { l - ^ R( l- a) 2 } I t c a n be shown t o be p o s i t i v e - d e f i n i t e as a f u n c t i o n o f R i f 0 ^ a ^ 1. The r o o t r 2 w i t h t h e p l u s s i g n i s t h e p h y s i c a l l y c o r r e c t one. I t i s p o s i t i v e i f R < 2( l - 0
) ~ 2
( 3 . 2 7 )w h i c h i n t h e most u n f a v o u r a b l e case 0=0 a g r e e s w i t h t h e s t a n d a r d r e s t r i c t i o n . F o r a n e a r 1 much l a r g e r v a l u e s o f R a r e a l l o w e d . I t s h o u l d be n o t e d t h a t t h e scheme i n p r a c t i c e i s a p p l i e d o n l y i f t h e g r a d i e n t o b t a i n e d f r o m c u b i c i n t e r p o l a t i o n does n o t d i f f e r by more t h a n a p r e d e t e r m i n e d r a t i o f r o m t h e one o b t a i n e d by l i n e a r i n t e r p o l a t i o n . I f t h i s c r i t e r i o n i s v i o l a t e d , l i n e a r i n t e r p o l a t i o n i s u s e d , w h i c h c o r r e s p o n d s t o t h e f i r s t - o r d e r up-s t r e a m up-scheme. T h i up-s m o d i f i c a t i o n haup-s n o t b e e n i n c l u d e d i n t h e p r e up-s e n t a n a l y up-s i up-s . 3.6 T r u n c a t i o n e r r o r A l l schemes d i s c u s s e d so f a r can be w r i t t e n i n t h e f o r m The t r u n c a t i o n e r r o r f o r t h e s t e a d y s t a t e can be d e t e r m i n e d f r o m t h i s e q u a t i o n . The t r u n c a t i o n e r r o r f o r t h e u n s t e a d y s t a t e i s a d i f f e r e n t one (Roache, 1 9 7 2 ) . I t depends on t h e d i s c r e t i s a t i o n i n t i m e and i s n o t d i s c u s s e d h e r e . F o r s t e a d y s t a t e , d e v e l o p i n g E q . ( 3 . 2 8 ) i n t o T a y l o r s e r i e s g i v e s
3x Re 9x2 Re 9x2 Re2 9 x 3 ' ^y. U . ^ y ;
w h e r e A2 = a i R e A3 = aaRe^
and t h e d i m e n s i o n l e s s mesh w i d t h Ax = R/Re. F o r t h e schemes d i s c u s s e d , a j a n d
0.2 a r e g i v e n b e l o w . The c o e f f i c i e n t A2 i s p r e s e n t e d i n t h e f o l l o w i n g s e c t i o n .
scheme a i
u p s t r e a m Ax 0 c e n t r a l 0 0 2'^'^ o r d e r j g - ReAx^ 0 Fromm - ^ oAx - j {]-a)/\x^
Q u i c k 0 " 1 '^^^ c h a r a c t e r i s t i c - y aAx - a( l- a ) Ax^
3.7 D i s c u s s i o n
I n t h e f o l l o w i n g t a b l e , t h e p r o p e r t i e s o f t h e schemes have been c o l l e c t e d . Of c o u r s e , t h e l i s t o f p o s s i b l e schemes c o u l d e a s i l y be e x t e n d e d , see e.g. S t o y a n ( 1 9 7 9 ) . However, i t i s b e l i e v e d t h a t t h e most i m p o r t a n t p o s s i b i l i t i e s a r e c o v e r e d h e r e . M o r e o v e r , i t has been shown ( J e n s e n and F i n l a y s o n , 1980) t h a t f i n i t e e l e m e n t methods c a n be a n a l y z e d t h e same way and e x h i b i t a s i m i l a r c h a r a c -t e r . The b e h a v i o u r o f -t h e c h a r a c -t e r i s -t i c r o o -t r 2 has a l s o been i l l u s -t r a -t e d i n F i g . 1. c o n d i t i o n f o r no o s c i l l a t i o n s d i m e n s i o n l e s s Scheme c o n d i t i o n f o r no o s c i l l a t i o n s n u m e r i c a l d i f f u s i o n c o n d i t i o n f o r no o s c i l l a t i o n s c o e f f i c i e n t A2 e x a c t R e
-
-u p s t r e a m 1 + R any R c e n t r a l 2 + R 2 - R R < 2 0 2^^^ o r d e r T6 ^ any R R2 16 ^ 2^^^ o r d e r any R R2 16 ^ Fromm Eq. ( 3 . 1 5 ) any R - aR Q u i c k E q . ( 3 . 1 9 ) 0 c h a r a c t e r i s t i c Eq. ( 3 . 2 6 ) - ^ OR Some c o n c l u s i o n c a n be d r a w n : ( i ) t h e t h r e e - p o i n t schemes g e n e r a l l y e x h i b i t a n u m e r i c a l d i f f u s i o n t e r m o f s u c h a m a g n i t u d e t h a t o s c i l l a t o r y s o l u t i o n s a r e s u p p r e s s e d . ( i i ) t h e o s c i l l a t o r y b e h a v i o u r i s d i r e c t l y r e l a t e d t o t h e c h a r a c t e r i s t i c r o o t r 2 . No o s c i l l a t i o n s a r e f o u n d i f xz > 0. ( i i i ) f o r a c c u r a t e s o l u t i o n s t h e r o o t r 2 must a p p r o x i m a t e t h e e x a c t v a l u e e^. T h i s i s g e n e r a l l y a c h i e v e d o n l y i f R i s s m a l l , e v e n i f l a r g e r v a l u e s a r e a l l o w e d f r o m t h e p o i n t o f v i e w o f o s c i l l a t i o n s .( i v ) F o r O = Y t h e Fromm and c h a r a c t e r i s t i c schemes a r e i d e n t i c a l ; t h e i r a c c u r a c y i n t e r m s o f r 2 i s m o d e r a t e . F o r d i f f e r e n t v a l u e s o f a, t h e p i c t u r e i s n o t e s s e n t i a l l y a l t e r e d .
The s e c o n d - o r d e r scheme i s a c c u r a t e f o r s m a l l R, b u t e x h i b i t s a v e r y l a r g e n u m e r i c a l d i f f u s i o n f o r l a r g e R.
4. N u m e r i c a l t e s t s 4.1 A n a l y t i c a l _ s o l u t i o n
The s o l u t i o n o f t h e homogeneous c o n v e c t i o n d i f f u s i o n e q u a t i o n has a b o u n d a r y -l a y e r c h a r a c t e r w h i c h c -l e a r -l y c a n n o t be a c c u r a t e -l y r e s o -l v e d u s i n g a c o a r s e mesh. However, L e o n a r d (1980) p o i n t s o u t t h a t i t i s a l s o i m p o r t a n t t o s t u d y t h e r e s o l u t i o n o f t h e " f o r c e d " s o l u t i o n , g e n e r a t e d by t h e s o u r c e t e r m S ( x ) . T h e r e f o r e a t e s t p r o b l e m i s s e l e c t e d w h i c h e x h i b i t s b o t h a s p e c t s : | ^ - ^ | ^ = S ( x ) ( 4 . 1 ) dx Re dx^ c ( 0 ) = 0
S ( x ) = s (l-3x) e"^"" ( 4 . 3 )
o The l a t t e r i s a v e r s i o n o f L e o n a r d ' s s o u r c e f u n c t i o n , t h e p r e s e n t one b e i n g m a n i p u l a t e d somewhat e a s i e r . The p a r a m e t e r 3 can be a d j u s t e d . The s t r e n g t h s^ i s r a t h e r a r b i t r a r i l y c h o s e n 1 3/2 % = 2 " i n o r d e r t o h a v e a r e a s o n a b l e m a g n i t u d e . S u b s t i t u t i o n o f -Re X 8c /•/ / ^ y = -e^
( 4 . 4 ) g i v e s ^ = Re e ^^"^ S ( x ) . ( 4 . 5 ) dx dy -Re x ^ = Re e dx so w i t h an i n t e g r a t i o n c o n s t a n t y ^ : X + Re ƒ e"^''''' S ( x ' ) dx ^o o + [ ( R e H - 3 ) { l - ( l - 3 x ) e - ( ^ ^ " P ^ ^ } + ^o (Re+B): B{1 - e - ( ^ ^ " ^ ) - } ]The s o l u t i o n can be s e p a r a t e d i n t o a r e g u l a r p a r t w i t h 8c/9x -> 0 f o r x o ° , and'a b o u n d a r y l a y e r p a r t needed t o s a t i s f y t h e b o u n d a r y c o n d i t i o n a t x = 1 . F o r t h e r e g u l a r p a r t , y s h o u l d n o t c o n t a i n a c o n s t a n t , as t h i s w o u l d l e a d t o p o s i t i v e e x p o n e n t i a l s i n c. T h e r e f o r e , „ o s Re T h i s g i v e s w i t h s Re s Re _ g ( x ) = - e {\ + ( R e + B ) x } ( 4 . 8 ) The b o u n d a r y - l a y e r p a r t can be d e r i v e d s i m p l y : s Re Re X
^(-) = ^' ^ TRiTgF^ g('>> " ' Re ^'-'^
1 - e so t h e c o m p l e t e s o l u t i o n r e a d s s Re s Re _ Re x 4.2 N u m e r i c a l r e s u l t sI n F i g s . 2, 3 and 4 n u m e r i c a l r e s u l t s a r e shown f o r t h e s i x schemes c o n s i d e r e d , w i t h v a l u e s Re = 20, 100 and 1000, and v a r i o u s v a l u e s o f R. Where a p p l i c a b l e ,
a C o u r a n t number O = been u s e d . T h i s means t h a t t h e r e s u l t s o f t h e Fromm scheme and t h e c h a r a c t e r i s t i c scheme a r e i d e n t i c a l .
C o n c l u s i o n s can be d r a w n f o r t h e b o u n d a r y - l a y e r and t h e f o r c e d p a r t s o f t h e s o l u t i o n . The f o r m e r i s r e p r o d u c e d w e l l o n l y f o r s m a l l c e l l - R e y n o l d s numbers R (up t o a b o u t 2) i n a g r e e m e n t w i t h t h e b e h a v i o u r o f t h e c h a r a c t e r i s t i c r o o t V2 d i s c u s s e d i n c h a p t e r 3.
The s o u r c e t e r m does n o t depend on t h e R e y n o l d s number Re, b u t t h e c o r r e s p o n d i n g s o l u t i o n does. T h i s i s r e f l e c t e d i n an i n c r e a s i n g i n a c c u r a c y f o r i n c r e a s i n g c e l l - R e y n o l d s number R. R o u g h l y s p e a k i n g , t h e a c c u r a c y i s m a i n l y d e t e r m i n e d by
( d i m e n s i o n l e s s ) Ax = R/Re w h i c h s h o u l d n o t e x c e e d , s a y , 0.02 i f t h i s i s a l l o w e d f o r t h e b o u n d a r y - l a y e r p a r t .
The m o s t a c c u r a t e schemes a r e t h e c e n t r a l and Q u i c k schemes, i f no o s c i l l a t i o n s o c c u r . F o r s m a l l R, t h e s e c o n d o r d e r scheme i s a l s o q u i t e a c c u r a t e , b u t i t d e t e r i o r a t e s r a p i d l y f o r l a r g e r R. Among t h e schemes t h a t do n o t p r o d u c e ( s i g n i -f i c a n t ) o s c i l l a t i o n s a t l a r g e R, t h e c h a r a c t e r i s t i c and Fromm schemes a r e t h e most a c c u r a t e o n e s , t h o u g h t h e g a i n i n a c c u r a c y compared w i t h t h e f i r s t - o r d e r u p s t r e a m scheme i s n o t t o o g r e a t .
From t h e f i g u r e s , i t c o u l d be c o n c l u d e d t h a t t h e e r r o r s i n t h e f o r c e d s o l u t i o n a r e a c o n s e q u e n c e o f t h e p o o r r e s o l u t i o n o f t h e b o u n d a r y - l a y e r . To c h e c k t h i s , F i g . 5 g i v e s t h e R e = 100 case w i t h t h e b o u n d a r y - l a y e r r e m o v e d , i . e . w i t h E q . ( 4 . 7 ) as a n a l y t i c a l s o l u t i o n . The a n a l y t i c a l v a l u e was imposed as a b o u n d a r y c o n d i t i o n a t x = 1. The r e s u l t s a r e seen t o be o f a b o u t t h e same q u a l i t y as t h o s e o f F i g . 3 .
T h e r e i s s t i l l a t e n d e n c y o f b o u n d a r y - l a y e r d e v e l o p m e n t a t x = l . The i m p r e s s i o n i s , h o w e v e r , t h a t t h e i n a c c u r a c y i s n o t p r i m a r i l y c a u s e d b y t h e b o u n d a r y - l a y e r . S e g a l ( 1 9 8 1 ) s u g g e s t s t h e u s e o f a h i g h c e l l - R e y n o l d s number ( e x c e e d i n g 2) i n smooth p a r t s o f t h e s o l u t i o n , combined w i t h g r i d r e f i n e m e n t i n t h e b o u n d a r y -l a y e r . F o r t h e c e n t r a -l scheme, t h e r e s u -l t i s shown i n F i g . 6 (Re = 1 0 0 ) . I n t h e i n t e r v a l 0.9 < x ^ 1 a r e l a t i v e s t e p s i z e Ax = 0.02 (R = 2) h a s been used i n a l l c a s e s . I n t h e r e m a i n i n g r e g i o n , R v a r i e s b e t w e e n 2 and 10. A t t h e c o n -t a c -t p o i n -t X = 0.9 a m o d i f i e d c e n -t r a l scheme w i -t h u n e q u a l m e s h - w i d -t h s has been u s e d . C o m p a r i n g F i g s . 6 and 3 shows t h a t t h e s p u r i o u s o s c i l l a t i o n s h a v e i n d e e d d i s a p p e a r e d , w h i c h a g a i n s u p p o r t s t h e f a c t t h a t t h e s e a r e r e l a t e d w i t h t h e r e -s o l u t i o n o f t h e b o u n d a r y - l a y e r . The f o r c e d p a r t o f t h e -s o l u t i o n -s i n F i g -s . 6 and 3 i s p r a c t i c a l l y i n d i s t i n g u i s h a b l e . I t m u s t , t h e r e f o r e , be c o n c l u d e d t h a t g r i d r e f i n e m e n t i n t h e b o u n d a r y - l a y e r does s u p p r e s s t h e o s c i l l a t i o n s , b u t t h e a c c u r a c y o f t h e f o r c e d s o l u t i o n i s n o t e s s e n t i a l l y i n f l u e n c e d . C o n s e q u e n t l y , l i m i t a t i o n s o f t h e c e l l - R e y n o l d s number a r e u n a v o i d a b l e , a l s o f r o m a p o i n t o f v i e w o f a c c u r a c y .
n u m e r i c a l s o l u t i o n o f t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n , and more g e n e r a l l y t h e a c c u r a c y has b e e n s t u d i e d . T h i s r e p o r t i s by no means a c o m p l e t e r e v i e w o f t h e s u b j e c t , n o r i s v e r y much new m a t e r i a l i n c l u d e d . R a t h e r , some more o r l e s s w e l l k n o w n r e s u l t s have been c o l l e c t e d and a p p l i e d t o some t y p i c a l f i n i t e -d i f f e r e n c e schemes. O n l y s t e a d y - s t a t e s o l u t i o n s o f t h e l i n e a r c o n v e c t i o n - d i f f u s i o n e q u a t i o n i n one d i m e n s i o n a r e s t u d i e d . N u m e r i c a l s o l u t i o n s a r e o b t a i n e d by f i n i t e - d i f f e r e n c e m e t h o d s . S i m i l a r r e s u l t s a p p l y t o f i n i t e e l e m e n t m e t h o d s , w h i c h a r e n o t d i s -c u s s e d s e p a r a t e l y . I n t h e s t e a d y - s t a t e s o l u t i o n o f t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n a d i s t i n c t i o n m u s t be made b e t w e e n b o u n d a r y - l a y e r s due t o t h e b o u n d a r y c o n d i t i o n s , and f o r c e d
s o l u t i o n s due t o d i s t r i b u t e d s o u r c e t e r m s . I n t h e b o u n d a r y - l a y e r s o l u t i o n , s p a t i a l o s c i l l a t i o n s may o c c u r , w h i c h have n o t h i n g t o do w i t h i n s t a b i l i t y b u t r a t h e r w i t h a p o o r r e s o l u t i o n o f t h e b o u n -d a r y - l a y e r . T h i s i s -d e t e r m i n e -d m a i n l y by t h e s p a t i a l -d i s c r e t i s a t i o n an-d t h e phenomenon w i l l o c c u r b o t h i n s t e a d y and u n s t e a d y s t a t e s o l u t i o n s . T h i s b e h a -v i o u r c a n be a n a l y s e d i n t e r m s o f a f u n d a m e n t a l s o l u t i o n , c h a r a c t e r i z e d b y a p a r a m e t e r Vz w h i c h must be p o s i t i v e . T h i s i s u s u a l l y t h e case o n l y i f t h e c e l l R e y n o l d s number R i s s m a l l . I f o s c i l l a t i o n s do n o t o c c u r , t h i s does n o t n e c e s s a -r i l y mean t h a t t h e s o l u t i o n i s a c c u -r a t e ; t o t h i s e n d , R must u s u a l l y s t i l l be s m a l l .
S e v e r a l methods have b e e n p r o p o s e d t o i m p r o v e t h e a c c u r a c y and p r e v e n t o s c i l -l a t i o n s , o f t e n b y u s i n g ( f i r s t o r h i g h e r o r d e r ) " u p s t r e a m " schemes. Some o f t h e s e have b e e n a n a l y s e d and shown t o have t h e same d i f f i c u l t i e s , t h o u g h o f t e n t o a l e s s e r d e g r e e . I f no b o u n d a r y - l a y e r o c c u r s o r i f a b o u n d a r y - l a y e r i s p r o p e r l y r e s o l v e d by means o f g r i d - r e f i n e m e n t , l a r g e r s t e p s ( a n d l a r g e r v a l u e s o f R) may be a p p l i e d e l s e w h e r e w i t h o u t o s c i l l a t i o n s a r i s i n g . However, a c c u r a c y has s t i l l t o be c h e c k e d . I n t h e f o r c e d s o l u t i o n , t h e a c c u r a c y i s d e t e r m i n e d n o t o n l y by t h e c e l l - R e y n o l d s number R, b u t r o u g h l y b y t h e m e s h - w i d t h Ax = R/Re i n r e l a t i o n t o t h e l e n g t h s c a l e i m p o s e d b y t h e f o r c i n g t e r m s . G e n e r a l l y , t h e l a r g e r Re, t h e l a r g e r v a l u e s o f R a r e a l l o w e d , b u t no s t r i c t r u l e s have been d e r i v e d .
6. R e f e r e n c e s
Egan, B.A. and J.R. Mahoney, 1972 - N u m e r i c a l m o d e l i n g o f a d v e c t i o n and
d i f f u s i o n o f u r b a n a r e a s o u r c e p o l l u t a n t s , J . A p p l . M e t e o r o l o g y ,
J2, 312-322
Fromm, J.E,, 1968 - A m e t h o d f o r r e d u c i n g d i s p e r s i o n i n c o n v e c t i v e d i f f e r e n c e
schemes, J . Comp.Phys. 2» 176-189
Huffenus, J.P. and D. Khaletzky, 1981 - The L a g r a n g i a n a p p r o a c h o f a d v e c t i v e
t e r m t r e a t m e n t and i t s a p p l i c a t i o n t o t h e s o l u t i o n o f N a v i e r - S t o k e s e q u a t i o n s . I n t . J . Num. M e t h . F l u i d s , j _ , 4, 365-387
Jensen, O.K. and B.A. Fiy^layson, ^ 8 0 - O s c i l l a t i o n l i m i t s f o r w e i g h t e d r e s i d u a l
methods a p p l i e d t o c o n v e c t i v e d i f f u s i o n e q u a t i o n s . I n t . J . Num. M e t h . E n g i n e e r i n g , ^5^, 1681-1689
Kellogg, R.B., G.R. Shubin and A.B. Stephens, 1980 U n i q u e n e s s and t h e c e l l
-R e y n o l d s number, SIAM J . Num. A n a l . J_7, 6, 733-739
Van Leer, B, 1977 - Towards t h e u l t i m a t e c o n s e r v a t i v e d i f f e r e n c e scheme. I I I ,
U p s t r e a m c e n t e r e d f i n i t e - d i f f e r e n c e schemes f o r i d e a l c o m p r e s s i b l e f l o w , J . Comp. Phys. 2_3, 3, 263-275
Leonard, B.P., 1980 The QUICK a l g o r i t h m : a u n i f o r m l y t h i r d o r d e r f i n i t e
-d i f f e r e n c e m e t h o -d f o r h i g h l y c o n v e c t i v e f l o w s , i n : K. M o r g a n e t a l ( e -d s ) Computer methods i n f l u i d s , P e n t e c h P r e s s , L o n d o n , 159-195
Pedersen L.B. and L.P. Prahm, 1974 - A method f o r n u m e r i c a l s o l u t i o n o f t h e
a d v e c t i o n e q u a t i o n , T e l l u s _26, 5, 594-602
Roache, P.J., 1972 - On a r t i f i c i a l v i s c o s i t y , J . Comp. P h y s . _K), 2, 169-184 Segal, A,, 1981 A s p e c t s o f n u m e r i c a l methods f o r e l l i p t i c s i n g u l a r p e r t u r
-b a t i o n p r o -b l e m s . R e p o r t 81-08, D e l f t U n i v e r s i t y o f T e c h n o l o g y , D e p t . M a t h e m a t i c s and I n f o r m a t i c s
Stoyan, G., 1979 - Monotone d i f f e r e n c e schemes f o r d i f f u s i o n - c o n v e c t i o n p r o b l e m s ,
ZAÏ1M 59^, 361-372
Viollet, P.L., A. Keramsi and J.P. Benqué, 1981 - Modélisation b i d i m e n s i o n e l l e
d'ëcoulements en c h a r g e d'un f l u i d e i n c o m p r e s s i b l e non i s o t h e r m e , J. de M e c a n i q u e , 2£, 3, 557-589
Vreugdenhil, C.B., 1979 Fromm's z e r o a v e r a g e p h a s e e r r o r s c h e m e f o r a n o n
2 ^ o r d e r
Fromm
QUICK
S j o r d e r
e x a c t
F i g . 1 The c h a r a c t e r i s t i c r o o t rz as a f u n c t i o n o f t h e c e l l - R e y n o l d s number Rin O I I I I 1 I I I I I I I I 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
X
i i n e c o d e
upstream —
c e n t r a l —
2^^ order
-Fromm
QUICK
3^ order —
e x a c t —
N u m e r i c a l s o l u t i o n o f t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n f o r Re1 1 1 1 1 1 1 1 1 1 I 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
X
1 ine c o d e
u p s t r e a m —
c e n t r a l
2^^ order
Fromm
QUICK
3 ^ o r d e r
e x a c t
F i g . 3 N u m e r i c a l s o l u t i o n o f t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n f o r Re = 100O d ' - n L n d I — I 1 \ n 1 1 1 1 1 1 0.0 0.1 0.2 0.3 0,4 0.5 0.6 0.7 0.8 0.9 1.0
X 1 ine c o d e
upstream —
c e n t r a l —
2'^order
-Fromm
QUICK
3 ^ o r d e r —
e x a c t —
N u m e r i c a l s o l u t i o n o f t h e c o n v e c t i o n - d i f f u s i o n e q u a t i o n f o r R e = 1000L n d I I I I I 1 ~ 1 1 I 1 1 1 1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0