Beruflich Dokumente
Kultur Dokumente
ABSTRACT
In this paper we introduce two full multigrid algorithms in a Cartesian and a Polar coordinate system that have
been modified to treat the elliptic partial differential equations with a mixed derivative term, in the two dimensional space
in a quarter of a unit circle, special modification for the points in the neighborhood of the curved boundary has been done.
An advantage of the two algorithms is that the extension from two to three space dimensions is straightforward. numerical
examples have been given.
KEYWORDS: Multigrid Method, Numerical Analysis, Elliptic PDE, Cartesian and Polar Co-Ordinate Systems
1 FULL MULTIGRID ALGORITHMS IN CARTESIAN COORDINATES
1.1 INTRODUCTION
Consider the general linear elliptic partial differential equation:
R2
(1.1a)
R2
(1.1b)
A difference approximation Lh
of L in equation 1.1a
is said to be of order p if Lh(U) = O(h ), where h is the mesh size. In our case p = 2, so we
shall
use
the
6-point
difference
equation
to
the
mixed
derivative
term
Uxy
to
avoid
the
absent
points in our grids because of the curved boundary see [3] and [4]
1.2 Finite Difference Discretizaton
For each grid we replace each term in equation 1.1a by a second order finite difference approximation for two kinds of points as follows:
1.Normal Points: These points are interior points are not laying near the curved boundary:
for a grid with mesh size is h, we have the following discretizaton:
Uxx = h2 (ui+1,j + ui1,j 2ui,j)
Uyy = h2 (ui,j+1 + ui,j1 2ui,j)
(1.2)
www.tjprc.org
editor@tjprc.org
76
Osama El-Giar
Substitute these values in equation 1.1a we get the following system of linear equations for normal
points:
(1.3)
2.Curved
Boundary
Points:
These
When the
points
are
boundary is
points
that
laying
near
the
curved
rectangular
boundary:
grid at
xx
yy
2
= h 2
(
1
+
j +1, j
2
2
u i 1, j
u
i , j
(1 + )
2
2
2
= h 2
u i , j +1 +
u i , j 1
u i, j
(
1
+
)
(
1
+
(1.4)
2 ci, j
(1 + ) u i + 1 , j + 2 1 + b i , j u i 1 , j + (1 + ) u i , j + 1
77
Two Full Multigrid Algorithms in Cartesian and Polar Coordinate Systems to Solve an Elliptic
Partial Differential Equation with a Mixed Derivative Term in a Quarter of a unit Circle
ci, j
+ 2
bi, j
1+
a
u i , j 1 2 i , j + i , j b i , j
i,j N 1, h =
Where 1
u i , j + 2 b i , j u i 1 , j 1 = h 2 f i , j
(1.5)
1
, N is the number of interior points in each direction
N +1
h, h
are the distances from the point in the neighborhood of the boundary and the curve boundary in
direction of the x-coordinate and the y-coordinate respectively.
1.3 Multigrid Method
A sequence of 5 grids kh have been used with mesh sizes kh, k = 2n, n = 0, 1, 4,
where h = 64. The elliptic equation
have been
method with the coarse grid correction (CGC), see Figure 2 and has the following components:
1. Coarse to Fine Interpolation with Operator
h
2h
interpolation where corrections are to be interpolated from coarser grids and added to finer grids and the full
multigrid interpolation where current values of the approximate solution on the coarser grid are interpolated as the first
approximation to the solution (on the first visit to the grid) on the finer grids, see [2], we choose for both cases of
interpolations the bilinear interpolation. Now we have two kinds of points see figure 3:
u
u
h
2i,2 j
h
2 i +1 , 2 j
2 i , 2 j +1
1
2
(u
i, j
1
2
(u
i, j
2 i + 1 , 2 j +1
2h
i, j
1
4
2h
(u
2h
i +1 , j
+ u i , j +1
2h
i, j
2h
2h
2h
2h
+ u i +1, j + u i , j +1 + u i +1, j +1 for remaining points in, (point 7)
(1.6)
editor@tjprc.org
78
Osama El-Giar
Since we have used red- black gauss-Seidel iteration, then we need interpolation only for odd points in
the x and y directions respectively defined by
h
2 i , 2 j +1
+h
2h
i, j
hu
2h
i , j +1
(1.7)
2h
h
I h2 h R h = R 2 h where the
computed on the fine-grid and transfer it to the coarse-grid according to the rule:
components of
Rij2 h of R 2 h are given by the following two schemes- see [2] and [3]:
(a) Half-Weight: If B = 0 in equation 1.1a, we use the red-black Gauss-Seidel relaxation it is better to use the
half-weight operator since the residual at the black (odd) points must vanish and the stencil of the half-weight operator
takes the form:
2h
h
0
1
= 1
8
0
0
1
0
1
4
1
2h
(1.8)
h
(b) Full-Weight: If B = 0 in equation 1.1a, we use the red-black Gauss-Seidel relaxation, so we may use either the
half-weight operator or the full-weight operator, or it is better to use the half-weight operator for normal points and
full-weight operator for curved boundary points. The stencil of the full-weight operator takes the form:
I
1.4
2h
h
1
1
=
2
16
1
1
2
1
2
4
2
2h
(1.9)
h
Fortran
The
were
executed
accuracy of the
on
method
a
is
pentium
measured
PC
by both L2
using
FORTRAN90
norm of both
workstation
defect
and
error
compiler.
and the
max norm of both defect and the error. The general formula for the test problem is given by:
79
Two Full Multigrid Algorithms in Cartesian and Polar Coordinate Systems to Solve an Elliptic
Partial Differential Equation with a Mixed Derivative Term in a Quarter of a unit Circle
R2
2. Test Problem 2:
(1.10a)
(1.10b)
1
2
3. Test Problem 3:
2
2
2xy
Uexact = e2xy, F (x,y) = 4(x + y + xy + )e
(1.11a)
(1.11b)
1
2
2
2
2xy
Uexact = e2xy, F(x,y)=4(x +y +xy+ )e
(1.12a)
(1.12b)
F (x, y) = 13 sin(3x + y)
www.tjprc.org
editor@tjprc.org
80
Osama El-Giar
81
Two Full Multigrid Algorithms in Cartesian and Polar Coordinate Systems to Solve an Elliptic
Partial Differential Equation with a Mixed Derivative Term in a Quarter of a unit Circle
(1 + sin
cos
) Urr +
1
:
2
1
1
(1 sin cos ) Ur + 2 (1 sin cos ) U
r
r
1
1
sin 2 cos 2 U + cos 2 sin 2 U r = F ( r , ),
2
r
r
(2.1)
where =
(r , ),0 r 1,0 0 , subject to the dirchlit boundary conditions:
4
U = g
(2.2)
(2.3)
...
0
www.tjprc.org
B1
D1
C
0
B1
D
...
...
1
B1
...
...
...
...
...
C1
0
D
C1
0
B1
D 1
0
0
u1
u
2
M
u N 1
b1
b
2
= M
b N 1
(2.4)
editor@tjprc.org
82
Osama El-Giar
where 1
D1 = 2 1 + 1 sin 2 +
B1 =
C1 =
1
1
, =
, are the mesh size and
N +1
2( N + 1)
I, j N 1, h
1
(i )2
1 sin 2
2
cos 2
1 sin 2
2
2 i 2
(i )2
1
(i )
(2.5)
cos 2
1 sin 2 +
2
2 i 2
1
. The elliptic equation have been solved using full multigrid W-cycle method with the coarse
64
Where h =
grid correction (CGC), see Figure 5 and has the following components:
h
2h
h
2h
: It takes coarse-grid vectors u2h defined on G2h and produces fine grid vectors uh
(2.6)
h
2 i +1, 2 j
1
2
(u
h
2 i 1 , 2 j
2h
i +1 , j
(points 4, 6)
(2.7)
83
Two Full Multigrid Algorithms in Cartesian and Polar Coordinate Systems to Solve an Elliptic
Partial Differential Equation with a Mixed Derivative Term in a Quarter of a unit Circle
h
2 i , 2 j +1
(u
1
4
+ u 2 i +1, 2 j + u 2 i 1, 2 j + 2 + u 2 i +1, 2 j + 2
h
2 i 1, 2 j
(points 2, 8)
(2.8)
h
2 i +1 , 2 j +1
1
4
(u
2h
+ u i +1 , j + u i , j +1 + u i +1 , j +1
2h
i, j
2h
2h
(points 3, 9)
(2.9)
h
2 i +1, 2 j +1
1
3
(u
2h
i, j
+ ui+1, j + ui+1, j +1
2h
Restriction Operator
2h
(points 1, 7)
(2.10)
I h2 h : It takes fine grid vectors Rh defined on Gh and produces coarse grid vectors R2h
I h2 h R h = R 2 h since we use the line relaxation for every grid it is better to use the full-weight
I h2 h =
1
8 i +
(i
21 1
2i
2
(i )
(i )2
1
2 1
(
i
2
(i )2
2h
(i )2
1
21 +
2
i
h
1
(2.11)
(2.12)
2. Test Problem 2:
Uexact =
r 4 (sin cos ) 2
(2.13)
3. Test Problem 3:
2
Uexact = sin (r sin cos + 1)
(2.14)
4. Test Problem 4:
Uexact = r6 (sin cos )3 + 3r4 (sin cos )2 +6r2 (sin cos ) + 2
www.tjprc.org
(2.15)
editor@tjprc.org
84
Osama El-Giar
5. Test Problem 5:
2
Uexact = e r (sincos)
(2.16)
Test Problem 1: Equation 2.12
85
Two Full Multigrid Algorithms in Cartesian and Polar Coordinate Systems to Solve an Elliptic
Partial Differential Equation with a Mixed Derivative Term in a Quarter of a unit Circle
3. CONCLUSIONS
The implementation of an elliptic partial differential equation in the 2-dimensional space in a quarter of a unit
circle have been shown to be an efficient method. The convergence rate of the method in Cartesian coordinates has been
improved as we increase the number of relaxation steps before coarse grid correction, in the polar coordinates we should
use the W-cycle instead of V-cycle to achieve almost the same or a little bit better convergence rate than that of the method
in Cartesian coordinates. The other advantage of the two algorithms in Cartesian and in Polar coordinates is that the
extension from two to three space dimensions is straightforward.
REFERENCES
1.
Brandt A., Multi-level adaptive technique (MLAT) for fast numerical solution to bound-ary value problem,
Springer, Berlin - 1973.
2.
Briggs L., A Multigrid Tutorial, Society for Industrial and applied mathematics - 2000.
3.
Hackbucsh W., Multigrid Methods and applications, Springer Berlin Heidelberg Berlin,- 2003.
4.
G. D. Smith, Numerical Solution of Partial Differential Equations: Finite Difference Methods., Oxford
Applied Mathematics & Computing Science Series, - January 16, 1986.
5.
6.
7.
John D. Anderson, Jr. Computational Fluid Dynamics: The Basics with Applications, McGraw-Hill Inc, - 1995.
8.
J.E.
Dennis
and
R.B.
Schnabel,
Numerical
Methods
for
Unconstrained
Optimization
J.C.
Tannehill,
D.A.
Anderson,
Computational
Fluid
Mechanics
and
Heat
Transfer,
Second Edition , Series in Computational and Physical Processes in Mechanics and Thermal Sciences., - April 1,
1997.
10. W. L. Briggs, V. E. Henson, and S. F. McCormick, A Multigrid Tutorial, Second Edition SIAM Books,
Philadelphia - 2000
11. Bobby Philip, An Introduction to Multigrid Techniques The Institute for Mathematics and Its Applications,
Minnesota - January 11, 2008.
www.tjprc.org
editor@tjprc.org