Jurnal f Scientific Cmputing, Vl. 4, N. 1, 1989 Chebyshev Pseudspeetral Methd f Viscus Flws with Crner Singularities W. W. Schaltz, 1 N. Y. Lee, 1'2 and J. P. Byd 3 Received February 3, 1989 Chebyshev pseudspectral slutins f the biharmnic equatin gverning twdimensinal Stkes flw within a driven cavity cnverge prly in the presence f crner singularities. Subtracting the strngest crner singularity greatly imprves the rate f cnvergence. Cmpared t the usual stream functin/ vrticity frmulatin, the single furth-rder equatin fr stream functin used here has half the number f cefficients fr equivalent spatial reslutin and uses a simpler treatmer/t f the bundary cnditins. We extend these techniques t small and mderate Reynlds numbers. KEY WORDS: equatins. Crner singularities; pseudspectral methds; Navier Stkes 1. INTRODUCTION The numerical study f flw singularities is very imprtant since they typically increase cmputatinal errrs. Singularities usually develp where the bundary cntur is nt smth, such as at crners. A typical example is the viscus flw driven by the tangential mtin f the tp bundary in a rectangular cavity (Fig. 1). The upper crners where the mving bundary meets the statinary bundaries are singular pints f the flw where the vrticity becmes unbunded and the hrizntal velcity is multivalued. The lwer crners are als singular pints, but are weaker in the sense that ne mre derivative is required t make a flw unbunded. The presence f singularities pses a particular prblem fr spectral J Department f Mechanical Engineering and Applied Mechanics, University f Michigan, Ann Arbr, Michigan 48109. z Currently at Krea Institute f Energy and Resurces, Taejn, Krea. 3 Department f Atmspheric, Oceanic, and Space Science, and Labratry fr Scientific Cmputatin, University f Michigan, Ann Arbr, Michigan 48109. 854/4/1-1 1 0885-7474/89/0300-0001506.00/0 9 1989 Plenum Publishing Crpratin
2 Schultz et al. I vl = i (A, I) I (-A, -i) //~2 F2 Fig. 1. Prblem schematic. methds. These methds cnverge expnentially if a slutin is infinitely differentiable (Gttlieb and Orszag, 1977), but singularities destry the expnential cnvergence f the spectral cefficients. The errrs caused by the singularity are typically spread ver the entire slutin dmain in the frm f Gibb's scillatins. As a result, mst previus studies using spectral calculatins avid prblems that have crner singularities. Instead they usually examine prblems that have peridic bundary cnditins in all but perhaps ne directin--furier representatins are used in the peridic directins and Chebyshev r Legendre plynmials in the ther directin. Fr the Pissn equatin with weak crner singularities, hwever, the duble-chebyshev spectral slutins (Haidvgel and Zang, 1979; Byd, 1986) are still shwn t be superir t the furth-rder finite difference methd. The Chebyshev cefficients (amn) decay algebraically as (m +//)-6. The maximum pintwise errr decreases mre slwly as O(N 4) where N is the upper limit n the degree f the Chebyshev terms as expected fr a tw-dimensinal series. In this paper we present a mdified pseudspectral methd that subtracts the strngest (inhmgeneus) singularities frm the streamfunctin. The sum f Chebyshev plynmials then represents a functin that is nly weakly singular. We test ur apprach n the driven cavity prblem, which has been extensively studied using different numerical methds (Burggraf, 1966; Pan and Acrivs, 1976; Gupta, 1981; Ghia, Ghia, and Shin, 1982; Kelmansn,
Chebyshev PseudspectraIMethd 3 1983; Schreiber and Keller, 1983; Quartapelle and Naplitan, 1984; Ku and Hatziavramidis, 1985; Gustafsn and Leben, 1986). The standard way t accmmdate crner singularities in these nnspectral cmputatinal techniques is t use lcal mesh refinement. The tw cmmn methds f slving tw-dimensinal viscus flw prblems use the stream functin/vrticity r primitive variable frmulatins. A majr difficulty psed by the stream functin/vrticity frmulatin f the Navier-Stkes equatin is the cmplexity f the vrticity bundary cnditins. The primitive variable frmulatin, n the ther hand, requires the pressure t be determined frm a Pissn equatin by taking the divergence f the mmentum equatin with an incmpressibility cnstraint. The biharmnic equatin fr the stream functin avids the abve difficulties (Schreiber and Keller, 1983) and als has the advantage f fewer unknwns--ne-third the number f the primitive variable frmulatin and ne-half that f the stream functin/vrticity frmulatin fr equivalent reslutin. We begin this paper by presenting a mdified pseudspectral methd fr the biharmnic equatin fr Stkes flw (zer Reynlds number), since the flw sufficiently clse t a sharp crner is dminated by viscus terms. We then cmpute nnlinear flws in Sectin 4 t demnstrate that the mdified methd is als effective fr small and mderate Reynlds number. 2. FORMULATION In the absence f inertia, the steady-state flw f a viscus incmpressible fluid in a rectangular cavity is gverned by the Stkes equatin. After scaling length and velcity by the half-depth and wall velcity, respectively, the gverning equatin and bundary cnditins becme and V4~] =0 (2.1a) ~b = q)x=0 nx= _+A (2.1b) = ~y=0 n y= -1 (2.1c) ~p=~by+ 1 =0 ny=l 2.1d) where ~ is the dimensinless stream functin. Equatin (2.1d) implies that the upper bundary mves at unit velcity, while the ther walls remain statinary. The nly dimensinless parameter fr this prblem is the aspect rati, A, which we chse t be unity fr this study.
4 Schultz et al. The analytical slutins fr Stkes flw near singular crners have been btained by Mffatt (1964). The singular slutin Os(r l, 01), given in plar crdinates centered at the upper crners (see Fig. 1), is Os=rlf~(01)+ ~ bir~'+lfi(oi) (2.2) The first term has the mst imprtant effect near the upper crners and is cmpletely determined by the inhmgeneus bundary term in Eq. (2.1d). The ther terms in the sum are less singular hmgeneus terms with cnstants that must be determined glbally. The singularities at the bttm crners are similar in frm t Eq. (2.2) except that the inhmgeneus term is absent. T btain excellent cnvergence prperties fr this prblem, it is sufficient t accunt fr the mst singular term; hence, we will almst exclusively discuss results when nly the mst singular term is cnsidered. If Os includes the ther terms, the cefficients f the hmgeneus singular functins (bi) must be included alng with the spectral cefficients in the algebraic system. The general frm f the functins fi(01) is fl(o1)=alcsol+bisinol+clolcsol+diolsin01 fi(01) = A; cs(2s + 1) 01 + B, sin(2s + 1) 01 (2.3a) + Ce cs(2i- 1 ) 01 + Di sin(2i- 1) 01 (2.3b) Here, 2i are the cmplex eigenvalues in the first quadrant f the characteristic equatin 2~ sin c~ _+ sin()~c~) = 0 (2.3c) where c~ is the inner angle f the crner, in this case ~r/2. Cnstants A~, B~, Ci, and D~ are determined by the bundary cnditins. These cnstants are cmplex except fr i= 1. The bundary cnditins (2.1b) and 2.1d) n x = -1, y = 1 can be rewritten as and = Ox = 0 n 01 = n/2, (2.4a) ~=0, I~y+ 1 =0 n01=0 (2.4b) Using Eq. (2.2) and bundary cnditins (2.4), we can write the frm f the strngest crner singularity at bth upper crners as Os=rl[Ox(csOl--2sinO1)--(2)2sinOll/(~---4--1) (2.5)
Chebyshev PseudspectralMethd 5 Using the additinal inhmgeneus and hmgeneus singular basis functins f (2.2), we define an auxiliary stream functin by ~1 = ~/a -I- ips, (2.6) where Os = O sl fr this example (the hmgeneus singular functins are ignred) and Oa is the stream functin after the mst singular behavir is subtracted thrughut the entire slutin dmain. The unknwn functin Oa(x, y) is expanded as a truncated duble Chebyshev series s that ~O(x, y) is apprximated as N M ~= ~ ~ amntn(x ) Tm(y)+Os (2.7) n=0 m=0 Since (2.7) des nt satisfy the bundary cnditins, these must be impsed using the tau methd. Lanczs (1964) presents a simple frmula t determine the number f internal cllcatin pints, PQ, in the x and y directins, respectively: P=N+ 1-v Q = M + 1 - v (2.8a) (2.8b) where v is the number f bundary cnditins in each directin (tw fr secnd-rder elliptic partial differential equatins and fur fr furthrder). The truncatin shwn in (2.7) has (N+ 1)(M+ 1) ttal degrees f freedm, s frmulas (2.8) result in a deterministic system that is easily slved fr all rders f ne-dimensinal differential equatins and fr twdimensinal, secnd-rder differential prblems. The differential equatin is applied n the internal cllcatin pints and the bundary cnditins are applied n the exterir pints. Fr the tw-dimensinal, furth-rder differential equatin, these frmulas lead t an underdetermined system when a rectangular array f P by Q cllcatin pints is used. Our attempts t make a determinate system using nnrectangular cllcatin arrays (i.e., adding mre cllcatin pints n the bundary) led t singular matrices. This is prbably ne reasn why previus researchers have used the stream functin/vrticity frmulatin. [Anther pssible methd with the stream functin frmulatin uses basis functins that satisfy the bundary cnditins s that the tau bundary cnstraints are unnecessary. Althugh a rectangular array f cllcatin pints leads t a determined system fr this methd, there are several algebraic cmplicatins (Zebib, 1984), especially fr inhmgeneus bundary cnditins.] In this paper we increase P and Q (usually by 1) resulting in a slightly verdetermined system, which must
- 1) 6 Schultz et al be slved in a least-squares sense. The internal cllcatin pints are chsen t be the rts f the Chebyshev plynmial x i = -cs i = 1... P = N- 2 (2.9a) and yj=-cs ~ j=l... Q=M-2 (2.9b) Recgnizing that V4O, = 0, we write the partial differential equatin (2.1a) as ~= m= am,, ~x 4 Tn(xi) Tm(Yj) + 2 ~x 2 T,,(xi) +--5 Tm(Yj) ] + T,,(xi) dy--- ~ Tm(yj) = 0 (2.10) The bundary cnditins (2.1b)-(2.1d) are cmplicated by cntributins f the singular stream functin and its nrmal derivative: and N M 2 2 amn(+l)ntm(yj)'+'l~s(+l, yj) =0 (2.1 la) n=0 m=0 N M E ~ amntn(xi)('-}-l)m+l/is(xi, +1)=0 (2.11b) n-0 m=0 U M d ~ am~n2(+l) n Tm(yj)+~x0,(_+l, yj)=0 (2.11c) n=0 m=0 :v M d F~ ~ am~rn(xi)m2+~y~',(x~,l)+ 1= (2.11d) n=0 m=0 N M 2 2 amn Tn(xi) m2( - n=0 m=0 dy m +1 + d 0s(xi, _ 1 ) =0 (2.11e) where i= 1... P, and j = 1,..., Q. We usually exclude the nrmal derivative bundary cnditins (2.11c)-(2.11e) at the fur crners because f discntinuities in the nrmal directins. Hwever, when we apply the additinal bundary cnstraints that require bth nrmal derivative bundary cnditins t be zer at the crner, we have btained a mdest imprvement in results.
Chebyshev Pseudspectral Methd 7 Byd (1989) intrduces an effective methd t evaluate the derivatives f the trignmetric functins using the transfrmatin x = cs(t), which cnverts the Chebyshev series int a Furier csine series: Tn(x) = cs(nt) (2.12) We have fund that the derivatives cmputed this way are less susceptible t rund-ff errrs than the mre usual recurrence frmulas. The derivatives f the Chebyshev plynmials are listed in the Appendix. The resulting verdetermined matrix prblem is slved using a rutine based n Husehlders' transfrmatin (Glub, 1965). The cst is O(U2V) peratins, where U is the number f unknwns and V is the number f equatins. We have als tried a least-squares cnjugate gradient iterative technique (Fletcher and Reeves, 1964), which slves the prblem in O(UVI) peratins, where I is the number f iteratins. This methd needed many iteratins, hwever. Presumably, precnditining wuld accelerate the cnvergence, althugh we did nt experiment with precnditining. 3. NUMERICAL RESULTS Table I summarizes calculatins fr the stream functin at varius truncatins after subtracting the strngest singularity. The Stkes flw slutin fr a driven cavity is symmetric with respect t the x-axis. There- Table I. Stream Functin Cmparisn M y x=0 x=0.25 x=0.5 x=0.75 5 0.03346 0.02886 0.01739 0.005303 7 0.03332 0.02868 0.01715 0.005126 9 --0.5 0.03348 0.02890 0.01740 0.005215 11 0.03348 0.02890 0.01740 0.005214 Kelmansn 0.0336 0.0290 0.0174 0.0052 5 0.1177 0.1037 0.06640 0.02202 7 0.1177 0.1037 0.06641 0.02215 9 0.0 0.1179 0.t039 0.06663 0.02224 11 0.1179 0.1039 0.06664 0.02225 Kelmansn 0.1180 0.1040 0.0666 0.0222 5 0.1993 0.1836 0.1344 0.05510 7 0.1996 0.1840 0.1350 0.05536 9 0.5 0.1997 0.1840 0.1350 0.05537 11 0.1997 0.1840 0.1350 0.05537 Kelmansn 0.1996 0.1840 0.1350 0.0554 r
8 Schultz et al fre, we reduce the number f grid pints in the x-directin by a factr f 2 and examine the slutin nly n the dmain 0 ~< x ~< 1. Since we retain nly thse basis functins that have the same symmetry as the slutin [terms with Tn(x) f n dd are discarded], and since we present slutins with equal reslutin in the x and y directins, the number f degrees f freedm is (M+ 1)2/2. Our results agree well with the mdified bundary integral results f Kelmansn (1983), when they are adjusted t ur length scale. Kelmansn presents results with 50, 100, and 200 bundary elements. The mdified bundary integral methd includes fur singular terms and in cntrast t his regular bundary integral methd, shws cnvergence t the three digits shwn with 100 elements. Our slutins cnverges s rapidly that this pseudspectral methd gives apprximately the same accuracy as Kelmansn using ne-furth the degrees f freedm [(M+1)2/2=50 versus 100 bundary elements with tw unknwns n each nde]. Since 0.5 ~ 0 84-0.5 9-1 \ - -0'.5 stream functin { 0.5 vrticity Fig. 2. Streamlines (left) and vrticity lines (right) fr cmputatins withut singular functin. The streamline cnturs are shwn in increments f 0.02. The maximum streamfunctin value is slightly larger than 0.2 in the primary vrtex. Spurius eddies ccur alng the side and bttm walls and the Mffatt eddies are nt captured using this scheme. The vrticity cnturs are shwn in increments f 2, with the psitive values n the tp wall and negative values n the side wall.
Chebyshev PseudspectralMethd 9 ur results cnverge very rapidly, the spectral methd will be even mre practical fr mre accurate results. Figures 2 and 3 shw lines f cnstant stream functin and vrticity frm the pseudspectral methd withut and with the mst singular basis functin, ~s, respectively. Figure 2, which des nt subtract the strngest singularity, shws spurius scillatins near the bundaries that thers have nted (Ku and Hatziavramidis, 1985). Figure 4, an enlargement f the lwer crner f Fig. 3, shws the sequence f Mffatt eddies. With ur methd, repeated calculatins using mre refined grids near the crners, as in Pan and Acrivs (1976) and Ghia, Ghia, and Shin (1982) are unnecessary. It can be easily shwn that n further eddies can be reslved using the tau methd with the precisin limitatins f ur calculatins (16 digits) because the abslute value f the stream functin f the next eddy is t small. T find the further sequence f eddies, the calculatins can be mdified t btain the first hmgeneus singular functin at the lwer crner. When we included this cefficient in the expansin, as described earlier, the slutin did nt cnverge faster. This is mst likely due t illcnditining caused by intrducing such a cefficient int the algebraic / I 0 5 ' /, ( 9 / >, 0 ~ - - - - - - - - - ~ -... r i i -1-1 -0.5 0 0.5 1 X stream functin vrticity Fig. 3. Streamlines (left) and vrticity lines (right) fr cmputatins with singular functin. The streamline and vrticity cnturs are shwn with the same increments as Fig. 2, except fr negative streamfunctin values with increments f 10-6 t bserve the largest Mffatt eddy in the lwer crner.
10 Schultz et al system and because we did nt intrduce a similar cefficient fr the upper crners. At any rate, as Gustafsn and Leben (1986) shw, even the largest Mffatt eddy can be described adequately by ne singular cefficient. We find nly minute differences between the cmputatins shwn in Fig. 4 and thse f the first eigenfunctin when the nrmalizatin is determined by a best fit given by Dl=(-8.53x10 3,-1:551x10 2)/(21+1), where ),~ = (2.73959, 1.11902). A similar blw-up f an upper crner, Fig. 5, shws n eddies, as expected, since the strngest singular eigenfunctin is nt cmplex there. In Table II, the maximum value f the stream functin within each eddy fr ur cmputatins with 30 x 30 truncatin is cmpared t thse btained by Pan and Acrivs (1976) and Gustafsn and Leben (1986). The value f I//3 was determined frm the lcal slutin using the D 1 listed abve. The stream functin value f the crner eddies is in gd agreement with thse predicted by a scheme emplying a lcal refinement and multigrid algrithm (Gustafsn and Leben, 1986). The distance frm the apex t the center f the first and secnd crner eddies dl/d 2 is 16.5 as in Gustafsn and Leben, which is already in gd agreement with the asympttic result d~/d 2 = 16.4 btained by Mffatt (1964) as r ~ 0. -0.8 Fig. 4. -1 \ x \, \ -0.8 Enlargement f Mffatt eddies in lwer crner. The streamline cnturs have the values -lx10-6, -2x10-6, -3x10-6, -4x10 6, and -4.4x10 6.
Chebyshev Pseudspectral Methd 11 1 0.8 0.8 / / / / Fig. 5. Enlargement f upper crner. The streamline cnturs have the values 2 x 10-2, lxl0 2, txl0-3, and lxl0 4. X I' / Figure 6 shws the cnvergence f the inhmgeneus singular functin spectral cefficients by expanding ~, as a duble series f Chebyshev plynmials using pseudspectral methds. As expected, the cefficients (amn) cnverge algebraically at apprximately rder (m + n)-4 because the first derivative is discntinuus at the crners. Figures 7 and 8 shw the pseudspectral cefficients f the driven cavity prblem using a truncatin f N = M = 29 (i.e., 30 x 30 truncatin) with and withut the mst singular basis functin, respectively. The cefficients appear t cnverge algebraically at a very large rate fr bth pseudspectral representatins. The maximum cefficients fr ~a (Fig. 7) are smaller by abut a factr f 100 than fr ~ itself (Fig. 8) fr fixed n+m. Table II. Vrtex Intensities Pan and Gustafsn Vrtex Acrivs and Leben Present ~b I 0.2 0.20012 0.20014 ~/2 --2.2 10-6 -4.46 10-6 -4.454 10-6 03 6.6x10-11 1.24x10 10 1.24 xl0 10
10 ~ 10 -I 10-2 I 0 -~ ~ I 0-4 10-5 B ~. :O::~ ':~ B:~ ~ ~ : ~ *~ ~ 9 a %1%,.* ~ ~ 1 ~ 7 6 1 7 6 10-8 i 0-7 ~ % O 10.8 1 { l 1 l l l i II l I l l ] l i i i' i ~ re+n+2 Fig. 6. Cnvergence f the spectral cefficients f the inhmgeneus singular functin. N=M=29. == 10 0 10 -I 10-2 1 0 -~ 1 0-4 i0-5 1 0 -a 1 0 -v 10 -a 10-9 10-1 i0-11 10 -]2 i0-13 t a 9 ~ Q ed D : 9 ~.:.. 9 lea~176 %,S~ O ~ ~ Fig. 7. I0-14 i i0 ~ 10 ~ m+n+2 Cnvergence f the spectral cefficients fr the driven cavity prblem with singular functin. N = M = 29.
Chebyshev Pseudspeetral Methd 13 The rate f cnvergence f the cefficients is ften used t infer the cnvergence f the slutin, althugh sme care is needed because the errr usually decreases at a slwer rate f cnvergence than the cefficients. We plt a cllage f the bunded (i.e., maximum abslute value fr fixed n + m) cefficient cnvergence fr Fig. 6-8 n Fig. 9. In additin, we have pltted the bunded cefficients fr the next mst singular functin in the upper crner bzr;a+]f2 with the cefficient b2 predicted by Kelmansn (1983). The spectral representatin f b2/2 + lf2 exhibits faster cnvergence than the mre singular inhmgeneus functin, as expected; hwever, it is still slwer than the cefficients frm the slutin fr the entire driven cavity. This is caused by the different methds t btain the cefficients: the cefficients in Fig. 7 are cmputed frm an verdetermined algebraic system, as ppsed t thse fr bzr;'z+~f2. It is difficult t ascertain the cnvergence rates f the previus cmputatins, in part because the cefficient cnvergence is ppsite f that expected. One wuld expect a crssver pint, where the expnential decrease f the spectral cefficients fr the mderate n and m is replaced by the slwer algebraic decay f the higher-degree cefficients as fund in slving Pissn and Bratu equatins with weak crner singularities (Byd, 1986). Figures 7 and 8 shw an I0 -I i O -z i O -a * : O 10-4 I O -5 ~ "Wr fi I 0 -e IO -v 10 -e ~ 'b~ sg,,%.}.~176 10-9 i0 -I l0 -u Fig. 8. 10-12 l ~ i l I I I I I I TI I I I I I ] I l' re+n+2 Cnvergence f the spectral cefficients fr the driven cavity prblem withut singular functin. N = M = 29.
14 Schultz et al 101 --h N i0 ~ 10 -I I 0 -z 1 0-3 10-4 1 0-5 10-8 i 0 -v I 0 -a 10-9 '7 '7 w v ~ 8000% ; N ~v D ~ c~ % I I I I I I I II I l I I I I I I td m+n+2 1f Fig. 9. Cnvergence f spectral cefficients. Only the largest cefficient fr fixed m +n is pltted. N=M=29. 9 Inhmgeneus singular functin, rfl (Fig. 6); 9 driven cavity prblem withut singular functin (Fig. 8); [~, driven prblem with singular functin (.Fig. 7); V, mst singular hmgeneus functin, b2 ra'-+ 1f2. increasing cnvergence rate at a crssver pint that ccurs near m+n+2=m. This appears t be due t the rectangular truncatin (presumably larger cefficients fr fixed m + n wuld ccur fr the small m r n nt included in the truncatin) and the nature f the verdetermined slutin, as will be shwn. The furth derivative f the Chebyshev plynmial is prprtinal t n 4 as shwn in the Appendix, hence the matrix cmpnents fr Eq. (2.10) becme larger as the truncatin increases. Since terms are prprtinal t /It 4 at the internal cllcatin pints, we inadvertently weight the tau bundary cnstraints (which are f rder n because they cntain at mst first derivatives) much less heavily. Therefre, we rescale the matrix, dividing each rw by the maximum value f each rw. Since we slve an verdetermined system, this scaling effectively changes the weighting f the least-squares prcedure. The scaled equatins then satisfy the bundary cnditins with much higher accuracy and give a mre accurate slutin thrugh the entire slutin dmain. Figure 10 shws the spectral cefficients fr varius truncatins when
Chebyshev Pseudspectral Methd 15 i0 ~ 10 -I 1 0-2 10 -a 0 0 0 O0 QO 1 0-4 c 1 0-5 i 0 -s i0 -v D % IP gg I 0 -e 10-9 10-1 10 -tl 10-12 ~ r u 10 -la 10 0 r l I i l I 111 m+n+2 Fig. 10. Cnvergence f spectral cefficients supplementing inhmgeneus singular functin with and withut using scaled matrix. Only the largest cefficient fr fixed rn + n is pltted. 9 30 x 30 scaled matrix; ~, 16 x 16 scaled matrix; D, 16 x 16 unscaled matrix; V, 30 x 30 unscaled matrix. the driven cavity prblem is supplemented by the inhmgeneus singular functin with and withut the scaled matrix. After subtracting the inhmgeneus singular functins the spectral cefficients amn using the scaled matrix shw algebraic cnvergence with rder (rn +n) -8 like the Chebyshev expansins f the hmgeneus and inhmgeneus singular functins f Fig. 9. The higher-rder cefficients withut the scaled matrix are damped ut, as shwn in Fig. 10, but thse with the scaled matrix are nt damped ut by the least-squares prcedure when we increase the truncatin. This damping f the high-rder cefficients with the least-squares prcedure and the unscaled matrix decreases the slutin accuracy, as explained belw. Fr purpses f cmparisn f the slutin cnvergence, we assume that the "exact" slutin is given by the scaled matrix system using a 30 x 30 truncatin, where the mst singular term is subtracted, since n exact slutin t the driven cavity prblem exists. We must als determine a suitable definitin f errr, which shuld evaluate the errr at ther than the cllcatin pints. We estimate an L2 errr f ~ evaluated at a unifrm
16 Schultz et al. rectangular grid (including pints n the bundary). The RMS errr evaluated in this way increases with the number f evaluatin pints in the grid, since the cnvergence is nt unifrm due t larger errrs near the singularities and bundary layers. Hwever, the relative accuracy f different slutins is unaffected by the evaluatin grid. Our errr estimates are based n an 81 x 81 grid. A least-squares fit f the slpe f the lg-lg plt in Fig. 11 shws that the errr cnverges algebraically with the rder f N 9 using the scaled matrix ver the shwn range f N+ M when supplemented by the singular functin. (The theretical cnvergence rate culd be quite different.) The cnvergence rate f the errr is apprximately N-3 when the mst singular functin is nt handled separately. Our cmputatins indicate a cnvergence rate f N-5 if the matrix is nt scaled (nt shwn). We cannt shw the exact cnvergence rate because the artificial "exact" slutin des nt allw the limit N ~ ~. This may, in part, explain the surprisingly high cnvergence rate f errr cmpared t the cnvergence rate f the cefficients. The cnvergence rate f the slutin 10 -I 1 0-2 10-3 10-4 i0 -s 10-8 I 0-7 i0 -s i0 -~ l-to I I I I1[ I I 10 N 1 l I I I I 100 Fig. 11. Cnvergence f driven cavity slutin with truncatin. The slutin subtracting the inhmgeneus singular functin with 30 30 truncatin is cnsidered the exact slutin, tb, With singular functin; A, withut singular functin.
Scaled Unscaled P 14 16 18 14 16 18-0.3971721 --2.86 10 6-4.6 x 10 -ix 2.15 10 5 L, Table II1. Cnvergence f the Overdetermined System al,1 a7, i a7,14 E2-0.3971724-1.46 x 10-5 4.2 x 10 7 1.93 x 10-7 --0.3971725 -- 1.46 x 10-5 7.5 10-7 1.63 10-7 --0.3971727 -- 1.33 x 10-5 1.1 x 10-6 6.33 x 10-7 --0.3971722 --3.44 x 10 6 5.4 x 10 -l~ 2.02 x 10 5 --0.3971722 --3.03 x 10-6 -6.7 x 10 11 2.11 10 5
18 Schultz et al shuld be lwer than that f the cefficients by tw rders. (Nte that k (m+n)k~o(n2-k)asn-+c~.) m = N n = N It is interesting t see the effect f increasing the number f grid pints (i.e., the number f equatins) withut changing the number f cefficients t check the cnvergence f a mre highly verdetermined system. Table III shws that the cnvergence f the higher-rder cefficients imprves as the system becmes mre verdetermined fr the unscaled system; hwever, the errr (cmpared t the "exact" slutin described fr Fig. 11) actually increases. The slutin using the scaled matrix is mre accurate than that f the unscaled matrix by factr f 50. This table indicates tw things: that it is dangerus t make cnclusins abut the cnvergence f the slutin frm the cnvergence f the cefficients, and that it is mre efficient t make the system as little verdetermined as pssible. Hwever, little additinal errr is intrduced by making the system mre verdetermined. 4. THE NONLINEAR PROBLEM We extend these techniques t small and mderate Reynlds numbers using the same inhmgeneus singular basis functin, since the nature f the singular flw near the crner des nt change when the nnlinear inertial terms are added. The Navier Stkes equatins gverning the steady flw f an incmpressible viscus fluid can be written as where G is the nnlinear cnvectin peratr, V40 - RGO = 0 (4.1) G~//= ~ v2 ~l/] ax ~1//V2 ~x ~1/1 (~y (4.2) and R is the Reynlds number. The n-slip bundary cnditins are still (2.1b)-(2.1d). The unknwn functin 0(x, y) is still expanded as a truncated duble Chebyshev series, adding the analytical frm f the mst singular functin. We still verdetermine the prblem using additinal cllcatin pints. The pseudspectral prblem then leads t a nnlinear least-squares prblem that is slved by a full Newtn's methd. This requires that a sequence f verdetermined linear prblems be slved fr Aamn, where a(i+l)_ (0 +Aamn (4.3) mn -- a rnn
Chebyshev PseudspectralMethd 19 and a~~ (the initial guess) is btained either frm a fully cnverged slutin at lwer Reynlds number r frm a lwer truncatin slutin at the same Reynlds number. We again slve fr Aamn using the verdetermined scaled matrix that divides the matrix cefficients by the maximum value f each rw. This scaling prcedure is much mre imprtant than fr Stkes flw, as the magnitude f the matrix elements fr large N is f rder N3R. The slutin using the unscaled matrix diverges when the Reynlds number is large. Als, the driven cavity flw with inertia is n lnger symmetric with respect t the x axis. Therefre, we must use bth even and dd Chebyshev plynmials in bth spatial crdinates. The iterated, verdetermined matrix equatins are slved as befre using a rutine based n Husehlders' transfrmatin (Glub, 1965). The Newtn iteratin f the algebraic nnlinear equatins is rbust. The prcedure cnverges with amnco) = 0 fr large Reynlds numbers and small truncatin, e.g., Re = 104 and N = 5. Increasing the spatial reslutin increases the iteratin cnvergence fr high Reynlds number as expected. We als find that tw prcedures related t the verdetermined system speed up the Newtnian iteratin cnvergence and enlarge the radius f cnvergence: weighting the bundary cnditins and increasing the number f cllcatin pints t further verdetermine the system. The results presented here use a bundary cnditin weighting f 103. That is, we use a secnd type f scaling: after making the maximum cefficient in each rw equal t ne as in Sectin 3, we multiply the rws representing the bundary tau cnstraints by 103. This als significantly imprves the cnvergence f the slutin errr with respect t increased truncatin N. The effect f making the system mre verdetermined is less prnunced--its primary advantage is t increase the cnvergence radius. It has a very little effect n the slutin errr with respect t increased truncatin N. Therefre, fr the sake f cmputatinal efficiency, the results presented here are verdetermined as little as pssible, i.e., P = N + 1 and Q = M + 1. Figure 12 shw the lines f cnstant stream functin with a strnger secndary vrtex in the lwer left crner fr R = 100 using 30 x 30 truncatin. The secndary vrtices in the lwer left crner becme larger while thse in the lwer right crner diminish in size and, due t numerical errrs, essentially "wash away." Similar figures fr R = 50 and 200 are nearly identical t thse f Ghia et al (1982) (ur Reynlds number is defined t be ne-half thse f thers since ur length scale is ne-half the cavity depth). As the Reynlds number increases, nnphysical Gibbs scillatins appear near the wall. Ku and Hatziavramidis (1985) find Gibbs scillatins near R = 50. They shw that these scillatins disappear when lcal expansins f the Chebyshev-spectral element methd are emplyed. Our verdetermined prcedure des nt exhibit this prblem until
20 Schultz et al i -0.5 [ -I -0i.5 0 0.5 X Fig. 12. The streamline cnturs fr R = 100 are shwn in increments f 0.02. The streamline cnturs in the lwer left crner are 0.0 and - 1 x 10-4. significantly higher Reynlds numbers (R,,~250) as lng as the bundary cnditins are weighted and the inhmgeneus singularity is subtracted t avid the prblem shwn in Fig. 2. The vrticity values n the side walls near the upper crners f the driven cavity fr 18 x 18 truncatin and varius R are shwn in Table IV. We cmpare these values with thse btained using a perturbatin slutin (Gupta, Manhar, and Nble, 1981) and a finite difference methd (Gupta, 1981) that are mdified t fit ur length scale. Our slutin shws gd agreement with the perturbatin slutin, especially fr lw Reynlds number. Since the perturbatin prcedure uses nly the lcal slutin, it is nly valid in the limit as the distance frm the crner ges t zer. Hence, the difference between the spectral and perturbatin slutins is due t the less singular hmgeneus terms that the perturbatin prcedure cannt take int accunt. The spectral results are cnsiderably mre accurate than the finite difference results, as indicated by the cnvergence data belw. Table V shws the cnvergence f the vrticity near the upper crner n the statinary wall. Since the vrticity values near the crner are nearly singular, they cnverge slwly even thugh the Reynlds number is small. We btain 5 digit (R = 0), 4 digit (R = 0.5), and 2 digit (R = 5) cnvergence
Chehyshev Pseudspectral Methd 21 Table IV. Vrticity Values n the Statinary Walls: 18 x 18 Truncatin R (x, y) Spectral Perturbatin Finite difference 0 (-1, 0.9) -13.6395-13.6295-9.04 (1, 0.9) -13.6395-13.6295-9.04 0.5 (--1, 0.9) -13.693-13.67-9.07 (1, 0.9) -13.578-13.59-9.05 5 (-1, 0.9) -14.2-14.02-9.27 (1, 0.9) -13.1-13.27-8.85 25 (-1, 0.9) -16.3-15.91-9.27 (1, 0.9) -11.0-12.16-8.85 50 (-1, 0.9) -18.3-19.01-11.22 (1,0.9) -8.7-11.52-7.53 using 18 x 18 truncatin, shwn in Table V. As might be expected frm a glbal spectral methd, the vrticity des nt cnverge well at ther lcatins, especially in the bundary layer near the mving wall. Kelmansn (1983) presents the hmgeneus singular cefficients near the crner using a bundary integral methd mdified t accunt fr the singularity in the Stkes flw prblem (R = 0). Using his singular cefficients we estimate a vrticity value f -13.63918 at x=-1, y=0.9 (Kelmansn defines vrticity with the ppsite sign in his paper). Our slutin (c = -13.63928) using 17 x 17 truncatin agrees with Kelmansn (1983) t within five digits. Our slutin shuld be mre accurate because ur slutin fr stream functin gives 11 decimal accuracy (at 30x 30 truncatin), but Kelmansn's gives nly 4 decimal accuracy, as shwn n Table I. Table V. Cnvergence f Vrticity Values at x = -1, y = 0.9 Truncatin R = 0 R = 0.5 R = 5 R = 50 9 x 9 -- 13.6369-13.6435-13.04-11.37 12 12-13.6394-13.6648 --13.88-12.93 15 x 15-13.6394-13.6841 --14.08-15.96 18 x 18 --13.6394-13.6936-14.18-18.28 21 21-13.6395-13.6905-14.15-18.70 24 x 24-13.6394 --13.6788-14.04-17.82 30 x 30-13.6394-13.6730 -- --17.82
22 Schultz et al. Figure 13 shws the spectral cefficients cnvergence fr three different Reynlds numbers. A fit f Fig. 13 shws that the nnzer Reynlds number cefficients cnverge at the slwer rate f (n+m) s. Fr sufficiently high Reynlds number, the nnlinearity rather than the singularity causes the slw cnvergence at this truncatin, even thugh the nnlinear terms shuld nt affect the asympttic cnvergence limit (Byd, 1986). We cmpare ur results fr velcity t thse f Ghia et al. (1982) fr R = 50 and 200. In spite f ur lack f cnvergence f the vrticity at the crner (Table V), the vertical velcities fr R = 50 at the cavity centerline are fully cnverged. A similar velcity prfile with 26x26 truncatin is indistinguishable frm the results using 20 x20 truncatin. This wuld indicate that the results f Ghia et al. (1982) shwn in Fig. 14 have nt yet cnverged fr their 129 x 129 r 258 x 258 grid. Hwever, the cnvergence f the spectral results fr R--200 is cnsiderably slwer. We d nt knw why this is s, but a plt f the spectral cefficients similar t thse in Fig. 13 (nt shwn) shws a trend similar t thse fr R = 100 but with a sharp rise arund n + m + 2 = 38. This indicates that the nnlinearity, and nt the singularity, is causing the mst cmputatinal difficulties. i0 ~ 10 -I D D a 1 0-2 i0 -S 10-4 10 -s Drn D ~ ~ ~ ~ "~ Fig. 13. 10-6 I 0 -v 10-8 i0-9 10-1 10-11 i I I I I I I Ill m+n+2 ~ % ~ % ~ ~ O O I I l I [ I I I Cnvergence f spectral cefficients fr varius Reynlds number (all truncatin is 30x 30). 9 R=0; ~, R=I; D, R=100.
Chehyshev Pseudspectrai Methd 23 0.4 0.3 0.2 0.1 0.0-0.1-0.2-0.3-0.4-0.5 - -0.5 0 I X I 0.5 Fig. 14. Vertical velcities at the cavity centerline (y = 0). --, R = 50, N= 14 spectral; -- --, R = 50, N= 20 spectral; O, R = 50, N= 129 finite difference (Ghia et al., t982);..., R = 200, N = 20 spectral; -- - --, R = 200, N = 23 spectral;..., R = 200, N = 26 spectral; --, R = 200, N = 29 spectral; [3, R = 200, N = 129 finite difference (Ghia et al., 1982). 5. CONCLUSIONS We presented a pseudspectral methd supplemented by the analytic frm f the crner singularity presented fr tw-dimensinal Stkes flw prblems using the stream functin frmulatin. The methd gives accurate slutins with far fewer grid pints than higher-rder finite difference and mdified bundary integral methds. The rate f cnvergence fr the pseudspectral cefficients and the errr is greatly imprved by subtracting the mst singular part f the slutin and using a scaled matrix. The verdetermined pseudspectral methd prves t be simple t prgram, and is ecnmical and very accurate. These techniques are extended t the slutin f the driven cavity prblem with inertia using the steam functin frmulatin. The slutins are shwn t be accurate fr small and mderate Reynlds numbers using nly 18x 18 truncatin. These techniques are nt well suited t the calculatin f much thinner bundary layers because Gibbs scillatin may degrade numerical
24 Schultz et al. accuracy. We recmmend using a mapping r dmain decmpsitin fr high Reynlds number flws. ACKNOWLEDGMENTS This wrk was partially supprted by the Natinal Science Fundatin under cntracts Ns. MSM-8504456 and DMC-8716766 and partially by the Naval Research Labratry under cntract N. N00014-85-K-2019. REFERENCES Byd, J. P. (1986). An analytical and numerical study f the tw-dimensinal Bratu equatin, J. Sci. Cmput. 1, 183-206. Byd, J. P. (1989). Chebyshev and Furier Spectral Methds, Springer-Verlag, New Yrk. Burggraf, O. (1966). Analytical and numerical studies f the structure f steady separated flws, J. Fluid Mech. 24, 113-151. Fletcher, R., and Reeves, C. M. (1964). Functin minimizatin by cnjugate gradients, Cmput. J. 7, 149-154. Ghia, U., Ghia, K. N., and Shin, C. T. (1982). High-Re number slutins fr incmpressible flw using the Navier-Stkes equatin and a multi-grid methd, J. Cmput. Phys. 48, 231-248. Glub, G. (1965). Numerical methds fr slving linear least squares prblems, Numer. Math. 7, 206-216. Gttlieb, D., and Orszag, S. A. (1977). Numerical Analysis f Spectral Methd. Thery and Applicatins, Sciety fr Industrial and Applied Mathematics, Philadelphia. Gupta, M. M. (1981). A cmparisn f numerical slutins f cnvective and divergence frms f the Navier-Stkes equatins fr the driven cavity prblem, J. Cmput. Phys. 43, 260-267. Gustafsn, K., and Leben, R. (1986). Multigrid calculatin f subvrtices, Appl. Math. Cmput. 19, 89-102. Gupta, M. M., Manhar, R. P., and Nble, B. (1981). Nature f viscus flw near sharp crners, Cmput. Fluids 9, 379-388. Haidvgel, D. B., and Zang, T. (1979). The accurate slutin f Pissn equatin by expansin in Chebyshev plynmials, J. Cmput. Phys. 30, 167-180. Kelmansn, M. A. (1983). Mdified integral equatin slutin f viscus flw near sharp crners, Cmput. Fluids 11, 307-324. Ku, H. C., and Hatziavramidis, D. (1985). Slutin f the tw-dimensinal Navier-Stkes equatins by Chebyshev expansin methd, Cmput. Fluids 13, 99-113. Lanczs, C. (1964). Applied Analysis, Prentice-Hall, Englewd Cliffs, New Jersey. Mffatt, H. K. (1964). Viscus and resistive eddies near a sharp crner, J. Fluid Mech. 18, 1-18. Pan, F., and Acrivs, A. (1976). Steady flws in rectangular cavities, J. Fluid Mech. 28, 643-655. Quartapelle, L., and Naplitan, M. (1984). A methd fr the slving the factrized vrticitystream functin equatins by finite elements, Int. J. Num. Meth. Fluids 4, 109-125. Schreiber, R., and Keller, H. B. (1983). Driven cavity flws by efficient numerical techniques, J. Cmp. Phys. 49, 310-333. Zebib, A. (1984). A Chebyshev methd fr slutin f bundary value prblems, J. Cmput. Phys. 53, 443-455.