an explicit fourth-order compact finite difference scheme for three-dimensional...

10
AN EXPLICIT FOURTH-ORDER COMPACT FINITE DIFFERENCE SCHEME FOR THREE-DIMENSIONAL CONVECTION–DIFFUSION EQUATION JUN ZHANG * Department of Computer Science and Engineering, University of Minnesota, 4-192 EE/CS Building, 200 Union Street S.E., Minneapolis, MN 55455, U.S.A. SUMMARY We present an explicit fourth-order compact finite dierence scheme for approximating the three- dimensional convection–diusion equation with variable coecients. This 19-point formula is defined on a uniform cubic grid. We compare the advantages and implementation costs of the new scheme with the standard 7-point scheme in the context of basic iterative methods. Numerical examples are used to verify the fourth-order convergence rate of the scheme and to show that the Gauss–Seidel iterative method converges for large values of the convection coecients. Some algebraic properties of the coecient matrices arising from dierent discretization schemes are compared. We also comment on the potential use of the fourth- order compact scheme with multilevel iterative methods. # 1998 John Wiley & Sons, Ltd. Commun. Numer. Meth. Engng, 14, 209–218 (1998) KEY WORDS three-dimensional convection–diusion equation; fourth-order compact scheme; iterative methods 1. INTRODUCTION Numerical simulation of three-dimensional (3D) problems tends to be computationally intensive and may be prohibitive on conventional computers due to the requirements on memory and CPU time to obtain a solution with the required accuracy. Traditional numerical schemes have low accuracy and thus require fine discretization. The size of the resulting linear systems is usually so large that even modern computers may not be able to handle them directly. One approach to alleviate these diculties is to use higher-order or spectral methods, which usually yield comparable accuracy with much coarser discretization, resulting in linear systems of smaller size. In the two-dimensional (2D) case, some fourth-order compact finite dierence schemes for the convection–diusion equation and the Navier–Stokes equation have been designed by several authors; see, for example, References 1–4. These schemes have good numerical stability and yield high-accuracy approximations. Recent studies by Zhang 5,6 indicate that the fourth-order com- pact schemes work well with some contemporary iterative methods — for example, the multigrid methods. At least for the diusion-dominated problems and with the multigrid solution methods, CCC 1069–8299/98/030209–10$17 . 50 Received December 1996 # 1998 John Wiley & Sons, Ltd. Accepted October 1997 COMMUNICATIONS IN NUMERICAL METHODS IN ENGINEERING, Vol. 14, 209–218 (1998) * Correspondence to: Jun Zhang, Department of Computer Science and Engineering, University of Minnesota, 4-192 EE/CS Building, 200 Union Street S.E., Minneapolis, MN 55455, U.S.A. E-mail: [email protected]. URL: http://www.cs.umn.edu/ ˜ jzhang. Contract grant sponsor: Pittsburgh Supercomputing Center; Contract grant no.: DMS970001P.

Upload: jun-zhang

Post on 06-Jun-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

AN EXPLICIT FOURTH-ORDER COMPACT FINITEDIFFERENCE SCHEME FOR THREE-DIMENSIONAL

CONVECTION±DIFFUSION EQUATION

JUN ZHANG*

Department of Computer Science and Engineering, University of Minnesota, 4-192 EE/CS Building,200 Union Street S.E., Minneapolis, MN 55455, U.S.A.

SUMMARY

We present an explicit fourth-order compact ®nite di�erence scheme for approximating the three-dimensional convection±di�usion equation with variable coe�cients. This 19-point formula is de®ned on auniform cubic grid. We compare the advantages and implementation costs of the new scheme with thestandard 7-point scheme in the context of basic iterative methods. Numerical examples are used to verify thefourth-order convergence rate of the scheme and to show that the Gauss±Seidel iterative method convergesfor large values of the convection coe�cients. Some algebraic properties of the coe�cient matrices arisingfrom di�erent discretization schemes are compared. We also comment on the potential use of the fourth-order compact scheme with multilevel iterative methods. # 1998 John Wiley & Sons, Ltd.

Commun. Numer. Meth. Engng, 14, 209±218 (1998)

KEY WORDS three-dimensional convection±di�usion equation; fourth-order compact scheme; iterative methods

1. INTRODUCTION

Numerical simulation of three-dimensional (3D) problems tends to be computationally intensiveand may be prohibitive on conventional computers due to the requirements on memory and CPUtime to obtain a solution with the required accuracy. Traditional numerical schemes have lowaccuracy and thus require ®ne discretization. The size of the resulting linear systems is usually solarge that even modern computers may not be able to handle them directly. One approach toalleviate these di�culties is to use higher-order or spectral methods, which usually yieldcomparable accuracy with much coarser discretization, resulting in linear systems of smaller size.

In the two-dimensional (2D) case, some fourth-order compact ®nite di�erence schemes for theconvection±di�usion equation and the Navier±Stokes equation have been designed by severalauthors; see, for example, References 1±4. These schemes have good numerical stability and yieldhigh-accuracy approximations. Recent studies by Zhang5,6 indicate that the fourth-order com-pact schemes work well with some contemporary iterative methods Ð for example, the multigridmethods. At least for the di�usion-dominated problems and with the multigrid solution methods,

CCC 1069±8299/98/030209±10$17.50 Received December 1996# 1998 John Wiley & Sons, Ltd. Accepted October 1997

COMMUNICATIONS IN NUMERICAL METHODS IN ENGINEERING, Vol. 14, 209±218 (1998)

* Correspondence to: Jun Zhang, Department of Computer Science and Engineering, University of Minnesota,4-192 EE/CS Building, 200 Union Street S.E., Minneapolis, MN 55455, U.S.A.E-mail: [email protected]. URL: http://www.cs.umn.edu/ Ä jzhang.

Contract grant sponsor: Pittsburgh Supercomputing Center; Contract grant no.: DMS970001P.

Page 2: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

the fourth-order compact schemes7 have been found to be computationally more e�cient thanthe traditional second-order central di�erence scheme. To obtain a computed solution of givenaccuracy, the fourth-order compact schemes may be hundreds of times faster and use lessmemory than the central di�erence scheme.In this paper, we present an explicit fourth-order compact ®nite di�erence scheme for

approximating the 3D convection±di�usion equation,

Du�x; y; z� � �l�x; y; z�; m�x; y; z�;f�x; y; z�� � Hu�x; y; z� � f �x; y; z� �1�

for speci®ed forcing function f in a continuous 3D domain O with appropriate boundaryconditions prescribed on @O. Here O is assumed to be comprised of a union of rectangular solids.u is assumed to be su�ciently di�erentiable with respect to x, y and z in O and l, m, f and f aresu�ciently regular.

Equation (1) is very important in computational ¯uid dynamics to describe transportphenomena. l, m and f are called the convection coe�cients. The magnitudes of the convectioncoe�cients determine the ratio of convection to di�usion. For large values of the convectioncoe�cients, (1) is said to be convection-dominated; otherwise it is di�usion-dominated.For problems with large convection coe�cients, basic iterative methods, e.g. Jacobi and

Gauss±Seidel, do not converge for solving linear systems resulting from the standard 7-pointcentral di�erence discretization. On the other hand, the ®rst-order upwind scheme yields asolution of low accuracy. Recently, Greif and Varah8 used a cyclic reduction technique toprecondition the linear system resulting from discretization of the 3D convection±di�usionequation with constant coe�cients and showed that the reduced system has better algebraicproperties than the original system. On the other hand, our experience with the 2D fourth-ordercompact schemes suggests that the 3D fourth-order compact scheme be an e�ective approach toprovide a stable and high accuracy solution for the 3D convection±di�usion problems.

This paper is organized as follows. In Section 2 we present the fourth-order compact ®nitedi�erence scheme and compare advantages and implementation costs of this scheme with thestandard 7-point scheme in the context of basic iterative methods. In Section 3, we conduct twonumerical experiments to verify the fourth-order convergence rate of our scheme and to comparethe algebraic properties of the coe�cient matrices arising from di�erent discretization schemes.Section 4 contains conclusions and some remarks.

2. FINITE DIFFERENCE SCHEME

We assume that the discretization is done on a uniform grid with a mesh size h. We use a local co-ordinate system, and the unit cubic grids are labelled as in Figure 1. (Our labelling system isslightly di�erent from that used by Ananthakrishnaiah et al.9) The approximate value of afunction u(x, y, z) at an internal mesh point (i, j, k) is denoted by u0 . The approximate values ofits immediate 18 neighbouring points are denoted by ul , l� 1, 2, . . . , 18, as in Figure 1. Theeight corner points of the unit cube are not used in our scheme. The discrete values of ll , ml , fl

and fl for l� 0, 1, . . . , 6 are de®ned similarly. The ideas and procedure of developing fourth-order compact ®nite di�erence schemes for the 3D general linear elliptic problems with variablecoe�cients were presented by Ananthakrishnaiah et al.,9 but the formulas given in Reference 9are so general and abstract that people have to spend a lot of time deriving explicit schemes fortheir individual equations. Our explicit fourth-order compact scheme for (1) was derived from the

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

210 J. ZHANG

Page 3: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

general implicit formulas of Reference 9 by employing the computer algebra packageMathematica.* The discretization scheme yields a 19-point formula,

X18l�0

clul � F0 �2�

The coe�cients of the approximating scheme (2) are given by

c0 � ÿ�24 � h2�l20 � m20 � f2

0� � h�l1 ÿ l3 � m2 ÿ m4 � f5 ÿ f6��

c1 � 2 ÿ h

4�2l0 ÿ 3l1 ÿ l2 � l3 ÿ l4 ÿ l5 ÿ l6�

� h2

8�4l20 � l0�l1 ÿ l3� � m0�l2 ÿ l4� � f0�l5 ÿ l6��

c2 � 2 ÿ h

4�2m0 ÿ m1 ÿ 3m2 ÿ m3 � m4 ÿ m5 ÿ m6�

� h2

8�4m20 � l0�m1 ÿ m3� � m0�m2 ÿ m4� � f0�m5 ÿ m6��

c3 � 2 � h

4�2l0 � l1 ÿ l2 ÿ 3l3 ÿ l4 ÿ l5 ÿ l6�

� h2

8�4l20 ÿ l0�l1 ÿ l3� ÿ m0�l2 ÿ l4� ÿ f0�l5 ÿ l6��

c4 � 2 � h

4�2m0 ÿ m1 � m2 ÿ m3 ÿ 3m4 ÿ m5 ÿ m6�

� h2

8�4m20 ÿ l0�m1 ÿ m3� ÿ m0�m2 ÿ m4� ÿ f0�m5 ÿ m6��

Figure 1. Labelling of the 3D grid points in a unit cube

* Mathematica is a registered trademark of Wolfram Research, Inc.

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

FOURTH-ORDER COMPACT FINITE DIFFERENCE SCHEME 211

Page 4: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

c5 � 2 ÿ h

4�2f0 ÿ f1 ÿ f2 ÿ f3 ÿ f4 ÿ 3f5 � f6�

� h2

8�4f2

0 � l0�f1 ÿ f3� � m0�f2 ÿ f4� � f0�f5 ÿ f6��

c6 � 2 � h

4�2f0 ÿ f1 ÿ f2 ÿ f3 ÿ f4 � f5 ÿ 3f6�

� h2

8�4f2

0 ÿ l0�f1 ÿ f3� ÿ m0�f2 ÿ f4� ÿ f0�f5 ÿ f6��

c7 � 1 � h

2�l0 � m0� �

h

8�l2 ÿ l4 � m1 ÿ m3� �

h2

4l0m0

c8 � 1 ÿ h

2�l0 ÿ m0� ÿ

h

8�l2 ÿ l4 � m1 ÿ m3� ÿ

h2

4l0m0

c9 � 1 ÿ h

2�l0 � m0� �

h

8�l2 ÿ l4 � m1 ÿ m3� �

h2

4l0m0

c10 � 1 � h

2�l0 ÿ m0� ÿ

h

8�l2 ÿ l4 � m1 ÿ m3� ÿ

h2

4l0m0

c11 � 1 � h

2�l0 � f0� �

h

8�l5 ÿ l6 � f1 ÿ f3� �

h2

4l0f0

c12 � 1 � h

2�m0 � f0� �

h

8�m5 ÿ m6 � f2 ÿ f4� �

h2

4m0f0

c13 � 1 ÿ h

2�l0 ÿ f0� ÿ

h

8�l5 ÿ l6 � f1 ÿ f3� ÿ

h2

4l0f0

c14 � 1 ÿ h

2�m0 ÿ f0� ÿ

h

8�m5 ÿ m6 � f2 ÿ f4� ÿ

h2

4m0f0

c15 � 1 � h

2�l0 ÿ f0� ÿ

h

8�l5 ÿ l6 � f1 ÿ f3� ÿ

h2

4l0f0

c16 � 1 � h

2�m0 ÿ f0� ÿ

h

8�m5 ÿ m6 � f2 ÿ f4� ÿ

h2

4m0f0

c17 � 1 ÿ h

2�l0 � f0� �

h

8�l5 ÿ l6 � f1 ÿ f3� �

h2

4l0f0

c18 � 1 ÿ h

2�m0 � f0� �

h

8�m5 ÿ m6 � f2 ÿ f4� �

h2

4m0f0

F0 �h2

2�6f 0 � f 1 � f 2 � f 3 � f 4 � f 5 � f 6�

� h3

4�l0� f 1 ÿ f 3� � m0� f 2 ÿ f 4� � f0� f 5 ÿ f 6��

Note that when l� m� f � 0, (1) reduces to the 3D Poisson equation. Our scheme (2) reducesto the explicit 19-point formula developed by Kwon et al.,10 and Spotz and Carey.11 In a recent

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

212 J. ZHANG

Page 5: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

paper,12 we showed that the fourth-order compact scheme with the multigrid method is a fast andhigh-accuracy 3D Poisson solver which is hundreds of times more e�cient than that with thecentral di�erence scheme.

We remark that our scheme is in compact form in the sense that it only involves the18 neighbouring grid points nearest to the reference grid in a unit cube. For problems withDirichlet boundary conditions, no special formula is needed for approximating grid points nearthe boundary. The compactness also means that the computed accuracy of the scheme isincreased at the expense of only a slight increase in the density of the sparse matrix structurecompared to the minimal O(h2) stencil. An additional advantage of compactness is that it reducesthe communications required by a domain decomposition approach to parallelizing thediscretization compared to non-compact stencils.

The coe�cient matrix of the linear system resulting from the fourth-order compact discretiza-tion of (1) is not diagonally dominant for large values of the convection coe�cients. (This can beproved for constant coe�cient problems as in the 2D case; see Reference 5.) However, ournumerical examples show that the Gauss±Seidel iterative method with this scheme converges forlarge values of the convection coe�cients even without the diagonal dominance.

Except for some nominal arithmetic operations to compute the stencil coe�cients (which canusually be done once for all at the beginning of the computation), one iteration of a Gauss±Seidel type iterative method with the 19-point scheme requires 37 operations, while one iterationwith the traditional 7-point scheme requires 13 operations. Hence, the implementation cost ofthe 19-point scheme is almost three times as expensive as that of the 7-point scheme. Therelatively high cost of the 19-point scheme is rewarded by the high accuracy of the computedsolution. Suppose that the mesh size used for the 19-point scheme is h19 and that for the 7-pointscheme is h7 . If comparable accuracy can be achieved by choosing h19� 2h7 , then the size of thelinear system from the 19-point scheme is only about 1/8 of the size of the linear system from the7-point system. If the convergence rate remains the same, then the 19-point scheme will be104=37 ' 2:8 times faster than the 7-point scheme. Furthermore, there are at least two factorswhich make the 19-point scheme more attractive. Firstly, for basic iterative methods, a smallersystem usually means faster convergence. For the 3D Poisson equation, we showed in Reference12 that the multigrid method with the fourth-order scheme converges faster than that with thesecond-order scheme even with the same mesh size! Secondly, the 19-point scheme usuallyrequires much coarser discretization, say, h194 4h7 or even h19 ' 8h7, and still yieldscomparable accuracy. This fact means that the relative computational cost using the 19-pointscheme is even lower. These advantages make the fourth-order compact scheme computation-ally more e�cient than the 7-point scheme. For some detailed comparisons, readers are referredto Zhang.12

3. NUMERICAL RESULTS

In our numerical experiments, the domain O was chosen as the unit cube (0, 1)3. We used theGauss±Seidel iterative method to solve the discretized linear systems. Our programs were run on aCray-90 supercomputer at the Pittsburgh Supercomputing Center and we used the Cray Fortran77 programming language in single precision arithmetic (roughly equivalent to double precisionon conventional machines). The computations were terminated when the residual in the discreteL2 norm was reduced by a factor of 1010. The maximum error is the maximum absolute error overall the discrete grids.

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

FOURTH-ORDER COMPACT FINITE DIFFERENCE SCHEME 213

Page 6: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

3.1. Test Problem 1

We chose the convection coe�cients in (1) as

l�x; y; z� � Re sin y sin z cos x

m�x; y; z� � Re sin x sin z cos y

f�x; y; z� � Re sin x sin y cos z

The forcing function f(x, y, z) and the Dirichlet boundary conditions were prescribed to satisfythe exact solution u(x, y, z)� cos(4x � 6y � 8z). Re is a constant re¯ecting the ratio of theconvection to di�usion and simulating the Reynolds number.

For di�erent values of Re, we re®ned the mesh size h to test the error decreasing rate. Themaximum errors for 04Re4 106 and h� 1/5, 1/10, 1/20, 1/40, are listed in Table I. We remarkthat the computed results changed little for Re5 106. The convergence order was calculated byusing the maximum errors for h� 1/20 and h� 1/40.

It is clear from Table I that, for small to medium Re, the error decreased rapidly as the meshsize was re®ned and our iterative method demonstrated a fourth-order convergence rate, but thecomputed accuracy was inversely a�ected by the magnitude of Re. The only minor exception wasfor Re� 0 and Re� 1. For large Re, our iterative method still converged, but yielded a second-order convergence rate. The deterioration of the computed accuracy for large Re was notunexpected and may be attributed to two reasons. The ®rst and the main reason is that thesecond-order elliptic equation (1) approaches a ®rst-order hyperbolic equation as Re increases toin®nity. Secondly, as we see in Table III, the Frobenius norm of the coe�cient matrix is very largefor large Re, which indicates the existence of entries of very large magnitude. This may result inrounding errors during ®nite precision computation.

3.2. Test Problem 2

The convection coe�cients of our second test problem were chosen as

l�x; y; z� � Re x�1 ÿ 2y��1 ÿ z�m�x; y; z� � Re y�1 ÿ 2z��1 ÿ x�f�x; y; z� � Re z�1 ÿ x��1 ÿ z�

Table I. Maximum errors and the estimated order of convergence rate for Test Problem 1

Re h� 1/5 h� 1/10 h� 1/20 h� 1/40 Conv. order

0 1.735 (ÿ2) 1.104 (ÿ3) 6.842 (ÿ5) 4.296 (ÿ6) 3.9931 1.649 (ÿ2) 1.060 (ÿ3) 6.582 (ÿ5) 4.144 (ÿ6) 3.98910 3.218 (ÿ2) 2.020 (ÿ3) 1.278 (ÿ4) 8.003 (ÿ6) 3.997102 2.613 (ÿ1) 2.180 (ÿ2) 1.716 (ÿ3) 1.117 (ÿ4) 3.941103 3.661 (ÿ1) 7.501 (ÿ2) 1.224 (ÿ2) 1.151 (ÿ3) 3.411104 3.815 (ÿ1) 1.029 (ÿ1) 2.402 (ÿ2) 5.257 (ÿ3) 2.192105 3.821 (ÿ1) 1.038 (ÿ1) 2.722 (ÿ2) 7.244 (ÿ3) 1.910106 3.821 (ÿ1) 1.039 (ÿ1) 2.752 (ÿ2) 7.553 (ÿ3) 1.865

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

214 J. ZHANG

Page 7: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

The forcing function f(x, y, z) and the Dirichlet boundary conditions were prescribed to satisfythe exact solution u(x, y, z)� sin px sin py sin pz.

It is again observed that the fourth-order convergence rate was achieved for small to mediumRe (see Table II). When the magnitude of Re increased, the computed accuracy decreased.However, we note that the scheme is stable in the sense that the Gauss±Seidel method convergedfor all values of the convection coe�cients tested. Once again, the tested results changed little forRe5 106.

3.3. Algebraic properties

The coe�cient matrix from the 19-point scheme is not diagonally dominant for large Re. ForTest Problem 1 with h� 1/20, Table III lists some algebraic properties of the coe�cient matricesarising from the 19-point scheme and those arising from the 7-point central di�erence schemeand the standard upwind scheme. The algebraic properties of a matrix in which we are interestedare the percentage of the weakly row and column diagonal dominance and the Frobenius norm.These data were obtained by using the SPARSKIT package.13 Note that the coe�cient matrix

Table II. Maximum errors and the estimated order of convergence rate for Test Problem 2

Re h� 1/5 h� 1/10 h� 1/20 h� 1/40 Conv. order

0 1.357 (ÿ3) 9.566 (ÿ5) 5.920 (ÿ6) 3.296 (ÿ7) 4.1671 1.409 (ÿ3) 9.752 (ÿ5) 6.038 (ÿ6) 3.370 (ÿ7) 4.16310 2.302 (ÿ3) 1.435 (ÿ4) 8.985 (ÿ6) 5.629 (ÿ7) 3.997102 2.244 (ÿ2) 1.831 (ÿ3) 1.235 (ÿ4) 7.877 (ÿ6) 3.971103 7.079 (ÿ2) 1.439 (ÿ2) 1.535 (ÿ3) 1.109 (ÿ4) 3.791104 7.542 (ÿ2) 2.172 (ÿ2) 5.668 (ÿ3) 8.832 (ÿ4) 2.682105 7.561 (ÿ2) 2.200 (ÿ2) 6.348 (ÿ3) 1.749 (ÿ3) 1.860106 7.563 (ÿ2) 2.205 (ÿ2) 6.366 (ÿ3) 1.785 (ÿ3) 1.834

Table III. Algebraic properties (percentage of weakly row and column diagonal dominance and theFrobenius norm) of the matrices arising from di�erent discretization schemes for Test Problem 1 with

h� 1/20

Re 0 1 10 102 103 104 105 106

Fourth-order compact schemeRow, % 100 28.4 28.4 27.8 15.0 14.4 13.2 13.1Column, % 100 77.5 77.8 63.0 15.0 12.7 13.9 14.1Norm 2.0(3){ 2.0(3) 2.1(3) 2.4(3) 4.9(4) 4.8(6) 4.8(8) 4.8(10)

Central di�erence schemeRow, % 100 28.4 28.4 23.5 5.26 0.15 0.00 0.00Column, % 100 85.6 86.4 71.4 2.30 0.01 0.00 0.00Norm 5.4(2) 5.4(2) 5.4(2) 5.5(2) 1.2(3) 1.1(4) 1.1(5) 1.1(6)

Standard upwind schemeRow, % 100 28.4 28.4 28.4 21.3 15.1 15.0 15.0Column, % 100 82.1 83.9 85.7 84.0 84.0 83.7 83.9Norm 5.4(2) 5.4(2) 5.6(2) 8.0(2) 3.4(3) 3.0(4) 3.0(5) 2.8(6)

{2.0 (3) stands for 2.0� 103.

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

FOURTH-ORDER COMPACT FINITE DIFFERENCE SCHEME 215

Page 8: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

from the upwind scheme should be 100 per cent weakly diagonally dominant in exact arithmetic,but this was not the case in the ®nite precision computation. Nevertheless, these matrices (fromthe 19-point scheme) were actually used for the computations. In terms of these algebraicproperties, which usually in¯uence the convergence of iterative methods, the matrices from thefourth-order scheme are better than those from the central di�erence scheme, but worse thanthose from the upwind scheme. Hence, the fourth-order scheme may be considered as a com-promise between the central di�erence scheme and the upwind scheme, and a compromisebetween the accuracy of the computed solution and convergence of the iterative solutionmethods.

Figure 2 shows the number of Gauss±Seidel iterations required for convergence as a functionof Re for both test problems (h� 1/20) with the fourth-order compact scheme. It shows that theGauss±Seidel iterative method converged regardless of the value of the Reynolds number. It isinteresting to note that the smallest iteration counts were achieved for 1024Re4 103. We thinkthat this was because the spectral radius of the Gauss±Seidel iteration matrix (which actuallygoverns the convergence) reaches its minimum in the interval of 1024Re4 103 (see Reference 14for an analysis of the 1D fourth-order compact scheme).

4. CONCLUDING REMARKS

The traditional second-order central di�erence and the ®rst-order upwind schemes have theirinherent di�culties, although some defect-correction techniques may be used to combine thesetwo schemes to yield stable and second-order methods for di�usion-dominated problems.15 It hasbeen observed that, at least in the 2D case, some defect-correction techniques fail to improve the

Figure 2. Number of Gauss±Seidel iterations as a function of the Reynolds number (Re) for both test problems withh� 1/20

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

216 J. ZHANG

Page 9: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

computed accuracy for some high Reynolds number ¯ow problems, and the ®rst-order upwindschemes may yield unreliable computational results.16

The fourth-order compact scheme is stable and yields a high-accuracy solution. For large Re,although the computed accuracy reduces to the second-order, it is still more accurate than the®rst-order upwind scheme. The scheme is also compact and easy to implement.The fact that basic iterative methods such as Gauss±Seidel with our fourth-order compact

scheme converge for large values of the convection coe�cients suggests that this scheme issuitable for implementation with multilevel or multigrid methods. Since the accuracy of thesolution is determined by the ®ne grid discretization, the converged coarse grid solution providesacceleration to the convergence of the ®ne grid solution. This ideal combination of stability andhigh accuracy is not found with either the central di�erence scheme or the standard upwindscheme.

ACKNOWLEDGEMENTS

The explicit scheme of this paper was derived from a note by John W. Stephenson which wasgiven and explained to the author by Murli M. Gupta. The author would like to acknowledgetheir valuable contributions and also thank the three anonymous referees for their constructivecomments which improved the presentation of this paper. This research was partially supportedby a grant (DMS970001P) from Pittsburgh Supercomputing Center.

REFERENCES

1. S. C. R. Dennis and J. D. Hudson, `Compact h4 ®nite-di�erence approximations to operators ofNavier±Stokes type', J. Comput. Phys., 85, 390±416 (1989).

2. M. M. Gupta, R. P. Manohar and J. W. Stephenson, `A single cell high order scheme for theconvection-di�usion equation with variable coe�cients', Int. J. Numer. Methods Fluids, 4, 641±651(1984).

3. M. Li, T. Tang and B. Fornberg, `A compact fourth-order ®nite di�erence scheme for the steadyincompressible Navier±Stokes equations', Int. J. Numer. Methods Fluids, 20, 1137±1151 (1995).

4. W. F. Spotz and G. F. Carey, `High-order compact scheme for the steady stream-function vorticityequations', Int. j. numer. methods eng., 38, 3497±3512 (1995).

5. J. Zhang, `On convergence of iterative methods with a fourth-order compact scheme',Appl. Math. Lett.,10, 49±55 (1997).

6. J. Zhang, `Accelerated high accuracy multigrid solution of the convection-di�usion equation with highReynolds number', Numer. Methods PDEs, 13, 77±92 (1997).

7. M. M. Gupta, J. Kouatchou and J. Zhang, `Comparison of second and fourth order discretizations formultigrid Poisson solver', J. Comput. Phys., 132, 226±232 (1997).

8. C. Greif and J. M. Varah, `Iterative solution of cyclically reduced systems arising from discretization ofthe three dimensional convection-di�usion equation', SIAM J. Sci. Comput. (to be published).

9. U. Ananthakrishnaiah, R. Monahar and J. W. Stephenson, `Fourth-order ®nite di�erence methods forthree-dimensional general linear elliptic problems with variable coe�cients', Numer. Methods PDEs, 3,229±240 (1987).

10. Y. Kwon, R. Manohar and J. W. Stephenson, `A single cell ®nite di�erence approximation for Poisson'sequation in three variables', Appl. Math. Notes, 2, 13±20 (1982).

11. W. F. Spotz and G. F. Carey, `A high-order compact formulation for the 3D Poisson equation', Numer.Methods PDEs, 12, 235±243 (1996).

12. J. Zhang, `Fast and high accuracy multigrid solution of the three dimensional Poisson equation',Department of Mathematics, The George Washington University, Washington, DC 20052 (preprint,1996).

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

FOURTH-ORDER COMPACT FINITE DIFFERENCE SCHEME 217

Page 10: An explicit fourth-order compact finite difference scheme for three-dimensional convection–diffusion equation

13. Y. Saad, `SPARSKIT: a basic tool kit for sparse matrix computations', Technical Report 90-20,Research Institute for Advanced Computer Science, NASA Ames Research Center, Mo�et Field, CA,1990.

14. J. Zhang, `On convergence and performance of iterative methods with fourth-order compact schemes',Numer. Methods PDEs (to be published).

15. P. W. Hemker, `Mixed defect correction iteration for the accurate solution of the convection di�usionequation', in Multigrid Methods, W. Hackbusch and U. Trottenberg (Eds.), Lect. Notes Math., 960,Springer-Verlag, Berlin, 1982, pp. 485±501.

16. A. Brandt and I. Yavneh, `Inadequacy of ®rst-order upwind di�erence schemes for some recirculating¯ows', J. Comput. Phys., 93, 128±143 (1991).

# 1998 John Wiley & Sons, Ltd. COMMUN. NUMER. METH. ENGNG, VOL. 14, 209±218 (1998)

218 J. ZHANG