Sie sind auf Seite 1von 10

IMA Journal of Numerical Analysis (1991) 11, 261-270

High-Order Finite-Differences Schemes to Solve Poisson's Equation in


Polar Coordinates
R. C. MTTTAL AND S. GAHLAUT

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
Department of Mathematics, University of Roorkee, Roorkee-247 667

[Received 21 June 1985 and in revised form 28 January 1987]

In the present work finite difference schemes of second and fourth order are
derived for the solution of Poisson's equation in polar coordinates. To solve the
resulting system of linear equations, a direct method similar to Hockney's method
is developed. The schemes are tested on six test problems whose exact solutions
are known. The numerical results obtained by these finite-difference schemes
show that they produce very accurate results.

1. Introduction

POISSON'S equation in polar coordinates is given by


d*u 1 du 1 3?u ,, . ,
+ + e ) (11
«
defined in the domain

or
AJ = {(r, d): R
The boundary conditions for the domain Dx are of the form
u(r, 0,) =/,(r), u(r, <p2) =f2(r), (1.2)

u(Rue)=gl(d), u(R2,e)=g2(d), £U(R2, e)=g3(e). (1.3)

We have assumed the continuity of the functions /i(r), gi(0), f2(r), and g2(d) at
the corners of the domain Dt. The boundary conditions for the domain E^ with
respect to 6 are periodic of periodicity 2JI. When Rt = 0, the smoothness
condition/,(0) =/ 2 (0) = gi(6) is assumed for the domain Dx, while, in the case of
domain E^, gi(6) is not needed. However, the value of gi(d) can easily be
obtained by the formula

l g2(<j>)d<p w h e n f l ^ O i n Z V (1-4)

Starling (1963) was the first to solve the Laplace equation in cylindrical
coordinates by finite differences. High-order schemes are also available to solve
Poisson's equation in Cartesian coordinates, for example Wood (1950) has

O Oxford Unirciiiry Pna 1991


262 R. C. MTTTAL AND S. GAHLAUT

derived a sixth-order scheme while Collate (1960) has given an eighth-order


scheme derived by what he calls 'Hermitian methods'. Albasiny (1960), Eisen
(1966), MacMillan (1964) and Iyengar & Mittal (1978) have derived some
finite difference schemes to solve the cylindrical heat-conduction problem.
Evans & Gane (1978) have given an ADI scheme to solve the two-dimensional
heat-conduction problem in r-8 geometry. In the present paper, we have derived

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
second-order and fourth-order finite-difference schemes to solve Poisson's equa-
tion (1.1). These schemes are tested on six examples of different kinds whose
exact solutions are known to us. The resulting system of linear equations obtained
with the help of these finite-difference schemes is solved by a direct method
similar to that of Hockney. The results are reported in Section 5. The results of
the finite-difference especially the fourth-order schemes, when compared with the
exact solutions, have been found very accurate.

2. Derivation offinite-differenceschemes
The finite-difference approximation of equation (1.1) is derived on a cell
with circular boundaries and centre at (r, 8). Let hx be the step-length along
the r-direction and h2 be the step-length along the 0-direction. The central
point (r, 6) is taken to be the origin and denoted by 'O'. The neighbouring
points (*!,<)), (0,/i2), (-hu0), (0, -h2), (hu h2), (-hu h2), (-hu -h2), and
(hu -h2) are numbered l r ..,8 respectively (see Fig. 1).

2.1 Second-Order Finite-Difference Scheme


Domain Dt or D2 is discretized by a mesh, taking step-length h^ along the
r-direction and h2 along the 0-direction.
After replacing u m ur, and ugg at the point (r,, 8j) in equation (1.1) by the
following standard finite-difference approximations, using the notation
i.i = u(rt, (u^j = (ui+lJ - 2uu + M,_1>y

FIG. l.
HIGH-ORDER FINITE DIFFERENCE SCHEMES FOR POISSON'S EQUATION 263

we obtain the following finite-difference scheme:


(1 + a,)ui+lJ - 2(1 + a,)u,j + (1 - at)u,_ij + aiUiJ+1 + atui4_x = hi\f,,,, (2.1)
where a, = hx/2r, and or, = (hjh2r,)2.

2.2 Fourth Order Finite-Difference Scheme

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
According to Fig. 1, the elliptic expression
^w 1

can be replaced by the following nine-point approximation at point O:

where 5^ = us + u6 + u7 + u8, S3 = ux + u3, S4 = u2 + u4, and a) = (h1/h2)2.


Replacing duo/dr by the approximation

dr 2hx 6 3r3 i r " z 3r 30 2 ' " v ' * + h**' ( 2 3 )


where 6^ is the central difference operator along the r-direction and 0 « <f>^ 1.
With the help of (2.2) and (2.3), we have
{cPu 1 du

(2.4)

Choosing <p = ^i, equation (2.4) can be written as

a2 is 1 ^ , ^

+ hl). (2.5)
r0
264 R. C. MTTTAL AND S. GAHLAUT

Finally, we obtain the following finite-difference scheme

£ a,u, = Uhlfo + h\{d2 + 62)f0 + £-6. (2.6)


t-o "o
where the coefficients a, are defined as follows:
a0 = -20(1 + a) + 2p2 - Sp2a

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
ax = 2(5 - a) + 5p + $p3 - p2 + 3pa

a3 = 2(5 -a)-5p-hp3-p2~ ^poc


a
05 = «8 = (1 + <*) + hp - \p
a6 = an = (1 + a) - \p + ]pa
where p = hjro and a = [(/»1//j2)r0]2.

3. Approximation on the boundary when the derivative condition is given


When a boundary condition of the type
(d/dr)u(R2,6) = g3(0)
is encountered at the boundary r = R2, we use the following second-order
approximation

or
— -i- Oh a (ft \ C\ 1 ^

The outer point obtained in schemes (2.1) and (2.6) in the case of the derivative
boundary condition is eliminated with the help of (3.1).

4. Direct method to solve resulting system or Unear equations


Let there be N interior points along the r-direction and M interior points along
the 0-direction.
Now applying scheme (2.1) or (2.6) at each interior point of the domain Dt or
Z>2, taking the ^-direction first and then the r-direction, we have the following
system of linear equations:

C2 A, u2
(4.1)
CL-i
cL "L

where L = N or L = N + 1 depending on whether the Dirichlet or Neumann


boundary condition is given on the outer boundary. Also A,, B,, and Ct are
Mx At matrices.
HIGH-ORDER FINITE DIFFERENCE SCHEMES FOR POISSOITS EQUATION 265

For domain Du when we apply the second-order scheme (2.1), Alr..,AL are
symmetric tridiagonal matrices and Blr..,BL-u C2r-,CL are diagonal matrices,
while, for the fourth-order scheme (2.6), B and C are also tridiagonal matrices. In
the present case the usual Hockney method can be applied. The details of the
method can be found in Smith (1978).
In the case of domain I\, for the second-order finite-difference scheme (2.1),

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
Alr.nAL are symmetric circulant matrices and Blr..,BL_t and C2r..,CL are
diagonal matrices, while, for the fourth-order finite-difference scheme (2.6),
Blr..,BL^ and C2r-,CL are also symmetric circulant matrices.
In the present case, to apply a method similar to that of Hockney, we need to
know the eigenvalues of a symmetric circulant matrix and its corresponding
orthogonal matrix of eigenvectors. We have developed formulae to obtain
eigenvalues and corresponding eigenvectors of a circulant matrix of the following
form
a b 0 • • • 0 0 b
b a b ••• 0 0 0
A= eR" (4.2)

0 0 0 ••• b a b
b 0 0 ••• 0 b a

The eigenvalues of matrix A can be computed by the formula


A, = a + 2b cos (2ni/M) (J = 1,...,M). (4.3)
Let Q be the matrix of eigenvectors of matrix A, known as the model matrix,

where
qi = [qnr-,?/M]T (i = l,...,M)
are eigenvectors of A. The components q,j can be obained by the formula
qtJ = (cos 6 + sin 6)1 JM (i = 1,..., M,j = l,..., M), (4.4)
where 6 = (2x/M)(i - 1)(; - 1).

5. Numerical results
We have tested the finite-difference schemes (2.1) and (2.6) on the following
six examples representing different classes of problems that may arise in practice.
EXAMPLE 1

Idu
266 R. C. MTITAL AND S. GAHLAUT

TABLE 1
Numerical results for Example 1
s. Second-order f.d.s. Fourth-order f.d.s. Exact
no. Point (2.1) A, = 0-1, h = n/12 (2.6) A, =0-1, h2 = n/12 solution
1 (0-2,n/6) 0-1868067 0-1870137 0-18702
2 (0-3.K/3) 0-3953076 0-3961851 0-39629

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
3 (0-4, n/2) 0-5393163 0-5403639 0-54041
4 (0-6,2n/3) 0-7038622 0-7050430 0-70516
5 (0-7,5n/6) 0-7176772 0-7196947 0-71978
6 (0-8,n/2) 0-8782691 0-8787360 0-87874
Note: The 'exact' solution of this problem is given by taking the first 20 terms of the infinite series.

with boundary condition

The exact solution of the problem is given by


^ -lor 2 " 1 * 1
sin (2m+ 1)0.
^ r 0 n(2m - l)(2m + l)(2m + 3)
The results of this example are given in Table 1.
EXAMPLE 2
1 du 1 a2!/ „ .
, 1< r < 2,

with boundary conditions


w(l,0)=O, U(2, 0) = sin 20.
The exact solution is given by

u(r, 0) = - ^ ) sin 20.

The results of this example are given in Table 2.

TABLE 2
Absolute errors in Example 2
Second-order Fourth-order
S. f.d.s. (2.1) f.d.s. (2.6) Exact
no. Point , =0-1, h2 = n/ A, = 0-1, /i 2 = n/ solution

1 (1-2.B/3) 0-38707(-2) 0-54150(-3) 01721787


2 (l-3,2n/3) -0-52515(-2) 002991(-3) -0-2536378
3 (1-4, n) O-OOOOOOO 00000000 00000000
4 (l-6,4n/3) 0-63966(-2) 018863(-2) 0-5009957
5 (1-7,5JI/3) 0-56815(-2) 0-232O4(-2) -0-5875069
6 (1-8, 2n) O-OOOOOOO 00000000 O-OOOOOOO
HIGH-ORDER FINITE DIFFERENCE SCHEMES FOR POISSON*S EQUATION 267

EXAMPLE 3

a u 1 du 1 d^u
- - j + - — + -5—5 = 0 forO<0=e2ji,O<r<l,
with boundary conditions u(0, 8) = 0, u(l, 6) = cos 6. The exact solution is given
by

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
u(r, 6) = r cos 9.
The results of this example are given in Table 3.
EXAMPLE 4

cPu Idu 1 c?u „ .

with boundary conditions


u(0,d) = l,
u(r,0) = l + 3r + ir 3 , u(r, in) = l.
The exact solution is given by
u(r, 0) = 1 + 3r cos 6 + Jr 3 cos 30.
The results of this example are given in Table 4.
EXAMPLE 5

d?u Idu 1 d^u „ , „


—^ + - — + -5—5 = 0 f o r O < 0 « 2 n , O < r < l ,
with boundary condition
(du/dr)(l, d) = cos 6 + 12 cos3 d.
The exact solution is given by
u(r, 6) = lOr cos 6 + r3 cos3 d.
The results of this example are given in Table 5.

TABLE 3
Absolute errors in Example 3
Second-order Fourth-order
S. f.d.s. (2.1) f.d.s. (2.6) Exact
no. Point / , = 0-1, h2 = n/6 solution

1 (0-2, n/3) 018371(-2) 0-62822(-4) 01000000


2 (0-3,2n/3) 0-20623(-2) 0-57015(-4) -01500000
3 (0-4, n) 0-41833(-2) 0101727(-3) -0-4000000
4 (0-6,4«/3) 017468(-2) 0-36692(-4) -0-3000000
5 (0-7, 5JI/3) 0-14222(-2) 0-28691(-4) 0-3500000
6 (0-8,2*) 0-20325(-2) 0-39712<-4) 0-8000000
268 R. C. MTITAL AND S. OAHLAUT

TABLE 4
Absolute errors in Example 4

Second-order Fourth-order
s. f.d.s. (2.1) f.d.s. (2.6) Exact
no. Point A, =0-1, H2 = n/12 A, = 0-1, h2 = n/l2 solution

1 0-93301(-4) 011571(-3) 1-1463031

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
2 0-18754(-2) 0-83990(-3) 1-2008183
3 (0-5'5n/12) 0-20722(-2) 0-47181(-5) 10749601
4 (0-6, 5JI/12) 0-28154(-2) 0-61190(-3) 1-0782848
5 (0-8, JI/4) 0-50439(-2) 0-27278(-2) 1-3337544
6 (I-O.B/12) 0-62601(-3) 014166(-l) 1-9012211

TABLE 5
Example 5
Absolute errors in

Second-order Fourth-order
S. f.d.s. (2.1) f.d.s. (2.6) Exact
no. Point solution

1 (0-2, JI/3) 0-23478(-l) 0-50405(-2) 0-9920000


2 (0-3, 2JI/3) -0-21803(-l) -0-65019(-2) -1-4729999
3 (0-4, K) -0-17937(-l) -0-52795(-2) -4-0640000
4 (0-7, 4JI/3) -0-25945(-l) -0-82577(-2) -3-1570001
5 (0-8, 5n/3) 0-47683(-l) 0-86927(-2) 3-4879998
6 (0-9, 2JI) 0-21486 0-60872(-1) 9-7290000

EXAMPLE 6

c?u 1 du 1 cPu
forO<0=e2jt,O<r< 1,
dr2 r dr }"r1~ddi=~3cose

with boundary conditions

u(O,0) = O, u{\, 0) = O.
TABLE 6
Absolute errors in Example 6

Second-order Fourth-order
S. f.d.s. (2.1) f.d.s. (2.6) Exact
no. Point , =0-1, h2 solution

1 (0-2, JI/3) 012242(-2) 0-54321(-4) 0-0800000


2 (0-3,2n/3) -0126O4(-2) -0-45918(-4) -0-1050000
3 (0-4, JI) -0-23545(-2) -0-76438(-4) -0-2400000
4 (0-6,4re/3) -O-835O2(-3) -0-24102(-4) -01200000
5 (0-7,5n/3) 0-62512(-3) 017620(-4) 01050000
6 (0-8,2n) 0-81891(-3) 0-22712(-4) 0-1600000
HIGH-ORDER FINITE DIFFERENCE SCHEMES FOR POISSOhTS EQUATION 269

TABLE 7
Maximum absolute errors in different examples
Scheme (2.1) Scheme (2-6)
c
no. Example A,-0-1, A2 = */6 A, = 0-05, /4 = n/12 A, = 0-1, A2 = n/6 Aj-O^K, Aj = )i/12

1 2 0-63966(-2) 016121(-2) 0-23204(-2) 0-14608(-3)


2 3 0-41822(-2) 011218(-2) 0-101721(-3) 0-64012(-4)

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
3 5 0-21486 0-52121(-l) 0^0872(-l) 0-38121(-2)
4 6 0-12242(-2) 0-37012(-3) 0-54321(-4) 0-34012(-5)

The exact solution is given by


u = r(l - r) cos 0.
The results of this example are given in Table 6.

6. Coodusoos
It can easily be concluded from Tables 1 to 6 that fourth-order finite-difference
scheme (2.6) produces more accurate results than second-order finite-difference
scheme (2.1).
If a derivative boundary condition is given at the outer boundary, the accuracy
of the schemes are affected (see Tables 4 and 5). This could be due to
second-order approximation (3.1) at the outer boundary.
It is verified from Table 7 that the schemes (2.1) and (2.6) are of second and
fourth order respectively, as the maximum absolute errors in the solutions are
reduced by a factor approximately equal to i in the case of scheme (2.1) and by a
factor approximately equal to ^ in the case of scheme (2.6) when
step-lengths are reduced by half.
Finally we conclude that our fourth-order scheme with direct solution of the
Hockney kind developed in the present paper gives very accurate results. The
derivative boundary-value problem may also be solved by our method.
All the computations were done on a DEC-2050 at Roorkee University
Regional Computer Centre, Roorkee.

Acknowledgement
The authors would like to thank the referees for their valuable comments to
improve the quality of the paper.

REFERENCES
ALBASINY, E. L. 1960 On the numerical solution of a cylindrical heat-conduction problem.
Quart. J. Mech. Appl. Math. 13, 374-384.
COLLATZ, L. 1960 The Numerical Treatment of Different Equations. Berlin: Springer-
Verlag.
EISEN, D. 1966 Stability and convergence of finite difference schemes with singular
coefficients. SIAM J. Num. Anal. 3, 545-552.
270 R. C. MTITAL AND S. GAHLAUT

EVANS, D. J., & GAME, C. R. 1978 A.D.I, methods for the solution of transient heat
conduction problems in r-8 geometry. Int. J. Numer. Meth. Engng 12, 1799-1807.
IYENOAR, S. R. K., & MTTTAL, R. C. 1978 High accuracy difference schemes for the
cylindrical heat conduction equation. /. Inst. Maths Applies 22, 321-331.
MACMILLAN, D. E. 1964 Iterative methods for the solution of diffusion problems in r-6
geometry. 19th National Conference of the Assoc. of Comput. Mech. (USA).
SMITH, G. D. 1978 Numerical Solutions of Partial Differential Equations 2nd edn. Oxford:
Clarendon Press.
STARLING, P. P. 1963 A note on the numerical solution of Laplace's equation in cylindrical

Downloaded from imajna.oxfordjournals.org at Pontif?cia Universidade Cat?lica do Rio Grande do Sul on January 21, 2011
coordinates. Brit. J. Appl. Phys. 14, 603-605.
WOOD, L. C. 1950 Improvement to the accuracy of arithmetical solutions to certain
two-dimensional field problems. Q. J. Mech. Appl. Math* 3, 349-363.