Finite Diference Method
Finite Diference Method
Finite Diference Method
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
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
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)
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
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).
FIG. l.
HIGH-ORDER FINITE DIFFERENCE SCHEMES FOR POISSON'S EQUATION 263
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
(2.4)
a2 is 1 ^ , ^
+ hl). (2.5)
r0
264 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
ax = 2(5 - a) + 5p + $p3 - p2 + 3pa
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).
C2 A, u2
(4.1)
CL-i
cL "L
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
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.
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
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
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
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
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
EXAMPLE 6
c?u 1 du 1 cPu
forO<0=e2jt,O<r< 1,
dr2 r dr }"r1~ddi=~3cose
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
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
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)
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.