Elliptic Problems: 8.1 Dierence Schemes For Poisson's Equation
Elliptic Problems: 8.1 Dierence Schemes For Poisson's Equation
Elliptic Problems
8.1 Dierence Schemes for Poisson's Equation
Models of steady (time independent) problems in science and engineering give rise to
elliptic partial dierential systems. Examples arise in heat conduction, incompressible
ow, electrostatic potentials, and static elasticity. Elliptic problems are boundary value
problems rather than propagation problems. Poisson's equation is canonical and a typical
two-dimensional problem involves determining u(x y) satisfying
Lu = ; u ;uxx ; uyy = f (x y)
(x y) 2
(8.1.1a)
u + un =
(8.1.1b)
Here,
<2 with boundary @
and n is the unit outward normal to @
.
Let us begin with the nite-dierence solution of the Dirichlet problem ( = 1 = 0)
for (8.1.1) on the rectangular region
Elliptic Problems
y
a
K
000
111
000 0011 111
111
000
111
000
(j,k)
1
0
0
Figure 8.1.1: Grid structure for the solution of Poisson's equation on a rectangle.
or
(8.1.2a)
where
2
x = 2( x 2 +y y2)
x2
y = 2( x 2 +
y2)
2
2
xy = 2( xx2 + y y2) :
(8.1.2b)
The computational stencil for (8.1.2) is a ve-point cross shown in Figure 8.1.1. The usual
Taylor's series expansion reveals that (8.1.2) has an O( x2 )+ O( y2) local discretization
error since centered dierence formulas are used on a uniform mesh.
We obtain a discrete problem by writing the dierence formula (8.1.2a) at each interior
mesh point (j 2 1 J ; 1] k 2 1 K ; 1]) and using the Dirichlet boundary conditions to
obtain a linear algebraic system. Let us rst illustrate this system for a 3 3 mesh as
shown in Figure 8.1.2. Writing (8.1.2a) at the mesh points (1 1), (2 1), (1 2), and (2 2)
gives
U1 1 ; xU2 1 ; y U1 2 = xy f1 1 + x 0 1 + y 1 0
t
(0,3)
(1,3)
(2,3)
(3,3)
(0,2)
(1,2)
(2,2)
(3,2)
(0,1)
(1,1)
(2,1)
(3,1)
x
(0,0)
(1,0)
(2,0)
(3,0)
;x U1 1 + U2 1 ; y U2 2 = xy f2 1 + x 3 1 + y 2 0
;y U1 1 + U1 2 ; xU2 2 = xy f1 2 + x 0 2 + y 1 3
;y U2 1 ; x U1 2 + U2 2 = xy f2 2 + x 3 2 + y 2 3:
The known boundary data is written on the right side of the equations to give us a 4 4
linear system of equations for the four unknowns Uj k , j k = 1 2, at interior mesh points.
Following the nomenclature used in Chapter 5 for parabolic problems, let
Uk = U1 k U2 k UJ ;1 k ]T
(8.1.3a)
(8.1.3b)
dentoe the vector of all unknowns ordered by rows. Writing the dierence equation
(8.1.2a) at all interior mesh points gives the linear system
AU = b
or
2
C1 D1
66 D2 C2
64
D2
...
DK ;1 CK ;1
(8.1.4a)
32
U1
6
7
U2
6
7
6
7
5 4 ...
UK ;1
3 2
b1
6
7
b2
6
7
=
6
7
5 4 ...
bK ;1
3
7
7
7
5
(8.1.4b)
Elliptic Problems
where
2
1 ;x
66 ;x 1 ;x
Ck = 64
...
;x 1
and
2
f1 k
66 f2 k
bk = xy 64 ..
.
2
3
66
77
75 + x 666
4
3
7
7
7
5
2
;y
6
;y
Dk = 664
...
;y
3
7
7
7
5
(8.1.4c)
2
3
2
3
0 k
10
1K
7
0 7
6
7
6
7
... 77 + 1 k y 66 2. 0 77 + K ;1 k y 66 2. K 77 : (8.1.4d)
7
4 .. 5
4 .. 5
5
0
fJ ;1 k
J ;1 0
J ;1 K
J k
The matrices Ck and Dk are (J ; 1) (J ; 1) tridiagonal and diagonal matrices, respectively thus, A is (J ; 1)(K ; 1) (J ; 1)(K ; 1) block tridiagonal matrix. The
Kronecker delta j k is unity when j = k and zero otherwise.
Problems involving Neumann or Robin boundary conditions are treated as described
in Section 4.2 for parabolic problems. Problems on nonrectangular domains may be
treated by nite element or nite volume (Section 8.2) methods.
We conclude this section by noting that linear elliptic partial dierential equations
satisfy a maximum principle which states that the maximum (minimum) value of u in a
closed region
occurs on the boundary @
.
Example 8.1.1. Let us illustrate the maximum principle for Laplace's equation
u = uxx + uyy = 0:
Functions u satisfying Laplace's equation also satisfy the \mean value theorem"
Z 2
1
u(P) = 2
property to have because it can be used to establish the uniqueness of solutions. Consider
the discrete approximation (8.1.2) of Laplace's equation (f (x y) = 0) and, for simplicity,
let x = y. In this case, use of (8.1.2b implies that x = y = 1=4 and (8.1.2a) becomes
Lu = f (x y):
The summation in (8.1.6) is taken over a nite set of points surrounding (xj yk ). We
regard s = s1 s2]T as a vector having integral coecients indicating the points in the
stencil of the dierence scheme with the interpretation Qs = (j + s1 k + s2).
We'll begin with some properties that (8.1.6) might possess.
cs 0
8 jsj S
8 (xj yk ) 2
:
(8.1.7)
X
jsjS jsj6=0
jcsj
8 (xj yk ) 2
:
(8.1.8)
Elliptic Problems
c0 = 1
c1 0 = c;1 0 = x
c0 1 = c0 ;1 = y :
From (8.1.2b) we see that the coecients x and y are positive thus, this dierence
scheme is non-negative. Also, using (8.1.2b)
X
jcsj = 2x + 2y = 1:
jsjS jsj6=0
The question of diagonal dominance is, as yet, undecided. Both c0 and the sum of the
o-diagonal entries in the dierence scheme are unity. This will be true at all mesh
points that are not adjacent to boundaries. Thus, the scheme will be diagonal dominant
or not depending on the prescribed boundary conditions. Homogeneous Dirichlet data,
for example, will drop at least one of the four terms in the dierence scheme at mesh
points adjacent to the boundary and result in diagonal dominance.
The extension of the maximum principle to elliptic operators having the form of
(8.1.6) follows.
De nition 8.1.3. Let V be any function dened on the mesh that satises
LVj k 0
8 (xj yk ) 2
:
(8.1.9)
Proof. Without loss of generality, assume that V > 0, since a large positive constant can
be added to V without aecting the location of extreme points. From (8.1.6) and (8.1.9)
we have
X
X
c0Vj k
csVQs jsjmax
V
jcsj):
Q
s(
S jsj6=0
jsjS jsj6=0
jsjS jsj6=0
c0 Vj k c0 jsjmax
V :
S jsj6=0 Q
s
Therefore,
Vj k jsjmax
V :
S jsj6=0 Q
s
As with continuous problems, the discrete maximum principle may be used to prove
uniqueness of nite dierence solutions. Additional results involving maximum principles
are given in Mitchell and Griths 6], Section 3.8, and Strikwerda 7], Section 12.3.
Elliptic Problems
xW
xE
yS
Figure 8.2.2: Notation used for unequal-arm nite dierence approximations near a
boundary point P .
As shown in Figure 8.2.2, we are using a single-subscript notation. Thus, if P has the
indices (j k), we let uP = uj k, uE = uj+1 k, etc. Similarly, xE = xj+1 ; xj , etc., and
x = max( xE xW ). Approximations obtained by neglecting the uxx term in (8.2.1a)
and the uxxx term in (8.2.1b) are only rst-order accurate. The order of accuracy can be
improved by retaining more terms in Taylor's series expansions of the solution about P .
As noted in Chapter 2, this will enlarge the computational stencil by bringing in points
to the left of W . A second-order approximation for ux is easily obtained by substituting
the expression (8.2.1b) for uxx into (8.2.1a)
1
(ux)P =
xW (uE ; uP ) + xE (uP ; uW )] + O( x2 ):
(8.2.1c)
xE + xW xE
xW
Dirichlet boundary conditions using unequal-arm dierences such as (8.2.1) are only
slightly more complicated to implement than those on a uniform mesh. For example, the
discrete form of (8.1.2a) with prescribed Dirichlet data u = (x y), (x y) 2 @
, would
be
; x +2 x E ;x UP ; UP ;x UW ] ; y +2 y N ;y UP ; UP ;x US ] = fP
E
W
E
W
N
S
N
S
at a point such as P of Figure 8.2.2. Here, E and N denote the values of at the
boundary points E and N , respectively.
Implementing Neumann boundary data, however, is substantially more complex and,
in fact, does not have a satisfactory resolution using an approach like we have described.
The \nite volume" technique oers a better way of treating Neumann boundary data
and, in general, of solving problems on nonuniform meshes. Actually, nite element
techniques are the most eective way of both satisfying Neumann data and implementing
solution strategies on nonuniform meshes. Finite element techniques are not studied in
these notes, but we will describe the nite volume relative to the model problem
;r ru = ;(ux)x ; (uy )y = f (x y)
(x y) 2
(8.2.2)
where = (x y).
Let us integrate (8.2.2) on some region R
and use the divergence theorem to
obtain
ZZ
Z
ZZ
0=
r ru + f ]dxdy = unds +
fdxdy
(8.2.3)
R
@R
10
Elliptic Problems
nonuniform mesh of rectangular cells. Consider a cluster of four cells as shown in Figure
8.2.3 and let R be the rectangular region obtained by bisecting each arm and connecting
the normals through the bisection points.
xW
xE
N
111111111
000000000
000000000
111111111
000000000
111111111
000000000
111111111
000000000
111111111
000000000
111111111
000000000
111111111
P
yk
S
xj
Figure 8.2.3: Group of four rectangular cells and the region R used for the nite volume
technique.
Line integrals in (8.2.3) are approximated using the midpoint rule and normal derivatives are approximated using centered dierences thus, for example, the portion of line
integral in (8.2.3) on the right edge of R would be
Z y +1=2y
U
y
E ; UP
N + yS
uxdy
(xj + xE =2 yk ) x
:
(8.2.4a)
2
N
y ;1=2y
The area integral in (8.2.3) is approximated by the rectangular rule using data at the
point P to get
ZZ
x
y
E + xW
N + yS
f (x y)dxdy
f (xj yk )
:
(8.2.4b)
2
2
R
y
U
x
N + yS
S ; UP
E + xW
+j;1=2 k
+ j k;1=2 y
:
2
2
S
(8.2.5)
This version of the nite volume scheme is only rst-order accurate unless the mesh
spacing is uniform. With uniform spacing and = 1, (8.2.5) is identical to centered
dierences (8.1.2). Even though it is rst order, the unequal-arm dierence scheme may
use fewer computational cells on a nonuniform mesh and produce comparable accuracy
to a second-order scheme on a denser uniform mesh. Such relative tradeos have to be
appraised.
The nite volume scheme can be applied on non-rectangular regions. This is useful
near curved boundaries and for unstructured-mesh computation. Let us illustrate the
approximation of boundary data rst. Two possibilities are shown in Figure 8.2.4. In
the case shown on the top, the point P is not on @
and the region R is selected as a
triangularly-shaped region. The line integral in (8.2.3) is approximated as
Z
U
W ; UP
unds
NE (Un )NE sNE + j;1=2 k x
( yN + yS =2)
W
@R
UW ; UP
xW
+j k;1=2 US ; UP ( xE + xW =2)
(8.2.6a)
yS
where sNE is the length of the outer boundary of R and (Un )NE is the approximation
of un at the midpoint of the outer boundary of R (cf. Figure 4). The value of (Un)NE is
obtained from the prescribed Neumann boundary data, e.g.,
(Un )NE = NE :
(8.2.6b)
The above choice of mesh is reasonable but it doesn't provide for solutions to be
computed on the boundary. Another alternative, shown at the bottom of Figure 8.2.4,
is to design the mesh so that point P is on the boundary. Then, taking the region R as
shown, the line integral in (8.2.3) is approximated as
Z
unds
PSE (Un)PSE sPSE + PNW (Un)PNW sPNW
@R
12
Elliptic Problems
000111111111
111
000000000
000000000
111111111
000000000
111111111
000000000
111111111
000000000
111111111
00000000010
111111111
1010
N
yN
NE
xW
xE
1111111
0000000
111111
000000
0000000
1111111
0000000
1111111
0000000
1111111
0000000
1111111
0000000
1111111
PNW
yS
yN
PSE
xW
Figure 8.2.4: Boundary approximation by the nite volume method when the point P is
o (top) and on (bottom) the boundary.
j;1=2 k
UW ; UP ( y + y =2) +
US ; UP ( x =2 + x ): (8.2.7)
N
S
E
W
j k;1=2
xW
yS
The subscript PSE identify the point midway between points P and E (Figure 8.2.4).
Similarly, point PNW is midway between points P and NW . The lengths of the arcs
containing PSE and PNW are sPSE and sPNW , respectively.
Completely \unstructured" meshes of triangular or quadrilateral elements in two dimensions and tetrahedra and hexahedra in three dimensions are used for nite element
computation and have become popular with nite volume methods as well. A portion
13
111111111111
000000000000
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
000000000000
111111111111
P
l P,i
m P,i
sP,i
bP,i
Figure 8.2.5: Portion of a mesh of triangular elements and the region R surrounding a
point P .
of a mesh surrounding a point P is shown in Figure 8.2.5. The region R is taken as the
polygon formed from the perpendicular bisectors of the element edges intersecting point
P . The approximation of (8.2.3) on such a mesh is
U ; U
N
X
b
P
fP AR + m
sP i = 0
(8.2.8)
lP i
i=1
P
P i
P i
Problems
1. A nite volume method may be constructed on an unstructured grid of, e.g., trian-
14
Elliptic Problems
gular elements by placing the unknowns (at points such as P ) at cell centroids rather
than vertices. Develop an approximation for (8.2.3) using such a mesh structure.
2. Consider a cluster of four rectangular computational cells contained within
;(ux)x ; (uy )y + qu = f (x y)
at (xj yk ) using the nite volume method. Do not assume that (xj yk ) is at the
center of Dj k .
15
111
000
000
111
f ( ,1)
2,2
11
00
1,2
1,2
f (0, )
y
f ( 1, )
11
00
00
11
11
00
1,1
2,1
01
10
10
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1111111111111111111111111
0000000000000000000000000
1010
1010
1010
1,1
f ( ,0)
2,2
2,1
Figure 8.3.1: Mapping of a simply connected region (left) onto a rectangular computational domain (right).
8.3.1
Scientists and engineers have used coordinate mappings for some time to transform complicated domains into simpler ones. The mappings can employ either analytical or piecewise polynomial functions. The procedure usually starts with relations
x = f1( )
y = f2( )
that dene the domain in physical (x y) space to its image in the simpler (
) space. A
simply connected region and its computational counterpart appear in Figure 8.3.1. It's
convenient to introduce the vectors
xT = x y]
(8.3.1a)
x = f ( )
(8.3.1b)
In Figure 8.3.1, we have shown a region with four segments f (
0), f (
1), f (0 ),
and f (1 ) that are related to the computational lines
= 0,
= 1, = 0, and = 1,
respectively. (The four curved segments may involve dierent functions, but we have
written them all as f for simplicity.)
Let us also consider the projections
P (f ) = 1 ( )f (0 ) + 2 ( )f (1 )
(8.3.2a)
16
Elliptic Problems
(8.3.2b)
where
1 ( ) = 1 ;
2 ( ) = :
(8.3.2c)
With
ranging on 0 1], the mapping x = P (f ) transforms the left and right edges
of the domain correctly, but ignores the top and bottom while the mapping x = P (f )
transforms the top and bottom boundaries correctly but not the sides (Figure 8.3.2).
Coordinate lines of constant
and are mapped as either curves or straight lines on the
physical domain as indicated in Figure 8.3.2.
0011
2,2
1,2
0011
2,2
111
000
1,2
111
000
1,1
0011
x
00111100
111
000
1,1
2,1
111
000
000
111
2,1
00111100
1,2
11
00
2,2
111
000
2,2
111
000
000
111
1,2
111
000
1,1
111
000
2,1
11
00
1,1
111
000
2,1
17
P P = P (f ) + P (f ) ; P P (f ):
(8.3.3a)
(8.3.3b)
18
Elliptic Problems
111111111
000000000
000000000
111111111
3
000000000
111111111
000000000
111111111
2
000000000
111111111
4
1
2
5
5
1111111111
0000000000
0000000000
1111111111
3
0000000000
1111111111
0000000000
1111111111
2
0000000000
1111111111
4
1
Airfoil
01
10
10
1010
10
10
1010
10
01
10
10
1010
10
10
1010
10
01 10
1010 1010
10 10
11111111111111111111111111
00000000000000000000000000
1010 1010
1010 1010
1010 1010
airfoil
Figure 8.3.4: \O-grid" (top) and \C-grid" (bottom) mappings of the ow about an airfoil.
the model self-adjoint dierential equation (8.2.2). Returning to the scalar form of the
coordinate transformations, we write (8.3.3b) in the generic form x = x(
), y = y(
).
Then
( )x = ( )
x + ( ) x
( )y = ( ) y + ( ) y :
(8.3.4)
(8.3.5)
where ^ = (x(
) y(
)) and f^ = f (x(
) y(
)). Although (8.3.5) may be rewritten in several forms, this one is as good to discretize as any. The metrics of the
transformation
x, x,
y , and y are obtained by using (8.3.4) with x and y inserted in
19
or
1 = x x + x x
0 = y x + y x
0 = x y + x y
1 = y y + y y :
J xx yy = 10 01
J = xy xy :
(8.3.6)
The elements of the Jacobian are obtained by dierentiating the transformation (8.3.3b).
8.3.2
There are several approaches to unstructured mesh generation. Early attempts used
manual techniques where point-coordinates were explicitly dened. Semi-automatic generation techniques required generating a coarse mesh which could be uniformly rened
by dividing each element edge into K segments and connecting segments on opposite
sides of an element to create K 2 (triangular) elements. More automatic procedures use
advancing fronts 5], point insertion, and recursive bisection. We'll discuss the latter
procedure because it was pioneered and developed at Rensselaer.
With recursive bisection 2], a two-dimensional region
is embedded in a square \universe" that is recursively quartered to create a set of disjoint squares called quadrants.
Quadrants are related through a hierarchical quadtree structure. The original square
universe is regarded as the root of the tree and smaller quadrants created by subdivision are regarded as ospring of larger ones. Quadrants intersecting @
are recursively
quartered until a prescribed spatial resolution of
is obtained. At this stage, quadrants
that are leaf nodes of the tree and intersect
@
are further divided into small sets
of triangular or quadrilateral elements. Severe mesh gradation is avoided by imposing a
maximal one-level dierence between quadrants sharing a common edge. This implies a
maximal two-level dierence between quadrants sharing a common vertex.
A simple example involving a domain consisting of a rectangle and a region within a
curved arc, as shown in Figure 8.3.5, will illustrate the process. In the upper left portion
of the gure, the square universe containing the problem domain is quartered creating the
20
Elliptic Problems
one-level tree structure shown at the upper right. The quadrant containing the curved
arc is quartered and the resulting quadrant that intersects the circular arc is quartered
again to create the three-level tree shown in the lower right portion of the gure. A
triangular mesh generated for this tree structure is also shown. Quadrants and a mixed
triangular- and quadrilateral-element mesh for a more complex example are shown in
Figure 8.3.6.
11
00
00
11
00
11
Boundary quadrant
Interior quadrant
Exterior quadrant
1
0
0
1
Finite element
0
1
1
0
0
0 1
1
1
0
0
1
00
11
0
1
00
11
0
1
0
1
00
11
0
1
00
01
1
011
00
011
1
00
11
1
0
0
1
0
1
1
0
00
11
0
1
00
11
0 11
00
0
1
11 1
00
1
0
0
0
01
1
01
1
0
1
1
0
0
0
01
1
01
1
0
1
1
0
1
0
0 0
1
01
1
1
0
Figure 8.3.5: Finite quadtree mesh generation for a domain consisting of a rectangle and
a quarter circle. One-level and three-level tree structures and their associated meshes of
triangular elements are shown at the top and bottom of the gure, respectively.
21
Figure 8.3.6: Quadtree structure and mixed triangular- and quadrilateral-element mesh
generated from it.
The quadtree procedure may be extended to three dimensions where an octree decomposition is invoked. Elements produced by the quadtree and octree techniques may
have poor geometric shapes near boundaries. A nal \smoothing" of the mesh improves
element shapes and further reduces mesh gradation near @
. Element vertices on @
are
moved along the boundary to provide a better approximation to it. Pairs of boundary
vertices that are too close to each other may be collapsed to a single vertex. Interior
vertices are smoothed by a Laplacian operation that places each vertex at the \centroid"
22
Elliptic Problems
Problems
23
8
(6)
(5)
(7)
5
6
(4)
(2)
(1)
(3)
Figure 8.3.7: Sample mesh involving seven triangular elements having eight vertices.
Element
1
2
3
4
5
6
7
Vertices
1 2 4
2 5 4
2 3 5
5 3 6
4 5 7
7 5 8
5 6 8
Vertex
1
2
3
4
5
6
7
8
Coordinates
0.00 0.00
1.50 0.00
3.00 0.00
0.00 1.00
1.50 1.00
3.00 1.00
1.00 2.00
2.00 2.00
Element Edge
1
1
1
3
3
1
4
2
5
2
6
3
7
2
Table 8.3.1: Element-vertex data (left), vertex-coordinate data (center), and boundary
data (right) for the mesh of Figure 7.
24
Elliptic Problems
Bibliography
1] I. Babu!ska, J.E. Flaherty, W.D. Henshaw, J.E. Hopcroft, J.E. Oliger, and T. Tezduyar, editors. Modeling, Mesh Generation, and Adaptive Numerical Methods for
Partial Dierential Equations, volume 75 of The IMA Volumes in Mathematics and
its Applications, New York, 1995. Springer-Verlag.
2] P.L. Baehmann, S.L. Wittchen, M.S. Shephard, K.R. Grice, and M.A. Yerry. Robust geometrically based automatic two-dimensional mesh generation. International
Journal of Numerical Methods in Engineering, 24:1043{1078, 1995.
3] M.W. Bern, J.E. Flaherty, and M. Luskin, editors. Grid Generation and Adaptive
Algorithms, volume 113 of The IMA Volumes in Mathematics and its Applications,
New York, 1999. Springer-Verlag.
#
4] J.E. Flaherty, R.M. Loy, C. Ozturan,
M.S. Shephard, B.K. Szymanski, J.D. Teresco,
and L.H. Ziantz. Parallel structures and dynamic load balancing for adaptive nite
element computation. Applied Numerical Mathematics, 26:241{265, 1998.
5] R. L#ohner. Finite element methods in CFD: Grid generation, adaptivity and parallelization. In H. Deconinck and T. Barth, editors, Unstructured Grid Methods for
Advection Dominated Flows, Neuilly sur Seine, 1992. AGARD Report AGARD-R787.
6] A.R. Mitchell and D.F. Griths. The Finite Dierence Method in Partial Dierential
Equations. John Wiley and Sons, Chichester, 1980.
7] J.C. Strikwerda. Finite Dierence Schemes and Partial Dierential Equations. Chapman and Hall, Pacic Grove, 1989.
25