This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
\\ dt + * φ |Φιι dt + d ·) satisfy the homogeneous boundary conditions. Generally, the essential boundary conditions are satisfied through a specification of the undetermined parameters U such that (4.11.1) can be 0
*Φ|| )ψ
0
d(
0 1
0
dt
0]
>ot+ k
ι 2
02
+ Α:φ | φ
0 1
02
+ Αφ
Ίφοι+ k<j> 'Φοι dt d
dt
+ k<j>Φθ2 02
dt + k
— +
^02
/ίφ,, | φ
0i
d
*Φιι)φι
12
Ι 2
—τ- + ^φ
| 2
fkT^dt
^φ,,
+ Α:φ | φ |2
dt fkT^ dt
0 2
φ
1 2
02
dt
CkT# dt n
Jt\
74
Basic Concepts in the Finite Difference and Finite Element Methods
T o solve (2.2.52) for the undetermined coefficients 7} and dTj/dt, it is necessary to perform the integrations indicated in the coefficient matrix. U p o n integration, the matrix equation becomes (2.2.53a) 0.242
0.205
0.757
-0.162
0.00476
0.0190
0.162
-0.0309
-0.243
- 0.0381
1.24
-0.00476
0.0381
0.00238
0.205
0.0190
0.500 0.0833
dt
0.500 dT,
0.0833
dt
Because 7", is known from the initial condition [i.e., 7ΚΌ)=1], the first row of (2.2.53a) can be eliminated and the final expression is (2.2.53b)
0.0190
0.162
-0.0309
-0.0381
1.24
-0.00476
0.00238
-0.205
0.0190
dT, '
0.0833
dt T dT
2
2
dt
=
0.500
0.00476 — -0.243
-0.0833
0.0381
The second term on the right-hand side of (2.2.53b) contains information derived from the initial condition. By inverting the coefficient matrix* the unknown parameters are obtained. (2.2.54) dT, dt T dT
2
56.3 —
2
1.68 11.1
dt
7.45 0.996 9.80
89.7 2.48 68.2
-0.937
0.0785 0.743 -0.121
=
0.570
.
-0.131
The parameter T = 0 . 5 7 0 is the temperature at t = 1 and compares very well 2
'Although solutions of matrix equations are often expressed formally in terms of matrix inverses, in computations other techniques such as Gaussian elimination are used whenever possible.
Introduction to Finite Element Approximation*
75
with the analytical value 0.568. The temperature at the midpoint (r = 0 . 5 ) is easily obtained from the original expansion (2.2.49). 2
dT
7=1
By evaluating d> and
f ( 0 . 5 ) = (1.00)(0.500) - (0.937)(0.125) + (0.570)(0.50O) + (0.131)(0.125)=0.684. T o three significant figures, this solution is identical to the analytical. It is readily apparent that the Galerkin method employing the Hermite cubic generates a solution to our example problem that is superior to other methods investigated. It should be kept in mind, however, that this approach generated three simultaneous equations, whereas the schemes considered earlier generated only two. It is apparent from the coefficient matrix of (2.2.52) that considerable effort is involved in performing the integrations required in the Galerkin method when more complex bases, such as Hermites, are employed. Consequently, it is worthwhile at this point to investigate the use of Hermites in conjunction with the collocation method. In the collocation approach, the M W R formulation is written
(2.2.55)
f*{^
+ k(f-T )}8{t-t,)a=0, e
1 = 1,2,3,4,
where /, are the locations of the collocation points. When the collocation points are chosen to be specifically the Gauss points, a more accurate numerical scheme results. As mentioned earlier, this is known as orthogonal collocation. We use two Gauss points within the element and two additional points at the nodes to account for the boundary condition. N o t e that if the number of elements in the problem were increased, all additional collocation points would be selected at Gauss points. In contrast to our earlier example (2.2.52), this time let us perform our calculations in the ξ coordinate system. T h u s we write (2.2.55) as
(2.2.56)
fJ^f {f-T )^-i,)f^=Q, t+k
e
,- = 1 , 2 , 3 , 4 .
76
Basic Concepts in the Finite Difference and Finite Element Methods
Equation (2.2.56) yields the following matrix equation: (2.2.57) d
^oi di di
+
,
di
+
+
l
<
+k
t>oi , di
d<
+
d
*m
di
k
+k
£=
-I
£ = 0.577
rfi
+
*<*di
£ = - 0.577
di
dt ^ d i
£ = 0 577
£=
+k
di
^
, . .
+"di
rf€ **»* £ = -
-I
, , .
+k
{ = - 0.577
^ d i £=1
^ d i
k
di
- i
0.577
dt
, ,
+
di
^
^ d i
k
^ οι
''fe
H
+
φ
di
dt " d i t=
,
+
+
£ = 0.577
* " d i £=1
k
k
+"dt
* » d i £= - 1
1
dT,
Λ
^12
dt
*o2 £ d
+"di
+k
. . .
di ^Φΐ2
£=1
di
dt *»di
dt
£ = -0.577
+
k
+
k
dt *»di
T
£ = 0 577
dT
..
+
2
2
dt
£=1
'di
kT^kT^ 'di kT^-
The coefficient matrix of (2.2.57) can now be evaluated using the basis function definitions given in (2.2.42) and (2.2.46): 0 + 0.500*
0.500Δί+0
- 0.500 + 0.442*
0.144Δ/ + 0.0657*
-0.500+0.0576*
-0.144Δ* +0.0176*
0+0
0+0
(2.2.58)
0+0
0+0
0.500 + 0.0576*
-0.144Δί-0.0176*
0.500 + 0.442*
0.144Δ.-0.0657*
0+0.500*
0.500Δί+0
kT dT, dt
e
2 kT
e
2 kT
t
τ
2
2 kT
dt
2
2
dT
t
Introduction to Finite Element Approximations
77
Substitution of the appropriate values of k and T yields e
(2.2.59) 0.500 ~
1.00
0.500
0
0
0.384
0.275
0.615
-0.179
-0.384
-0.109
1.384
0.0126
1.00
0.500
0
0
dT, dt T dT
2
2
d'
0.500 0.500 0.500
Because the value of T, is given via the boundary conditions, we can again eliminate row 1 and solve the resulting matrix equation: (2.2.60)
0.275
0.615
-0.179
-0.109
1.384
0.0126
dT, ' dt T dT
2
2
dt
=
dt T dT
2
dt
2.83
-2.03
0.227
0.573
-0.454
=
2
0.500
1.00
0
dT, '
1.15
0.500-0.384
0 116
0.500 + 0.384
0.884
0.500
0.500
1.06
0.116
-0.936
0.0669
0.884
0.566
1.86
0.500
-0.139
The calculated value of Γ , (0.566), compares favorably with the analytical value, (0.568). When the computed coefficients are substituted into the series approximation to Τ and the result evaluated at / = 0 . 5 , the calculated value of 7 " | is 0.683, compared to the analytical solution of 0.684. We have summarized in Table 2.5 the accuracy of the numerical schemes considered thus far in solving the O D E 2
0 5
(2.2.9)
4£ + k(T-T ) t
= 0,
0
r(o)=i. Although this comparison is interesting qualitatively, one must keep in mind that the sample problem consisted of only one element. A more quantitative analysis is considered in a later section.
78
Basic Concepts in the Finite Difference and Finite Element Methods TABLE 2.5. Comparison of Solutions Obtained with Several Weighted Residual Schemes"
Solution Method
/=0.0
f =0.5
< = 1.0
1.00 1.00 1.00 1.00 1.00 1.00 1.00
0.678 0.667 0.684 0.696 0.684 0.683 0.684
0.571 0.555 0.579 0.571 0.570 0.566 0.568
Galerkin linear bases Collocation linear bases Subdomain linear bases Galerkin quadratic bases Galerkin Hermite cubic bases Collocation Hermite cubic bases Analytical "Problem definition is given in (2.2.9).
Calculation of Derivatives. There are occasions when it is necessary to obtain not only the unknown function but also its derivative. T h e Hermite formulation provided this information directly, but it is also available using earlier formulations. It is only necessary to differentiate the approximating expression
Σ
f=
Wt)
7= >
to obtain -
(2.2.61)
ι
τ;-^-
-
7= 1
1 Τ,—ξ-
—.
7=1
Because the coefficients T are known and the basis function derivatives readily obtained, (2.2.61) is easily evaluated. When linear bases for the derivative at t = 0 (using the Galerkin solution for T ) are used, we have }
}
dt
di
l= 0
+ T ({)(4) 2
dt ,
T
A
2
,
W
= 0
= - 2 . 0 0 + 1.36= - 0 . 6 4 0 .
Similarly, we obtain using quadratic bases
Λ
#
,=o
dt
>
T (= 0
{
l
)
{
2
)
+ r (2)(2)+r,(-i)(2)=-0.787. 2
Introduction to Finite Element Approximations
79
The analytical value of the derivative at r = 0 is - 1.00. In summary, the linear, quadratic, and Hermite bases, when used with Galerkin's formulation, yield derivative values of —0.640, —0.787, and —0.937, respectively, compared to the correct value, — 1.00. Let us now consider calculation of the derivative at the location i = 0 . 5 . This is important because it represents an interelement boundary for linear basis functions. Because the linear bases are C ° continuous, the derivative dfy /dt\ is not formally defined. The most common approximation of the derivative at this point is the average of d$j/dt\ . and d$ /dt\ _ _ , where 0 < ε < Δ ί . Derivatives calculated using the three bases are summarized in Table 2.6. The Hermite bases provide a significantly more accurate solution for the derivative, whereas the quadratic scheme is only marginally better, overall, than the linear case. N o t e that the problem encountered in defining the derivative at the edges of the linear element also arise at the edges of quadratic and C ° continuous cubic elements. l=0
l=(jiJi t
2.2.4
t=0
s
5
t
Two-Dimensional Basis Functions
The extension of the weighted residual method to higher dimensions is relatively straightforward, provided that regular rectangular subspaces are employed. We now focus on this special case and examine the more conceptually difficult irregular subspace problem in Chapter 3. As in the earlier discussion of one-dimensional schemes, we illustrate the two-dimensional case using an elementary example. The discretized domain, which we return to shortly, is illustrated in Figure 2.10. Lagrangian Basis Functions. The simplest way to generate a twodimensional basis function is to form the product of two one-dimensional bases, one written for each coordinate direction. This approach can be applied whether linear, quadratic, cubic, or Hermite cubic bases are used. When C ° continuous Lagrange interpolating polynomials are used, we refer to these as Lagrangian bases and the associated finite elements as Lagrangian elements.
TABLE 2.6. Temperature and Temperature Derivatives Computed Using Linear, Quadratic, and Hermite Cubic-Basis Functions
Function: Location:
/=0.5
Analytic Linear Quadratic Hermite
0.684 0.678 0.696 0.684
f
/ = 1.0
f =0.0
0.569 0.571 0.571 0.570
-1.00 -0.640 -0.787 -0.937
df/dt
f =0.5 -0.368 -0.429 -0.429 -0.378
80
Basic Concepts in the Finite Difference and Finite Element Methods
y 2.0
\i
6
9
Γ5
—Η 0 ·
0.5
m
0,0
0.5
i.O
i.5
2.0
-hFigure 2.10. Discretized domain for two-dimensional heat flow. Finite element nodes are indicated by dots and the elements themselves by Roman numerals (from Pinder and Gray, 1977).
As an example, the two-dimensional Lagrangian basis functions arising out of the linear bases of Table 2.4 are (2.2.62a)
*,U.H) = [ K 1 - O ] [ i 0 - * ) ] .
(2.2.62b)
• (€.η)=[Κΐ + ί)][Κΐ-ιΐ)],
(2.2.62c)
• (€.ι») = [1(1 + €)][Ηΐ + ΐ|)].
(2.2.62d)
2
3
fctt.»)
= U ( l - 0 ] [ i O + i|)].
Figure 2.11a illustrates φ,. The other functions have the same shape. Lagrangian quadratic, cubic, and Hermitian cubic two-dimensional basis functions are presented in Table 2.7a and illustrated in Figures 2Mb, c and 2.13. N o t e that the Lagrangian element requires interior nodes when quadratic or cubic basis functions are generated. Serendipity Basis Functions. Although Lagrangian bases are the logical extension of their one-dimensional counterparts, there is another choice which preserves many of the important properties of the Lagrangian bases while decreasing the degrees of freedom by eliminating interior nodes. Examination of Figure 2.11 b and Table 2.7a reveals that the basis function at the central node spans only the rectangular domain illustrated. In light of this observation, let us now examine the possibility of defining a set of two-dimensional bases that are quadratic along each side of the rectangle of Figure 2.11, yet have no
Introduction to Finite Element Approximations
81
Figure 2.11. (a) Two-dimensional basis function that is linear along each side, (b) Two-dimensional Lagrangian basis function that is quadratic along each side. Note the occurrence of a central node where the basis function must be zero.
center node. In a manner analogous to that used to obtain the one-dimensional basis functions, we first write a polynomial expression quadratic in ξ and in η. (2.2.63)
φ = a + bi + CTJ + di
1
+ «?η + / ξ η + gξ η + Λξη + / ξ η . 2
1
2
2
2
There are nine coefficients to be evaluated in this expression, which requires the specification of nine constraints. The Lagrangian scheme involves nine nodes, and consequently the nine conditions are easily formulated. In fact, the bases we derived by taking the product of two one-dimensional bases will arise
82
Basic Concepts in the Finite Difference and Finite Element Methods
(c)
{Continued)
Figure 2.11.
Figure 2.11. (c) Two-dimensional Lagrangian basis function that is cubic along each side. Note the occurrence of four interior nodes where the basis function is defined to be zero.
out of (2.2.63) when each basis function is required to be unity at the node for which it is defined and zero at all other nodes. Because we wish to obtain a basis function with no interior node, there can be only eight constraints imposed. Thus the general polynomial of (2.2.63) requires simplification. Let us achieve this objective by dropping the last term, leaving the expression
(2.2.64)
+ d£ + eT) + / ξ η + g | r j + Λξη . 2
2
2
2
By requiring each basis function Φ,(ξ,τ)) to be unity at node i and zero at all other nodes, we arrive at the matrix equation for the particular case of φ,:
(2.2.65)
1 0 0 0 0 0 0 0
1 1 1 1 1 1 1
.ι
-1 0 1 1 1 0 -1
-ι
-1 -1 -1 0 1 1 1 0
1 0 1 1 1 0 1 1
1 1 1 0 1 1 1 0
1 0 -1 0 1 0 -1 0
-1 0 -1 0 1 0 1 0
-1 0 1 0 1 0 -1 0
a b c d e f g _h
I PΡ-
Ε 8
I
PP" ΆΛΙ·
+
PP-
+
--— ΡΡ-
PP-
w
X
ΡΡ-
+
+
>>
ΙΒ S Υ 5
Ρ-
PΡ"
•A
+ χ
X
—
Ν*
+
c
Ρ· Ρ-
ΡΡ-
+
+
+ Χ
+
(Ν «Α»
Ρ
+
I
i
+ +
Ρ-
I
&
ΡΡ-
f
+
PP-
Ί I
+
Ρ-
«*<·
+
+
I
Ρ&>
χ
Ρ·
***
i
ι
~
χ.
χ
+
+
ΡΡ-
W
V
W
Ρ Ρ· 7
**?
***
+
Ν/
+ + Ρ; Ρ"
Ν ,
«Α*
I
Χ
I
fN Ρ"
V *
I
_
fN *JU>
Ηί5 Η2
-I»
+ Χ Ν*
+
Ρ-
I
Ν*
I
sg
Mi>
2
"8
!3 Υ α
.a
Β
Ν,
sε G Υ
«*?
Ρ
U
U
7
•G
•G
ΙΛ
<75
C Υ Ό
C Υ Ό
+1 +1 II II
83
P-
PΥ
•9
Side no
α
II
Cubic Comer node
II
~- —|fi
Ο
Interioir node
Ο
—
~
AA?|<»
Ρ?|<»
ΡΡΡΡ·
Ρ-
+ χ
Ρ-
+
Ρ-
χ
-
Ρ(Ρ
Ρ-
+
Ρ£
Ρ· Ρ-
Ρ·
+
ΡΡ-
1
I
ι *Α? ΑΛ*
+
~
+ «Α»
*** I
+
+
I
Η£
α. =5
+1 II II P-m
C
+1 II
Interioi• node.
+1 +1 II II
a
+ >—·
Ρ· Ρ-
S ω
+ W
Ρ·
**#
•a
-1_
*A,
is
+
PP-
ON
C
84
Basic Concepts in the Finite Difference and Finite Element Methods TABLE 1.1b.
Basis Functions Formulated Using a Mixed Formulation
Corner node e, = i ( i + « , X i + i i , )
where β and /8 are defined as (
η
Side
fit
A,
1 2
Linear Quadratic Cubic
n
1 2
2
in,
-i
g) 7
Side node Quadratic Φ, = 1(!-ί )(ΐ + ηη,) ί,=ο,
i 8
η, = ±ι
2
Cubic Φ,=Α(1-ί Χ1+9ξί,)(1 + η»),) Φ, = π(1 + ίί,Χ1-η )(Ι+9τ,η,)
_
£, = =*, ", = ±1 {, = ±1, η = ± \
2
2
Equation (2.2.65) yields the vector of coefficients a
I 4
b c d
0 0 I 4
1
e
4
f
1
G
4
4
h
1 1
.
4
J
which, when substituted into (2.2.64) gives (2.2.66)
Φι = ί ( - 1 + ξ + η + ξ η - | η - η | ) · 2
2
2
2
By employing a scheme analogous to the one used for φ , , one can obtain bases for the remaining corner nodes. AH corner node bases are described by (2.2.67)
φ, = I ( 1 + « , ) ( 1 + τ,η,)(«,. + τ,η, - 1),
where £, — ± 1, η, = ± 1, depending on the location of the corner node. Φ, = { ( ΐ - έ ) ( 1 + ητ,,) 2
for
£,=0
Introduction to Finite Element Approximation
85
(-1,1)
(-«.-4) (C)
Figure 2.12. (a) Two-dimensional serendipity basis function that is quadratic along each side, (b) Two-dimensional serendipity basis function that is cubic along each side, ( c ) Two-dimensional mixed serendipity basis functions. Note that the function may be linear, quadratic, or cubic along any given side.
Basic Concepts in the Finite Difference and Finite Element Methods
86
and
Φ, = Η1 +«,)(!-V)
for
η,=0.
Corresponding cubic and Hermite bases are summarized in Table 2,7a. Bases of this class are generally referred to as serendipity basts functions. It is interesting at this point to examine the significance of dropping the ζ η term in formulating the interpolating polynomial (2.2.64). The quadratic and cubic serendipity bases are presented in Figure 2.12a and b and can readily be compared with the Lagrangian bases of Figure 2.11. Note that although an overall similarity exists, the Lagrangian bases are somewhat different in the interior because of the additional constraints imposed on their formulation. It can be shown, using a type of analysis to be presented later, that the addition of the | t j term in general has little influence on the overall accuracy of the approximation. To this point we have tacitly assumed that one type of element, be it linear, quadratic, or cubic, would be used to represent all regions in a particular domain. There are occasions, however, where higher-degree elements may be required in one region but not another. This situation generally arises when the solution is not a smooth surface, such as in the vicinity of singularities or abrupt changes in medium properties. To change from one element type to another requires a transition element. This element must be sufficiently flexible that a different degree of basis function can be used along each side (see Figure 2.12c). The formulation of these bases is presented in Table 2.7a (Pinder and Frind, 1972). 2
2
2
2
Hermitian Basis Functions. Although the two-dimensional Hermite bases are generated through a straightforward multiplication of the one-dimensional functions of Figure 2.9, they are somewhat more difficult to apply than the C ° continuous cubics mentioned above. The two-dimensional expansion of the trial function T(t) now contains, in general, six unknown parameters per node: T oTj/dx. dTJdy, d Tj/dxdy, d T /dx , and 3 7 ; / θ . ν . For any point within an element, we obtain* 2
p
2
2
2
2
}
(2.2.68)
dx dx . dyW
J
'The superscript I is introduced to denote the C' Lagrangian Hermites.
(c)
id)
Figure 2.13. Two-dimensional basis functions formulated using Hermite polynomials.
This expansion requires four bases per node: φ ^ , φ', , φ , and φ ' . Their algebraic form is given in Table 2.7a and they are illustrated in Figure 2.13. Examination of Figure 2.13 reveals that these bases manifest the following properties: 0
3φ'ιο at
3φρι
01
η
9 ΦΊι 2
{ = £,, η = η ,
the node where it is defined
and 9φ\η ^Φοι ^ φ\ι -τ— /= -τ— /- . y ' = 0 σξ ση σξση 2
at all other nodal locations,
While (2.2.68) provides the general formulation, it is possible to rewrite this expansion in a form more clearly related to the one-dimensional expression (2.2.49). This is accomplished by defining new bases in the following way: (2.2.69)
f=ly
97"*
4
0j
+
+
^ φ '
^ +
J
37*
+
Ώ, φ
^
J
8^7"*
+
^
x
v
J
88
Basic Concepts in the Finite Difference and Finite Element Methods
where
31'
ι _
ι
dy
\
dy
\
2
Φχ.ν>-Φ||>
dx
dx
Comparison of (2.2.69) and (2.2.49) reveals that both are written in fundamentally the same form but with a different number of unknown parameters and bases. In the case of zero-order continuous polynomials, we found that an incomplete polynomial could be used to formulate bases. These were designated serendipity basis functions. This approach may also be used to considerable advantage in developing two-dimensional Hermite bases. The resulting approximating expansion is
(2.2.70)
37. f-
3*
Σ
^Φοο, + ^ Φ ι ο , - ^ ' + di 7= 1
+
J
37:
dr
9Γ,
dx
ι^Φου 3;r™;av
dy d ^
where we have omitted the superscript 1 from the bases to emphasize that they are not first-order continuous. These bases are presented algebraically in Table 2.7a and graphically in Figure 2.14. Equation (2.2.70) may be rewritten in the form of (2.2.69) as
(2.2.71)
Introduction to Finite Element Approximations
89
(c)
Figure 2.14. Two-dimensional serendipity basis functions formulated using Hermite polynomials.
where Φο,
=
Φοο,.
_ dx Φ^-Φ>ο>9Ϊ^ _ dy Φ>·7-Φιο,3^
+
+
dx Φου^^' ^y Φοι,9^·
Examination of (2.2.71) and (2.2.69) reveals a considerable saving in computational effort when serendipity rather than standard Hermitian bases are used. The degrees of freedom per node are reduced from six to three with serendipity bases. Experiments conducted using both types of bases in conjunction with the Galerkin formulation suggest that the two schemes are of comparable accuracy. The advantage of the serendipity scheme is even more pronounced in three-dimensional formulations.
90
Basic Concepts in the Finite Difference and Finite Element Methods
2.2.5
Approximating Equations
Each of the weighted residual schemes introduced to solve the one-dimensiona problem can be extended to two space dimensions. As illustrative examples, we solve the following problem using Galerkin's method with linear basis functions, and a similar problem using collocation and Hermite cubics. Example 1 Consider the problem of two-dimensional, time-independent heat flow in a rectangular plate with a heat source located at the center of the plate. The governing equations for this problem are (2.2.72a)
£(T)
(2.2.72b)
T(x,2)=\,
= T
xx
+T
= Q,
yy
(2.2.72c) (2.2.72d)
T (x,0)=0,
(2.2.72e)
T (2,y)
= 0,
(2.2.72f)
Q(x,y)
=
y
x
QJ(x-\)8(y
where χ and y are Cartesian coordinates, Q is the heat source, and δ is the Dirac delta function. The discretized domain of interest in this problem is illustrated in Figure 2.10. w
Step 1 Define the trial functions 9
(2.2.73)
T(x,y)^f(x,y)=
Σ
T^(x,y).
7=1
For convenience, it is advantageous to define basis functions in local (£, η) coordinates whereupon (2.2.73) becomes, for each element, 4
(2.2.74)
T(x,y)~f(x,y)=
Σ
Τ^(ξ,η)
7=1
and φ (ξ, η) are bilinear chapeau functions such as those illustrated in Figure 2.11a.
Introduction to Finite Element Approximations
91
Step 2 Formulate the integral equations using Galerkin's procedure. This is the special case of the M W R scheme wherein the weighting function has been defined as the basis function. O n e can also interpret Galerkin's scheme as the requirement of orthogonality between the residual R and each basis function, f R(x,y)t,{x,y)dxdy=0,
(2.2.75)
i = l,...,9,
A
J
where R(x,y)=t(f)-Q
(2.2.76)
and £ is defined by (2.2.72a). Substitution of (2.2.72a) and (2.2.76) into (2.2.75) yields [(f
(2.2.77)
A
J
xx
+ T -Q)*,(x,y)dxdy=O yy
/ = 1,...,9.
t
It is advantageous, but not mandatory, to apply Green's theorem to (2.2.77) to incorporate second- and third-type boundary conditions directly into the set of integral equations. Equation (2.2.77) becomes (2.2.78)
/ ( 7 > „ + 7 > „ + Qt,)dxdy-/(f l
+ f ,/, )φ,ds = 0,
x x
J
A
(
J
1
= 1
S
9,
where l and l are direction cosines with respect to the normal to the curve S, the boundary of the domain A. In this particular problem, the second term of (2.2.78) will be used to conveniently define the zero-gradient N e u m a n n boundary conditions of (2.2.72d) and (2.2.72e). Substitution of the trial functions, as defined by (2.2.73), into (2.2.78) yields the following set of algebraic equations: x
(2.2.79)
y
Jf J Σ Γ , ( φ „ φ , + φ,,φ ,) + (2Φ, J dx dy χ
-f (f l s
x x
κ
+ f l )*,ds=0, y y
/ = 1,...,9.
Because φ, is defined such that it is nonzero only over elements adjacent to node ; (see Figure 2.10 and 2.1 l a ) the integrations of (2.2.79) may be performed piecewise over each element and subsequently summed. Thus
•2
Bask Concepts in the Finite Difference and Finite Element Methods
(2.2.79) may be written Σ
(2.2.80)
f ((Σ
-\
WA/
(f I
s
x
x
Φ>ΑΙ)
+
t I )4>, ds^j =
+
y y
+
0,
Q4>1\
dy
i =
9,
where A is the area of element e, S is the curve bounding A , direction cosines. e
e
c
and l
are
a
Step 3 Formulate the matrix equation. In general, it is advantageous to express (2.2.80) in terms of the local (ξ, η) coordinate system to facilitate integration (see Figure 2.IS). This is easily accomplished provided that the relationship between derivatives of φ· in each coordinate system is readily available. T o obtain this relationship, we once again employ the chain rule to obtain
Hj _ Hj dx
3Φ>
8£ ~ dx 9ξ
dy
9η
_ 3Φ, dx
3JC
9η
|
dy dt
HJ dy dy
9η'
This set of equations is conveniently written in matrix form as
3Φ; (2.2.81)
dy'
3Φ, 9η
dx
9η
' 9φ, " dx
Η
3φ/ or
9JC
dy
9η
or
9φ,
' 3φ, " 9* 9Φ =[J) 9η
' 9Φ " 7
dx
;
dy
dy
9Φ>
dx ΘΦ; dy
9φ, 9η
where [J] is the Jacobian matrix. In our example problem [ / ] evaluated as (2.2.82)
1.0 [J\ = 0.0
0.0 0.5
(2.2.83)
1.0 0.0
0.0 2.0
is easily
As we shall see in the section on elements of irregular shape, the Jacobian matrix is not always this easily obtained.
Introduction to Finite Element Approximtioni
(0,0)
(2,0)
Figure 2.15. Rectangular element in (x,y) formed into coordinates.
93
<-t,-t>
(-4,0 coordinates and the same element trans-
Equations (2.2.80)-(2.2.83) may now be combined to yield the following equation defined in the local (ξ, η) coordinate system: 4
±
(2.2.84)
9
/
(/_'/_' ( t
- [
( t j
x
TA44> j4> + 4φ^φ ) (
+
f y l y )
φ,
ds^J
+
νί
fl
=
0,
i
β φ ι
=
^
WJr,
9,
N o t e that in changing the limits of integration to span the local coordinate system we introduced the relationship dxdy=dct[J]didr). Because the elements in our example problem are all of the same size, the four integrals appearing in each element in (2.2.84) are identical for each element. The assembly process, that is, the transformation from element to global integrations, is easily seen with the assistance of Table 2.8. Here we have tabulated the global nodal numbers corresponding to each element nodal number (element nodes are numbered counterclockwise from 1 to 4). For example, to find the global node corresponding to the local node 2 in element I, we move right along the second row to the column marked I, which corresponds to element I. Here a global nodal number 4 is given. Similarly, if
TABLE 2.8. Relationship between Local Node Numbers and Global Node Numbers for Problem of Figure 2.10
Global Nodes (Global Node Numbers)
Element Nodes (Local Node Numbers)
I
II
III
IV
1 2 3 4
1 4 5 2
2 5 6 3
4 7 8 5
5 8 9 6
Basic Concepts in the Finite Difference and Finite Dement Methods
94
TABLE 2.9.
1
\
7
I 1 7
ί •χ J
4
Evaluated Integrals for One Element in Local Coordinates for Equation (2.2.84)
1
2
3
4
ι3
1 6
\
1
1 6
1 6
2 3
1
I 3
1 3
1 6
6
_ 3X
_ 1 6
_X
a
3
6
we wish to establish the integral values associated with global matrix coefficient 7 = 4, 7 = 5, the first step is to find the equivalent local numbers. Examination of Table 2.8 reveals that these two global nodal identifiers appear together in columns marked I and III. Thus these two elements (I and III) contribute information to the global integral. The assembly procedure now calls for extracting information concerning integration at the element level from Table 2.8. From column I we see that global nodes 4 and 5 correspond to element nodes 2 and 3 in element I. Table 2.9 tells us that the contribution to the global integral attributable to these nodes is found in row 2, column 3; it is — This value is now placed in matrix location (4,5) of the global matrix. We are not through, however, because there is also information to be retrieved from element III. Table 2.8 locates this information in position (1,4) of the element matrix of Table 2.9, it is also — £· This value summed with the previous integral value is now placed in the same
TABLE 2.10. Evaluated Integrals for the Four Elements of Figure 2.10 in Global Coordinates for Equation (2.2.84)"
X 1 2 3 4 5 6 7 8 9
1
2
3
13
_ 1 6
0
_ i
6
0
_ 1 6 _ 1 3
0 0 0 0
i1
3 6 _ 1 3 _ 1 3 1 3
0 0 0
_ 1 6
a 3 0
_ 31 1
(.
0 0 0
4
5
6
7
8
9
-1 i31
1 3 1 3
0 _ i
0 0 0
0 0 0
3 8 3 1 3 1
0 0 0 0
- 1 3 4 J
0
4 3
_ 11
—1 03
1 6 _ 1 3
0
_ ΐ1 3 _
_ 3 1 6
0
_ 1 6 1 3"
0
1 3X — i _ —1 0
3 6
06
1 3
" i _ 1 3 1 6 4 3 1 6
_ 1 3 _ 1 6
0
_ 6X I 3
"Note that these values are obtained using the information from Tables 2.8 and 2.9 only.
Introduction to Finite Element Approximations
95
global matrix location (4,5). Combination of the two integrals yields the final value of - \ , which appears in Table 2.10 in row 4, column 5. It is important to understand the two-step integration process outlined above, because this is the procedure used in nearly all finite element programs. In general, the element coefficient matrix (Table 2.9) is different for each element because of changes in either element geometry or parameter values. Moreover, it is often necessary to perform the integrations of (2.2.84) numerically. Because of the local coordinate system we have selected, this is easily accomplished using Gaussian quadrature (as will b e outlined later). Superficially, it appears that an unnecessarily complicated procedure has been introduced to evaluate rather simple integrals. Introduction of these basic ideas at this point, however, simplifies the extension to more challenging concepts in later chapters. Step 4 Solve the matrix equation. It is now possible, with the information of Table 2.10, to solve our example problem. The matrix equation arising out of (2.2.84) is _
_ 1 _ 1
2 3 1
—1
0
_
3 1 6
_
1
4
6 6
3
0 0 0 0
0
6
I
3
~~ 1 0 0 0
τ,
-X
o
x
x
Ά
j{f l
x x
τ< T
6
3
0
()
3
«
- 1
3
3
-i
+
T l )^ds
+
t l )^ds
+
f l )^ds
y y
y v
y y
0
T
7
f{f l
x x
9
+
t l )^ds y v
0 0
Ά f{f l
x x
+
I 6
3
3
5
T
τ
x
_
_ 13
-\
f {TJ
j{t l
6 Γ) υ
- i
- i
3
s
3
3 i 3
-I
_ 1 6
0 0 0
υ
_ i 3
—1
v
0 0 0
3
3
3 _ i 3
3 .1 6
3
3
i
.1
—1
- i
υ
0
3
6
- l
1 6
f l )
9
X
3 _ 1 6
0
0 0 0 -
j
—
i
-
-{ —
0 0 0 0
_ 1
3
J-
_
f
_
6
1 6
0
1 6 2 3
Basic Concepts in the Finite Difference and Finite Element Methods
96
The line integrals appearing o n the right-hand side of (2.2.85) represent flux boundary conditions along the perimeter of the problem area. Through summation of element integrals, these line integrals vanish along interelement boundaries. The point source becomes a value specified at node 5 through the evaluation of the Dirac delta function. In general, when Dirichlet boundaries are specified, it is necessary t o expand a n d evaluate the line integrals. However, when C ° bases are used, one can condense rows containing the known temperature values out of the matrix equation. Rows 1, 2, 3, 6, and 9 may thus b e eliminated. The corresponding columns may also be eliminated by placing information pertaining to these nodes on the right-hand side of equations 4, 5, 7, and 8. The reduced matrix equation is _
_ 1 3 _ 1 3 _ 1
Ι
3 £ 3 _ 1 3
(2.2.86)
_
1 2
Ά τ
6
Ί
-β„ + Ι 0
1 3
I
3
1 2
or [A]{b)
(2.2.87)
=
{f).
Equation (2.2.87) may be solved directly to yield 0.783'
Ά
0.525
Τι
0.655
Ά
0.783
The coefficients T , Γ , Γ , and Γ represent the values of the temperature at nodes 4, 5, 7, and 8 because the basis functions are defined such that φ, is unity at node ι and zero elsewhere. The analytical solution for this problem is (Tang, 1979) 4
5
7
8
T =
U+V+W,
where u
=
2
S sin[(/i + j-)ir(a - j>)/a]cosh[(ii + j >u-x)M π
y
=
2
„ίο
(n + ^)cosh(,t +
S cosh[(n + ±)vy/a]nn[(n + * nio (« + i)cosh(n + i)7r
])7r i)wx/a]
sin[(« -r4)wx/a]sin[(n + i)w£/a] VV
_2
S
~*Λ>
sin\i[{n + ^)ιτ(α-y)/a]cx)sh[(n
(« + i)cosh[(« + i)ir]
+
\)ιτη/α]
Introduction to Finite Element Approximations
97
E L E M E N T NUMBER
(0,0)
(4,0)
(2,0)
(a) COLLOCATION ^ POINT
(1,-4)
M.-O (b)
Figure 2.16. (a) Collocation net in ( x , y) coordinates, (b) One element of collocation net in (£, n) coordinates.
where a is the length of the side of the square (a = 2), and ζ and η are the χ and y locations of the heat source, respectively. The analytical solution for the nodal locations 4, 5, 7, and 8 is 0.756, 0.127, 0.719, and 0.756, respectively. It is evident that the numerical solution at the singular point (1,1) is not very accurate. This is not unusual inasmuch as we are attempting to represent a rapidly varying function with four bilinear elements. We will see in Chapter 4 that special trial functions can be used to circumvent this difficulty.
Example 2* In this example we consider the solution of Laplace's equation on a square region using the collocation method. T h e problem is illustrated in Figure 2.16 •The calculations for this example were made by Michael Celia, a research assistant in the Department of Civil Engineering, Princeton University.
98
Basic Concepts in the Finite Difference and Finite Element Methods
and the governing equations follow: (2.2.88a)
£o(«) = « « + «
v v
=0,
(2.2.88b)
u (0,y)=0.
0<>><2,
(2.2.88c)
«,(2,^)=0,
0
x
(2.2.88d)
« ( x , 0 ) = 3 - x,
0<x<2,
(2.2.88e)
I I ( J C , 2 ) = 3 - x,
0<x<2,
where u may have a number of physical interpretations such as electrical potential, temperature, or hydraulic head. Step 1 Define the trial functions. In this case we use cubic Hermite polynomials as basis functions. Thus the trial function for each element is written [see (2.2.69)]* 4
(2.2.89)
u(x,
y)<*u(x,
a t/ ^-ώ 3JC dy 2
1
+
.
Σ
y)=
d u.
d U,
dx
dy
,
+
317. , ^
y
j
2
2
+
W.
Ujtij + J^tij
2
φ'
,
where Φο/
Φοο, -
-
dx Φ>ο,3^
Φν7-Φ.ο,9|>
dx dx Φο.,9ην+Φ, £
.
2
+
υ θ
+
dy Φ ο υ ^ + Φ.υ
η 7.
3 y dx .
3x 3 ^ 3η 3 ?
9 £ 9
θ η
y
3η 3 £
J
3x 3 X
,
_
,
dy dy .
•Note that the .x and ν subscripts do not denote partial derivatives in this equation.
Introduction to Finite Element Approximations
99
Because we are using square elements in this example, dx/dr\ the following simplifications are possible: (2.2.90)
φ!,, = φ'
Φ ί „ = φ' „ = 0, ν
ι
_
ι
dy dx .
ι _
ι
— dy/di
= 0 , and
|07
dy .
Combination of (2.2.90) with (2.2.89) yields the appropriate trial function for a single element: dU
4
(2.2.91)
u(x,y)~u(x,y)=
2
dxdyV^dn
U^
+^ \
Wj
dU
Ά
χ
0
j
^ J
+
a
v
jftin^J
di J
It can be seen through a comparison of Figure 2.16a and b that dx/d£ dy/df\ = {- in this particular example.
=
Step 2 Formulate the approximating algorithm using the collocation procedure. In this case of the M W R , the weighting function is chosen to be the Dirac delta function specified at the 16 Gauss points ( x , , >>,). Thus we obtain (2.2.92)
f (R(x,y)8(x-x,,y-y,)dydx=0,
i = l,2
16,
where R(x, y) is the residual defined as R(x,y)=t (u)
(2.2.93)
0
and £ ( •) is defined in (2.2.88a). Substitution of (2.2.93) into (2.2.92) yields 0
(2.2.94)
jj£ (u)8(x-x„y-y,)dydx=0, 0
, = 1,2,..., 16.
We now transform (2.2.94) from ( x , y) to (ζ,η) space, not because it is particularly valuable in this example, but rather to provide a foundation for more complex formulations to follow in later sections. In (ξ, η) coordinates
100
Basic Concepts in the Finite Difference and Finite Element Methods
(2.2.94) becomes, for each
element,
f(Q (u)S(i-i , - )dei[J]d dt
(2.2.95)
o
k V Vk
= 0,
V
* = 1,2,...,4,
where [J] is the Jacobian matrix of (2.2.81). Let us now substitute for the operator £ ( « ) in (2.2.95): 0
(2.2.96)
(((u
+ u )Stt-i , - )det[J]d di
xx
vv
k v Vk
k=
= 0,
v
\,2,...,4.
From the definition of the Dirac delta function, we can rewrite (2.2.96) as (u
(2.2.97)
xx
+ u )det[J]\ =0, yy
* = 1,2,...,4,
(tiii
where (£*, T J ) is the coordinate of the &th Gauss point. Introduction of the definition of the trial function (2.2.91) into the collocation expression (2.2.97) yields, in a given element, a
(2.2.98)
Η I
+
l u'dx^
+ ^
2
3 x 3 ν 3r, H
J
3t/. dy
9 >
^
2 -·>) φ
+
dx
+
\
U
dv dy
2V0>J
dxdy
^ j j - ^
^ 2 V
VUj dy
, J
j
d
V
dx d£
J
+
9
2
"ioy
^
, dy *" 2
J
det[7]
= 0,
* = 1,2,...,4.
Step 3 Formulate the matrix equation. To evaluate (2.2.97) we must calculate the determinant of the Jacobian matrix and establish a transformation for the second-order derivatives from the ( x , y) to the (ξ, η) coordinate system. dy/dη, T h e Jacobian is obtained directly from the definitions of 9 x / 9 £ and which are observed to be \ from Figure 2.16, as mentioned earlier. Thus we
Introduction to Finite Element Approximations
101
obtain dx Κ det[/] = dx
(2.2.99)
dy 3? dy dη
4"
i
ο
T o transform the derivatives, we once again use the chain rule expansion (2.2.100) 3 Φ_ 2
3*2
d ΙΒφ\ dx { dx ) Α/^Μ dx \ 3£ dx
=
_/3£\ I dx)
2
3Φ 3£ 2
2
3 £3φ 2
+
3x
2
3£
+
+
^ 9 η \ dη dxj
/^^^_3_\/3φ3|3φ37ΐ\ \ dx 3£ dx dy j \ 3£ dx 3ij dx j
=
3{ 3η 3 φ dx dx 3£3τ,
/3η\ 3φ \ 3JC/ 3 ^
2
2
2
3^,.3φ 3JC 3 ^ ' 2
Because of the geometry, this particular problem (2.2.100) reduces to (2.2.101.)
'
and similarly (2.2.101b)
i^^(M) dx
1
3y
=
de\dx)
^ = 3 W M 2
2
( 4
de
2 =
3T,M W 9
^
3 J *
3η
(
), }
4
)
.
2
The final equation to be evaluated at each collocation point is obtained by substitution of (2.2.101) and (2.2.99) into (2.2.98): (2.2.102)
* = 1,2
4.
102
Basic Concepts in the Finite Difference and Finite Element Methods
It is important to recognize that (2.2.102) is written for one element only. It contains 16 unknowns while generating only four equations. When this equation is evaluated for all four elements, we will have 16 equations, but there will now be 36 unknowns. However, the number of unknowns will reduce to 16 when the appropriate boundary conditions are imposed. Step 4 Solve the algebraic equations. T o solve the algebraic equations associated with (2.2.102), we first evaluate this equation for each element. The resulting element equations are Η,,
Η,-,
//•·>
H
Η 22
Η 23
24
#3.
#32
Η-33
34
#4,
Η,42
#43
#4
2]
(2.2.103)
Η 14 =0
or [/7]{χ}=0, where the elements of [H] and {x} are row and column vectors, respectively, that is, 1 / Θ
ι 2
a \ 3 |
2
1
2
3
2
3
2
2
3η
W. 3(7, 3 t7, U ——3x ' dy 3 x 3 y 2
It should be noted that [H] is not a square matrix inasmuch as there are only four collocation points (k = 1,2,3,4) and 16 undetermined coefficients in {x}. Once the element coefficient matrix [H] is generated for each element, we must assemble this information into a global matrix. We recognize that many of the undetermined parameters in {x} are common to two or more finite elements. This assembly process generates a (16 X 36) global coefficient matrix. The associated global vector of unknowns is (2.2.104)
{G} = [ { g } „ { g M g } 3
{«ΙοΓ,
Introduction to Finite Element Approximations
103
where Γ
dU
W
m
dU \ 2
m
T
m
T o obtain a tractable set of equations, we impose the four boundary conditions specified in (2.2.88). This reduces the number of unknowns to 32. It is possible, however, to extract additional information from the boundary conditions. For example, because u = 0 along the side defined by x—0, the cross derivative d/dy (d/dx) must also vanish along this side. Thus we have generated an additional constraint on the global system of equations. Similar arguments lead to the following additional constraints: x
3(7 (2.2.105a)
= - 1 ,
y=4,6,
3 t7, 2
' < > ' . (2.2.105b) dx~dy~=°< y We now have a total of 20 constraints (see Figure 2.17), 16 degrees of freedom, and a tractable system of equations. The solution to this set of equations and a comparison with the analytical solution is given in Table 2.11. Because the corner nodes are singular in terms of 3M/3JC, an alternative set of constraints, in which Wj/dx — — l,j = 1,3,7,9, is also possible. In this case, however, it is more difficult to argue the disappearance of the cross derivative. Before leaving this introduction to the fundamental concepts underlying the finite element method, let us consider briefly the relationship between finite element and finite difference methods. =
1
2
3
7
8
U * 2 6
U = 3 3
U,»3«0
U» * 0 2
3
6
9
9
u9< t U , «0 U, -0 9
> 9
2
5
8
U„ «0
U< * 3 4 U„ » 0 φ Uxyl* 0
U«8*0 U,, «0
> 2
8
4 U4 • 2
7
u · t 7
U,
· 0
7
U,, »0 7
Figure 2.17. Dependent variable constraints for the collocation formulation using Hermite polynomial bases.
Basic Concepts in the Finite Difference and Finite Element Methods
104
TABLE 2.11. Collocation and Analytical Solutions for Problem Described by Equation (2.2.88) and Illustrated in Figure 2.17
Collocation Solution
Dependent Variable
—1.553 2.384 8.325 X H T ' 1.553 3.322X10" 5.427X10" 1.999 -5.715X10"' -8.240X10" -1.256XIO" 1.474X10" -5.427X10" 1.553 1.616 7.372 X 1 0 " -1.553
Uy, U
Analytical Solution
2
Uy2 Uyi
Percentage Error
2.325 6
16
0.0000
2.5 0.0
0.0000
0.0
2.000 0.0000
0.0 14 0.0
0.0000
0.0
1.675 0.0000
3.5 0.0
2
u U u
x
t
x
S
A
5
-0.5000
1 7
Uyi
1 5
u
x
v
S
16
Uyt
2
u
x
r
t
Uyi u,
1 7
Vyl Uy,
2.3
RELATIONSHIP BETWEEN FINITE ELEMENT A N D FINITE DIFFERENCE M E T H O D S
In Sections 2.2.1 a n d 2.2.2 we considered the relationships between the various weighted residual approximations. Let us n o w compare the finite element a n d finite difference methods to establish whether there are any features common to both. Consider once again the two-dimensional heat flow problem of the preceding section, but with the nodes renumbered as illustrated in Figure 2.18. Because node (0,0) is interior to the domain, the equation associated with that node can b e used t o demonstrate the general form of the finite element approximation. In other words, row 5 of the coefficient matrix of (2.2.85) does not reflect the influence of boundary conditions imposed on the system. When this row of the matrix equation is expanded, the resulting equation is (2.3.1)
i ( 7 - i . - i + 7 - . + 7'_ . + 7 . _ - 8 7 Ό . Ο - τ - ^ , + Γ , . . , ,
,
l
0
1
l
0
l
+ T
K0
+ T) lA
= Q. w
Although this expression cannot b e readily interpreted in terms of standard finite difference notation, it can b e rearranged to make the relationship more
Relationship Between Finite Element and Finite Difference Methods
105
y -1,1
2.0
n
1.5 -i.o
I
0.5
•
0.5
0.0
-hFigure 2.18. Discretized domain for two-dimensional heat flow. Finite element nodes are indicated by dots and elements by Roman numerals (numbering as used in the finite difference scheme) (from Pinder and Gray, 1977).
apparent. The rearranged form (which is obtained primarily through ingenuity and insight) is (2.3.2)
i
{(ϊ"ι.ι -2J"o.i +
4(r,.
)+
^-1.1
-2Γ
0
0 - 0
+
Γ_ ,. ) 0
+ ( Γ . _ - 2 Γ , _ + Γ _ . _ ) } + * { ( Γ . - 2 Γ , + 7', _ ) 1
1
0
ι
1
1
ι
+ 4 ( Γ . - 2 Γ , ο + Γ ._ ) + ( Γ _ , - 2 Γ _ 0
1
0
0
1
1
1
1
Ι
1 < 0
0
ι
1
+ Γ. ,_ )} 1
1
It can be shown (Gray and Pinder, 1976) that (2.3.2) is a special case (h = k — 1) of the more general expression (2
α χ\
h
k
(
T
\,\~
2 T
o,\
+
T
~\,\
,
7 4
*l,O~
Γ,,.,-ΣΓο,., + Γ , , , , , ] A I ^ ο,\ τ
2 7
ο.ο
7
ο.-ι
+
O,0
+
7
'-l.0
ftfcf 1
J
2
+
2 7
Τ'-ι,ι
Γ,,,-ΣΓ,,ο + Γ,,.,
6
27'-ι,ο + '
k
2
1,-1
106
Bask Concepts in the Finite Difference and Finite Element Methods
Finally, if we assume node (0,0) to be the more general point of reference ('«j\ obtain an expression that is clearly related to a finite difference approximation: w
(2
34)
e
Mcf^+i^+i 6 [
27]
J +
h
^T
! + 7]_, j ! +
l + i
h
2
2
+• hk j
27]+, + T y
6 1 ^Ί-i.j+t
7j -
[ + 1
t7
*2
27]_,
2r, + r, _ J
Λ
+ 7j_,
y
+l
y
1
2
^_
Equation (2.3.4) can be written more compactly using the symbolic notation of Table 2.1: (2.3.5)
^ { f t , +48X + i X } + l
r l
It is apparent from (2.3.5) that the finite element equations can be interpreted in terms of weighted-average finite difference approximations. But can the weighted averages themselves be interpreted in terms of standard finite difference theory? T o examine this relationship further, let us consider the well-known Simpson's rule of numerical integration. Simpson's rule for one-dimensional integration in a two-dimensional space is
k
dT
5
b
90dx dy 2
4
'"'
References
107
which provides a fourth-order-accurate integration using three discrete values. Replacement of the continuous derivatives of (2.3.6) by their difference counterparts yields the following: (2.3.7)
± Γ η
y
J
k
=
Vj+>
= y,-,
8X dy k
=
k
{«Χ,-,
+
in
k
aT
5
6
|
When (2.3.7) is substituted into (2.3.5), we obtain
U
~ }j - \
x
k
~
t~
x
I
Division by hk gives the alternative form
1 /• v* = v,+1 δΖ* L 2
1 r k - •*!+1 δ» 7Λ , x
π
It is now apparent that the finite element equations, defined over a rectangular subspace and formulated using chapeau basis functions, can be interpreted as integrated averaged finite difference approximations. Because this expression is 0(h ) in approximating the derivative and 0 ( Λ ) in performing the integration, the overall approximation is of 0(h ), the same as that achieved by the finite difference method on the same grid. However, the two approaches do not always generate schemes of the same order of accuracy, as demonstrated in later chapters. Moreover, the order of accuracy is only one indicator of computational performance and we see that, in fact, the solutions obtained using the finite element and finite difference methods on the same grid can be quite different. Although the analysis presented above involved only secondorder derivatives, an analogous development is possible for higher dimensions and for derivatives of other orders. 2
4
2
REFERENCES Biezcno, C. B. and J. J. Koch, "Over een Nieuwe Methode ter Berekening van Vlokke Platen met Toepassing op Enkele voor de Techniek Belangrijke Belastingsgevallen," Ing. Grav., 38, p. 25-36, 1923. Bubnov, I. G., "Report on the Works of Professor Timoshenko Which Were Awarded the Zhuranskii Prize," Symp, Inst. Commun. Eng., 81, All Union Special Planning Office (SPB), 1913. DeBoor, C. and B. Swartz, "Collocation at Gaussian Points," SIAM J. Numer. Anal., 10, 4, p. 582-606, 1973.
108
Basic Concepts in the Finite Difference and Finite Element Methods
Doherty, P. C , "Unsaturated Darcian Flow by the Galerkin Method," U.S. Geological Survey Computer Contribution, Program C938, 1972. Finlayson, B., The Method of Weighted Residuals and Variational Principles, Academic Press, New York, 1972. Galerkin, B. G., "Rods and Plates. Series in Some Problems of Elastic Equilibrium of Rods and Plates," Vestn. Inzh. Tekh. (USSR), 19, p. 897-908, 1915. Gartner, S., "Tragermethode—ein Neuartiger Defektabgleich zur Berechnung von Anfangswert— Problem mit der Methode der Finiten Elemente," Dissertation, Tech. Univ. Hannover, 1976. Gray, W. G., and G. F. Pinder, "On the Relationship between Finite Element and Finite Difference Methods," Int. J. Numer. Methods Eng., 10, p. 893-923. 1976. Mikhlin, S. G„ Variational Methods in Mathematical Physics. Macmillan, New York, 1964. Pinder, G. F. and E. O. Frind, "Application of Galerkin's Procedure to Aquifer Analysis," Water Resour. Res., 8. I. p. 108-120, 1972. Pinder, G. F. and W. G. Gray, Finite Element Simulation in Surface and Subsurface Hydrology, Academic Press, New York, 1977. Prenter, P. M., Splines and Variational Methods, J. Wiley, New York, 1975. Salvadori, M. G. and M. L. Baron, Numerical Methods in Engineering, Prentice-Hall, Englewood Cliffs, N.J., 1961. Slater, J. C , "Electronic Energy Bands in Metals." Phys. Rev., 45. p. 794-801, 1934. Tang, D. H., personal communication, 1979.
Finite Elements on Irregular Subspaces
3.0
INTRODUCTION
The basic concepts of finite element analysis were introduced in Chapter 2. In that discussion we tacitly assumed that the domain of interest was subdivided into elements of rectangular geometry similar to the standard finite difference approach. One of the advertised advantages of finite element schemes, however, is the ability to consider a wide range of element geometries. Although the most commonly encountered element is the triangle, there are many other shapes, including some higher-order forms with curved sides. This chapter is devoted to the description of commonly encountered finite element forms and their utilization. We borrow many of the transformation concepts introduced in Chapter 2 to facilitate integration over irregular elements. For the triangular element with straight sides, we develop relatively simple integration formulas. The more exotic elements, however, require the use of numerical integration. The triangular element is considered first, although in some ways its development is more conceptually difficult than the more general formulations presented later.
3.1 3.1.1
TRIANGULAR ELEMENTS The Linear Triangular Element
The triangular element with straight sides is universally associated with the finite element method. It is the simplest element that permits an accurate representation of an irregular domain. Because of the difficulty encountered in integrating over irregularly shaped triangles, it is necessary to introduce, at the outset, a convenient natural coordinate system. 109
1-3»*
Figure 3.1. Triangular finite element in Cartesian and natural coordinates.
(t>) 3.1.2
Area Coordinates
The natural coordinates we use are called area coordinates and are analogous to the (ξ, ij) system introduced in Chapter 2 to facilitate integration over rectangles of varying geometry. As the name implies, area coordinates are related to the area of a triangle, as indicated in Figure 3.1. Each coordinate L, is defined in terms of the triangular subarea whose base is the line L, = 0 , and vertex is the point £., = !, that is, (3.1.1)
A '
1* =
A '
-+,
where Λ = Σ ? , Λ , . Examination of the properties of L, reveals that they fulfill the requirements of bases defined on a triangular subspace. That is, L, is unity at node / and zero at any other node, and L, + L + L = 1. These functions can be readily expressed in terms of global ( x , v) Cartesian coordinates using the geometrical relationship of Figure 3.1. The area of a triangle is written in terms of the Cartesian coordinates of its vertices as =
2
1 (3.1.2)
A = ±det
Λ y-i
3
111
Triangular Elements
Consequently, the L , area coordinate and basis function is defined by
det (3.1.3) det
1
x
2
1
x
3
1
χ
y .
y
2
1
x.
y\
1
x
yi
1
*
2
3
or
(3.1.4)
x y3
1 2A
2
2
\yi
x
-xjy
_
2
*2>Ί
Λ "Λ
*3 *2
Λ
χ, — χ
>Ί " Λ
Χ
_
3
*|
— 2
Let us now examine how a typical integral arising in Galerkin's method can be evaluated using the L, basis functions. Consider the integral (3.1.5)
dx
dx
dxdy,
where A is the area of a triangle of arbitrary geometry such as illustrated in Figure 3.1a. Our first task is to rewrite the derivatives in this integral in terms of area coordinates. From the chain rule, we obtain (see also Section 2.2.5) dL,
(3.1.6)
dx
dL,
dL,
3L, ,
ν
'•I
dx ,
3L
+ ^
dL . 2
2
dx
In (3.1.6) it is important to note that the third coordinate is a function of the other two, L = L ( L , , L ) , because only when this is clearly understood are the partial derivatives with respect to L , and L meaningful. Notice that the derivative for 7_ is expressed only in terms of L , and L , 3
3
2
2
3
2
dL 3 _ dx
dL,
dL 2
dx
dx '
This is readily verified by substitution of L for L, in (3.1.6). Similar expressions are generated for the derivatives with respect to y . By differentiating L , , L and L as defined in (3.1.4) with respect to x, we can evaluate the right-hand side of (3.1.6) directly: 3
2
3
112
Finite Elements on Irregular Subspaces
Substitution of (3.1.7) into the integral (3.1.5) yields (3.1.8)
(yz-y\) 9L,
{y^-yM^xdy
9L,
Before attempting to evaluate this expression, it is worthwhile to introduce the following relationship for integrating polynomials in L,\ (LT>L^L^dxdy J
(3.1.9)
= 2A-
A
m[!m !m !
. , (m, + m + m + 2 ) ! 2
3
3
2
where m , , m , and w are positive integers. Because, in this example, the integrand of (3.1.8) is a constant, m, = m = m = 0 , and we obtain 2
3
2
.
(3.1.10a)
4A
3
9L,
(Λ >Ί) -
\ dL
2
t
9L,
3L,
(ν ->Ί)·Μ
3L,
3
or (3.1.!0b)
/· 9L 9L, ι l ^ j ^ s ^ d x d y ^ ^ y ^ - y ^ K y ^ - y ^ ) ,
where the i and 7 indices are cyclic 1 < i, j < 3. For example, when 1'· — 3, / + 1 refers to vertex 1. The formula for integration of the y derivative product is obtained in an analogous manner to that presented above and is
(
3
1
n
)
1 4l"(*<+2
C dL dL J ~dyJy dxdy=
A
V 2 V > ) -
-
-
Another commonly encountered integral is (3.1.12)
I =
JL,Ljdxdy.
When ϊφ j , wi, = m = 1, m = 0 , and (3.1.9) yields 2
(3...13,
/
3
/
Λ
Λ
φ
=
2
, ( β Ο
=
^ .
Triangular Elements
113
When the subscripts are the same (i.e., i = j), m , = 2 , m = m ~0, obtain 2
fL,L,dxdy
(3.1.14)
= 2A^
3
and we
= lA.
Whenever the integrand is a polynomial, (3.1.9) leads to an efficient integration formula. In the event that axisymmetric problems are encountered, however, the radius appears in the denominator of the integrand and it is n o longer a polynomial. Under these circumstances, either an approximate average radius over the triangle may be assumed with the resulting constant radius taken from under the integral, or numerical integration may be used. Several schemes have been developed for numerical integration over triangles. They have the general form / = ff(x,y)dxdy
(3.1.15)
Σ /(*>.^>Η
=
J =
Λ
1
in global coordinates, and in local coordinates /= C
(3.1.16)
( ~ g(L,,L )2AdL,dL l
L2
2
= 2A 2
g{L ,L )w u
2j
2
jy
7=1
where we have used the relationship (Connor and Will, 1969) dxdy =
(3.1.17)
2AdL,dL . 2
Integration such as indicated in (3.1.16) is performed over the element indicated in Figure 3.1b and (3.1.17) is the area transformation. Note that the integrand has also changed in going from (3.1.15) to (3.1.16) because the derivatives with respect to the global coordinates must now be expressed in the L, coordinate system [see (3.1.6)]. Appropriate values of n, L, and w are tabulated in Table 3.1 for polynomial forms of g up to fifth degree. Although the derivatives 3 L , / 9 x and dL,/dy are easily evaluated, this may not be true for more complicated basis functions. In general, it is necessary to formulate the Jacobian matrix and invert it to obtain the χ and y derivative expressions. Thus, applying the chain rule to the general basis function φ, = <j> {L , L , L (L , L )}, one obtains r
l
l
2
3
t
2
f
114
Finite Elements on Irregular Subspaces T A B L E 3.1.
η
Polynomial Degree
Quadrature Formulas for Triangular Finite Elements
1
^2 f
r
1 Linear
1 0.333 333 0.333 333
0.333 333
0.500 000
3 Quadratic
1 0.500 000 0.500 000 2 0.000 000 0.500 000 3 0.500 000 0.000 000
0.000 000 0.500 000 0.500 000
0.166 667 0.166 667 0.166 667
4
1 2 3 4
0.333 0.600 0.200 0.200
333 000 000 000
0.333 0.200 0.600 0.200
333 000 000 000
0.333 0.200 0.200 0.600
333 000 000 000
-0.281 0.260 0.260 0.260
250 417 417 417
1 2 3 4 5 6 7
0.333 0.797 0.101 0.101 0.059 0.470 0.470
333 427 287 287 716 142 142
0.333 0.101 0.797 0.101 0.470 0.059 0.470
333 287 427 287 142 716 142
0.333 0.101 0.101 0.797 0.470 0.470 0.059
333 287 287 427 142 142 716
0.112 0.062 0.062 0.062 0.066 0.066 0.066
500 970 970 970 197 197 197
Cubic
7 Quintic
From Brebbia and Connor. 1973.
Equation (3.1.18) can be written in matrix form as 3φ,
(3.1.19)
dL,
3L
2
2
L,
2
or " 3φ, " (3.1.20)
dL, 3φ,
3L
3φ,
Li dx d
dL, dx
3φ,
dL
dy
3*
= [J\
' d
dy
2
where \J] is the Jacobian matrix. The χ and y derivatives of the basis functions, defined in the local coordinate system, can now be obtained from ' 3φ, " (3.1.21)
dx
3φ,
dy
=uv
l
dL, 3φ,
3L
2
Triangular Elements
115
which is analogous to the expression obtained for rectangular elements [i.e., (2.2.81)]. Although the evaluation of the elements of the Jacobian matrix is relatively straightforward in the case of regularly shaped rectangles, it is somewhat more cumbersome for triangles. The transformation of the general triangular element to the equilateral of Figure 3.\b is achieved using the same functions as those adopted as bases for the unknown solution t5(x, y). The appropriate relationship is (3.1.22a) i= l
(3.1.22b) ;=l
where x, and y are Cartesian coordinates of the nodes of an irregular triangle. It is easily shown that when φ, is specified as L there is a one-to-one correspondence between the nodes in the local and global system, and the straight-line geometrical relationship between nodes in both systems is preserved. To evaluate the Jacobian matrix equations, (3.1.22) are differentiated to yield (
r
dx dL, dy_ dL,
'2
1
= 1
dx dL,
'dL,
= 1
i
=l
_4
dy_ dL,
3*1
= 2y, dL, ι
-ι
'dL, 9φ,
As an illustrative example, let us consider the case of linear triangles wherein φ, = L These expressions become r
dx dL, dy_ dL,
3x dL,
x, - x ; 3
dy_ dL,
'•y\-yi>
/-I
and the Jacobian matrix is (3.1.23a)
c
c
i - *
3
i~ 3 x
yi-yj y-L~y-i
116
Finite Elements on Irregular Subspaces
The determinant of the Jacobian matrix, det [J], is generally referred to as the Jacobian. (3.1.23b)
de\[J] = (x,-x,){y
- y,)-(x -x,)(
2
(3.1.23c)
2
Λ
[/]
Λ
_
Λ
-
-y,)\
y]
J'I
det[7)
Examination of (3.1.23b) and the determinant of (3.1.2) reveals that they are identical, which indicates that
aet[J] =
(3.1.24)
2A.
Thus the incremental area relationship of (3.1.17) can be rewritten dxdy=dei[J]dL dL ,
(3.1.25)
l
2
which is a well-known relationship and was employed earlier in (2.2.84). Equation (3.1.23c) may now be used in conjunction with (3.1.21) to obtain the global derivatives. For example, the case of φ, = L , yields ' 3L, ' (3.1.26)
dx 3L,
1
yi ~ r
3L,
Λ - y\
3
~ 2A
x,
2/1
3L,
31,
-x.
3L,
which is easily verified by comparison with (3.1.4). 3.1.3
The Quadratic Triangular Element
The preceding section introduced the basic principles behind triangular finite elements using the linear triangle as an example. As in the earlier case of rectangular elements (Section 2.2.4), we now extend our linear analysis to consider the case of quadratic basis functions. T h e quadratic element is illustrated in local coordinates in Figure 3.2a. In contrast to the linear triangle, three nodes must now appear on each side in order to allow a quadratic approximation. The quadratic basis functions are generated by first assuming a general second-order approximation of the unknown function tJ over the element. The polynomial is then constrained such that u ( x , , y )—V at the ith nodal location (/' = 1,2,... ,6). The starting point is a quadratic polynomial written in the local coordinates L, and L that is, i
l
2
(3.1.27)
φ,• = a + bL + cL + dL] + eL\ + }
2
fL L . 1
2
Triangular Elements
117
L M 3
Figure 3.2. Quadratic (a) and cubic (b, c) triangular elements.
We now impose six constraints for each basis function. Each function must be unity at the node for which it is defined and zero at all other nodes. For the basis function at node 1, we obtain 1 1 0
" 1' 0
1 0
I 2
ι
0 0
0 0
0
0 0
0 i
0
4
ι
2
2
0
0 0
0 i 4
i 4
0 0
Equation (3.1.28) may be solved for the vector of unknown coefficients to yield (3.1.29)
[a,
b,
c,
d,
e,
/ ] = [0, r
- 1 ,
0,
2,
0,
0) . T
When an equation analogous to (3.1.28) is generated and solved for each basis
118
Finite Elements on Irregular Subspaces
T A B L E 3.2.
Linear, Quadratic, and Cubic Basis Functions for Triangular Elements
Functions Quadratic
Linear
Basis
Cubic |Z. (3L -l)(3L,-2) 1L,L (3L,-1) |L,Z. (3L -I) K (3L -l)(3L -2) |L L,(3i. -l) K L (3L -I) iL (3L -l)(3L -2) iL L,(3L,-l)
2L]-L,
Φι Φι Φ
^3
Φα
—
4L L
Φ Φ* Φι
—
2L]-L,
—
—
4L L, — —
—
—
—
—
4L L t
3
5
φ Φιο 9
1
2
2L\-L
2
2
2
3
2
2
2
2
2
3
—
φ»
l
2
2
2
3
3
3
3
3
3
27L,i. Z. 2
3
function, the formulas recorded in Table 3.2 are obtained. Because these bases are polynomials in L,, the integrals generated in the Galerkin formulation can generally be evaluated using (3.1.9). When numerical integration is required, as in the case of elements with curved sides (discussed later), (3.1.16) can be used. 3.1.4
The Cubic Triangular Element
The extension of the concepts introduced for quadratic elements to consider cubic polynomial bases is relatively straightforward. The point of departure is the cubic polynomial expansion (3.1.30)
$=a
+ bL + cL + dL\+eL\ x
+ hL L\ l
1
+ iL, +
+ fL L ]
2
+
gL]L
2
jL\,
which involves 10 coefficients. Nine of the nodes required to define a cubic basis can be conveniently located along the edges of the triangle as indicated in Figure 3.2b. The tenth node is located, for convenience, at the centroid of the triangle. The vector of unknown coefficients can be readily evaluated using an expression analogous to (3.1.28). The resulting basis functions, once again defined in local L, coordinates, are tabulated in Table 3.2. In our discussion of cubic elements in Chapter 2 we suggested the possibility of using Hermite polynomials as basis functions. Recall that this approach replaced function values at interior and side nodes with function derivatives at corner nodes. In the two-dimensional case, rather than solve for the function ύ, at / = 1,2,..., 16, we sought
Triangular Elements
119
TABLE 3 3 . Cubic Basis Functions for Elements with Continuous 3«/dx and 9A/9y at Nodal Locations Basis Function
Functional Form
0ooi
/. (L,+3L +3L3)-7L,L L3
0ιοι
L ( a Z , - a L ) + (a -
0011
L (A L -A3L )+(/> -* )L L,L
0002
L^(L +3Z. +3L )-7L L L
0102
L|(a,L -
0012
L (b L,
0003
L](Lj + 3 L , + 3 L ) + 7 L , L L
0103
Z.|(a L -e /- ) + (e,-e )£, L Z-
2
2
2
a )L L L
2
3
1
2
i
2
3
t
2
3
2
2
2
3
2
3
3
3
I
1
Β ί.,)+(Β 3
3
- b.L^+i^
2
3
2
2
2
1
l
2
-
b )L L L, 3
2
2
3
- a,)L,L i-3
2
2
3
2
t
2
3
1
2
3
0013 27L,L L
0004
2
a,
= *A
~ *,
3
= >> ~ Λ
After Felippa, 1%6.
A similar approach can b e developed for triangular elements. In lieu of obtaining 10 values of the function we seek the function and its χ and y derivatives at the corner nodes of the triangle and the function alone at the centroid. N o t e that unlike the complete Hermite element, here d c/dxdy is not continuous at the nodes. This yields the 10 degrees of freedom we require to correctly define cubic interpolation. T h e element corresponding to this type of formulation is illustrated in Figure 3.2c and the corresponding bases, which are obtained in the same manner as the Hermites of Chapter 2, are given in Table 3.3. These bases represent the unknown function ύ within a given element as 2
(3.1.31)
ύ=
A «i 2 Uj**j + Σ
in a manner analogous to (2.2.71).
d
u
,
^
dx
a
i
da ; ^
dJt
^
120
Finite Elements on Irregular Subspaces
Because the basis function at the centroid interacts only with the nodes within the element for which it is defined, it can be eliminated from the global system of equations. In other words, one can express the coefficient at the centroid as a linear combination of the other nine coefficients. This is true for either type of cubic formulation. Thus one decreases the number of unknowns in the final matrix equation. The value at the centroid can, of course, be calculated later from the corner values. This procedure is commonly called "static condensation" in the structural engineering literature. 3.1.5
Higher-Order Triangular Elements
In the preceding section we examined the use of elements that exhibited continuity of the first derivative at nodal locations. It is also possible to require additional continuity constraints at the expense of calculating additional degrees of freedom at each node. Several elements of this kind have been formulated for structural engineering applications where an accurate representation of the strain is required along with displacement. This situation arises, for example, in the bending of plates. In general, a more accurate representation of the first derivative is achieved with elements of higher-order continuity. This may not always be the case, however, in the neighborhood of a discontinuity, where a large number of lower-order elements may be superior. It must also be kept in mind that, given a specified number of degrees of freedom, the larger bandwidth of the higher-order element results in increased computer storage and computational effort as compared to lower-order elements.
3.2
ISOPARAMETRIC FINITE ELEMENTS
In Chapter 2 regular rectangular elements were considered, and earlier in this chapter we considered triangular elements. It would appear, from the evidence presented to this point, that triangular elements would be preferred to rectangles because of the flexibility of the triangle in generating a net. In this section we show that irregular quadrilateral elements can be formulated that extend the utility of the regular rectangular element developed earlier. 3.2.1
Transformation Functions
In the isoparametric finite element approach, elements of irregular shape are transformed or mapped into elements of regular geometry to facilitate integration. Most of the concepts involved in this procedure have been introduced previously in a disguised form. They are repeated, in part, in this section for the sake of clarity and continuity. Consider an irregularly shaped quadrilateral element with straight sides and four nodes, one located at each corner of the element (see Figure 3.3a).
Μ,-Ο
(ο,-η
( b)
χ
(d)
Figure 3.3. Isoparametric elements: ( a ) linear quadrilateral; {b) quadratic quadrilateral with curved sides; (c) mixed quadrilateral; (d) quadratic triangle with curved sides.
122
Finite Elements on Irregular Subspaces
Further, let us assume that we wish to evaluate an integral arising out of the Galerkin formulation which has the form
7-/-ί < **> + · M A A 3φ
8ψ
9
Formally, the integration of (3.2.1) is to be performed over the entire x — y domain. In practice, however, the integral is evaluated elementwise where the elements may be of irregular shape such as those illustrated in Figure 3.3: (3.2.2)
/_
2 j ^ - -
+
J
- - j
d
x
d
y
,
where Ε is the number of elements. An obvious computational problem arises when we attempt to evaluate the elementwise integrations over this irregular geometry. The solution to this difficulty was introduced, in part, in Chapter 2. We transform (3.2.2) into an integral in the local coordinates (ξ, η) and integrate numerically. T o transform from (x, y) to (£, η) space requires the formulation of a transformation or mapping function. We develop such a function using a finite expansion analogous to that developed for the trial function ύ. The expansions for the χ and y coordinates are 4
(3.2.3a)
*=
(3.2.3b)
y=
Σ */*,(£.l)
( = 1
Σ ΛΨ,(Μ).
where, as earlier, x and y, are nodal coordinates in (x, v) space. These expressions are of the same form as (3.1.22) introduced earlier for triangular elements. Notice that the functions ψ, are formulated in the (ζ, η) system. T o establish the form of ψ,(£,η), we impose two constraints: t
1.
There must be a one-to-one mapping of the nodes between the two coordinate systems.
2.
There must be a linear variation in χ and y along the sides of the square element in (ξ, η) space.
The second constraint leads us to choose a transformation expression of the form (3.2.4a) (3.2.4b)
y = a + b i + c T\ + 2
1
2
d tri. 2
Isoparametric Finite Elements
123
It is readily apparent that χ and y vary linearly along ξ(η = ± 1) and along i»(* = ± D .
When (3.2.4) are evaluated at the nodal locations in each coordinate system, we obtain an equation of the form (using χ as an example)
"V (3.2.5)
1
1
-1
1
1
-1 1 1
-1 1 -1
*3
1
-1
"a."
ft,
Equation (3.2.5) is an expression of the first constraint (a). Solution of (3.2.5) yields
ft,
(3.2.6)
_ 1 ~ 4
1
1
1
-1 -1 1
1
1
-1
1
-1
1
1
Substitution of (3.2.6) into (3.2.4a) gives the required series expansion for x: (3.2.7)
* = 4 [( * l + * 2
+ (x
t
* 3 + *4 ) + (
+
~X
+ Χ
2
3
_
* I + *2 + * 3 ~ * 4 ) £ + ( ~ * 1 ~ * 2 + * 3 + * 4 ) η
~χ )ξη]. 4
T o establish the form of ψ,, we must rearrange (3.2.7) in a form more directly comparable to (3.2.3a). Thus we rewrite (3.2.7) as (3.2.8)
χ =
ί ( ι - ί - η + ίη)Λ, + Ηΐ + Ι - η - ί η ) * 2
or, equivalently, (3.2.9)
x
= [i(l- )][i(i- ,)] + [i(l + |)][i i- ,)] i
T
+ [i(l + i)][i(l +
X)
™)]^3
(
T
+ U(l-0][Hl
+
X2
")]*4.
124
Finite Elements on Irregular Subspaces
It is now apparent through an examination of (3.2.9), (3.2.3a), and (2.2.63) that the functions ψ, are, in fact, the basis functions φ, formulated for the rectangular element of Chapter 2. When the transformation or mapping functions and basis functions are the same, such as in this case, the formulation is called isoparametric. It should be evident that we would encounter no difficulty in using a higher-degree polynomial for the bases than for the transformation functions. In Figure 3.4 there is no advantage in using quadratic functions for the transformation because the element sides are straight with midside nodes at the midpoints and, therefore, exactly described by linear functions. On the other hand, the unknown function ύ may behave such that quadratic interpolation is warranted. When the transformation is accomplished using functions of lower degree than those used as bases, the formulation is called subparametric; when the transformation function is of higher degree than the basis function, the element is called superparametric. There are occasions when it is advantageous to use basis functions of different degrees in different locations within the domain of interest. This can be achieved through the use of a mixed element such as illustrated in Figure 3.3c. This element may employ different basis functions along each side and thus may act as a transition element. The two-dimensional bases for this element are given in Table 2.76. To evaluate the integral of (3.2.2), it is necessary to express the derivatives in terms of local coordinates. The integrands of (3.2.2) contain χ and y derivatives of the basis functions, while the bases are defined in terms of | and η. Using the chain rule, one can relate the required χ and y derivatives to the readily computed £ and η derivatives by (3.2.10a)
—ay"-—g^af+ —97-θξ
x
t
Figure 3.4. Subparametric element in global (x,y) and local (ξ,η) coordinates. Boxed nodes only are used for geometry transformation [i.e., only corner nodes have prescribed (x, y) coordinates]. Linear mapping gives straight sides with midside nodes at the midpoint of the side.
Isoparametric Finite Elements
9φ{ξ,η) 3η
(3.2.10b)
=
9φ{ξ,η) dx
dx 3η
125
3 φ ( £ , η ) dy 3ν 3η
t
Here χ and y derivatives are defined implicitly because (3.2.3) lends itself to computation of partial derivatives of χ or y with respect to ξ and η. On the other hand, χ or ν derivatives of ξ or η are not always readily calculated. Equation (3.2.10) can be rewritten in matrix form as
(3.2.11)
3JC
dy'
di
3?
Η
9φ(£,η) 3η
dx
dy 3η
3η
' 3φ({.ΐ) 3χ 3Φ(€,«) 1
^
J
or dφ (3.2.12)
di
dφ dx
3φ
dφ
where [ / ] is the Jacobian matrix. The derivative relationship we require is readily established as 3φ dx
(3.2.13)
3φ dy
3φ
= [·/]
3ξ 3φ 3η
The efficacy of this approach depends upon our ability to efficiently evaluate the Jacobian matrix. By differentiation of (3.2.3), it is apparent that [J] is easily obtained from the relationship " dx (3.2.14)
dx 3η
dy' dt
' 3φ,
3φ
dt
dy 3η
3φ,
3ί 3φ
3η
3η
2
3φ
3
di 2
dφ
'*\ Xl
y\ >2
3
3η
The two matrices on the right-hand side of (3.2.14) are known: the first a function of i and η is obtained through differentiation of φ, and the second contains the global coordinates of the nodes. Although the integrand of (3.2.2) is now expressed in local coordinates, the limits of integration and the differential area must also be changed. The
126
Finite Elements on Irregular Subspaces
appropriate relationship is [see, e.g., (3.1.25)] j^)dxdy
(3.2.15)
= f
J'
(-)det[J]did . V
Combining (3.2.2), (3.2.13), and (3.2.15) yields an integral expressed entirely in (ξ, η) coordinates: (3.2.16)
t\ r\ ' . +
1
/ dy 3Φ,
dy 3φ, \
^ - , J _ , d e t [ y J l 3η Η 1
/
/ dy 3φ,
dy 3φ, \
31 3η / d e t [ / ] \ 3η 3ξ
3£ 3η /
3x 8ψ, , dx 3φ, \
d l t T 7 l l ~ ^ ^
+
1
1
/
3χ3φ,
^ " 3 T / o ^ i ~ ^ W
3χ3φ,\
"3T^)
+
r
i
l
. , .
d e t [ y ] i /
^ '' i
where d e t [ / ] , the Jacobian, is given by ,3.2,7)
d
e
,
U
1
= | | | Z _ | £ | .
Whenever an integral involving a polynomial expression in φ(£, η) is encountered, it is readily evaluated because only (3.2.15) needs to be applied. As an example, consider the following commonly encountered integral: (3.2.18)
^ φ , ( £ , η ) φ , ( ξ , η)
= f
J*
φ,{ξ,ν)φ,(ζ,7,)ά«ν]α·ξάη.
There is n o need in this case to modify the original integrand. However, the right-hand integral has an extra factor which, in some cases, is dependent on ξ and η. 3.2.2
Numerical Integration
Integrals of the form (3.2.16) and (3.2.18) can be evaluated using several numerical procedures. The most commonly used approach is based on Gaussian quadrature. In this scheme the integral, which is defined over the range — 1 to 1, is approximated as the weighted sum of the integrand evaluated at specified points in the interval —1 to 1. Consider, for example, the function /= f(£). The appropriate Gaussian quadrature expression is
(3.2.19)
Σ *,/(?,)+Λ,„ /=ι
Isoparametric Finite Elements
TABLE 3.4.
where
127
Gaussian Quadrature Formulas: Weighting Functions H>, and Coordinates of Integration Points £,·
η
Polynomial Degree
I
Linear
0.000 000
2.000 000
2
Cubic
0.577 350
1.000 000
3
Quintic
0.774 600 0.000 000
0.555 556 0.888 889
4
Septimal
0.861 136 0.339 981
0.347 855 0.652 145
±£
H>,
(
w, = weighting factor £,=coordinate of the i t h integration point (Gauss point) η — total number of integration points Λ = 2 " '(«!) (2« + 1 ) ~ ' [ ( 2 « ) ! ] - ^ { 2
+
4
3
Λ
-1<0<1.
«ζ
A polynomial of degree In - 1 can be exactly integrated using η integration points. T h e weighting coefficients a n d integration points are computed using Legendre polynomials and the scheme is frequently called Gauss-Legendre quadrature. Tabulated values of w, and £, for up to four points are found in Table 3.4. The two-dimensional equivalent of (3.2.19) for a polynomial of degree up to 2n — 1 in ξ or η is obtained in a straightforward manner, (3.2.20)
f _ f _ f ^ )
d
^ =
Σ
Σ^,/α,ΐι,),
7 = 1,=i
where the locations TJ and corresponding weighting factors w are obtained from Table 3.4. T h e three-dimensional extension of (3.2.20) is 7
(3-2.21)
y
f_f_f_M^i) i ^s= d d
ΣΣ
i ^ . A € , . i » , . f a ) .
k=17=11=1
Although exact integration of terms of the form of (3.2.16) may be necessary in some instances, in selected cases fewer Gauss points than formally required may be used with satisfactory results.
Finite Elements on Irregular Subspaces
128
Examination of Table 3.4 reveals that the Gauss points are always located on the interior of the domain of integration ( — ! < £ , · < 1). When this domain consists of an element, the Gauss points then fall within the element. Because of the simple form of the bases at the nodes, it is sometimes desirable to use the nodal points themselves as integration points. Although this is not permitted using Gaussian quadrature, it can be accomplished using a highly accurate scheme based on Lobatto formulas. Lobatto formulas require one more integration point than Gauss formulas to achieve a particular order of accuracy. T h e appropriate Lobatto integration formula is
/ ' ftt)dt
(3.2.22)
'
= wj(-l)-r i
*,/(£,)+*„/(])+
n
R. n
1=2
For Lobatto
Λ
- = (^)( ) '" [("-0^2η-1)- [(2ι.-2)!]- ^ί 2
α
,
, >
3
ί=β
\<θ<\. Selected weighting functions and coordinates of integration for Lobatto formulas are given in Table 3.5. It is apparent from this table and the integration formula (3.2.22) that some integration points lie on the perimeter of the
TABLE 3.5. Lobatto Integration Formulas; Weighting Functions κ>, and Coordinates of Integration Points £,
η
Polynomial Degree
3
Cubic
1.000 000 0.000 000
0.333 333 1.333 333
4
Quintic
1.000 000 0.447 214
0.166 667 0.833 333
5
Septimal
1.000 000 0.654 654 0.000 000
0.100 000 0.544 444 0.711 111
Fron Abramowitz and Stegun. 1964.
= €,
w
,
Isoparametric Finite Elements
129
domain of integration. Moreover, when this domain is a standard element, some of these boundary points correspond to nodal locations. 3.23
finite
Isoparametric Serendipity Hermitian Elements
The formulation of finite elements employing Hermitian polynomial bases was introduced in Section 2.2.4. Recall that we developed two approaches in that section, one that preserved the C ' continuity of the bases and a second which guaranteed C continuity only at the nodal points and C ° continuity along the element edges. Because the first approach generates two additional unknowns when a coordinate transformation is required, (i.e., d Tj/dx and d Tj/dy ), let us consider the C ° continuous case. This approach results in three degrees of freedom at each node (i.e., 7", 9 7 J / 3 x , 8 7 J / 3 y ) . ]
2
2
2
2
Consider the isoparametric Hermitian finite element illustrated in Figure 3.5. The principal feature that distinguishes this element from those illustrated earlier is the lack of side nodes on a curved side. Information required to describe this curvature is now provided at the corners. As in earlier isoparametric formulations, we use the basis functions as coordinate transformation or mapping functions. Thus a point {x, y) in the global coordinate system is expressed in terms of the nodal locations (x,,y ) and the basis functions as (see van Genuchten et al., 1977) t
(3.2.23a)
χ(ξ,·η)=
Σ ΦοοΛ+Ψιο^ + Ψοι^
(3.2.23b)
,(ξ,η)=
2 ΦηΛ + ΦηΜ
-Μ)
(-4,-0
+
Φο^,
H.t)
«,-η
Figure 3.5. Isoparametric Hermitian finite element with side lengths £,. The angles defined by the element sides £, and £ and the χ axis are designated a and β, respectively. 4
y
Finite Elements on Irregular Subspace
130
where (3.2.24a)
Φοο>
(3.2.24b)
Φιο
(3.2.24c)
Φοι>
=
*(ΐ + ^ ) ( ΐ + η η , ) ( 2 + « , + η η , - £
- Κ , ( ΐ - £ ) 0 + «,)( 2
= 7
2
™,)'
1 +
=
and η = ± 1 depending upon the local coordinates of they th node. Because of the properties of these bases, the coefficients of the Jacobian matrix can be readily evaluated provided that the coefficients 3 x / 9 £ , 9.x . / 9 η , 3 y , / 3 i , and 3 > , / 3 η can be determined. These coefficients can be evaluated geometrically when the element side lengths are known; consider, for example, the approach 7
y
(3.2.25a)
ycosa,,
οξ _
(3.2.25b)
3? dx
(3.2.25c)
1
9η
J
y
=
sin a , , -fcosfi , J
dyj _ £
(3.2.25d)
3η
=
y s i n ^ .
where side k defines the angle β with the χ axis at the node j as illustrated in Figure 3.5. Unfortunately, the side lengths £ are not generally known when curved elements are employed. However, along an element boundary, (3.2.23) and (3.2.24) reduce to a one-dimensional form, for example, y
d
Xi
(3.2.25e )
x(0 =
(3.2.25f )
y{£Y-
(3.2.25g )
x(ij) =
Σ j=\
ν
Σ j=\
(φοο,Λ + Φ \
Φ ο ο Λ + Φ\0]~$£
for s i d e η = ± 1,
2
Σ
7=1
(3.2.25h )
y{i))-
Σ
0j j + Φ< X
9*, 3η
(φοο^+Φο,,-^)
\
for side
ξ=±\.
Isoparametric Finite Elements
131
tj can be calculated from
(3.2.26)
with the integration performed numerically along side j. The first estimate of £ is usually based on the straight-line distance between the two nodes. Examination of (3.2.23), (3.2.25), and (3.2.26) reveals that an iterative procedure is in fact necessary to evaluate the Jacobian. Given an estimate of £ , (3.2.25) is evaluated; this result is introduced into (3.2.23) to obtain 9 v / 9 £ , and so on, which are finally used in (3.2.26) to establish a new estimate of £ . The overall procedure is repeated until a suitable value of £ is obtained. A final estimate of the Jacobian matrix coefficients is then made. Because these Jacobian elements are only used for the side-length transformation, they are no longer needed after the £. are calculated. The Jacobian matrix coefficients for the interior Gauss points are different. Fortunately, this procedure need not be repeated unless the mesh geometry is modified. There are two main advantages to employing Hermitian isoparametrics. Whenever a first derivative is required, it is easily obtained, particularly at the nodes. In addition, there is a saving in computational effort over C ° cubic elements. Numerical experiments conducted using the two-dimensional transport equation reveal that 25 to 40% fewer degrees of freedom are required to obtain the same accuracy achieved by C ° cubic elements (van Genuchten et al., 1977). T h e principal disadvantage involves the introduction of N e u m a n n - t y p e (prescribed gradient) boundary conditions. We now overcome this difficulty by using a normal-tangential coordinate system more suited to the Hermitian isoparametric element. 3.2.4
Isoparametric Hermitian Elements in Normal and Tangential Coordinates
We have presented one approach to the solution of field problems using isoparametric Hermitian finite elements, and it is probably a worthwhile investment to present an interesting alternative approach developed by Frind (1977). The particular problem he considered to demonstrate his technique involves the calculation of the fluid potential in a wedge-shaped region of an axisymmetric radial flow field in a porous medium. Flow occurs from the perimeter toward the center of the wedge (see Figure 3.6). The governing equations are (3.2.27a)
v ( A : v w ) = 0,
(3.2.27b)
u=u
c
on
S , 2
132
Finite Elements on Irregular Subspace
Figure 3.6. Wedge-shaped grid for radial flow (after Frind, 1977). ^9"
(3.2.27c) du
(3.2.27d)
5 and5 ,
on
3
4
where Κ is the hydraulic conductivity of the porous medium. Let us employ Galerkin's method of weighted residuals to obtain a set of approximate integral equations (3.2.28)
f{V'{K
Vu))
i = 1,2,..., 14,
ai
A
J
α = 0,σ,τ,στ,
where the symbol φ represents four new types of Hermitian bases: αι
Φο,'
Φ.,'
Φτ/'
3
n
Φοτ,'
d
which will be described shortly and « is defined as
(3.2.29)
ϋ
ύ= 2
i , d U, + ^ Φ „ + ^ Φ ,+ ^ Φ W
7= '
"Α,
2
W
τ
τ
β
ν
.
Although one can readily solve (3.2.28) directly using Hermitian cubic bases, it is sometimes advantageous to apply Green's theorem so that the natural boundary conditions appear directly in the integral operator and only first-order derivatives require transformation:
(3.2.30)
f {Kvu)'V
i = 1,2,..., 14,
JKvu'ηφ„,ds α=0,σ,τ,στ.
=0,
Isoparametric Finite Elements
133
To establish the functional form of the bases
α Τ I U \ (3.2.3la)
" -d" U , du 3η -r- = t t - R - + - R - - R - , 9e of θσ 9η θσ
(1
9
(
1 3
2
9
11K\ 3
1
b
(3.2.31c)
"
-
9
"
9
*
97 - 9 ? 37
)
4 -
9
M
9
T
9 « _ 91 3£ d u 9σ9τ 9σ θτ g |
/ 9£ 9η \ 9σ 9τ
2
2
>
9^ 9 7 '
+
|
2
9£ 9η \ d u 9τ 9σ / 9£9η 2
|
^ 9η 9η 9 κ ^ 9 £ 9 Μ ^ 9 η 9« 9 σ θ τ 3£ 9σ9τ 9 η ' 9σ 9τ 3 η 2
2
2
2
Recall that along element boundaries either £ = ± 1 or η = ± 1 , so that by assuming elements with orthogonal corners 9 η / θ σ = 0 and 3 £ / 3 τ = 0 at all nodes. Imposition of these constraints on (3.2.31) yields -> i-i ^
ii (
3
2
3
2
a
du du d£ 9 7 = 9 ? 97
)
1Γ = IT Τ · στ ση στ
(3.2.32b)
1
The cross derivative of (3.2.29) can be expanded to give 9 M 2
3σ9τ
_
3 £ 9M 9 η 9M 3 σ 3 τ 3 | ' 3 σ 3 τ 3η 2
9$ 9η 9 u 3σ 9 τ 3£9η '
2
2
At this stage of the development, it is necessary to introduce approximations for the terms 9 ξ / 9 σ , θ η / 9 τ , and 9 £ / 9 σ 3 τ = 9 £ / θ τ 9 σ . From Figure 3.6 one can observe the following relationships: 2
(3.2.34.)
(3.2.34b)
2
d£,
2
3η,
2
- ± " > 4 - -
It should be noted that (3.2.34) provides only an approximation for the mapping derivatives at the nodes (i.e., 3 £ , / 3 σ and 3 η / 3 τ ) . This approxima7
134
Finite Elements on Irregular Subspace
tion results in a discontinuity of these quantities at the nodes.* O n e approach to approximating the cross derivative is t o use a difference representation,
(3.2.34c)
drdo J = Μ
/
β
- 2 ^ ( 1 θτ A
( τ )
-2Δ£,
-2Δ£ 2
I.
where Δ £ „ Ξ Ξ £ - £ and /„ and l are defined in Figure 3.6. Equations (3.2.32)-(3.2.34) can be written in matrix form as σ
T
0 ι
du . Yo du . Tr
2
0
J
(3.2.35)
J
2
0
—
3 u . 3σ3τ 2
7
e. -2Δ£
£ £
£ £
2
τ
3?
4
Τ
3 « . 3£3η 2
£ £
2
σ τ
7
3« .
0
-2Δ£„ α
3« .
0
7
F o r finite side lengths, the coefficient matrix of (3.2.35) is nonsingular and can be inverted to yield
du .
2
H
J
du . dt\
(3.2.36)
—
J
3 « 2
didi\
.
0 Δ£„
J
0
τ
.
d^ du . Tr du J
0
2 Δ£
3M
0
J
£ £
2
4
3CT3T
J
We now rewrite our trial function in the standard form, 14
(3.2.37)
*=
Σ. Ι ^
7=1
+ ^
+ ^3TJ υ
+
^
'
•It is possible to avoid this discontinuity by using average side lengths computed from adjacent elements.
Isoparametric Finite Elements
135
Substitution of the nodal values of (3.2.36) into (3.2.37) and comparison with (3.2.29) yields Φο,
Φ(Χ),
Φιο, +
2
(3.2.38)
£ , γΦου
—
Φι
4
τ
Δ£ , 4~Φι τ
+
e ε 4
_
, Φ",
T h e information given in (3.2.29), (3.2.30), and (3.2.38) must now be coupled in the standard way through the use of the Jacobian matrix dy
dx
dt
[J) =
dx 3l)
dy dη
The four coefficients of [J] are obtained, as in earlier examples, through the use of an expansion involving nodal values of geometric quantities and the bases: 14
dx dx . Σ *,Φοο, + ^ Φ ' . ο , + ^ Φ ο ι , +
(3.2.39a)
χ(ξ,η)=
(3.2.39b)
ν(£,η) = 2 ^
dx 2
υ
14
+ ||>Φ .ο> ,
7=1
+
^3 TΦJ ο υ + J
^ Φ
,
9£9TI
J
Μ > ·
T o evaluate the Jacobian matrix, it is necessary to establish values not only for the parameters dx 9£ ' 7
dx 9η '
dy
a? ' 7
7
dy . a n d
a^
but also for d x /dξdη and 9 ν / 9 £ 9 τ } . Various approximations can be employed to approximate the cross derivatives. Numerical experiments indicate, however, that omission of the cross-derivative term in the isoparametric mapping (3.2.29) actually improves the accuracy of the solution. Elimination of the cross derivative and substitution of (3.2.25) into (3.2.39) completely defines the coordinate transformation function. The Jacobian matrix is now easily 2
2
J
7
Finite Elements on Irregular Subspace
136
evaluated through differentiation of (3.2.39) as in the earlier isoparametric example. The final form of the matrix equation resulting from the approximation of (3.2.27) using isoparametric Hermitian elements is [C]{u)
(3.2.40)
=
{f),
where coefficients of [C], {u}, and {/} are given by Φο> θΦο, 3x dx
9
9
[c] =lf u
J_K
Φθ7 H„ dx dx T
9
Φθ7 3x
^Φη/ 3Φο/ 3χ 3χ
9
3x 3x
3x
9
-H„, · ^+ 3x
{«},=
3y
»Φϋ dy A
HOT,
3y
9
dy
Φ«ν Φο, 9χ 9χ
3y
3x
3x
3x
dy
9
Φ.τ, 8φ„ dx dx 9x *+-V
3x
9Φ , 9x Γ
9/
ο τ ;
[
0
3 φ , 9φ„, dy dy στ
Φ.τ> 3Φ
9 |
dy
detf/Ji/ii/T/
ΤΙ
dy
Φ.τ, , »^> Φ,
9
3y
9φ 9φ , dy dy
|
9
9
9y
3x
I/,
<7„Φο,
9ίΛ 3σ 3ί/, 3τ d U, 3σ3τ
4„Φτ,
2
^ / 9 ^ ,
+
dy
3x
9
» » T >
9y
3 ^ 9 ^ dy dy
+
9
dy
9Φο, 9y 9y
^ / 9φο, 9^> 9y
+
9ΦΓ/
T
οτ
Φ τ ,
+
^ 3 ^ 3x dx
Φ , , *b./ Φοτ,
Φ*> 3Φ.« ^ ^ / · + dy 9χ 9χ + r j
Φο/ 3φ„, dy dy οφρ; 9
|
9x
^
+
^ν^Φο, 9x 9x
a
9
d
9 t
Hoj 9
Φο> οΦο, dy dy
9
dy
° Φτ, η
β
To solve (3.2.40), it is necessary to impose constraints arising out of boundary conditions (3.2.27b)-(3.2.27d). In the case of Dirichlet-type conditions, one simply replaces the appropriate value of U with the known information and then eliminates the corresponding row from the matrix equation. We found in the Hermite example of Chapter 2 that specification of U, implies t
Boundary Conditions
137
TABLE 3.6. Relative Error in Gradient of « Using Isoparametric Hermitian Finite Elements
Node
b=2
b=3
b=4
l 2 3 4 5 6 7
-0.0214 -0.0114 -0.0097 -0.0089 -0.0076 -0.0018 +0.0288
-0.075 -0.053 -0.049 -0.050 -0.045 -0.029 + 0.080
-0.135 -0.105 -0.104 -0.106 -0.103 -0.071 -0.278
After Frind, 1977. specification of certain derivatives. In this case, because we are working in normal-tangential coordinates, we have automatically specified θ ί / , / θ τ and d U,/dadr, thereby eliminating two more equations. T h u s we have reduced the degrees of freedom associated with this problem by three through the specification of one boundary condition. In the case of Neumann-type conditions, we can impose the required constraints in two ways. The procedure described in earlier examples and expanded in the next section invokes replacement of the boundary integral of {/} by the specified flux integrated over the perimeter of the domain. In a Hermitian formulation, however, we also have the option of replacing an unknown coefficient of {«} directly with the known derivative information. T h e latter choice is preferable because it is a stronger condition and also results in a reduction in the number of algebraic equations. Let us now return to our example problem. The graduated nodal spacing of Figure 3.6 can be described using the relationship 2
r = b',
i=0,\,...,n,
where the parameters b and / can be specified a priori. Table 3.6 provides the relative error in the calculation of the gradient 3 ( / / 3 σ for selected values of b and /'. It has already been noted that the Jacobian employed in problems of arbitrary geometry is generally discontinuous across element boundaries.
3.3
BOUNDARY C O N D I T I O N S
One of the advertised advantages of the finite element method is the ability to incorporate second-type and third-type boundary conditions into the governing equation. This opportunity arises when Green's theorem is used to reduce the order of selected terms in the approximating integral equations. Consider,
138
Finite Elements on Irregular Subspace
for example, the species transport equation j - - V(D-Vc) + V(vc)=0,
(3.3.1) where
t
c=concentration D = molecular diffusion υ = m a s s average velocity of t h e fluid.
Application of Galerkin's method yields j f ( | j - v ( D . vc)+V(vc))«,dfl=0,
(3.3.2)
N,
ι = 1,2
where
7=1
and φ· are bases. Green's theorem may now be used to modify (3.3.2) in two ways. Consider first the reduction of the second-order term to yield
\
(3.3.3)
a
^
+ V ·
(ycijb + (D · V c) · V
·V
c) · η φ , ds,
i = l,2,...,/V. The right-hand side of (3.3.3) now contains the diffusive mass flux boundary condition as a contour integral around the domain. T h u s we have incorporated a second-type boundary condition directly into the governing equations. There also exists the possibility of applying Green's theorem to the first-order space term in (3.3.3). This gives rise to the expression (3.3.4)
J
φ + {Ό-ν c-vc)' ί
V φ,^α
=£(D-Vc-vc)-n<Mi,
* = 1.2
Ar-.
Now the right-hand side of (3.3.4) describes the total mass flux crossing the boundary S and we have thus embedded a third-type boundary condition in the approximating equation. Generally, the concentration-dependent terms in the contour integral are specified as a prescribed function, say g = g ( x , v, t). Thus we must evaluate an
Boundary Conditions
139
Figure 3.7. Quadratic element side, illustrating the dimensionless coordinate system.
expression of the form
/· = / ς ( ί ) · η φ
(3.3.5)
1
"
Ι
·Λ=2/ f
q(s)-m> ds i
c
2lf,
= e
which can be written in dimensionless coordinates as (3.3.6a)
/* =
/'φ)·ηφ .(0^^
I? =
!ffq(s)-
1
or (3.3.6b)
n
where / is the length of the element side as illustrated in Figure 3.7. Note that ds/di may not always be constant over an element, as shown in Figure 3.8. To evaluate (3.3.6b), a functional distribution for q must be established. When this function is known, (3.3.6) can be integrated either numerically or analytically and the resulting numerical value becomes a known parameter in e
X
Figure 3.8. Curved quadratic element side, illustrating the dimensionless coordinate system.
140
Finite Elements on Irregular Subspace
equation i. Although any functional form of q = q« η can be prescribed and, in principle, integrated, a simple form is usually selected for finite element analysis. The simplest case is to assume q constant along /. For a linear element side (i.e., two nodes), the two equations are n
(3.3.7a)
I i =
L J\( t qm
n=
(3.3.7b)
i)d
!4L
=
± f* u)dt='-f. qn
2
F o r a quadratic element such as illustrated in Figure 3.7, we obtain
h = iq.f_*te)dl = WA„), l
(3.3.8a)
* = W.\^)di = W q )>
7
(3.3.8b)
e
h = ^„f\(i)di
(3.3.8c)
n
= W/l )K
An alternative to assuming a constant q„ along each side is to establish q at each node point and then use the basis functions to interpolate between the nodes. Consider, for example, a quadratic interpolation of a „ ( | ) . The distribution of q would be given by ni
n
(3.3.9a)
ίβ
(0= Σ
?.,·Φ,(0.
The integral for each node would become (Connor and Will, 1969)
(3.3.9b)
/ f = 4 / ' Σί„ Φ Φ,(ί{ =
(3.3.9c)
/'=τ/'
;
2
A
(3.3.9d)
/ ' = -f/ 3
7
Σ 9.ΛΦ2^ =
»y = 1
Α/(2 „,+ „ -1 „3), ί
ς
Μ9«,+8ί»2
Σ ?»>Φ>Φ3^ = Μ - ^ .
9
2
+
?«3).
+9-2+2*7. ). 3
The formulation above becomes cumbersome when curved sides or unequally spaced nodal points are encountered. In the case of curved sides, the
141
Three-Dimensional Elements
side length / may not be readily available. Moreover, as mentioned earlier unequally spaced nodes along a side preclude the use of a simple transformation to assist in evaluation of the integral. Under these circumstances, it is advantageous to employ numerical integration such as introduced earlier for area integrals. Because the incremental distance along 5 can be expressed as
the appropriate integration formulas are
(33.0)
,;=/_',
A ( £
,((5|)
!
(|z) ) !
+
, / 2 J {
,
where the coefficients of the Jacobian matrix are obtained in the manner described earlier.
3.4
THREE-DIMENSIONAL ELEMENTS
The extension of two-dimensional analysis to three dimensions is rather straightforward for the majority of element types. As would be anticipated, the basis functions will be defined in terms of global coordinates (x,y,z) and local coordinates (ζ,η,ξ). For Lagrangian hexahedral elements the basis function formulation is a direct extension of the two-dimensional case for both the zero-order continuous and Hermitian elements. The development of the serendipity family of three-dimensional elements is less obvious and the appropriate bases are presented in Table 3.7a. The application of linear, quadratic, and cubic hexahedral elements is analogous to that presented for quadrilateral elements. Moreover, one can easily extend the isoparametric concept from quadrilaterals to deformed hexahedra (see Figure 3.9). The principal changes to be considered are in the formulation and use of the Jacobian matrix. Global and local derivatives are now related by 3ψ " dx (3.4.1)
3
' 3
= [ · / ] - ' dη
d<(> . f . 9
142
8)
Φ, = ^ ( 1 - ί 2 ) ( 1 + 9 ^ , χ ΐ + «,Χ1 + iP?,)(' = 13,8,15,16,17,18,19,20)
Φ, = ^ ( 1 -r, 2 )(l +9ηη,)(\ + Ιί,χΐ +ff,) (/ =2.3,8,9,22,23,28,29)
Φ, = ^ ( 1 - ί 2 Χ 1 + 9 « , ) ( 1 + τ ϊ ι,,)(1+ίί,)(/ = 11,12,5,6,31,32,26,25)
Φ, = ^ ( 1 + £i,Xl + i?n,Xl + ff,)[9(£2+7,2 + f 2 ) - 19] (i = 1,4.7.10,21,24,27,30)
Φ, = ^(1 - η2Χ1 + «,)(! +ff,) (' =2,6,18,14)
Φ, = {(1 - ί2)(1 + ηη,ΧΙ + ff,) (' =8,4,16,20)
*, = ^ ( l - f 2 ) ( l + «,)(l + 11,)('=9,10,ll,12)
Φ, = g (1 + «,XI + ΐΜΙ,ΧΙ + & Χ « , + ill, + ff, - 2 ) (i = 1,3,5,7,13,15,17,19)
Φ, = 8 (ΐ + ^ ) ( ΐ + ηη,)(ΐ+ ??/)('= 1.2
C° Elements
TABLE 3.7a. Basis Functions for Serendipity-Type C° Hexahedral Elements; £„ η„ and J, Are the Local Coordinates of the ith Point
143
16
Cubic
Linear Quadratic
Side
Φ, = ά(ΐ + « , χ ι + ηη,χι - f 2 χι +9ff.) (ι =9, ιθ)
!n 2 -ü
W.-f
«,-*
fl 2 -ü
1 3
1 3
ßi
Edge nodes Quadratic * , = i ( l - f 2 X l + ipi 1 Xl+ff 1 )('' = 12) Φ , ^ Ο + ί ί , Χ Ι - ν Χ Ι + ff,)(i = 18) Φ, = ί(ΐ + α χ ι + ηη,)(ΐ-? 2 )(<=2) Cubic Φ, = Ä 0 - ί 2 Χ1 +9ίί,)(1 + ι,τ,,χΐ + H,) (ι =6,7) Φ, = Α(1 + ί£,)(1-') 2 )(]+97 / 7 ? ,χΐ + #,)(,- = 12,13)
where
Mixed C° element Corner nodes φ, = α,β, «, = i(i + ii',)(i + ™,)(i + ff,)
Φοο„ = - jjrd - f 2 ) d + «oXl + if1oXl + ffo)
°Μ. Th. van Genuchten, unpublished manuscript. From Verge, 1975.
17
t
Φο,ο, = - - ί | ( 1 - ' ? 2 ) ( 1 + ίίοΧ1 + ')'>οΧ1 + «ο)
In
Φ.οο, = - | | ( 1 - ί 2 ) ( 1 + ίίο)(1 + '?υο)(1+«ο)
3
8Ϊ
24
St2 _ i S
tt,-i
I
Φθ(ΐο, = -^(1 + «ο)(1 + ηηο)(1+?ίοΧ2 + Ιίο + η')ο + ί ί ο - ί 2 - η 2 - ^ )
C° Hermite"
144
Finite Elements on Irregular Subspace θ (-4.4.0
7(4,1,4)
(-4-4.4)
(4,-4,1)
£(_-Ur4). 'H.-4.-4)
Figure 3.9. Isoparametric hexahedral elements in global (x,y,z) coordinates.
3 (4,4,-4) r
(4,-4,-4)
and local
where the Jacobian matrix ( / ] is given as dx
dy
dz
9x
dy
dz_
9η
9η
9η
dx
dy
92
a*
9f
η
9ί
The differential volume element is transformed into local coordinates by (3.4.3) As in required Gaussian Table 3.4
dv =dcl[
J]dtdvd$.
the case of isoparametric quadrilaterals, numerical integration is for isoparametric hexahedra. The appropriate three-dimensional quadrature uses the integration points and weighting factors listed in in conjunction with (3.2.21), which we rewrite here for a polynomial
Figure 3.10. Deformed prismatic element with triangular cross section in global (JC, y,z) and local (Ζ,,ί) coordinates.
Three-Dimensional Elements
145
integrand of degree not exceeding In — 1 in £, η, or f.
(3.4.4)
f f f f(i,v,ttdtd dS=
j, 2
V
'
'
I
k λ = = I1 7ι = = 1 I ii = = 1I
Surface integrations arising out of the application of Green's theorem are performed numerically using (3.2.20), the two-dimensional analog of (3.4.4). In the case of triangular elements, there are two popular approaches to generating their three-dimensional counterparts. One scheme combines triangular bases, in χ and y say, and linear bases in the remaining coordinate direction, in this case z. This generates a prismatic element with triangular cross section. This element can be deformed to yield a pentahedron as illustrated in Figure 3.10. Bases for this family of elements are given in local coordinates in Table 3.7b. Numerical integration is readily accomplished using a combination of the formulas employed for triangular elements and one-dimensional Gaussian quadrature:
(3.4.5)
- Σ Σ g( \j. L
L,
L,
v:
£, )w w .
3j
]
i
T h e integration points and weighting coefficients are obtained from Tables 3.1 and 3.4. Triangular elements can also be combined to form tetrahedral elements as illustrated in Figure 3.11. The natural coordinate system for this family is based on the volume of the tetrahedron. It is apparent from Figure 3.12 that the point Ρ can be uniquely located using L where, for example, Jy
Li
=
volume 2 3 4 Ρ volume 1234 '
Bases for tetrahedral elements formulated using volume coordinates are presented in Table 3Jb. Integration can be performed using a formula analogous to the one introduced for triangles and area coordinates:
ν
L^L^L^L^dO=()V
\m \m
I7I|
2
3
\m ! 4
( m , + m + m + m + 3)! ' 2
3
4
TABLE 3.7b.
Basis Functions for Serendipity-Type
Pentahedral Elements and Tetrahedral Elements
Pentahedral elements
10
12
φ, = \L,(2L, - 1X1 + «,•) - H , ( l - € ) (/ = 1.3,5,10,12,14) 2
Φ, =2Z. L (l + « , ) (/ =2,4,6, II, 13,15) y
4
•, = L (l-i )(i'=7,8,9) 2
t
where _/ and λ are nodes located along the same edge as /. Tetrahedral elements
*, = L,
1 ) 1 , 0 = 1,3, 5, 10)
φ, = 4 / ^ ( 1 =2,4,6,7,8,9)
where y and k are nodes located along the same edge as i. From Zienkiewicz, 1971.
146
Three-Dimensional Elements
147
ζ 4
Χ
Figure 3.11. dinates.
Isoparametric tetrahedral elements in global (x, y , z) and local L coor-
where χ
61/ = det
ζ
2 y
3 Λ
x
X
2
Z
7
2
X
4
y* Z
3
4
and ( x , , y , , z , ) are the global coordinates of the node /'. Where numerical integration is required, as in the case of isoparametric tetrahedra, the following formula can be employed: rifi-Ltrx-L,-^'#(/.,, L , L j ,
(3.4.6)
L )dL\dL dL'3
2
n \j^
Σ
L
2 r
L ,L h
4 j
)w
A
2
r
where the integration point coordinates and weighting functions are reported in Table 3.8. In summary, the extension from two-dimensional to three-dimensional finite elements is not conceptually difficult. The challenging aspect of threedimensional simulation is the development of a computer code which can efficiently solve the large number of resulting algebraic equations.
L
4
M
2 L
2'
1
Figure 3.12. Tetrahedral element, volume coordinates.
illustrating
Finite Elements on Irregular Subspace
148 TABLE 3.8.
Integration Point Coordinates and Weighting Functions for Tetrahedral Elements
η
Polynomial Degree
l
Linear
l
0.250 000
0.250 000
0.250 000
0.250 000
1.000 000
4
Quadratic
l 2 3 4
0.585 0.138 0.138 0.138
410 197 197 197
0.138 0.585 0.138 0.138
197 410 197 197
0.138 0.138 0.585 0.138
197 197 410 197
0.138 0.138 0.138 0.585
197 197 197 410
0.250 0.250 0.250 0.250
000 000 000 000
5
Cubic
l 2 3 4 5
0.250 0.333 0.166 0.166 0.166
000 333 667 667 667
0.250 0.166 0.333 0.166 0.166
000 667 333 667 667
0.250 0.166 0.166 0.333 0.166
000 667 667 333 667
0.250 0.166 0.166 0.166 0.333
000 667 667 667 333
-0.800 0.450 0.450 0.450 0.450
000 000 000 000 000
Κ
L
2
After Zienkiewicz, 1971.
REFERENCES Abramowitz, M. and I. A. Stegun, Handbook of Mathematical Functions, National Bureau of Standards, Appl. Math. Ser. 55. 1964. Brebbia. C. A. and J. J. Connor, Fundamentals of Finite Element Techniques for Structural Engineers. Butterworths, London, 1973. Connor, J. and G. Will, "Computer-Aided Teaching of the Finite Element Displacement Method," MIT. Dept. of Civil Engineering, Res. Rep. 69-23. 1969. Felippa, C. Α., "Refined Finite Element Analysis of Linear and Nonlinear Two-Dimensional Structures," Dept. of Civil Engineering, Univ. of California. Berkeley, Rep. 66-22, 1966. Frind, E. O.. "An Isoparametric Hermitian Finite Element for the Solution of Field Problems," Int. J Numer. Methods Eng., 11, p. 945-962. 1977. Van Genuchten, M. Th.. G. F. Pinder. and E. O. Frind, "Simulation of Two-Dimensional Contaminant Transport with Isoparametric Hermitian Finite Elements," Water Resour. Res.. 13, 2, p. 451-458, 1977. Verge, M. J., "A Three-Dimensional Saturated-Unsaturated Groundwater Flow Model for Practical Application," Ph.D. thesis. University of Waterloo, Waterloo, Canada, 1975. Zienkiewicz, P. C , The Finite Element Method in Engineering Science, McGraw-Hill, New York, 1971.
mm Parabolic Partial Differential Equations
4.0
INTRODUCTION
In Chapter 1 we described the properties and behavior of parabolic partial differential equations. It is apparent from that discussion that this class of equations plays a very important role in many branches of science and engineering. As a result, a considerable amount of effort has been expended in formulating and analyzing accurate and efficient numerical approximations to parabolic operators. In this chapter we examine many of these approximating schemes and formulate the methodology required to evaluate them.
4.1
PARTIAL DIFFERENTIAL EQUATIONS
As a first step in our discussion of parabolic PDEs we repeat a certain amount of the material introduced in Chapter 1. This allows us to set up some model parabolic PDEs that can serve as test vehicles for the numerical algorithms to be presented. As before, we use the notation u = u(x, y) when only two independent variables are involved with χ serving as a representation for a time variable in many physical systems and y representing a spatial variable. When more than two independent variables are involved, we use u = u(x, y, z) o r u = w(x, y ,y ,y ,...). Our typical model second-order parabolic P D E takes the form l
2
J
(4.1.1) where £( · ) is a linear (usually) or nonlinear operator involving spatial derivatives and possibly other side conditions. Thus we might write as a linear example in only one space variable (4.1.2)
fi(x,y)u
)-y(x,y)u 149
1 SO
Parabolic Partial Differential Equations
or β(χ,
(4.1.3)
y)u
= V
x
'aVu-yu,
where α, / ? > 0 , γ > 0 . A simplified version of (4.1.2) would be u =
(4.1.4)
au ,
x
yy
which we have encountered many times before. T o (4.1.2) we must append suitable initial and boundary conditions. These depend on the range of the y variable; thus we might specify (4.1.5)
(i) -oo
(4.1.6a)
(ii) y>0;
(4.1.6b)
+ oo;
a (x,0)u
+ a,(x,0)u
Q
u = f(y)
atx=0
" = /(v)
atx=0
= a (x,0)
y
a t y = 0,
2
x>0,
where a >0, a, < 0 , and a — a, > 0 . 0
(4.1.7a)
0
u = f{y)
(iii) 0 < y < l ;
atx=0
(4.1.7b)
a (x,0)u
(4.1.7c)
J8 (JC,1)M + /8 U1)«I , = /8 (X,1)
+ (x,0)u
o
ai
0
= a (x,0)
y
2
i
J
2
aty = 0,
x>0
a t y = l,
x>0
with the same requirements on α , a,, a , β , β , and β as above. We might also represent (4.1.2) as a set of two first-order P D E s ; this has the virtue of removing the derivatives from the boundary conditions in (4.1.6) and (4.1.7). We may also write the right-hand side of (4.1.2) as 0
(4.1.8)
0
2
χ
2
£(«)=£(·) |τ(·) +
or
(4.1.9)
e(„)=^(.) 4() +
+
^ ( ) .
where ( · ) has the obvious notation in connection with the use of two or more dependent variables. Alternatively, we might use the similar forms (4.1.10)
\Z(u) = a[u
yy
+
u„\
or (4.1.11)
£
( « ) = «[«™,
+
«™ «™]· +
Model Difference Approximations
151
Finally, we might write a nonlinear model parabolic P D E in the form Z(u)=F(x,y,u,u ,u ).
(4.1.12)
v
yy
In addition, there are equations that may change their form depending upon the physical response of the system. Consider, for example, Burger's equation written in its fluid dynamical form as (4.1.13)
« + «!<„ = R e " ' u ^ . , x
where Re here is the flow Reynolds number. As the Re value changes in different flow regimes (i.e., near boundary layers and in regions of full turbulence), the mathematical character of the equation may change completely. Thus (4.1.13) may change from a parabolic equation into a hyperbolic one, with all the different solution characteristics thus inferred. A method developed to solve (4.1.13) in one regime of flow may well be completely unsuccessful in another regime. 4.1.1
Well-Posed Partial Differential Equations
It is necessary that all model P D E systems be well posed as well as possess unique solutions. This implies that the P D E possess neighboring solutions such that when the initial data are slightly perturbed, the P D E still provides a solution that deviates only slightly from the unperturbed solution. This is equivalent to stating that the P D E truly represents the prototype physical system. In general, the model parabolic equations that we consider here have this feature since we integrate in the positive χ (or time) direction into an open boundary region.
4.2
MODEL DIFFERENCE APPROXIMATIONS
Just as we have a set of model parabolic PDEs, we also have a set of model difference approximations to the PDEs. It is these finite difference equations ( F D E s ) that we need to solve. The F D E s must be well posed themselves as well as being consistent, convergent, and stable (see Sections 4.4 and 4.5). To obtain these finite difference representations, we use the notation of Chapter 1, namely that for a two-dimensional problem u ( x , y), the increments in χ will be of length h and those in y will be of length k. If there is more than one spatial variable, we use / , , / The subscripts r and s (i.e., w, ) will denote values of u at incremental values of x(r) and y(s), with further subscripts used for more spatial directions. When h and it are constant values, we refer to the two-dimensional mesh that results (see Figure 4.1) as a uniform mesh. This is obviously the simplest procedure we can analyze. N o w we usually seek to calculate u at the mesh points u , where the mesh intersections occur. 2
s
r
s
152
Parabolic Partial Differential Equations Χ
X . nod* / · < « . » )
•(3,1)
1
•(3,2)
• IS.})
»[2,2)
ο,ο
"—~—' k
y
•
u(5/2,3/2) •
•
U(3/2,V2) «(3/2,5/2) • •
•
»i»/2,S/2) •
o.o
Mesh - Intersection Points
•
•
"—-—' k Block - Centered
y Points
Figure 4.1. Uniform, two-dimensional finite difference nets. Depending on the boundary conditions, however, it may be advantageous to use a block-centered grid in which u is calculated in the center of a block, u +\/2.s+\/2The latter case is especially useful when flux-type boundary conditions are specified. Later, we also investigate the features of nonuniform meshes in which h and k will be functions of r and s, respectively. This will be particularly useful when gradients are quite different in various regions of the (x, y ) domain. In general, a nonuniform mesh in the χ direction alone may conserve computing time, especially if the P D E solution is basically damped as an exponential function of x. In this case, an exponential increase in h as one proceeds into χ space allows a retention of accuracy while minimizing the computing time required. r
The general linear form of a finite difference approximation may be written in matrix form as (4.2.1)
[^] {«} = [^]i{«.}, + M] {«},-,+ · •• +MW«},- , 0
r+ 1
2
m+ 1
where [A] , [A],,..., [A] ate square matrices and { « } , { κ } , , . . . , {"},-„,+ , may be suitable vectors. T h e subscript s has been dropped with the values incorporated into the vectors {«} . Equation (4.2.1) says that we can calculate {u} [at the ( r + l)th level] by incorporating the m x-levels below. Of course, [A\ cannot be singular. In most cases, m = 1 or m = 2 since higher values of m require extensive computing time. If [A] is a diagonal matrix, (4.2.1) is termed an explicit difference form. In all other cases (4.2.1) is termed an implicit difference form. Later sections of this chapter make this distinction clear as well as showing the computational differences. Alternatively, o n e may adopt the convention that the general linear or nonlinear finite difference form be given as 0
m
r + 1
r
f + 1
Q
0
(4.2.2)
{ « } ,
+
Ι
=
{«}, + Λ(Λ{Μ},
+
Ι +
Ό{«},).
Derivation of Finite Difference Approximations
153
where P and P are operators composed of polynomial combinations of difference operators defined over the spatial region and acting on their arguments in a linear or nonlinear fashion. This obviously corresponds in a loose sense to the case m = l in (4.2.1) and is implicit. Many examples of (4.2.2) are given later. It is important to realize that when our model P D E is linear, the resulting model finite difference approximation is also linear. However, Gerber and Miranker (1973) have proposed that a nonlinear difference scheme may have advantages. At each χ step the calculation proceeds by determining the best possible difference scheme to use at that step subject to an optimization criterion. This approach has high accuracy as well as being stable and convergent; it may well be that this nonclassical procedure will be of major importance as further developments occur. {
0
4.2.1
Well-Posed Difference Forms
We have emphasized that our model P D E must be well posed for various initial data, but it also follows that the finite difference approximation should be well posed. In general, a well-posed difference approximation must be continuous for a wider class of initial data perturbations than the P D E ; this is directly related to the stability of the finite difference approximation wherein all perturbations in a computed solution must be bounded. When the perturbations in the initial data are made small (in some sense, such as h, k ->0), the resulting perturbations in the computed solution must become small, thus resulting in convergence of the finite difference approximation. We investigate some of these features later.
43
DERIVATION O F F I N I T E D I F F E R E N C E APPROXIMATIONS
We have shown in Section 2.1.2 that one can use truncated Taylor series expansions to replace a P D E with a finite difference approximation. The truncated terms lead to the local truncation error, which is used, at least in a local sense, to provide a measure of the accuracy of the finite difference approximation. For any single P D E there are many such possible finite difference representations and we may suspect that schemes with smaller local truncation errors (i.e., higher order in powers of A, A:,...) are to be preferred. This is frequently, but not always, the case since other features in addition to the truncation error make a particular finite difference approximation a feasible candidate for a computation or a simulation. In this section we take the model parabolic P D E of (4.1.1) in the form (4.3.1)
u = Uy x
[model parabolic P D E ]
154
Parabolic Partial Differential Equations
and derive a number of different finite difference approximations. We use either the Taylor series directly or the approach of Mitchell and Pearce (1962), which has the model P D E embedded directly into the series equations. In particular, we are interested in the local truncation error for each different approximation but not, at this point, in how to use the approximations or how to solve them efficiently. The latter points are considered in later sections of the chapter. We shall encounter two types of approximations, explicit and implicit. Because of the form of the resulting algebraic equations, different computational schemes must be used for each type. For (4.3.1), assuming that u(x, y) is continuous and has sufficient derivatives, it is simple to show by repeated differentiation (assuming that the order of differentiation can be interchanged) that (4.3.2)
U
χ
Uy ,
χ
Μχχχ
Vyv
Uyyyyyyt
· · · *
^fflJC
^2iMV"
N o w if we develop a Taylor series around u , there results r
U
r+\.s
r.s
=
+
U
h
+
u
But by using (4.3.2) and h — pk
u
r + i i S
=u
+
r<s
Η
β
+
Μ
"χχχ
we may write
1
(4.3.3)
Λ 2
s
+ —«,,,,. , P
pk u , 2
t
2
k *
+
or
where B = ku
vv
D = k*u.. tyyy
and
2
yy r.s
vvv
r,s
.
In exactly the same manner we may derive all of the following (we drop the subscripts r, s on the right-hand sides): u
(4-3.4) (4-3.5)
u_ , r
s+
= u± B
r ± K s
+u_ rs
[
=2u -I Τ
(4-3.6)
U r s + 2
+ u _ =2u+4B rs
2
+ \p D±\p F 2
P
3
+ ±p*H ±^ p J 5
0
+
+ B + ->- D + ^ F + ^ H 2
J
/ +
1.814,40Ο·
7
. . . Τ
+ iD + ^F+^H
+ ^ J + - .
Derivation of Finite Difference Approximations
(4.3.7)
M
r ±
i
i i +
, + u
_ , = 2u + (\±2p)B
r ± l - i
+(
+ (±±p
+
155
p )D 2
I
I60 — 360
+ ··· , Incidentally, if (4.3.1) had been written as where F,... are k u ,— u — α « , α > 0 , the same results would have occurred with the one change that ah = pk . By the direct use of Taylor series or by combining the expansions above, we can develop finite difference approximations for the model parabolic P D E (4.3.1). Further, the local truncation error is immediately available. Next we calculate some of the possible combinations. 6
YyyYrr
x
ν ν
2
4.3.1
The Classic Explicit Approximation
Let us multiply (4.3.5) by ρ and subtract the result from (4.3.4) (with the plus subscript). This yields (4.3.8)
«,+ ι . = ( ί - 2 ρ ) « , . + ρ ( κ , . , + « , , , _ , ) ί
ί
ί +
+ p{p-i)l>
+ lp(p -i- )F+
i
2
2
0
••• •
Thus, if we use this finite difference form, referred to as the classic explicit form, (4.3.9)
«
f + l
J
=(l-2p)« , f
s
+ p{u , i r J+
+ K ,,_,) r
[classicexplicit]
the local truncation error will have as its major or principal part \p(p — l)D. But since p = h/k , it follows that 2
(4.3.10) This is essentially the result obtained in (2.1.24) and we say that (4.3.9) is 0(h + hk ) or 0(h + k ) or in a simpler notation 0 ( 1 , 2 ) . The reader can see that the classic explicit method connects mesh points on the (r, s) grid which have the form 2
2
2
o
—
o
—
ο
156
Parabolic Partial Differential Equations
This computational molecule clearly shows that «,+ .,,, the shaded sphere, can be calculated from the lower three points κ , , , - ι , u , and u . We follow the convention of attaching such a symbolic diagram next to each new finite difference approximation developed. Note that if we choose the special case ρ = I in (4.3.8), then (4.3.9) still holds but the local truncation error has a principal part which is r
ip(o -±)F
=
2
s
r
h F=ih>u - iohk u
s + ]
6
1
i
6v )
(>r
Thus, if ρ = | , the classic explicit approximation to the model parabolic P D E is 0(h? + hk ) or 0(h + k ) or 0 ( 2 , 4 ) . All these results could have been derived directly from Taylor series expansions around u . We illustrate the procedure for the case o (4.3.9) as 4
2
4
r
r
s
«r+l. -(l- p)"r. 2
-
J
J
p["r, +l
h + hu + γ υ
r s
x
J
A + -^u 3
2
u
"r. -|]
+
i
χ
χ
+ •
xxx
k
k
2
u,,
+ ku
s
+ -j-u
y
yy
u , - ku + y « „ s
3
+ ~£U
+
vry
y« ,.+
y
n
Collecting terms on the right-hand side, we find that U
r+l, -( - P) r.sl 2
P( r.s+\
U
= h{u
+
U
S
- u
x
) + {-h u
U
- -h_hk u
2
r.s-\)
+
2
xx
4v
Because u — u = 0 , we see that for u = u we have a local truncation error identical to that achieved for (4.3.9). W e could have approached this in the manner x
(4.3.H)
yy
xx
u -u=0>
4
r+
x
l,j
4y
u
κ r,j
_ L ,
r.s+
—
2u
u
+
, r,5—I
r,s
I
with the first difference approximation on the right being O(h) and the second 0(k ). A simple manipulation of the right-hand side yields (4.3.9) directly. For future reference, we could use the notation 2
(4.3.l2a) (4.3.12b)
(e w)r 2
+l, =«r+l, +l i
i
_
2
M
r+l,
i
+
«r+l, -l J
Derivation of Finite Difference Approximations
157
and write (4.3.11) as
h 4.3.2
K
2
The DuFort-Frankel Explicit Approximation
If we multiply (4.3.3) by (1 + 2p), (4.3.5) by ( - 2 p ) , and (4.3.4) with the minus subscript sign by — (1 - 2 p ) and add all three, there results (4.3.13)
(l+2p)
M r + )
, =2p(u . J
r
J + 1
+ «,,,_,)
+ (l-2p)w _, . r
s
[DuFort-Frankel]
- o
Ο r,s- 1
r,i + 1
ό
r-
1,i
This is termed the explicit D u F o r t - F r a n k e l approximation and has a local truncation error
(^-iMf-ife)* Replacing ρ, Z), and F as before, we find that the D u F o r t - F r a n k e l finite difference approximation has a local error of 0 ( Λ + hk + h /k ) or 0(h + k + h /k ) or 0 ( 2 , 2 , 2 / 2 ) . Note that this involves the ratio of h/k as well as the usual independent terms for h and k. If we had used the Taylor series expansion directly, we would have found the equivalent form of the local truncation error as 2
3
2
2
3
2
2h
2
^xx
This is identical to the first equation for the error with u 3x
U
=
2
2
% ·
xx
= u„ t
and
158
Parabolic Partial Differential Equations
Equation (4.3.13) may also be developed through the approximation r,s-\
2h
which is not directly obvious. What has been done is to replace u in (S u/k ) (an approximation for u ) by the arithmetic average of (u , + M , - ! . , ) . Alternatively, one may derive the D u F o r t - F r a n k e l approximation by replacing u by a second order accurate approximation centered in χ and in y. Thus r
2
s
2
r
s
yy
r+
s
vv
(4.3.14)
"Γ.»+|-2« ,, + « ,,-|
„,-,,„= "'•"·' " ' - · ' 2Λ
γ
γ
k
2
In this form one can more easily see why the truncation error has a term h /k . Also, one should note that the D u F o r t - F r a n k e l approximation has a smaller error ( f t ) than the classic explicit approximation with ρ Φ \. 2
2
2
4.3.3
The Richardson Explicit Approximation
Another explicit finite difference approximation which is more accurate than the classic explicit is due to Richardson and is called the leapfrog approximation. It may be written as (4.3.15) u
r-\.s
+ " , . i - i ] + 4pMr s = 0
~~2p[" , i r J+
Ο r,
s
-
1
[Richardson explicit]
•γτ·—Q, r, s +
I
ό
r -
l.s
1
Derivation of Finite Difference Approximations
159
and follows from a substitution of the form (4.3.16)
U
x
- u
y
y
- 0 -
^
—
•
2
Equation (4.3.15) is 0(h + k ) or 0 ( 2 , 2 ) . We do not develop the explicit local truncation error because, as we shall show later, (4.3.15) is unconditionally unstable and should not be used in any calculation. It is, however, important to note that the D u F o r t - F r a n k e l and the Richardson approximations differ only in the manner in which u is treated in the finite difference representation for u . This difference turns out to be enough to make the first scheme stable and the second unstable; it also demonstrates that considerable care must be used to obtain a valid (computable) finite difference approximation. 2
2
r
s
yv
4.3.4
The Backwards Implicit Approximation
The three finite difference approximations to the model parabolic P D E that have already been presented are explicit in form. The term "explicit" refers to the fact that only one value of u on the line r +1 occurs in the approximation (i.e., K | j of the computational molecule). In contrast, there are a number of implicit formulations in which two or more values of u appear on the line r + 1 (i.e., u , u, 1 , u 1 - ). As we shall see later, the difference between an explicit and an implicit approximation is quite important computationally. For the moment, we merely derive a few such implicit approximations together with their local truncation errors and save any discussion on computation until a later section. r +
r + l
s
r+
i +
r+
s x
The backwards implicit approximation is given by the equation (4.3.17) (1 + 2 p ) u , , - p( u , r +
r+
ο
, , + u +
r +
—
,_,) = u . r
ο
—
r + 1, j - 1
[r+1,s
[backwards implicit]
s
m r+1,s+1
0
r. s
Following either procedure outlined previously, it is easily shown that the local truncation error for (4.3.17) is
-H' i) =-il> rK +
B
,+1
160
Parabolic Partial Differential Equations
In addition, we could have written the truncation error as
with all the various forms being completely equivalent for u = u . Obviously, the backwards implicit approximation is 0 ( A + hk ) or 0 ( A + k ) or 0 ( 1 , 2 ) . Equation (4.3.17) can b e developed from x
— n—
U
">
x
_
—
«
r
r+l,s
~
U
h
r,s
yv
2
2
"r-H.j+l ~ ^
U
2
r+l.s +
"r+l.j-l
2
k
+ l . , - » r . M
( ^
~T
h
2
« ) , , ;—r +
\,S.
r
k
c
2
It can be seen that (4.3.17) is obtained by centering the approximation for u at ( r + 1, s) rather than at (r, s). 4.3.5
yy
The Crank-Nicolson Implicit Approximation
The well-known C r a n k - N i c o l s o n implicit approximation is written as (4.3.18)
2(p + l ) «
f
+
l
= 2(1 — p)u
-
I
r
-p(K
s
R+
V
+ p(u
+
I
riJ+!
o
J
+
+ K, , . ^ )
1
+
1
+ u _,). r
[Crank-Nicolson implicit]
s
#
1 , 1 - 1
—
R, Ι -
i
Θ
ο
1
—
ο
R, Ι
R, Ί + 1
The local truncation error can be developed for (4.3.18) as before. The first term is — ( M / 1 2 ) w , while a term abstracted from « y is - ( A / 6 ) u . . Thus the approximation is 0 ( A + hk ) or 0 ( A + fc ) or 0 ( 2 , 2 ) . This, of course, holds only for the model parabolic P D E . Equation (4.3.18) can b e obtained through the approximation 2
3
4 y
6
3
(4.3.19)
2
2
2
« , - 1 1 ^ = 0 = - ^
2A:
2
6 l
Derivation of Finite Difference Approximations
161
In (4.3.19) u is replaced by the average of (S u) Jk and (S u) /k ; that is, the approximation is centered midway between the r and r +1 lines. This accounts for the increased accuracy over the classic explicit and the backwards implicit approximations, which are centered at r and r + 1, respectively. There is one further interesting feature of the Crank-Nicolson approximation. If we combine the classic explicit approximation (4.3.9) a n d the backwards implicit approximation (4.3.17) in tandem, we obtain the C r a n k Nicolson approximation (4.3.18). Thus one would combine the following three steps: 2
vy
2
2
r
2
r+Us
1.
Write classic explicit over the interval r to r +1.
2.
Write backwards implicit over interval r + 1 to r + 2.
3.
Generate Crank-Nicolson for interval r to r + 2 by substitution of (1) into (2). 4.3.6
The Variable-Weighted Implicit Approximation
We have already shown that finite difference approximations for the derivative u in the model parabolic P D E can be centered at (.-, s), [(8 u) /k ] in (4.3.9), at ( r + 1 , j ) , \(8 u) Jk ] in (4.3.17), and at the arithmetic average of (r + 1, s) and (r, s), [((δ u j u ) ) / 2 k ] in (4.3.18). A generalization of this concept would weight ( δ u) and ( δ u) by a factor of θ and (1 - 0), respectively, with 0 θ =£ 1. In other words, we could write 2
yy
2
r
2
s
2
r+x
2
2
r
+
r
s
2
2
r + U s
(4.3.20)
u - =0=
r
s
h
x Uyy
— [9(8 u) + +(\-e)(S u) J, 2
0<θ<\
2
r
Ks
r
or expanding the right-hand side, (4.3.21)
(l+2pi)u
=p (] ,, = p(l-e)[u,,,
r + 1 < 1
+
l
+
u ^.] r
+ [l-2p(l-*)K , tf
O<0<1. [variable-weight implicit]
θ
r+
r+ 1 , j +
1 . 1 - 1
Ο
Ο
Ο
1
162
Parabolic Partial Differential Equations
In effect, we have introduced another parameter θ which can be adjusted along with ρ to yield various finite difference approximations with different local truncation errors. The special cases 0 = 0 , θ-{, and 0 = 1 yield (4.3.9), (4.3.18), and (4.3.17), respectively; thus (4.3.21) contains the classic explicit, Crank-Nicolson, and backwards implicit approximations as special cases. The local truncation error can be developed for this case. In rough form, it can be written as (4.3.22)
12
D
Ρ 360
12
With ρ and θ both free, this yields an approximation of 0(h + hk ) or 0(h + k ) or 0 ( 1 , 2 ) . Of course, for θ = j , (4.3.22) yields the same results as the Crank-Nicolson approximation. However, if we select 2
2
2
1 12p
Θ-
(4.3.23)
the first term in (4.3.22) disappears and the result is 0 ( 2 , 4 ) . The finite difference approximation becomes (4.3.24)
(5+6p)u
r +
L s
+(J - 3 χ « Ρ
Γ +
= (5-6p)«,. +(i + 3pXH 5
u ,,,_,)
,+
r i J + 1
r+
+
M r
._ ) 1
1 12p
Finally, if we let ρ = 1 /γ/20 , further cancellation in the truncation error form 0(k ). occurs; the result is We could continue this procedure of specifying approximations for the model parabolic P D E and then determining the corresponding truncation error employing additional levels of r and more than six node points. Later we tabulate many of the known model approximations together with certain properties of each that we have not yet specified. In addition, we consider the model parabolic P D E in cylindrical and spherical coordinates and the case of two or more spatial derivatives. Finally, we point out that all the material in this section has been developed without use or specification of initial or boundary conditions. T h u s the results and formulas hold in any domain where the model parabolic P D E is valid. 6
4.4
C O N S I S T E N C Y AND C O N V E R G E N C E
In this section we analyze the concepts of consistency and convergence of the finite difference approximations and in the next section that of stability. We assume in this development that the model parabolic P D E is well posed.
Consistency and Convergence
163
In broad terms we may say that stability (computational) calls for the boundedness of all perturbations in a computed solution. In other words, when the magnitudes of perturbations in initial data are made arbitrarily small as h, k,... - * 0 , the resulting perturbations in the computed solution must vanish rather than grow. In such a case computed solutions based upon a consistent difference approximation converge to the solution of the model parabolic P D E . That is, stability and consistency imply convergence as defined by Lax. Stated in another fashion, the success of obtaining a convergent numerical solution based upon a particular finite difference approximation lies in the consistency of the finite difference form with the well-posed model P D E and the stability of the finite difference form. As a result, these concepts are of major importance in assessing the viability of any finite difference approximation. Consistency has to d o with the assurance that, as the finite difference mesh is refined (i.e., as h, k,..., ->0), the truncation errors go to zero. Alternatively, one can say that the finite difference model approximates the P D E desired and not some other P D E . As an example, consider the classic explicit finite difference form. Using (4.3.8), we can develop the approximate relationship (4.4.D
κ - «ο-"--"-Γ+ "- " :r — +i
2
+M
where once again we have used ρ-h/k . But since D = k*u , side, which is the local truncation error, can be written 1
4r
Λ Truncation error = — u
iy
the right-hand
1 , , — —k w , 4l
or equivalently 2^
x x
12
'
It is apparent that this truncation error goes to zero as A, k -»0 no matter how this limit is taken. Thus the classic explicit finite difference approximation is consistent with the model parabolic P D E . Of course, to be complete we need to say the same about the boundary conditions. The analysis is exactly the same when the boundary conditions are replaced (if necessary) with finite difference approximations. We would now say that the finite difference problem is consistent with the model parabolic P D E problem. Note, incidentally, that if a term k<j> is added to the finite difference approximation where φ is bounded as A,/c->0, then the resulting difference
164
Parabolic Partial Differential Equations
approximation remains consistent; thus there are an infinite number of consistent approximations to the P D E . Hence this property alone cannot suffice to discriminate among various finite difference approximations. Almost all finite difference approximations presented in this chapter are consistent with the model parabolic P D E . However, we must differentiate between those approximations that are unconditionally consistent and those which are conditionally consistent. T h e classic explicit approximation is unconditionally consistent since no special relationship between A a n d k need be maintained to eliminate the error term as A,fc-»0. Although this is the situation in most cases, there are some exceptions. Consider, for example, the D u F o r t - F r a n k e l approximation, (4.3.13). The local truncation error has the form (4.4.2)
2
xx'
The consistency of this form is dependent on how h,k-*0. If A goes to zero faster than k, the last term in (4.4.2) goes to zero as well as the other two terms. In this case, the D u F o r t - F r a n k e l approximation is consistent with the model parabolic P D E . If, however, h/k — c—constant, and A and k go t o zero at the same rate, then the approximation is consistent with the model hyperbolic PDE, (4.4.3) This result could be inferred directly from (4.3.14). Thus the D u F o r t - F r a n k e l finite difference approximation is conditionally consistent. The same phenomenon, a conditionally consistent approximation, holds for the Saul'yev scheme shown later (Birtwistle, 1968). However, we emphasize that the vast majority of approximations are unconditionally consistent. A finite difference approximation is said to be convergent if ΙΙ«Γ.,-Κ,.,ΙΙ-ό
as h,k,... -»0. Here II · II is some suitable norm between the exact value of Q(x, y ) and the computed value u at the fixed point r, 5. In principle, this assures us that the difference approximation can be made an arbitrarily accurate approximation t o the exact solution by refining the mesh. It is possible in many cases to derive estimates of the form r
(4.4.4)
ΙΙδ
Γ ι 1
s
-«,,,ΙΙ<κ(ΙΙΤ.Ε.||),
where T.E. is the truncation error for the particular finite difference approximation. If κ is independent of A, k,..., then (4.4.4) specifies an unconditionally
Consistency and Convergence
16S
convergent finite difference approximation; if κ is a function of A, k,..., then (4.4.4) specifies a conditionally convergent approximation with a requirement needed on the values of A, k, Of course, we should also include the boundary condition approximations in our analysis. We would then speak of unconditionally and conditionally convergent finite difference problems. In such a case, the right-hand side of (4.4.4) becomes κ(||Τ.Ε.|| + ||φ||), where
where t represents the difference (or errors) between the exact solution of the P D E , U , and the solution of the finite difference approximation, u , at the mesh point ( r , s). As an example, for the model parabolic P D E and the classic explicit approximation, it follows from (4.3.8) that r
s
r s
r
e =(l-2 )e _
(4.4.5)
r+is
P
r
+ p(e
s
+ e _)
rs+x
rs
+ 0(h
x
2
+
s
hk ). 2
N o w let us impose a constraint on the values of A and k:
Equation (4.4.5) is a linear difference equation for e which we could solve to generate ε, ; fortunately, we d o not need to explicitly carry out this solution. Instead, we turn to a maximum principle type of analysis. In (4.4.5) we note that the three coefficients, (1 - 2 p ) , p, and ρ sum to 1 for any choice of p; further, they are all nonnegative if 0 < p « s \ . Thus ε _ is a weighted average with positive coefficients of the other error terms and it cannot fall below the minimum or above the maximum of the other error terms. Further, we adopt the notation that if r
s
s
Γ + ι
F(x) =
t
0(G(x)),
then \F(x)\
|
£ r + 1
, |<(l-2p)|e J
f i i
| + p|e
| + p | 6 , _ | + /<(A + AA: ). 2
r j + 1
f
J
2
1
Here A is the upper bound of the derivatives in the explicit form of the local
Parabolic Partial Differential Equations
166
truncation error term. Finally, we define E as the modulus of the maximum error along the r t h row in the x-coordinate direction. N o w we can write (4.4.6) as r
E ^E
(4.4.7)
r+
+ A(h
r
+
2
hk ) 2
since the subscript s has been eliminated. But if we assume that the initial line (r = 0 ) has zero error between the true and approximate solutions,
we may solve (4.4.7) in a recursive fashion. Thus £ , < £ 0 + A(h £ <£,+
+
2
A(h
2
<2A(h
+
2
£,< rA(h
2
2
hk ) 2
+
hk ) 2
hk ) 2
+ hk ) 2
= x A{h r
+
k) 2
where x — rh. But when k-Ό, h —0 also since k p = h and thus E -*0 as h -*0. Thus the classic explicit approximation is convergent if 0 < ρ < {. When ρ > ΐ , this approach cannot be used, and instead we must actually solve (4.4.5). The result (details not given here) is that e becomes unbounded as k -»0. Thus the classic explicit approximation is conditionally convergent. We could continue to analyze the other finite difference approximations in Section 4.3, but this is a long and tedious procedure. We would find that the implicit approximations such as the backwards implicit and the C r a n k Nicolson are unconditionally convergent (i.e., they are convergent for any values of p). Because the results obtained through such an analysis correspond to those obtained for stability, which is discussed in the next section, we do not pursue the discussion of convergence further at this time. 2
r
r
r
4.5
s
STABILITY
In Section 4.4 we investigated some of the features of consistent and convergent finite difference approximations as they related to the model parabolic
Stability
167
P D E . Now we consider the stability of these approximations. This feature of numerical analysis has basically nothing to d o with the P D E but rather concerns the unstable growth or stable decay of errors in the arithmetic operations needed to solve the finite difference equations themselves. Although there is a theoretically exact solution to any one of the finite difference approximations, because of round-off error in the computer, errors are committed as the explicit calculation is carried out. Whether these errors amplify or decay characterizes the stability property of the scheme. If an approximation is stable, then we are assured that computational errors can, in principle, be made arbitrarily small. Once again, we encounter the terms "conditional" and "unconditional," but now they refer to the stability of a particular finite difference approximation. As before, a conditionally stable scheme implies that there are restrictive bounds on the mesh widths, A, above which the numerical solution is unstable and below which the solution is stable. An unconditionally stable algorithm has no such bounds. Of course, an unconditionally unstable algorithm has bounds of zero, and no meaningful computation can be carried out with this algorithm. We find, for example, that most explicit finite difference approximations are conditionally stable, whereas most implicit approximations are unconditionally stable. However, this is not always true and many workers have developed unconditionally stable explicit algorithms. The D u F o r t - F r a n k e l approximation, (4.3.13), is a classic example in which the bound on A , k , . . . , is p < o o . Thus any value of A and k can theoretically be used and errors will not propagate as the calculation proceeds. As a result one may use a large A to advance the calculation and thereby save computing time. By contrast, the classic explicit scheme has a bound of ρ < { and the restriction on A can be particularly severe where an accurate representation in y (small k) is required. Yet, at the same time, stable explicit methods such as D u F o r t - F r a n k e l may have inherent limitations due to conditional consistency. If h/k^\.0, the computed solution may involve waves associated with the hyperbolic character of the P D E (4.4.3), with which it is consistent. Further, the imposition of N e u m a n n or second-type boundary conditions will automatically cause the D u F o r t - F r a n k e l scheme to become unstable. Thus the question of stability or instability is only one of the factors that must be carefully analyzed in ascertaining the viability of a finite difference approximation. Nevertheless, stability is probably the most pressing problem in any algorithm since it is a necessary rather than sufficient condition for accuracy. It is generally the first one to be encountered in any attempt to obtain a solution. Accuracy and computational efficiency follow after one is assured that a meaningful computation can be carried out successfully. Moreover, experience indicates that an unstable scheme is not convergent (the classic explicit approximation is a prime example for the case ρ > j ) . The formal statement of the relationship between stability and convergence is known as the Lax
168
Parabolic Partial Differential Equations
equivalence theorem, which reads:*
Given a properly posed initial or boundary value parabolic P D E and a finite difference approximation to it that satisfies the consistency condition, then stability is the necessary and sufficient condition for convergence.
O n e should keep in mind that the analysis above assumes a model P D E that is linear and has only constant coefficients. This type of analysis is extendable to more complex equations. 4.5.1
Heuristic Stability
Because we have qualitatively defined stability with reference to whether an error (say round-off) made anywhere in the calculation is damped (stability) or grows (instability), a n obvious investigative procedure is " t o try it out." By this we refer to the solution of the finite difference approximation for a single isolated error in one number and the observation of the behavior of this error. This approach we refer to as heuristic stability analysis since it yields n o information, unless an exhaustive search is made, on possible bounds on the stability. T o illustrate the procedure we first choose the classic explicit approximation (4.3.9)
u
r+[
s
=(\-2p)u,
+ p(u,, +
s
«,,,-•)
J+1
and investigate the cases p = \ and p = 1.0. For these values of ρ (4.3.9) (4.5.1)
u
(4-5.2)
«,+ I.J = « , . , + ! +
r
+
U
s
= %u , ri
+
l
(P = i)
+ « , _i) r
«
4
,
.
,
-
•
(
P
= 10).
We then set up a grid exactly like that in Figure 4 . 1 , specify initial and boundary conditions and introduce a single error ε at one of the mesh points. Using (4.5.1) or (4.5.2), we compute u to see what happens t o t h e error ε. As an example in Figure 4.2, we show the case where u = 0 , u = 0 (the initial and boundary conditions are all zero) a n d introduce the error ε at one of the initial conditions. It is important t o understand that once ρ is fixed, the choice of k dictates a corresponding value of h. As can be seen from Figure 4.2 when ρ = \ , the error ε damps itself out; when ρ = 1.0, the error oscillates in sign and grows in magnitude. Thus we would say that the classic explicit approximation t o the model parabolic P D E is stable when ρ = { but unstable r
s
r 0
0
s
'Note that Leutert and O'Brien (1952) have shown, using a particular example, that an unstable approximation may converge mathematically for certain initial conditions.
169
Stability
0.375€
0.25€
'ι
"}h
<>
k
<>
0.256
> i•
<•
1»
<
0.375€
—1
•
i
<•
i
0.5€
<>
0.375 € 0.25€
O.S€ 0.5€
<
,1
,
0.25€
i.0€
1
ι
y (P--W2)
H6.0€
9.oe F
1
J
'
i
i
•
-3.0€
Jk
1
1 \
>
4
<»
<
| .
f
^
Λ 19
-7.06
-2.0€
Ί.06 ιΡ
( •
6.0€ 1
3.0€
9.0€
-16.0€
o . o e • I9
Ρ
k
,
\
6.0€
-2.0€
|
-3.0€
I
- r o e )
t
t.06
»
1
»
t.0€
i>
I
t.0€
k >*
1
'
1
< P
1
|
k
4»
(b>
k
'
^ k
1
• r o e
f
C
>—»-
ip-.\)
Figure 4.2. Heuristic stability for ( a ) p = j , and (b) ρ = 1.0 in classic explicit approximation. when ρ = 1.0. T h e approximation is, in fact, conditionally stable, but to establish where the actual bound on ρ occurs between stability a n d instability would require additional results for { < ρ < 1.0. Later we see that the bound is 0 < p * £ j . Incidentally, if ε were introduced on the boundary instead of as an initial condition, the same qualitative result would be determined. Finally, we should mention that depending on the number of decimals carried in a calculation and the size of the error, there may be a delay in an unstable process before one can see the oscillation a n d error buildup. But sooner or later, the unstable nature of the calculation will reveal itself. Now let us turn to the Richardson explicit approximation, (4.3.15), «,+ ι., = « , - ! . , + 2 f > ( « , . , + 1 + « , . , - i ) - 4 p i * , .
(4.3.15)
r
J
For the case ρ = 2 » this becomes (4.5.3)
u +i., r
=
u
r-i.,
+
u
r . i + \
+
u
r . s - i - 2
u
, . s
(P = i)-
170
Parabolic Partial Differential Equations -6.0€
17.0€
_4 )
1.06
) (
-24.0€
I
-6.oe i
-4.06
>
i
ι
^
1
1>
(
47.0 € *
^ i.oe -2.0€ • ^_ ^ 4.0€"
1
Figure 43.
-4.0€
—I
j
ί
4.0€
4.0€ *
1
•
<
11
1
4
1
y
Heuristic stability for Richardson explicit approximation with ρ = \.
In order to use (4.5.3) at the r + 1 line, it is necessary to have data on both the r and r — 1 lines; thus we assume that the initial line is all zero, u = 0 , and that all u, = 0 except for one value of ε. Now we see how this error ε propagates up into the full (r, s) space. Figure 4.3 shows such a calculation and it is obvious that the algorithm is unstable for p = j . In fact, further calculations of this type show that the Richardson explicit approximation is unstable for any value of p. Thus, even though the Richardson explicit, 0 ( 2 , 2 ) , is more accurate than the classic explicit, 0(1,2), the unstable character of the first negates its usefulness completely. We could exhaustively treat all the other finite difference approximations of Section 4.3, but this would gain us little. Rather, we turn to two other methods that can be used to develop stability bounds. 0
s
s
4.5.2
Von Neumann Stability
Perhaps the most widely used procedure for determining the stability (or instability) of a finite difference approximation is called von N e u m a n n stability. In essence, it introduces an initial line of errors as represented by a finite Fourier series and considers the growth (or decay) of these errors as χ increases. The method applies, in a theoretical sense, only to pure initial value problems with periodic initial data; as such it neglects completely the influence of boundary conditions (see Section 4.5.3). Further, it applies only to linear, constant coefficient, finite difference approximations (to this point we have only considered such approximations). If the linearization condition is not met, some form of local linearization is necessary. Because of the linearity, each Fourier component can be treated separately and superposition used to add all other components. It is of practical interest that the von N e u m a n n approach always yields a necessary condition for stability and in many cases this is also a sufficient condition. For ease in discussion, we first consider any finite difference approximation in which κ, is a scalar quantity. N o w we introduce a harmonic decomposition s
Stability
171
of the error at the grid points on a given χ level
£(ν) = Σ Δ
(4.5.4)
/
*Λ
j
where J is equal to the number of mesh points on the χ line, |/?,·| is the frequency of the error, and / is the complex number Because of linearity, we need only consider one of these / terms and thus only need e' (where β is real). That is, each harmonic grows or decays separately of others. Now we write the solution of the finite difference approximation in a separable form as Py
E(x,y)~e e't> ,
(4.5.5)
yx
v
where γ = -γ(β) is, in general, complex. N o t e that the solution at χ = 0 equals the error introduced at x=0. But we see from (4.5.5) that in order for the original error not to grow as χ increases, |e
Y J t
|^l
for all y . Alternatively, we may write this condition for stability as | e * | < l.
(4.5.6a)
[von Neumann condition]
Y
In general, one defines { Ξ ^ Ξ constraint (4.5.6a) becomes
the amplification factor and thus the stability
(4.5.6b)
|£|<1.
To illustrate the use of (4.5.6b) we shall now consider those finite difference approximations for the model parabolic P D E developed in Section 4.3. We start with the classic explicit, (4.3.9), which we write in error form (the error is assumed to satisfy the difference approximation) (4.5.7a)
E
r+Us
= (l - 2 p ) £ . , + p ( £ . r
r
J + l
+ £,.,_,).
Substitution of (4.5.5) in the form (4.5.7b) into (4.5.7a) yields
E
r% s
= ey e ^ rh
i
sk
= f V ** 3
172
Parabolic Partial Differential Equations
Cancellation of common terms yields i = ( l - 2 p ) + p[e** + e-**]. Now, using the trigonometric identity
and the definition e'
pk
+e
lfik
= 2 c o s fik, there results
€= 1
2p(l-cos/3fc)
or (4.5.8)
€= 1
Thus we have developed an expression for the amplification factor ζ for the classic explicit approximation. We now merely need to see what requirements are involved such that \ζ\<\ holds for all βk. Thus we need to consider the conditions whereby
We see immediately that 1.
The upper bound -I-1 is satisfied automatically since ρ > 0 .
2.
For 0 < ξ, the solution (4.5.7b) decays steadily.
3.
For — Κ ξ < 0 , the solution (4.5.7b) decays but oscillates.
4.
For £ < — 1, the solution (4.5.7b) oscillates with increasing amplitude. This is an unstable condition.
Thus, for stability, -Kl-4psin ^ 2
or
Noting the behavior of sin (/Mr/2) for any choice of 0k, we see that in the 2
Stability
worst instance [i.e., ύη\βΙί/2)=
173
1]
Thus the classic explicit finite difference approximation is conditionally stable with a stability bound of (4.5.9)
0
[classic explicit]
If we further desired no oscillation in the stable behavior,
£= l-4psin 4^0 2
or (4.5.10)
0
2(l-cos/3*)
For the D u F o r t - F r a n k e l approximation, (4.3.13), the same procedure can be used. T h e development is slightly more complex since three r levels, r +1, r, and r - 1 , are involved rather than merely two levels, as in the previous case. The amplification factor is ^_
2pcosfik±\l(2pcosfikf
-4p + l 2
l+2p or
(4.5.11)
2 p c o s fik±]lΊ-4p £= — — ^
sin fik — .
2
2
[DuFort-Frankel]
Consideration of the magnitude of the term under the square-root sign shows that |£|*£l, and therefore D u F o r t - F r a n k e l approximation is unconditionally stable. For the Richardson approximation, u
(4.3.15)
r + U s
-«,_,,, =2ρ[«
Λ
i + l
+ u, _ , ] - 4 ρ κ ί
Γ
we may substitute (4.5.5) to yield £ r + \eiflsk
_
γ - \ tf,k e
_
2p[£'
eil>(,+
" * + £ >K'-')*] re
_4ρξ' <β'ΐ< β
Canceling out the e'** term and using the same identities mentioned above k
174
Parabolic Partial Differential Equations
there results Γ
+ . _
Γ
- 1
r -r~ + ,
=
, =
2
p
£
/
-r8psin
{
-
2
}
2
2 "
But this is a difference equation, for which we can write | +8p|sin ^-l=0 2
2
and the roots are (4.5.12)
ξ,
= -4psin ^±^16p sin ^ + l . 2
2
2
[Richardson]
4
Calling R = 4p sin ( fik / 2 ) , we may now write 2
£,, = - Λ ± / ΐ + Λ
2
2
and note that ξ, = — 1 / ξ and £, + ξ — —2R. It is now easily verified that for that satisfy the constraint any choice of β and ρ there are n o values of |£, | < 1 . Thus the Richardson approximation is unconditionally unstable. In spite of its attractive truncation error, it cannot be used for a meaningful computation. 2
2
2
2
Next, we turn to the backwards implicit approximation, (4.3.17), (4.3.17)
0+2Ρ)Η
Γ +
,,,-Ρ(
M, ,,+ • + «,+ !.,-•)=«,.,· +1
Substituting as before and canceling common terms, we obtain (l+2p)|-p|(e'^ + e~'^)=l. This expression may be rewritten £[l+2p(l-cos/3A:)] = l or l+4psin
2
)8* ^
= 1.
Thus the amplification factor is (4.5.13)
ί =
l+4psin
JJT-. j
[backwards implicit]
Stability
175
It is apparent from (4.5.13) that | | | < 1 for all values of p, a n d therefore the backwards implicit approximation is unconditionally stable. The C r a n k - N i c o l s o n approximation, (4.3.18), (4.3.18)
2(P +
1 K + I . , - P ( « , I.,+ I+ «,+ !.,-•) +
= 2 ( l - p ) « _ + p(u ,,+ r
s
,+
r
«,.,_,)
can be analyzed for stability in the same manner. In fact, one obtains
-2 (r+r')sin ^=r -r 2
+l
P
or
r (l+2psin ^)=r(l-2psin ^). 2
+ ,
2
Thus it follows that the amplification factor is l-2psin ^ 2
(4.5.14)
£=
[Crank-Nicolson]
l+2psin ^ 2
For any value of ρ and we have | | | < 1 and thus the approximation is unconditionally stable. Finally in this section we turn to the generalized weighted implicit approximation, (4.3.21), (4.3.21)
(l+2pe)u
r + l i J
= p(l-*)[ii ., r
+
P*[«r .., +
+
+ 1
+ «„_,]
i+
«r ..,-il + +
[l-2p(l-*)]« .,. r
Substituting (4.5.7b) and canceling terms as before, we obtain the following expression for the amplification factor: l-4p(l-0)sin ^ ξ= — l+4p0sin ^ 2
(4.5.15)
.
[weighted implicit]
2
This amplification factor will be bounded, \ξ\< 1, for all /3/t if (4.5.16)
p(l-20)^.
Parabolic Partial Differential Equations
176
From this, we may note the following constraints: (i)
0=0,
(")
0 < i2
as in classic explicit >
2(1-20)
(iii)
ρ < oo; always stable as in backwards implicit a n d Crank-Nicolson
(iv)
-^(4.3.23),
p =
6(1-20) '
Condition (iv) indicates that (4.3.24) is unconditionally stable. Our discussion of stability and consistency can now be summarized. Each of the explicit approximations has a deficiency in terms of conditional stability or conditional consistency. In contrast, each implicit approximation is unconditionally stable and consistent. This seems to be true in all cases. All of the discussion on von N e u m a n n stability above assumed that u , was a scalar quantity. Yet in many problems there will be more than one dependent variable and the analysis must be generalized. N o t e that this has nothing to do with the number of independent variables but only the dependent variables. Further, we intimated some problems with the analysis of the D u F o r t - F r a n k e l and Richardson approximations; these problems can be circumvented using the analysis to follow. We now consider the vector function {u) , in which there are as many elements as dependent variables. Following the previous concepts, we now introduce the von N e u m a n n series in the form r
r
s
sk
into the system of difference approximations. Canceling the common factors, there results
[Q]l{») lM) r+
=
[Q\o{u)rM)-
Here [Q] and [Q\ are matrix operators depending on the constant coefficients of the finite difference approximations and the increments h and k. On the assumption that [(?], can be inverted (nonsingular), we may write x
(4.5.17)
0
{«)r
+
Ufii) =
[G]{u} Mh r
where [(/] = [<2]Γ'[£?1ο is termed the amplification matrix. [G] is a square matrix of size equal to the number of dependent variables and describes the transition or evolution of the Fourier components. In order for the Fourier
Stability
177
components to be bounded, it follows from n«}rj<\\[G]\\ \\{u) j, r
0
where { « }
0 s
= { « } ( # / ) , that
ii[G]ir be bounded. But since \\[G]\\'>R ([G]), r
where R([G]) is the spectral radius or largest eigenvalue λ of [G], the end result is that all the eigenvalues λ, of the amplification matrix [G] must be bounded by (4.5.18)
|λ,|<1.
Equation (4.5.18) is the von Neumann stability (necessary) condition for more than one dependent variable. T o illustrate the use of (4.5.18), let us return to Richardson's approximation,
«
i , = 2 p ( 5 « ) . + w2
r +
J
r
We define a new variable v (45.19)
r+x
s
«ι
Γ + ι
r
s
= u
r
I.J-
such that
s
.,=2ρ(« „),, + «,, 2
In vector form (4.5.19) becomes 2p(S u) ,
1
1
0
2
{«}r + i.,
:
r s
where {u} = {u , v } . Introducing the von N e u m a n n series and carrying out the cancellations yields T
r
or
s
r
s
r
S
Parabolic Partial Differential Equations
178
with -opsin γ
1
2
[G} =
The eigenvalues of [G] are λ, = — 4psin"
fik
16p sin ^ + l . 2
4
This merely confirms (4.5.12) and | λ | > 1. The D u F o r t - F r a n k e l approximation can be written in two-variable form exactly as above and an equivalent analysis yields (
l+2p
[G]
l~2p l+2p 0
cos fik
with eigenvalues 2p cosfiA: ± \J 1 - 4 p sin fik 2
2
l + 2p which conforms to (4.5.11). It is possible to further state that if [G] is normal (i.e., it commutes with its adjoint), then the von Neumann condition is sufficient as well as necessary. In addition, if the exact solution is thought to be an increasing exponential, a relaxed von N e u m a n n condition is given by l + ATi,
(4.5.20)
where Κ is a uniform bound for all Fourier modes. Thus if one considers the parabolic P D E u = u x
+ au,
a >0
and the approximation (classic explicit) 4
r + l.i
u
u r,s
^• r.j-M
—
2u
+M
r.s
r,s-
+ au
r
a simple analysis of the type carried out in this section yields the amplification
Stability
179
factor £ = l - 4 p s i n ^ + A, 2
where b — ha. Thus (4.5.20) is satisfied if ρ *£ 4.5.3
as before.
Matrix Stability
We wish now to examine some of the finite difference approximations of Section 4.3 via what is termed the matrix method. As distinct from the von N e u m a n n approach, the present method includes directly the boundary conditions. Thus we restate our model parabolic P D E as u =
(4.5.21)
u
x
yy
u = f(y),
x=Q,
O^y^l
a u + α,Μ,, = α , 0
v=0,
x>0
y = \,
x>0.
2
β ι* + β η 0
χ
= β,
ν
2
Further, the finite difference approximations take the form [A) {u)
(4.2.1)
0
r
+
X
=[A} {u) x
+
r
[A] {u} . + 2
r x
where [ Λ ] , [ / 4 ] , , [ / 1 ] , . . . are square matrices of order equal to the number of internal (not counting boundary values) mesh points on any line x. If [A] is diagonal, (4.2.1) represents an explicit approximation and if [A] is not diagonal, (4.2.1) represents an implicit approximation. It is assumed that [A] is nonsingular and thus [A]Q ' exists. Actually, for the approximations under consideration, [ Λ ] , [ / 1 ] , . . . =[0] and [Λ] =^[0] only for the Richardson and D u F o r t - F r a n k e l approximations (the lines r + 1, r, and r - 1 are involved). Thus we frequently need only [A] and [A] . Because stability is under investigation, (4.2.1) only involves the subscript r(x = rh), the direction in which we wish to examine error propagation. Most of our results are identical to those obtained from the von N e u m a n n approach, but in at least one case, we indicate how the boundary conditions change a stable approximation into an unstable one. The basic approach is straightforward to detail. Consider a matrix equation arising out of a finite difference discretization 0
2
0
0
0
3
4
2
Q
(4.5.22)
{u}
r
X
+
i
=
[B]{u} , r
180
Parabolic Partial Differential Equations
where [ # ] = [ Λ ] 'ΜΙι', then in terms of the error { £ } , 0
r
{E}
(4-5.23)
r
+
=
i
[B]{E} . r
In turn, it follows that
and for errors to die out, or be damped, it is necessary that (4.5.24)
ΙΙ[β]ΙΙ<1.
We merely need to put our approximations in the form of (4.5.22) or (4.5.23) and examine (4.5.24). We start our analysis with the classic explicit approximation, (4.3.9), (4.3.9)
«,+ •., = 0 - 2 Ρ ) Μ . , + Γ
Ρ(Μ,,
1
+
,
+
Ι Ι
Γ
. , _ Ι )
and specify the boundary conditions in (4.5.21) as κ=0,
>>=0
u=0,
y = l.
Actually, if these conditions are not equal to zero, but rather a constant or a variable, the analysis does not change. It merely adds a constant vector to the right-hand side of (4.5.22), and this is not used in the manipulations. If, however, α , , β , =^0, then flux conditions are imposed and this does influence the results, as we shall see shortly. Converting (4.3.9) into the form (4.5.22) or (4.5.23), we see that (4.5.25)
[A]
0
= [I];
!>],=[*]
=
1 — 2p
ρ
0
ρ
1 —2p
ρ
0
0
ρ
1 — 2p
ρ
or
[*] = M + p[U where [T] is the tridiagonal matrix {1, —2,1}. In essence, (4.5.24) is equivalent to considering the spectral radius of [B],R([B]), and requiring, for stability, that Λ ( [ Β ] ) < 1 . But since [T] (or [B]) is tridiagonal, it follows that the eigenvalues can be obtained easily. The eigenvalues of the tridiagonal matrix
Stability
181
{A, ο , c ) are \ = a + 2{Jbcco$(s-n/n)}, where s = 1,2,...,η - 1 is the number of internal mesh points along a line in the χ direction. Thus the eigenvalues of [B] are given by s
\
s
= 1 -2p{\
—
c
o
s
~ )·
Using, as before, the trigonometric identity 1—cosa = 2sin —, 2
we find that (4.5.26)
X = 1 —4psin
SIT
2n~
s
It is now evident that for stability ,2 St!
-Kl-4psin ^
j = l,2,...,n-l,
and this leads to the condition 0 <
P
< 1
Next we turn to the D u F o r t - F r a n k e l approximation, (4.3.13)
( l + 2 p K
+
l
i
I
= 2 p ( « , ,
1
+
+ «, _ ) +
I
> 1
1
+
[ ^ ]
( l - 2 p K _ , .
In terms of (4.2.1) we find that
[>*lo{«},-,,=Mli{«},
{ « } , - i .
2
where [A] =(\-2p)[I]
[Λ] = (1+2ρ)[/],
2
0
0 MI=2P
1 0 · · ·
1 0 0
1 0 · · · 1 0
1
0
Thus {«}, . = M ] a 7 [ A ] { u } i
+
l
r
+
[A\ - [A] {u} . . X
0
2
r l
J
Parabolic Partial Differential Equations
182
We may, as before, remove by defining a new variable v , implies that an equivalent form is r+
, = u ; this r
s
{u} =[B){u) , r+]
r
where {u} is the new vector and r
[B} =
[AK [A]
WM.
l
[I]
2
0
The eigenvalues of this matrix [B] are given by the roots of (l+2p)X -4p\cos^ + (2p-l)=0,
5= 1,2,...,,?-1.
2
It can be shown that | λ | < 1 for all ρ and unconditional stability is thereby established. Finally, we turn to the Crank-Nicolson approximation, 2(p + l ) M
(4.3.18)
r + l i I
-p[ii,
= 2(1 - p)u
+
) i l + l
+ p(u,
rs
+ «,+ , . , _ , ]
1 + l
+
u _,). rs
We may write this in the form (2[I]-p[T)){u)
r
+
=(2[I]
i
+
p[T]){u} , r
where [T] is tridiagonal {1, —2,1}. Alternatively, we write {"},
= ( 2 [ / ] - p [ T ] ) " ( 2 [ / ] + p[7']){ } ,
+
l
U
=
r
[B]{u) . r
Since the eigenvalues of [T] are — 4 s i n ( j i r / 2 n ) , the eigenvalues of [B] are 2
, sir 2—4psin 2n λ =• sv 2 + 4psin" 2n~
5 = 1,2,...,n-l.
These \ are all less than one for ρ > 0, thus reconfirming the unconditionally stable behavior of the C r a n k - N i c o l s o n approximation. Let us now illustrate the influence of flux boundary conditions on the analysis. The point i = 0 corresponds to y=0 and s = n to y = \\ a typical s
Stability
183
version of the conditions in (4.5.21) might be y~0,
u = h,(u-a*), r
a = l,
α, = - 1 / Λ , ,
0
a = a* 2
«,. = - Α ( « - / 8 · ) ,
>> = 1
2
P\> = - 1 ,
/9, = - l / A , 2
&= where all the items are constant. This would correspond to heat fluxes with A,, A as heat transfer coefficients. The question that immediately arises is what Because the P D E approximations are formula to use to approximate u 0(k ), we use central differences to achieve an approximation of the same order. Thus 2
r
2
(4.5.27a)
=
2k
Α,(« .ο-α*) Γ
- u.
(4.5.27b)
2k
is coupled with the classic explicit approximation. N o t e that in (4.5.27) fictitious mesh points, u and u , occur. These are points on any r row that are one mesh point outside of j > = 0 and y = l, respectively. But these points can be eliminated by solving for them in terms of u , u , and u, „ _ , , u „. Thus the matrix equations become r
r
n +
r l
r
(4.5.28)
{«},-, = [*l{«}r +
{<0.
where {u} is a vector of η + 1 terms u , w , . . . , u , „ _ , , « r
r
0
r l
r
n
, and
2pA,a*/c 0 0 2ph fi*k 2
[ l - 2 p ( l + A,*)]
2p
Ρ
l-2p
[BY-
l-'2p 2p
"
ρ
( l - 2 p ( l + A A)] 2
r 0
184
Parabolic Partial Differential Equations
For stability purposes, we can discard {d} since it is a constant. What we need to do is look at the eigenvalues ol\B] and see if they are all bounded by 1. We d o not show the details but merely summarize. One finds the bounds to be -1<1-2ρ(2+Α,*.)<1 -\<\-2p(2+h k)<\ 2
or
1
P
P <
Thus we select
.
p^min-s
ί
2 + A,Jt
<
2TV' ι
— — : — r
.
i l
;—;——
[ 2 + Α,& 2+h k for stability. Obviously, if A, = A = 0 , we return to the nonflux stability bounds. * Similar results can be obtained for other finite difference approximations. However, some care must be taken; as shown by Taylor (1970), the D u F o r t Frankel approximation with flux boundary conditions is unstable if u is represented by a central difference approximation (as above), 0(k ), but stable if a forward or backward difference approximation, O(k), is used. We have attempted to show that one must be very careful in selecting a finite difference approximation. Stability considerations may be such that an apparently simple approximation is unstable. It is interesting to note that whereas the Richardson or leapfrog approximation is unstable for the model parabolic P D E , it is stable for the model hyperbolic PDE. This implies that it is probably incorrect to refer to an algorithm as stable or unstable. The same algorithm when applied to different differential equations will lead to different difference approximations which exhibit entirely different stability characteristics. Thus the centered difference in χ and y when applied to u = u leads to an unstable approximation, whereas the same centered difference in χ and y applied to u + u = 0 yields an unconditionally stable approximation. To make this point more evident, we state the following (the interested reader may wish to check out the details): y
2
2
y
2
x
yy
x
1.
y
For the model parabolic P D E "* = «",·»•
*Hindmarsh and Gresho, 1983, have shown that, in contrast to the sufficient conditions given here, the necessary conditions are p«min { j ^ , j j j if h,k and hjk > 2. Hindmarsh, Α., and P. Gresho, "The stability of explicit euler time integrations for certain Ref. finite difference approximations of the multi-dimensional advection-diffusion equation." Int. 1. Num. Meth. Fluids (in press).
Stability
185
the Richardson centered difference approximation for u and w is unstable. At the same time, the classic explicit, forward difference on u and central difference on u , is conditionally stable, 0 < ρ = ah/k |. For the model parabolic P D E x
vl
x
2
vr
2.
where /' = / — Τ and ω is real, the classic explicit approach yields a completely unstable approximation. 3.
For the same model parabolic P D E as in (2), a Richardson approach yields a conditionally stable approximation, 0 < ρ < 1 / 4 ω .
Next, we consider a model parabolic P D E of the form yy "r+Ι,ι-Ι
4
"r,i~l
h
U
r+\.s+\
U
r,s+\
k
2
or (4.5.29)
«,+ , , , - ι + M
r +
,.
1 +
,=(l+2p)(«
r
t
_, + «
r
J + l
)-4p
U r J
.
We may rewrite (4.5.29) in two parts: (4.5.30a)
«,+ , , , + , = - Μ
(4.5.30b)
«,+ , , , _ , = - u ,
γ + Ι ι ϊ
_ , + (l+2p)(«,_,_, + "
+ l i J +
, +(1 + 2p)(K
f i J
r
i + 1
_, + " , .
)-4pu
ί + 1
f
)-4ρκ
5
Γ ί
.
The equations of (4.5.30) can be used in the following way (together with the given boundary conditions): 1.
Use the first equation from left to right along any r + 1 line to calculate U
r + 1 . 2 > r + 1 , 4 ' r+ 1.6' • · • < r + 1, n + IU
U
U
2.
Use the second equation from right to left along the same r + 1 line to _ ,.... calculate u , „ _ , u , „ , u
3.
After both passes, all the u
r +
2
r +
n
4
r + n
r + i s
6
will be known on the r + 1 line.
T h e question that immediately arises is: Why go through these manipulations? The reason is that (4.5.29) is implicit (note that u _ and u occur), whereas (4.5.30), because of its method of calculation, behaves like an explicit approximation and explicit methods are usually simpler to calculate. However, all of this numerical sophistication is to no avail because analysis of the stability of (4.5.29) or (4.5.30) shows they are completely unstable. T h u s what seems to be an ingenious algorithm computationally is absolutely of no practical use. r+]
s
t
r + l s + ]
Parabolic Partial Differential Equations
186
4.6
SOME EXTENSIONS
There are a number of extensions of the basic concepts developed in previous sections which are of interest. Note, however, that we continue to retain the model parabolic PDE, u = u , and have not, as yet, considered more than two independent variables; this extension to higher dimensions is discussed later. x
4.6.1
vv
Influence of Lower-Order Terms
To this point our analysis has been concerned only with the model parabolic P D E M = u ,. Now we wish to show that the addition of lower-order terms, such as u, and u in the PDE, does not affect the stability bounds already derived. Thus we consider vl
V
u - UYY + au + bu.
(4.6.1)
x
v
There are, of course, many ways to finite-difference this equation; consider the straightforward explicit approximation (
4
6
2
)
* " ' '
U
r + l . , - " r . ,
_
«r.,+
l ~
2
" r . , + "r. s - I
h
k +
Ο \ «,. , + 1~
+
«r. s - I ]
2k
1
bu . rs
Because the approximation for u approximation remains 0(h + hk ) 2
is of the same order as for «,.,,, the or 0(h + k ) or 0 ( 1 , 2 ) . If we had used
r
2
2
the result would be 0(h + hk) or 0(h + k) or 0 ( 1 , 1 ) . Let us now analyze the stability of (4.6.2). The case where a = 0 has already been examined at the end of Section 4.5.2. By a von Neumann stability analysis, the amplification factor was reported to be 2
(4.6.3a)
$=
l-4psin 4£ 2
+ M,
leading to the same bound on ρ, 0<ρ*ζ{-, as when b=0. It is interesting to observe that ξ in (4.6.3a) can be obtained by considering the amplification factor for the case b—0, 1 — 4psin (/3A/2), and then merely adding to it the result for bu. Now let us consider the case of α Φ 0. We perform a von N e u m a n n stability analysis as usual. The only new feature is the term 2
2k
Some Extensions
187
If one examines this term along with the left-hand side of (4.6.2), the von N e u m a n n analysis yields an amplification factor of iajsinfik.
(4.6.3b)
Thus the total equation (4.6.2) yields a combination of (4.6.3a) and (4.6.3b): { = 1 - 4 p s i n ^ + ia £ sin fik + bh.
(4.6.4)
2
Since this is a complex number, it follows that - 4 p s i n ^ + bh)j + a pAsin fik .
Υ(1
2
2
2
2
As usual, we desired \ξ\ =s 1 for stability; after tedious calculation, it can be shown that 0 < ρ \ as before. If instead of representing u by (S u) /k we had used the weighted implicit form [i.e., 0 ( o * « ) , , + ( 1 — θ)(8 ιι), J, then we would have used (4.5.15). In (4.5.15) the amplification factor for « is 2
vy
2
r
2
s
2
f+
l-4p(l-0)sin ^ {= — - i - . l+4 0sin ^ 2
(4.6.5)
2
P
By following exactly the same approach as was used above, except that (4.6.5) must be carried throughout, one obtains 1 - 4 p ( l - θ )sin ~
+ ia jsinfik — i l+4 0sin ^ 2
(4.6.6)
1=
2
+ bh
.
2
P
Expansion of (4.6.6) to form \ξ\ and an analysis of the results for conditions such that | £ | < 1 reveals that the weighted implicit bounds on ρ found in Section 4.5 hold exactly. Thus it appears that the presence of lower-order linear terms in the model parabolic P D E does not influence the stability bounds. 4.6.2
Higher-Order Forms
Although we have already presented a number of different finite difference approximations for our model parabolic PDE, we have not concentrated on
188
Parabolic Partial Differential Equations
improving the order of the approximation. Such improvements can be made by 1.
Use of a computational molecule with more than three s points on each r level. However, we desire to use a maximum of three χ points on any r level to circumvent computational difficulties. With this restriction we can use only a total of six mesh points, three per r level. We have already presented an optimum approximation for this case, 0 ( 2 , 4 ) in (4.3.24). This scheme is frequently called the Douglas approximation (Douglas, 1956). Boundary conditions are discussed by Zafarullah (1971). We shall not pursue this approach further.
2.
Use of three r levels, with three s points per level. In this case the maximum number of points would be nine. Actually, the Richardson and D u F o r t - F r a n k e l approximations fall into three /--level schemes. We now wish to present three additional implicit approximations of this type.
The first approximation, which is 0 ( 2 , 2 ) , follows from
In effect this formula weights (with \ and — \ ) in the χ direction. Expanding and collecting terms, we obtain (4.6.7)
[3+4p]«
r + l i I
-2p(« . #
+
I i J +
, + «,+ , , , _ , ) = 4 «
Γ ι Ι
-«,_,_,.
This implicit formulation (4.6.7) is 0 ( 2 , 2 ) and unconditionally stable. Alternatively, we may extend the concept of the C r a n k - N i c o l s o n scheme formulated in two r levels to three r levels. T h e resulting implicit, 0 ( 2 , 2 ) form is
(4.6.8)
" -'^=-[ [(g ii) f
2
I
,,s+(* ")r.s+(* «)r-.,s]t
r +
2
Some Extensions
189
When expanded this stable 0 ( 2 , 2 ) formula becomes (4.6.9)
[1 + ! Ρ Κ
+
1
Ι
Ι
-$Ρ[«γ Ι., +
+
Ι + « , + • . , - • ]
2P, = - 3- [ «*r.,+ l —2« . , + « , . , - | ] P
[ -!p]"r-l. +3P[",-1, +l + «r-|. -|]-
+
1
I
R+ 1
R
I - 1
J
Ο
R+Ι,Ί
R+1,I+1
Ο Q—ο Ο—ο—ο
r, s-
R -
i
r.s
1
1
Ι , Ί -
r
R -
Ι , Ί
τ-
,s+
1
1
1 . S +
Here we have used a central difference for u and, as can be seen, an average for u over all three levels. Finally, through analysis of the truncation error in (4.6.8), one can find an even better approximation, which is 0 ( 2 , 4 ) . This 0 ( 2 , 4 ) formula is also stable and uses the same approximation for u as employed above. Thus we write x
x
=
2h
-^[(* «)Γ .. +(β «),. +(β «),-,. ] 3k 2
2
+
[(S u)
2
ί
ί
2
24Λ
ί
,,-(8 u) . ,]. 2
r
+
l
r u
Expansion of this approximation yields (4.6.10)
(5 + 8 p ) H =
4
r + 1
P["r,
. -(4p-i)[H 1
i
+
l ~
2
u
r , s
+ (5-8pK_
+ M, , _ ] 1
+ (4p + i ) [ « , _ , , ,
+ I
U
1 + 1
r, s -
r+
1,
s
r+
1,
+ «,_,.,_,].
s+ 1
R,s + 1
1
Ι,Ί -
l
r.s-l]
o—o—ο Ο ο—ο Ο—ο—ο
R + 1,s - 1
r-
l i J
.
+ 1
+
r + 1
1
I . J
R - 1,Ι+
1
Parabolic Partial Differential Equations
190
Although many additional, higher-order accurate approximations can be developed, our experience indicates that such schemes are seldom used for practical problems. Illustrative examples of the use of three-level approximations can be found in the papers of Lees (1966) and Bonacina et al. (1973). 4.6.3
Predictor-Corrector Methods
We have already mentioned that the combination of certain finite difference algorithms can lead to additional approximations. In this and the next section we illustrate certain of these; some of the results are surprising to say the least. We are primarily concerned here with the classic explicit and the backwards implicit approximations. Thus we first rewrite these equations in simple form together with their truncation error and amplification factors. (4.6.11)
r+],s
4
u
u
~¥ u
.• — 2u
[classic explicit]
ο — ό
r.J -
Ό r,
s+ 1
1
ί; = 1 — 4pshr T r u n c a t i o n e r r o r = \h u 2
xx
— -\ihk u^ 2
y
+ ··· ;
0(1,2)
(4.6.12) [backwards implicit]
r+
Π Ι 1 , s - 1
•+
1,s
Ο
r+
1,5 + 1
191
Some Extensions
l l+4psin ^ 2
Truncation e r r o r = — \h u 2
— jihk u^
+ ··• ;
2
xx
v
0(1,2).
Recall also that the explicit form has a conditional stability bound, whereas the implicit method is unconditionally stable. First, let us use the classic explicit approximation to calculate the values on the line r + j (we use j here to simplify the final result) and then follow it up with a backwards implicit calculation of the values on the line r + l. We may write U
r+\/2.s
U
• 2M
r.s
+
U
,
A/2 u r+\.s
U
r+i/2.s _
U
r + i . s + i ~
2
u
r + \ . s
+
U
A/2
r+ l . j - l
for the combined two-step procedure. We refer to the overall process as a predictor-corrector scheme because the second formula uses the numerical values from the first formula. Adding these two equations together (note we d o not eliminate variables from one equation and substitute into the other), we obtain (4.6.13)
" r + \ . s -
A
U
r . s
_
1
U
,.,+ l -
2
+
2
u
r . s
"r.s-\
+
k
2
r+\.s+l
U
2
u
r + I,s
U
r+
1 ,s-
Equation (4.6.13) has exactly the form of the Crank-Nicolson approximation. Inasmuch as we have the amplification factor for each step, we can write the overall amplification factor for (4.6.13) as (4.6.14)
l-4psin ^]fl+4psin ^ 2
2
which, with the use of p / 2 because of the half step, is identical to the C r a n k - N i c o l s o n amplification factor. Thus this combined process is unconditionally stable as long as A is held constant in each step. Further, if one looks at the truncation errors, it can be seen that the 0 ( A ) term has opposite sign and when added cancels out. Consequently, the combined process is 0 ( 2 , 2 ) . We may also interchange the order of the calculations. If we use the backwards implicit first (for a step A) and then the classic explicit second (for
192
Parabolic Partial Differential Equations
another step A), the result is, in exactly the same manner as before,
-κ.
/•+
(4.6.15)
•r+2,l
V+
+ I
V+I.i-H
1,1
Γ,5
1,1
_
-2M r +
1,1
-2M r+1,1
+ «r + l , i - l
+
«r+ 1,1-1
"/•+!
2A
But this has exactly the form of the Richardson explicit approximation [(4.3.15) with the index τ decreased by one], which is completely unstable. Yet the combined two-step process has the same amplification factor, (4.6.14), as before and is unconditionally stable. Further, the truncation error is 0 ( 2 , 2 ) . Thus we see that if we form a two-step predictor-corrector process from an unconditionally stable and a conditionally stable approximation, the result is an unconditionally stable approximation. Moreover, we even achieve a better accuracy, from 0 ( 1 , 2 ) to 0 ( 2 , 2 ) . This in the face of the fact that one of the schemes, the second, appears to be unconditionally unstable.
4.6.4
Asymmetric Approximations
N o w we turn to some interesting methods that are termed asymmetric because of either the nonsymmetric method of application or the explicit form of the approximations. These algorithms will be most useful for higher-dimensional problems; for the present they all behave as explicit algorithms in that only one new mesh point is calculated at a time. Gordon (1965) first introduced the idea of using explicit and implicit finite difference schemes at alternate mesh points (on a single r line) to solve the model parabolic P D E in one dimension (u = u ); this was followed by papers by Scala and Gordon (1966, 1968). Then Gourlay (1970) placed the procedure in a more general setting referred to as the hopscotch method. The name derives from the children's game, hopscotch, and the manner in which the mesh points are employed. Gordon proposed the following procedure: x
ry
1.
On any given r + 1 line, calculate every other point on the line with the classic explicit approximation.
2.
On the same r + 1 line, calculate the missing points on the line using the backwards implicit approximation.
Some Extensions
3.
193
On the following r + 2 step, reverse the roles of the odd and even formulas, and so on, as follows: + 0 x
0 + x
+ 0
x
0 +
x
+ 0
x
0 +
x
r+2 line r + l line r line, all values known
+ 0 0 + x
x
0: calculate with classic explicit + : calculate with backwards implicit The overall result is a series of explicit calculations since there is never more than one unknown u at any point. The result was shown by Gordon to be stable and to be consistent with the model parabolic P D E in exactly the same manner as the D u F o r t - F r a n k e l method. In fact, it turns out that the combined sequence behaves like the D u F o r t - F r a n k e l approximation applied to half the points. Gourlay showed that this sequence could be written r + U s
(4.6.16)
»r l,s
=
(4-6.17)
«
= « ., + ρ ( « ΐ ί )
+
»r,s+P(* »)r.s 2
2
Γ + 1 ι ί
Γ
Γ +
Ι ι ί
,
where each equation is used on alternate mesh points along the r + 1 line (in t h e ^ direction). If (4.6.16) is used for s even and (4.6.17) is used for s odd, and if we further define if r is even otherwise,
(4.6.18)
then for a specified value of s, the hopscotch method follows. (4.6.19)
-/r Wo «) +
M r + 1
=
2
r
+
1
+ /}'p(6 «) . 2
W r
r
N o w write r + l instead of r in (4.6.19) and eliminate « Ξ β') equations to yield (with β
from the two
r + l
Γ+2
(4.6.20)
u
r+2
= u +
fi p[(S u) 2
r
2
+(S u) ]+2fi' *p(8 u) 2
r
+
+ 2
2
r
r
+
t
.
generated for r even as being intermediate If we regard the solutions u calculations, then for r even calculations (4.6.20) yields r + l
(4.6.21)
u
r+2
= u + p[(8 u) 2
r
r
+
2
+
(S u) ] 2
r
Parabolic Partial Differential Equations
194
and for r odd u
(4.6.22)
=u +
r + 2
2p(8 u) . 2
r
r+]
But (4.6.21) is the Crank-Nicolson approximation for 2 A and (4.6.22) is the Richardson approximation. Thus this simple-appearing method of Gordon is made u p of a series of different calculations. We return to these concepts in a later section. Saul'yev (1964) introduced a series of asymmetric approximations for the model parabolic P D E ; this was followed by interesting variations d u e to Larkin (1964), Barakat a n d Clark (1966), a n d Liu (1969). In each case the result is an approximation or a pair of approximations that are unconditionally stable and are explicit in nature. T h e basic concept here is rather straightforward. We introduce two approximating equations Ur+ 1 . 5
" ~ _
U
r%s
h
x
v\r,s
U
+ \/l
~
U
v\r,s-\/2
In other words, we use the usual forward difference for u a n d a central N o w Saul'yev replaces u \ _ with difference for u - d(u )/dy. " v l r + i . j - i / 2 o" obvious central difference approximations x
yv
an
u s e s
v
m
r
r s
] / 2
e
„
I >''<•.!+ 1 / 2
I
_
U
r . s
r+
U
+
\ ~ ^
I.J
">·!/• + I . j - 1 / 2
U
r . ,
r+ \,s£ U
I
When these relations are substituted into u — «,.,. = 0 , the end result is (we call this Saul'yev I) x
(4.6.23)
«,+ , , , ^ , . , +
Ρ Κ + Ι . , - ι - Μ
Ο r + 1 . i - 1
Γ
+
1
. , - Μ
γ
. ,
+ «,.
© Τ'+Ι.ί
Ο — ο
1 + ι
].
[Saul'yev I]
Some Extensions
195
In the same manner, Saul'yev also develops an analogous form (called Saul'yev Π) PK+ ι, 1
« , + 1 , , = « ,, +
(4.6.24)
\.s ~
-
Ι +
R
+
1,1
"r.s
Ο
'+
1,s +
+ "r.s-1]·
[Saul'yev II]
1
Οππ—<> For use later, we can also write Saul'yev II in the form (let r-*r
+ \)
(4.6.25) =
"r+2.,
"r+\.s
+
P[«r+2.,+
l~
"r+2.s
~
U
r+l.s
+
[Saul'yev II]
It is important to note that Saul'yev I will be explicit if one evaluates from the left boundary ( ^ = 0) and moves to the right. In this case, only the single value u will be unknown. The same explicit nature holds for Saul'yev II if the calculation proceeds from the right boundary (y = 1) to the left. T h u s r+i
s
Saul'yev I
Saul'yev II
L-R
R-L
If one selects the case ρ = 1, (4.6.23) and (4.6.24) simplify to (4.6.26)
«,+ !., = 2 [ « r + l . , - l + « , . , + • ]
o
r+ 1,i -
1
m
r+ 1,i
1
Ο
r, s + 1
(4.6.27)
«r+l.i =
i[«r+l.i+l
Ο
| r + 1,J
Ο
r, s -
1
Ο
r+ Ι , ί + 1
Parabolic Partial Differential Equations
196
Larkin (1964) outlined the options that were open to using these Saul'yev approximations. Among these options are: 1.
Use (4.6.23) only and proceed line by line (in the χ direction) but always from left to right on a line.
2.
Use (4.6.24) only but reverse the direction in (1).
3.
Use (4.6.23) for one line (left to right) and follow with (4.6.25) for the next line (right to left). Here one alternates from line to line using first Saul'yev I and then Saul'yev II.
4.
Use both (4.6.23) (left to right) and (4.6.24) (right to left) on the same line and then average the results for the final answer. This is equivalent to defining the dummy variables P and q such that r
(4.6.28a)
P
(4.6.28b)
q
(4.6.29)
u .,=
= u
r+Us
r+]
s
= u
r s
r s
+p [ P + p[q
' -'
+
P +i
r+l
r+
q
l
'
s
r
s
+ u
+
r
P
+
r
s
u , + H
-
+
, - q,
r
- u
r+
s
r s
f J +
, ]
+ u _, ] r
s
'
This averaging approach has merit because of truncation error cancellations. Barakat and Clark (1966) suggested retaining P step to yield (4.6.30a)
Λ
(4.6.30b)
i
+ 1
r +
.
,,
Ρ [
Γ
s
and q
r
s
from the previous
Ι
= Λ«
i
= t7r. + P [ 9 r + i . + i - ^ + i , . - 9 , . . + ^ , 1 - 1 ]
+
/
,
+
ι . , - | - ^
r
J
+
ι . - Λ . , + ^., ί
+
ι1
J
[Barakat-Clark] with r+\.s
U
_ ^f+l.i
Qr+l,s
2
Liu (1969) suggested using a higher-order approximation for u \ ^ resulting finite difference approximations become
y r
v\r,s-\/i-
u
(4.6.31)
s
+
l
/
2
or
e
(3p + 2 K
+ l i J
= (2-4p)M -
M f + 1 > J
R > J
+ pK. _ +3M
_ +4« 2
I
r + 1
1
,_,]
R - J +
, [Liu I]
Some Extensions
Γ+1.Ϊ-2
f r+ Ι , ι
r+1.J-1
Ο
ο
Γ, ι - 1
(4.6.32)
(3p+2)
U r + l
197
, =(2-4p) J
M f J
ο
r,J+ 1
+ p[« , r
J + l
+3
U r
, _ i
l
[Liu II]
Ο — ο
Ο Tr+1,i
r+1,j+1
Ο — ο
r+1,s +2
r, ί + 1
Equations (4.6.31) and (4.6.32) are completely analogous to the Saul'yev forms except that one must obtain the first point on any line (either from the left or the right) by some other means. Obviously, the two schemes can be used in any combination, as was indicated for the Saul'yev approximations. We have already stated that each of the individual approximations and combinations of them were unconditionally stable. We now wish to demonstrate this stability using Saul'yev I, (4.6.23), as an example. Either the matrix or the von N e u m a n n approach can be used. Let us write the approximating equations in the form [Λ1Ο{«},
+
,=[Λ]|{«}Γ
{«},+.=Μ1ο"'μ]ι{«}, and cast (4.6.23) into the proper form; the result is l+p -p [A)c =
0
1-p
0 l+ p -p
(1 + P )
ρ 1-p
0 ρ 1-p
0
ρ
Parabolic Partial Differential Equations
198
Both [A\ and [Λ], are bidiagonal. We would now need to invert [A] and then find the spectral radius of [ Λ ] ο ' Μ ] ; this can be done but it is considerable work. Instead, we use the von N e u m a n n separation-of-variables approach (i.e., u = t e' ). When this relationship is substituted into (4.6.23) and common factors canceled, there results 0
Q
(
r
r
fisk
s
or
+1
- i
= Γ + ρ[Γ
(4.6.33)
+
ξ =
i ;£
r +r 1
r +
Ve* ]
' - Γ +
k
_ ll+- pp -+p pe-'"* e " ,fik
The numerator of (4.6.33), call it N, and the denominator, D, are both complex with identical imaginary parts. Thus the amplification factor ξ will be bounded b y | i | < l if [Re(Z>)] -[Re(JV)] >0. 2
2
Expanding Ν and D reveals that [Re(£>)] - [ R e ( / V ) ] = 4 p ( l - c o s 0 f c ) , 2
2
which is always >0 independent of ρ, ρ > 0 . Thus the Saul'yev I approximation is unconditionally stable. For the Liu I, as another illustration, (p/2-4) + e~'^+3e'^ (p/2 + 3) + e -
2 , p k
-4e
l p k
and the same reasoning proves stability once again. Next we turn to a brief analysis of the truncation errors of these various approximations. Using Taylor series expansions on the model parabolic P D E and the specific approximations, Wyman (1971) [see also Birtwistle (1968)] has shown that h
k TJ" ^
h
2
(4.6.34a)
Saul'yev I :
Truncation e r r o r = ^ « 3
(4.6.34b)
Saul'yev II:
Truncation e r r o r = — — u
— V
h
4
72
k h — ^«4,, -—M ,. 2
3v
2
-
2
6 I
Thus either formula used alone is 0(k + Λ + h/k) or 0 ( 2 , 2 , 1 / 1 ) . Because h/kpk, if the formula is to be used such that ρ is constant and the formula 2
2
Some Extensions
199
is consistent with the model parabolic P D E , the truncation error is like 0(k + A ) or 0 ( 1 , 2 ) . When, however, the methods are averaged or used in an alternate direction scheme, the difference in the signs in the leading terms in (4.6.34) tend to cancel. In this case, it turns out that the truncation error is 0(k + A + ( A / k ) ) or 0 ( 2 , 2 , ( 1 / 1 ) ) . Much the same behavior seems to apply to the variants on Saul'yev's approximations and to the Liu approach. 2
2
2
2
2
4.6.5
Variable Coefficients
Many physical problems are described by parabolic PDEs with variable (functions of x, y,...) coefficients. In particular, the P D E
represents (on the right side) a cylindrical coordinate problem while
u
x
, 2 = vy
+
u
-
y
u
represents a spherical coordinate problem. Thus we shall now analyze a general model parabolic P D E of the form u =u
(4.6.35)
x
yy
+ ^u . y
N o t e that when α = 0 (4.6.35) reduces to the rectangular model P D E and when a — 1,2 we have the cylindrical and spherical cases, respectively. Generally, the physical problem is such that symmetry occurs at y=0 a n d o n e of the boundary conditions is M . = 0 at y —0. This implies that we need t o consider 0«>-
(4
6
3 6
"r+l.,-«r,M
)
U =
r,s+\-2"r.s
+
"r,s-l
k
A
2
+ 1 Λ
2k
Note that the only complexity here is that u has been represented at r, s and thus a/y-a/y ; we must keep track of y as the calculation proceeds (i.e., we might use = ks). Because an explicit representation has been used for u , it would seem probable that (4.6.36) is conditionally stable. In fact, it turns out that the stability constraint is 0
s
s
vv
200
Parabolic Partial Differential Equations
not changed from the simpler case. It is also possible to estimate the truncation error associated with (4.6.36), namely (via the usual Taylor series) for a =2. h Truncation e r r o r = — u 2
- hk y 2
xx
I 1 1 — w , + j^u
\ J·
iy
4>
Thus the method is 0(A + k ) or «9(1,2). Obviously, we could also replace u with any of the implicit approximations presented (e.g., the Crank-Nicolson scheme). We shall not write this form down since it is rather obvious. Of interest, however, is the fact that the result is unconditionally stable and that the truncation error is 0 ( 2 , 2 ) . There is one problem, however, associated with (4.6.35) and thus with (4.6.36). If the point ν = 0 is involved, then, because of symmetry, the term (a/y)u is indeterminate. However, we can circumvent this problem if we use 2
vy
y
(4.6.37)
lim u
v-0
= lim [u
Η—u
y
yy
y —0
y
+
vv
= (1 + β)ιι_
au ] vv
at
νν
>>=0.
Writing (4.6.36) at ( r , 0 ) (s = 0 corresponds to y = 0 ) , we obtain " Γ + 1 . 0 - " Γ . Ο _ / .
A
.
u
v»,.i-2«,,o + «,.-i a
} k
2
But the fact that 1 ^ = 0 a t ^ = 0 implies that u , -u u ,-\)/2k = 0 ] , and consequently there results r
_ , [from u \ =(u
r
v r0
rA
-
r
( « Λ )
ϊ ^ ί -
2Ί1±£)
=
(
Ι
,,,-„,
Ο
)
.
T h e finite difference approximations are now (4.6.38) for s = 0 and (4.6.36) for s = 1,2,... . However, a von N e u m a n n stability analysis of (4.6.38) reveals that the equation is stable only for 0
1
2 ( l + fl)
It is apparent that this does not affect the case a = 0 since we are back to the usual classic explicit bound of ρ < ^ . For a = 1 and a =2, however, there is a definite deterioration of the stability bound; ρ < { for a = 1 and ρ < I for a = 2. Thus the overall stability is limited by the approximation at y=0. This restriction can be removed by making (4.6.38) implicit: (4.6.39)
! U ±
i
^
=
2 ^
[
U
r
+
l
l
-
U
r
+
u
o
l
Some Extensions
201
N o w the overall process is limited by the bound on (4.6.36). It is also important to note that if v = 0 is not involved (the physical problem represents a hollow cylinder or sphere), then we do not need to worry about the approximations at y = 0. In addition, if one makes the following changes in variables (these hold only when y = 0 is not involved), a — 1 (cylinder);
y — e
a -2 (sphere);
v = uy
v
there results, for the model PDE, a = \;
eu
a = 2;
v =
2v
x
x
=
u
vv
v. vy
Thus we entirely remove the a /y term from the equation. When variable coefficients occur, one follows much the same procedure as with a constant coefficient system. T o illustrate this point, let us take a number of different cases. u = au ,
(i)
x
a=constant.
vv
All the previous approximations still hold true; the only change is that p = ap replaces the earlier p. (ii)
u = a{ y)u , x
a = function of y and its derivatives exist.
vv
We rewrite this equation as (4.6.40)
^7)
=
and treat this as in the classic explicit approach. Thus
k
h
2
or (4.6.41)
«,+ ι., = ( 1 - 2 α , ρ ) Η
Γ ι Ι
+ α,ρ[« , Γ ι
+
ι
+ «,,,_,].
Equation (4.6.41) is equivalent to (4.3.9) with only the specification needed on where to evaluate a(y).
Parabolic Partial Differential Equations
202
This concept can be extended t o higher-order approximations. Consider, for example, U
r
+
l
s
~
U
r
h
-
U
i
- J ^
2
[ ( o
, + (S u) ,
+
2
u )
2
+ l s
r
1 (8 u)
r s
2
, -(8 u) . 2h
(S u) ^ ] 2
r
s
2
r
+
l
12
s
r
U s
which led to (4.6.10), which is 6>(2,4). The first term on the left can be seen to come from a central difference approximation for u \ and the last term on the right can be equivalently written as x
r
s
1 e [ " , 4 - t . , - " , - i , J _, " I , r
I
2
2h
12
Thus, if we now use [1 /a(y)\u r+\,s
U
x
1
r-\,s
2a.h
]
ι"**'·>ι·
in place of u , we obtain
x
U
2
12
•[(8 u) 2
3k
+ (8 u) ,
+
2
r
+ L
s
r s
(8 u) . ] 2
r Us
1 24Λ (iii) This is equivalent t o u = a{y)u K
Vf
+
ua y
v
or U
r , s + \ -
2
U
r . s +
U
Tk
r,s-i
·
This can b e written "r+l.i
=
0 -2e +
P ) « , . , + <>A r.,+ U
f
Λ
K,,+
1
| - « r . , - l J
+
«r.i-|]
203
Some Extensions
and is 0 ( 1 , 2 ) . u =a(x,y)u .
(iv)
x
rv
T o treat this case, we note that du
d
4
=
2
I
dy*
u
x
dy \a{x,y) 2
or
v + 1/2.
d »r+\/2,s 4
J
+ ·•
AA
2
3 /
and & r+\/l.s U
dy
k
_ 1 β [«,+ Ι . , + «Γ.,1
2
2
8
V+l/2. dy
12
2
4
+
Both of these equations can be verified using Taylor series expansions. Combination of the forms above yields 1 P°r
+
1/2,
•[«r+l.i
-
M
r.*]=T*
2
1
16
P«r+l/2.
S
1
1 + 6
P
f l
r+l/2,j
and is 0 ( 2 , 4 ) . This is the counterpart to (4.3.24). 4.6.6
Nonlinear Parabolic P D E
Finally, we wish to consider some features associated with the approximation of nonlinear or quasilinear parabolic P D E . All that one can d o here is present a few indicative results of previous workers and then suggest that one must learn by experience. It is difficult, if not impossible, to generate results on stability, convergence, and consistency for nonlinear P D E approximations; the best that one can usually do is obtain results on a local basis in which certain terms are averaged or even held constant. If a stability bound for such a local system is developed, it is necessary to use a safety factor when actually carrying out a calculation.
204
Parabolic Partial Differential Equations
In slightly more specific terms, one can visualize the following steps in the analysis of a nonlinear finite difference approximation: 1.
Linearize the nonlinear equation by considering the solution as the sum of a small perturbation and the local solution. When this is substituted into the difference approximation and only first-order terms retained, the result is an approximation with coefficients as functions of χ and y.
2.
Although the coefficients will actually be varying at the various mesh points, one can assume that they are locally constant. N o w the finite difference approximations are linear but vary from region to region or mesh point to mesh point.
3.
At least in the vicinity of any mesh point a stability (or any other) analysis can be carried out.
4.
The most restrictive of all the local stability bounds is taken as holding for the entire problem. This bound should be treated with a certain degree of caution.
As an example of how such approaches may be used, consider the model parabolic P D E as
«, = ( « " ) ^ = (»«""'^) .· ί
A suitable finite difference approximation might be r+ I , J
(4.6.42)
"r,s+
V.j _
1
•2u1
+ u"
r,s-
But if we think of nu" = a constant in a local sense, then we might estimate stability for (4.6.42) from 1
«« ρ<ί· π_1
(4.6.43)
This follows directly from the stability constraints developed for u — au , where a — constant. Obviously, (4.6.43) is not a constant but is a function of the solution itself (the value of «). Such a stability estimate can b e used to monitor a calculation as it proceeds. Next, let us consider x
u = (u )
(4.6.44)
=
5
x
yy
{5u*u )
y y
as another illustrative case. An implicit approximation might be (4.6.45)
U
^<°
h
"'>'
=A
e
2
( M
3
) r
+i i f +
i!_^l
eV)rif
.
yy
Some Extensions
205
As a linearization, we might use (« )
(4.6.46)
s
i.,-(« ),,, = 5(ii ) . [« 5
r +
-«,.,]
4
r
f
r + 1 > f
or
S^Uu.-SHu'l^Siu^BHuU^-SHu^J.
(4.6.47)
In the case of (4.6.45), the result would be (expanding all the δ (4.6.48)
(u -u )-5e [(u*) _ r+ls
rs
P
r
s
(u
+
i
2
terms)
-u )
r+Us+i
rs+i
- 2 ( « ) ( M ι . , - ι Ο + ίι» ),,, -ι(«,+ ι .,-I-M, .,-•)] 4
4
R-J
R+
= (l-e)p[(« ) . s
which is linear in ( « (4.6.49)
(w
r + l i f
-u _
-2(« ),, + (« ), _ ], s
r
J +
1
s
1
- u, J. Using (4.6.47), the result is
r + L i
)-5t?p(« )r.,[(«, 4
r i J
1
+
2 ( « , + ι., - « , , , ) + («,+
= 5ρ(Η ),.,Κ 4
ί + 1
I
.
i +
|-«,.,
+
i)
! . , - 1 1 ) ]
- 2 ι / . , + u,,,_,]. Γ
This equation is identical to that which would result if 5 u in (4.6.47) is treated as O(M)= a - constant. Now a stability analysis on (4.6.48) reveals that 4
l-(l-fl)S
\ + es
<1,
where S = 5( u* ) [2 rsP
-(c
+ d )οο$βΙ( -i(c-d
whereas on (4.6.49), 2(1-20)' which is identical to the constant a bound.
)sin βΐι]
206
Parabolic Partial Differential Equations
In this way estimates can be obtained for the stability of the finite difference approximations. These must, of course, be treated with considerable caution since they were obtained by local linearization. However, experience tends t o indicate that the results are quite satisfactory. Let us now expand o u r model nonlinear P D E a n d consider a number of possible finite difference approximations. Obviously, the P D E can be written in many forms, one of which is
f{: : ° )
(4.6.50)
) 0
The question we raise is how t o handle this P D E so that n o stability questions arise. We could use an implicit form such as the Crank-Nicolson, b u t this leads t o an onerous algebraic problem to solve after the finite differencing. Instead, we turn to a three (r)-level scheme. Thus we form /5(«r.J[«r+l. -«r-l.J=2p[a(« , I
r
J +
,
/ 2
)(w , r
i + |
-M , ) r
1
~ (»r.,-\/l)(»r.s~ r.,-\)\a
U
The left-hand side is a central difference approximation with β(υ) evaluated at the center, and the right-hand side is a central difference for d/dy with a(u)u evaluated at the two points of interest. If we now replace u , , u and u _, by
y
r s +
M
l [ r + l , s + I + r.s+
r.i+ 1
=
« , . s = H"r+l.* + " , . . «,..-l iI =
, <
1+
U
M
+
, <
U
r-
r s
r
s
|]
r-l.s]
r+l.*-|+W,.5-l «r-|. -|] +
i
and let «(«,.,+1/2)-«[——2
(»r,s-\/2)- [
a
J
2
a
then the final finite difference approximation is achieved: (4.6.51)
/3(M , )[M r
J
r + 1
, -M _|, ] = |p[o {(M J
r
J
l
+
(»r.
r + l
+
+
1
l «,.i) _
i
i
- u
+
r
+
1
)
(«r-l,,+ | - « r - l . . ) }
-<*l{(Ur+\,s- r+\,s~\) U
+
s
(*r-l.,-«r-|.,-l)}.
+
( r. -U , -l) U
s
r
S
Some Extensions
207
which is stable and convergent (see Lees, 1966). Further, the unknowns at r + 1 are now linear. Now, let us consider a more general form of the nonlinear P D E , namely u =
(4.6.52)
<j>(x,y,u,u ,u ).
x
v
rv
We can approximate (4.6.52) by r+\.s
r,s
U
(4.6.53)
. I
U
h
^ ~ * \
r
.
.
<
h
s
k
U
r,s+\
U
> » , s , •
2
2k r,s +
u
r.s-\
"r,s-\
Equation (4.6.53) is the exact finite difference expression of (4.6.52). Now, if we replace u by u + e and e is the error that comes from roundoff error or linearization, then (4.6.53) can be written rs
(4.6.54)
r s
( r+\,s U
+
£
r
r s
r
\ . s ) - ( " r . s
+
s
+
£
r.s)
( r.s+l
+
U
£
r,s+i)-(»r.s-\
*r.s-\)
+
2k
k
2
Rewriting (4.6.54), we have (4.6.55)
U
r+\.s- r.s+( r U
e
= Φ x,y,u r.,
+
l
. -e _ ) s
r
s
r,s+\
+ e ,
rs
U
+
U
r s
l-2«r., +
u
r.,-l
U
2k
r,s~\
g
e
r.s-i
2k r,,+
,
_|_ r,s+\
e
1~
2
*r,,
+
Because 2k
£
and
r,l-H
2e
r,s~^~
E
r.s-\
are very small in comparison to 2k
and
U
r , s + l ~
2
u r
. s
+
U
r, s
I
208
Parabolic Partial Differential Equations
respectively, Taylor series expansion of
right-hand
+ Η
Η
= Φ
2k 3φ du _3φ
c
f.i+l
g
r,j-l
θψ 3u
,
2*
3«„ where — r,s+l U
U
r,s-\
and
2k
a = 3
A
2
Subtraction of (4.6.53) from (4.6.56) yields 1
-
f l
0 r . , + fl| C
+ a
2k
r,s+l
~
£
2
e
r , s +
£
r , j -I
where _3φ du
_ 3φ
. and
~3«..
_ 3φ a =-— du yy 21
This equation may now be rearranged to yield k
+ l - 2 p (laα - γ « ) 2
+ ρ(α -|α,)ε 2
Γ
0
,
If a «£0 and a > 0 , then the bounded solution (stability) of (4.6.53) is guaranteed. This implies that 0
2
(4.6.57a)
k<
(4.6.57b)
P<
2α
Ί
2a — 2
ka 2
0
Some Extensions
209
As an indication of the use of these bounds, consider » χ = ^
[«(«)«>•]
with a(u) = 1 - bu; then u =(\-bu)u -b(u ) . 2
x
vy
v
Replacing terms with the same finite differences as above, we find that " r + l . , = "r.s
+ p[0
-
*«,.,)( «r.i+ I ~
2
» r . s +
"r.s-\)
-i*(«,.,+ i-«,.,-i) ]2
Thus from (4.6.57) we have directly l-bu
(4.6.58a)
p<
(4.6.58b)
2(l-/J )+6/c u 2
M
v v
which serve as bounds on A: and h and can be used to generate a locally stable computation. We have previously commented on the use of predictor-corrector methods for solving the model parabolic P D E . Douglas and Jones (1963) applied this approach to nonlinear P D E . Thus, for the general quasilinear parabolic P D E "yy
=
>
V
U
y'
U
x)
with 3 ψ | θ « > 0 , a Crank-Nicolson approximation might be χ
^ [(δ «),, 2
Ι
1
+(δ
2 Μ
)
Γ +
1
,,] = ψ{(Γ + 1 / 2 ) Λ , ^ , Κ « , r,i+l
M
2k »r+\.s-
U
r,i-|
ί
+ ^ ,. )< +
ί
_j_ r + l . j + l M
M
r+I,j-I
2k
r,s
Stability and convergence can be proven for this approximation, but it involves a nasty set of nonlinear equations at the r + 1 level. However, linear equations
210
Parabolic Partial Differential Equations
can be obtained by the following predictor-corrector set: (4.6.59)
P-
(4.6.60)
c:
= ψ ( ( Γ + l/2)h,sk,
j- (S u) . 2
2
r+l/2 s
«,.„ ^ μ ( 5 « ) . Γ
' " r + l/2,l>
r +
I, j
where i>-(u ) = {[u + + u _ ]. Equation (4.6.60) is a backwards equation using the values at r + { which are predicted from (4.6.59). This scheme is convergent and is 0(2,2). Finally, we wish to consider Burger's equation rs
r
s
{/2
r
(4.6.61)
s
l/2
u + uu =au
,
x
which serves as a description of turbulence in a one-dimensional system. It is readily seen that this is quasilinear because of the uu term. But suppose that locally we assume that u — c = constant in this term; then we have v
u + cu x
v
=
ClU i t
'
which combines a hyperbolic component (the left side) and a parabolic component (the right side). If we replace u with a forward difference, u . with a backward difference, and the usual explicit central difference for u , a von Neumann analysis leads to the stability bound x
v
rv
N o t e that if each term in brackets were about equal, this indicates a stable h about one-half that for the model parabolic P D E . This infers that for (4.6.61) a safety factor of j should be used over that predicted by the simple model PDE. For the full equation (4.6.61), Cheng (1969) has presented two stable difference equations. With β — h/k and ρ = ha/k , the first approximation is a combination D u F o r t - F r a n k e l (parabolic part) and leapfrog (hyperbolic part): 2
Ur + Ι,ί
"r-Ι,ί ~ 5 . ψ "r.i+I ) +
2
2
- ( "r.i-I
p["r.i+l + "r.i-|-("r+l.i
+
A «,
Some Extensions
211
The second approximation is a two-step or predictor-corrector set. First the intermediate values u are calculated from r
s
"r.j = " r . j 4 , 9 [ ( « .
,) -(«,.,-,) ] 2
-
r
+ p["r. and then final values at u
"r
r + l
I. j =
+
s
"r.J
J +
J +
|-2tv.
2
+ «,.,-,]
J
are calculated from
-
\β[(ΰ ,,
+|)
Γ
+ p[",..,
+
|-2«
r
+
i,
2
I
-
( " r . J -
I ) ] 2
+ « .,_,]. r
Both schemes are second-order accurate and have a local stability bound /2 < l independent of a. As such they compare very favorably with any other method. 4.6.7
The Box Method
Keller (1971) outlined an interesting method, termed the box method because of the way in which the finite differencing is carried out. It has many attractive features, including simplicity and ease of programming, unconditional stability, second-order accuracy, and the ability to use extrapolation as Λ—0 to improve the solution with minimal effort. Moreover, it applies in a simple fashion to nonlinear as well as linear parabolic PDE. The model parabolic system can be written as
u = ~- [a{y)u ]
(4.6.62)
x
y
y
+ c(y)u
+ S(x,
y)
with initial and boundary conditions x=0,
(4.6.63a)
«(0,v)=/(v),
(4.6.63b)
a u(x,0)+a u ,{x O)=a (x).
(4.6.63c)
i8 ii(jc,l) + j 8 M , ( x , I ) = i8 (jc),
0
)
0
t
t
2
l
2
0<>>
χ >0
y = \,
x>0.
However, to use the box method, we must convert (4.6.62) to a set of
212
Parabolic Partial Differential Equations
x r+4
« x
ι
— •I—-
r-2" f — f -
4 R
R4 *S-t
*SH/Z
2
*S
Figure 4.4. method.
y
Mesh rectangle
for
box
first-order PDE. Thus the model equations become a{y)u
(4.6.64a)
—v
v
v = u -c(y)u-S(x,
(4.6.64b)
y
y)
x
u(0,y)
= f(y),
x=0,
0
α Μ(χ,0) + α,υ(χ,0) = ο ( χ ) ,
y=0,
x>0
ft«(x,l)
y = l,
x>0.
2
0
+ /8,»(x,l) = i8 U), 2
Now consider the mesh rectangle shown in Figure 4.4. Assume that (4.6.65a)
x =0,
Λ , = x,_, + A ,
r=
\,2,...,N
(4.6.65b)
y =0,
y = y-
s=
\,2,...,M,
0
0
r
s
+ k,
s t
s
where h and are completely arbitrary and can change over the full grid. W e define the mesh coordinates and the values u and v at the mesh points by r
r
(4.6.66a) (4.6.66b)
X
r - ) / 2 ~
2 [ r~l~ l
x
Λ-1/2 = 2[Λ +
X
s
r - \ ]
Λ-|]
(4.6.67a) (4.6.67b)
Φγ= 1/2.1
where φ represents either u or v.
= 2
[Φ,-.ι + Φ , - ~ . . ι ] '
r
s
Solution of Finite Difference Approximations
213
The difference equations that are to approximate (4.6.64) can be obtained by using central differences. Thus for terms such as v.. — u
κ„ = v.
or
we would use (4.6.68a)
.
(4.6.68b)
" - ' = « „ , - ,
,
, j f c i
/
2 .
- "'=«V,,-,/2f
N o t e that we average about the midpoint (x , y _ ) of the segment P\P - On this basis we replace (4.6.64) with the finite difference approximation r
_
(4.6.69a)
(4.6.69b)
flf
C
-t>,,_
l/2
r.«~ r. -l P
f
_
r.i-l/2~
M
C
(4.6.69c) (4.6.69d)
(4-6.69e)
M
l / 2
s
.
r-l.»-l/2
j-l/2 /~l/2.j-l/2 M
«,.o =
2
l / 2
^r-l/2.. -|/2 t
/U)
«0 r.O + » l r . O ( « 2 ) r . O U
u
=
rVr.A, + M . « =
On the basis of the finite difference approximations, Keller shows that a set of linear or nonlinear algebraic equations result. In the nonlinear case, Newton's method proves very effective; in the linear case, a block tridiagonal system is generated which can be solved efficiently via the method detailed in the next section. Further, using what seems to be very crude mesh widths in a Richardson extrapolation, a solution can be obtained (as h and k become small) with sufficient accuracy for most practical purposes.
4.7
SOLUTION OF FINITE DIFFERENCE APPROXIMATIONS
To this point we have concentrated on the development of various explicit and implicit finite difference approximations for the model parabolic PDE. In general terms, this has indicated that: 1.
Implicit methods generally have better stability properties than d o explicit methods. Using the classic explicit approximation, (4.3.9), as an
214
Parabolic Partial Differential Equations
illustration, there is a bound of ρ \; by contrast the stability bound for the Crank-Nicolson approximation, (4.3.18), and other implicit methods is p < o o . 2.
Implicit methods generally have higher accuracy. For the same two approximations in (1) the local truncation errors are 0 ( 1 , 2 ) and 0 ( 2 , 2 ) respectively. If one chooses the implicit weighting factor θ correctly, even higher accuracy can be achieved.
3.
Explicit methods seem to be easier to solve than implicit methods in terms of time and effort spent on a computer. This follows because, in the classic explicit method, only one unknown is involved in the use of the finite difference approximation; that is, given all the d a t a on the r line new values at the r +1 line can be calculated point by point. By contrast, in the Crank-Nicolson method, three unknown values are contained at r + 1 ; thus it is necessary to treat the system of difference approximations at all the interior mesh points on the r + 1 line simultaneously. This would seem to impose a significant lower bound on the computing time necessary to solve the implicit approximation as compared to the explicit approximation. This, of course, assumes that 0 < y < l ; if either boundary is ( ± o o ) , the number of simultaneous equations is infinite and special approaches (but not implicit) may be necessary.
Thus we have positive and negative features associated with solving either type of approximation. However, there is an efficient way to solve the implicit approximations which may tip the balance in their favor. 4.7.1
Solution of Implicit Approximations
If we select any implicit finite difference approximation and move all terms at the r + 1 level to the left side of the equality and all other terms to the right side, there results [ - a , u _ + b u, -c,u
(4.7.1)
s
l
s
1+
t
]
r
+
{
=
[,],,,_,,
where a b , and c are coefficients which depend on the particular finite difference approximation, and d contains all the terms not at the r + 1 level. For ease in handling, we drop the subscripts r + 1 , r, and r — 1 because we shall not need them further. As an illustration, if we pick the backward implicit approximation, (4.3.17), then )t
s
s
s
a = P= c
(4.7.2a) (4.7.2b) (4.7.2c)
s
ft
s
s
= l+2p d =u
.
Solution of Finite Difference Approximations
215
For the Crank-Nicolson and weighted implicit approximations, (4.3.18) and (4.3.20), we find, respectively, a
P ~
s ~
C
s
b = 2(p + \) s
and e , = P* = c,
b = \+2pe s
d ^p(\-e)[u , s
+ u ^]
r5+
[\-2p(\-e)]u .
+
rs
rs
Because s = 1,2,...,« — 1 for all interior points on the r + l line and if u(y=0)— «(0) and H ( y = 1 ) = w(l) (other boundary values modify what we are doing but d o not change the basic details), we may write (4.7.1) in matrix form, = {d},
[T){u}
(4.7.3) where
"«Μ
b
2
a.
-
(4.7.4)
[T] =
- α — ι
= tridiagonal { - a , b - c }; s
s
s
+ a (0)
«1 M
{«} =
2
| M
;
{«0 = _4,-I+*.,-i«0)
Thus to solve for all the unknowns {«} on the r + 1 line, we need to solve a set of simultaneous linear algebraic equations whose coefficient matrix is tridiagonal. If we can d o this in an efficient manner, we can start with the initial
216
Parabolic Partial Differential Equations
conditions and move up line by line; if a three-level formula is involved, we need a different procedure for r — 1, but r > 1 follows in the same manner. Fortunately, a very efficient and simple algorithm exists which can solve the tridiagonal system (4.7.3). It is basically a variation on Gaussian elimination and is frequently referred to as the Thomas algorithm. In contrast to the usual elimination method, it has excellent round-off characteristics. Moreover, the scheme requires the evaluation of two recursion relationships and not a matrix inverse. The basic idea is to factor [T] into two new matrices [T ] and [Τ ], which are both bidiagonal, {T}=[T ][T ], One then finds a solution for vector {/} ^ L
l
(4.7.5)
ν
u
lT ]{f}
= {d)
L
and uses this {/} to give a final solution [T ){u)
(4.7.6)
u
=
{f).
Obviously, { / } = | T J - ' < < / } , [T ]{u)=[T ]- {d), = {d). To illustrate the algorithm we write [T] as
and
l
v
L
thus
fjTJMO}
0
[7·] = *n-2
"n-2
0 where we have dropped the minus signs in (4.7.4) (this does not change the procedure but merely makes the algorithm more general). N o w we factor IT) as 0 α-,
α,
0
1
βι
i
β
2
[Τ) = [η][Τ„] = 0
α.
1
β„-2
1 where α, and β, are to be determined. By equating the left- and right-hand sides of this equation, we find directly the recursive relations (4.7.7a) (4.7.7b)
a, = b,
Solution of Finite Difference Approximations
(4.7.7c)
a, = i > , - a , p V , ,
(4.7.7d)
A= ~.
i=
f=2
217
«—1 α,ΦΟ.
2
From (4.7.7) we obtain the a, and β, from the known α , 6,, and c,. Now we may solve (
[T ]{f)
= {d},
L
where the elements of {/} are given by (4.7.8a)
/, = £• «ι
(4.7.8b)
/ =
a
' ~ ^ ' -
1
,
,=2
«-l
and in turn use [ ^ { κ } = {/) in the form (4.7.9a) (4.7.9b)
«„-, = /„-, u, = / , - f t « ,
+ I
,
ί = η-2,ιι-3
1.
Thus once (4.7.7) is used to develop [ F J and [T ], the two recurrence relations (4.7.8) and (4.7.9) can be used to find the unknowns u , ί = 1,2,..., η - 1. Of interest a n d importance is the requirement that det [T] not equal zero. This will be the case when conditions such as v
s
(4.7.10a)
|M>|c,|>0
(4.7.10b)
| A , H a , | + |c,|,
(4.7.10c)
|Α _,|>|α_,|>0
i=2,3
n~2;
a,c,*Q
η
hold; moreover, round-off errors are minimized when (4.7.11)
\β,\<\.
The restrictions on α , ^ Ο and a,c, Φ0 are not harmful in any way but may require a renumbering of the variables. Of major importance in the use of this algorithm is that only 5 5 — 9 [where [T] is ( S — 1 ) X ( 5 — 1)] multiplications and divisions are required to solve the sets of (4.7.7)-(4.7.9). This compares with 5 multiplications and divisions to solve an explicit approximation; such a comparison is crude at best b u t seems to be roughly verified by numerical experiments. Thus to solve for one line of
218
Parabolic Partial Differential Equations
the unknowns u via an implicit procedure is approximately five times as time consuming as an explicit procedure. If a standard Gaussian elimination procedure were used, the number of multiplications and divisions would be roughly ( 5 — l ) , and even an iteration procedure requires roughly (S— l ) operations. Thus the present algorithm is extraordinarily efficient. If we pick one of the various implicit methods under discussion, say the backwards implicit, then from (4.7.2) one finds that J + 1
3
2
|l+2p|>|p|>0 | l + 2 p | > | p | + |p| since p > 0 . Further, a simple analysis shows that | / 5 , | < 1 always. Thus the conditions (4.7.10) and (4.7.11) are satisfied and an accurate solution is assured for all positive values of p. 4.7.2
Explicit versus Implicit Approximations
From the above we see that there does exist an excellent algorithm for solving the implicit finite difference approximation in approximately five times the computing effort per r + 1 line required by the explicit approximation. However, the explicit approximation has a stability constraint on the choice of ρ (or given equal-sized Ar's, on the value of h that can be used). If p > 3 in the implicit form, the computational effort between the two methods becomes equal. If we further assume that h varies as k, as k tends toward zero to achieve convergence, the computational work involved increases roughly with l/k using the C r a n k - N i c o l s o n method and l/k with the classic explicit method. On this basis, one would prefer to use the implicit method rather than the explicit. It is worth pointing out that the restriction on ρ associated with the classic explicit method is a most serious one, especially in higher space dimension problems. If three space dimensions are involved, it turns out that the stability bound becomes 2
3
'* 2*3=1
0<
and if we select k = -m, the maximum h that can be used is approximately h =0.00001. If we wish to calculate to χ = 1, it will take 10 steps to reach this point. By contrast, the implicit approximation can take much larger steps, sufficiently large so as to make the implicit more favorable in terms of computing time. However, one must be careful. When large steps in Λ are used, the accuracy of the solution may suffer. Thus when comparing the classic explicit and the backwards implicit methods, a large step in the latter would mean 0(h)» 0(k ); the computing time is shorter but the accuracy is much less. In fact, 5
2
219
Composite Solutions
one can run some simple calculations to show that if an accuracy of say 1 0 ~ or 1 0 must be achieved, then the computing times by the two approaches are comparable. T h e Crank-Nicolson behaves much better than the backwards implicit because its local truncation error is second order in h. The conflict between accuracy and efficiency is the reason many people favor the D u F o r t - F r a n k e l type approximation. It is stable for all ρ and is second order in h. However, even here there are defects; it converges under a more limited set of mesh refinements than d o the other approximations and it is a three-level (in r ) formula. The latter point is not serious but the former can cause serious computational difficulties. Nevertheless, this approximation usually works well in practice. 2
- 3
Although this discussion does not really demonstrate that one approach is better than the other (we have also neglected such items as programming difficulty), most workers seem to prefer implicit methods. When considered for higher-dimensional problems with special alternative approaches available, this feeling is further strengthened. However, we point out that methods which combine an explicit and implicit type of calculation may be the most attractive in terms of computational effort.
4.8
COMPOSITE SOLUTIONS
Consideration is given here to the feasibility of composite methods for solving linear and nonlinear PDE. Composite techniques are defined as methods wherein numerical solutions are obtained through the combination of preexisting numerical solutions. Thus the general form of a composite might be u (P)=F[ (P),u (P),...,u„(P)],
(4.8.1)
(
U]
2
where u {P) is the composite solution at a particular mesh point Ρ (Ρ is used here to denote r,s for simplicity), «,(/°), u (P),...,u (P) are different approximations at the mesh P, and F( ·) is a functional relation. The combination can be applied in a global or local manner depending on the use of the composite. A global composite is one in which the composite solution is not utilized in any continued calculations; thus global composites evolve from solutions obtained over the entire space of independent variables. For local composites, the composite is used in the continued calculations of the different solutions. Therefore, the local procedure is a line-by-line (at some r) algorithm where the different solutions are combined on a particular line and the composite becomes the initial value for the continued calculations of the different solutions. Embedded in the terminology of composite solutions are a variety of methods, such as extrapolation (deferred approach to a limit), alternating direction, and acceleration techniques. Here we present only a limited analysis based on the work of Burgess and Lapidus (1973), but the reader will recognize c
2
n
220
Parabolic Partial Differential Equations
the other areas as they arise. O u r concentration will be on parabolic P D E (see also Keller, 1971), but such authors as Hofmann (1967), Gourlay and Morris (1968), and Werner (1968) have applied some of the techniques to elliptic and hyperbolic PDE. In a global sense, we deal with extrapolation in which the solution over the space of independent variables is calculated and combined with solutions for successively smaller mesh spacings, characterized by k . In a local sense, we deal with linear combinations of different solutions (i.e., a predictor-corrector scheme) to extend the region of stability. Many of the ideas presented here go back to Richardson and Romberg (see Lapidus and Seinfeld, 1971, Chap. 2) and have been used extensively in numerical quadrature and the numerical solution of O D E . The interested reader may wish to consult such papers as Pereyra (1967), Lindberg (1972), and Strom (1973), and the review by Joyce (1971) for further details in these other areas. We should also point out that the cost of computing a numerical solution grows exponentially as ft, k -»0. Thus it is the objective of extrapolation either to reduce the error for a given computational effort or t o reduce the cost of computation at a preset error level. This is achieved not by obtaining solutions for very small h and k but rather by using large h and k and calculating the result as if small mesh increments were used. m
4.8.1
Global Extrapolation
Based on previous sections of this chapter it seems feasible to assume that the truncation error of the finite difference approximation can be represented as a polynomial series, (4.8.2)
u {P k )=c 0
t
m
+ c k* + c k% +
Q
l
...,
2
where the left-hand side represents the finite difference approximation at the mesh point Ρ as a function of the spacing k \ the c,'s are unknown (perhaps) functions of the independent variables at point P, the γ, are integer powers, and the subscript 0 on u is to indicate the finite difference approximation. Obviously, c is the exact solution since, for k -»0, u -* c . Thus an objective to any calculation is to remove the terms c , / c £ , e s o that u is as close an approximation to c as possible. The methods for achieving this depend on whether the γ , , γ , . . . are known or unknown. When the γ , , γ , . . . in (4.8.2) are known, an extrapolation formula can be derived for general spacing sequences, k . In particular, two such sequences are rather obvious. The first, abbreviated SSI, is m
Q
m
0
0
Q
2
0
0
2
2
m
{k ,k /2,k /3,k /4,k /5,...}, Q
0
0
0
0
[SSI]
Composite Solutions
221
where k is the largest spacing and m 2*0. The second, SS2, is 0
* „ = φ ;
{Λ ,Α: /2,Α /4,Λ /8,Α /16,...}, 0
0
0
0
[SS2]
0
which corresponds to halving the characteristic spacing with each new solution; SS2 is obviously a subset of SSI. The objective of extrapolation (say the ith extrapolation) is to eliminate the Cj term of the series (4.8.2.) The zeroth extrapolated result is the original finite difference approximation. Thus for two grid spacings k and k , we may write (4.8.2) at the same mesh point Ρ as (for convenience we drop the P) m
u (k )
(4.8.3a)
0
(4.8.3b)
= c + c ^ + ...
m
« (fc 0
m + l
m + l
0
) = c + c,iVJ' ,+ .... 0
+
Combining the two equations to eliminate c,, we obtain the first extrapolated value M , ( / c ) , where m
(4.8.4)
« , ( k ) = C + C * 2 + C kl> m
0
+...
3
2
and
The C, in (4.8.4) are functions of c,, γ,, k , and k that m
\C,\<\c,\,
(4.8.6)
and are bounded such
m+x
«>2.
Thus we have eliminated the first term in the truncation error and also reduced the remaining terms in absolute magnitude. Consequently, u (k ) is a better approximation to the exact solution than u (k ). It is of interest to show some of these features. Thus if we substitute (4.8.3) into (4.8.5), the first extrapolated value u (k ) will have the form of (4.8.2). But the coefficients are x
Q
x
(k /k 1 m
c
°-
(k /k ) m
c
m+i
'-
„ .
m
m
) C Q ~ Cp Y I
m+
c
' \kl,+ \— Cyk^l c
φ
(k /k ) m
m+i
_
φ
_
'c k^ 2
+l
— c k% 2
U
°
m
222
Parabolic Partial Differential Equations
where
~
θ
Φ
·
For SSI and γ, = 2 , γ = 4 , it follows that 2
m=0,
r? = - ι
m = \,
6 = ~t
m
θ>-\,
while for SS2, 0 = - { for all m. Since | 0 | < 1 , (4.8.6) follows directly. From this analysis we can see that combining «<,(&,) and u (k ) yields u (k y, but also u (k ) and M (& ) yields u,(A: ), and so on. In the same sense, we can combine «,(&,) and u , ( f c ) y> 'd "2(^1)* second extrapolated value, and eliminate the c term. In diagram form this entire procedure is shown in Figure 4.5; the arrows indicate the values needed to calculate the next approximation. At any one level of extrapolation only the information on a horizontal line in Figure 4.5 need be kept in computer storage. It is important to remember that u (k ) represents a complete numerical solution of the P D E problem. Q
t
t
0
2
0
3
2
2
1 0
e
a
2
2
t
m
The following steps illustrate the computational algorithm: 1.
Calculate
2.
Perform one extrapolation, combining u {k )
3.
Replace « ( * - i )
u (k ). 0
m
0
0
m
u t Μ 0
w
'
t n
u
o( ) k
m
since u (k _ ) 0
m
and « ( / c _ | ) to yield
m
t
0
m
is n o longer required.
\ ^
\ u (k ) — 0
4
•
•
u, ( k ) — 3
·
·
u (k ) — 2
2
·
·
U (K, ) 3
·
·
a
Figure 4.5. Schematic of global extrapolation based on a known polynomial truncation error.
Composite Solutions
m — 1:
For / = 2,3 4.
Perform /th extrapolation combining u _ (k _ ) calculate u,(k _ ). l
m
5.
223
]
m
and w,_,(fc _,) to
i+l
m
l
Replace M,_ ,(*„,_,) with
,(*„_,+,).
In this way we enlarge the last horizontal line in Figure 4.5, replacing the line from left to right. If {γ,} = { 2 , 4 , 6 , . . . } and SS2 is used, the / th extrapolation formula is given by (4.8.7)
.
|
(
J
t
J
" • - - ( * » • ) - ' - ( * . ) , 4' - 1
=
That is, the weighting factors for the linear combination of « , _ , ( A : ) and i-i(*m) 4 ' / ( 4 ' —1) and — 1 / ( 4 ' - 1 ) , respectively. If the same {γ,} are used but with SSI, m+1
M
a r e
u (k
(4 8 8)
)= ^
m
~
l
+
l
^^ '-i(^m+i)~ (/c _, ,A ) -i m
+
l
/
M
i-\(k )
u
m
2
m
But note that since k
m
= k /(m
m + ]
+ l),
0
k
+
m-i±l
k
m+2
_
m + ]
m-i
+ 2'
When the γ, are unknown, there are three unknowns, c , c,, and γ,, in the first extrapolation. Thus a single extrapolation requires three spacings in k \ further, the SS2 sequence is required to be able to eliminate the c, term. This type of extrapolation, usually called Aitken extrapolation, uses u (k ), o(k +\), and «0(^^1+2) i the formula 0
m
0
u
w
m
t n
m
(4.8.9)
«,(*„)=
«,-.(*,, 2)
[ " - ( ^ » ) - » * - ( ^ . ) ]
+
2
[«i-l(*«+2)-2«/-l(*«+l)+«(-l(*«)]
where k - k / 2 . Figure 4.6 illustrates schematically this extrapolation. Obviously, this process is less efficient than the previous extrapolation method because three approximations per extrapolation are required. If one introduces the terms m
m
0
R = truncation error of Aitken extrapolation/truncation error for (4.8.2) using
k /4, m
224
Parabolic Partial Differential Equations
U0< t'
\ ^
k
X X
u
oU > — 4
U
< (K )
/
3
Figure 4.6. u
o
( l ,
Schematic of Aitken extrapola-
tion.
5'
which are the ratio of the third to the second terms in (4.8.2) and the ratio of the extrapolated truncation error to the error of the normal solution with the smallest spacing, a plot of R vs. ζ shows a maximum. For small ζ (the third truncation error term < second truncation error term), the value of R is small and extrapolation will reduce the error. This is also true for large z. However, near the maximum the extrapolation will fail to reduce the error significantly. Unfortunately, this maximum is a function of γ, and γ and thus one cannot, a priori, predict where the maximum will occur. The stability of extrapolation techniques is also of interest. It is not difficult to show that the same stability constraints that hold for the primary finite difference approximation also hold for the global extrapolation composite. Thus if we extrapolate once with the classic explicit which has an amplification factor (4.5.8), 2
i = l-4psin ^, 2
then (4.8.7) for i = 1 yields
,„.„,
{„(*)- '«*^-«*'. 4
Here £ (k) represents the amplification factor for one extrapolation, combining the finite difference solutions at k and k/2. Since A = p/c , the halving of k requires that A be divided by 4 to maintain a constant p. This procedure could be continued with the classic explicit as more extrapolations are performed or a different finite difference algorithm is employed. E]
2
4.8.2
Some Numerical Results
Here we wish to present some numerical results obtained with global extrapolation using the model parabolic P D E (4.8.11a)
«.x = «,·.·'
0
x>0
Composite Solutions
225
and augmenting conditions (4.8.11b)
M = sin2iry,
0
(4.8.11c)
H=0,
y=0,
x=0
y = \,
x>0.
Many other linear and nonlinear P D E systems have been used by Burgess and Lapidus (1973), but the present one serves to show the power of the method. T h e classic explicit finite difference approximation was first used with ρ = \ and k = 0 . 2 ; then the further solutions were obtained with ρ held constant but k decreased according to the SS2 spacing sequence. In Figure 4.7 the log|error| is plotted vs. log|/c~'| for y = 0 . 4 and χ = 0 . 1 ; at this location the exact solution of (4.8.11) is u = 1.1342X 1 0 ~ . This single point is quite representative of the results at other x, y points. For extrapolated results, the log|error| is plotted against the k corresponding to the smallest spacing used in the composite solution. As an example, four approximate solutions are required for those extrapolations; thus the three extrapolation errors are plotted vs. k / 8 , the smallest spacing. 0
2
m
0
In Figure 4.7 the number of extrapolations is a parameter. The solution of the finite difference approximation converges with kj, corresponding to the slope of the zero extrapolation curve. The one-, two-, and three-extrapolation curves have increasing slopes corresponding to a truncation error of k k%, and k , respectively. Also shown on Figure 4.7 is the use of Aitken extrapolation and, as expected, the results are similar but displaced to the right one unit since three approximations per extrapolation are required rather than two approximations. A
m>
%
m
As an example of the efficiency of this global extrapolation, the error at the k /c\ spacing with zero and three extrapolations differs by about three orders 0
226
Parabolic Partial Differential Equations
of magnitude, whereas the three-extrapolation calculation requires only 50% more computing time than the k /% finite difference solution alone. If the zero extrapolation curve is extended to this error level of 1 0 ~ , a spacing of & / 2 5 6 would be required; this would involve roughly 2 X 10 % more computing time than the k /i solution. A number of other interesting points can be quoted as well. As an illustration, the curves in Figure 4.7 d o not necessarily continue to extend straight down as k is continually decreased. Round-off error may intrude to turn the curves up. Results using the Saul'yev alternating direction method vs. the Crank-Nicolson approximation reveal that the alternating direction methods do not work as well. Thus with no extrapolation, the ratio of the error between the two methods is between 5 and 40 (the Crank-Nicolson being more accurate), while after two extrapolations the ratio is 50 to 4000. Finally, the SSI space sequencing seems superior to the SS2 sequencing. As an example, for a computing time of 10 units (a normalized factor for the particular computer used), the following errors are observed with the C r a n k Nicolson approximation and a slightly different model parabolic P D E : 0
7
0
6
0
0
3
N o extrapolation:
|error| of 1 0 ~
Aitken extrapolation:
|error| of 3 X 1 0 "
SS2 extrapolation:
|error| of 1 0 ~
SSI extrapolation:
|error| of 3 Χ Ί 0 "
4
5
7
1 1
In the same way but at an error level of 10 , the following normalized computing times are required: 8
N o extrapolation:
>10
Aitken extrapolation:
10
computing units
5
SS2 extrapolation:
3X10
SSI extrapolation:
4X10
4.8.3
computing units
8
3
2
computing units computing units
Local Combination
A local combination or composite is one in which the composite solution is used in the continued integration of the approximations. If the composite u (P) replaces the approximations « , ( / * ) , u ( P ) , . . . as the initial value for the continued calculations, then the process is a local one. It would seem apparent that these local processes drastically influence the overall stability of the solution as it evolves. Of interest is that the range of stability for conditionally c
2
Composite Solutions
227
stable approximations can be increased by local combinations. Local procedures are always mesh point-by-mesh point or line-by-line combinations depending o n the finite difference approximation used. All space by space (the entire grid of mesh points) are global, since there is n o continued calculation of a particular approximation after the solution is obtained over the whole domain. The local combination algorithm can b e stated as: 1.
Initialize u (x = 0 ) with initial data from the PDE.
2.
Calculate « ( 0 + A ; p ) for m = l , 2 , . . . , where P — h /k . This is equivalent to first using the finite difference approximation to go from χ = 0 to χ = A with p (use A ) ; then go from χ = 0 to χ = A / 2 to χ = A
c
1
m
m
m
0
0
with p , (use A / 2 ) ; then go from χ = 0 to χ = A / 3 to χ = 2 A / 3 to χ = A 0
with p (use A / 3 ) ; and so on. 0
2
3.
Combine these solutions via the formula t o be given shortly t o yield M (A). This, of course, is the set of all mesh values on the τ — 1 or A line.
4.
Use « ( A ) as an initial set for the next calculation to reach χ = 2 A ; this is continued as far in the x-direction as desired.
(
C
For one combination, the formula for the composite is (4.8.12)
« (p ) = e «(p,) + ( l - e ) u ( p o ) . f
0
1
1
where p , = p / 2 , p = h /k , a n d a, and (1 — a , ) are weight factors for the combination. In other words, we put the two solutions w ( p ) a n d « ( p , ) together via a linear combination. In the more general case, we would relate η solutions 2
0
0
0
0
(4-8.13)
M
C
(
P
O
)=
Σ m =0
a u( ), m
Pm
where the requirement on the a is m
Σ *•, = ·•
m =0
Let us now examine the stability of the classic explicit method when used in one or two combinations. W e again use the amplification factor £= l-4psm ^2
or, in a simpler form for our use, £= l-2p(l-cosp\t).
228
Parabolic Partial Differential Equations
But because the range of cospV: is - 1 to + 1, we can also write ί = 1-2ρΔ,
(4.8.14)
where 0 < Δ < 2 . Obviously, (4.8.14), which we write as ξ(ρ )=1-2 0
Ρ ο
Δ,
is the decay factor for a one-step (the normal case) approximation. For a two-step approximation over h the factor is £ ( p , ) . That is, « ( ρ , ) has an amplification factor of £ ( p , ) or ξ ( ρ / 2 ) for each A / 2 step and ξ ( ρ / 2 ) for the two-step integration. For the composite, using (4.8.12), 2
0
2
0
(4.8.15)
0
0
ξ,(Ρο) = ο . ( 1 - Ρ ο Δ ) + ( 1 - Α ) ( 1 - 2 ρ Δ ) ,
0<Δ<2.
2
1
0
But for stability, | £ ( p ) | < l , which yields two inequalities c
0
€,(Po)< + l i,(Pb)>-l or, using (4.8.15), (4.8.16a)
1-2ρ Δ + α,ρ Δ «1
(4.8.16b)
1-2ρ Δ + α,ρ
2
2
0
0
2
Δ >-1. 2
3
The solution of (4.8.16) yields a two-dimensional region representing the p and a , which form stable composites. T h e maximum stable value of p occurs at α, = I (see Burgess and Lapidus, 1973); at this point p = 2.0. Thus with one local composite the stability region is extended from the usual value of ρ = {- to ρ = 2.0. For 1 < p < 2 this procedure combines unstable solutions of the classic explicit approximation at p and p / 2 to yield a stable composite. For two combinations, the form of the local composite is (using the SSI spacing sequence) 0
(
0
0
0
0
(4.8.17)
0
« (ρ ) = β 2 « ( j ) + ί
fli«(y)
0
+ 0-ei-e )«(Po) 2
and the stability inequalities are - 1< 1-2
Δ + ( j a + α, ) ρ Δ - ^ ρ 2
Ρ ο
2
2
3 0
Δ
3
< + 1.
N o w one has a three-dimensional plot for p , a,, and a - With ο = Ιτ d a, = ^ , the maximum stable p is p = 4 . 5 . Thus the region of stability has been increased from | to 2.0 to 4.5 by the local composites. a n
0
0
0
2
2
Composite Solutions
229
One can continue this procedure and it is not too difficult to show that with these combinations (SSI sequence), the maximum stable p is 8.0 with o = 2 2 7 / 5 1 2 , α = 188/512, and a, = 8 1 / 5 1 2 . In fact, for η combinations 0
3
2
(4-8.18)
Ρ ο Ι ™ ^
1
^ ^ .
It is also possible to use the SS2 sequence, but the results are never as good as with the SSI sequence. We may also use these results to derive new finite difference approximations. Thus if the weighting factor (4.8.19)
=
fll
l
Po
is selected in the one-combination case, a new four-point finite difference approximation results from the composite. This is shown in Figure 4.8/J, and Figure 4.8a is the one-combination composite. The stability range for Figure 4.8Z> has the same maximum, ρ < 2 . 0 , as the composite. This idea can be extended to the two-combination case with 0
Po
8 3p
_ Po 2
0
p-k-
i-2
i-4
i
a ) Arbitrary α,
h
Η
i-2
U - - ,
i-4
i+2
i+1
ι*
-Ηί
i+2
i+(
b) Special c a s e , a = l / y = k / h
0
z
0
Figure 4.8. Schematic representation of equivalent difference equation for one combination composite, (a) General case with arbitrary a. (b) Special case a, = l / p . (From Burgess, 1971.)
0
230
Parabolic Partial Differential Equations
to yield a new four-point finite difference approximation with p < 4 . 5 and the three-combination case with 0
a, =
=
fl
3
\6 Po
27
27
2po
Po
Π
18
" Pi
Po
- T
7 +
3
—
Po
·
In fact, for η combinations the following finite difference results: (4.8.20)
approximation
(Λ + 1)
with Po'
( n + 1)
2
O n e may use a Taylor series expansion in (4.8.20) to show that the local truncation error is (4.8.21)
Truncation errorl „
=
h 2
k' > 12 v +l
2
UY
as compared to the classic explicit form, (4.3.10)
Truncation error|
()g
^=
h__k*_ 2 12
«4,·
The ratio of these two truncation errors (neglecting stability for the classic explicit) indicates that the composite is more accurate at the same p . However, the ratio of the truncation error of the composite at its maximum stable p to that for the classic explicit at its maximum stable p ( | ) shows that the composite truncation error is always greater. 0
0
0
4.8.4
Some Numerical Results
Here we report some results for the model parabolic P D E system: (4.8.22a)
u =u, x
yy
Q
x>0
Composite Solutions
TABLE 4.1.
Local Composites: Error Reported as |error| X 1 0 η
Method"
Po
V -0.2
1[*=' 0.1, Ay =-0.05,Ax
Classic explicit Composite of CE Composite of CE (1) Composite of CE Exact solution
231
0 1 2 3 —
0.5 2.0 4.0 8.0 —
y=0.6 =
m
s
y=0.S
pAy ,SS\] 2
113.5 462.3 940.7 1843. 0.08093
305.2 1209. 2956. 356.0 0.3714
226.3 886.8 2522. 3272. 0.6547
[* = 5.0, Ay-=0.05, Ax = ρ Ay ,SS1] 2
Classic explicit Composite of CE Composite of CE (2) Composite of CE Exact solution
0 1 2 3 —
0.5 2.0 4.5 8.0
~0 0.0306 925. 0.1142 0.9999
~0 0.0189 1498. 0.0706 1.000
~0 0.0099 1274. 0.0301 1.000
"From Burgess. 1971. (1) Results reported at ρ =4.0 rather than 4.5 so that error at Λ =0.1 can be given (i.e., χ =0.1 is not a multiple of 4.5X Δ y ) . (2) Inordinately large errors have not been explained although the method is stable. Errors are reported at χ =4.950 since 5.0 is not a multiple of 4.5χ Δ y . 1
2
(4.8.22b)
u=0,
0
(4.8.22c)
u = l,
y = \,
u =0,
(4.8.22d)
y
y=0,
x=0 x>Q x>0.
The numerical results are reported in Table 4.1 for χ = 0 . 1 and χ = 5.0. The error is shown for zero, one, two, and three combinations at three values of y. The zero combination is the classical explicit solution and the SSI spacing sequence is used. It is clear from Table 4.1 that the composite is stable over the extended ranges of p; also, the larger truncation error associated with the large steps is apparent. There seems to be a discrepancy in the case of two combinations, but the reason for this has not been found. 4.8.5
Composites of Different Approximations
In previous sections we have considered the effect of forming composites with a fixed approximation while varying A and k. Now we look at different approximations combined in a composite at fixed A and k. T h e Saul'yev alternating direction approximations (4.6.24 and 4.6.25), which are averaged together, fit directly the definition of a local composite. The computational
Parabolic Partial Differential Equations
232
advantage here is the increase in stability and also in truncation error. Only local composites are considered here since global composites do not change the stability bounds. Let us consider in detail the following two cases: 1.
The classic explicit and the Crank-Nicolson composite.
2.
The Saul'yev and classic explicit composite.
If we call the solution to a parabolic P D E via the classic explicit approximation « ( r + l) at the r + 1 line (suppressing the index s) and that for the Crank-Nicolson u (r+ 1), then a local composite may be written as C E
CN
(4.8.23)
« (r + l) = e u r
C N
( r + l) + ( l - f l ) i i
C E
( r + l).
where a and (1 — a ) are the weighting factors. Using the appropriate finite difference approximations for u ( r + 1 ) and w ( r + 1 ) and a von N e u m a n n stability analysis (using the appropriate amplification factors), two inequalities result: C N
C E
1-ρΔ + 2ρ Δ (α-ΐ) < + l. 1 + ρΔ 2
2
With the two parameters ρ and a, we may now determine the region of stability for the composite (4.8.23). This is shown in Figure 4.9 with, of course, the case a = 1 showing ρ < oo. The truncation error for the composite can be shown (in the usual way) to be k . 12
k (a~\) u 2
2
Truncation e r r o r =
2
P
4y
+
0(k ) 4
and if s is chosen as 6p the error becomes 0(k*). This optimum a, also shown on Figure 4.9, is stable only if p < 1.5. However, when compared to the Douglas optimum finite difference approximation, (4.3.24), which has the same truncation error but is unconditionally stable, this particular composite, (4.8.23), seems to be of only academic interest. If we call w ( r + l) the numerical solution of the model parabolic P D E using the Saul'yev alternating direction and averaging technique, then we may SA
Composite Solutions
233
write a composite as (4.8.24)
u (r c
+ \) = au (r SA
+ \) + (\-a)u (r CE
+ \).
This has the advantage that all finite difference approximations are explicit and thus require minimal computing effort. Burgess and Lapidus (1973) have analyzed this composite a n d presented numerical results. There it is shown that for larger mesh spacings, the composite is much more accurate than the Saul'yev alone and is more accurate than the Crank-Nicolson. However, as the mesh spacings become small, these differences become small. W e should also point out the work of Joubert (1971) in which h e applies the unstable finite difference approximation of Richardson, (4.3.15), to the model parabolic P D E . However, by imposing an additional smoothing solution, which is really a local composite, he is able to generate a conditionally stable algorithm. Extensive numerical details are presented and the interested reader should consult this paper for an interesting illustration of how composites can change the normal behavior of a finite difference approximation.
234
Parabolic Partial Differential Equations
4.9
F I N I T E D I F F E R E N C E A P P R O X I M A T I O N S IN T W O S P A C E DIMENSIONS
In the present section we wish to consider various techniques for solving the model parabolic P D E
defined in the rectangle 0 < V | < l , 0 < y < l . Obviously, there are initial and boundary conditions that must be added to (4.9.1), but these d o not seriously affect the finite difference approximations and their solution beyond that already mentioned. The terminology to be used here is to specify u{x, y , y ) and u , with the increments in the mesh values corresponding to x, y , and\y being h, k , and k . For simplicity in the manipulations, we shall usually write A, = k = k and therefore >>, and y increments are assumed equal. Extensions of these definitions will be apparent as we proceed, and we shall introduce other features when it seems appropriate. 2
}
r
s
x
{
2
2
2
2
2
Note that on this basis, we are going to consider the evolution in the χ direction of a plane in y and y . Figure 4.10 is a schematic diagram of a portion of the two-dimensional plane evolving in the χ direction. x
2
4.9.1
Explicit Methods
It would seem apparent that we now have many options in terms of explicit and K , . , . A substantial number and implicit representations for the terms u of these approximations can be obtained by starting with a weighted implicit VtV]
V 2
"r-M , ι , ι .
h
Figure 4.10. Two-dimensional plane and corresponding finite difference mesh increments.
Finite Difference Approximations in Two Space Dimensions
235
form of (4.9.1). Thus we write, with 0 < 0, < 1 and 0 < 0 < 1, 2
(4.9.2)
- -'~"'' -'=^(u +i.s u,-l»r us.,
Ur+] s
+
r
Ur us->.,)
+
s
+
\ —θ + —T (»r. +\,,- r.s, k 1
2u
S
+
+
U
l
r.s-\.,)
β +
7 Τ (
Μ
Γ +
I.J./+
+ r+\.s.t~
I ~ r+l.s.l 2u
U
l)
k \ —β k As before, if we select 0, = θ = 0 , we shall obtain an explicit finite difference approximation (termed the classic explicit) 2
(4.9.3)
",+ ! . , . , =
+
P("r.
l . r + "r.s-
i +
+ « , , , _ i — 4t/ > J t
« Γ . , . Η -
1.1 +
r
,).
5
I
[classic explicit]
Note that (4.9.3) uses the five points labeled 0, 1,2, 3, and 4 in Figure 4.10 to calculate u . Obviously, the method of calculation involves a point-bypoint evaluation on the r + 1 plane using the points on the r plane. Given the initial conditions for r = 0, the plane by plane evaluation follows. As a special case, the choice p — \ yields r + ] s l
(4.9.4)
« +|,,., =
+ «*r.,-
Γ
1,1
+
"r.,.1+1
+
«r.,.l-|)
and we thereby eliminate the u , term. Stability of the classic explicit approximation (4.9.3) can be ascertained using von N e u m a n n ' s method. The extension of (4.5.5) for the one-dimensional case now becomes J (
£ ( x , >>,, y ) x e e ' P ' ' e ' y x
y
2
P l V 2
=
y 'Pi 'fii' rh
e
e
sk
k
e
When substituted into (4.9.3) and common terms canceled, there results (4.9.5)
ξ — amplification factor = e * = 1 —4p s i n ^ - + s i n ^ T
2
Since | £ \ < 1 is required for stability, it follows that - l < l l--44 p ([ss i n ^ + s i n ^ | < l . 2 2 2
2
2
236
Parabolic Partial Differential Equations
But /?, and β are arbitrary and it follows that 2
1
p<-
(4.9.6)
2ΐ8ΐη γ-+5ΐη -|-| 2ί
2ί
1 4 ·
<
We see that (4.9.4) is taken at the upper limit of the stability bound for (4.9.3). the stability Finally, if we h a d not used k = k = k b u t retained k =£k , bound would b e t
2
x
2
1
(4.9.7)
This becomes (4.9.6) when k = k . It is also possible t o derive (4.9.3) in other ways. In particular, we point out that x
(4.9.8)
2
«r i.,,, = +
where (8fu) ,
[l + p(*, + e; )]«,.,.,. 2
i
1
=u -2ιι + u ^ , a n d {8 u) = u , , -2u r.,.t-\ yield the identical equation. F r o m the way we have derived the finite difference approximation, it seems obvious that the local truncation error is 0 ( 1 , 2 ) . The stability bound of ρ < \ for (4.9.3) is restrictive to say the least. This can be relaxed slightly t o ρ *s {· by including additional points in the r plane; however, the truncation error remains at 0 ( 1 , 2 ) . This new nine-point a p proximation comes by adding a term ρ δ δ t o the right-hand side of (4.9.8). In a sense, this c a n be thought of as adding another term t o the right-hand expansion. If the explicit expansions are carried out, the result adds the term 2
rj
+
r s + U l
Λ ί ι ί
r
s
y
rst
r
+
l
r
s
l
u
2
2
2
2
(4.9.9) P [( « r . + i . / + i 2
i
+
( « r ,
J
+
_
2
u
,. ./+i+ i
l . , - r 2 «
M
.
(
1.,+i)-2(M
r j +
,,-2u
r
,,., +
Ιν.,-1.,)
- l + " M - U - | ) ]
to the right-hand side of (4.9.3). The accuracy of this new approximation c a n be increased to 0 ( 2 , 4 ) by selecting the special, but stable, case of ρ = \ . This is possible because, in the local truncation error term, there occurs a factor of ( p — £); when ρ = \ is selected, this entire term disappears and t h e truncation error is improved. Note, however, that (4.9.3) plus (4.9.9) uses all nine points o n the r plane of Figure 4.10.
Finite Difference Approximations in Two Space Dimensions
237
Although these formulas are interesting, the finite stability bounds usually mean that, even though these schemes are explicit and thus simple to program and compute, they find little actual use. Although we present some algorithms shortly which are used widely, we wish to indicate here the extension of the Saul'yev and D u F o r t - F r a n k e l approximations. As in the one-dimensional case, these approximations are explicit and completely stable; however, the local truncation error is 0(1,'2) and consistency questions exist. Nevertheless, these approaches have much to recommend them. The Saul'yev approximations in two dimensions have been presented by Larkin (1964) and in a more general context by Birtwistle (1968). The basic idea resides in the replacement of K (and also M ) , exactly as in the development of (4.6.23). Thus we write, in analogy to (4.9.2) and (4.6.23), VjV)
( .9. ) 4
1 0
- -'~ - -'
Ur+l s
= ^- (u
Ur s
2
r + U s
+
.
V2V2
U l
-u
, -u ^ l
r
• «r.i.l
1,1
r,s+
+•
r + U s
2
+ u , r
s + U l
)
«r.,-l,i)
+
r,3,t
.1
; ( « r + 1.5.1-1
l
U
M
r.j.l+l)
+ Obviously, for 0, = θ = 0 , this is merely (4.9.3). However, for 0, and θ Φ0, we may rearrange (4.9.10) to 2
(4.9.11)
u
r+
l.j.r '
2
l + 0,p + 0 p 0 | r + l , j - l . / + 0 2 r + l . , , , - | M
M
2
+ (l-»iK,-i, + (l-«iK,„.-i (
+ « , . , + !., + « r . , , , + 1 -
(
4
~
θ
\ ~ 2 θ
-
^
) «,.,.,
-
[Saul'yev 1 ] 2
Although this approximation does not appear explicit because «,+ ι , , - ι , , and « , a r e on the right-hand side, a careful use of the equation makes it explicit. This is, of course, the same idea as with (4.6.23), the Saul'yev I; in fact, we call (4.9.11) the Saul'yev I for the two-dimensional version. If one begins the calculation at the upper left corner of the mesh space and proceeds to the right along a line, the only unknown is u . The values of u , _, , r +
s
2
r+
U
r
r +
s
238
Parabolic Partial Differential Equations
and u _ are initially boundary values and then become previously calculated values. In other words, only the single unknown u , is calculated point by point and then line by line, an explicit calculation. In much the same manner, we may also obtain the approximation r + l s !
x
r+]
(4.9.12)
«,+ , . , . , -
ι
+
β
Ρ
+
Λ
0\ r+\.s+\,t
s
+ ^2 r+l,s,l+l
U
U
+0-βι)«,., ι.,+(ι-·Μ«,.,.Μ-. +
+ «r.i-l.l
«r.*.»-l
+
[Saul'yev I I ] 2
which we call Saul'yev I I . This calculation is explicit from right to left. Equation (4.9.12) may be combined with (4.9.11) and averaged in exactly the same manner as in the one-dimensional case to increase the accuracy; the local truncation error of (4.9.11) and (4.9.12) is 0{6 k + e k + h + k ). The stability bound of a combined set of (4.9.11) and (4.9.12) is 2
2
x
2
1
(4.9.13)
2(2-r7,-t? ) * 2
which yields (4.9.6) when 0, = θ = 0 . But as 0, and θ -»1.0, the stability bound increases until at 0, = θ = 1.0, the bound ρ < oo is achieved. We return to these equations in a later section. We may also generalize the one-dimensional D u F o r t - F r a n k e l approach (4.3.13) to two dimensions (see Birtwistle, 1968). Thus we start with what would be a Richardson explicit approximation: 2
2
2
(4.9.14)
u r+\,s,l
U
r-\,s,l
_
r,s+I,t
U
2u
2h
ic
+
r,s,t^~ r,s-\,l U
2
k
2
However, this form is unconditionally unstable. Instead, let us replace u the right side of (4.9.14) by
r
M
r,j,f
^H'v+l.i.i
+
M
r-l,i,/)>
s
, on
Finite Difference Approximations in Two Space Dimensions
239
to yield (4.9.15)
u
r + U s
,= j ^ ( u
,+ «,,,_,,,+
r s + i
ΚΓ.,.,+
Ι + «,.,.,-i)
+ {^«,-.,j.r
iDuFort-FrankelJ
This approximation is explicit (only one point on the r + 1 plane is involved) and unconditionally stable. Further, it has a local truncation error 0 ( 2 , 2 , 2 / 2 ) . However, it does need to bootstrap itself through one r plane. T h e plane r = 0 is given by the initial conditions, but the plane r = 1 must be calculated before (4.9.15) can be implemented for r = 2 , 3 , 4 This can be d o n e with any alternative formula or by using (4.9.15) with ρ = Obviously, (4.9.15) has the advantage of being stable and explicit. The problem of a starting sequence is also relatively easy to overcome. However, as with the one-dimensional case, the consistency of the solution as the mesh spacings are refined is unusual. Thus, if h/k-*0 as 0 ( 1 ) , then the model parabolic P D E with which (4.9.15) is consistent is
u 4Η*
2
Λ
2
£2
U -— U x
+Τ u
y>yi > 2 . v :
x
rather than u —u *
y\y\
+ u "
w
i
Nevertheless, used with care, this seems like a powerful finite difference approximation. The interested reader is referred to the paper by Birtwistle (1968) for a superb analysis of both the Saul'yev and D u f o r t - F r a n k e l approximations in two and three dimensions. In particular, the link between the two methods is analyzed rather carefully. Finally in this section we wish to point out the generalization of (4.6.30) by Barakat a n d Clark (1966) to two space dimension. The model parabolic P D E is replaced with the set (4.9.16a)
Pr+\,s,l
h
Pr.s.l
_ Pr,s+\,l
Pr,s,l
Pr+ \,s,l + Pr+ I . J - 1 , / k
_|_ Pr,s,l+\
~ Pr.t,i~
2
Pr+ l,j,<
k (4.9.16b)
°r+\,s,l
~ Qr,s,t
_ 4 l + l . » + l , t ~ Qr+\,s.t
' Qr,s,t
k
Pr+ l . j . t - 1
2
2
+
Qr,s-\,t
Parabolic Parabolic Partial PartialDifferential Differential Equations Equations
240 240
with «ur+l| s, calculated calculated from from the the average average of of ppr+, s, and and qqr+i l . ssl. f, r +
r+l
s
(4-9.17) (4.9.17)
*r+\,s,t
_ Pr+\,s,t
+
22
s
r+
Qr+\,s,t
The , and ,, _, can The values valuespp r+Us%l and qqr+iiS can be be calculated calculated explicitly explicitly by by first first solving solving for Pr+\.s.t right-to-left Pr+\.s.t m t n e left-to-right left-to-right direction direction and and then then qqr+is_,, inin the the right-to-left direction. + | , for direction. Further, Further, the the ppr+\, +\,SJ and and gqr+Us for one one complete complete step step are are retained and become become pr s, and and qqr 5, in in the the next next step. step. ItIt isis interesting interesting that that this this approximation approximation is not only unconditionally stable stable with with aa local local truncation truncation error 0(2,2) PDE. 0(2,2) but but also also is consistent with with the the model model parabolic parabolic PDE. we discuss briefly what are referred to as alternatingIn a later section we direction D E . However, we direction explicit explicit methods, methods, A ADE. we have, have, in in the the present present section, aleady aleady outlined certain certain methods methods which which are are members members of of this this general general category. Both the Saul'yev Saul'yev and and Barakat Barakat and Clark algorithms are explicit and involve computation computation in in two two directions. r+i s%l
m
r+i<s
t n e
r+]
r
r
SJ
s
r
r
s
i J < (
5
4.9.2
Boundaries Irregular Boundaries
In all the material above and in what is to follow, it has been assumed that k == kk2 == kk and A:, and that that the the boundaries boundaries of of the the domain domain of of interest interest are are parallel parallel to to t h e y , and y2 coordinates. the^, coordinates. The The first first assumption can be removed in in aa straightforward ward manner manner and and we we do do not not pursue pursue this this point point further. further. However, the second assumption assumption of of parallel parallel boundaries boundaries is is not not as as easily easily overcome. overcome. The The main main problem is is that that mesh mesh points points may may not not lie lie oonn the the boundary boundary (if curved), as shown in Figure 4.11. 4.11. Note that the the points points 0,4,5 0,4,5 are are within within the the region region of of interest, interest, whereas whereas the we must, in some way, revise the points 2,3 are outside outside the the boundary. boundary. Thus we approximations to handle the points 22 and and 3. x
2
2
t,
,
S
tk ' f 1
,4 k 2 J —
k—*
7 \ 6
0 \
' 2
ΪΓ V" 5
\
\
y2 y<
Figure 4.11. Rectangular spacing with irregular boundary.
Finite Difference Approximations in Two Space Dimensions
241
There are at least two ways of revising the procedure. The first is relatively simple and consists of transferring the boundary values for u to the mesh points closest to the boundary. In effect, the boundary is reshaped so that it conforms to the rectangular grid; obviously, this introduces an error in the approximation being used, but the method itself is simple to implement. The second approach is more precise in that the finite difference approximations near to the boundary are revised. From Figure 4.11 we see that the distance between point 0 and 4, and 0 and 5, is k, whereas the distances between 0 and 6, and 0 and 7, are A, and k , respectively. However, if we recall (2.1.27), where we wrote (in the present notation) 2
4
V + V r S w
(4.9.18)
/ =o
where
- L + -L
a = -2 0
kk,
k (k 2
kk.
+
2
2
M*i + * ) ' αΛ
a, =
k)'
=
k(k
2
+ k)
then, we may revise our finite difference approximation without too much difficulty. In fact, using u — {u , )/h and (4.9.18), we may write the classic explicit approximation (4.9.3) as (see Figure 4.11) x
r+
'
1 (4-9.19)
u1 r+
j ,
:
l-2p
+ 2p
+
*•/* +
2
1 k /k
l+
k /k(l 2
k /k
}
+ k /k) 2
+ k /k{l
*r,s-\,t
t
- -' >
r s
+k
/k
+ k /k) t
+1+
k /k 2
'· *'/*·' ί+
"'·'•'-·
Of course, when = k = k, this reduces to (4.9.3). Equation (4.9.19) is 0 ( 1 , 1 ) and thus is less accurate than the standard form. The computational algorithm now consists of the standard approximation (4.9.3) for all ( J , t) points that d o not involve the boundary plus (4.9.19) for all ( J , / ) points that impinge on the boundary. 2
4.9.3
Implicit Methods
Using the weighted implicit approximation (4.9.2) we may generate a number of different implicit forms such as the backwards implicit and the C r a n k -
Parabolic Partial Differential Equations
242
Nicolson approximations. Before we d o so, however, we should point out the following. In the one-dimensional model parabolic P D E case, the implicit methods with their unconditional stability were quite competitive with the standard explicit methods. This was due to the tridiagonal nature of the coefficient matrix in the implicit case a n d the very efficient Thomas algorithm available for solving the algebraic equations. N o w , however, we find that a penta-diagonal matrix occurs and the Thomas algorithm cannot b e used. Thus the implicit methods, as presented in this section, are really not competitive with the explicit methods; as a result we present only a limited number of approximations. If we take 0, = 0 = 1 and 0 , = θ = {- in (4.9.2) we immediately obtain the backwards implicit and C r a n k - N i c o l s o n approximations, respectively: 2
2
(4.9.20) (l+4p)H
r + 1
, , . , = « , , , , , + P( «,+ ! . , + I . , + « r + l . s-\.,
+
r+\,,,t+\
+ «,+ ι . , , , - ι )
u
[backwards implicit] (4.9.21) (l+2p)«
r + 1
s
,-(l-2p)«
r
., = | ( « , 1 , +
+
M
J + I
., + «,+ , , ,
r + I , j . f + I + r+l.s,l-
l)
u
ρ + 2 ( " r . , + 1 . / + r.s-\.t
+ r.s.,+
U
U
\+
"r.s.,-\)-
[Crank-Nicolson] Both of these approximations are unconditionally stable with local truncation errors as in the one-dimensional case; for example, the Crank-Nicolson form is 0 ( 2 , 2 ) unless an irregular boundary is involved, in which case it is 0 ( 2 , 1 ) . N o t e that there are five unknowns at the ( r 4-1) plane in each equation and thus, if we were to write them in matrix form, the coefficient matrix would b e penta-diagonal. T h e solution, in this case, requires either a normal elimination procedure or an iteration process; neither is generally as efficient as the solution of the explicit approximations developed previously. We may also write (4.9.20) and (4.9.21) in a more condensed notation suitable for manipulation in a later section. Thus (4.9.20) can be written as (4.9.22)
(1 - ρ
- ρ 8^) u, , +
s
,= u
r
s
,
[backwards implicit]
Finite Difference Approximations in Two Space Dimensions
243
while (4.9.21) is equivalent to (l-fe*-f«r\)«,
(4.9.23)
. . , . r = (» + f*K + f ^ ) « r . , . r 2
+
I
[Crank-Nicolson] A perturbation of (4.9.23) can be found by adding the term
J v l( 's.>- r+\.s.>) S
2S
U
U
l
to the right-hand side to yield (4.9.24)
( l - f e ? . ) ( l - f ^ ) ^ . . , . , = (l + f « ? ) ( l - H f a ? J j
1
This equation will be of use shortly. It is also possible to obtain higher-order, more accurate, approximations. Fairweather (1969) has indicated that
[l-i(p-i)e ,][l-*(p-i)e,y«,
(4.9.25)
2
v
+
l
.,.
f
= [i + Hp + l)s, J[i + Hp + i ) s J « , , 2
2
l
i
is 0(2.4). The reader will recognize the analogy to the Douglas approximation in one dimension. Finally, we wish to show that a mixed derivative can be included in the model parabolic P D E without any serious difficulties. Thus we write +2bu ,.
u=au ,.
(4.9.26)
v
+ cu ,. ,
r
v
where a > 0 , b > 0 and ac - b = 0 to ensure the parabolic nature of (4.9.26). If we use a central difference for u and « , we may write 2
u
(4.9.27)
r+
U
s
- u
= e L, P
r i i i l
+
,
+ (1 - 6 ) L P
r
s
where L
r.s.i =[
f l
+
("r.5+l.l ~
2
b
2
u
r . s . , +
( " r , s + l . + \ ~ l
U
U .s-\.,) r
r . s ~ \ . , +
\ ~
U
r . s + \ . , - \
n
Parabolic Partial Differential Equations
244
L , , is evaluated at r + 1, and θ is an implicit weighting factor O < 0 * s l ; when θ -0, we have a classic explicit form, θ = {, a C r a n k - N i c o l s o n form, and β = 1 a backwards implicit form. The stability bound on (4.9.27) is r+I
(4.9.28)
\<θ^\
p
(a + c)p
O<0<J-,
which is a direct extension of the one-dimensional case (i.e., a = 1 and c = A=0). 4.9.4
Alternating Direction Explicit (ADE) Methods
Here we turn to the first phase of the analysis of methods that combine stability with computational simplicity for problems in two (and three) space dimensions. These methods are referred to as alternating direction since a single cycle of the computation requires the solution of two different finite difference approximations written in different physical directions. The end result of the two cycles is taken as the answers on the r + 1 plane. In this section we consider explicit methods, thus A D E , and in Section 4.9.5 implicit methods, thus ADI. Actually, we have already developed most of the explicit approximations, namely those due to Saul'yev and Larkin, (4.9.11) and (4.9.12), and Barakat and Clark. (4.9.16) and (4.9.17). We concentrate here on the first set, with the extension to the second being rather straightforward. If we let θ, = θ = 1 in (4.9.11) and (4.9.12) [note that (4.9.13) indicates that each approximation is unconditionally stable] but write (4.9.11) over 2 r -»2r + 1 and (4.9.12) over 2 r + l - * 2 r + 2 , there results 2
(4.9.29a)
U
j
r
+
U
i
i
=
T
JL-
U
2r+I.j-I,f
+
M
2r+I.s.r-I
+ « 2 r . , + l.r + « 2 r . » . » + l
2 -1 P
~
" 2r, j , f
(for odd χ steps) (4.9.29b)
u
2 r + 2
^,
=
Ρ l+2p
U
2 r + 2.i+l./"!" 2 r + 2.i./+l U
, +
, 2r+
U
l.j-l.r
'
2p-l W
2r+1. j.r-1
2r+\.s.t
U n
(for even χ steps).
Finite Difference Approximations in Two Space Dimensions
245
Sweeping a two-dimensional grid from southwest to northeast using (4.9.29a) and from northeast to southwest using (4.9.29b) (alternating directions) allows a direct or explicit calculation of i / , at the end of the two layer cycle. Note that in alternating direction procedures such as this one, the values w , , , are intermediate solutions and are not utilized as final answers. Also, we could have used (4.9.29a) to go from r — r + {· and (4.9.29b) to go from r + 5 — r + 1 in the same manner. One finds both sets of subscripts in the literature. These approximations may also be written in the following forms: 2 r +
2
Λ
2 r +
M
2r+l,,.,-"2r...i
A =
.-,»2r.i.f
~ ,·, 2γ+Ι.»-Ι.ι
h
U
2r+2.S.,~
U
Δ
μ
k
2
2r+\..,.L
_
A
r,"2r+2.v./
h
• , 2r + 1 . - 1.1
Δ
k
U
2
k
2
where ^v"r,S.J
"r,\+].I
kyJ*r,S.,- r. ., U
s
+
"r.S,L \-"r.S.,>
as shown by Coats and Terhune (1966). This A D E approximation is explicit, unconditionally stable, but only of moderate accuracy. In addition, as with other Saul'yev approximations, consistency must be handled carefully since a term h/k is in the local truncation error. Coats and Terhune (1966) compared the results of this A D E algorithm with an ADI algorithm (given in the next section) on a number of complex PDE. T h e end result was that ADI yielded significantly greater accuracy (the local truncation error of ADI is smaller than ADE) but required about 60% more computing time. For the same level of truncation error, a smaller h step must be used with A D E than with ADI, but ADI requires a more complex algorithm for the solution of the finite difference equations. In general, their results seem to indicate ADI methods superior to A D E methods. 4.9.5
Alternating Direction Implicit (ADI) Methods
Although the previous methods for solving the two-dimensional model parabolic problem are interesting, almost all have some defect. This may be the
246
Parabolic Partial Differential Equations
accuracy, the stability, the consistency, or the number of unknowns required in a solution for any one pass. Thus the C r a n k - N i c o l s o n implicit approximation, (4.9.23), is unconditionally stable, is accurate (<9(2,2)) and is consistent; yet the method requires the solution of a (n — l ) X ( n - l ) pentadiagonal matrix [assuming ( « - l ) mesh points in both t h e y , and the y directions]. Thus it probably is not a feasible approach unless η is relatively small. However, there is a variation on the Crank-Nicolson approximation which is very efficient, especially for rectangular regions of ( y , , y ) . This approach was first developed by Peaceman, Rachford, and Douglas and is called the alternating direction implicit (ADI) method. 2
2
In the A D I approach, the finite difference equations are written in terms of quantities at two χ levels. However, two different finite difference approximations are used alternately, one to advance the calculations from the plane χ = rh to a plane χ = (r + l)h and the second to advance the calculations from the x=(r + \)h plane to the x = ( r + 2 ) A plane; the second approximation needs no information about the values at χ = rh.* The first approximation is obtained by replacing u with an implicit form (backwards implicit) and Μ with an explicit form (classic explicit); the solution of the resulting (η — 1) unknowns per line in the (η — 1) equations can be solved at χ = ( r + \)h via the tridiagonal algorithm described previously. The second approximation is obtained by reversing the implicit-explicit terms and solving tridiagonal systems once again. As we shall see, the solution is thus obtained by alternating between rows and columns in ( y , , y ) space and solving tridiagonal equations. Ergo, we adopt the terminology ADI for the overall approach. 2
It will become apparent that the overall two-step approach requires minimal computer storage and is quite accurate. Further, the two-step scheme is unconditionally stable and consistent with the model parabolic P D E . There are some subtle features that one should be aware of and we shall detail them shortly. Let us start the development with the Peaceman-Rachford (1955) [PR] approach. The model parabolic P D E is written in two steps as (4.9.30a)
« ? + . . , . , - « , . , , , = ρ(«ν,«? ι.,.» + β Χ . , ) Ι
+
[PR][implicit i n y , direction] (4.9.30b)
=
+« « 2
2
Γ + 2
.,.,).
[PR][implicit i n y direction] 2
Note that (4.9.30a) is used for a step h to generate u * , +
s
, and then (4.9.30b) is
*As in the case of ADE an alternative notation is sometimes employed wherein one writes the sequence of steps χ = rh — χ ~(r + \)h — χ =(r + 2)h as χ = rh — χ =(r + \/2)h — χ = ( r + 1)Λ with the same implied meaning.
Finite Difference Approximations in Two Space Dimensions
247
used for the same fixed step h to generate u ,. One should interpret u* +, , as an intermediate solution in the two-step calculation. Within a single cycle of the two equations, the value of ρ is fixed, but it can change for subsequent cycles. Each approximation is itself consistent with the model parabolic P D E . In the first step of the two-step procedure, the solution is obtained through a line-by-line calculation using the tridiagonal algorithm in the y, direction (calculate «*+, , on all lines in t h e y , direction). The second step involves a second line-by-line calculation using the tridiagonal algorithm in the y direction. r+2
s
r
s
s
2
Depending on the notation one wishes to use, we could also write (4.9.30) as (4.9.31a) (4.9.31b)
«!, u
. . - « 2 Γ . , , = ρ ( δ ν « ^ . . , + δ "2,. .,)
[PR]
2
+ 1
5
ί
ί
-u*
2 r + l s l
+ 1
ί
ι
= p(8lul ,
2 r + l s l
2
Ι
+
r+ls
d u ^) 2
2r+2
l
or, for h / 2 per equation. u*
(4.9.32a)
- M _ , = ^{8 u* 2
+
l
/
2
s
l
+8 u
,)
2
+
r J
l
/
2
s
l
r s
[PR] (4.9.32b)
u
r+
,,~u*
Us
+
, = |(δ Μ* 2
l / 2 i J i
+
ι / 2 ι ί ι
, +
8fu +> ). r
sl
We may also rewrite these approximations in a more concise form, such as
(4.9.33a)
(4.9.33b)
(l-^J^.j.H^f^K*' (1 - f δ
2 2
) « ,
+
= (1 + § 8 } , ) « ?
+ 1 / 2
[PR] .,,,.
The stability of the PR algorithm can be obtained (using the von N e u m a n approach) by substituting yrh ifl,sk i$ lk
e
e
e
2
into the appropriate equation. As an illustration, with (4.9.32a) we find an amplification factor of
248
Parabolic Partial Differential Equations
while for (4.9.32b) there results
l-2ps,n (M) 2
(4.9.34b)
1 + 2psin2 | r V \ "
Note that each of these factors has a finite stability bound (i.e., each equation used alone is conditionally stable). However, the combined two-cycle calculation has an amplification factor
(4.9.35)
{ « = {.{,= 1 +2psin'
l+2psin
2
[PR]
βΗ 2
which is unconditionally stable for p < o o . Thus, although each individual equation is conditionally stable by itself, the combined two-step algorithm (with ρ the same in each step) is completely stable. This behavior is much like that in Section 4.3.5. where the classic explicit and backwards implicit approximations were shown to be equal, when applied in a tandem calculation, to the unconditionally stable Crank-Nicolson approximation. Finally, we can also predict that in a three-dimensional case, u = + " , · e procedure above will not be unconditionally stable since we are not able to obtain a symmetric amplification factor such as (4.9.35). t n
x
We may also eliminate approximation (4.9.36)
KJ"+I/2,S,/
( ' - Ι ^ Η ' - !
M
8
ΐ 2
2
(4.9.33) to yield the single composite
; ) " - . . . .
[PR] in which
are consistent nine-point operators in the r + l and r planes. In this form, however, all the computational advantages of the tridiagonal algorithms are lost. Note that for the Peaceman-Rachford method, there is a composite form, (4.9.36), and a split form, (4.9.33). We shall show shortly that there are alternative ways to split (4.9.36) into two-cycle approximations. For the moment, we merely wish to point out that we could obtain the unconditional stability bound on the composite forms (4.9.36), as well as on the split forms.
Finite Difference Approximations in Two Space Dimensions
249
(4.9.33), as we have done. However, in actually using the split form we need to pay special attention to the boundary values for u* ,\ without this special attention (to be detailed shortly) the two approaches do not yield the same numerical results except for a special case. The truncation error of the Peaceman-Rachford algorithm can be obtained in the usual fashion via Taylor series expansions. Although we d o not detail this point here, it is convenient to use the identities +x/l
"vx = « 4 , ,
+ 2
"2v,2v +
4,
i <
2
s
r
The result of such a calculation is to show that the Peaceman-Rachford method is (9(2,2) assuming a rectangular region. This also follows if one looks at (4.9.36) and (4.9.24), which we showed were equivalent to the C r a n k Nicolson method with a perturbation term (p /4)8 S (u , - u+ ) added on. There are also a number of other A D I approximations to the twodimensional model parabolic PDE. Douglas and Rachford (1956) [DR] proposed the two-cycle or split form 2
2
2
r
2
(4.9.37a)
(I-P«'>,V,, = (
1
+
s
r
lsl
P . X*.< 5 2
[DR]
(4.9.37b) Each equation is consistent and when combined to eliminate u* , composite approximation +
(4.9.38)
(1 - ρ δ ) ( 1 - ρδΐ)u ,,,
= (1 +
2
r+
2 Ρ
s
, yields the
δ δ )«,,,. 2
2
In this case the local truncation error is 0 ( 1 , 2 ) and the operators (1 - ρ δ )(1 ρ δ , ) and (\ + ρ δ δ ^) are nine-point consistent operators. Stability of the Douglas-Rachford approach follows the same line as used above on either (4.9.37) or (4.9.38); the amplification factor turns out to be 2
2
2
2
2
l + 16p sin 2
(4.9.39)
£DR
2
sin [DR]
—
(l+4psin [^])(l+4psin [^]) 2
2
This amplification factor is bounded, | £ | < 1, so that the Douglas-Rachford approximation is unconditionally stable. Mitchell and Fairweather (1964) have also derived a high-accuracy A D I approximation to the two-dimensional parabolic PDE. The reader would do D R
250
Parabolic Partial Differential Equations
well to consult this paper for a lucid development of the formulas, the truncation error, a n d the stability bounds. Here we give only a summary of the results. The two-step split formulas are given by
[l-Hp-t)^Ui.,M*
(4.9.40a)
ttP
+
+
l K h . s . ,
[i-i(p-i)*vJ«, ..,., = [> + i(p + i)e, ]«r ,. .,2
(4.9.40b)
[MF]
2
+
+
1
i
In this form the intermediate values , could have been written more By eliminating the intermediate values u* t h e properly as u * corresponding composite form is given as s
+ l / 2 s
r
+l
s
[l-Kp-iWjIl-Hp-i)^]"^....,
(4.9.41)
= [l + i(p + W ] [ l + i(p + W j « , . , . 1
[MF].
(
However while (4.9.41) is consistent with the model P D E , the split forms are not consistent individually. T h e local truncation error is (9(2,4) a n d thus is much better than the PR or D R methods. Note, however, that if the case ρ = £ is chosen, the left-hand side of (4.9.41) becomes merely u , and the algorithm becomes explicit. It is also of interest to list here the principal parts of the local truncation error for the three algorithms; these are r + l
rhk\u, +
u )
y
[PR]
Av2
HP + )k\u
+ u )+pk u
L
~ ) P
P
2
[DR]
4
4Vi
6
s
4v2
2yi2v2
~ : > K , +<W
[MF]
10(P + | ) and we see that the choice p~\/{2^5) yields a further improvement in the truncation error of the Mitchell- Fairweather method. The stability features of the Mitchell-Fairweather method can be ascertained in exactly the same manner as before. N o w the amplification factor is 2(ρ
(4.9.42)
£
M F
+ ί)ύ*(ψ)-\][2(ρ
+
1)ώ*(*£)-
[MF]
=
2(p-i)sin (M) 2
which is bounded, I ^ M F I ^ ^ f ° unconditionally stable.
r a u
"
+
v a , u
1
][
2 ( p
_i
) s i n 2
(M)+
1
e s of p. Thus this A D I algorithm is
Finite Difference Approximations in Two Space Dimensions
251
Douglas (1962) has also presented a higher-order accurate method. T h e reasoning in this method is to obtain a perturbation of the C r a n k - N i c o l s o n form; since we detail this feature in the three-dimensional case, we merely give the split and composite forms here. Thus we have (4.9.43a)
(ΐ-{ρδ \)ν .,,=[[\
+ \ρ%) +
(4.9.43b)
(l - i p e > ,
u
ν
+ι
2
+
, . „ = u%
Ρ
6ϊ]*,^, [D]
-\p8 \u , _,
,
v
r
s
and (4.9.44)
(l - i p « i ) ( l - i p « i j ( « = ρ(β
r +
,.,. - « . , . ) f
r
r
+ «, Χ.„.
[D]
2
ζ 1 ι
The algorithm is «9(2,2) and is unconditionally stable. Now let us turn to the evaluation of the intermediate values « * , , , in any of the ADI algorithms. W e explore this question for the Peaceman-Rachford algorithm and then quote the equivalent results for the others. For further details, see Fairweather and Mitchell (1967). The split forms for the Peaceman -Rachford algorithm are given as (4.9.33a) and (4.9.33b); in solving each form via the tridiagonal algorithm, it will be necessary to specify boundary values at the ends of the line being solved. In the case of (4.9.33b), this is no problem and « , , where t = 0 and / = Μ assuming that values are given for u , represent the boundary points. However, in (4.9.33a), it is necessary to have M* i and M * in order to solve the implicit equations. If the boundary conditions are functions of x, u , = g , on the boundary, then these values must be calculated correctly or the algorithm will lose accuracy (i.e., errors will be introduced). If the boundary conditions are independent of x, u , = g , on the boundary, no problems will occur. T o obtain the proper boundary conditions in the x-dependent case, we proceed by adding (4.9.33a) and form and (4.9.33b) to eliminate {p8 u* +
r+
/ 2 ! 0
+
+
l
/
2
t
Λ 0
r +
s
s
r
t
s
t
(4.9.45)
M
M
r
r
s
u% , ., l/2 s
+l/2sl
= i ( l + 4p«, ) , ,, + i ( l - i p 5 ) 2
2
!
M r
i
M r + l
. ,. J
[PR]
It is interesting to note that the Peaceman-Rachford algorithm could use (4.9.33a) and (4.9.45) in tandem; this is more efficient than (4.9.33a) and (4.9.33b) because in (4.9.45) the calculation for [l + {pS ]u , has already been carried out. If we eliminate w * , between (4.9.33a) and (4.9.45), we y
+ ! / 2
s
r
s
252
Parabolic Partial Differential Equations
get an alternative Peaceman-Rachford composite form, (4.9.46)
(1 - - i P ^v , ) ( » - i P * v 1 . , . r 2
= (l + ip6 )(l + {po J« . ,, + ^ , „ 2
2
(
l
|
r
[PR],
J
where ρ { * Γ . / 2 . ο . , - K + hP^)gr.o.,
~if -
1
lP8 )g .o.,}
1
+
2
r+l
2
(on one boundary) by
(4.9.47)
s
Ρ { * , \ , / 2 . Μ., - I ( + 5 P « 1
2 M
. ,
- 1 ( 1 - 1P«
2 2
) * , .. Μ.,) +
(on the other boundary) (in interior region).
0
The Peaceman-Rachford algorithm will be 0 ( 2 , 2 ) provided that the b , = 0 ; otherwise, the method will lose accuracy. In order for the b , = 0 , it follows that s
s
^,^,.^Ηΐ + ^Κ.,, + Μΐ-Μ, ,)^!.,.,
[PR]
2
(4.9.48)
on the boundaries. But (4.9.48) is the same form as (4.9.45) and thus the latter formula can be used to calculate the intermediate boundary values prior to the start of the main calculation. If the boundary conditions are independent of x, it follows that &r,s
and the b , in (4.9.47) are b , = 0 always. Thus if we use g * , , = g , no loss of accuracy occurs at any time. In exactly the same manner, we can develop the equivalent equations for the Douglas-Rachford and Mitchell-Fairweather algorithms. These are, in turn, s
(4.9.49) (4.9.50)
s
+ 1 / 2 - J
«*?+ 1. J . / =
P v r. s . , + ( 1 - Ρ*, , ) "r +
**+!.,./=
Ρ
U
8
2
2
Β
, ,*Γ. ., 2
Ι
5
I.,.,
[DR]
+ ( ΐ - ρ β ν ) * , + ι.,., 2
1
and (4.9.51)
^..,, = ^ [ i + i(p + iR K,, 2
2
+
£
5
i n
[ -Hp-i)«^]«r ,
+ 1
.,.,
[MF]
Finite Difference Approximations in Two Space Dimensions P+ i
(4.9.52)
253
2p •[i + i ( p + i ) « ] 2
In the Douglas-Rachford method, the equivalent b =0 if the boundary conditions are χ independent; however, in the Mitchell-Fairweather method, (4.9.52) reduces to it
(4.9.53)
[MF]
even when g * , , = g , = g ,. Thus (4.9.53) must be used even when the boundary conditions are χ independent. Obviously, some of these results can be extended in a number of directions. Thus Keast and Mitchell (1967) developed a Peaceman-Rachford A D I algorithm when the boundary conditions are given in x-independent flux form +
a
r s
t
>>,=(Γ
(4.9.54a)
ν, = 1
(4.9.54b)
Ι
Λ = 1
0
χ>0
0«Ξν,<1,
χ>0
and McK.ee and Mitchell (1970) include a mixed cross derivative in the two-dimensional model parabolic PDE. In particular, they show that for (4.9.55)
u . = au . v
+ 2bu ,. v
+ cu. ,.
the composite form
(4.9.56)
*r+ Ι,ί./
= {[ι + ( )
+
+
Ιρ„) ;
- ρ Κ , % > Λ .
δ
ί
. ,
1 + ΐ 7 + ^Ρ^)δ,
2 2
254
Parabolic Partial Differential Equations
can be obtained, where / i s an adjustable parameter y, r,s.l
W
W
~
U
U
r,s+
\.i
U
r.s-\.i
R.J.R+L
M
y r,s.l~ U
2
r.s,t-\-
U
This can be split in Douglas-Rachford form to yield (4.9.57)
1+
(rH«
4
r + \.s,l
δ.
1 +
'
+ pcfi/ + 1 p Z , 2
1 +
(7~\
p c
" '·*·' * '·*·' r +
) y> 8
= M
+
+
2
+ ^ (α + c ) 5 δ 2
% i % j
2
(7~I )y2r.s.r pc 8
u
Equation (4.9.56) is shown by McK.ee and Mitchell (1970) to be 0 ( 1 , 2 ) and to be unconditionally stable for / < 0 and f>4. The intermediate boundary conditions are given by (4.9.58)
g; ,,,,,= +
One may also add a source or sink term to the model parabolic PDE. Thus we may write (4.9.59)
" x = «»,». + u
T h e Peaceman-Rachford (4.9.59) become (4.9.60)
(l-ipe;>?
+S(u,
x,y ,y )t
2
and Douglas-Rachford split schemes applied to
+ 1 / 2 > i
. = (l + i p * ; ) u . . + <
i
r
J
l
ipS
, .
r + 1 / 2
1
(
[PR]
(l-ipeA) 'r I.S.I = ( l + i P ' , > R V I / 2 . . . + i p SV+L/2,J,i ,
+
i
l
and (4.9.61)
(l-piftuU^.^l
+ pdtiu^
+ pS,^,,, [DR]
(
1
~ P*A
) " r + I, ι . / = « ? + I. ι.» -
Ρ * Α « Γ . f. ι ·
Finite Difference Approximations in Two Space Dimensions
255
Of course, if S is nonlinear, the result is a set of nonlinear algebraic equations. Thus the simple tridiagonal solution feature is lost; as a result either linearization plus iteration is used to return to the linear form or S is evaluated at the last pass (say at r rather than r + \) value. We may also extend the ADI methods to parabolic P D E with variable coefficients. Thus if the model P D E is written as (4.9.62) the Peaceman-Rachford split formulas would be (4.9.63)
[1 - ^(β,β,,)]
«Γ .,. = [ 1 + +I / 2
ip« ( « )]«,.,.,
f
y i
β 2
Λ
[ι-ίΡ^ (βΛ )]«Γ ..,.,=[ι+^ ("Λ )]«? ./2. . ι
Ι
+
ι
ι
+
ί
[PR] ί
with the intermediate boundary conditions given by (4.9.64)
g;
+ 1 / 2
. . = |[l-ip«JA 5 )]g J
(
2
> ;
r + 1
. , , + i [ l + ^p«5 ,(AA )]g , ,, I
>
2
r
i
as an extension of (4.9.48). Finally, we mention that all of the above holds strictly for rectangular regions in y, and y . If the regions are not rectangular, then the split and composite forms are not necessarily equivalent. It may be necessary in nonrectangular regions to use equations such as (4.9.19) at the boundary or to ignore the curved sections entirely. Obviously, either approach leads to a loss in accuracy. However, computational experience, not theory, indicates that A D I methods work well even in the case of nonrectangular regions. The methods still seem to be among the best that one can use. 2
4.9.6
L O D and Fractional Splitting Methods
We have already pointed out the connection between the split and composite formulas in an A D I context. It is, however, also possible to split the composite (or the P D E ) in alternative ways. These methods are termed local onedimensional (LOD) approximations or fractional splitting approximations. Such schemes have been discussed in detail by Yanenko (1970), H u b b a r d (1966), Gourlay and Mitchell (1969, 1972), Mitchell (1971) and Morris and Gourlay (1973). Morris (1970) has also presented a very interesting comparison between the L O D and ADI methods as applied to a heat flow problem with a discontinuous heat source. As might be expected, in certain cases or under certain restrictions, all types of splitting will be identical. As one might anticipate, many split forms are possible. W e have shown (4.9.33a) and (4.9.33b) as the Peaceman-Rachford split formulas which lead to
256
Parabolic Partial Differential Equations
composite (4.9.36). Instead, we could have used the split forms (4.9.65a)
(ΐ-|.5 ) ?
(4.9.65b)
(\-^)u ,,,,
2
Μ
, = (ΐ + | β ) ( ΐ + | β 2
+ 1 / 2 ι 1
=
r+l
2
)«,.,,,
ur ,,,„ +l/2
which also yield the composite (4.9.36). Computationally, the different split forms involve different points but the end result, at least for our model parabolic PDE, is the same. With this feature in mind, we rewrite the model parabolic P D E as (4.9.66a)
« = M, . + i i , , x
il
i
r j
i
which we now express as (4.9.66b)
K
= «„v,
Κ
= «,·„·,
and (4.9.66c)
N o t e that each of the two equations (4.9.66b) and (4.9.66c) has only one space variable (_y, or y ) involved. Thus we may treat each equation via onedimensional methods and combine the two results to solve the original problem. Since we have the { in front of u a n d we wish to solve the combined set over one step, A, we can write in explicit form 2
x
2\
A/2
1 / r+i,s.,- r+\/2.s,,\ U
U
2\
k
/
2
+ I / 2 . S . I \ __ y\
81 U
r+\/2.s.,
A/2
or (4.9.67a)
(4.9.67b)
«,
+
i/2.,., = 0 + P * v , k . , . ,
« , . , . = (l + P*v ) +l
l
1
The composite form of (4.9.67a) and (4.9.67b) is (4.9.68)
^ Ι + ρ ό ^ Ι + ρδ^Χ,.,,
Finite Difference Approximations in Two Space Dimensions
257
which is equivalent to (4.9.8) with the perturbation ρ δ δ added to the right-hand side. Although we d o not propose the serious use of this split or composite form, it is obvious that (4.9.67a) has the virtue of operating in one space direction followed by (4.9.67b) operating in the other space direction. Thus one would use two explicit schemes in succession, one in each space direction. On this basis, the term local one-dimensional (LOD) has developed for methods that employ this type of splitting. However, rather than use the explicit represention, it would seem preferable to use the Crank-Nicolson approximation with its increased accuracy and unconditional stability. Thus if we represent (for h / 2 ) \u = w by 2
2
2
x
2{
) ~ ^lK«,
hj2
+
1
V V |
+ V—)
/2. ., 3
or (4.9.69a)
(1 - | δ ) u , ,,.,
= (1 + | δ , , )
2
In the same sense, we may also write for \u
x
(4.9.69b)
( l - ^
2
)
M
r
,.,.
2
r+ /2
+ 1
.. , = (l + ^ s
= 2
)
M
r
+
1
/
2
s
, .
thus forming an L O D split formula group. Note that if δ and δ, , commute (i.e., the y, - y region is rectangular with sides parallel to the y, and y axis), we d o come back directly to the Peaceman-Rachford A D I forms (4.9.33a) and (4.9.33b). In fact, one might start with the Peaceman-Rachford split forms and interchange ( 1 + ( ρ / 2 ) δ ) and ( 1 + ( ρ / 2 ) δ , ) on the right-hand side to yield the L O D forms above. The L O D split forms use a tridiagonal solution as before, are unconditionally stable, and are second-order accurate (since they use the Crank-Nicolson algorithms) [i.e., 0(2,2)]. The same concept can be applied to the Mitchell-Fairweather A D I split forms, (4.9.40a) and (4.9.40b), to yield 2
2
2
2
2
(4.9.70a) (4.9.70b)
[\-Hp-m]u
2
r
+
l
/
[l-i(p-i)*, J«
2
. ,,
2
s
= [\ + HP +
i)S ]u , , 2
r s n
. . , = [l + i ( p + i ) « J « r , / 2 . . . , 2
r + l
i
l
+
Commutation of the A D I and L O D forms follow, as before, only when δ and δ, commute. Intermediate boundary values for either of these L O D schemes follow from 2
2
2
(4.9.71)
r+l/2,i./
8r+\/2.s,f
Parabolic Partial Differential Equations
258
Although some accuracy may be lost in this formulation, in contrast to A D I methods, there does not seem to be any better way to calculate the intermediate boundary condition. When δ and δ, d o not commute, there is n o obvious connection between the ADI (PR) and L O D schemes. However, Gourlay a n d Mitchell (1969) did point out the conditions linking the two. Thus we write the Peaceman-Rachford scheme as 2
2
(4.9.72a)
(1 - | «
) u%
2
1
(l-fe )«,
/
2
(4.9.72b)
J
+
2
s
fa)
, = (1 +
,
fei)«r i 2. .,
i. ., = ( l +
+ /
i
i
and the L O D scheme, (4.9.69a) and (4.9.69b), as ( 1 - ^ ) ^ 1 / 2 . , . , = (« +
(4.9.73a)
§*Α)ΟΓ.,.,
(1 - 1δ ) υ, , , , = (1 + § δ ) v
(4.9.73b)
2
2
+
r + 1 / 2
.,.
Note that we have used ν instead of u in the L O D form and changed the indices in a straightforward fashion. N o w if we eliminate t J , in (4.9.73) (i.e., form the L O D composite), there results r + 1 / 2 - J >
(4.9.74a)
(l-f
β^)<ν+..,., = (ΐ + §e»)(l-t-f
« )"V„2
Now if we choose v , ,,
(4.9.74b)
r s
(4.9.74c)
=
(l-fa ) 2
° , ι.,., = ( ΐ - § «
2
+
2
U
r
)«,
+
s
l
,.,.,.
then (4.9.74a) becomes (4.9.75)
( ^ f a ^ - f a ^ u ^ ^ ^
+
fa^
+
fa^,,
which is (4.9.36), the composite P R form. Thus the L O D a n d PeacemanRachford schemes are equivalent through the transformation (4.9.74b) a n d (4.9.74c); in one case the values v are generated in the calculation, while in the other the values u , are generated. But either can be obtained from the other via (4.9.74). r + l s l
r + l s
Finite Difference Approximations in Two Space Dimensions
259
Gourlay and Mitchell actually consider the case where the model parabolic P D E includes the source or sink term S(y^ y ). This requires a careful analysis of the intermediate boundary conditions, but the transformation of (4.9.74) follows in the same way. The interested reader should also consult Morris (1970) for further details. We should also point out that from the splitting of (4.9.66a), the L O D algorithm can be applied in an obvious fashion to variable coefficient and nonrectangular regions exactly as in the one-dimensional case. The fractional splitting methods are based upon a simple idea which starts with the model parabolic P D E in the form 2
u
x
= £u,
where £ is a linear spatial differential operator explicitly independent of x. Thus £ = £ , + £ + · · · + £ where g is the number of space dimensions (in our present notation £ = £ , + £ or £ = £,, + £ ) . Now a difference scheme is developed which replaces £ successively by g £ , , g £ , . e a c h operating for an interval h /g. As a result one replaces the original problem with a series of simpler problems. When £ , , £ , . . . , each involve only derivatives with respect to a single variable (i.e.. £ , = 9 / d , £ = 9 / 9 , , . . . ) , the fractional splitting methods become L O D methods. Thus if we start with the one-dimensional case, 2
2
V2
2
2
2
2
2
2
2
u
x
7
= £«,
where £ = 9 / 9 y , then the Crank-Nicolson approach yields 2
2
h where L/k
[
2k
2
is the finite difference equivalent of £ and
2
κ , ., = (ΐ + § * · ) ( ΐ - § ί . ) ~ ' « , . , · + 1
In this case, we obtain a tridiagonal matrix with unconditional stability and a simple solution algorithm. For two dimensions, the same approach yields L = L + L with the resulting matrix n o longer tridiagonal. T o circumvent this problem, we integrate in two successive steps over x < χ < x , using the fractional steps x , x , x \- For each step at x /2 »e C r a n k - N i c o l s o n algorithm v
V2
r
r+
tr
r
r + i / 2
«' » +
/ 2
r+
r+g
=( l - f ^ ) " ( l + f L ) f
B
^ « - ^ "
260
Parabolic Partial Differential Equations
is used. Thus 2
Π
κ= ι
Even if the operators L d o not commute, it is still possible to achieve second-order accuracy by interchanging directions, that is, g
·-!,
2
*=2
Of course, if we apply this approach to (4.9.66) in the form
then it follows that a fractional splitting algorithm could be (for a total step r )
(
1
2
_
( ~2 X
L
)"
2
L
r
+
i ) "
/
1
r
+
2
I
'
j
l
'
(
=
(
=
1 +
1 +
f
L
f
* )"'•*·'
' ) "
L
r
+
' /
2
s
"
which is completely equivalent to the L O D scheme (4.9.69a) and (4.9.69b). In the same sense D'Yakanov has proposed the fractional scheme
«r+l/4.i.r = ( l + f
U
( '
—
('
r + 1/2. J.I
=
L
2 )",·.,.,
( ^ ~*~ 2 ^ 1 ) r + 1/4. J.I M
2" ^ 1 ) f + 3 / 4 , j , I ~~ r + 1/2, j . l U
—
M
2~^ ) 2
U f + Ι ι
·'
=
"
Γ + 3
/
4 ί
·"
which, for a rectangle, is easily shown to be an L O D scheme and to yield the Peaceman-Rachford split with the intermediate value being u ,. r + J / 4
s
Finite Difference Approximations in Two Space Dimensions
4.9.7
261
Hopscotch Methods
In Section 4.6.4 we commented on the idea of Gordon (1965) to alternate explicit and implicit finite difference approximations to yield an interesting algorithm for solving the one-dimensional model problems. Then we mentioned briefly the work of Gourlay (1970). termed the hopscotch method, which put the Gordon idea into a broader framework. Since this approach has application to two- or three-dimensional problems, we now develop those concepts further using the additional paper by Gourlay and McGuire (1971). To illustrate the features of the hopscotch method, we start with the model parabolic P D E u
x
= tu +
S(x,y ,y ), i
2
where £ is a linear operator involving one ( 3 / 3 y ) or two ( 3 / 3 y , + 3 / 3 y ) or even three ( 3 / 3 y , + 3 / 3 y + 3 / 3 y ) space dimensions and S(x, y,, y ) is a source-sink term which we show, for convenience, as a function of y, and y . N o w we define once again L as a finite difference replacement for £ (i.e., any explicit or implicit form we have already discussed). Gordon proposed the use of 2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
(4.9.76a)
(4.9.76b) in an alternating fashion where (4.9.76a) is an explicit equation and (4.9.76b) is an implicit equation. Equation (4.9.76a) is first used for those points with (s + t ) even and then (4.9.76b) for those points with (s + t ) odd. At the following r step, the role of odd and even formulas are interchanged. When ^ r+\.s.i involves only the four neighborhood points Μ +Ι.*+Ι./' " r + i . j - i . r _ | , the overall algorithm is explicit and converges under u , , | , and M as h,k->0. Note that this scheme appeals to the the restriction h/k-*0 properties of the mesh rather than the P D E itself. Now if one defines the o d d - e v e n function u
Λ
+ u
+
R + I I J I L
(4.9.77)
0
if r + s + t is odd if r + s + t is even,
then we write the Gordon scheme in a single equation (4.9.78) = u
r.s,I
)
262
Parabolic Partial Differential Equations
Equation (4.9.78) is a hopscotch equation. Note, however, that since the algorithm changes over at succeeding r steps, only answers at r + 1 =2n where η — 0 , 1 , . . . are obtained. However, the solution at odd values of r + 1 are meaningful approximations a n d can be used if desired. A n important feature of this scheme can be developed by writing down two successive members of (4.9.78), -A#.:'(^«,.H.,., + $
(4.9.79a)
= «r.,. + AA . (^«,.,., + ,
f
(4.9.79b)
«
r
+
=
u
r C
"r + l . j . , + Αβ/,ί
= 2«,
+
+
Sr u ) +
' [ ^i"r+
..,,,)
S,.,.,)
f
( ^ , u . ,
2
+
Ι,ί.»
+
(
S
r + l.i.iJ
l.j.r
However, by definition β ^ — β' ', and if we define 1
5
then (4.9.79) takes the form (with 5 = 0 for simplicity)
«r+ Ι.,.ι ~
=
+ AO",.,.,
which is precisely of the Peaceman-Rachford A D I form. Also, note that in (4.9.79b) a simplification occurs when r + s +1 is an even integer, namely, (4.9.80)
U
r
2,s.,= r ,s,,- r,s,r 2u
+
U
+i
On the basis of these equations, Gourlay defines a simple and straightforward algorithm. T h e advantages of this algorithm as compared to P e a c e m a n Rachford are given as: 1.
It has minimal storage requirements since it allows an overwrite of core storage.
2.
Since the algorithm does not involve any tridiagonal solutions, an operational count of the various arithmetic operations reveals that the
Finite Difference Approximations in Two Space Dimensions
algorithm is three to four times faster than the scheme.
263
Peaceman-Rachford
3.
It is easy to program for linear and nonlinear problems over general y, - y regions.
4.
It seems to handle problems in many space dimensions almost as easily as those in one space dimension.
5.
Boundary conditions of various types can be included writeout any major difficulty.
6.
The algorithm is unconditionally stable (equivalent to the P e a c e m a n Rachford scheme).
2
A further interesting point arises if we subtract (4.9.79a) from (4.9.79b) and then eliminate u ^ via r
1
s
t
L
u
r . s . , = Lu
r
s
, + yu
r
s
n
where u , does not appear explicitly in L u , . This yields, with S = 0 for simplicity, r
(4.9.81)
s
r
Ρβ^ ^ . ,,
(1 - γ Α ρ 7 . Τ ' ) « , 2 . , . , "
2
Γ+2 5
+
= (\ + yhP y)u ^
+
r
s
r
P: Lu ,,+2 PC, Lu ^ . l
P
j
rs
P
r+
sl
This equation can be seen to be of D u F o r t - F r a n k e l form. In fact, in the one-dimensional case, the two schemes are identical. However, this local equivalence does not imply a global equivalence since the D u F o r t - F r a n k e l scheme calculates each mesh point by precisely the same formula starting from two given levels ( r = 0 , r — I) of information. The hopscotch scheme generates two sets of solutions but the starting process is automatic and not equivalent to the D u F o r t - F r a n k e l approach. In other words, the hopscotch method always starts off with the simple explicit formula, whereas the D u F o r t - F r a n k e l method needs a starting formula that is probably not the explicit form. Actually, we have only scratched the surface on the fascinating possibilities of the hopscotch algorithms. We can, for example, write (4.9.77) in the form (4.9.82)
K=[
X
[ 0
K ' + I''|i»even otherwise
with \i\ = i\ + «2 + · · · + i„, where η is the number of space dimensions. This leads to the o d d - e v e n explicit hopscotch method already described. By contrast, we can define
I
I
if r + y »is even
0
otherwise.
Parabolic Partial Differential Equations
264
where J is a subset of { l , 2 , . . . , n } ; here the β z e r o - o n e variable switches on only a subset of the space variables. This leads to an implicit hopscotch scheme. As an illustration, if
Σ ' = Ί< then there results (4.9.84a)
u,
(4.9.84b)
u
, = u , + pLu ,•
r+
r
r
+
= u
u
r
+ hS
r
, + pLu
w + /,even
r
+ hS „
r+Ul
m + i odd.
r+l
{
In the usual case where L involves only the four neighborhood points, (4.9.84) is implicit but requires only the solution of a tridiagonal system along alternate /', grid lines at each r level. This line hopscotch, as it is called, thus only requires half the work of the Peaceman-Rachford scheme. If we can split £ into and £ , where involves only derivatives in the Vi direction and L derivatives only in the y direction, then a hopscotch Peaceman-Rachford scheme can be generated. For an * step of 2A, the PR form of the model parabolic P D E in split form [using β[ in (4.9.83) with 2 ji - / |] has been given by Gourlay and McGuire as <2>
( 2 >
2
:
( e
(1 - p L > ) u , . , = (1 + pU' >)u .,. + AS 'i\., + AS<',»
τ + i, even
(1 - p L " » ) u , . , = (1 + p/J >)„,., + ASiV,. + AS< '
r + i,, o d d ,
,2
r+
r
r
2
2
r+
where S = S + S . It is also possible to develop a Crank-Nicolson hopscotch and a L O D hopscotch, but we shall not give the details here. The papers by Gourlay and Gourlay and McGuire present a number of numerical examples. These seem to confirm the versatility of the hopscotch approach and the conclusions stated above. Further work in this area seems called for. ( 1 )
( 2 )
4.9.8
Mesh Refinement
In many physical problems, the gradients of u may have considerably different values in different regions of ( x , y). In order to obtain accuracy in regions of large gradients, the values of k may need to be very small. This may, in turn, require small values of k over the entire y region. In the one-dimensional case, this may not be a major factor; b u t when one turns to two and three dimensions, some form of mesh refinement may be necessary. The theory behind such local variations in mesh refinement has been presented by Osher (1970), Venit (1973), and Ciment and Sweet (1973); Hurley and Linback (1973) have also outlined a computer routine for such variable grid distributions.
Three-Dimensional Problems
CN
C Ν l
Ο
β
ι
ι
L i t *
ι
265
CN
2
ι
ι
5(i
ι
5. 6
!
3 1 8 9 2 9 48 J
y
Figure 4.12.
Refined mesh distribution.
As an illustration consider the one-dimensional parabolic P D E with an appropriate finite difference approximation (e.g., the Crank-Nicolson form); h and A are given and we consider a mesh refinement in t h e y direction. In other words, in certain parts of the y direction, the mesh size is A, while in other parts it is k/p where ρ is a positive integer. To show what this yields, we choose k = l, p-3, and for 0 < y < l we refine the grid in [ j ^ . v ^ H Thus one has the mesh shown in Figure 4.12, where CN, means a C r a n k - N i c o l s o n approximation with k = | ; C N means a Crank-Nicolson approximation with k = j * . The main problem in using this approach occurs at y — \ and y — \, the interface points between the two approximations. Ciment and Sweet present a number of such approximations including some 0(k ) forms to maintain the Crank-Nicolson accuracy. Further, the overall algorithm is stable and consistent. 2
2
Ciment and Sweet also show how the Peaceman-Rachford ADI algorithm can be adapted to the one-dimensional distribution. In this format it is possible to use this efficient algorithm and obtain different mesh patterns in different y, - y regions. Finally, we wish to point out that Rachford (1968) has detailed the influence of round-off error in the ADI algorithms as the mesh widths h and A are refined to zero. 2
4.10
THREE-DIMENSIONAL PROBLEMS
We now turn our attention to the model three-dimensional parabolic P D E (4.10.1)
— W
U
r
X
.. + M „ „ + U V|V|
I 2 l ,
plus initial and boundary conditions. In the main we are considering a cube (in (>>,, y , and y ) evolving in the χ direction with the subscripts r, s, t, I. In most cases we delete the subscripts j , i, / when it seems extraneous. We could look at various explicit and implicit finite difference approximations, but the derivation of these forms is straightforward. Of course, even with the C r a n k - N i c o l s o n approach one obtains large coefficient matrices with many unknowns. To solve such large, but relatively sparse matrices, it is generally necessary to turn to iterative methods. Fortunately, there are a number of efficient iterative tech2
3
Parabolic Partial Differential Equations
266
niques, but we leave much of this development to Chapter 5 in the context of solving elliptic PDEs. T h e motivation and some preliminary concepts will, however, be presented in Section 4.10.3 after we have detailed A D I and L O D schemes. ADI Methods
4.10.1
The most obvious ADI method to apply to (4.10.1) is the Peaceman-Rachford approach. Here, as in the two-dimensional case, we make one dimension at a time implicit while leaving the other dimensions explicit. Thus, using the intermediate values « * , , , and «**,,,/ or u , , and u , w e could write (for h/3 steps and suppressing the subscripts s,tj) r + i / 3
(4.10.2a)
"
(4.10.2b)
"
r
+
2
r
+
l
\"
/
/
f
" '7 Γ+
(4.10.2c)
;" +
'
H
/
=
r
1 / 3
= ±
3
,
=
Γ+2/3
s
r + 1 / 3
+ δ> +
Su)
+ &u
+
S>u )
+
S?u ,).
2
r
Γ
2
/ 3
s
r+2/i
(*ί«, 2/, + « . A 2
+
+ 2 / 3
r+1/3
r+
Each equation generates a tridiagonal system in one space dimension. Alternatively, we could have written = _ i _ ( ?u
(4.10.3a)
(
4.io.3b)
(4.10.3c)
S
"
f
+
2
/
\
M
f
" '7 r+
+
1
/
3
f+2/3
=
^ ( « ,
=
-£ϊ
2
r+
« ,
) / 3
+ Slu, +
,/, + «'«,+2/3
+
S?u ) r
+
δ, Λ) 2
./3 + «£«,-2/3 + «
{*?,",+
2
" , + .
)·
However, in either form unconditional stability is lost. Thus for (4.10.3) we find that the amplification factors are l-j(a
=
+ fl )
2
3
l + \a 1l - K - f l | + <»3) 1 + 3 °\α2
Ί
I - i ( f l | + fl ) 1
I
I
2
1 + ja3 (4.10.4)
ξ - ξ^ξ^,ξ,
r
,, ,, , [l + jfl,J[l + | 2 J [ l + j a J i
2
3
Three-Dimensional Problems
267
where -4psin
A*
2
/ = 1,2,3.
2
A careful analysis of (4.10.4) shows there is a finite stability bound. The first A D I algorithm that is unconditionally stable is an extension of the Douglas-Rachford approach, (4.9.37). Thus we write (deleting the subscripts s,t,l) ' r + 1/3 -
"r+2/3
_
M
*/•+ 1
r
U,
β ,«Γ+Ι/3 2
+
δ
)
1/3 _ g y ( « < , 2 / 3 - » r ) 2
+
ur + 2 / 3
or, in more general split form, (4.10.5a)
(1 - ρ δ )uU, = [ 1 + ρ ( δ + S \)] u
(4.10.5b)
( ΐ - ρ δ ^ κ - , ^ , - ρ δ
(4.10.5c)
(l-p« >,
2
2
r
y
2
+
l
^
2
[DR]
= «,**,-po£« . r
Usually, the second and third equations of (4.10.5) are regarded as "corrections" to the first equation. Elimination of the intermediate values u* , and «**, yields the composite formula +
(4.10.6)
(l- e )(l-pe )(l- e > 2
2
2
P
P
r + 1
+ δ δ + δ δ ) - ρ δ ft /, ] u
= [ 1 + p ( δχ 2
2
2
2
2
3
2
2
r
[DR].
Both the coefficients in (4.10.6) are consistent 27 point operators. Equation (4.10.6) can also be rewritten in the form , , = «, + ρ ( δ + δ + δ > , 2
Μ
2
2
+
- P
2
3
2
2
2
+ 1
-
Μ ί
ι
8X)(u -u )
i m +^ , +
+ ρ δ δ δ Κ
+
r+l
),
r
268
Parabolic Partial Differential Equations
which the interested reader may wish to show is a perturbation of the backwards implicit approximation to (4.10.1). As a result, (4.10.5) has the same truncation error as the backwards implicit, namely «9(1,2). In fact, using Taylor series expansions and the relationships U
= V M,
M „= V M,
2
a
...
4
where Κ
,_3 (·)
, 3 (·)
2
, 3 (·)
2
3jv
3>Ί
2
2
9
2
2
2 Λ
it can be shown that the principal part of the local truncation error of the Douglas-Rachford scheme is 1 A 8 u — — pk\
8 u
4
4
3 u\
1
4
,,
— -prk
4
γ
ν
τ
4
u.
The proper intermediate boundary conditions for (4.10.5) are not given by
but rather by u%, = g + (1 - Sl)(1
(4.10.7)
r
P
g)
- ρθ, ,)(g , 2
r
r+
[DR]
-g ). «* *, = g + ( l - p 5 ) ( g A standard stability analysis on either (4.10.5) or (4.10.6) shows that the overall amplification factor is 2
+
r
r + 1
r
««-^^Γ^Λ'ι'^Τ'
(4..o. ) 8
1
[DR1
(1 + α,)(1 + α ) ( 1 + α ) 2
3
where, as before, A
•
α· = 4 p s i n
"A*
( = 1,2,3.
However, | i | ^ l , and thus the algorithm is unconditionally stable. Although the Douglas-Rachford approximation is unconditionally stable, it does have only moderate accuracy. Thus Douglas (1962) and Brian (1961) independently developed a more accurate scheme which is a perturbation on the use of the Crank-Nicolson form. The two-dimensional version of the following treatment turns out to be equivalent to the Peaceman-Rachford D R
Three-Dimensional Problems
269
method and to the Crank-Nicolson method in one dimension. T h e first estimate w*+, is obtained by averaging the first direction derivative Kf+i ",
1
-
(4.10.9a)
This is followed by moving the evaluation of the derivatives for y and y forward in the same fashion 2
(4.10.9b)
u*j -u _ x
1
r
h (4.10.9c)
k
^ ("? + «,)+7 . :( 2
Δ
ι |
2
2
+1
Μ
**Ι
3
^) + . Λ δ
+
2
1
U _ r
+ 6 ,( 2
T
1
W r + 1
+
M r
)
In each case, u* , «**,, and u , can be evaluated by solving a tridiagonal system. A more convenient form for calculation can be obtained by rearranging the first equation and by subtracting the first two and last two equations. This yields in split form +i
r +
1 + ^(δ +2δ +2δ ) 2
(4.10.10a)
•** =-£s}u.
(4.10.10b)
2 "V2"r
2
+ ur+
2
[DB]
I
(4.10.10c) The composite form obtained by eliminating u* , and «**, is given as +
(4.10.11)
—
P
X2l
Γ1
P
Λ2
1Γ1
P&2
= ι + ? («ν +«,? + a, ) + ζ- (δ δ, + δ δ + δ δ ) 2
--ττδ δ δ. 2
2
2
2
2
2
2
2
2
[DB]
Once again, the coefficients in (4.10.11) are 27 point operators. A careful examination will show that (4.10.11) is a perturbation of the Crank-Nicolson approach to the model parabolic P D E and thus the local truncation error is 0(2,2). Via Taylor series expansions, it is also possible to show that the
270
Parabolic Partial Differential Equations
principal part of the truncation error is
~j2
(4.10.12)
p k A
3_y
dyf
[DB]
dy}
4
From (4.10.10), it can also be determined that the proper intermediate boundary values are ur
+
i
=
g
r
+(\+fa)(\-fa)(g
r
+
-
l
g
)
r
«fil=gr + (l-f*v,)(irf,-eJ-
[DB]
Stability of the Douglas-Brian A D I formula follows in the usual way. The amplification factor becomes ^
_ 1D
+ α + a ) + ( " i 2 + Q|Q3 + a a ) + a ^ f l a f l
2
1 + (fl, + α
B
3
+
α
2
2
3) + (°Ι 2 + Ι 3 α
Α
α
+
a
2
f l
3
3)
l 2°3
fl fl
+
\DB]
'
for which | £ | < 1. T h u s the algorithm is unconditionally stable. It is important to realize that this approach is applicable to any number of space dimensions. We have already remarked that it is the C r a n k - N i c o l s o n method in one dimension and the Peaceman-Rachford in two dimensions; obviously, it has the same usefulness in three dimensions. However, variations on (4.10.9) must be made with extreme care; if the obvious substitution of «**, is made for u* in (4.10.9c), the method loses its unconditional stability. D B
+i
Fairweather and Mitchell (1965) have also, as they did in the twodimensional case, derived a higher-order, 0 ( 2 , 4 ) , scheme applicable to threedimensional problems. The split version of their formula, provided that p¥=i, is given by
[i-i( -i) ;J .
(4.10.13a)
p
0
w +1 =
P k ± i ) (
Ρ
2
e
+
5
2 )
U
r
6
+ [i + i(p + i)«,k 2
(4.10.13b) (4.10.13c)
[ -i( -i)s2] l
p
[ -^ -i) 2] X
=
ur:i
p
8
- k ± j l s 2
AP Ur+x
=
-k±iLs2
U
r
+
t>) jUr
+
u
r
+
i
*_
u
:i
[FM]
Three-Dimensional Problems
271
The intermediate boundary conditions are given as u*
(4.10.14)
f^|i,+M(p-i)*aM(p-4)«A]
+i
"
6
P+
p-i
i
p+
i
[FM]
ι
(4.10.15)
M
« = | ^ )
g
r
+
P~6
[i-J( _ )e*] p
_
P+
4
ι
6
[FM]
P~i
p+ί
Unfortunately, although of high accuracy, (4.10.14) turns out to be conditionally stable, stable only for ρ *£ jj. However, Fairweather, et al. (1967) have indicated a number of 0 ( 2 , 4 ) A D I methods which are unconditionally stable for three-dimensional problems. In particular, we quote the composite (4.10.16)
[i-l(p-i)^][i-i(p-i^][i-Kp-i)« J«, 2
i)^
= [\ + HP +
i)^
+ \(P +
+ ttP +
+ 1
iKW
[EMF]
referred to as the extended Mitchell-Fairweather; this follows since it is a direct extension of the Mitchell-Fairweather two-dimensional case, (4.9.41). The split formulas follow in the same way as (4.9.40). The amplification factor is given by the authors to show unconditional stability. This approach can be used for any dimensionality with the same results. Fairweather (1969) has also presented at least one further 0 ( 2 , 4 ) stable A D I algorithm. We shall not, however, quote this here. It is also possible to include source terms in the A D I formulation just as was done in the two-dimensional case. Thus we would write the Douglas-Rachford form (4.10.5) as (4.10.17a)
0
(4.10.17b)
(1 - p * v ) « ; ; .
(4.10.17c)
0 -Ρ , ,Κ+ι
-p«, k%. -[l + P 2
2
δ
2
Ρ*, Λ 2
=
11**
—
[DR]
ρδ Μ . 2
Γ
Finally, we wish to mention the work of Douglas and G u n n (1964), where a general approach to developing A D I formulations is presented.
272
Parabolic Partial Differential Equations
4.10.2
L O D and Fractional Splitting Methods
We can and shall derive a number of L O D and fractional splitting methods in exactly the same manner as we did in the two-dimensional case. However, now there do not seem to be any transformations such as (4.9.74) which make the A D I and L O D methods equivalent. Further, the lack of intermediate boundary conditions other than choosing the obvious values often causes the L O D methods to lose accuracy in comparison with the ADI methods. As before, we rewrite our model parabolic P D E such that only one space dimension per equation is involved, that is, u = u,. „ + u, ,. Y
χ
Ι1
νΙ
)
+ M , . ..
2 : 1
1
.I
*
1
gives rise to (4.10.18a)
Κ = «,·„•,
(4.10.18b)
jw, = u , ,
(4.10.18c)
K
V ;
= «v„v
Obviously, we may now develop explicit and implicit (Crank-Nicolson) approximations analogous to (4.9.67) and (4.9.69). These are, respectively (for
(4.10.19a)
", ι/3=(ΐ + Ρ δ > ,
(4.10.19b)
", 2/3
(4.10.19c)
ιι
2
+
+
= (ΐ + ρ δ
2 2
Κ ./3
= (ΐ + ρ β , ) ι < 2
Γ + Ι
[explicit]
+
Γ + 2 /
3
and (4.10.20a)
(ι-|δ )«-./3 2
(4.10.20b)
= (l +
f«
(4.10.20c)
= (l +
fS ,)«
J !
)«r l/3 +
2
r +
[CN]
2/3-
Of course, we could use the backwards implicit approximation for the second
Three-Dimensional Problems
273
derivatives in (4.10.18) to obtain (4.10.21a)
(ΐ-ρβ, )ι
(4.10.21b)
(l-p«, J« 2/3 = " „ / 3
2
ι
< Γ + 1 /
, = ιι
Γ
[BI]
2
r +
1
(ΐ-ρδν,Κ ,
(4.10.21c)
=
+
", 2/3· +
The last two formulas (CN and BI) use tridiagonal solutions along y,, t h e n y , and then>> , respectively. Equation (4.10.19) can be written in composite form by eliminating w and M / 3 to yield 2
3
f + 1 / 3
r
+
2
(4.10.22)
u
r + l
= { \ + pSl){\
+ 8 ){\
+ pSl)u .
2
P
[explicit]
r
2
where the coefficient on the right-hand side is a 27-point operator. Appropriate intermediate boundary conditions are usually taken to be U
M
r + 1/3 r+2/3
=
—
8r+
1/3
£ λ + 2/3·
The accuracy can be determined to be 0 ( 1 , 2 ) . Finally, this explicit approximation is conditionally stable, (i.e., ρ < 1 / 2 ) . as can be shown by a von N e u m a n n analysis. The same type of results can be obtained for the implicit approximations (4.10.20) and (4.10.21) assuming that the operators commute. As an illustration, (4.10.20), which is 0(2,2), has a composite (4.10.23)
( l - f « ^ ) ( l - f βΛ)(>-§ «Λ)-^. = (l +
fe,i)(l
+ f*r )(l + 2
1
f* K. 2
i )
[CN]
Equation (4.10.21), which is 0 ( 1 , 2 ) , has an amplification factor (4.10.24)
(,.= , . . „ , ' (1 + α,)(1 + α ) ( 1 + α ) 2
3
where
2
' = 1,2,3
and | £ , | < 1. Both (4.10.20) and (4.10.21) are unconditionally stable. B
[BI]
274
Parabolic Partial Differential Equations
4.10.3
Iterative Solutions
Returning to the model three-dimensional parabolic PDE, (4.10.1) (or in an equivalent sense the two-dimensional version), we can see that as χ — oo, the solution that results corresponds to the solution of the elliptic P D E 0 = u . . . + « . . , . + « , . ...
(4.10.25) '
V
> 2
>I>I
L
;
*Ι»Ι
If one is really interested in the solution of (4.10.25) and not on how one gets from an initial condition to the steady-state solution of (4.10.1), it is possible to take "judicious or large" h steps using any of the schemes already discussed. The truncation error may be large, but since one is not interested in the x-direction behavior, this is not important. Thus we shall shortly point out how the ADI algorithms can be used with ρ interpreted as an iteration parameter in the iteration from χ = 0 to χ — oo. However, in the usual situation where the x-direction values are important, it may be necessary to use an iterative solution. If one uses an implicit approximation, the result is a set of linear difference equations of the form [A]{u)
(4.10.26)
=
{b),
, , at all A" where {κ} is a vector of unknowns containing the values of u interior points. The known vector {b} is of dimension Κ containing the boundary conditions and [A] is a Κ Χ Κ matrix. [A] is always sparse and some of the better algorithms try to make it tridiagonal. If the original system is nonlinear, then it will probably need to be linearized first and the coefficients in [A] will be functions of this linearization. The system of resulting linear equations will then be solved iteratively until the solution converges. If we let superscript & indicate quantities evaluated with the k th iterate of «, then we may write (4.10.26) as r + i
[A] {u)
(4.10.27)
k
k
+
]
=
{b)
s
k
or [A] [{u)
(4.10.28)
k
k
+
*-{u) ]
= {b)
k
~[A] {u) .
k
k
k
Now the matrix operator [A] can be split into two parts with [B] on {w} and {[A] —[B] ) operating on {«}*. Thus k
A +
k
1
(4.10.29)
k
+
1
+([A] -[B] ){u}
= {b}
[B] ({u) ^-{u) )
=
k
k
k
k
or k
where [B]
k
k
k
{b} -[A] {u} k
has special properties (i.e, it is easily invertible).
k
k
k
operating
Three-Dimensional Problems
275
The Jacobi iterations use [B] chosen diagonal with the values equal to the diagonals of [A] (i.e., b = a and b = 0 , ι·φ j). Alternatively, one may choose to make [B] tridiagonal using the elements of [A] (i.e., b = a for |, - j\< 1 for |/' — y | > l ) . The Gauss-Seidel iteration makes [B] a lower and b =0 triangular matrix using the elements of [A] (i.e., b = 0 if j>i and b = a if n
u
tJ
:
tJ
tJ
lt
tJ
In any event, we may write {u}
(4.10.30)
k
+ ,
{u) +{[B] y\{b} -[A) {u} ),
=
k
k
k
k
k
where ([B] ) ' is the inverse of [B] and ({b) -[A] {u} ) is a measure of the deviation from convergence ({κ}* " ={u} ). However, if we use {κ}* from (4.10.30) only as an intermediate solution, {M}* *, then we may weight {«}* and {M}* * with 1 - θ and θ to yield a new estimate of ( « } . T h u s k
k
4
k
k
k
k
1
+
+
1
1
+ 1
A+
l
(4.10.31)
(u) ^=(\-e){u} +e[{u} +([B] ) k
k
k
\{b) -[A] {u} )},
k
k
k
θ>0
k
or {u}
(4.10.32)
k
+ i
{u} +([B] /ey\{b} -[A] {u} ).
=
k
k
k
k
k
In this context, θ is called the relaxation parameter and when 0 > 1 . O the method is called SOR (successive overrelaxation). By choosing an appropriate value of 0, usually - 1.6— 1.7, a faster rate of convergence can be achieved than with θ = 1.0. As an illustration of these ideas, we mention the work of Stone (1968) and Weinstein, et al. (1969). They have evolved an iterative technique suitable for three-dimensional parabolic and elliptic P D E termed the strongly implicit iteration procedure (SIP). Consider the case (4,o,3,
„ ,
+
, = £ ( .
£ )
Λ
£ ( .
+
Λ
£ )
£ ( .
+
Λ
£
This P D E is replaced with the finite difference approximation ίλ
in Ι Λ \
(4.10.34)
A
S.T.LI
\ , ο
-
a
- £ - ( « , . , . , - «,.,.,) + S , , , . , = a
y\I-\/2,L.L ^
α
y\S-T
\/2.ι.Ι
,
.
(«,+ ! . , . / - « , . , . / )
, . % , L + L / 2 , / , , ("Λ.,./-"1-1.,./)+ ^ K.I+I./-",.,./)
Λι.,-Ι/2.(,
. , % , , , / H / 2 ,
τι—K.,./-"*.,-!./)+—η—-«,.,./)
a
>'3i,,./-l/2
(" . ζ . / " , . / . / - ( ) -
S
ν
Parabolic Partial Differential Equations
276
where the r subscript has been deleted with ΰ the value at r and u the value at r + 1. Thus all the terms except one are at r + 1. Combining terms, the authors show that the entire set can be written in the form of (4.10.26), namely [/!]{«} = {/)}. Although [A] is not a sparse or full matrix, it contains a considerable number of elements. The trick used is to modify [A] such that [Λ] + [/?] is factorable into a lower [L] and upper [U] triangular matrix (i.e., [A] + [B]={L}lU)y. ([A] + [B]){u}
= {b} +
[B}{u)
or, in an iterative sense, (4.10.35)
([A) + [B]){u}
k
+
i
= {b) +
[B}{u) . k
The details of how [ β ] is chosen and the specifics of the algorithm, including the determination of iteration parameters, go beyond our discussion here. However, the method has much promise and seems to require significantly less computing time than the corresponding A D I approach. As another illustration, consider the Douglas-Rachford A D I scheme, (4.10.5). If we are not interested in the x-direction response, we may discard the notation of h, k, and so on, and replace it with an iteration index. Thus we have (4.10.36a) (4.10.36b) (4.10.36c)
(1 - p% )u* = [\ + { δ , + k
P
(1 - ρ * ό £ ) « " = w* (l - ρ * ό £ ) ι ι *
+ ι
)] u
k
2
ν
PSu k
2
k
= Κ··-Ρ*6£Μ*,
where the same value of p* is used in each of the three steps. A single iteration from u . In the original requires the use of the three equations to generate u work of Douglas-Rachford, they showed that the fastest approach to convergence could be achieved by varying p* (increasing the numerical value) in a precise manner. This is, of course, equivalent to increasing the value of h in the parabolic solution case. In this way we see that the A D I scheme solves either the parabolic or elliptic PDE. k + l
4.11
k
FINITE E L E M E N T S O L U T I O N O F PARABOLIC PARTIAL DIFFERENTIAL EQUATIONS
T o this point we have considered only finite difference methods for the approximate solution of partial differential equations. In the following sections we examine alternative schemes based on the finite element method. As we did in our earlier discussions, we begin with problems defined in two independent
Finite Element Solution of Parabolic Partial Differential Equations
277
variables and increase the dimensionality as the analysis proceeds. We consider further the relationship between finite difference and finite element methods and the relative advantages of each. The model P D E will be defined, in general, to include first-order terms in all coordinate directions because of the difficulties encountered in solving equations of this kind using classical numerical techniques. 4.11.1
Galerkin Approximation to the Model Parabolic Partial Differential Equation
We have already described our typical, model second-order parabolic P D E as fi(x,y)u =e(u),
(4.1.1)
y
where £[•] is usually a linear operator containing only spatial derivatives. O u r first objective is to obtain an approximating set of integral equations that can be reduced to a set of O D E s (or alternatively algebraic equations) using the finite element approach. There are a number of avenues of approach to the formulation of the approximating equations. They can be broadly classified into classical variational and weighted residual schemes ( M W R ) . Because M W R subsumes the variational method when it is applicable, we will formulate our approximating equations using only MWR.* As indicated in Chapter 2, a number of M W R schemes lend themselves to finite element analysis. In the discussion of parabolic PDE, we focus on the particular M W R approach known as Galerkin's method. There are several ways of presenting the salient features of Galerkin's method and we refer the reader interested in alternative formulations to the papers of Douglas and Dupont (1970) and Price and Varga (1970). T o obtain a Galerkin approximation to (4.1.1), let us first replace the function w(.v, y) by a trial function M(X, >·). We require that u(x, y) satisfy the essential boundary conditions (e.g., Dirichlet conditions) associated with (4.1.1). The trial function can be written
u(x,y)~u(x,y)
(4.11.1)
=
Σ
U^(x.y).
where φ (χ, y) is chosen to satisfy the essential boundary conditions and the remaining elements of the series
y
j
*Sec, for example. I'rcnter (1975) for a detailed discussion of the various schemes for formulating the approximating finite element equations.
278
Parabolic Partial Differential Equations
written Ν
= 2
u(x,y)<*u(x,y)
(4.11.2)
Uft^y).
7=1
In writing (4.11.2) we are requiring that φ,(χ, y) be a basis for the function ύ(χ, y) in the sense that w(x, y) can be written as a linear combination of the functions <£,(*, y). To clarify our presentation, let us define (4.1.1) in terms of a general operator L(u), where L{u) =
(4.U.3)
fi(x,y)u -t{Q). x
In Chapter 2 we pointed out that L(u) was not identically zero because ύ(χ, is only an approximation to the solution u(x, y). Thus we wrote
y)
L(u)=R{x,y), where R(x, y) is a residual. Invoking the M W R concepts with the weighting function defined as the basis function
(4.11.4)
(R{x,y)*,{x,y)dxdy
/
= fJL(u) (x,y)dxdy=0, l
i=\
N.
There is, however, an alternative way of interpreting (4.11.4). Those readers familiar with functional analysis will recognize that (4.11.4) is the formal definition of the orthogonality of the functions L(ii) and each basis function ΦΪ(Χ, y). Thus the Galerkin method requires that the residual R(x, y) be minimized in the sense that it is made orthogonal to each element of the set of functions Φ,(χ, y). One would anticipate that as the number of linearly independent basis functions increased the residual R{x, y) would correspondly decrease. The general Galerkin relationship (4.11.4) is readily expressed in matrix form by substituting (4.11.2) and (4.11.3) into (4.11.4) to yield (4.11.5)
(f(fi(x,y)u -£(uM(x,y)dxdy=0,
i=
x
l,...,N
or jJ^{x,y)-^lUA(x,y)-il[2urt(x,y))
(4.11.6) Χφ<(χ, y)dxdy=0,
/ = 1,2,...,/V.
Finite Element Solution of Parabolic Partial Differential Equations
279
Finally, recognizing that only the basis functions φ are functions of χ and y, we obtain
Συ^ΐ(β(χ, )^(χ, )~^^(χ^)})
(4.11.7)
γ
γ
X
/ = 1,2,...,/V.
Equation (4.11.7) may be written in matrix form as [*]{») = {/},
(4.11.8) where
u, = U. and the right-hand-side vector {/) contains known information on initial and boundary conditions, sources, and sinks. We consider the elements of {/) in more detail in the discussion of specific examples. In the formulation above, we have, of course, assumed that the basis functions are functions of both χ and y. It is often advantageous in working with parabolic PDEs to modify the definition of our trial function so as to make the parameter \J dependent upon χ and the basis function φ only a function of y. Thus (4.11.2) becomes }
7
Ν
2
u(x,y)~u(x,y)=
(4.11.9)
υ,(χ)φ).
If we combine (4.11.9) and (4.11.5), we obtain (4.H.10)
jffiix.y^lVjWfaiyMy)
2
7= 1 y
x
-U (x)e[i, (y)^ (y)axdy=0, J
J
i=
l
\,...,N.
Equation (4.11.10) is a set of O D E as is readily apparent when (4.11.10) is written in matrix form (4.11.11)
μ
]
{ | ί }
+
[
/
?
]
{
Μ
}
=
{
/
}
280
Parabolic Partial Differential Equations
where
and the vector { / } , once again, will be determined by boundary conditions, sources, and sinks. When an equation of the form of ( 4 . 1 1 . 1 1 ) is employed, one has the option of introducing a number of well-known schemes for the solution of the resulting set of O D E . 4.11.2
Approximation of the Time Derivative
Because we generally encounter equations of the form of (4.11.11) in the solution of parabolic PDEs, let us consider a few of the many ways available for solving this set of O D E . One approach is to solve (4.11.11) directly. If we allow the initial conditions to be expressed as {u} = {U(0)}, where 0
i(0j)=iw^)-
(4.11.12)
we obtain (Price and Varga, 1970)
{u(x))=w{-x[AY\B)){u)
(4.11.13)
0
+ fe*p((x'-x)[A]- [B])[A)- {/(x'))dx', l
x>0.
l
Although (4.11.13) is conceptually attractive, the amount of computational effort involved in evaluating the right-hand side is generally prohibitive. It can be useful, however, in establishing error bounds (see Price and Varga, 1970). Many of the finite difference schemes introduced earlier in this chapter can be used in conjunction with (4.11.11). Let us consider some examples that have appeared in the literature. Forward Time Approximation In Section 4.3.1 we approximated the time derivative using a first-order correct finite difference representation. This approach led to a very efficient algorithm, but it was subsequently shown that this scheme is stable only for selected parameter values. Let us now consider whether a similar algorithm can be used to solve (4.11.11). Substitution of a forward difference in (4.11.11) yields (4.H.14)
M
]
{ ! i - i _ ^ }
+
[
a
]
{
M
}
r
=
{
/
}
r
,
Finite Element Solution of Parabolic Partial Differential Equations
281
which can be rewritten [A]{u}
(4.H.15)
r
+ }
= ([A\-h[B\){u),
+
h{f) . r
In the finite difference case of Section 4.3.1 we found that [A] was a diagonal matrix such that the solution to (4.Π.15) required very little computational effort. The finite element formulation, however, does not generally give rise to a diagonal form for [A]. Thus it is still necessary to solve a set of simultaneous equations and the advantage of the forward time method is essentially lost. There are two ways to formulate (4.1 LIS) such that [A] is diagonal. The most popular approach is to diagonalize [A] by lumping. This entails the incorporation in the diagonal element of [A] the information in the off-diagonal elements. There are several schemes for achieving this goal; the most straightforward is to sum directly the information on any given row and allocate it to the diagonal element. Another approach, which is mathematically more appealing, involves the type of numerical integration used in evaluation of the coefficients of (4.11.H). For example, when Simpson's rule rather than Gauss quadrature is employed in conjunction with a Lagrangian finite element formulation, a diagonal form for [A] arises naturally (Gray, 1977; Young, 1977).
Backward Time Approximation In this method we employ the first-order correct backward in time approximation in the matrix equation (see Section 4.3.4 for the finite difference counterpart): [A][^Y^}+[B]{u}
(4.H.16)
rtl
=
{f} .
+
h{f)
ril
which can be rearranged to give ([A] + h[B]){u} ^=[A]{u)
(4.H.17)
r
r
r+l
or. alternatively, (4.H.18)
[u)
r + l
=([A]
+ h[B])
'([A]{u}
r
+
h{f) ). r+l
In practice, o n e does not generally invert the coefficient matrix but rather solves the set of simultaneous equations using a more efficient direct solution algorithm. When LU decomposition is employed, the time-consuming upper triangularization procedure need be executed only once for a linear problem provided that the time increment h is not changed.
Variable-Weighted Implicit Approximation T h e backward a n d forward time approximations are actually the end members of a general weighted
282
Parabolic Partial Differential Equations
implicit approximation which can be written (4.11.19)
μ ] { ^ ± ^ } + [ * ] ( 0 {
= nf}r
Μ
} , +
+
1 +
(1-0){ } ) Μ
Γ
iH\-9)[f),
(0<θ<1).
This is analogous to the finite difference formulation of Section 4.3.6. Written in this form [i.e., (4.11.19)] it is apparent that the spatial operator is located at x = x + 0A. The implicit nature of this scheme is clear when rewritten r
(4.11.20)
([A] + eh[B]){u)
r
+
l
+ eh{f)
=([A]-(\-e)h[B]){u)
r
+ O-0)M/},
r
+
l
(O<0<1).
When 0 = 1, (4.11.20) reduces to (4.11.17), the backward time approximation. Similarly, when 0 = 0 , (4.11.20) becomes (4.11.15), the forward time approximation. The special case of 0 = 0 . 5 is the centered in time or Crank-Nicolson approximation. Another special case is generated when linear basis functions are used to formulate the time approximation in the Galerkin method. We show in an example that this situation is equivalent to a weighted approximation with 0 =0.67. In our discussion on convergence and stability, we demonstrate that unconditional stability requires that 0 > O . 5 . 4.11.3
Approximation of the Time Derivative for Weakly Nonlinear Equations
The three schemes described above are those commonly encountered in the solution of parabolic P D E using the finite element method. Approximations using more than three time levels can, of course, be readily generated using either finite difference or finite element methods in time. In general, however, the increased accuracy does not justify the additional computational effort. A possible exception to this general rule is encountered in the solution of weakly nonlinear equations. Let us consider a few schemes that have been developed to solve this class of problems without resorting to iteration. Lees' Three-Level Time Approximation The advantage of this secondorder-correct-in-time scheme is the fact that no iteration is required to accommodate coefficient nonlinearity. The algorithm is written (Lees, 1966; Culham and Varga, 1970) (4.11.21)
[A},{
Ur+
\ '- }+mMu} U
h
l
r
+
> +{u) + { κ } - , ) = { / } , r
Γ
Finite Element Solution of Parabolic Partial Differential Equations
283
or, rearranged for computation, (4.H.22)
^L + f ^ j W . r l M L - f l f i L l w , - , - y [ * ] , { « } , + 2*{/},-
The subscript associated with matrices [A], [B], and {/} indicates the time level at which they are evaluated. Note that in (4.11.21), the coefficients are all evaluated at time level r and consequently are known. The method clearly centers the coefficients and, because it is linear, can be solved directly for {u} and, subsequently, the coefficients at time level r + 1. One thereby proceeds stepwise through time without the use of iterative methods. r+x
Modified Backward Time Approximation This scheme is the logical extension of the backward time approximation described above for the linear system of equations. The only modification involves the recognition of the time dependence of matrices [A] and [B] and their explicit evaluation at the r t h time level. Thus the algorithm is written (4.11.23)
^ ]
r
{ ^ ± ^ ) + [ * ] , { , } , +, = { / }
r + I
or, alternatively, (4.11.24)
([A)
+ h(f)
+ h[B) ){u} =[A] {u}
r
r
r+l
r
r
r
+
i
.
Culham and Varga (1970) examined the accuracy of the Lees' three-level time approximation and the modified backward time approximation and compared the results against the fully nonlinear case (4.11.25) ([A], + + eh[B], t
+ t
){u),
=([A),
+ l
-(\-e)h[B]
+ t
+ M{f)
r+l
r
,){u}
+
+ (\-e)h{f}
r
r
(Ο<Θ<\).
Equation (4.11.25) was solved iteratively. The authors found that the backward time approximation [(4.11.25) with 0 = 1] and modified backward time approximation (4.11.24) were superior to the centered time approximation [(4.11.25) with t?=0.5] and the Lees' three-level time approximation. This is rather remarkable inasmuch as it suggests that the centered time approximations were inferior to the first-order correct schemes for this particular problem. There is some indication, however, that had smaller h been employed the second-order schemes would have provided more accurate solutions.
284
Parabolic Partial Differential Equations
Predictor-Corrector Approximation To avoid the necessity of solving the nonlinear system of equations, Douglas and Dupont (1970) introduced the following predictor-corrector approximation (4.11.26a)
[A] [^Y^]
(4.11.26b)
[ ^ ] · { ί ί ί ± 1 ^ ) 4 [ Λ ] · ( ( 1 + ί){«}
+ nB]r((\
R
+
e){u}* +(\-e){u} ) +l
+
= Q
r
Γ +
1
+ ( 1 - β ) { « } ) = 0, Γ
where {u}* , is a temporary solution and the matrices [A]* and [B]* are defined using ^[(1 + 0 ) { u } * , + ( 1 - 0){w),.] for {u}. It is apparent that one must solve two equations at each time step; these equations, however, are linear algebraic systems. The scheme is second-order correct in time. +
+
Modified Predictor-Corrector Approximation The predictor-corrector approximation of (4.11.26) can be made more computationally efficient by solving the prediction equation using the coefficient matrices from the correction equation of the previous time step (Douglas and Dupont, 1970). This modification minimizes the time-consuming task of coefficient evaluation. The resulting algorithm is written
(4.11.27a)
[ ]^!^p^^+i[B] ({u)^
(4.11.27b)
[AY[^^}+\[BY({u}
+ {u} )
l
A
=0
r
r
+ ]
+
{u) )=0, r
where the coefficient matrices [A] and [fl] are evaluated using the relationship [u} _,) and [A] and [B] are formulated using 2 ( { " } * + 1 + 1
Ί ( { « } *
+
1
1
2
r
Crank-Nicolson Extrapolation Douglas and Dupont (1970) suggest a procedure for approximating Μ which requires only one equation per time step and maintains second-order accuracy in time. This algorithm is written (4.11.28)
[ A ] { ' ^ ^ )
+ {[B]({u}
r
+
l
+ {u} ) r
= 0,
r= \
M-\,
where Μ is the total number of time steps and matrices [A] and [B] are evaluated using 3 / 2 { w } — l / 2 ( u } _ , . Examination of (4.11.28) reveals that two time levels are required to initiate the procedure. Thus this approximation cannot be used for the first time step and one of the two-level methods described earlier must be used. r
r
Finite Element Approximations in One Space Dimension
4.12
285
F I N I T E E L E M E N T A P P R O X I M A T I O N S IN O N E S P A C E DIMENSION
Although, in theory, the formulation of the finite element approximating equations for any parabolic PDE of the form of (4.1.1) can be accomplished by employing the principles presented in Chapters 2 and 3 and the development described above, there are many practical aspects of the procedure that are best illustrated through example problems. In the next few sections, we consider several of the pragmatic aspects of solving parabolic P D E using finite element theory. The particular operator we have chosen describes the convective and dispersive transport of mass and energy in a moving fluid, £(u)=u,-^(a(y)u )
(4.12.1)
+ -^(b(y)u)
r
= 0.
Typically, the dependent variable u(x, y) would represent ionic concentration or temperature, the parameter a(y) would be the molecular diffusion or dispersion, and the parameter b(y) would be the fluid velocity in the positive y direction.* In conjunction with (4.12.1), we must, of course, specify appropriate initial and boundary conditions. These auxiliary equations for our example problem are (4.12.2a)
M ( 0 . . V ) = 0.
<Xy
(4.12.2b)
ii(.v.0)=l.
χ >0
b(l)u{\J)-a(l)u {x.l)
(4.12.2c)
= 0.
x
4.12.1
x>0.
Formulation of Galerkin Approximating Equations
Let us define a trial function ΰ as we did earlier, (4.11.2)
«U.r)*M(.v..r)=
J
<7,<*>,(-*. ν)·
/ ι When this trial function is substituted into (4.12.1), we have (4.12.3)
£(«)=/?,
where R is a residual arising from the fact that (4.11.2) does not identically satisfy (4.12.1). According to the Galerkin approach, we require that this
•We recognize lhat h = h{\)
is not physically realistic for one-dimensional flow.
286
Parabolic Partial Differential Equations
residual be orthogonal to each of the basis functions φ , j = \,...,N. approximating integral equations have the form (4.12.4)
ι= 1
<Λ,Φ,>=0,
Thus the
Ν.
Substitution of (4.12.1), (4.Π.2) and (4.12.3) into (4.12.4) yields (4.12.5)
/=!
N.
At this point in the development, we have three options. If we employ C continuous basis functions such as Hermite cubics, we can employ (4.12.5) in its current form. In other words, the C functions are sufficiently differentiable that all elements of (4.12.5) are clearly defined. On the other hand, if we use C ° continuous basis functions, the second-order differentiation of φ ( χ , y) inherent in (4.12.5) may cause some difficulty. Thus it is advantageous to transform (4.12.5) using Green's theorem or integration by parts. N o w we have two additional options. We can apply Green's theorem to the second-order term only or to both the first- and second-order terms. T h e choice depends primarily on the boundary conditions. To see how the boundary conditions come into play, let us first apply Green's theorem only to the second-order term. We obtain 1
1
;
(4.12.6)
lfA^My)*)Mx,y)) - (ν)ΰ .φ,(χ,ν)|Ό=0, α
{a(y)u ,* {x,y))
+
ν
v
yi
Ν.
1= 1
Note that the third term in (4.12.6), when evaluated at the indicated limits, is a second type or Neumann boundary condition which is now embedded directly in the approximating equation. We see that in application this term is either known through the boundary conditions or does not require evaluation. Now let us apply Green's theorem to both the first- and second-order terms of (4.12.5). The resulting expression is (u ,*, (x,y))-(b(y)u-a{y)u ,*, {x y))
(4.12.7)
x
t
y
+ {b(y)u-a(y)u )
o
yt
t
i= l
Ν.
It is apparent that the third term in (4.12.7) now represents a third type or mixed boundary condition. Thus it appears that one can modify the fundamental approximation (4.12.5) to accommodate second- or third-type boundary conditions. In the development to this point, we have assumed that the time approximation would be carried through the basis functions. Had we elected to represent
Finite Element Approximations in One Space Dimension
time through the undetermined parameter U^x), function u as
287
we would write the trial
Í
u{x,y)*u{x,y)
(4.11.9)
= Ó i=\
V,(x)^(y).
In writing the trial function in this way, we have replaced the two-dimensional basis function
(4.12.8)
I
Ó U^ (x,y)^ (x,y)^j-^b(y)l l
õ,φ,(χ. y), Φ ,(χ.
l
+ {a(y)
ν
y)j
Ó * / A , ( * . >0'Φ.·,(*. J-)j [b(y)u-a(y)u ]4,,{x,y)\' =0,
+
l
0
i=l
N.
The parameters a(y), b{y) can be handled in a number of ways; we will assume for the time being that they are spatially constant such that they can be removed from the integrand along with the undetermined parameters U. Equation (4.12.8) becomes
(4.12.9)
Ó U^tjx,
γ
),φ,(χ,
y))~ΰ(φ,(χ,
y),
v)>
/ = !
+ α(φ (χ, õ
+ (bu - αύ )φ,(χ,
y),* ,(x,y))] r
ν
y)\'
Q
=0, i= l
iV.
There was no substitution for ΰ and ύ in (4.12.9) because, as indicated earlier, this term is never evaluated explicitly. Equation (4.12.9) is conveniently expressed in matrix form as ν
(4.12.10)
MK«} = {/}.
288
Parabolic Partial Differential Equations
where a,j =
<^j{x.y).*,{x,y))-bfy(x,y),* {x,y)) ri
-a(
yl
-(bu-au )+,(x,y)\' .
f =
r
0
Before we proceed to evaluate the coefficients of (4.12.10) it is worthwhile developing a relationship analogous to (4.12.10) using the alternative trial function (4.11.9). Substitution of (4.11.9) into (4.12.7), while replacing the weighting function φ,(χ, y) by the one-dimensional counterpart
(4.12.11)
j i^ ,(x)
J
iu (x)< > (y),*Jy^
l
+ l^(y)
j
t
J
Σ^Κ^Η,ω)
+ [b{y)u -
α{γ)ύ ]φ,(γ)\' =0, ν
ο
i=\
N.
Assuming constant coefficients a and b, (4.12.11) becomes
(4.12.12)
Σ
[õ ^χ)(Φ^),ø,( ))-ü^{χΧφ),φ (γ)) χ
γ
νι
7 =1
+ aU,{x)(+ (y),* ,{y))] VJ
r
+ (bu - αύ )φ,( )\' ν
γ
0
=0, ι' = 1
Ν.
Equation (4.12.12) describes a set of Ν ordinary differential equations. This is readily apparent when (4.12.12) is written in matrix form.
(4.12.13)
M]{£}+[*]{«} = {/}.
Finite Element Approximations in One Space Dimension
289
where
b,, = -b(
yi
+
a(
yi
du _dU dx dx l
L
u=U
r
-{bu-au )^(x.y)\'
f, =
r
0
To solve (4.12.13). the time derivative is generally approximated using one of the difference approximations outlined in Section 4.11.2. Thus far we have said nothing specific about the functional form of φ,( ν). The accuracy and efficiency of the numerical scheme depend, in large part, on the choice of these functions. Let us now consider the specific case of piecewise linear polynomials. 4.12.2
Linear Basis Function Approximation
The linear basis function is illustrated in Figure 2.5. It can be written in global y coordinates as (4.12.14)
φ,=
Φ,
y
~
y
' -
]
y,-y,-\
,
v,.., < ν < v, "
y,+\-y y,+i-y,
which is analogous to the expression developed for the O D E example of Chapter 2 (2.2.10). Although, for this simple problem, there is little reason to consider a local coordinate formulation, this is not generally the case. In local coordinates, (4.12.14) becomes (see Table 2.4 and Figure 4.13) (4.12.15a) (4.12.15b)
φ_,(η)=-^
φι(τ
,) -1+2». =
We have seen that there are two ways to formulate the approximating integral equations, as indicated in (4.12.10) and (4.12.13). Let us consider first the formulation leading to a set of O D E because it is the most straightforward.
290
Parabolic Partial Differential Equations
φ. ( η ) ι φ ' ^
φ .<
element
number
Figure 4.13. Linear "chapeau" basis functions defined in local (η) coordinates. The numerical subscripts indicate that the function is defined by element. The subscript j indicates that basis functions from two elements are required in combination to represent one complete basis function at node j .
The coefficients of (4.12.13) involve three types of integrands,
=
{φ)Ìν))
(4.12.16a)
Éχ
(4.i2.i6b)
h =
(4.12.16c)
h = (
<+,(yUrAy)) VJ
Although the integration of (4.12.16) is easily achieved in global coordinates, in terms of the more general formulations, it is more illustrative to consider integration in local coordinates. It is first necessary to consider the global integrals as the sum of contributions from one or more elements. Thus (4.12.16) can be written (4.12.17a)
/,= Ó
(4.12.17b)
1=
<4>,(yU,(y)y
2
2
(Φ,ω.Φ,Χν))"
e= I
(4.12.17c)
/ =
2 <*.,(>-).*,.,(*)>'·
3
e=I
In terms of the locally defined basis functions Φ(η), we obtain (4.12.18a)
(4
,„
8b)
/,= J / ' ^ ( i W l ) ) ^ )
l
l
=
i
S
>
^
^ L [ ^ ^
Finite Element Approximations in One Space Dimension
291
where the subscripts / and j will denote the type of basis function φ ,(η) or φ,(η) to be used in each integral. Combination of (4.12.18) with the definitions of Φ / ) ) (4.I2.15) yields, as typical integrals, 7
(4.l2.l9a)
n = \ f
{AË2.\<)b)
n=\f
(4.12.19c)
r
3
(\-r\){\-r\)^fd^ = -^f ]
)
(\-l)(-\)dn=-\
= ± f \ - \ ) ( - \ ) ± d i
=
±
where the superscript e accounts for the possibility of a variable grid spacing. Having performed the integration required by (4.12.13), we are now in a position to consider the boundary and initial conditions in our example problem. Let us assume that a backward difference formulation is used to evaluate the time derivative in (4.12.13). Thus we obtain (4.12.20)
(j;[A)
+ [B}){u}
r
= -^[A]{u)
+ l
r
+ {f}
or, in a more compact form, [C]{u}
(4.12.21)
r
+ ]
=
(f}.
If we assume that our domain of length / is subdivided into Μ increments, matrix equation (4.12.21) will represent Μ +1 linear, nonhomogeneous equations in Μ + 1 unknowns. To evaluate this set of equations, we must impose the additional constraints of the boundary and initial conditions. T h e initial conditions are readily accounted for through the relationship Ì +I
=
u(0,y)~u(0.y)
(4.12.22)
2
V,(0)*j{y).
Recalling the initial conditions of our problem (4.12.2a), we obtain õ,(0)φ)=0.
"i
(4.12.23)
Because the basis functions must be unity at the node for which they are defined and zero elsewhere, we obtain (4.12.24)
{«} = {0}. 0
which replaces [u} on the right-hand side of (4.12.20) for the first time step. r
292
Parabolic Partial Differential Equations
The Dirichlet boundary condition (4.12.2b)
x>0
«(x,0)=l,
is equivalent to t/, = l, which is again apparent from the functional form of Φ^γ). Thus the first row of (4.12.21) can be deleted and the information in column 1 placed on the right-hand side of the remaining Μ equations. Alternatively, one could set (4.12.25a)
C
(4.12.25b)
C„=0,
(4.12.25c)
/ , = 1,
n
= I,
which would achieve the same objective but would not reduce the order of the matrix. Nevertheless, it is sometimes convenient when using block iterative methods to use the approach described by (4.12.25). The third type boundary condition of our problem (4.12.2c)
= 0,
b(l)u(xj)-a(l)u (x,l) v
x>0
is easily accommodated through a judicious use of Green's theorem. In (4.12.12) we have the term q=(bu-au )*,(y)\' .
(4.12.26)
r
0
We know, however, that at the ends of our domain (i.e., y = 0 and y = I) the basis function is unity. Consequently, q can be written at y — I as
q=
b(l)u(l)-a(l)u {l), r
which is the Galerkin approximation to the boundary condition (4.12.2c). This condition is thus accounted for by simply replacing the term q by the appropriate specification, in this case q = 0 . The lower limit of (4.12.26) does not explicitly appear in the matrix equation because equation 1, written for >>=0, has already been deleted or modified to account for the Dirichlet boundary condition. With these modifications, (4.12.21) is ready for solution using standard matrix methods. Now let us reconsider our example problem using the Galerkin-in-time scheme described by (4.12.10). The basis function in this case must be defined as a function of both χ and y. This is readily achieved by taking the product of the one-dimensional basis functions Φ,(χ) and Φ,(γ) defined earlier in (4.12.14).
finite Element Approximations in Two Space Dimensions
293
T h u s we obtain (4.12.27)
Φ,(.ν..ν) =
<Μ*)Φ,ω
or. in local coordinates, (4.12.28)
Φ,(€,η) = Φ , ( 0 Φ , ( η ) ·
As in the discontinuous-in-time problem outlined above, there are three integrals to consider: (4.12.29a)
/· = £
(4.12.29b)
/ *
e= I
2
<*J**yh
y)Y
(Φ,(χ,γ),*„{χ^)Õ
£
Î
*,(*.
e= \ Å
<
/,*= Ó
(4.12.29c)
VJ
e— I
vl
Substitution of (4.12.27) into (4.12.29) yields (4.12.30a)
/Γ=
(4.12.30b)
/?=
Σ /
7
Σ jJ
e= 1
(4.12.30c)
Φ, (^)Φ,(>')Φ (^)φ,(^)^φ
/
1
*,{χ)φ)+Áχ)Φ \ν)άχάγ ν
1
1
f
/,·= 2 e—I
JtjixHyjiyWxteMdxdy. 1
v
The integrals of (4.12.30) may be expressed in an alternative form more convenient for integration: Å
(4.12.31a)
/ ? = Σ / *,(y)*Ay)dy e
=|"V
Φ (χ)Φ,{χ)άχ Χº
•v /
(4.12.31b)
/·= £
/ * {yH {y)dy
(4.12.31c)
/,* = £
/ * {y)* ,(y)dy
2
f
J
vl
vl
v
r
ί
φ {χ)φ {χ)άχ )
[
ι
φ+χ)φ,{χ)dx.
294
Parabolic Partial Differential Equations
Rewriting the integral involving spatial derivatives in local coordinates, we obtain
(4.12.32a)
/· = 2
• ί x'
f
^ W ^ f
^ )
<*ψ
fj (x)i,{x)dx X)
Φ (χ)φ (χ)άχ. ί
ί
J
Examination of (4.12.32) and (4.12.18) reveals that the Galerkin-in-time scheme generates coefficients that are analogous to those developed for the discontinuous-in-time approach but are multiplied by an additional term involving time integration. If the integrals of (4.12.32) are evaluated and the resulting information appropriately rearranged, the resulting formulation is equivalent to the variably weighted implicit approximation (4.11.19) with the weighting factor è equal to 0.67. Thus the Galerkin-in-time approximation, using linear basis functions, can be expressed using a finite-difference-in-time representation (the coefficient matrices [A] and [B] are, of course, those generated through the finite element approximation). 4.12.3 Higher-Degree Polynomial Basis Function Approximation In the preceding section we developed the finite element equations using Galerkin's method of approximation in conjunction with linear "chapeau" basis functions. In this type of formulation one associates two nodes with each finite element or, equivalently, three nodes with each complete basis function. There may be occasions when a solution is represented more accurately with piecewise quadratic, C ° continuous functions. In this type of element, illustrated in Figure 2.7, there are three nodes per element. The basis function associated with the mid-element node spans the length of the element. Those written for the end nodes of the element, however, span two elements and consequently involve five nodes. Contrary to what might be anticipated, the numerical approximation obtained at a corner node is not necessarily more accurate than that generated at a midside node. This is readily apparent through an examination of the truncation error associated with the spatial derivatives of (4.12.1). We consider this question separately in a later section.
Finite Element Approximations in One Space Dimension
295
The use of quadratic basis functions does not alter the general formulation of the preceding section. The coefficient matrices are of generally the same form as (4.12.10) and (4.12.13), although the required integration is somewhat more tedious. There is, however, a practical disadvantage to using quadratic bases. The number of nonzero coefficients in each corner node equation increases from three to five, and the bandwidth of the coefficient matrix increases. Both of these factors lead to an increase in the computational effort required to solve the approximating algebraic equations. The extension of this type of formulation to cubic and higher degree C ° continuous bases is straightforward (see Figure 2.7 for cubic basis functions). The formulation is analogous to introducing higher-order difference approximations and displays similar advantages and disadvantages. Higher-degree polynomials should characteristically provide a smaller truncation error at the expense of additional program complexity and computational effort. In Section 2.2.3 we described in detail the use of Hermite polynomial basis functions. We found that in this formulation the cubic nature of the polynomial was not achieved through the introduction of additional nodes within the element. Rather, the required number of constraints was obtained by specifying both the function and its derivative at each corner node. Using this approach, we find that it is possible to achieve C continuous solutions. In other words, we can obtain not only continuous values for the unknown function u, but also its first derivative, u . The development of the preceding section is not unduly complicated when Hermite polynomials are used for the spatial approximation. Introduction of the Hermite expansion 1
r
(4.12.33)
into the approximating Galerkin equation (4.12.7) yields (4.12.34a)
(ύ ,φ (γ))-I Ë
b(y)u-
0ι
+
a(y)u . v
dy
[b{y)a-a(y)& ]+ ,(y)k=<S, Y
Q
) i=],2,...,N/2
(u .* (y))-(h(y)u-a(y)& .
(4.12.34b)
x
+
u
y
[b(y)u-a(y)u ^ (y%=0. y
u
i=l,2,...,N/2
296
Parabolic Partial Differential Equations
upon further expansion, (4.12.35a) N/2
Σ
dxh ^
+
i x (
d
Κω.*ο,ω}
- d j
dU. u (x)
d
0j
άφ
-a{y)
i
dU,
ûι
ί/φ,,
+ [M.v)m-«(vRK(v)| =0.
d* Όι ' dy {
i = l,2
( )
N/2
(4.12.35b) ν:
Σ
dU, ^(ν)φ
-
( ) /
(.ν)+^(Λ)φ (.ν) υ
a(y)
dy
+ [f>(.v)u-a(y)u ]<j> (y)\' =0. r
u
d
(
Λ"/2.
Equation (4.12.35) can be written in matrix form as [A][%
(4.12.36)
} r[B]{u)
= {f}.
where <Φι„( >·)·*»,( v)>
<«.,(.*•).«»,(.»·)>
<•..,(.»•).Φ„(.ν)>
<Φ,,( ν ) . φ „ ( v)>
>')Φ (.')-«( r ) ^ , ^ > (1/
(A(i')«„(.v)-«(.r)^
<*Φο, ι· Λφ„ dv
Finite Element Approximations in One Space Dimension
297
dv dU, f, = -
[b(y)u-a(y)u^ (y)\
dx
ο
ih
ο
dx \ dy
Equations (4.12.36) describe a system of /V ordinary differential equations in Ν unknowns. Thus after suitable approximation of the derivatives in v. we can solve simultaneously for U and its derivative dU /dy. To date, the χ derivatives have been approximated using various types of finite difference approximations. Because the Hermite polynomials provide a higher-order accurate space approximation, care should be exercised to approximate the time derivatives as accurately as economically feasible. Some rather attractive schemes have been recently developed by van Genuchten and Gray (1978) which provide higher-order time approximations in the transport equation with very little increase in computational effort. /
4.12.4
t
Formulation Using the Dirac Delta Function
In approximating second-order PDE using linear basis functions, one usually applies Green's theorem. This avoids the difficulties associated with second-order differentiation of a piecewise linear function. In this section we demonstrate that the Green's function transformation is not necessary in the development of the approximating equation.* Let us consider once again the transport equation after application of Galerkin's method. We assume for the sake of clarity that coefficients a and b are constant. (4.12.37)
(i^-fltt,.,.+ *«,.,φ,(>·)>=0.
ι = 1.2
Ν.
From Figure 4.14, we see that the first derivative of Φ,(.ν) for one element at node j yields the Heaviside step function H(y ~ >,) and the second derivative yields the Dirac delta function. Substitution of the definition of w [i.e.. (4.11.9) into (4.12.37)] yields (4.12.38)
H,
£
.?,"' v
(jr,<
d\
**-'^-*>
dU
•This approach was suggested by W. G. Gray.
/ = 1.2
Ν.
298
Parabolic Partial Differential Equations
2_£
Figure 4.14. Dirac delta function development of the finite element equations using linear basis functions.
k
When linear basis functions are used, (4.12.38) becomes, for equation j of Figure 4.14, (4.12.39) t
i-C.J-i-^-°- * )^ 1)
(,~\)k>
J
<
J
ik
1
' ( / — I )A
K
*
ι = 1,2,...,Μ Evaluation of the integrals of (4.12.39) yields ,4,2.40)
^ ( - f - i j +
^ 6
dx
+
^
« ^ 3
dx
^ +
l
f
-
* ^ 6
dx
=
f 0
)
,
N
Finite Element Approximations in One Space Dimension
299
or, rearranging terms and dividing by k, (4.12.41)
-^(i/
/ + 1
-2i/
7
+ ~ — ~
ï
+
(/ _,)+^(t/ 7
+ ^-r
dx
y +
,-t/ _ ) /
1
+ 7—.7^=0,
1
3 dx
6
N.
i = l,2
dx
This expression is similar to that obtained using Green's theorem, which, for the equation of node j , reads (4.12.42)
-i(i/
7 + I
-2i/
y
+ £/ _ ) + - ( i / y
1
7 + l
-t/ _ )+y
1
Ü
χ
ι
Examination of (4.12.41) and (4.12.42) reveals that the application of Green's theorem results in the addition of the natural boundary condition multiplied by the yth basis function evaluated at y — l and y=0. For a typical interior node, this term vanishes because the yth basis function is zero at y=0 and y = /. Although the incorporation of the natural boundary condition into the approximation is of marginal advantage in the one-dimensional case, it can be of considerable significance in problems of higher dimensionality. 4.12.5
Orthogonal Collocation Formulation
In our development of the orthogonal collocation formulation, we begin by writing the weighted residual expression using a Dirac delta weighting function (4.12.43)
<*>-^[«(y)* ] t
+ -£ili>(y)*l*iy-y.)) o< =
i =
-
] 2
M
-
where y denotes the y coordinate of collocation point /' and Μ is the total number of collocation points. The Hermite polynomial is a natural choice for the trial function in this second-order equation and we use it in the ensuing discussion. In the case of a constant spatial increment k, it is advantageous to evaluate (4.12.43) directly. When we employ irregular spacing, however, it is convenient to use locally defined η coordinates, particularly in higher dimensions. In this way one can easily determine the location of the Gauss quadrature points, which arc the required collocation points in the orthogonal collocation method. Consequently, we define the Dirac delta function in terms of rj, and transform (4.12.43) in a manner analogous to the procedure used in (4.12.32) for the t
300
Parabolic Partial Differential Equations
Galerkin method. Rewriting (4.12.43) for one element, we have
d i\ - a—dy
3m du dr[ db di\ \ , - τ - + b— — + u— — \ ä(η3η 3tj dy dr\ dy J
2
1
dy η )-f-dη=0, dt\ ' l
v
/ = 1,2, where the subscript / denotes the two collocation points within the element under consideration. Evaluation of the integrals in (4.12.44) yields the collocation expression I d-η \
= 0,
where φ
0 /
3
2
f
dr\ \
/=1,2.
We now define the trial function ΰ(χ,η) (4.12.46)
3 η 3a
2
« ~
Μ
ξ
Σ
as
£/,(*)Φο,(τί)+-^(*)Φ (τ>). υ
and φ , are Hermite polynomials defined in η as 7
no,
(4.12.47a)
φ , = - ^ ( η + η )'(τ,-2η )
(4.12.47b)
Φ = ^(η-»ίϋ)(ί? + % )
0
0
0
2
υ
Equations (4.12.47) define the basis functions in an elementwise sense. When the node j resides on the left-hand side of the element (see Figure 2.8), the expressions corresponding to η = — 1 are used. When node j resides on the right-hand side, η = 1 is the appropriate expression. The complete function for any node j is obtained through the consideration of the two adjacent elements (see Figure 4.15). The trial function (4.12.46) must be modified to provide the gradient parameter dU^dy in terms of the global coordinate^. This is readily achieved through application of the chain rule of differentiation: 0
0
N
(4.12.48)
dU
dy
«·ί=Σί{(^(ιΐ)+^(χ)^(ι).
Finite Element Approximations in One Space Dimension element 4
element
301
2
Figure 4.15. Nomenclature for collocation on elements with irregular spacing.
T o be consistent with notation in earlier chapters, we now define (4.12.49a)
Φ'ï, = Φ ï
Ã
^J-^>d% -
(4.12.49b)
J
Examination of (4.12.49b) reveals that, in the case of spatially changing element sizes, the function <j>' is, in general, discontinuous at the node j. This leads to a discontinuous solution for the first derivative in w. T o circumvent this problem, one can employ weighted average side lengths. We find that good results are obtained using an harmonic mean for the weighted average. Consider, for example, the evaluation of dy/di) at node j. In element 1 we have VJ
,4„50a,
and in element 2
(4.12.50b)
di\
The harmonic mean of (4.12.50a) and (4.12.50b) is designated as the approximation of dy/d-η at node / Thus we have
(4.12.50c)
dy_ di)
*Λ-
which is applicable at all points on the interior of the mesh. The O D E set arising from the collocation approximation in the y coordinate is obtained by combination of the general relationship (4.12.45) for each
302
Parabolic Partial Differential Equations
element and the trial function (4.12.48) (4.12.51)
^
+
Tx\^y~)^
3η
J
dt\
dy
d
\ [ > dr\
1^ +
3η
ί
+ι
~d^^^Tx\~d~y~)^^
+
di\ \ \ dy
d
du
dy
di) \
d
+
V
DU
dy
1
dy
d
}
V
y
2
d
dv dy
J
i = l,2,
e=
\,2,...,NE,
where j and j + 1 are the nodes associated with element e. It is apparent from (4.12.51) that, in addition to dr\/dy, which is obtained readily from our earlier discussion, we also require evaluation of d r\/dy . To evaluate these second-order derivative terms, let us first use the chain rule to express derivatives of a general function φ with respect to y in terms of derivatives in η: 2
2
Finite Element Approximations in One Space Dimension
303
Equation (4.12.52) can be written in matrix form as
(4.12.52c)
άφ
dr\
dy
~dy~
άφ
dv
dy _
dy
2
άφ άη
0
άφ 2
2
2
2
\dy)
d-η
2
or (4.1.52d) Let us now apply the same approach in reverse. That is, express derivatives in η in terms of derivatives in y.
άφ άη
(4.12.53a)
dy άφ df\ dy
ά φ _ d y άφ άη ~~~ άη dy 2
(4.12.53b)
άφ
2
2
dy
2
2
2
or, in matrix form.
(4.12.53c)
άφ άη
άη
άφ άη 2
HL
άη
2
2
0
άφ dy άφ 2
\άη)
ay
2
or (4.12.53d) It is apparent from (4.12.52d) and (4.12.53d) that [Ρ ] = [Ρ Γ*. Thus we can readily obtain the values we require in [P,] if we can evaluate [P ]. To evaluate the elements of [P ] we employ an isoparametric transformation based on Hermite polynomials. Thus we obtain }
2
2
2
dy
(4.12.54a)
dy +\ t
+
"^Γ " Φ
Μ
<
J+
304
Parabolic Partial Differential Equations
and similarly,
(4 12 54b) · ' 1
3
± = y -*2l άη *> άη
^ -+H άη άη
d
,
d
+
^φ
, dy
0+ί
άφ,
J+l
' '~άη~
γ +
~άη
+
+ ι
άη~
and
d
άφ,
2
(4.12.54c)
2
v
^ =
άη
2
y
- ^
α
' άη
2
ay, ά φ·, 2
+
JL-lLL
άη
dl
f
All the information required to evaluate (4.12.54) is available or can be readily obtained. Consequently, it is now possible to complete the transformation required in (4.12.51). There remains the question of the representation of the a(y) and b(y) functions. The simplest approach is to assume they are piecewise constant over each element. Alternatively, various functional forms can be assumed. One should keep in mind, however, that the collocation points are specified in η coordinates and consequently, the functional form for a and b must be also. The use of functional coefficients is an obvious choice. (4.12.55a)
α(η) = α,φ,(η) + a
(4.12.55b)
b( ) v
= b^( ) v
+ b
,φ ,(ι,)
/+
l +
(>·,<>·< v , )
/+
^
+
/ +
()
(v,*£ v*£ v
i v
/ + 1
).
where φ ( η ) is a suitable basis function defined in η [i.e., φ = { (1 + ηη,)]. Returning now to (4.12.51) we write this expression in matrix form as
(4.12.56)
[A]{u}
+
[B][f } x
=
(f),
where the elements of [A] and [B] are 2 X 4 matrices of the form
«11
«12
«13
«14
Finite Element Approximations in One Space Dimension
dr\ ~dy
d_
_d_ dr\
Ai df\
d
d_ dv
d_ dv
dt\ ~dy
+ a
dv] Ty)
dv
d*: • y + l
(dy\
Ql
dv
dy
d$\, dv
,
v
2
d
dn 2
dy
2
d
v
+Qj+i d v ~dv ~ 'dy "^ d
Q
V
d r ^
2
T
2
dy
2
d
2
·, dv ~dy
/+
,
R
dv
dv
d\
Wo, d v
Z
d
2
v
,dv
r
dv
d_
_d_ dv
2
+ a-
1
d_\ dv
d_ dv
d
2
d
dv dy
+
dv
tdv\ \-dy-J
dv
dj\ dy)
^'o,+ \
a
,
2
u
b
2\
*i>,+ \ d y 2
d# ° dv VJ+l
+
b
u
b
22
b
b
dy dy 2
n
U
fo
b
d , dv ^v~'d7~'d^i ^^\-dyr
+a
2
b
d
^dv~^~Tv^\^
2
l4
24
b
d dv
306
Parabolic Partial Differential Equations
where l3
ft
-Φό/Ι,,-
^Φ,'/Ι,,.,-
_
'" -
ΦΟ/ + ΐ | η , ·
Φ(º/4 I
Ι,,·
and
dx
) dx dx dx \
dy
)
In this instance the subscripts on η refer to two collocation points within an element spanned by the Hermite basis functions. One of the finite difference approximations described earlier in this chapter can now be used to approximate {dU/dx}. When boundary conditions are imposed, the degrees of freedom are reduced; the number of collocation points must be reduced accordingly. Information on boundary conditions, sources, and sinks are recorded as elements of the known vector { / } . 4.12.6 Asymmetric Weighting Functions In the numerical solution of the transport equation (4.12.1) and certain nonlinear parabolic equations that exhibit solutions having sharp fronts, one observes undesirable oscillatory behavior near the front. Although the explanation of this phenomenon is reserved for a separate section, we consider here one scheme for minimizing these oscillations at the expense of some degree of smearing of the front. The objective is to formulate a finite element scheme that emulates finite difference upstream weighting. To achieve this one must formulate an algorithm that places more importance on information impinging on a node from the upstream direction; that is the direction from which the fluid is approaching the node. This is accomplished by modifying our Galerkin-finite element approximation scheme to permit the use of a new type of weighting function, such as that shown in Figure 4.16. As a point of departure, let us write the weighted residual relationship (4.12.57)
Finite Element Approximations in One Space Dimension
307
y
Figure 4.16. ing function
Weighting functions approximation
w
f
a n d b a s i s f u n c t i o n s
(after H u y a k o r n ,
weight-
1976).
where ύ is the trial function, \ν,(χ, y) the weighting function, and £ is defined by (4.12.1). If we assume that
&(x,y)=
/v
Σ
ι—
õ,(χ)φ,(γ). ι
(4.12.57) becomes, after application of integration by parts,
(4.12.58)
(2
U (x)
Σ
t
U (x)
>J
y
Í
Σ
+ (a(y)
U (x)
VJ
+ [b(y)u-a{y)u ]w,(y)\' =0, r
i = \,2
o
N.
Equation (4.12.58) would, of course, become the Galerkin approximation if ,(y) defined as $,(y). Thus the integration procedure and subsequent matrix solution is analogous to the Galerkin case except that the weighting function and basis function for the spatial derivatives are no longer the same. To determine the functional form of w (y), let us consider the element of Figure 4.16, where, for convenience, we have selected the origin to coincide w i t h ^ = 0 . Because integrations are performed elementwise, this does not result in any loss of generality. The chapeau basis functions in this case have the form w
w e r e
t
(4.12.59a) (4.12.59b)
φ ) = \ - 1 Φ, ,ω=£ +
(0< ^k) y
(0
308
Parabolic Partial Differential Equations
Let the weighting functions w and 1976)
be expressed in the form (Huyakorn,
;
*>,(y) =
(4.12.60a)
*,+Ay)
(4.i2.60b)
*i{y)-F\y)
=
*,Ay)+Hy) 2
F(v) = a^k
(4.12.60c)
+ b^ + c, k
where F(y) is a piecewise quadratic function with undetermined coefficients a, />, and c. T o determine the values of α, />, and c we impose the following constraints: (4.12.61a)
F(0) = 0
(4.12.61b)
F(k) = 0.
Substitution of (4.12.61) into (4.12.60c) yields
(4.12.62)
F
{
y
)
= ^-n
+
a
iy
where a is the remaining undetermined parameter. For convenience, we define a —a/3. The complete weighting functions can now be written
w (y)
(4.12.63a)
(4.12.63b)
J
Η
/ + ι
= ^ (y)
(ν) = φ
+ 3a ^ y
J
-3α£
,(>-)-3«^+3α^.
7 +
The parameter a lies between zero and 1 and dictates the degree of upstream weighting to be employed. The maximum degree (α = 1) is the case illustrated in Figure 4.16. For a — 0, the weighting function obviously reduces to the chapeau basis function and the method becomes identical to Galerkin's approximation. The sign of the a parameter must be consistent with the direction of flow [ a > 0 when b( v ) > 0 ] . The local v-coordinate system presented above is related to the more commonly encountered η system through the relationship
(4.12.64)
)
k
=
n
T'-
Finite Element Approximations in Two Space Dimensions
309
Thus we can write (4.12.59) and (4.12.63) in the alternative form (4.12.65a) (4.12.65b) (4.12.65c)
Η;(Τ,) = Φ ( Τ , ) + ^ ( Τ , + 1 ) /
2
- ^ ( Τ , +
1)
= - [ ( 1 + 7 , ) ( 3 α 7 , - 3 « - 2 ) + 4]
v.('») VI('»)-t ''
(4.12.65d)
=
= \[(1
(
+ η)(-3αη
+ 1 ) 2
+
t
(
t
,
+
1
)
+ 3α + 2)].
The asymmetric weighting function approach provides an alternative to the standard Galerkin formulation when large convective terms are encountered. The parameter a provides a control on the amount of upstream weighting introduced. Thus one can select an α value that supresses the undesired oscillations without severe adverse effect on the overall quali'.y of the solution.
4.13
F I N I T E E L E M E N T A P P R O X I M A T I O N S IN T W O S P A C E DIMENSIONS
In general, the theory developed for the solution of problems in one space dimension is readily extended to two space dimensions. We find that the one-dimensional basis functions developed in the last section often have two-dimensional counterparts. In other instances, new basis functions will be formulated to facilitate the efficient discretization of the two-dimensional space. We introduced the basic theory behind two-dimensional elements in Chapter 2 and avoid repetition of that information in this section. Rather, we concentrate on the general two-space-dimensional formulation and related questions. 4.13.1
Galerkin Approximation in Space and Time
As in the preceding section, let us choose the transport equation as our partial differential operator (4.13.1) t ( U ) = U ,
^-
[a( y,, v ) « , , ] 2
v, • y )u] + ~ 2
[h( v,. y )u] = 0 . 2
310
Parabolic Partial Differential Equations
The trial function for this problem can be written 2 ^ Φ > ( * . ^ι· Λ ) · y=i
u(x,y ,y )<*u{x,y„y )=
(4.13.2)
]
2
2
Substitution of (4.13.2) into (4.13.1) yields the residual £(u)=R(x,y„y ).
(4.13.3)
2
In the Galerkin formulation, we require the residual t o b e orthogonal to each ,N. of the basis functions 4>i{x,y\,y ), i= 1,2,... 2
(R(x,y„y )^,)=0,
(4.13.4)
N.
, = 1,2
2
Combination of (4.13.1), (4.13.3), a n d (4.13.4) yields (4.13.5)
(
M i
-A
( f l f i J
_ ^ 2
( a u J
+
_^
( f l u J
+
(/>ΰ), φ ^ = 0 ,
_3_
(
M
)
i=l,2,...,Μ
If we employ C continuous basis functions, such as Her mite polynomials, (4.13.5) can be used in its current form. In fact, we require only that the basis function have second-order differentiability in space. T h u s we could use a basis function defined as the product of a two-dimensional Hermitian basis in space and a C ° continuous function in time. A basis function of this form could be written (Gray and Pinder, 1974) 1
Φ / * . * , ë ) = «,(*.ë)/»>(*).
(4-13.6)
where ct(y ,y ) are either Lagrangian o r serendipity Hermitian bases as defined in Table 2.6 and β (χ) is a Lagrange polynomial that can be written l
2
;
(4.13.7)
β,=
Π
where the m possible subscripts for Λ refer to the in time positions in the element (see Figure 4.17a). In general, one would seldom consider more than a linear approximation in time (m = 2 ) and it is very unlikely that more than a cubic representation would be worthwhile ( w = 4 ) . T h e difficulty associated with using higher-degree polynomials in time centers around the fact that the number of degrees of freedom increase as the degree of the polynomial. T h e
Figure 4.17. Three-dimensional finite elements for solving problems in two space dimensions and time, (a) Uses Hermite polynomials for spatial discretization, (b) Uses isoparametric quadrilaterals, (c) Uses triangles, ( c ) Also illustrates the use of higherdegree polynomials in the time domain.
linear approximation in time considers only one unknown time level per time step. Quadratic and cubic approximations require consideration of two and three time levels, respectively. One time level is always known either as an initial condition or from the last time step calculation. When C° continuous polynomial bases are employed, it is often advantageous to transform (4.13.5) using Green's theorem. As indicated earlier, this transformation can be applied to the space derivatives in two ways. If it is convenient to incorporate second-type boundary conditions directly into the approximating equation, only the second order terms should be considered. When one encounters third type boundary conditions, it may be advantageous to also transform the first-order space terms. Application of Green's theorem
312
Parabolic Partial Differential Equations
to the second order terms in (14.13.5) yields (4.13.8)
/ J
rx +(m-
1)Δχ Γ
/
.\
J
"χΦ, +
α
">-,Φ,
+ "νΛ,< α
.Í&Ú
Á¾
+ ν
+
α
"ν· Φ,· , 2
2
A
-/* + (
, , Δ
7( ß â
ι Ë
+
â
â,Λ> *Ë=ο. ι
/ = l,2,...,jV.
where l and /,. are direction cosines and the region is defined in Figure 4.18. N o t e that the surface integral contains the second-type boundary conditions. Because this term involves only known information, it can be evaluated either directly or by using numerical integration. When it is advantageous to incorporate a third-type boundary condition, Green's theorem can also be applied to the first-order terms to yield x
(4.13.9)
J [ x
A
dAdx—f
( m
.ν
+
"
α
"ν,Φ>ν +
1
βΜ
f{au J v
"'Γ
+
Vi
'
ν,Φ,'2< +
+
α Μ
ν Φκ 2
_
2
*"Φ»ν ~
M
* » . J :
au J ~bu)4>idsdx=Q, v
Vi
'
/ =
l,2,...,iV.
Equation (4.13.9) incorporates a third-type boundary condition in the surface integral term. Once again, the information in this integral is known and the term can be evaluated. Because (4.13.8) and (4.13.9) contain only first-order derivatives of the trial and basis functions, they can be readily solved using C ° continuous elements. It is, therefore, possible to apply triangles, rectangles, or isoparametric quadri-
Figure 4.18. Typical region considered in finite element analysis of parabolic partial differential equations in two space dimensions.
Finite Element Approximations in Two Space Dimensions
313
laterals in the space dimensions. Typical three-dimensional elements are illustrated in Figure 4.17Æ» and c. It is, perhaps, worth pointing out that because of the form of the three-dimensional time-space element, (4.13.8) and (4.13.9) can be rearranged to simplify the integration procedure. Let us first substitute (4.13.6) into (4.13.2), Í
= Σ Uja^,
u(x,y ,y )~u(x,y ,y )
(4.13.10)
i
l
2
2
y )fy(x). 2
7 =1
Combination of (4.13.10) with (4.13.9) yields (14.13.11) Í
Σ V, 7 = 1
/ [α^α,β,+ v
+ αα ^α β, ν
-f
αα^β^,β,
+
αα,β^,β,
Ë
+ αα^β^,β,
νιΙ
- äαβα^,β,
- Âα,β^,β,]
fx + ( m - Ι ) Δ ν R
/ ( a u , . / , . + a u . /, - bu)
dA dx 7 = 1,2
/V,
where we have not modified the boundary integral because it is normally evaluated prior to the space-time integration. Equation (14.13.11) can be rearranged for ease in integration as (4.13.12)
Σ Uja a,dA-J ' ~ *%bdx : +im
+ a a r2l
/ . v + ( m + l)AJT
x /
+ jΜα,.,,»,,,
l)
j
fijfi,
yil
dx-
+ a a ,)-*(a a, rii
r2
fx+(m
y
+
if
+ «,.„«,,,
α,α^άë
- I )ΔΛf
/ (αý / + efi,.,/,., - bu)
/=1,2
N.
One scheme that has been used with some degree of success involves overlapping higher-degree elements in time. This approach has the advantage of solving for only one time level per step while preserving some of the advantages of the higher-degree element. The procedure is easily visualized with the aid of Figure 4.19. The procedure must be initiated either by using a linear approximation to obtain a solution at χ + Δχ or by solving for χ + Δχ and χ+2Äχ simultaneously by means of a quadratic element. Thereafter, a
Parabolic Partial Differential Equations
314
Â
Â
Χ»ΔΧ
1
Figure 4.19. Three-dimensional finite elements used in overlapping quadratic (overlapping lag one) scheme. Element A is used to solve for time level × + 2Δχ, and Β is used to obtain time level × +3Δχ.
quadratic element is used to advance Ax per step. This is accomplished by using two known values and solving only for the third. Thus, in Figure 4.19, element  would advance up from χ + 2 Ax to χ + 3 Ax assuming that values at x + Ax and χ+ 2 Ax are available from earlier calculations. Consequently, each quadratic element overlaps the preceding for Ax. A similar algorithm can be developed for cubic elements, where, theoretically, either one or two time levels can be lagged. In numerical experiments, it has been found (Gray and Pinder, 1974) that the relative accuracy of the finite element in time, finite difference, and lagged finite element schemes are problem and time-step dependent. None of the schemes above a pears to consistently outperform the other over a range of problems and time step sizes. As a consequence it seems prudent to utilize a centered-in-time (Crank-Nicolson) approximation for the majority of problems based on its simplicity in application. h
4.13.2
Galerkin Approximation in Space Finite Difference in Time
Although it was demonstrated in the preceding section that a basis function defined in space and time coordinates can be used to solve parabolic P D E in two space dimensions, in practice the approach is seldom employed. It is generally found to be more expedient to generate a set of O D E using a Galerkin approximation in space and subsequently to solve this set of O D E using finite difference schemes. To approach the problem in this way, we first define a new trial function (4.13.13)
«(*<JV>'2)~"(-*->'i->'2)= Σ
^ ( ) Φ / ( > Ί ' yj)Λ
Application of Galerkin's principle to the space-dependent elements of our
315
Finite Element Approximations in Two Space Dimensions P D E yields ( £(u)
(4.13.14)
N.
i = l,2
l
Equation (4.13.14) is now combined with (4.13.1) to give (4.13.15)
Â
è
è
= 0.
/ = 1,2
N.
Application of Green's theorem to the second-order terms yields (4.13.16)
/^{«»Φ,
+ ««,·&,. + " . , Φ , , + α
β«ν Φν,.
:
2
+
β
"ι· Φ.-,. :
φ | Λ 1 - ^ ( β « _ . / , . + αΜ . / . )φ Λ
+
1
)
ι
|
:
0,
1
2
1
2
(
/ = 1,2
/V.
Substitution of (4.13.13) into (4.13.16) yields
(4.13.17)
£
/^Φ,Φ,ΛΙ
+ t/J^ [φ,, φ β
;
ι ν
+ φ,,,φ,,, +
Φ,,ΑΛ,Α-]
| φ , ί / / Ι - / ^ ( þ , , / , , + «,._,/,, ) φ , Λ
= 0,
/ = 1.2
/V.
Equation (4.13.17) is a set of Ν O D E and can be conveniently represented in matrix form as (4.13.18)
[A){u)+[B]{f
x
} + {/}=0,
316
Parabolic Partial Differential Equations
where a •I
J
A
One can now employ one of the methods described in Section 4.II.2 to approximate dVJdx and then solve the resulting set of linear algebraic equations. Methods of solution are considered in a later section. 4.13.3
Asymmetric Weighting Functions in Two Space Dimensions
In Section 4.12.16 we considered the use of asymmetric weighting functions in dealing with the transport equation in one space dimension. It has been found that this type of weighting function can be used effectively to control undesirable oscillations arising in the solution of highly convective transport problems. This approach has also been particularly effective in the solution of highly nonlinear parabolic PDEs, where oscillations near a sharp front may produce a divergent solution. In this section we discuss asymmetric weighting functions for quadrilaterals and triangles. The use of an asymmetric weighting function w (y ,y ) in the weighted residual principle leads to the following approximating equation: l
i
2
N.
Application of Green's theorem to the second-order terms yields (4.13.20)
J \&A '* + a[ [ .ν,*\·,ί + .Y >v +
β
β
w
U
2
+
+
*.·,»% +
J
Finite Element Approximations in Two Space Dimensions
317
The final approximation is obtained through substitution of the trial function (4.13.13) into (4.13.20). Thus we obtain (4.13.21)
Examination of (4.13.21) and (4.13.17) reveals that they are identical when W, Î φ . (
Isoparametric Quadrilateral Elements The two-dimensional asymmetric weighting function has been developed for isoparametric quadrilateral elements with linear sides (Huyakorn, 1976). Consider the element illustrated in Figure 4.20. Because this element, defined in local (£, η) coordinates, is a member of the Lagrangian family, its weighting and basis functions can be obtained by taking the product of one-dimensional bases defined in each coordinate. For example, at node 1 we have (4.13.22a)
w, = Ο Ί ( η , . α , ) / / , ( τ ι , ) 8 ) , 2
2
2
(α)
(b )
Figure 4.20. Asymmetric weighting function for node 4 defined in TJ, coordinates. In (a) a = I, /?, = 0 and in (b) a = I and β = I (modified from Huyakorn, 1976). 2
2
2
318
Parabolic Partial Differential Equations
where, from (4.12,65c) and (4.l2.65d), (4.13.22b)
σ ( ι » „ α ) = ί[(1 + η,)(3α η - 3 α , - 2 ) + 4]
(4.13.22c)
/ / , ( η , ft) = ί [(1 + τ? )(3/3 η - 3β - 2) + 4 ] .
1
1
1
2
2
1
2
2
2
The set of four basis functions for the element of Figure 4.20 are (4.13.23a)
w, = £ [ ( 1 + „ , ) ( 3 « , T / , - 3 α , - 2 ) + 4] Χ [ ( 1 + η ) ( 3 / 3 η - 3 / 8 - 2 ) + 4] 2
(4.13.23b)
2
2
2
νν = ^ [ ( 1 + η , ) ( - 3 α , η , + 3 α , + 2 ) ] 2
X [ ( 1 + T J ) ( 3 / ? , T , - 3 / 3 , - 2 ) + 4] 2
(4.13.23c)
2
>v = ^ [(1 + η , ) ( - 3 α η , + 3 α + 2 ) ] 3
2
2
χ[(1 + τ )(-3)3,η +3/3 +2)] ) 2
(4.13.23d)
2
% = ife[(I + ι?, ) ( 3 « η , - 3 α 2
1
2
- 2 ) + 4]
Χ[(1 + η ) ( - 3 0 η + 3/8 +2)]. 2
2
2
2
It is apparent from Figure 4.20 and (4.13.23) that there are two α-type factors in each coordinate direction. Thus the variation in a from one side of an element to the other can be taken into account. The sense of the direction of flow velocity corresponding to a positive α (or β) is also indicated in Figure 4.20. Triangular Elements In the development of asymmetric weighting functions for triangles, we consider the local area coordinate system illustrated in Figure 4.21 and employed in our earlier discussion of triangular finite elements in Chapter 3. Because we have three sides there are three values of a to consider. Let us identify α along each side by the number of the node at the triangle vertex in a counterclockwise sense. As in the case of the one-dimensional asymmetric function, we begin with the following definition: (4.13.24)
w^^
+ F^L.
+ F,,
i = 1,2,3,
where L, is the area coordinate for the ith node and./^ represents the parabolic
Finite Element Approximations in Two Space Dimensions
319
(0,0,0 3
(α)
(b)
Figure 4.21. Asymmetric weighting functions for nodes 1 (a) and 3 (b) of a linear triangular element. In both instances, a, = a = a = 1 (modified from Huyakorn, 1976). 2
3
functions that are constrained to satisfy the following (Huyakorn, 1976): 3
(4.13.25a)
(4.13.25b) (4.13.25c)
Σ ^
0
F,(L, = 0 ) = 0 (i*j*k).
|F,(L =0)| = 3o L L, y
7
t
These constraints are related to the following conditions: 1.
Equation (4.13.25a) ensures that the sum of the weighting functions is unity within the triangle.
2.
Equation (4.13.25b) ensures that the value of the weighting function is zero along the side opposite node /'.
3.
Equation (4.13.25c) ensures that, in the event quadrilateral and triangular elements are used to form a mesh, there is compatibility along the side common to both elements.
If we impose the constraints of (4.13.25) on F
r
we obtain the following
320
Parabolic Partial Differential Equations
expressions: (4.13.26a)
F\ = 3 ( a L L , -
(4.13.26b)
F = 3(a L,L - a , L L )
(4.13.26c)
F, = 3 ( a , L L - a L , L )
2
3
2
a L L,)
3
3
2
2
2
3
3
2
2
3
or, written more concisely. (4.13.27)
F, =
3( L L, -a LjL,). aj
k
k
The complete weighting functions are thus obtained through substitution of (4.13.27) into (4.13.24): w, = L, — 3 a L L | + 3 a L L , 3
2
2
w-. = L - 3 a , L L + 2
3
w = L +3a,L L 3
3
2
3a L L J
2
3
3
l
2
—3a L,L . 2
3
Example To demonstrate the importance of upstream weighting in transport-type problems, we consider an example presented by Huyakorn (1976). Consider the domain of Figure 4.22a. wherein the Navier-Stokes equations have been solved using the mesh of Figure 4.22 b to provide the velocity field of Figure 4.22c. The thermal transport equation, (4.13.28)
D(T +T )-uT -vT =0, vo
ViVi
v
y
where D is thermal diffu .ivity, was subsequently solved using this velocity field. The solutions obtained are presented in Figure 4.23. As may be expected, at low Peclet numbers (corresponding to low velocities), the solution is rather well behaved even using the standard chapeau functions as weighting functions. When the Peclet number is increased from p = 25 to 150, however, the solution without upstream weighting degenerates to a typical oscillatory pattern; the upstream weighted solution is devoid of oscillation. This oscillatory phenomenon is well known in the finite difference literature. It is due to the fact that, as the Peclet number increases, (4.13.28) approaches a first-order equation that is poorly approximated using a centered difference approximation. Such an approximation is generated using chapeau basis functions (recall the discussion of the relationship between finite differences and finite elements at the end of e
Finite Element Approximations in Two Space Dimensions
321
/
1
u = ν = 0 Τ = 0
/ / •.'.////////,
Re = 5 0 Pe
(È)
= Re χ Pr
U = V= 0 , T
Si S« °2
Τ
=\
Figure 4.22. (a) Domain and boundary conditions for the Navier-Stokes equation, where u and t are velocity components and S, and 5 are traction components, and the thermal transport equation, where Ô is the temperature, (b) Lagrangian isoparametric finite element net used for the Navier-Stokes analyses. (<•) Resulting velocity field. In the thermal transport solution the quadratic quadrilaterals were decomposed into four linear quadrilaterals in order to apply the asymmetric weighting functions. 1
2
Chapter 2). It is important to point out, however, that although a smoothing effect is achieved using the upstream weighting scheme numerical dissipation* is increased significantly, as demonstrated in a later chapter. 4.13.4
Lumped and Consistent Time Matrices
The formal application of Galerkin's method leads to banded coefficient matrices for both the function and its derivative. In the case of chapeau functions and the one-dimensional heat flow equation, we approximate (4.13.29)
au -u =0 x
r
• N o t e that the dissipation is often denoted as numerical dispersion or diffusion in some disciplines, particularly petroleum engineering and hydrology. This is due to the fact that the impact of dissipation is analogous to increasing the dispersion or diffusion coefficient in the transport equation.
322
Parabolic Partial Differential Equations
too
Pe = 2 5
0.75
Τ
—
0.50
-χ--
0.25-
a.<,/9 = o a = β -- {
- ο — Central
scheme
3 (o)
Figure 4.23. Temperature profile computed using asymmetric functions and chapeau basis functions (denoted as central scheme) with ( a ) a Peclet number of 25 and (ft) a Peclet number of 150.
by (4.13.30)
= [B}{^
[A){u)
}+
{/},
where (4.13.31a) (4.13.31b) (4.13.31c)
α
., =
-<Φ,-,.Φν.>
ê=<«*,.
φ, >
/ = ",·Φ,Éü.
where / is the length of the domain. The vector {/} will also contain information on the boundary conditions as appropriate. Matrix [B] will, in this case, be tridiagonal and of the same coefficient structure as [A]. This contrasts with classical finite difference schemes, which would generate a diagonal matrix for [B]. Perhaps motivated by their experience with finite differences, analysts began to examine methods for diagonalizing [B]. In addition to the obvious advantage of decreasing the effort required to generate [B], there is a second important reason for obtaining a diagonal
Finite Element Approximations in Two Space Dimensions
323
structure for [B]. This is the fact that explicit methods cannot be used directly with a banded form of [B]. In structural mechanics, the matrix [B] arises in the solution of the dynamic equations. In this context the banded form of [B] is known as the consistent mass matrix. The diagonal form of [B] can be generated by placing point masses at the nodes. Thus this form of [B] has come to be known as the lumped mass matrix. There are several methods for the diagonalization of [B]; the simplest involves the replacement of the diagonal element with its row-wise sum. (4.13.32) An interesting and mathematically more appealing alternative formulation will be described shortly. Leaving aside the issue of mathematical justification, how do the lumped and conservative mass formulations compare? As is often the case in numerical methods, the answer appears to depend upon the mathematical problem under consideration. In the solution of the transport equation, there is general agreement that mass lumping leads to a degeneration in solution quality. Baker and Soliman (1979) recently presented results for lumped and consistent solutions using linear, quadratic, and two cubic basis functions. In this particular case, the transport problem is formulated in a polar coordinate system. This does not alter the basic structure of the finite element formulation. Results of this analysis that are relevant to this discussion are illustrated in Figures 4.24 and 4.25. The plots show the normalized error in the energy norm versus the degree of discretization of the finite element net. These values were obtained at the initiation of the transient solution. The energy norm is defined in this case as (Baker and Soliman, 1979) (4.13.33) where u = u — a, the subscript e denotes element defined quantities, and the parameter a, arises from the boundary conditions. In terms of our finite element approximation, (4.13.33) can be written
Se
Ne
+ o, Σ Σ ",Φ,",Φ, , where u, = u — u and Ne is the number of nodes in element e. l
324
Parabolic Partial Differential Equations
Discretization NE
Refinement
H
Figure 4.24. Accuracy and convergence with discretization refinement in the energy norm for the transport equation in polar coordinates with consistent mass matrix. Symbols, O , • , and Δ indicate solutions obtained using linear quadratic and cubic C° bases, respectively; 0 indicates a cubic Hermite solution. Numbers (ffi) denote calculated rate of convergence (modified from Baker and Soliman, 1979).
It can be shown that the relationship between the error in energy E(u - ύ, u - κ), the discretization interval, k, and the energy norm is given by (Strang and Fix, 1973)
(4.13.34) where Ê is the lowest degree of the basis function, 2 m is the highest order derivative in the P D E , and k is the largest element in the domain. Taking logs in (4.13.34), we obtain (4.13.35)
l n E ( f i , 2 ) < l n C + 2 ( t f - m ) l n * + l n f (S)
dr.
Finite Element Approximations of Two Space Dimensions
Symbol
325
F.E. Dtgrtt
TJ
V Μ
¸
å
s>
10" LUMPED MASS MATRIX
10" 1/64
I I
1/4
1
\m Discretization Refinement NE - 1
Figure 4.25. Accuracy and convergence with discretization refinement in the energy norm for the transport equation in polar coordinates with lumped mass matrix. Symbols O , • , and Δ indicate solutions obtained using linear, quadratic, and cubic C bases, respectively; <0 indicates a cubic Hermite solution. Numbers (N) denote calculated rate of convergence (modified from Baker and Soliman, 1979). u
T h u s the slope of a plot of In Ε versus In k should provide the term 2( AT - m). F o r linear, quadratic, and cubic C ° elements, this term should be 2, 4, and 6, respectively. T h e Hermite basis functions have been shown to be fourth-order accurate both in the function w and its derivative du/dy (Strang and Fix, 1973). The circled integers in Figures 4.24 and 4.25 are the convergence rates established from the error plots. In the case of the consistent mass matrix (Figure 4.24), one observes that, for all types of bases considered, the computed rate of convergence compares very well with the theoretical rate. Examination of the lumped mass matrix results, however, reveals a serious degeneration in the rate of convergence in the energy norm of the quadratic and cubic C ° elements. It is interesting to note that the rate of convergence for the linear and Hermite cubic bases appears relatively unaffected while the absolute solution error is marginally larger for both bases. The Hermite basis y
326
Parabolic Partial Differential Equations
function did not perform to expectation. Baker and Soliman (1979) argue that this can be attributed to the extremal surface derivative existent at the start of a gradient boundary-condition-driven problem. Although evidence to this point suggests that mass matrix lumping will, in general, lead to poorer numerical performance, there is also evidence to the contrary. In highly nonlinear parabolic P D E such as encountered in fluid flow through the unsaturated zone, mass and energy transport in geothermal systems, and oil reservoir simulation, lumped mass matrices have been effectively used (Neuman, 1973; Mercer and Faust, 1977; Langsrud, 1976). To demonstrate the impact of lumping the mass matrix in a non-linear problem, let us consider the geothermal simulation conducted by Faust and Mercer (1976). T h e set of P D E s that govern nonisothermal steam-water transport are written (Mercer and Faust, 1977) 3 p \ dh 3Λ / Ñ dx
(4.13.36a)
(4.13.36b)
\{ph-p h )r
+
r
( S ) ,
_3_
dy,
H
K
K
< ' - M £ ) , I dp
dz_\
[dy,
Ms
w
L L
+
PS S ,J RS
d_ P«H k,jk
where
ì
+ eh
r
\TH
[ P A ARS
3
dy,
rw
P
*d ) g
yj
I dp
dz^\
ί / » η ifc+fai)
8*11=0
H = entahalpy of the mixture, defined as
A= ρ=density
SPH S
S
S
of the mixture, defined as
+ Ρ
Sph w
w
w
Λ
Finite Element Approximations of Two Space Dimensions
327
c = specific heat capacity of the rock at constant pressure G=gravitational coefficient permeability k =relative k = local intrinsic permeability tensor K = medium thermal conductivity ρ = pressure T= temperature æ = scalar potential associated with gravity (or depth) å = porosity ρ = density ì = viscosity r
n
and the subscripts s, H>, and r refer to steam, water, and rock, respectively. These PDEs are highly nonlinear due to the thermodynamic coefficients and the relative permeability function. The particular problem simulated in this example is a bench-scale experiment carried out by Arihara (1974). The relevant physical information is presented in Mercer and Faust (1977), Table 2. One of the most sensitive variables in the solution of these equations is the saturation. In Figure 4.26 are presented saturation profiles obtained using linear finite elements and both consistent and lumped mass matrices. It is apparent in this case that lumping the mass matrix significantly reduced the oscillatory behavior of the solution. Mercer and Faust (1977) report the growth of these oscillations with additional time steps. On the basis of this evidence one could argue that mass lumping provides a necessary damping of superfluous information in the case of highly nonlinear parabolic PDEs. It appears, however, that the impact of lumping the mass matrix depends upon the method of approximation and the nonlinear algorithm employed. Consider the solutions obtained by Voss (1978) and presented
ζ
t .2
O
1.0
£ 3
0.8
££
0.41
<
0.2
t-
< ο.β! Time - 4 8 Seconds
_ i
0.1
ι
0.2
'
0.3
ι
0.4
ι ι
0.5
DIMENSIONLESS
0.6
I
0.7
l
0.È
I
0.9
1.0
LENGTH
Figure 4.26. Computed water saturation for the Arihara experimental conditions with lumped and consistent mass matrices; elapsed time of 48 seconds (modified from Faust and Mercer, 1976).
328
Parabolic Partial Differential Equations 1.1 4.0 z
2
ι ι Time = 6 0
ι ι seconds
ι
1
0.5
0.6
1
1
r
0.7
0.8
0.9
0.9 0.8
»-
< 0.7 £C 3 0 6 1< 0.5 IN 0.4
or
ui 0 . 3 T— < 0.2 $ 0.1 0.0
0.1
0.2
0.3
0.4
DIMENSIONLESS
1.0
LENGTH
Figure 4.27. Computed water saturation for the Arihara experimental conditions with lumped and consistent mass matrices; (modified from Voss, 1978). in Figure 4.27. Using a different formulation of the finite element equations, coupled with a new nonlinear algorithm, he found that small oscillations observed in the lumped mass matrix solution were not apparent in the consistent mass matrix case. In summary, it appears that mass lumping leads in general to a degeneration in the numerical solution of linear parabolic PDEs of the form of the transport equation. In some instances, however, the damping effect due to mass lumping seems to enhance the stability characteristics of certain nonlinear algorithms. Mass Matrix Lumping through Simpson's Rule Integration U p to this point, lumping of the mass matrix has required somewhat arbitrary modification of the coefficient structure arising out of the Galerkin method of approximation. When isoparametric elements are used, there is an alternative scheme for obtaining a diagonal mass matrix. It arises naturally through a judicious choice of a numerical integration formula. The most commonly used numerical integration formula is Gaussian quadrature. This approach was discussed in Chapter 3 as part of our introduction to finite element theory. This is indeed a reasonable choice for, in the integration of polynomials such as those encountered in isoparametric finite element integrals, it provides the highest order of accuracy for a given number of quadrature points. If, however, a Simpson's rule integration scheme is employed, we find that not only is the computational effort reduced but. in certain instances, a diagonal mass matrix is generated. To illustrate this concept, let us consider a two-dimensional quadratic Lagrangian element such as that proposed by Gray and van Genuchten (1978). When this element is transformed from y to η, coordinates, it becomes a square with eight nodes located around the perimeter and one node located in the t
Finite Element Approximations of Two Space Dimensions
TABLE 4.2.
Numerical Integration Formulas That Result in Diagonal Mass Matrices" /'
/
Η',
4
1.0
4
1.0
(±l.±l)
5
1 3
(±1,±1) (0.0)
s
9
3 1 3 4 3 4 3
1
9 4 9 4 9 14 9
^/(η„,ΐ|2,)+£
/' FAT' 1 2 ) < 1 | . DVI- Σ
Η
8
329
£( truncation error)
(*>i,.n ,) 2
_2_. / · , / · , \
ν/3
i35t.Mii,
V^'
4
_
Gaussian
74), )
quadrature
2
. .
.
.
Ý ί Λ η , + /4l) )
Trapezoidal 9/η
—
2
ιη|Ι)2
η,
(±l,±l)
(±1,0) (0, ± 1)
_
45(/4„ + / 4 l , j )
-
<±l,±l) (±1,0)
J./ /• Λ. T \ 45(Λ„ + / 4 , )
(0,±1)
Simpson's
2
(0,0)
"A Gaussian quadrature formula is also included for truncation error comparison. Modified from Gray and van Genuchten. 1978.
center. The integral that arises in the mass matrix is of the form (4.13.37a)
I=C
J
Γ
J
d^dr, , 2
where [J] is the Jacobian matrix. T o integrate (4.13.37a) using Simpson's rule requires evaluation of the integrand at the nine locations listed in Table 4.2. All of these locations, however, coincide with nodal positions. Because φ, is nonzero only at the / th node, the integrand is nonzero only at the ; t h integration point. Thus only when i = j d o we obtain a nonzero coefficient in the mass matrix. This matrix is, of course, diagonal. A similar argument can be made in the integration of linear quadrilaterals using the trapezoidal rule. In this case one can see the loss of accuracy incurred using the trapezoidal rule rather than Gaussian quadrature by comparing the truncation error in Table 4.2. Diagonal mass matrices can also be generated for other elements using the formulas of Table 4.2. Although we have introduced the use of integration formulas which use integration points located at nodes for the purpose of generating diagonal mass
Parabolic Partial Differential Equations
330
matrices, one can also show that they result in a considerable savings in computational effort in coefficient matrix generation. Consider once again our Lagrangian quadratic element. To evaluate the Jacobian of the transformation from global to local coordinates, one must evaluate, at each integration point, the following: (4.13.37b)
4,
3φ,
_
;
a*,
_
;
3 ,
3TJ,
dy _ 1
(4.13.37c)
3η
2
3^2
(4.13.37d)
3η, d>2
(4.13.37e)
3η
Φ
2
where y and y are the coordinates of the node / in the global y coordinate system. If 2 X 2 Gaussian quadrature is used, each of these four functions must be evaluated at four Gauss points. This requires 144 multiplications per element. To obtain the Jacobian from (4.13.37b)-(4.13.37e) requires an additional eight multiplications, which results in a total of 152. If Simpson's rule is employed, the four functions of (4.13.37b)-(4.13.37e) must be evaluated at nine integration points. However, because of the location of these points and the form of the basis functions, only three multiplications are required to evaluate each of the series in (4.13.37). Thus we can evaluate (4.13.37) with only = 108 multiplications. In addition, 18 multiplications are required to obtain the Jacobian, giving a total of 126, a 17% savings as compared to Gaussian quadrature. Let us now consider the integration of (4.13.37). Because the integrand is symmetric with respect to /' and j, only 45 different integrals arise in the mass matrix. Using 2 X 2 Gaussian quadrature requires eight multiplications per integral, for a total of 8 X 4 5 = 360 multiplications. Simpson's rule requires only nine multiplications altogether. This is obviously a significant reduction in computational effort. Numerical integration formulas other than Gaussian quadrature have been used to advantage in reservoir simulation by Young (1977) and in twodimensional surface-water computation by G r a y (1977). u
2l
t
4X9X3
4.13.5
Collocation Finite Element Formulation
Although the Galerkin approach is currently the most popular scheme for the formulation of finite element approximating equations, orthogonal collocation
Finite Element Approximations of Two Space Dimensions
331
may prove to be a more efficient alternative for certain problems The approach is relatively straightforward and can provide significant computational savings in problems requiring frequent reformulation of the coefficient matrices. Although collocation has been applied to triangles, it appears better suited to rectangular or isoparametric elements. Lagrange polynomials have been used by Chang and Finlayson (1977) to solve elliptic equations on rectangular subspaces. In this formulation, orthogonal collocation was employed in conjunction with cubic polynomials. In addition, they required the solution and its first derivative to be continuous across element boundaries. The boundary conditions are satisfied at the collocation points on the boundary (see also Villadsen and Sorensen, 1969). Chang and Finlayson (1977) also report on the use of Hermite polynomial bases in conjuction with orthogonal collocation. In their approach, they identified collocation points associated with the P D E and others associated with boundary co ditions. The array of collocation points is presented in Figure 4.28. If the degrees of freedom identified with boundary conditions are condensed out of the equations prior to solution, a simpler collocation point array is possible (Prenter, 1975; Pinder et al., 1978). 1
Boundary
Condition
/"^Collocation
-x—χ
χ-Η<
χ
Point
Differential
Equation
Collocation
Point
Collocation
Point
x-jk
(a)
(b)
Figure 4.28. Collocation point distribution employed by (a) Chang and Finlayson, 1977; (b) Frind and 'inder, 1979.
332
Parabolic Partial Differential Equations
To demonstrate the use of orthogonal collocation for the solution of parabolic PDEs let us consider the general operator (4.13.1) 3
3
3
3
3
~ Jy~ 1 *' A(y
Λ
) U
2
J
3
È^" 1 ^' Λ "1 a^ 1 ^' Λ ) "1 ·
+
6(
)
6(
+
Because Hermite polynomials lend themselves naturally to a collocation formulation, we employ them in defining o u r trial functions (4.13.38)
at/,
3t/
Í
u « δ î Σ ί/ (χ)φ , + 9^(*)Φ,ο, + 8 ^ ( * ) V 7
3 t/
0 0
2
(
where U 3 £ / / 9 η , , 9 £ / / 3 η , and 3 1 / / 3 η , θ η are undetermined coefficients and Φοο,, φ,ο,, ψ , and φ , are Hermite polynomials defined in local η, coordinates and given in Section 2.2.4. We have elected to define our basis functions in local η coordinates to accommodate a subparametric transformation. In the spirit of our weighted residual approach, we now impose the constraints 2
r
2
2
ο υ
υ
(
(4.13.39)
f j t{a)b-,(y ,y )dy dy =Q, x
2
2
/ = 1,2,...,M,
x
where Μ is the number of collocation points in the entire y — y domain and δ,(_ν,, y ) is the Dirac delta function. In the use of subparametric elements, N e u m a n n (second type) boundary conditions are easily handled using curvilinear (σ,) coordinates. This coordinate system is illustrated in Figure 4.29a. N o t e that we have also required the element sides, at the nodes, to b e orthogonal. This is not essential but considerably simplifies the formulation. Let us now proceed to transform our trial function into σ, coordinates. From the chain rule of differentiation, we obtain x
2
(4.13.40a)
3η,
=
3 η , 3σ,
+
σ η , 3<τ
2
2
333
Finite Element Approximations of Two Space Dimensions
Approximate of
Location
Collocation
Points
(0)
Collocation Points
(-1,-0
(t.-l)
Figure 4.29. Orthogonal collocation points defined in (a) global y, and (b) local η, coordinates.
(b)
3m _
(4.13.40b)
9η
2
do du
3112 da,
θη
du
3<Ji
θη,9η
3η,3η
2
2
2
2
9σ
2
3m
3σ
3σ,
3η|3η
2
2
(4.13.40c)
9σ, du
8ì
2
2
3" da
2
Âσ^ 3σ^ 3^ì 3η, 3 η 3 2
2
3σ,3σ
2
2
2
σ
_j_ /33ηθ, | 33ησ
^ 3σ, 3 σ 3 η 3η,
2
2
2
2
3σ2 θσ^ 3^ì 9η, 3 η 3 " 2
2
σ
We know, however, that at the nodes, 9 σ / 9 η , = θ σ , / 9 η = 0 . Thus evaluating (4.13.40) at the nodes, we obtain the simplified relationship 2
9m
(4.13.41a)
θη,
3m
(4.13.41b)
3η
2
_ 3σ, 9m 9 η , 9σ, _ 3σ
j
2
ι
3u
3l2 3σ
2
j
9 σ, 3M du ^-=-\ = ^ - - ^ = - \ 9 η , 9 η j 9 η , 9 η 9σ, 2
(4.13.41c)
J
2
2
2
2
9 σ , 9m + - ^ - ^ = - \ 9 η , 9 η 3σ 2
2
2
+
3σ, 3 σ 9η
9ì 2
2
2
9σ,9σ
2
Parabolic Partial Differential Equations
334
We can now redefine the trial function (4.13.38) such that the nodal unknowns are in terms of normal and tangential derivatives. This is achieved through substitution of (4.13.41) into (4.13.38).
" (4.13.42)
u
« d =
2
7 = 1
91/ ^
91/
+ τ τ ^
+ ^
2
d U, 2
3σ,3σ
+
2
^
where Î φ,'00j
(4.13.43a)
-
a
(4.13.43b)
3σ,
3σ
Φ" = ΦθΙ;3 η
(4.13.43c)
Φ; " î
(4.13.43d)
1
2
Φ
3 σ, 2
+Φ
ι υ9η,9τ}
2
3 σ, 2
2
+ Φ, 9 η , 3 η υ
2
θσ, 3σ
2
2
The collocation equation can now be obtained through the following sequence of substitutions. First combine (4.13.1) with (4.13.39) to yield (4.13.44) θ
3
i = l,2,...,Λ/, where we have used the property of the Dirac delta function to obtain the point equation. Next introduce the revised trial function (4.13.42) to obtain (4.13.45) Í
1
7 = 1
dx
9
J
dx
3σ
Finite Element Approximations of Two Space Dimensions
, I 3
w
- ^ ( ^ 3 t /
ä \ι ι 3 3 ϊ ) Ι ^ · · Λ ) ^ + -(Λ.Λ)^-Α(>,.Λ)*;']
+
β
, / 3
3
-^(^ 83ζ)[ +
\r
I 3 ^ ( 3 ^
Λ·Λ)*5ΐ
β (
VV,
" 3
335
+
β
ι
(Λ·Λ)^-^..ΛΚ*]
3 \r 3 ^ ) Η " · Λ )
+
-Μ^,>-2)ΦΗ
Μ.
i = l,2
=0,
W
1 Y\,-YI,
We can rewrite (4.13.45) in matrix form as (4.13.46)
[ / i ] { M }
+
[ / ? ]
{i*ij +
{
/
=0,
}
where the elements of [A] are, in themselves, 4 X 4 matrices of the form (4.13.47a)
a
"
(4 4) ^ ^
=
+
( u i
+
] + H
' * )
+ 2
(4 4) +
( a I <
' ^ +
1 + H ; , )
(έ 4 ) ^ ( 4 4 *° (έ έ h ^ * (Wi 4 ) ^ (^ 4) * * ( έ έ ) ^ (4 έ) ' °" " * ( έ έ ) < w ° +
<
Wi+φ
+
+
+
( e W
a
l
1+λφ;!)
(α1Φ 5+φ
ι+
b = tJ
Φ° U+I
Φ°Ι* + 2 Φ°Ι* + 3
+
+ b
+1
+ h ; i )
Φ°Ι* (4.13.47b)
+
φ;,)
+
+3
Φ;ί. Φ;ι* . +
Φ;ί* 2 +
Φ;ºΑ 3 +
+
φ;ì* φ;ί* . φ;ì* φ; ι* +
+2
2
+3
(
e
o
l
Λ ψ
φ;"ί* φ;"ί* . +
φγì* 2 +
Φ°'° \^Ê 2
+ 2
r ) k
( a W ; ; i +
+
+ 2
*
: , + 1
j
+
ι 0 , )
+
'^
2
336
Parabolic Partial Differential Equations
(4.13.47c) 3σ
2
dx
(4.13.47d)
dx \ 3 σ | 3 σ
2
)
The vector {/} contains known information such as generated by boundary conditions. The subscripts k, k + 1, k + 2, and k + 3 denote four orthogonal collocation points located within the region where the Hermite basis functions for node j are defined to be nonzero. Equation (4.13.46) can now be transformed into local η, coordinates for evaluation as described in Chapter 3. N o t e that because the collocation point (which is. in fact, the Gaussian quadrature point) resides within the element, each equation can be formulated only using information from one element. This results in a very efficient coefficient matrix generating algorithm. The set of O D E described by (4.13.46) can now be solved using finite difference methods described in Section 4.11.2. It should be apparent from the definition of {u} through (4.13.47c) that boundary conditions of the first, second, or third type are readily accommodated. The appropriate coefficients in {«} are replaced by the known values and the corresponding coefficients in the [A] and [B] matrices are eliminated. It is essential that all known information be utilized in order to generate a properly defined system of equations. For example, if a Dirichlet (first type) boundary condition is specified (i.e., u = c along Γ), not only is u known but so also is its derivative in the direction tangential to the element boundary. Similarly, in the case of a Neumann (second type) boundary, the cross derivative as well as the normal derivative is specified. It can be shown that for an operator of the form (4.13.1), there will always be two degrees of freedom at a boundary node, one at a corner node and, of course, four at an interior node. This is consistent with the collocation point pattern of Figure 4.28/3.
1}
48 44
42
9
40
4
τ2_
7
β
5
6
3
4
1
2
"Π
29 30 23
24
24
22
|44 4 2 35
36
33
34
|4â 47
48
45
46
« 5 46
27 28
39 40
47
43 44
2 5 26
37 38
46
49
20
47
48
34
32
29
30
43
44
44
42
44 42
23 24
35 36
45
9 40
24 2 2
33 34
44
45
16
43
44
β
(9
27
28
25
26
20
34 3 2
39
40
37
38 43
(α) 1
XXX × XXX XX XXX XX XX XX XXX ÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷ XX ÷ ÷ ÷ ÷ ÷ ÷ ÷÷÷÷ XXX ÷ ÷ ÷ ÷ ÷ XX XX ÷÷÷÷÷÷÷÷ XXX ÷ ÷÷÷÷÷ XXX ÷ ÷ ÷÷÷÷ XXX XX ÷ ÷ ÷ ÷ XXX
÷÷÷÷÷> 1 ×××××× ÷÷÷÷÷÷ <××× XX XX ÷ ÷ ÷ ÷ (××××× ÷÷÷÷÷÷ XX ÷ ÷ ÷ ÷ ÷ ÷ ÷÷÷÷÷÷÷÷ XX ÷ ÷ ÷ ÷ ÷ ÷ ÷÷÷÷÷÷÷÷ XX ÷ ÷ ÷ ÷ ÷ ÷ ××××× XX ÷ XX XX ÷÷÷÷ ÷ ÷ ÷ ÷ ÷ ÷÷÷÷÷÷ ÷ΧΧ8ΧΧ ÷÷÷÷÷÷ ÷ ÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ×××××× ÷÷÷÷÷÷ XX ÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷ ÷ ÷÷÷÷
<ΧΧΧÍΧ <÷÷÷÷÷
×÷÷×÷× ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷÷÷ XXX XXX ÷÷÷÷÷÷ ÷÷÷÷÷÷ ×××××× XXX ÷÷÷÷÷÷ XXX ÷÷÷÷÷÷ XXX ÷÷÷÷÷÷ XXX ÷÷÷÷÷÷÷÷ ÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷ ÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷ ÷÷÷÷÷÷÷÷ ÷÷÷÷ ÷÷÷÷÷÷ XXX XXX ×××× XX ÷÷÷÷÷÷ XXX ÷÷÷÷÷÷
337
JLl Ä1
*}
I
47 48
6
(7
5
45
4
43
3
14
2
9
1
7
30
44
46
27
28
39
27 28
39 40
13 44
2 5 26
37 38
14
25
42
23
26
37
24
35
42
48
40
47 47 46
38
46
36
45
4 4 42
23 24
35 36
45
9 10
24 2 2
3 3 34
44
10
24
8
49
I
4 9 20 (A)
22
33
20
34
I
34
44
32
43
31 32
43
I
χ χ χ χ χ χ χ χ χ χ χ χ XXX X XX
XX X XXX XX
29
I S 46
8
XXX XXX
Ul 42
29 30 18
XX
xxxx
χ χ χ χ χ χ
<ΧΧΧΧΧ
η
( Χ Χ Χ Χ Χ ( Χ Χ Χ Χ Χ Χ Χ Χ Χ Χ Χ ΧΧΧΧ XX XX
η
η
η
"
ΧΧΧΧ ΧΧΧΧ
XXX
XXX
( Χ Χ Χ Χ Χ ΧΧΧΧΧΧΧΧ χ χ χ χ χ χ χ χ
XXX
χ χ χ χ χ !
X XX
(ΧΧΧΧΧ
mm
χ χ χ χ χ χ χ χ χ χ χ χ χ χ XXX XX
XXX
χ χ χ χ χ χ XXX
XXX
ιίΧΧΧΧΧ
XXX
χ χ χ χ χ χ
< χ χ χ χ χ ( χ χ χ χ χ <χ χ χ χ χ χ χ χ χ χ χ χ χ Χ Χ Χ Χ Χ Χ XX χ χ χ χ χ χ χ χ χ
χ
χ
χ
χ χ χ χ χ χ χ χ
χ ί χ χ χ χ
χ
χ χ χ χ χ
χ χ χ χ χ χ
Χ Χ Χ Χ XX χ
una
XXX
χ χ χ χ χ χ " " χ χ χ χ χ χ χ χ χ χ χ χ χ χ XX XX
χ χ χ χ
XXX
" " " T χ χ χ χ χ χ χ χ χ
χ χ χ χ
χ χ χ χ χ χ χ χ χ χ
χ XXX
χ χ χ χ χ χ XX* XXX
xxJxxxix
χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ XXX X X X χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ χ
χ χ χ χ χ χ χ χ χ χ χ χ
χ χ χ χ
χ χ χ χ XXX ÕΧ χ «XX XXX χ χ χ χ χ χ χ χ XXX XXX
(B)
Figure 4.31. (a) Numbering scheme of degrees of freedom at nodes (unknown parameters) and equations (collocation points) used to obtain the matrix structure of 4.3l(/>). Degrees of freedom at nodes are circumscribed by a square. Remaining numbers refer to collocation points, (b) Nonzero matrix structure generated by numbering scheme illustrated in 4.31(a). (From Frind and Pinder, 1979.)
338
Finite Element Approximations of Two Space Dimensions
339
Finally, before we leave our discussion of collocation, it is interesting to consider for a moment the form of the coefficient matrices [A] and [B]. We have already suggested that there is considerable flexibility in numbering the equations and nodes appearing in Figure 4.28ft. The numbering pattern naturally dictates the location of the nonzero elements of the coefficient matrices. T o illustrate this point, we take two examples from Frind and Pinder (1979). The matrix structure of Figure 4.30ft is derived from the numbering scheme of Figure 4.30a, and similarly the structure of Figure 4.316 is due to the scheme illustrated in Figure 4.31a. Although the structure of Figure 4.30ft is perhaps the most interesting, most equation solvers would prefer the structure of 4.31ft because of the nonzero diagonal. Treatment of Sources and Sinks
4.13.6
In this section we consider the options available for the representation of sources and sinks in a finite element formulation. Let us consider the situation where a system is described by the two-dimensional heat flow equation with a source located at (y , y ), u
(4.13.48)
2l
£ ( « ) = « , . , „ + u^-fiu,
+ ρδ(>·, - y
llt
y -
y ,)=0,
2
2
where Q is the source intensity and <5( ·) is the Dirac delta function. We assume that appropriate auxiliary conditions are specified to properly pose the problem. Whereas the finite difference method does not lead naturally to the representation of a point source such as found in (4.13.48), the Galerkin finite element formulation does. T o demonstrate this, we simply follow the normal Galerkin procedure. Let us define our trial function as (4.13.49)
u(x,y„
Ν Σ U,(x)4;(y .
v ) * « ( x . v,, y )= 2
2
Ι —
ι
y ).
l
2
where Ν is the number of nodes and
(4.13.50)
[ ί £(κ)φ,(ν,, y,)a> a>,=0.
Ν.
, = 1.2
2
Substitution of (4.13.48) and (4.13.49) into (4.13.50) yields (4.13.51) <« „ + Vi
„ - βύ
χ
+ QS(y {
y ,y -y ,),*,(y , u
2
2
x
y )> = 0, 2
# = 1,2
N.
340
Parabolic Partial Differential Equations
which is modified, using Green's theorem, to (4.13.52)
φ,)-
(«,,,Φ,,,> + <«,,, Φ,,,) + (βύ,,
(QS(
yi
- y ,y - y u
2
2i
), φ,)
Only the fourth term of this equation differs from our earlier formulations. Recall that φ, is unity at the node for which it is defined. Thus if (>>,,, y ) corresponds to a nodal location, the fourth term in (4.13.52) becomes 2l
(4.13.53)
x
ν - . ν ) . Φ , > = β | ,„.,,,-
u
2
2 ι
The simulation of the source function thus reduces to simply placing an appropriate number, Q, in the known vector {/} of the matrix equation. Thete are occasions when the accuracy in the vicinity of the singularity is of principal importance. To achieve a high degree of accuracy in this region requires either the use of additional nodes in the case of C ° bases or the use of higher-order elements (i.e., C ' continuous Hermites). In either case, a considerable penalty is paid in terms of computational effort. There is, however, an alternative approach to the foregoing formulation based on the concept of nonsmooth subspaces. This idea was introduced by Cavendish et al. (1969) for the simulation of near-well-bore phenomena in petroleum reservoir engineering. The concept of nonsmooth subspaces involves the augmentation of the bases in the trial function. In the case of point sources and sinks, one would add to the normal selection of C ° or C bases a function that would more accurately represent the sought-after solution in the neighborhood of the singularity. In our example the trial function would be written 1
J
(4.13.54)
1 ί/,.(χ)φ,Οι.
u(x,y„y )~u(x, ,y )= 2
y]
2
y) 2
/ =!
+
V
Ì
1 1 Η =
Η- "·"'(χ)ψ,"·"·( , ,.ν ), /
>
|
2
Im=I
where ψ/" " ( . ν , , y ) is a function that is nonzero over the element containing the source or sink and satisfies certain functional constraints as outlined in the original work of Cavendish et al. (1969), that is. 2
(4.13.55)
Finite Element Approximations of Two Space Dimensions
341
Functions that may be added to the element in question include (4.13.56) where k and / are increments in the >>, and y directions, respectively. This formulation results, in general, in a modification of the coefficient matrix. In certain instances, the equations for H , can be uncoupled such that, together with the efficiencies inherent in the choice of orthogonal functions for ψ/"· ", an exceedingly efficient algorithm is possible. When a solution for the behavior of u in the vicinity of the source or sink is known, it may be utilized directly in the definition of the trial function. This idea was introduced for C ' bases by Cavendish et al. (1969) and recently applied to C ° bases by Hayes et al. (1977). Under these circumstances we write the trial function as 2
(4.13.57)
u(x, y^y )^H(x,
><,. v ) = M , ( X . . ) ' , . y )+ u (x- )\· >' )>
2
2
2
2
2
where M , ( J C , y , , y ) = 1 j ^(x)^y , y ) and w (x, >·,, y ) is the solution to an appropriate problem defined in the vicinity of the singularity. In petroleum engineering problems, a logarithmic function for pressure is included in the solution space to describe steady-state behavior in the vicinity of the well. N
2
=
x
2
2
2
(4.13.58) where r =[()\ — y ) +(y — > ' / ) ] * the radial distance from the well, and R is chosen to restrict the support of u to the element under consideration. Let us now consider a Galerkin formulation in which (4.13.57) is used as the trial function. The steady flow version of (4.13.52) is 2
2
u
2
l / 2
2
2
(4.13.59)
<β, ,Φ, > 1
1 1
+
<þ,. ,Φ Ι
ν
2
ΐ
>-<ρί(^ ->· ι
1
Ι
,
Λ
-
Λ
ι
),φ > 1
Ν. The appropriate trial function [in consideration of (4.13.57)] is (4.13.60)
« ( J i , y ) * «i( y\* y-i)+Μ y\< Λ )< 2
where «, =Z*L,ί/,φ,(.ν,, y ) and « 2
2
is defined in (4.13.58). Substitution of
Parabolic Partial Differential Equations
342
(4.13.60) into (4.13.59) yields (4.13.61) < «ι ν , · Φ, > ν
+
<"i
.v *»,.·>
=
(QHyt - y ,, y ~ y*). Φ,) t
2
+ / ( Vr, + r
«,Λι ) < ~ <"2Y,' ψ
Λ
> ~
<"2>2'
*υ- >' 2
i = l,2,...,7V. Examination of (4.13.61) reveals that the new trial function has not materially increased our computational effort since all information on the right-hand side of this equation is known. It should be noted that it is not necessary to place wells at nodes in this type of formulation. 4.13.7
Alternating Direction Formulation
In Section 4.9.5 we introduced alternating direction procedures for the finite difference approximation of parabolic PDEs in two space dimensions. The formulation in the finite difference case was intuitive and relatively straightforward. In this section we introduce alternating direction methods for the Galerkin-finite element approximating equations. We restrict this discussion to rectangular subspaces, but the method has been extended to nonrectangular regions by Dendy and Fairweather (1975) and even to isoparametric formulations by Hayes (1978). The alternating direction Galerkin procedure ( A D G ) appears to have first been developed by Douglas and Dupont (1971). In this classic paper they introduce the conceptual model and proceed to perform an error estimate. In the following discussion, we follow the original development for an example equation. A review of A D G methods is given in Dendy and Fairweather (1975). The principal objective of the A D G approach is to reduce the general two-space-dimensional problem to a collection of one-space-dimensional problems. Consider as our model equation the heat flow equation employed earlier in our discussion of split-step finite difference methods (4.9.66a)
— Μ
= 0,
with homogeneous boundary conditions JV yi) = 0
on Γ
and initial condition
«(0, y ,y ) i
2
=
u (y ,y ). 0
l
2
finite Element Approximations of Two Space Dimensions
343
Recall that the split-step formulation assumes that (4.9.66a) can be expressed as (4.9.66b)
\u = u
(4.9.66c)
i « , = ",- v
x
r v
,
x <x^x r
r+
*,
2l
Let us now apply Galerkin's procedure to each:
(4.13.62a)
Κ « χ , Φ , ( > ' , ^ 2 ) ) = <þ , ,<ί>,( v,, J ) > ,
(4.13.62b)
ί<þ„Φ (^ ,>' )>
ι
Ι
1
νι
2
=<ί . . ,Φ (^, )>,
2
ι
2 ΐ
1
ι
Λ
f = 1,2
Ν
' = 1,2
Ν
where ΰ is the trial function and φ, the basis function. Application of integration by parts yields (keeping in mind the boundary conditions above), (4.13.63a)
Κ**.Φ,> + < * ν Φ ν , > = 0 .
i = l,2,..../V
(4.13.63b)
Κ"χ.Φ,) + ( " ν . Φ , , , > = 0,
/ = 1.2
2
N.
Let the trial function ύ be written Í
u^u=
2 ^(χ)φ,{γ ,
y)
ι
2
such that (4.13.63) becomes
(4.13.64a)
\ 1 £ (dU. ^ Σ( ( ^ < Φ , < Φ - > + ^ < Φ ν ν ' Φ . ν > )
(4.13.64b)
-
2 (-^<Φ,.Φ,> + ^<Φν |
1 ί
.Φ
Λ (
=
0
>)=0
'
=
1
·
2
ι = 1,2
*
/V.
We now rewrite the basis function as the product of one-dimensional forms, Φ, =
«*(>Ί)^/(^2)·
344
Parabolic Partial Differential Equations
Equation (4.13.64) now becomes (4.13.65a)
2 m = l,2 Μ =
(4..3.65M
N,
1,2
r
ΐΣ |;(^<^ .^ > ι (
Α
Α
+
m = l,2
1
4
^ ^ . ^
Í
η = 1,2
Í,,
It is advantageous to introduce the notation
Then (4.13.65) can be written
(4.13.66a)
\£
Σ
«^ΑΛΧ·, , ί/α
4
ί/α„, ,
m = l,2
iV,.
> I
« = 1,2,..
(4.13.66b)
1
I Σ Σ
/ Λ/
-^<«..Ο <Α.Α>Γ, η
β> ' 2
w = l,2 « = 1,2
jV.
11
/V,.,.
ý(ν 2
Finite Element Approximations of Two Space Dimensions
345
We leave the main line of the development for a moment to explore the concept of Kronecker products. The Kronecker product of two matrices [A] and [B] is often written Let [A] and [B] be defined as an
[AL-
and
\BY-
J
21
Then the Kronecker product is given by (4.13.67a)
[Λ]<8>[β] =
a [B]
a [B]
a [B)
a [B]
l2
U
2i
22
or
(4.13.67b)
[/4]®[£];
«11*11
«11*12
«12*11
a
2*
«11*21
«11*22
«12*21
a
2*
«21*11
«21*12
«22*11
a 22*
«21*21
«21*22
«22*21
a 22*
or (4.13.67c)
( M ] ® [ * ] ) „ : A / = <1,*V
The relationship is distributive with respect to addition in either component, that is, (4.13.67d)
([A]
(4.13.67e)
[A]®([B]
+ [B))®{C]
= [A]®[C)
+ [C]) = [A]®[B]
+
[B]®[C]
+
[A]®[C]
and is also associative (4.13.67f)
[A]®{[B]®[C])
=
([A)®[B])®[C].
In addition, there is a relation between the Kronecker and matrix product. (4.13.67g)
([A]®[B})([C]®[D})
=
(lA][C])®([B][D]),
and the inverse of the Kronecker product, (4.13.67b)
([Á]®[Â]) =[ÁÃ'®[Â]~ , 1
]
if d e t M l ^ O and d e t [ B ] ^ 0 . Consider the form of (4.13.66) in terms of the definition (4.13.67c). Note that the term (a ,α„) (β/,β„\, could be identified with the Kronecker k
νι
346
Parabolic Partial Differential Equations
product [C],.®[C] . , V
2
( [ C ] , , ® [ C ] , , ) . „ , „ = <«*, « > <j8„j8 >,,,
(4.13.68)
A /
where [C] = (a ,a,) spatial terms as Yi
k
m
and [ C ] . = < / 3 , / 3 „ )
ri
l
(4.13.69)
(l*hMcW ,
(4.13.70)
([C] e[^] )
2
m
=^
k mn
r i
r i
iv
B
Similarly, we can write the
^
=
t i : i l ( 1 1
V|
<0 ./U (
( ^ , ^ ]
r
ri
.
i
Introduction of (4.13.68)-(4.13.70) into (4.13.66) yields \([C] MC}, )[^}+([A] MC)r )[U]=0
(4.13.71a)
v
(4.13.71b)
y
2
2
| ( [ C ] , ® [ C ] , ) [ ^ ] + ( [ C ] , , ® [ ^ ] ) [ i / ] = 0. J
l :
Because [ C ] and [ C ] are positive definite, [ C ] " and [ C ] ^ exist. Thus we can premultiply (4.13.71 a) by ([ / ] β [ C ] ~ ) . 1
V |
1
V j
1
(4.13.72)
^([/]®[C]; )([C],®[C],,)[^] + ([/]®[C]- ) ,
1
j
([A] MC]> )[U] y
2
= 0.
The relationship given by (4.13.67g) is now invoked to give 1
dU_ dx
{(MichMlcftlcu)} +
{([/][^],)®([c]-'[c] ,)}[i/]=o >
or (4.13.73)
}([C]
V l
®[/])[^"| + ([^] ®[/])[c/]=0. V l
An analogous development would transform (4.13.71b) to the form (4.13.74)
\([lMC] )[^] y2
+
([lMA] ,)[U}=0. }
Finite Element Approximations of Two Space Dimensions
347
We now employ a finite difference approximation in time similar to that used for the finite difference split-step method. Proceeding one half time increment per equation, the two-step algorithm becomes, for the time-centered scheme, (4.13.75a)
([CI,,®!/])
u -u r+l/2
r
Ur+i/2 fjr +
+(M]v,®[/])
= 0
(4.13.75b)
+([/]®MU
(M®[CU
= 0.
These are the one-dimensional equations that constitute the A D G algorithm. T o determine the form of approximation that has been employed in establishing (4.13.75), we rewrite (6.13.75) as
j ( [ C ] „ » [ / ] ) + \{[A],,»[/])}
(4.13.76a)
[U]
r
+
1/2
([C]n®[/])-f(M],®[/])J[t/r (4.13.76b)
{([/]®[CU + f ( [ / ] ® M U } [ t / r ' =
{([iMc] )-^([/MA] ))[UR^ . /2
V!
IL
Premultiplication of (4.13.76b) by {([C] ®[I]) + (h/2)([A\ ®[1\)} quent substitution of (4.13.76a) into the result yields, after manipulation and the introduction of (4.13.67d) and (4.13.67h), V
y
(4.13.77)
[([C) Ml]) y
~([A} Mn)\
+
y
{([/]®[C], )+f([/]®[/l] ;
=
1 ;
)}[c/]
r + l
{(ll]*[C] )-j([l]9[A] )} ri
ri
χ {(Κ],®[/])-^(ì],,®[/])}[ί/Γ.
and subseconsiderable
348
Parabolic Partial Differential Equations
This equation can be expanded with the help of (4.13.67g) to give (4.13.78)
( K l n e l C L J + f {([C] .,®[/l], ) + ([/l] . ®[C] ,)} 1
+ T(M].-,®MU
l
J
[V]
I
l
R+ 1
([C],. ®[C] ,)-2{([C] . ®[^] ,) + ([^] .,®[C] ,)} 1
l
l
1
l
1
1
+ ir(M]„®[/«] ,,) [l/r1
A comparison of (4.13.78) with the corresponding equation generated through a standard Galerkin procedure reveals that the A D G algorithm generates the additional terms of the form ([ Λ1 ,.&[/!],.._). Thus one would anticipate an additional error of 0(h ); this is demonstrated to be the case by Douglas and Dupont (1971). Although the formulation above is valid only for the heat flow equation, with modification of the original operator (Laplace modification, for example) more general equations can be treated. For additional details the interested reader is referred to Dendy and Fairweather (1975) and Douglas and Dupont (1971). 2
4.14
FINITE ELEMENT APPROXIMATIONS IN THREE SPACE DIMENSIONS 4.14.1
Example Problem
The formulation of the approximating equations for finite element simulation in three dimensions is a direct extension of the two-dimensional theory presented in the preceding section. T h e fundamentals of three-dimensional finite elements, such as element geometry and basis function formulation, were presented in Chapter 3. As an illustration of the methodology involved in formulating the approximating equations, let us consider a Galerkin approximation to the three-dimensional heat flow equation (4.14.1)
eiiiJs^-aiM,.,,,+ «,,,,+« ,,,)=0, 1
where a is a positive constant. We assume the existence of appropriate auxiliary conditions to provide a properly posed problem.
Finite Element Approximations in Three Space Dimensions
349
The first step is to select a suitable trial function. If C ° basis functions are chosen, an appropriate trial function would be given by Í
(4.14.2)
u(x, y
y , y )~u(x,
u
2
y„ y , y ) = 2
3
2
}
Uj{x)
y= i
u
y,
y ),
2
3
where Φ, are three-dimensional basis functions as defined in Chapter 3, and Uj(x) are time-dependent undetermined coefficients. We next apply Galerkin's principle to (4.14.1) to obtain (4.14.3)
J
(£(ύ)φ,α·õ=0, v
N,
/ = 1,2
where V is the three-dimensional domain of interest and Í is the number of nodes. Substitution of (4.14.2) into (14.14.3) yields (4.14.4)
<þ,-«(ί , ν ι
+ þ , + þ ,. ,),Φ >=0,
1
Λ ν
>
κ
N.
/ = 1,2
ι
As in the one- and two-dimensional cases, we now apply Green's theorem t o the second-order terms to obtain (4.14.5)
(ύ , φ,) + a(u
yi
yii
-af^&J +u
+ύ φ η
l
ΰ φ^,φ,) η
+ ý , / , , )φ, da = 0,
Vi yi
y
+
η ί
i = 1.2
TV.
T h e algebraic equations are obtained through combination of (4.14.5) and (4.14.2). (4.14.6)
<φ,, φ,> + aU (<φ„ , , φ ) +
J
t
νιΙ
*) yjl
+ <Φ ,,, Φ „>)
7 = 1
Equation (4.14.6) is written in matrix form as [A]{u)+[B)[^}
(4.14.7)
+
{f}=0,
where (4.14.8a)
a = α ( < φ „ , φ,„> + < φ , , , u
ν
2
+ <φ,„,
φ,,,)),
ν
ν
350
Parabolic Partial Differential Equations
(4.14.8b) (4.14.8c)
f = -a j{u l
y yi
+ ,/„ M>
+
The set of O D E s described by (4.14.7) can now be solved using methods in Section 4.11.2. When rectangular elements are used, this formulation is appropriate and the integrations can be performed analytically. In the more general isoparametric formulations, numerical integration is required. This is achieved using trial and coordinate transformation functions defined in local r/ coordinates. Three-dimensional numerical integration is performed as in the two-dimensional case, extended in a straightforward fashion to three space dimensions. The second- and third-type boundary conditions appearing in (4.14.8c) now require area rather than line integration. (
Whereas the formulation of the three-dimensional approximating algebraic equations is easily accomplished, solution of the resulting matrix equations is a computational nightmare. For very large problems, direct solution methods such as those employed in most two-dimensional simulations d o not prove economically feasible. Fractional step and block iterative techniques, which have heretofore been used primarily in finite difference calculations, will probably be necessary if three-dimensional finite element simulation is to evolve into a practical engineering tool.
4.15
SUMMARY
Although we have arrived at the end of this very long chapter, there may remain in the mind of the reader some doubt concerning the relative merits of each method for a given parabolic problem. This problem is not easily resolved. The major strength of the finite difference approach is the many highly efficient algorithms available to solve the resulting approximating algebraic equations. There is also the advantage inherent in a long history. Whereas finite element and collocation theory is still rapidly evolving, finite difference methods have concrete theoretical underpinnings that have withstood the challenge of scientific scrutiny. Moreover, finite difference methods have not evolved along parochial lines as has the finite element method. Thus, in the finite difference literature, there is a more uniform nomenclature and less dedication to specific physical problems. On the other hand, the finite element a n d collocation methods have an advantage when an irregular nodal arrangement is appropriate for a given problem. This may arise when a solution displays singularities or regions of particularly rapid change. Irregularly shaped domains, especially those with curved boundaries, are effectively accommodated with the finite element techniques. Although the approximating algebraic equations arising from finite element procedures are generally less amenable to efficient algebraic manipula-
References
351
tion, new schemes are being rapidly developed and o n e would anticipate this computational disadvantage to be less pronounced in the years to come.
REFERENCES Arihara, Í . "A Study of Non-isothermal and Two-Phase Flow through Consolidated Sandstone," Stanford Geothermal Program Rep. SGP-TR-2, 1974. Baker, A. J. and M. O. Soliman, "Utility of a Finite Element Solution Algorithm for Initial-Value Problems," J. Comp.
Phys. 32, p. 289, 1979.
Barakat. Η. Z. and J. A. Clark, "On the Solution of the Diffusion Equations by Numerical Methods," J. Heat
Transfer,
ASME,
88, p. 421, 1966.
Birtwistle, G. M., "The Explicit Solution of the Equation of Heat Conduction," Compui. J.. 11, p. 317, 1968. Bonacina, C , G. Comini, A. Fasano, and M. Primicerio, "Numerical Solution of Phase-Change Problems." Int. J. Hem Mass Transfer,
16, p. 1825, 1973.
Brian, P. L. T., "A Finite-Difference Method of High-Order Accuracy for the Solution of Three-Dimensional Transient Heat Conduction Problems," AlChE
J., 1, p. 367. 1961.
Burgess. W. P.. "Composite Numerical Solutions of Partial Differential Equations," Ph.D. dissertation. Dept. of Chemical Engineering. Princeton University, 1971. Burgess. W. P. and L. Lapidus, "Composite Numerical Solutions of Partial Differential Equations," Chem.
Eng. Commun.,
1, 33, p. 45, 1973.
Cavendish, J. C , H. S. Price, and R. S. Varga, "Galerkin Methods for the Numerical Solution of Boundary Value Problems," Soc. Pel. Eng. J., 246. p. 204, 1969. Chang, Ñ W. and B. A. Finlayson, "Orthogonal Collocation on Finite Elements for Elliptic Equations," in Advances
in Computer
Methods
for
Partial
Differential
Equations.
Vol.
2
Bethlehem, Penn. (R. Vichnevetsky, ed.), IMACS. p. 79, 1977. Cheng, S., "Accuracy of Difference Formulation of Navier-Stokes Equations," High Computing
in Fluid Dynamics,
Phys. Fluids Suppl. If.
Speed
12. p. 34, 1969.
Ciment, M. and R. A. Sweet. "Mesh Refinements for Parabolic Equations," J. Comput. Phys., 12, p. 513, 1973. Coats, Ê. H. and Μ. H. Terhune, "Comparison of Alternating Direction Explicit and Implicit Procedures in Two-Dimensional Flow Calculations," Soc. Pet. Eng. J., 6, p. 350, 1966. Culham, W. E. and R. S. Varga, "Numerical Methods for Time Dependent Nonlinear Boundary Value Problems," Soc. Pet. Eng. Paper 2806, presented at 2nd Symposium on Numerical Simulation of Reservoir Performance, Dallas, Tex. Feb. 5 - 6 , 1970. Dendy, J. E., Jr. and G. Fairweather, "Alternating-Direction Galerkin Methods for Parabolic and Hyperbolic Problems on Rectangular Polygons," SI A Ì J. Numer. Anal., 12, p. 144, 1975. Douglas. J.. Jr., "The Solution of the Diffusion Equation by a High Order Correct Difference Equation," J. Math.
Phys.. 35, p. 145, 1956.
Douglas, J., Jr., "Alternating Direction Methods for Three Space Variables," Numer. Math., 4, p. 41, 1962. Douglas, J., Jr. and T. Dupont, "Galerkin Methods for Parabolic Equations," SI AM J. Numer. Anal..
7, p. 575, 1970.
Douglas, J.. Jr. and T. Dupont, "Alternating-Direction Galerkin Methods on Rectangles," in Numerical
Solution of Partial
Differential
Equations.
Vol. 2, Synspade 1970 (B. Hubbard, ed.).
Academic Press, N e w York, p. 133, 1971. Douglas, J , Jr. and J. E. Gunn. "A General Formulation of Alternating Direction Methods," Numer.
Math..
6, p. 428, 1964.
352
Parabolic Partial Differential Equations
Douglas. J., Jr. and B. F. Jones. "On Predictor-Corrector Methods for Parabolic Differential 11, p. 195, 1963. Equations." S1AMJ., Douglas. J.. Jr. and Η. H. Rachford. "On the Numerical Solution of Heal Conduction Problems in Two or Three Space Variables." Trans. Am. Math. Soc, 82. p. 421. 1956. Fairwcathcr. G.. "A Note on a Generalization of a Method of Douglas." Math. 407. 1969.
Comput.. 23. p.
Faii-wcathcr. G. and A. R. Mitchell. "A New Alternating Direction Method for Parabolic Equations in Three Space Variables." SIAMJ
. 13. p. 957. 1965.
Fairwcather. G. and A. R. Mitchell. "A New Computational Procedure for A D.I. Methods." SIAMJ.
Numer. Anal..
4. p. 163.
1967.
Fairwcathcr. G., A. R. Gourlay, and A. R. Mitchell. "Some High Accuracy Difference Schemes with a Splitting Operator for Equations of Parabolic and Elliptic Type." Numer. Math.. 10. p. 56. 1967. Faust. C. R. and J. W. Mercer, "An Analysis of Finite-Difference and Finite-Element Techniques for Geothermal Reservoir Simulation." Soc. Pet. Eng. Paper SPE 5742. presented at the 4th Symposium on Numerical Simulation of Reservoir Performance, Los Angeles. 1976. Frind. E. O. and G. F. Pinder. "A Collocation Finite Element Method for Potential Problems in Irregular Domains." Int. J. Numer.
Methods Eng., 14. p. 681. 1979.
Gerber. P. D. and W. L. Mirankcr. "Nonlinear Difference Schemes for Linear Partial Differential Equations," Computing. 11, p. 197. 1973. Gordon. P.. "Nonsymmetric Difference Equations." SI A Ì J.. 13, p. 667, 1965. Gourlay. A. R., "Hopscotch: A Fast Second-Order Partial Differential Equation Solver." J. Inst. Math.
Appl.. 6. p. 375.
1970.
Gourlay, A. R. and G. R. Mc Guire. "General Hopscotch Algorithm for the Numerical Solution of Partial Differential Equations,"./ Inst. Math. Appl.. 7. p. 216. 1971. Gourlay. A. R. and A. R. Mitchell. "The Equivalence of Certain A D I and L O D Difference Methods," SIAMJ.
Numer. Anal..
6. p. 37,
1969.
Gourlay. A. R. and A. R. Mitchell. "On the Structure of Alternating Direction Implicit (A.D.I.) and Locally One-Dimensional (LOD) Difference Methods." J. Inst. Math. Appl.
9 . p. 80. 1972.
Gourlay. A. R. and J. Lh. Morris. "Deferred Approach to the Limit in Nonlinear Hyperbolic Systems." Comput. J.. 11, p. 95. 1968 Gray. W. G . "An Efficient Finite Element Scheme for Two-Dimensional Surface Water Computation." HI Finite Elements in Water Resources (W. G. Gray. G. F. Pinder. and C. A Brebbia. ed.s.). Pentech Press. London, p. 4.33, 1977. Gray. W. G. and G. F. Pinder. "Galerkin Approximation of the Time Derivative in the Finite Element Analysis of Groundwater Flow," Water Resour. Res.. 10, p. 821, 1974. Gray, W. G. and M. Th. van Gcnuchten. "Economical Alternatives to Gaussian Quadrature over Isoparametric Quadrilaterals," Int. J. Numer. Methods Eng.. 12. p. 1478. 1978. Hayes. L. J., R. P. Kendall, and M. F. Wheeler. "The Treatment of Sources and Sinks in Steady-State Reservoir Engineering Simulations," in Advances in Computer Methods for Partial Differential Equations, Vol. 2 (R. Vichnevetskv. e d ) . IMACS. Bethlehem, Pcnn. p. 301. 1977. Hayes. L. T„ "Galerkin Alternating-Direction Methods for Non-rectangular Regions Using Patch Approximations," Center for Numerical Analysis Rep. No. 134, The University of Texas at Austin, 1978. Hofmann, P. "Asymptotic Expansions of the Discretization Error of Boundary Value Problems of the Laplace Equation in a Rectangular Domain." Numer. Math.. 9. p. 302. 1967. Hubbard. B.. "Some Locally One-Dimensional Difference Schemes for Parabolic Equations in an Arbitrary Region." Math. Comput.. 20. p. 53. 1966. Hurley, F. X. and R. K. Linback. "A Self-Adjusting Grid for Finite-Difference Programs." Int. J. Numer.
Methods Eng.. 5 , p. 585.
1973
References
353
Huakorn, P. S.. "An Upwind Finite Element Scheme for Improved Solution of the ConvcctiveDiffusion Equation." Res. Rep. N o 76-WR-2. Water Resources Program. Princeton University. 1976. Joubert. C. R.. "Explicit Difference Approximations of the One-Dimensional. Diffusion Equation, Using a Smoothing Technique." Numer Math . 17. ñ 409, 1971. Joyce. D C . "Survey of Extrapolation Processes in Numerical Analvsis." SI AM Rev . 13. ñ 435. ' 1971 Kca.st. P. and A. R. Mitchell, "Finite Difference Solution of the Third Boundary Problem in Elliptic and Parabolic Equations." Numer. Math.. 10. ñ 67, 1967 Keller. Η. B.. "A New Difference Scheme for Parabolic Problems," in Numerical Solution of Partial Differential Equation*. Vol 2 (B. Hubbard, e d ) . Academic Press, New York, 1971 Langsrud. O.. "Simulation of Two-Phase Flow by Finite Element Methods." SIX. Pctr Eng. Paper SPE 5725, presented at the 4th Symposium on Numerical Simulation of Reservoir Performance. Los Angeles. 1976. Lapidus. L. and J. Η Seinfeld. Numerical Solution of Ordinary Differential Press. New York. 1971.
Equations.
Academic
Larkin. Â. K... "Some Stable Explicit Difference Approximations to the Diffusion Equation." Math. Comput.. 18, p. 196. 1964 Lees. Μ . "A Linear Three-Level Difference Scheme for Quasilincar Parabolic Equations." Math. Comput.. 20. p. 516. 1966. Leutert. W. W., "On the Convergence of Unstable Approximate Solutions of the Heat Equation to the Exact Solution." J Muth. Phys.. 30. p. 245. 1952. Lindberg. B., "A Simple Interpolation Algorithm for Improvement of the Numerical Solution of a Differential Equation," SIAM J. Numer
Anal.. 9. ñ 662. 1972.
Liu. S . "Stable Explicit Difference Approximations to Parabolic Partial Differential Equations." AlChEJ. 15. p. 334. 1969 McKce. S. and A. R Mitchell. "Alternating Direction Methods for Parabolic Equations in Two Space Dimensions with a Mixed Derivative." Comput J.. 13, p. 81. 1970 Mercer. J W. and C R. Faust. "The Application of Finite Element Techniques to Immiscible Flow in Porous Media." in Finite Element in Water Resources (W Ci. (iray, Ci. F. Pinder. and C. A. Brcbbia. eds ). Pen tech Press. London, p. 1.21, 1977 Mitchell, A. R., "Splitting Methods in PDE." Prm: Math. Sawn. Rurechi in Gottingen. 36. p. 45, 1971
Umv
Hamburg.
I'tiiulenhoek and
Mitchell. A. R. and ( i Fairweather. "Improved Forms of the Alternating Direction Methods of Douglas, Pcaceman and Rachford for Solving Parabolic and Elliptic Equations." Numer. Math.. 6. p. 285. 1964 Mitchell, A. R. and R P. Pearcc, "High Accuracy Difference Formulae for the Numerical Solution of the Heat Conduction Equation." Comput. J.. 5. p. 142. 1962. Morris, J Lh., "On the Numerical Solution of a Heat Equation Associated with a Thermal Print-Head." J Comput. Phys.. 5. p. 208, 1970. Morris, J. Lh and A. R. Gourlay, "Modified Locally Onc-Dimcnsional Methods for Parabolic Partial Differential Equations in Two Space Variables." J. Inst. Math. Appl., 12. p. 349. 1973. Ncuman, S. P., "Saturatcd-Unsaturated Seepage by Finite Elements," J. Hydraul. Die . ASCE. 9 9 . ñ 2233. 1973. Osher, S.. "Mesh Refinements for the Heat Equation." SIAM J. Numer. Anal.. 7. ñ 199. 1970 Pcaceman, D. W. and Η
Η. Rachford, "The Numerical Solution of Parabolic and Elliptic
Differential Equations." SIAM J.. 3, p. 28. 1955. Percyra. V., "Accelerating the Convergence of Discretization Algorithms," SIAM J. Numer. 4. p. 508. 1967.
Anal..
Pinder. G F.. Å Ο. Fnnd, and Μ A. Cclia, "Groundwater Flow Simulation Using Collocation
3S4
Parabolic Partial Differential Equations Finite Elements," in Finite Elements in Water Resources (W. G. Gray. G. F. Pinder, and C. A. Brebbia. e d s ) , Pentech Press, London, 1978. p. 1.171.
Prenter, P. M., Splines and Variational
Methods, Wiley, N e w York, 1975.
Price, H. S. and R. S. Varga, "Error Bounds for Semidiscrete Galerkin Approximations of Parabolic Problems with Applications to Petroleum Reservoir Mechanics," Numerical Solution of Field Problems in Continuum
PhvsUs (G. Birkoff and R. Varga, e d s ) , Vol. 2, S I A M - A M S
Proceedings, American Mathematical Society, Providence, R.I., 1970. Rachford, Η. H„ "Rounding Errors in Parabolic Problems," SIAM 1968. Saulyev. V. K., Integration
of Equations of Parabolic
J. Numer. Anal.,
Type b\ the Method
5, p. 156,
of Nets, Pergamon Press,
Elmsford, N.Y., 1964. Scala, S. M. and P. Gordon, "Reflection of a Shock Wave at a Surface," Phys. Fluids, 9 , p. 1158, 1966. Scala, S. M. and P. Gordon, "Solution of the Time-Dependent Navier-Stokes Equations for the Flow around a Circular Cylinder," AIAA Jour., 6, p. 815, 1968. Stone, H. L., "Iterative Solution of Implicit Approximations of Multidimensional PDE," SIAM
J.
5, p. 530, 1968.
Numer. Anal..
Strang, G. and G. J. Fix, An Analysis
of the Finite
Element
Method.
Prentice-Hall, Englewood
Cliffs. N.J.. 1973. Strom, T.. "Practical Error Estimates for Repeated Richardson Extrapolation Schemes." BIT. 13, p. 196. 1973. Taylor, P. J. "The Stability of the Dufort-Frankel Method for the Diffusion Equation with Boundary Conditions Involving Space Derivatives." Comp. J. 13, p. 92, 1970. Van Genuchten, M. Th. and W. G. Gray, "Analysis of Some Dispersion Corrected Numerical Schemes for Solution of the Transport Equation," Int. J. Numer. Methods Eng.. 2, p. 387, 1978. Venit. S.. "Mesh Refinements for Parabolic Equations of Second Order." Math. 745, 1973.
Comput..
27. p.
Villadsen, J. and J. P. Sorensen, "Solution of Parabolic Differential Equations by a Double Collocation Method," Chem. Eng. Sci., 24, p. 1337, 1969. Voss, C. I., "Finite Element Simulation of Multiphase Geothermal Reservoirs," Ph.D. thesis, Princeton University, 1978. Weinstein, H. G „ H. L. Stone, and Τ. V. Kwan. "Iterative Procedure for Solutions of Systems of Parabolic and Elliptic Equations in Three Dimensions." hid. Eng. Chem. Fund.. 8. p. 2 8 1 . 1969. Werner, W., "Numerical Solution of Systems of Quasilinear Hyperbolic Differential Equations by Means of the Method of Nebencharacteristics in Combination with Extrapolation Methods." Numer.
Math.,
11. p. 151, 1968.
Wyman. C. E.. "Numerical Solution of Multidimensional and Nonlinear Diffusion Problems," Ph.D. thesis. Dept. of Chemical Engineering, Princeton University, 1971. Yanenko, Í. N., The Method of Fractional
Steps, Springer-Verlag, N e w York, 1970.
Young, L. C. "A Preliminary Comparison of Finite Element Methods for Reservoir Simulation," in Advances
in Computer
Methods for Partial
Differential
(R. Vichnevetsky, ed.). IMACS, p. 307, 1977b.
Equations.
Vol. 2, Bethlehem, Penn.
Zafarullah, Α., "Some Stable Implicit Difference Methods for Heat Equation with Derivative Boundary Condition," Comput. J., 14, p. 309, 1971.
Elliptic Partial Differential Equations
5.0
INTRODUCTION
In this chapter we consider the numerical solution of elliptic partial differential equations. We concentrate primarily on second-order operators with a brief excursion into higher-order equations when we discuss the biharmonic equation. The format of the chapter is similar to Chapter 4. After introducing the model elliptic P D E and a few specific examples, we examine finite difference approximations and their truncation error. Then our attention turns to efficient schemes for the solution of the resulting algebraic equations. Considerable effort is devoted to a discussion of point and block iterative methods. The discussion of finite element techniques for the solution of elliptic PDEs also includes collocation and boundary integral equation methods. All three methods are formulated using the method of weighted residuals. By using this common theoretical base, the relationships among the three approaches are more readily apparent.
5.1
MODEL ELLIPTIC PDEs
As in previous chapters, we first wish to introduce a number of model elliptic PDEs plus associated boundary conditions. These include Laplace's, Poisson's, and the biharmonic equations. They serve as illustrative vehicles for numerical approximation and subsequent solution. Because we employed the independent variable χ elsewhere, we write u(y ,y ) and u(y , y , >> ) where the dependent variable u is a function of two or three (space) variables. i
5.1.1
2
Specific Elliptic PDE
We may write (5.1.1) 355
}
2
3
Elliptic Partial Differential Equations
356
9*(V,,0
(0,4)
9,
(4,4 )
( boundary)
io,y )^ 2
G
I
(interior region )
14,0)
(0,0)
9 (>i.O) 3
Figure 5.1. Definition of the region of an elliptic partial differential equation. as a general elliptic P D E provided that B - A C < 0 . The coefficients Á, B, and C may be functions of _y,, v , and u. In a model form, we write Laplace's equation as 2
2
(5.1.2)
h
(1i1
[Laplace equation]
. + ì = 0 (
or. with the Laplacian operator
as Δ«=0.
(5.1.3)
[Laplace equation]
The extension to three dimensions. Poisson's equation is written as Δ ì = - / ( V|,
(5.1.4)
y , v , is straightforward. By contrast, 2
3
[Poisson equation]
and the biharmonic equation as (5.1.5)
Δ Δ
Μ
= 0 = ^ + 2 - ^ Τ +
^
[biharmonic equation]
All these equations hold within (on the interior of) a region G of interest (i.e., y,, y £G) but not on the boundary dG of the region (see Figure 5.1). 2
5.1.2
Boundary Conditions
For elliptic PDEs there are n o initial conditions but rather only boundary conditions wherein some property of u is specified on dG. For simplicity (see Figure 5.1) we choose the domain of interest to be a square, 0*s y,, y < 1; this could be relaxed in any manner desired. With either Laplace's or Poisson's equations we can define three types of boundary conditions: 2
357
Model Elliptic PDE
1.
All values of u are given on the boundaries. Thus (5.1.6)
" = g(y\< v ) . 2
where (_y,, y )GdG. 2
Here we could explicitly write for Figure 5.1 « = ίι(0,Λ)· " = u=
(5.1.7)
2.
gi(^yi)^ gi
(y ^). t
In cither the form (5.1.6) or (5.1.7) this is called the first-type boundary condition for Laplace's (Poisson's) equation. When all these conditions are put together they are referred to as the Dirichlet problem or boundary condition. Instead of specifying the values of w on the boundary, we may specify a gradient (or flux) condition. Thus (5.1.8)
(y ,y )EdG,
9^ = g ( r i . > ' )
i
2
2
where du/dn represents a normal gradient away from G. This is called the second-type boundary condition or the Neumann boundary condition. 3.
Finally, we may specify a general combination of u and u„ in the form au + o-r— — c. on
(5.1.9)
where a, b, and c can be functions of (>>,, y ); these coefficients must have certain properties (they must be properly posed) to correctly define the system. These properties usually follow directly from physical considerations. Equation (5.1.9) is called the third-type boundary condition or the Robbins boundary condition. It obviously contains (5.1.6) and (5.1.8) as special cases. 2
In the case of the biharmonic model equation, (5.1.5), eight conditions are needed. These might be (5.1.10)
u= ^
g(y ,y ) l
= h(y^y ) 2
1
(y,,y )£3C 2
3S8
Elliptic Partial Differential Equations
or, for the square in Figure 5.1, "
=
*ι(°'Λ)'
|^ = «
= A,(0,
>1
Λ
) ,
(5.1.11) |^
" = gi(y\
5.1.3
"ν
=
Λ
= 2
3(>Ί.Ο).
Further Items
It is of interest to consider the elliptic Dirichlet problem κ
(5.1.12)
Λ > ι
+ «ι^ = Δ « = 0
inG
2
u=g( ,y )
(5.1.13)
yi
ondG
2
together with the two-dimensional parabolic heat flow problem (5.1.14)
M
* = «V, +
"v .v 2
2
u(0,y„y )=u (y„y ),
(5.1.15)
2
0
2
where (5.1.15) are initial conditions ( x = 0 ) for (5.1.14) and the boundary conditions (5.1.13) hold for both problems. Defining a new variable z(x, y„ y ) such that 2
z(x, y ,y )=u{x,
(5-1.16)
x
2
y , y )~ t
u(y
2
u
y ), 2
is the solution of (5.1.12)-(5.1.13), it is possible to show that where u(yi,y ) (both problems are linear and thus we can solve them analytically) 2
12 ( χ * y \ . Λ ) I=I«(* - y \ . Λ )
-
« ( * . Λ )I -
0
as χ — oo. In other words, as χ -»oo (if JC is time, as time goes to infinity) the solution of the transient or unsteady-state parabolic problem approaches the solution of the corresponding elliptic steady-state problem irrespective of the initial conditions. Stated in another way, this means that if we start with any initial conditions and solve the parabolic system of (5.1.13)—(5.1.15) in the limit as χ -»oo, the result will be the solution of the elliptic problem (5.1.12)(5.1.13). Sometimes this is referred to as the false transient solution since only
Model Elliptic PDE
359
the final steady-state solution is of interest and the transient approaching the solution is immaterial (see Mallinson and Davis, 1973). As we shall see, iterative solutions of elliptic problems may be developed as time (x) solutions of parabolic problems; step size (A) in the time solution becomes analogous to iteration number in the elliptic solution. In the same sense, the elliptic biharmonic equation A u=0 2
could have a transient problem counterpart of u -A u=0 2
x
such that as χ — oo the two solutions agree. We should also say a few words about the maximum principle. This applies to linear elliptic PDEs and is of importance in proving that unique solutions exist. For our numerical work, the application of this principle is of minor utility. One form of this principle states that (for a Dirichlet problem) every solution achieves its maximum or minimum value on the boundary 3G of any region G where it is known to be continuous. One finite difference representation we develop shortly specifies that the solution u on the interior G is the average of four values on 3G (or on four neighboring interior points). Thus the interior value cannot be larger than the largest of its four neighbors or smaller than the smallest of these neighbors. When connected to the boundary values this immediately implies that the maximum or minimum values of u must be on the boundaries. Of course, if all the boundary values are constant and equal to each other, the interior values must equal this constant. The interested reader should consult Brandt (1973) for a useful discussion on the maximum principle. Aris (1975) is able to show all the features of the Dirichlet and Robbins problems by considering coupled heat and mass transfer with chemical reaction inside catalyst bodies (spheres, cylinders, or slabs); there does not seem to be a physically real Neumann problem. The Dirichlet problem corresponds to specifying the concentration and temperature on the external surface of the bodies (3G), and the Robbins problem corresponds to having mass and heat resistances in a local film around the bodies. As a further illustration, the mass (concentration) and temperature balances can be written (5.1.17)
Ac-aR=0
(5.1.18)
AT-bAHR=0
where c and Ô are concentration and temperature, respectively, and a, b, and AH are physical parameters such as mass or thermal diffusivity and rate of reaction. If we let α = AHb/a, it is easy to show that (5.1.17) becomes (5.1.19)
A(ac)-bAHR=0.
Elliptic Partial Differential Equations
360
But a comparison of (5.1.18) and (5.1.19) shows that the difference (v) between ac and Ô must satisfy Laplace's equation Δ υ = 0 . Thus v = ac — Ô must hold in G. If c = c , T= T on 3G. then v is a constant on 9G; but it then follows that ν — v must hold for all points in G since the values on the boundaries are constant and equal. Stated in another fashion, this yields an invariant on the interior between c and Ô as given by 5
s
s
s
v = constant = ac — T, s
and in turn implies that (ô
-A///>,
\
.
\ ' s)~—-—ic.-c). T T
5.2
FINITE DIFFERENCE S O L U T I O N S IN T W O SPACE DIMENSIONS
In this section we develop a number of finite difference approximations to the model elliptic P D E plus boundary conditions. Truncation error details are also presented and finally methods for solving the finite difference equations. 5.2.1
Five-Point Approximations and Truncation Error
We begin this discussion by developing a series of five-point finite difference approximations for the model (Laplace or Poisson) PDE. We consider the interior of G but ignore, for the present, the boundary conditions. The interior mesh increments corresponding t o y , , y will be A', and the subscripts on u will be s and f. respectively. We start our development with the simplest approach, namely to use Laplace's equation with equal spacing /c, = k = k\ Figure 5.2 is a simplified schematic with a limited number of interior points and a square boundary. For ease in writing, we have labeled the node points both on the interior and boundary with numbers from 10 to 2 1 ; also shown is a more general interior numbering for which 2
2
"ο = « .ι ί
«, = 2
«,+
!.,
=
".,.,+1
"3 =
«,-l.i
«4 =
« .,-Ι·
U
1
This notation allows a simpler writing of the ensuing formulas.
Finite Difference Solutions in Two Space Dimensions 24
361
20 1
k<3G
τ
44
43
42
45
40
44
(6
47
(9
4È
(a)
Figure 5.2. Nodal numbering for (a) Laplace's equation on a square and (b) an interior five point.
>4
For Laplace's equation
let us replace each second derivative with the usual finite difference approximation, (521)
U
* + \ . i ~
2
u
* . l
+
U
s ~ l . l
" . . . , - M -
{
k, It follows that (k, = k 2
(5·2·2)
2
" , , , +
_Q
k\ k)
",.ι -
+
1 . , + « , . , - H +
« , . , - 1 )
or, in the terminology of Figure 5.2, u = i ( i i , + « + «j + H ) .
(5.2.3)
0
2
4
Obviously, u is calculated as the average of the four points around the center. This is the simplest feasible five-point finite difference approximation for Laplace's equation with equal spacing. If Poisson's equation had been considered, it follows that 0
(5.2.4)
" θ = ί ( " ΐ + " 2 " 3 + " 4 + *7θ)· +
Elliptic Partial Differential Equations
362
It would appear from ( 5 . 2 . 1 ) that the local truncation error of ( 5 . 2 . 2 ) is 0{k ). However, we can show this more explicitly using Taylor series expansions. Thus we write (assuming always that suitably high derivatives exist!) 2
Μ + AM, +
u — AM,.*
- * U , .·,+ 2
2
+ U «,, 2
u + ku +
\k u
u — AM,. +
\k u
where Μ,J = È ' Μ / È ^ , u
ik u
+iik\. -
·••]
ik u
+ iik\.i+
···"
ik^u^
+ ^k'u^
r}
2
»2
= 3 M/9_VJ*
3
t
O n substituting into ( 5 . 2 . 1 )
4
Vi
r i
3
y
r
··•]
3
ϊι
2
v
lk\.; +l k \ . . + i
I
and
rearranging terms, there results ", + Ι . Ι - Æ Η , . , + Μ,-Ι.,
».,,+ | - 2 Μ , , , + ".,,,-Ι
Α
Α·
2
2
A
2
It thus follows that the local truncation error is 0 ( A ) or. if 2
M= max
{I u « j, v
IΜ I } .
it (5.2.5)
| T . E . | ^ M .
Birkhoff and Gulati ( 1 9 7 4 ) have shown that n o other five-point approximation for Laplace's equation on a square mesh can be more accurate than ( 5 . 2 . 2 ) . Let us examine further the use of ( 5 . 2 . 2 ) in conjunction with the nodes of Figure 5.2. Note that u , , . . . , u are unknown and must be calculated, whereas Mi M are known if Dirichlet boundary conditions are imposed. If we apply ( 5 . 2 . 2 ) to each interior node, there results 0
4
1 3
2i
4
4
(5.2.6) 4
4
"lO = Μ
Ι1=
M
Μ
l 3 + « I 5 + " | 6 + II M
Ι 2 + "Ι()+"Ι7+"|Ê
" l 2 = " 2 0 + «l3
+
M
l l+ "l9
" l 3 = " l 0 + «12 + " l 4 + " 2 1 -
Finite Difference Solutions in Two Space Dimensions
363
Because these equations comprise four linear equations in the four unknowns we may write them as
«,„,...,Mi , 3
[A){u}
(5.2.7)
= {b),
where "«io" «11
{u} =
" l5 + l7 +
"lS
"l9 +
"20
M
{*} =
.
"|2 "13
4 -1 [A} = 0 . -1
"l6"
M
.
."14+ «21.
-1 4 -1 0
0 -1 4 -1
-
f
0 -1 4.
and the vector {b} contains only known values of u,. In this case, (5.2.7) has a unique solution, {u)=[A]
>}.
Further, the matrix [Ë] is diagonally dominant, which will serve us in good stead later. If /c, Φ k Φ k, the mesh lengths are not equal, and an equivalent procedure to that which produced (5.2.1) yields 2
(5.2.8) 2(«
1
+
i,, + «,-i, ) f
1 + /?
2/3 (M,,,+ , + « , , , _ , ) 2
|
1 + /3
2
-4«,.,=0.
2
or, in the terminology of Figure 5.2, 2 ( « ! + « 3 )
(5.2.9)
1 + /3
^ 2/3 (t/ + 2
2
1 + /3
2
W 4
)
-4u =0. 0
2
The local truncation error is 0(kf,kj). When Ar,=A: , /S = l and (5.2.9) becomes (5.2.3). In a more general sense, we may desire to develop a five-point finite difference approximation that either uses u and any four other points or has a variable spacing throughout or in some specific region of G. This can be done, using Laplace's equation as an illustration, by setting 2
0
(5.2.10)
w
l|Vi
+ u
V2Yi
= a,u, + a u 2
+ a w + a « - au
2
3
3
4
4
0
0
=0,
where the w, u are values of u at selected mesh points around w and α , . . . , α are parameters to be determined by Taylor series expansions. It should be apparent that for the standard five-point approximation (5.2.2) 4
0
0
4
a, - a = a = a = 1, 2
3
4
a =4. 0
Elliptic Partial Differential Equations
364
Figure 5.3 shows a number of possible arrangements. In Figure 5.3a we show an irregular boundary dG. The points marked · are regular points that can use (5.2.2); the points marked Ο are exterior points which are outside of G or dG; the points marked X are irregular points in that they can use (5.2.2) but need exterior points. For these irregular points (near the boundry dG), we can derive a variable mesh length approximation that uses only points on the boundary (marked • ) rather than the exterior points. In Figure 5.3b, we show a general mesh arrangement with s,, s being fractions. In Figure 5.3c we show a possible grid arrangement that uses four different spacings around the center. Finally, in Figure 5.3d we show a rotated grid that would use the center point and the points marked X rather than the old points marked · . Finite difference approximations to Laplace's equation (or Poisson's equation) and even more general equations can be developed using an equation equivalent to (5.2.10). These concepts are now developed. We start with Laplace's equation and use (5.2.10) together with the unequal spacing of Figure 5.3b. Taylor series expansions follow exactly as before, that is. A
u +(s k)u i
-\
R — u
U..4
+
Substituting this equation and the equivalent series for u , u , and m into 2
3
4
•2 Sk 2
3
0
s,k sk 4
s,k
(•>
2
1
.4 (c)
X X
•0 -3
X X
X (d)
Figure 5.3. ( a ) Finite difference approximation of an irregular boundary: · denotes regular points, X denotes irregular points. Ο denotes exterior points, (b) Finite difference net with unequal spacing, (c) Finite difference net wherein discretization is not collinear with coordinate axes, {d) Nodal arrangement after rotation of grid depicted in (c): · denotes old points, X denotes new points.
Finite Difference Solutions in Two Space Dimensions
365
(5.2.10), collecting terms, and rearranging these results, we obtain (5.2.11) ".·,!·,
+
M
.
= :
"O(-a
l
+ a + a
)
]
+ a) + a ) + w , . ( a , J , k - a S A )
2
4
M
+ u^{a s k 2
+
- ot s k)
2
4
Y-[a (S /C) 2
3
3
a (s k) ] 2
4
4
+ ^ [ a , ( 5 A ) - a ( 5 3 A ) ] +
^[a (5 A) -« (5 A) ]
3
3
3
3
1
21 + α (ί Α) J
x
+
2
3
2
V|i, r
+ —γ- ya {S)k)
4
2
3
2
3
4
2
U ,4
4
+ ^ [a,(S,* ) + a (S /C ) ] + [a ( i A) + « ( S A ) ] 24 24 4
4
3
4
2
3
2
4
4
4
By comparing coefficients on the left- and right-hand sides of this equation, we obtain five equations in the five unknowns α , . . . , α : 0
5
— α + α, + α + α + α = 0 0
2
3
4
α, 5 , Α' — α 5 Α = 0 3
(5.2.12)
ask 2
3
—a sk
2
A
=0
4
α,(ί,Α) + a ( S A ) 2
3
a (s k)-+ 2
=2
2
3
a (s k)
2
4
=2.
4
The unique solution of these equations is given by 1
«O=2
.9,S /R
+
1
i .v A 2
3
1
4
ί,Α^ί,Α+ ί Α] 3
2 2
s k[s k 2
+
2
s k] 4
2
a 3
i A[s,A + S A ] 3
3
J A[J A 4
2
2
+i A]. 4
2
Elliptic Partial Differential Equations
366
With these given a,, we now have a finite difference approximation Laplace's equation for unequal five-point spacing of the form au 0
0
= α,κ, + a u 2
to
+ α « + a « .
2
3
3
4
4
Of course, when s, = s = s = s = 1, the case of equal spacing, a = 4 , a, = a = a = a = 1, which corresponds to (5.2.2). We can also ascertain the truncation error by considering (5.2.11). Now the first neglected terms are w j and u .f, when the a, are inserted it becomes clear that the local truncation error is 0( k) for the unequal spacing case. As shown by Birkhoff and Gulati (1974), this is the best one can d o for a nonuniform mesh. When j = i = s = i = l, the case of equal spacing, the w 3 and m j terms are zero and we return to 0(k ) error. This shows the great advantage of the equally spaced configuration and thus indicates that the unequally spaced approximation should be used only when absolutely necessary. We may extend these results in a straightforward manner to many other elliptic PDEs. Thus let us first include lower-order terms in Laplace's or Poisson's equation, 2
2
3
4
3
0
4
t
1
2
3
4
v
v
2
Au ^
(5.2.13)
+ Cu
y
+ Du
yiyi
Y}
+ Eu
+ Fu + H = 0,
yi
where A>0, C > 0 , and F < 0 . The coefficients A, C, D, E, F, and Ç can be functions of (y , y ) but, for the moment, let us treat them as constants. As before, we assume unequal spacing (irregular points) and an approximation of the form }
2
4
(5.2.14)
Au +Cu +Du +Eu +Fu YiV
ViVl
v
+ H=
v
2 <*,«, - « o " o +
H
-
Substitution of Taylor series expansions into the right-hand side of (5.2.13), collection of terms, and equation of coefficients yields the following equations for the a,: — a + ο, + a + a + a = F 0
2
3
4
a s,k
— ask
= D
ask
— ask
= Ε
{
2
2
3
4
3
4
a,(s k)
+ a (j Ar)
a (s k)
+ a (s k)
2
}
2
2
2
3
4
3
4
2
2
=2A =2C.
Finite Difference Solutions in Two Space Dimensions
367
The unique solution of these algebraic equations yields 2A + DS)k J,fc(I|/c
1
(5.2.15)
α3
-
4
+S]k)
2A-Ds^k
_
—
2C+Es k
-
s k(s k+s k)
2
2
a
—
j A(s,A: + Sjk)
4
_
—
4
Es k
2C-
2
-
s k(s k 4
3
2
—
s k)
+
2
4
a = a, + a + a + a — F. 0
2
3
4
With these values of a, we can approximate (5.2.13) at irregular points by [from (5.2.14)] a,u, + a u 2
+ a w + au
2
3
4
3
4
—au 0
+
0
H=0.
For regular points (in the interior), s, = s = j = s = 1 and the coefficients a, in (5.2.15) become 2
a, = ' (5.2.16)
, f +
k
:—
a, =
2
c+f A
z
A-— a = — — A 3
4
3
2
C a
2
4
*
=
k
T
2
°-T \
a
2
The finite difference form for regular points is thus
(5.2.17) + f )., ( f)., (-.-f )., ( -f).. +
C+
+
+
- 2 J /I + C -
C
) « + W/t = 0 . 2
0
When Λ = C = 1, and D = E = F= H= 0, (5.2.17) becomes(5.2.3), as it should. Actually, (5.2.17) can be derived in a more straightforward way. In the PDE, (5.2.13), we replace all derivatives with central difference approximations. Thus we obtain
+ Collection of terms and rearrangement then yields (5.2.17) directly.
Fu +H=0. o
368
Elliptic Partial Differential Equations
If the coefficients in (5.2.13) are functions of (>·,. y ) . equivalent procedures can be used. As an illustration, if one has 2
_3_
\
At
"
9
3v, a finite difference approximation can be obtained by treating the first derivative of a first derivative. Calling A(y\, > s ) = A for ease in writing, we obtain ^QI(U, - » ) _
A (u -u )
N
w
0
s,k
>·!
y
Λ,Α'
'
«777^7
'
where we have used second-order approximations for u and A ,A interpreted as evaluated at the midpoints of the intervals, that is. Vi
m
V)
are
s,k
A
—A
J0
Equation (5.2.18) applies to irregular points: for a regular point. J , = j , = 1. there results (5.2.19)
[Au ] r
=
Fi
^ . ( " , - " . ) - ^ " . - ^ )
Clearly, these concepts can be extended to other terms in the elliptic P D E to develop the full finite difference approximation. As another example, let us analyze the elliptic PDE (5.2.20)
u
riVi
+ y u , = 0,
+u ^ r
L=constant.
v
This corresponds to radial terms iny . As before, we approximate (5.2.20) with -a u + α , « | + · · • + a « , substitute Taylor series, collect terms, and find that for irregular points 2
0
0
4
4
—a
0
+ ο, + a
2
+ a, + a = 0 4
afSfk — otjSjk
=0
a s,k-a s M 2
4
= ±
4
a,(i,/c) + a j ( 5 / c ) = 2 2
2
3
a (j /c) + a ( s * ) = 2 . 2
2
2
2
4
4
Finite Difference Solutions in Two Space Dimensions
369
The solution to this case is
s^ksyk
+
s ks k 2
4
L(s k
~s k)
4
2
y s ks k 2
2
4
2y +
(5.2.21)
2
sk +
s k(
t
t
s k(s k }
+
t
y s k(s k
Sjk)
2
2
2
2y
s k)
2
4
4
4
2
+
2
s k)
s kL
-
2
y s k(s k
}
s kL +
s k) 4
For regular points, (5.2.21) becomes a
(1
(5.2.22)
=
«I = «3 =
k
2
77
A"
ly + kL
2y - AL
2v,A
2vsA
2
2
2
2
corresponding to central differencing of (5.2.20). What we have done to this point is to develop a series of five-point finite difference approximations (regular or irregular) for the model elliptic PDE. In each case the application of the approximation to interior points in G leads to a set of linear algebraic equations. These have the form of (5.2.7), namely [ Λ ] { Η } = (b). where the matrix [A] has elements corresponding to the particular set of α , . . . , α . When we detail the solution of these linear equations shortly it will be advantageous for the [A] matrix to have three properties: 0
1.
4
Nonnegative coefficients
a,>0 2.
(, = 1,2,3.4).
Diagonally dominant matrix, a„ 3= a, + a + a + a . 2
3.
3
4
Symmetric matrix.
Some or all of these conditions may hold depending on the particular finite difference approximation and the specific shape of the boundary oG. Thus condition (1) holds in the case of regular points for (5.2.3), but for (5.2.17)
370
Elliptic Partial Differential Equations
additional conditions on k must be satisfied; it is required that A±
f
>0
C±f > 0 .
and
But this implies that k be chosen such that \D\\
|£|f
or
} over all points. Because A > 0 and C > 0 , clearly such a value of k can be found. Condition (2) holds in most cases. As an illustration, because A > 0 , C > 0 , and / " < 0 , α > a, + a + a + a 0
2
3
4
for the P D E of (5.2.13). Condition (3), that of matrix symmetry, may be the most difficult to satisfy. When G is not rectangular, or irregular points are included, it may not be possible to make [A] symmetric. Even when only regular points are involved, certain further conditions may be required; thus in (5.2.17), it is necessary that A and C be constant and D and Ε be zero. Finally in this section we turn to the mesh diagrams of Figure 5.3c and d. Figure 5.3c represents a five-point approximation but with the four surrounding points located at the corners (not the sides) of a square surrounding w . For Poisson's equation as an illustration, we use « + « , . , , . , + /(>»,, y ) — — a u + α,Μ, + · · · + α « + f . Substitution of Taylor series, collection of terms, and solution for the a, yields 0
2
Q
4
0
4
2
0
«I -
«2 -
«3 -
«4
- TTT ·
T h u s the finite difference approximation is (5.2.23)
0 = i(u,
+ U -r-M 2
3
+
Ut+2k f ). 2
Q
This is also 0(k ). The nodal arrangement of Figure 5.3d presents no problems because it is the usual set of points (marked · ) but rotated through 45 degrees. Thus we 2
Finite Difference Solutions in Two Space Dimensions
371
need only to define a new k' such that
to achieve the new points (marked X ) in Laplace's equation. 5.2.2
Nine-Point Approximations and Truncation Error
In Section 5.2.1 we developed a number of five-point finite difference approximations to the model (Laplace or Poisson) elliptic PDE. However, the truncation error was never better than 0(k ). This section develops some nine-point approximations with smaller truncation errors. One approach is to use a higher-order approximation for w and κ Using the points shown in Figure 5.4A and 2
""" M
Γ2^
=
v , v ,
" "
=
(
_
~ΓΤ(~
"
«6
Ι2κ
each of which is of order 0(k ), Laplace's equation, u = a
Ι 6
+
,
" 6
λ
M
_
3
2 "
"°
0
3
0
+
" ' ~~
l 6
" 0+
1
6
m
4 - «»).
we obtain the nine-point approximation for
4
(5.2.24)
7 +
— u + I6w, + 16u, — u — w + I6w + I 6 u — « „ ) . 7
5
6
2
4
This approximation is 0(k*) but leads to severe computational difficulties (merely consider what happens as u approaches the boundary dG.) Thus we shall not consider it further. Instead, we turn to the set of points shown in Figure 5.4Λ. To derive this approximation, we may follow our previous procedure and estimate a . 0
0
Jo
1
*8
(o)
Figure 5.4.
(
b
)
Nodal arrangement for a nine-point finite difference approximation.
372
Elliptic Partial Differential Equations
α , , . . . , α and a 4
a in the form
5
8
4 ">·,.-,
+
ν
Μ
2
> ·
=
2
-
α
Ο « 0 +
Σ
X «,",+
Σ
ι=1
«/«,
/=5
for Laplace's equation. Substituting Taylor series, collecting terms and solving for the a,, we obtain for Ar, = k = 2
a
a
00
s
5
10 3k
= —-,
a, = a , - a
1
1
= α = a 6
Þ
7
(5.2.25)
- a
3
3
2
- — - ,
4
4
3
/
(
1
1
7
Thus an approximation to 0(k ) A
2
= a. = — - .
6k
8
2
for Laplace's equation is given by
u = b [ 4 ( « , + « + w + M ) + (M + M - u + «„)]. 0
2
4
3
5
6
7
In deriving the Taylor series, such identities (for Laplace's equation) as
«rfvi +
«vj=0
(5.2.26)
are used. If the same approach is employed for Poisson's equation, the identities equivalent to (5.2.26) become much more cumbersome. Without showing any details we note that an 0(k ) approximation is given by A
(5.2.27)
4(M, + u + H + « ) + ( u + u + « + M ) - 2 0 M 2
3
4
5
b
7
8
0
= - ã [ 8 / ο + / . + / 2 + /3 +
Ë]-
Note that all these approximations are for regular interior points. We d o not attempt to develop the irregular point formulas, although Birkhoff and Gulati (1974) give the explicit forms. For an excellent discussion of this whole area, see Rosser (1975). It is also interesting to point out here that in the finite element approximation to the Laplace and Poisson equation that we consider shortly, the nine-point array of Figure 5.46 arises naturally when rectangular elements and linear basis functions are employed.
Finite Difference Solutions in Two Space Dimensions
5.2.3
373
Approximations to the Biharmonic Equation
Now we turn to approximations for the biharmonic equation, (5.15), which we write in the form Δ Δ Μ = u * + 2u
(5.2.28)
Y
+ u
yhl
= /(y,, y ).
y}
2
Figure 5.5 illustrates the mesh points to be considered for k — k — k. As usual when employing a regular net, we can use finite difference approximations to each of the derivatives or introduce Taylor series expansions; here we consider the latter. Thus we approximate (5.2.28), w i t h / ( y , , y ) = 0 by x
2
2
4
2 «,", +
ΔΔι/ = — a u + 0
8
0
12
Σ <*,",+ Σ , , a
u
or, to simplify the procedure, by 4
(5.2.29)
ΔΔΜ = - α Μ 0
0
8
12
+ <* Σ , + 3 Σ , -
+ α, 2
u
α
u
2
/=5
i=l
/=9
In (5.2.29) we weight certain of the points equally. Using appropriate Taylor series, and rearranging in the usual fashion, we obtain ΔΔ« = ( - α + 4 α , + 4 α + 4 α ) κ + Ατ (α, + 2 α + 4 α ) ( « , . , , . , + «,,,.,) 2
0
2
3
0
2
3
k* + — (α, + 2 α
+ 16o )(ii . + Ι Ι . ) + * Ο Μ , . 4
2
3
r!
Λ
2
Ι 2 Ι
.| + · · · .
ΙΟ
U
6
2
5
3
0
4
7
4
8
9
Figure 5.5. Finite difference mesh for biharmonic equation.
374
Elliptic Partial Differential Equations
It thus follows that —a +4a, +4a
2
+ 4a
3
=0
a, + 2 a
2
+4a
3
=0
0
^(a,+2a
+ 16a ) = l
2
3
* a =2 4
2
and in turn 20
8 k
k
4
2
1
k*
k
Finally, the finite difference approximation for f(y ,y ) comes i
(5.2.30)
=
2
0 of (5.2.28) be-
« = i[8(«, + u + M + ιι )-2(« + u + u + « ) 0
2
- ( «
+ M
9
1 0
3
4
+ M,, + M
1 2
b
5
7
8
)].
This formula is of 0(k ). If /(>>,, y )¥=0, then a further term A / / 2 0 appears on the right-hand side of (5.2.30). There is also another interesting approach that one can use as illustrated by Ehrlich (1971). F o r y , , y bounded on a square we may write 2
4
2
0
2
ΔΔΜ
(5.2.31)
=
M , . < +2M..2..2 + .' I
V| V
ΙΛ.4
=0
1'2
2
u=0,
>Ί=0,1
or
>' =0,1
M„=0,
JF, = 0 , 1
or
y =0
=
2
2
Λ = 1
where u„ is the normal derivative. Now we introduce the new variable v(y , such that t
Δ« = Η,, „ + M„ .. =
y) 2
V
(5.2.32) Δ
ϋ
=
ϋ
ν,ν,
+
Û
^
2
=
0
·
The first equation in (5.2.32) is of Poisson type and the second equation is of Laplace type. Thus if we use the standard five-point approximation to Laplace's
Finite Difference Solutions in Two Space Dimensions
375
equation, (5.2.32) may be written as I.R+ " . , - ! . , +
I
+
u
s.i-\-* s., = u
k
\ , ,
(5.2.33) «ι+ι.Ι
»»-T.R » Ι . Ι + 1 +
+
+
- ^.,=0· 4
»».,-1
The boundary conditions in (5.2.31) become u =0
on all boundaries
ν =u
on all boundaries.
nn
This formulation allows one to use a much smaller set of mesh points around w than does (5.2.30). 0
5.2.4
Boundary Condition Approximations
T o this point we have conveniently ignored boundary conditions and the shape of the boundary 3G. Let us now pick up this discussion, assuming for a start that 3C is a square (or rectangle) as in Figure 5.2. When Dirichlet boundary conditions (5.1.7) apply, the calculation of u uses « and u , both of which are given. Thus in this case, as pointed out in the discussion of the {b} vector of (5.2.7), n o problems are encountered. i2
1 9
2 0
Now consider that a N e u m a n n boundary condition, (5.1.8), applies a t j , = 0 . The normal is, in this case, perpendicular to the line y = 0 and thus (5.1.8) becomes {
- | ^ = g(0,, ).
(5-2.34)
2
Reti rning to Figure 5.2, we see that if (5.2.34) holds, then M , M , W , M | are unknown as before, but now u and w (on y = 0 ) are also unknown. We ignore w, u since an equivalent analysis would follow for these points. We now finite difference (5.2.34) using a forward difference operator at node 15: ) 0
[4
M
1 2
3
x
15
2l
6
(5-2.35)
ίίΐ3Γ_!ί!ο ο, ) . =ß(
Ë
|3
But (5.2.35) can be combined with the five-point approximation at node 10, (5.2.36)
M
io = i ( i i M
+
M
i 3 + "i5
+
M
i6),
to eliminate u . Combination of (5.2.35) and (5.2.36) yields an equivalent result as if u , were actually given. However, (5.2.35) is only O(k). 1 5
5
Elliptic Partial Differential Equations
376
To improve our approximation, we replace (5.2.34) with a central difference approximation that is 0(k ), 2
(5.2.37)
^ϋ!_1ίΐο
= ß
(ο. ) Ë
1
Here — u is a fictitious node outside the boundary, but on the line defined by u and M , . However, if the five-point approximation at node 15 is combined with (5.2.37), we can eliminate « _ , . In this way we find that we have obtained the equivalent of the previous case. Finally, we note that if the Robbins condition, (5.1.9), were specified, our approach would be essentially identical to the procedure above. Thus a first-order, O(k), approximation to (5.1.9) is given by 1 0
1 0
5
0
(5.2.38)
flMi5
+
Miill_^o) . =c
It should be apparent, however, that when these boundary conditions (except for the Dirichlet ones) are incorporated, the resulting set of algebraic equations will no longer have the particular form of (5.2.6). When the boundary 3G is curved or the region G not square, a much more difficult situation exists. Only when o n e is very lucky will the mesh points coincide with the boundary, a n d generally something different must be done. O n e approach is to use the irregular-type formulation that we have detailed previously. Another approach is to use some form of interpolation to provide values at the desired mesh points. T o illustrate this technique we show in Figure 5.6 a square mesh next to a curved boundary. Then if _ ku + s ku ° k + sk r
M
2
A
2
_ ku + s ku "°~ k + sk 2
y
t
3
{
1
^~ \
Γ oV
I
1
1
L
1,
4
— k—-
y<
Figure 5.6. Finite difference net for interpolation near a curved boundary.
Finite Difference Solutions in Two Space Dimensions
377
and I,Ar«O +
k(s,
s kul 2
+s ) 2
we obtain
(5.2.39)
u = Q
ks k
ks,k
2
(k + s k)(s k i
+ (k
+
l
s k)
(k + s^is^k
2
s,ks k
+
s^)
s ks k
2
]
+ s^Utk
+
s k) 2
2
(/T + S A r ) ( I , A : + I A : ) 2
2
In this form of interpolation, which can be shown to be 0(k ), we retain the diagonal dominance in the matrix formulation. For further details and higherorder difference approximations, the reader should consult Tee (1963), Bramble and Hubbard (1962, 1965), and van Linde (1974). 2
5.2.5
Matrix Form of Finite Difference Equations
We have already pointed out in (5.2.7) that the set of finite difference equations can be written in simple vector-matrix form. Note that because we are only considering linear (model) elliptic PDEs, the resulting form is for linear simultaneous equations. Actually, (5.2.7) is too simple and does not reveal certain features of those equations. Thus we turn to a slightly larger Laplace problem, as shown in Figure 5.7. For the moment we select a rectangular body so that k = k = k can be accommodated. With u , as the value of u at a node point, we note that s= 0,1,2 5. where 0 and 5 correspond to the boundaries and ι = 0 , 1 , 2 , . . . , 4 , where 0 and 4 correspond to the boundaries. In a more general sense we could specify t
2
s=0,l t =0,1
s
S,S + 1 Γ,Γ+1,
corresponding to S internal columns and Ô internal rows. The values « , , . . . , a , are unknown and for Dirichlet boundary conditions, the n , . . . , « are known. In this problem the boundary value nature of the overall system dictates a simultaneous solution of all 12 unknowns; this is different than in the previous parabolic or hyperbolic PDE, where the initial value character of the system allowed for a serial single-variable-at-a-time solution pattern.
2
1 3
2 6
378
Finite Difference Solutions in Two Space Dimensions 23
22
2t
20
24
9
«0
<(
12
25
5
6
7
8
26
i
2
3
4
t3
Figure 5.7.
1
44
, t
(5
,
16
Finite difference net for a large Dirichlet problem.
For simplicity in this section, let us apply the five-point finite difference approximation, (5.2.2), to Figure 5.7. The result is
{A]{u)
=
{b},
where Γ«,3 +
«26'
«14
«12
4 1 0 0 1 [A} =
-1 4 -1 0 0 -1
0
0 -1 4 -1 0 0 -1
0 0 -1 4 0 0 0 -1
«19
-1 0 0 0 4 -1 0 0 -1
-1 0 0 -1 4 -1 0 0 -1
-1 0 0 -1 4 -1 0 0 -1
+«20
0 -1 0 0 -1 4 0 0 0 -1
-1 0 0 0 4 -1 0 0
-1 0 0 -1 4 -1 0
-1 0 0 -1 4 -1
Finite Difference Solutions in Two Space Dimensions
379
[A] is a 12X 12 matrix ( S T X S T ) with a very special structure, namely IT] [Â] (5.2.40)
[AY-
[B] [Ô]
[B]
[Â]
[Ô]
[B]
[B] [Â]
[T]
where [B] and [T] are square matrices of size 4 X 4 (in general, S X S ) and 4 - 1 (5.2.41)
0
1
[T] = 0
-1
= tri{-l, (5.2.42)
4,
- 1 4
-1}
[B] = negative unit diagonal = - [ / ] = tri{0,
- 1 , 0}.
Thus [A] is block tridiagonal which we write as (5.2.43)
M] = tri{-[/],
[Γ],
-[/]}.
If we had not used k = k = k, but rather β = Α-,/A Φ 1. the only change would have been that x
(5.2.44)
2
2
[Ô] = ΧÞ{-β,
2(1 +β),
-β).
If we had used Neumann boundary conditions, with a central difference approximation, some of the structure would have disappeared. In fact, one would on renumbering obtain
(5.2.45)
[T]
2[B]
[Â]
[Ô]
[B]
0
[A} = [B]
0 2[B]
[T]
Elliptic Partial Differential Equations
380
where [B] is as before but 4 (5.2.46)
- 1
[T] =
-2 4
- 1
-1 -2
4
It is apparent that the boundary conditions influence the [A] matrix (and the {b} vector). Another case is shown by Sweet (1973). In the same manner, if we had handled the biharmonic equation with the 13-point approximation of (5.2.30), the result would have been equivalent to the previous analysis except that [A] is block pentadiagonal, that is, M ] = penta{[B],[<:],[£],[<:],[£]}, where [B]=-[I], [ C ] = { 0 , - 2 , 8 , - 2 , 0 } and [Z)]= - [ / ] + penta { - 1 , 8 , γ . 8 , - 1 } , with γ depending on the boundary conditions used. Although we shall shortly show some alternative forms of these matrix equations, it is of interest to first note certain properties of the [A] matrix: 1.
[A] is of large order; that is, to obtain accuracy in the finite difference approximation, S and Ô may be 100 or 1000.
2.
Even though [A] is of large order, it is sparse; that is, only a few of the elements are nonzero.
3.
Depending on the boundary conditions, [ A ] is frequently symmetric.
4.
[A] is an irreducible matrix. This implies that interchanging a pair of rows and the same pair of columns in succession cannot reduce the [A] matrix to the partitioned form
Ml. [A}
2
0 [A],/
If the I A] matrix were reducible, some of the u , were independent of the boundary conditions. [A] is diagonally dominant; that is, the magnitude of the main diagonal term is equal to (weakly dominant) or greater than (strongly dominant) the sum of the magnitudes of the off-diagonal terms in any row, the inequality holding in at least one row. 5
5.
Because of these features, it is possible to prove that: 1.
There exists a unique solution ( d e t ^ l ^ O ) if [A] is an irreducible matrix with weak diagonal dominance.
Finite Difference Solutions in Two Space Dimensions
2.
381
If [A] is symmetric, irreducible with nonnegative diagonal elements, and weakly diagonally dominant, then [A] is positive definite. This has certain attractive features associated with iterative methods of solution which we discuss shortly.
There are other forms of the matrix equations that are of interest. Let us consider Poisson's equation with Dirichlet boundary conditions, M
r,v + v ,-
=
U
l
2
2
-/(>W2)
u = g{y ,y ), y
(y ,y )EdG.
2
i
2
We now introduce the five-point approximation 4«Ι. <
1.1 + « , - I . I + « , . « + 1 + " , . , - 1 + * / . . » .
=
2
in which 0 < i < S + l and ( Κ / ^ Γ + Ι . As before, the locations s = 0. S + \ and t = 0 , T+1 correspond to the boundaries. If we define
*2
V
2l>? + * 2 ] '
'
Y =
2 [ * ? + *f]
2[kj + kl]
for variable spacing or
VL ~
for equal spacing, k, = k (5.2.47)
M
J > ;
-Y,(M
j +
= 2
V2 ~
4 >
k, we may write the five-point approximation as
, , , + «,..,_,)-γ (κ 2
+
ί - ι + Ι
l*£r«£7\
K i < 5 .
Next, we write the relevant equations in terms of vectors whose elements constitute the unknowns on a row, {w}, = [ « , , , « , ] , 0 < / ^ Γ + 1 . Obviously, we could have considered as easily the elements on a column or even in blocks [for (5.2.40)]. Introducing the S-order square matrices Γ
2
1
0 1
0 [G]
[Hh = ([G] + [G]i). s
s
=
0 1
0
382
Elliptic Partial Differential Equations
The full system of equations can be written as ([/]*-y,l#] ){«}, -y {«}2 s
(5.2.48)
2
=
yiHi
t= ι
- ã { « } - + ( [ / ] 5 - ã , 1 / / ] 5 ) { « } - ã { « } , , = ã{η 2
ι
<
Ι
2
' = 2
+
-72{«}r-,+(i/]5-7.l^]5){«}r=Y{^}r
r-i
t = T.
The matrices { F } , , { F } , and [F} 'm (5.2.48) comprise the values for f(y , in Poisson's equation and the boundary conditions. Thus T
r
t
ÊΙ
(5.2.49)
Ê
y) 2
t=\
η
{F), = {/}, + — {w},
/ =2
Γ-1
Λ 1
Λ
i = T,
Ι
Λ
7
where (5.2.50)
IW}, = [ « , , . 0
0·
·•·
0,
M
,] . R
S + L I
Finally, we may write the system of equations in vector form where the elements of the vectors are vectors themselves. Thus we obtain vectors of order ST,
{!/} =
;
i n =
and [/] of order ST with
[G\s [G} =
0
0
'[G]s.
0
[G]
s
0
yields (5.2.51)
( [ / ] - [ / ] - [ G ] ) { I / } = Y{^} >
Ms
ο
383
Finite Difference Solutions in Two Space Dimensions
or [A]{U)
(5.2.52)
=
y{F),
where [P] = yttG]
+ [G] ) T
and
[Q] = y ([K] 2
+
[K] ). T
These different ways of writing the linear combination of the five-point finite difference approximations are equivalent. In our discussion of methods of solution, it may well be, however, that one form illustrates the method better than another. In the next few sections, we analyze those methods that are commonly used for solving the linear (or nonlinear) simultaneous equations. Usually, a convenient classification is direct and indirect (or iterative) methods. The term "direct methods" usually refers to techniques that involve a fixed number of arithmetic operations to reach an answer. On the other hand, indirect methods involve the repetition of certain processes for an unknown number of times until a required accuracy in the answer is achieved. Many of the indirect or iterative methods are well known and go back many years; by contrast there seems to be a recent surge of development in direct methods. Although we concentrate on these two approaches, we wish to point out some alternatives that have been investigated. Jones et al. (1972) considered the use of the method of lines for solving essentially any elliptic PDE. As might be surmised, high accuracy is difficult to achieve because of the need for initial values to carry out the integration. The question of solution stability is also a perplexing problem. A number of authors, such as Angel (1968), Collins and Angel (1971), and Distefano (1971), have used variational ideas and dynamic programming concepts to effect a solution of Laplace's or the biharmonic equation. We shall not consider this approach at this point. The sparseness of the [A] matrix also suggests that techniques which exploit this property may be quite useful. It is apparent that any technique must try to preserve the sparseness, that is, Gaussian elimination in the usual sense will not be viable because, as the algorithm proceeds, the zero elements will be destroyed and replaced with nonzero elements. Thus, instead of storing only a small number of elements, only those which are nonzero, the full matrix must be stored. As a result, special sparse matrix manipulations are required as exemplified by the work of Reid (1971), Tinney and Meyer (1973), Williams (1973), and Segui (1973). Figure 1 of Tinney and Meyer illustrates the almost incredible savings that can be obtained with special sparse techniques as compared to conventional elimination. Of course, iterative methods have the automatic feature that no new nonzero elements are introduced in the [A] matrix. 5.2.6
Direct Methods of Solution
Although there are a number of possible direct methods for solving the block tridiagonal sparse set of equations of interest, we concentrate on the cyclic or o d d - e v e n reduction scheme proposed by the Stanford group of Golub and
Elliptic Partial Differential Equations
384
Hockney. This is an alternative to Gaussian elimination that reduces the system matrix size while retaining the block tridiagonal feature. Papers by Hockney (1965), Buzbee et al. (1970), and Dorr (1970) contain the necessary details of the method as applied to Laplace's or Poisson's equation in various rectangularly shaped domains with a variety of boundary conditions. Martin (1973) has extended the concept to three dimensions, Bauer and Reiss (1972) have used equivalent ideas for the biharmonic block pentadiagonal system, and Fischer et al. (1974) and Sweet (1973) have included a fast Fourier transform on one of the variables. Most recently, Stone (1975) and Lambiotte and Voigt (1975) have detailed the fine points of this cyclic reduction and considered this scheme in the light of parallel processing computers. The specific case of interest here is [/!]{«} = {/>} where, from (5.2.40)(5.2.43),
[A] = ln{[B],
[Ô],
[Â])
with [B]=-[I] and | T ] = t r i { - l , 4, — 1}. [A] is of dimension (ST X ST) and [B] and [T] are square of size ( S X S ) . Obviously, [B] and [7"] commute in that [*9][Γ] = |Τ][2?] and we now assume that the number of blocks, T, is odd. For the Laplace equation with Dirichlet boundary conditions, the set of equatons for a typical line, say, line / ( 2 < t< Ô-1), and the lines immediately preceding and following have the form (5.2.53a)
[B](u),_ +[T]{u),^+[B]{u),
(5.2.53b)
[ * ] { « } , _ , + [T]{u},
(5.2.53c)
[B]{u),
=
2
+ [T]{u},
+
+ [B]{u}, l
+[B]{u)
= {b),
+ l
l
{b),_,
= {b)
+ 2
l
+
l
.
For the grid's first and last lines the equations are [T][u) +[B]{u)
(5.2.54)
l
= {b)
2
l
[B]{u) ^+[T]{u} ={b) .
(5.2.55)
T
T
T
After premultiplying equations (5.2.53a) and (5.2.53c) by [B] and equation (5.2.53b) by — [T], one can add the three results to obtain (5.2.56)
[5] { },_ + (2[/3] -[Γ] ){«}, + [5] {«}, 2
2
Μ
2
2
2
An analogous procedure for lines 1, 2, and 3 produces {2[B] -[T] ){u) +[B) {u}
(5.2.57)
2
2
2
2
=
[Λ]{6} -[7']{6} ι
2
+
4
[Â]{*}3,
+
2
Finite Difference Solutions in Two Space Dimensions
and for equations Ô-2, (5.2.58)
T—\,
IB] {«)t-i
=
and Ô it gives +
2
385
[B]{b]
(2[B] -[T) ){u} 2
2
T-2
[T]{b} _ [B]{b} . T
i+
T
If Γ is odd, as assumed, one can solve separately a block tridiagonal system of equations for the (T —1)/2 even-numbered lines. That system consists of (5.2.57), (5.2.56) for even t, and finally (5.2.58). After computing {«}, for even /, one can obtain the remaining {«}, from the original equations (5.2.53b), (5.2.54), and (5.2.55) which are not coupled to one another. For example. [7"]{«}, = - [ * ] { « } , - | - [ Λ ] { « } ,
+
ι
+
{Μ,
for odd t between 3 and T — 2 inclusive. The term "odd-even reduction" describes the above process well. If the remaining tridiagonal system (5.2.57). (5.2.56) and (5.2.58) has an odd number of line equations (that is, ( Γ — 1 ) / 2 is odd), then the same reduction technique can further uncouple all but ( Γ — 3 ) / 4 of them. In fact, if Τ= 2
λ +
1
-1
where k = integer > 1,
the reduction can continue until, after k steps, only uncoupled line equations remain. This can be solved by Gaussian elimination and a reverse procedure used sequentially to evaluate the other unknowns. All of this can be done in a simple recursive fashion as indicated by Dorr (1970) and Buzbee et al. (1970), where, as we have previously indicated, many further details are available. Notice that this reduction technique uses only k + 1 distinct S X S matrices that require LU decomposition if T — 2 ' — 1. k+
5.2.7
Iterative Concepts
Perhaps the oldest and most established way of solving for the unknowns in {u} is by iterative techniques. This is because Gaussian elimination, in its primary form, requires about (STY/3 arithmetic operations, whereas an iteration requires (ST) arithmetic operations. Thus, if ST is large and the iteration converges to the desired accuracy in a number of iterations much smaller than ST, considerable computing time can be saved. Of course, the newer direct methods detailed in Section 5.2.6 require fewer than (STY/3 operations since they take advantage of spareness and the block tridiagonal nature of the problems we are discussing. 2
Here we consider some of the features of stationary, linear, one-step, or first-degree iteration sequences (other forms will be developed when desirable)
386
Elliptic Partial Differential Equations
with the form
{uY"
(5.2.59)
+ , )
= [G]{uY
n)
+ {c},
«=0,1,2
Given an initial estimate { M } , (5.2.59) uses the square matrix [G] and the 0) vector {c} to generate {u} . In turn, this last vector is used to generate (M} Thus (5.2.59) generates a sequence of vectors {w} , { u } , . . . , based upon { H } \ [G], a n d {c}, which converges to { « } . Superscript η is referred to as the iteration number. T h e term "stationary," as applied to (5.2.59), means that [G] a n d (c) are constants independent of n\ the term linear is obvious from the explicit form of (5.2.59); the term "one-step" or "first-degree" implies (n) ] n 2 (back vectors), are used in the that only {u} a n d not {uf"~ \{uf ^ \... iteration. Of course, we need to specify [G] a n d {c} in (5.2.59) a n d connect the iteration sequence to the problem [Λ]{κ} = {Æ>}, which is to be solved for {»}. Assuming that [A] is nonsingular, d e ^ / l l ^ O , the iteration sequence is said to be consistent with [/<]{«} = {b} iff (if and only if) (0)
( 2 )
(l)
( 0
(2)
(00)
{c} =
(5.2.60)
([l]-[G])[A]- {b}. ]
This can be ascertained by noting that when convergence occurs,
{u)^ = [G](u}^
+ {c}
or
{c}=([/]-[G]){«r\ If { H } is the solution of [A]{u} = {b) (i.e., { « } =[A]~ '{/>}), then (5.2.60) follows. If ( [ / ] - [ ( / ] ) is nonsingular, the iteration sequence is reciprocally consistent iff ( 0 0 )
(5.2.61)
(00)
{b) = [A]([i]-[G]y {c},
det([/]-[G])*0.
l
There are many other iterative sequences that solve for {κ}. Another of interest is (5.2.62)
[GM<
+
MC]<{<MM]{<M*})
or (5.2.63)
{«Y
n
+ l )
= {[l)-[G]; [A]){uY l
n)
+
[G];>{b}
=[A]~'{Z>} with [ C ] , a square nonsingular matrix. It can be seen that { M } yields an identity in (5.2.63). In this form we can connect the iteration to a < 0 0 >
Finite Difference Solutions in Two Space Dimensions
387
"splitting" of [A], a convenient technique that will be used later. Thus let [A] =
(5.2.64)
[N)-[P],
where [N] and [P] are the same size as [A]. It follows that = [P]{u)
[N]{u)
+ {b)
and an iterative sequence is automatically generated by [A/]{«}
l, (n +
= [/']{ }' + {a}, (,
M
«=0,1,2,...
or (5.2.65) if άα[Í]Φ0.
{«} " ' = [ A ] ' [ P ] { } ' ' + [A']" {ft}, <
+
)
f
l
(
)
l
U
«=0,1,2
Comparison with (5.2.59) provides the identities
(5.2.66a)
[] = ! > ]
(5.2.66b)
{c) =
'[/>] [N]- [b}. l
N o w if we call [M] =
[N]-\
then [G] =
(5.2.67a)
= {c) =
(5.2.67b) (5.2.68)
{«F
+
l}
[M]([N]-[A]) [I)-[M)[A] [M]{b}
= ([l]-[M)[A]){uy>
+
[M)[b).
From (5.2.63), (5.2.68), and the definition for [M], one obtains
or [G]i=[N]
= [M]~\
det[/W]^0.
Consistency follows in any form of the iteration sequences. We shall find shortly that the choice of [N] (or [G],) is of special importance.
388
Elliptic Partial Differential Equations
What we have shown to this point is that if the iteration sequence converges, it converges to a unique solution of = {/>}. Now we must turn to the question of what conditions are necessary and sufficient to guarantee that { M } , { K } , . . . will converge for a given starting vector {u}°. Weak converconverge for all {w} , whereas gence requires that the sequence {u}°\[uf \... (strong) convergence occurs when the limit that results is independent of {w} . The latter form is the most desired. Convergence criteria can be defined in a number of ways. As an illustration, define the error vector ( e } such that ( I ,
( 2 )
2
(0)
(0)
{ey
(5.2.69)
= {uY -{u},
n )
,,=0,1,2
n)
where {«} is the correct solution of [A]{u} = {b}. From {uY"
+
i)
= [G}{uY
+ {c}
n)
and {«} = [ G ] { } + {c} W
it follows that
{åΓ " = [ σ ] { å Ρ , +
«=0,1,2
But recursively,
{å}<»=[σ]{å}< > 0
{å} = [«]{å} = [θ] {å} <2)
(5.2.70)
(,)
2
{ å Ρ ^ Π å Γ ,
(0)
«=0,1,2,...,
where {å} is an arbitrary initial error vector. Thus, to assure that \\ð\ _ {å} = {0}, it is sufficient that tim^^G]" = [ 0 ] . This is also necessary <0) if the method is to converge for all {å} . Frequently, this result is quoted in terms of the spectral radius of [G] defined by <0)
(η)
η
αα
(5.2.71)
P([G}) = spectral radius of [ G ] = max
I λ, I,
where the λ, are the eigenvalues of [G]. We now state: A necessary and — sufficient condition for a stationary linear iteration method {u} [G]{uf + {c} to converge for an arbitrary initial approximation {«} is that (n+n
n)
(5.2.72)
<0)
p([G])=
max|\,|
Finite Difference Solutions in Two Space Dimensions
389
It is weakly convergent if (5.2.73)
P([G])<1-
Stated in a different way, we term the matrix [G] convergent if (5.2.74)
lim [ G ] " = [ 0 ] ,
which occurs iff all the eigenvalues of [G] are less than 1 in absolute value. One may summarize by saying that under the conditions 1.
[A] is nonsingular and thus
= {b} has a unique solution,
2.
p([G])< 1 and ( [ / ] - [ ( ? ] ) is nonsingular,
3.
{c}=([/l-[C]X^]-'{*},
the iterative method is consistent and for any initial arbitrary vector {u} the sequence {u}°\{«} ,... converges to the unique solution of [/l]{u} = {/>}. Bounds on the spectral radius or the maximum eigenvalue λ of [G] = ( g , ) can be obtained in a simple way. That is, the following inequalities hold: <0)
<2)
m a j l
^maxl^ Σ
7
\g,k\
l.k
ST
I max I ^ max Σ I&AI ë
'
A = l ST
l
A
m « l
<
m
,
a
*
x
Σ |*,*|·
é— I
The matrix [G] is convergent if any of these inequalities (in the pure < form) leads to p ( [ G ] ) < l . Further information of interest follows by assuming that [G] has the eigenvalues λ , , λ , . . . , λ a n d that the corresponding eigenvectors {x},,{x} ,...,{x} -from 2
2
5 Γ
S7
[ G ] { * } , = A,{*}„
i = l,2
ST
are linearly independent. Then we can expand an arbitrary vector, pick {e} =({H} - { « ) ) , as ( 0 )
( 0 ,
({»} -{"}) = «.{*}. + « 2 Μ 2 + · • · <0>
+«sr{*}S7-
Premultiplication by [G] over and over then yields (5.2.75)
({«}«"' - {«}) = α,λ",{^}, +
«2λ" {^} + · • · + 2
2
"STKSTWST
Elliptic Partial Differential Equations
390
and convergence follows i f f | \ , | < l , / = 1,2,...,ST". We can see that to reduce the amplitude of the error component a {x} in ( { « } - { a } ) by a factor of \0~ , m > 0 , we need to make η iterations, where η is the smallest number such that <0>
l
l
m
Ιλ,ΐ'^ιο-™ or m
-log |A,-| ' l0
In the limit, the largest eigenvalue dominates and we can define the asymptotic rate of convergence Λ ([(7]) as (5-2.76)
*([])=-log. |\ J 0
m
= -log p([C]) 1 0
and (5.2.77)
m
*([G))
Thus the number of iterations required to reduce the iteration error by 1 0 " is inversely proportional to the asymptotic rate of convergence R([G]). An estimate of the error in {uf can be obtained by using m
n)
({«} " -{«}) = -[σ]({«Γ-{·.} "- ) + [σ]({«Γ-{«}) <
)
<
,>
and for ||[G]|| = β, where β is a natural matrix norm < 1,
»{«Γ-("}Íτ^8ΐ|{«Γ-{"} "- «,
,,
The common practice of using 11{H} - {u} "~ "II as a measure of the true error norm, II {a}'"' — {a} II, is conservative if β < 0 . 5 but incorrect otherwise. Another measure of the effectiveness of an iterative method, when compared to a known solution, might be (,,)
max
(
lilt Μ J
ιúìΊ'
where || {e} || is the Euclidean norm of the vector {å} (i.e., ||{å}|| = ( { å } { å } ) ) . There is one special case of interest, namely when [A] is positive definite (i.e., { χ } [ / 1 ] { χ } > 0 for all {x}¥=0). This is loosely written as [A]>0 and Γ
Γ
1 / 2
Finite Difference Solutions in Two Space Dimensions
391
occurs, for example, when [A\ is symmetric with positive eigenvalues or when [A] is a diagonal matrix with positive elements. If [A] is positive definite and the iterative method is consistent, then the method is convergent if [M] = [N) +
[N] -[A] T
is positive definite. Alternatively, if \ M) is positive definite, then the matrix [G] =
[I]-[N]->[A]
is convergent if [A] is positive definite. In other words, when we choose {N] such that [M] is positive definite, it follows that the iteration is convergent assuming that [A] is positive definite. Finally in this section we wish to point out a concept termed acceleration or extrapolation of an iterative process, which allows for faster convergence. This is achieved by developing nonstationary or second-degree iterations, which frequently have advantages over (5.2.59). As an illustration, let us recall (5.2.62). Recognizing that [C], =[JV], (5.2.62)
[Ν]{ γ' α
+ ι
>=
[Ν]{«γ»-{[Ë](αγ">-ì}).
The acceleration procedure attributed to Richardson consists of choosing a set of real parameters (a,,} such that (5.2.62) becomes (5.2.78)
[N]{H} ' l
+ li
[N]{ ) -a {[A]{u) -{b)).
=
M
U
tKi
m+l
Obviously, these {a,,} are chosen in such a way that (5.2.78) converges faster than (5.2.62) or {o„} = {l.O}. Another commonly used approach is called the Chebyshev semiiteration and uses (5.2.63) with the real parameter set {ω,,}: (5.2.63)
{uY"'
u
= (\I}-[N)
+
(5.2.79)
{«}" "--„[([/]-[^]"'[^]){«r , +
+
[A']"{/'}]+(l--J{«} "" (
,)
Both (5.2.78) and (5.2.79) show the nonstationary nature of the iterations, n) ]) while (5.2.79) shows that {uf and {uf"~ are used to obtain A further method due to Aitken will be detailed later. The idea behind these methods is to change the eigenvalues of the iteration matrix to obtain faster convergence. For a value of the parameter set {a,,}, let us pick out one a; then the eigenvalues of [G] are functions of a such that
Elliptic Partial Differential Equations
392
[G(a)] has eigenvalues λ , ( α ) . Obviously, it is necessary first that p([C(a)])=max|Mo)|
/?([G])=-log
l o P
([G]),
a=1.0
or / V ( [ G ( a ) ] ) = - l o g p ( [ G ( a ) j ) = log» l 0
1 0
pu
a #1.0,
it follows that the "best" a will result from p([G(a*)])=minp([G(«)]), a
where a* is the optimal value of ο to minimize the spectral radius or increase the rate of convergence. 5.2.8
Formulation of Point Iterative Methods
With these general comments regarding iterative procedures in hand, we turn in this section to a number of famous point iterative methods. The terminology point refers to the solution of the unknowns w , u , , . . . , w on a point-by-point basis. In subsequent sections we illustrate how to modify or solve for the unknowns on a line-by-line or block-by-block basis. The present methods bear such famous names as Jacobi, Gauss, Seidel, and Richardson. Because there will be a significant number of different iterative methods, we shall use the model problem, the five-point approximation of Laplace's equation, plus Dirichlet boundary conditions on a square, as a comparison vehicle. Thus we can calculate the spectral radius and the rate of convergence for each method as applied to the model problem as evidence of an efficiency comparison. However, we hasten to mention that such comparisons may be misleading for other elliptic PDEs or with other boundary conditions (see Gary, 1967; Dorr, 1969; and Wood, 1971). Nevertheless, we have no alternative unless we wish to tabulate all possible results on all possible problems. 0
s r
At least at the beginning, we develop the material in a variety of different ways to make sure that the reader is aware of the explicit procedures. Proofs will b e kept to a minimum; further details can be found in Young (1971). Finally, we illustrate that although our interest is largely with the linear problem [ Λ ] { Η } = {6}, it is possible to use the same concepts on a nonlinear system of the form (5.2.80)
[F({u})]
= {0}.
Finite Difference Solutions in Two Space Dimensions
393
Let us first return to Figure 5.2 and equation (5.2.6) and consider new five-point arrangements of the interior mesh points. Three possible such arrangements are shown in Figure 5.8 together with a set of arrows corresponding to connecting adjacent points from low to high number. Figure 5.8a corresponds to the ordering of points in Figure 5.2; that in Figure 5.86 corresponds to the ordering of points in Figure 5.7. The latter case (Figure 5.86) is termed the natural order, in which one numbers from left to right on a row starting at the bottom row. Those arrangements for which a closed path yields an equal number of arrows in each direction is termed a consistently ordered set. A more precise definition is given by Young (1971), but it can be seen that Figure 5.8a is not consistently ordered whereas Figure 5.86 and c are consistently ordered. As another example, the numbering of points in Figure 5.9 is consistently ordered but if points 6 and 7 are interchanged, the result is not consistently ordered. We could also say that the matrix [A] made up from a set of variables or mesh points that are or are not consistently ordered is itself a consistently ordered or not consistently ordered matrix. It is seen that if the interior points are arranged in the natural order (Figure 5.86), the [A] matrix is consistently ordered. There are other orderings such as the " r e d - b l a c k " or " e v e n - o d d " ordering and the "ordering by diagonals," which lead to a consistent [A] matrix (see Young, 1971). Of importance is the fact that certain properties of the spectral radius of a matrix can be proven if the [A] matrix is consistently ordered. Further, we mention that if a matrix [A] has "Property A" for certain matrices [/>], then is consistently
(3
12
42
43
to
44
40
44
(o)
(b)
13
44
to
12
(c)
Figure 5.8. Alternative arrangements of mesh points to illustrate consistent and nonconsistent ordering.
Elliptic Partial Differential Equations
394
è
7
47
1
Hi
43
12
44
45
4Ο
46
Figure 5.9. Consistently ordered set of mesh points. Note that if points 6 and 7 are interchanged, the points are not consistently ordered. ordered. A matrix has Property A if, for some matrix [/>],
[PV [A][P)
=\
l
where [£>], and [D] are square diagonal matrices and [K] and [H] are any rectangular or square matrices. With this in mind, we write, as an illustration, the set of four equations in the four unknowns «, u as 2
4
4«,
_
M
4M, -
(5.2.81)
_
4w
4
-
M
M
2
~ "y
l
I
2
u
«4
= ^
".I
= Λ
_
~
4
= k and where we have assumed a natural ordering of the points, k =k Dirichlet boundary conditions. We may write this in compact form as {
[A]{u}
=
2
[b),
where
(5.2.82)
{u} =
:
{*} =
;
M] =
4 -1 - 1 0
- 1 4 0 - 1
-1 0 4 - 1
0 -1 - 1 4
Finite Difference Solutions in Two Space Dimensions
395
or, alternatively, with ι
(5.2.83)
_
1
4
{/>}
;
[A]
_
i
ι
ο
0
1
4
=
0
_ 4
i
"
4
-
4
-
1
4
-
i
-
1
Here we have divided each equation by a,, = 4. The general representation is (5.2.2)
(5.2.84)
\<s<S
«,., = «•(«,+ !., + « , - . . , + « , . , ι + « · \ . , - ι ) . +
for Laplace's equation and (5.2.85)
=
,., + « , _ , . , + « . 4
1 <s
, + «,.,_, + A /,,,), 2
f +
<S
i
(5.2.47)
(5.2.86)
Μ ., = ã , ( ι ι , . , + Μ , - . ) + ã 4
Ι
+ 1
V2
ι
2
1 +
= 2
1 +
ã =
2(*j
( , + «ι .,_,) + ã / . , .
2
1 < 5 < S
τ
1
A?
Ar + *. ) 2
kfk
2
Now we are in a position to define the various explicit iterative methods. The first of these is called Jacobi's method (J) or simultaneous displacement. M ° \ then calculates a In effect, the method assumes initial values for M { new set of κ*,". These new values are now used simultaneously to 2 2 This procedure is continued until convergenerate the next set u\ \...,u4 \ = w is achieved. Each point in { w } " is calcugence to w ,° = M , , . . . , K lated based upon {«/}""; this is carried out interior point by interior p o i n t — t h u s the terminology that the method is a point Jacobi algorithm. 0 )
4
,
0 O )
0)
4
(
4
+ l )
396
Elliptic Partial Differential Equations
To illustrate this scheme in a more succinct fashion, we rewrite (5.2.81) as 4M«"
4u
4u
+ «< '' + 0
N)
,
2
3
= u\" " + u "= n)(
n+
= u\
n+l)
= u
n + l ) 4
+ u
n)
+ b
n)
A
+ w
n) 2
|
+ b
n)
>
A
2
4u\
= M<
+ 1 |
2
y
+ b.
( n)
A
3
Given w ' | , . . . , u , we substitute these values into the right-hand side and u\ . These new values are substituted calculate from the left-hand side u\ into the right-hand side, An equivalent Jacobi iteration on the nonlinear system of (5.2.80), written as 0)
0)
4
l)
l)
f | ( « h « 2 . « 3 .
(5.2.87)
4 )
B
F (u ,u ,u ,u ) l
2
[*({«})] =
3
2
4
{0},
F (K,,K ,U ,I/ ) 3
2
3
4
F (U,,M ,M ,M ) 4
2
3
4
would be F (M ,<
+ ,
1
>,« " ,« " ,M " ) )
)
2
)
3
4
F (u\"\u \u\"\u ) n+,
2
(5.2.88)
n)
2
A
FJ(II{- ,« -»,M >
<
2
F («<"\H "\M 4
2
3
> 3
-
+ I )
,II ->)
= {0},
4
\M " 4
+
,
>)
requiring the solution of a single nonlinear equation for each unknown. In matrix form, the Jacobi iteration can be obtained by letting (a splitting of the [A] matrix) [A]=[D]+[L]+[Ul
(5.2.89)
where [£>] is a diagonal matrix, [L] is a lower triangular matrix, and [tV] an upper triangular matrix. From (5.2.82), as an illustration, 0 (5.2.90)
0 -1 -1 0
[D} =
-1 0
-1 0 0
0 -1 -1 0
0 0 0 -1
0 -1
Finite Difference Solutions in Two Space Dimensions
397
We could have used (5.2.83) just as well with [D] = [/] and the obvious changes in [L] and [{/]. It is apparent that the main diagonal elements are involved in the (w + l)th iteration and thus
= {b)
(lD] + [L)HU]){u} becomes [^]{«r
+([^]+[t/]){«r={M
+ , )
or
(5.2.91)
{ }"
= -[Z)]- ([L] + ii/]){ } " +
!+ , ,
,
W
(
)
M
det[D]#0
[Z)]-{M, ,
[J iteration]
or further
(5.2.92)
{uy
n
+ ])
= [G] {u} " {
+ {c),<
}
}
+ [U]) and {c} =[£>]"'{£}. T h e subscript on [G] where [ G ] , = -[D]~ ([L) and {c} is to indicate that this holds for Jacobi's method. We return to an analysis of [ G ] , shortly. In addition, from (5.2.84) and (5.2.86), we can write Jacobi's method as l
}
(5.2.93)
γ,+«<-_>,.,+«<:»,+«<:>_,]
=i
+
for Laplace's equation with k = k and {
(5.2.94)
2
„<:;·>= ,( (- ),. +«<-»,.,)+ã («ί:> ,+«#,-,)+ã/,., ã
Μ
+
#
2
+
for Poisson's equation with k,¥=k . One might anticipate that Jacobi's method is not as efficient as o n e might + desire. As the points u\" u2n+ . . . are calculated, they are placed in storage until an entire cycle of the iteration is completed. Then they are simultaneously used to replace the "old" values and a new cycle is started. The Gauss-Seidel (GS) method uses the latest computed points as they become available a n d thus the method is frequently called successive displacement (it is also referred to as the Liebmann method). It is now necessary to calculate the points in a nonarbitrary order and we thus calculate in the natural order. 2
398
Elliptic Partial Differential Equations
Returning to (5.2.81), we write 4II{" 4M "
= «i"> + iii"
+ L )
+ l
2
+
l
,
u
4
+ 1
4u< -
6
= < « » + M ' > + f>
>
4«^ > = «{"
(5.2.95)
+
)
= u "
+,,
4
+ , )
2
+ u<"> + /> 4
+ l )
2
3
+ u - " + 6. +
3
4
Alternatively, we could write for Laplace's equation with equal spacing \::"=*(«£>,.,+u«-ν/+«ί:. ,+<, .v)
(5.2.96)
+
u
+
or for Poisson's equation with unequal spacing (5.2.97)
+ «<-_t,) + Yai-i:.*-! + «?,-V) + I
«<", > = +1
+
For the nonlinear system of (5.2.80), there would now be
/ a(«i" r
+ l ,
,« "
+ l )
2
,iii" .««" )=0 )
)
F (lll" >,Mi- ,lli" ,ll ">)=0 + ,
+ l )
+ , )
3
4
F (llj" 4
+ , )
,ll "
+ , )
2
,«i"
+ , )
,«4"
+ l )
)=0.
In matrix form, the Gauss-Seidel iteration, using the splitting of [A] as in (5.2.89), is
[i7]{ r = {/3}
( [ D ] + [L]){ }<'' > + +
1
u
tt
or
Employing linear iterative terminology, we write
{«}
< e + , ,
=[G]G {«r+{c) S
G S
where [G]cs = -([D) (5.2.98)
{c) s G
= ([D] +
+
[L)y [U) l
[L]y {b). l
Finite Difference Solutions in Two Space Dimensions
399
Actually, the Gauss-Seidel method is only slightly better than the Jacobi method (see Section 5.2.9). Yet we can improve the convergence rate by employing the successive overrelaxation (SOR) method in the following way. n+u Given u°'\ we calculate a provisional value u\ with the Gauss-Seidel algorithm, but we d o not retain this value. Rather, we calculate a new value at (n + 1) by means of a relaxation parameter or factor ω according to u\"
(5.2.99)
= u\
+])
+ ù(ΰ\ -
n)
u\ ).
η+η
n)
Next, we compute U " " using the Gauss-Seidel algorithm with « { " u " \ . . . to u " with the relaxation factor. This is continued and then relax u " M " are known and a new cycle is started. Usually, ω is taken until u\" between 0 and 2 (see later), with ω = 1 yielding the Gauss-Seidel method. Returning to (5.2.81), we write, as an illustration, +
+
2
(
3
2
2
+
{
+i)
+ l )
+ I )
4
4u\
= u
n+[)
with the obvious forms for u " tions). Eliminating w , " , . . . , i 7 "
n)
+
+ l >
" = «(ili< -> +
+
2
u " (there are a total of eight equafrom this total set yields 4
+ l )
4
U\"
}
+ l )
2
<
+b
+ uS
n) 2
iM "') 3
+ (l - «)ll<"> +
~ b ,
u[" •>=o>(wr"+iwvo+u -«)« ">+^b +
2
2
(5.2.100)
< " " = « ( i « < " '» + ίιι ">) + ( 1 - « ) « < " > + | f t +
M
+
4
" " = «(><" + " + +
U 4
i«<3-
+
" ) + ( l - «)«<"» +
3
j b , .
Alternatively, we could write for Poisson's equation with unequal spacing
«r, "=y.i-iv..,+«i-v,)+y («ir; .+«i:,-y)+r/,, +
(5.2.101)
2
+
« < y " = « « : > + ω ( « ϊ < " , " - «<:>)=«δ<-;"+(ι +
- )„<«>. ω
400
Elliptic Partial Differential Equations
For the nonlinear system of (5.2.80) these would now be - U < ' > + (1 - - ) u j \ u\«<">, u n +
º¾
U\"
(5.2.102)
F
\
' \ -
+
n l
n
u "
+
2
4
=0
CO /
'» + ( 1
-
-
] U
( 2
" \ M " \ «<,"> 3
= 0 = 0
3
u\ \
u"
n+]
»
+{)
2
— »< > ω
( n + l )
n+1
3
\
ω/
= 0,
where we have eliminated t 7 { , . . . , M ' . In matrix notation, the SOR method can be written as n + , )
, +
, )
4
[D]{u}
(n
+ u
+ [L]{u}
{n
= ω{ΰ} " (
Elimination of {u}
(n+u
+ [U]{u}
+ n
+
1 )
= {b}
(n)
+(1- ){ /}<" . )
ω
Ι
yields
+ ([D} +
»[L])- o{b} >
or (5.2.103)
{ }
< n +
, )
M
= [G]
{ } ' (
S O R
M
, ,
+ {c}
S O R
,...,
[SOR]
where [G]soR
=
([D]+<*[L]y\(l- )[D]-o>[U])
{c)soR
= ([D] +
U
»>[L}r "{b). ]
When ω = 1,
-[^los
[GJSOR { }sOR C
as anticipated.
=
{ }GS' C
Finite Difference Solutions in Two Space Dimensions
401
There are two other variations of the foregoing methods which we wish to briefly mention. These are the overrelaxation Jacobi ( O J ) and Richardson's (OR) methods. In the first case, we write
{«} " <
(5.2.104)
+ ,)
= «([σ]J{«Γ +
{c} ) + ( l - ω ) { « } " <
,
J
= [ G ] { } " + o{c} , (
O J
M
[OJ]
,
t
J
where
[Ο]ο, = « ο [ σ ] , + ( 1 - ω ) [ / 1 In the second case, one starts with iu) " >={«y°>+p{[A]{uy»-(b)) {
+}
with Ñ a parameter, P>0, { }" ,
Μ
+
Ι )
and overrelax to yield
= ({ }'" + )
ω
Μ
,Ρ([/ΐ]{ ) " -{/>})) + (
,
Μ
(1-ω){«} " . (
)
The O R method can be written in the usual form, (5.2.105)
{«} " <
+
I ,
= [ G ] O R { « } " + {C'}OR. (
)
[OR]
where [G]OR
=
[1]+P<»[A]
At this point, it is worth repeating a statement made previously with regard to "splitting" the [A] matrix. Equation ( 5 . 2 . 6 4 ) used (5.2.64)
[A] =
[N]-[P]
as a general type of splitting, whereas in this section we have used the specific form (5.2.89)
[A] = [D] + [L] +
[U].
But there is nothing unique about ( 5 . 2 . 8 9 ) , and other splittings may be used as well. Thus we could have used (5.2.106)
[A] = [D]([L]
+ [I] + [U])
or (5.2.107)
[A] = [D](-[L)
+
[1)-[U]).
402
Elliptic Partial Differential Equations
These splittings have the feature that some of the formulas appear in a simpler form. Using (5.2.107) as an illustration. [C] R = ( [ / ] - « [ i . ] ) " ( ( l - « ) [ / ] + «[i/]) ,
S O
{c}
(5.2.108)
S O R
= ([/]-«[L])
'«{/>}
rather than that given in (5.2.103). All the details on how [ G ] , {C} OR. d the equivalent for the other point iterative methods are obtained d o not change with the type of splitting. Finally in this section we point out a number of variations on the SOR method. Only a qualitative approach will be used here and the interested reader should consult Young (1970, 1971) and Kincaid and Young (1972). For ease in writing and to conform to these references, we select the splitting of [A] of (5.2.108) for the standard SOR method. as in (5.2.107) and the [ C ] The first two variants on the SOR method are the symmetric SOR (SSOR) and the unsymmetric SOR (USSOR). Both are developed in the same way; a single cycle of iteration consists of two passes through the points in the mesh. In the first half of the iteration, the SOR method is used with a relaxation factor ω in a forward sweep through M ' , " ' . M " κ ^ ' ; this generates exactly . In the second the same values as the SOR method, which we call { w } " half of the iteration, the SOR method is used with a relaxation factor of either a n
S O R
S
S O R
(
2
(
+ l / 2 >
to(SSOR) or (o'(USSOR) in a backwards pass through M ' J u'," ; this generates the final values for the cycle u\" K κ " In other words, one uses for the SSOR method (
+ I / 2 )
]
+ ,
+ | )
2
{«r
+
, / 2 ,
= [CW{«} - +([/]-«[L])(
)
, W
M " / , Μ& · 2 )
2
S
+
4 , / 2 )
+ , )
{A>}
and (5.2.109)
{ <
MG]soR>r
+ ,
+
' Mm-"[t/]r "{M /
,
with [G] OR =([/]-«[^])"'((l-«)[/] + «[i/]) S
u
(5.2.110) = ([!]-
[ G W
«[ί/])"'((1"«)[/] +«[/.])
to yield in a single cycle (5.2.1H)
{«Γ^^σ^ο^Γ' +
(2- )([/]- [ί7])- ([/]- [ΐ])- {/3} |
ω
ω
ω
|
ω
[SSOR]
Finite Difference Solutions in Two Space Dimensions
403
with (5.2.112)
[ G J S O R J C ] SORU
[G] SSOR
The first step in the USSOR method is identical, but the second pass is given by <π + 1) .
(« + 1 / 2 )
[GLSOR.o'I"}
[ó]»κ„· = ( [ / ] - « ' [ ί / ] )
( ( i - « ' ) [ / ] + «'[L])
or (5.2.113)
{«/} '' (
= [G]
+ l ,
{ } " ,
U S S O R
)
M
+ (« + «'-ti( )')([/]-u[L])
'«{*}
1
[USSOR] with (5.2.114)
[^IUSSOR —[G
]SORU'(C] SORW-
When ω = ', the USSOR method collapses to the SSOR method. The tiUrd variant on the standard SOR method is the modified SOR (MSOR). It applies when [A] has the form [A] =
[Dh
[H]
[K]
[D}
2
where [£)], and [D] are square diagonal matrices such that (recall Property A) 2
[DUu) (5.2.115)
+ [H](u)
l
2
= {b}
]
[ * ] { « } , + [ * > ] 2 { « } 2 = {A,2
and where { w } , , { M } , { / > } , , { b } are properly sized vectors from {«} and {b}. For example, {«}, might be those points in a red ordering and {u} those in a black ordering where the red-black nomenclature is derived from the classic checkerboard pattern. Associated with {«), will be a relaxation factor ω and with {u} another relaxation factor ω'. Alternatively, (6.2.115) can be written as 2
2
2
2
{ « } , = [ f ] { « } 2 +{^},
(5.2.116)
{ } = [M]{ },-f{c} , W
2
M
2
Elliptic Partial Differential Equations
404
where [M]=-[D) >[Kl
{F} = - [ D ] y [ H } ,
2
{c} =[D] {b} l
2
2
2
Now in the SOR spirit we write { < (5.2.117)
{ <
+
l ,
= ([F](<> + {e}J + (i- ){ }^ w
+
1
w
W ( [ M ] { <
+
V{c} ) 2
u
+ ( l -
w
' ) { < '
or as (5.2.118)
{«}
( « + I) .
:
[G]
M S O
R { M } " +{C}MSOR
where [G] MSOR
[/].
o
[F\
(l-«)[7],
[I]
-ù'[Μ]
a
0
2
(l-«')[/]2
Evaluation of the inverse matrix and subsequent multiplication yields
[GJMSOR
Similarly. { c }
M S O R
ω'(1-ω)[Λ/]
uu'[M][F]
+
(\-u)[l]
2
can be written
( )MSOR C
au'[M]{c}
l
+
u'{c}
2
[ / ] , and [I] are suitably sized identity matrices. When ω = ω', MSOR reduces to the standard SOR method. Two natural extensions can be made to the MSOR method. Although we do not give the equations here, the concepts are straightforward. We could define a symmetric M S O R (SMSOR) such that a forward pass is made with ω and ω' to generate {u} ; then a backwards pass is made with ω, ω' and {u} " to generate { u } . Finally, there is an unsymmetric MSOR (USMSOR) method which uses ω and ω' on a forward sweep for red and black equations, respectively, and then ω' and ω on the backward sweep for the black and red equations, respectively. There are also variants among these two cases (i.e., in SMSOR, use u and ω' and then ω' and ω). 2
(
+ 1 / 2 )
( , , + l)
The main point to be made as a conclusion is that there are many alternative ways to iterate [ Λ ] { Μ } = {<>} or [ F ] { « } = 0 . The choice between
Finite Difference Solutions in Two Space Dimensions
405
them depends on computer storage requirements and computational effort, but even more importantly on the convergence properties. Thus in the next section we establish the spectral radius for the model problem and the rate of convergence for the different algorithms. 5.2.9
Convergence of Point Iteration Methods
Now that the formulations for the point iterative methods are in hand we must analyze the convergence and the rate of convergence for each. Since we have the explicit iteration matrix [G] for each method, the paramount point will be to determine the spectral radius p([G\) and the rate of convergence R[G]. For the overrelaxed methods, the additional parameter ω means that we wish to find the optimum « , ω , such that the spectral radius is minimized. Some of these types of results will be developed for the model problem and some for Poisson's equation in a rectangle with unequal spacing. Proofs will be kept to a minimum, with the work of Young (1971) serving to confirm the results. Let us start the discussion with the simplest case, the Jacobi iteration, for which 0
[σ], = -[ζ>]-'(ì] + [ί/]).
(5.2.92)
For some qualitative information, we first analyze the ( 4 X 4 ) case given by (5.2.82) with the matrices of (5.2.90). We need to find the eigenvalues λ, λ from 4
dtt(-[D]-*([L]
+
[U])-\[l])=0
or, after some manipulations, del([L)
+ [U] +
X[D])=0.
Clearly, [£>]" exists since the diagonal of [A] contains no zeros. For the 4 X 4 case, 1
λ ([L) + [U] + \[D])
=4
0 λ
0
0
λ
and the λ, are | , 1,0,0. Thus the spectral radius, p[G\ = 4, and the iterations will converge. Numerically this means that each iteration will decrease the error by about \ . i
406
Elliptic Partial Differential Equations
In a more general sense we can see that the iteration matrix [G] has the elements }
&Ι = ^ .
«»
=
0
-
[Jacobi]
But from the eigenvalue calculation this implies a diagonally dominant [A] and the Jacobi method converges. Let us now analyze Jacobi's method for a more general problem; this will serve as a model for many cases to come later. We wish to solve the elliptic PDE «„,,., + u . y + Aw = 0 y 2
" ( 0 . yz)=
yi)-
[interior]
2
« ( J i - 0 ) = »{y\,b)=0
[boundary].
Here the region 0 < y
l
2
2
u
s + i . 1 . / + ",.,+1 + «,,/-1 + ( β - ) " . , = ° ; 4
S
a square mesh such and 1 < / < 7 Λ It is fall on the boundary to fi
=
kA 2
with "0.
= I
"5+l.
= i
M
5.0
" .7'+l
=
=
0
J
-
This problem can be solved by separation of variables to yield u
s
, =sina,5SINA / 2
with β —Ë — 2 ( c o s a , + c o s a ) . 2
Obviously, u , vanishes for s = t —0 and for s = S + 1 and t = T+\ a are given by s
2
_ tt|_
ρð 5 + Γ
a
i
_ ~
qm T+l
with p, q integers. Thus there are ST eigenfunctions and values pits
.
qttt
if a, and
Finite Difference Solutions in Two Space Dimension
407
or
^=4-2(0,^+00^), respectively. If we expand β
in powers of k, there results 2n k 4
b
V
4
4
4!
2
a
4
b.
4
4
+
The true value of β for the original problem is n k [p /a + q /b ], and thus 0(k ). the error term is For the problem we are actually interested in, however, it is more appropriate to write Jacobi's method on Laplace's equation for the rectangle in terms of the error {å} . It follows that 2
2
2
2
2
2
4
{ð)
[G],{b) and we want the eigenvalues of [G] . But this is the same as was done above with the result that for }
([GM»} = M „ } , pirsk
>·1~
qirtk
qirk \1 . 21 ,/c o s -pirk 1-, cos —τ— a — -4- RNC — b
— — I RNC
Clearly, the maximum value of ë
ρ
(5.2.119)
.
X = p ( [ G ] ; ) = ^ cos
I
= λ corresponds to ρ — q = 1 or irk α
1-
irk cos -ôb
k, = k = k 2
or for small k, (5.2.120)
ξ1 + Ý1
λ = ρ([σ],)=ι-^
a b For our model problem of a square, a = b = 1, and thus 2
(5.2.121)
X=
2
p([G] )=cosirk i
[Model J]
or, for small k, (5.2.122)
λ = ρ([σ],)-ι-·
rk 2
2
[Model J]
Elliptic Partial Differential Equations
408
If we had carried out the analysis with Α, Φ k , then we would have obtained for small A:, and k . 2
2
(5.2.123)
λ=ρ([σ];)-1-
Γ (^ 2
ã 7
+^ ) ,
A,*A , 2
which becomes (5.2.122) when A, = k = k a n d a = b = \ We can see from (5.2.122) that as a finer mesh spacing is used (i.e., as A gets smaller), λ approaches 1.0; in this case convergence slows down. Now that we have the spectral radius p([G],) for Jacobi's method, we can estimate the rate of convergence R([G] ) a n d the number of iterations, «, required to reduce the error by \0' . From (5.2.76) a n d (5.2.77). 2
3
m
^(iC] ) = -l g p([G] ) Q
J
l 0
J
and m *([G],)' Thus, for o u r model problem where p ( [ G ] j ) - 1 — ττ Α /2. 2
Λ([σ],)--ΐο
8 Ι Ο
2
(Ι-^'.
From the series approximation for log, (l — ν k / 2 ) , we obtain 0
tt k 2
R{[G},)^
2
0.4343-2-
[Model J ]
and ηϊ* (5.2.124)
?r A 0.43432 2
2
6 w A 0.4343^ 2
2
for 10
for 10"
Obviously, the number of iterations is a function of A; thus we provide the Table 5.1 as an illustration. As the mesh size gets smaller the number of iterations goes u p by A " . We can now d o exactly the same for the Gauss-Seidel method using [ G ] = - ( [ Z > ] + [ L ] ) - ' [ t / ] from (5.2.98). Actually, all of this information will 2
G S
409
Finite Difference Solutions in Two Space Dimension TABLE 5.1. Relationship between Number of Iterations Required to Achieve a Specified Accuracy and the Discretization Parameter k
k
η (Number of Iterations) 140 3,500 14,000
1 10 1 50 1 100
280 7,000 28,000
follow from the SOR results with ω = 1. The eigenvalues of [ G ]
G S
come from
det(-([Z)] + [ L ] ) - [ i / ] - \ [ / ] ) = 0 ,
or dct(X[L]
+ X[D] +
[U])=0.
But
(X[L)
+ X[D] + [U]) =
λ
0
0
λ
0 and the del(X[L] + X[D] + [U]) = λ ( λ - \ ) = 0. Thus the eigenvalues of [ C ] are i , 0 , 0 , 0 and the spectral radius is exactly one-half that of Jacobi's method. In a more general sense one can show that Gauss-Seidel converges when [A] is diagonally dominant or positive-definite. If we analyze the more general problem, 0 < y, < a , 0 < y < b, as before the eigenvalue can be shown to be given by 3
G S
2
1 / p-nk X = — cos 4 \ a
V
1
qirk \ cos —.— b
2
and the maximum eigenvalue λ, corresponding to ρ = q = 1, by (5.2.125)
A= ([G] P
) = i(cos^+cos^) , 2
G S
k =k = k t
or for small k. (5.2.126)
X=
P([C]
G S
)-1-I
V^l*2
2
Elliptic Partial Differential Equations
410
For the model problem of a square, a = b = 1 and thus
X=
(5.2.127)
p([G]
G S
) =
COS7TK
[Model G S ]
2
or, for small A \ = p([G]
(5.2.128)
)-1-W K . 2
g s
[Model G S ]
2
If we had carried out the analysis with Α, Φ k , then we would have obtained for small A , and A , 2
2
(5.2.129)
p([G] )-l-2 7T (^ 2
A=
G S
Y
+ -l),
k
^ ^ k
which becomes (5.2.128) when A , = A = A and a = b = 1. Finally, we can calculate the rate of convergence and the number of iterations required to reduce the error by 1 0 . For the model problem, P<[G] )=l + »7 * ,and 2
_ m
2
2
G S
(5.2.130)
/c([G]
G S
)--log
(l-,r A ) 2
1 0
= 0.4343ff A 2
2
[Model G S ]
2
and
0.4343?r 2A| . 2 2
(5.2.131)
n>
^—— 0.4343w A 2
for10"
3
forlO"
6
2
Thus Λ([σ]
(5.2.132)
Ο 5
)-2Λ([0] ) ;
and the Gauss-Seidel rate of convergence is twice that of Jacobi's method. In other words, the number of iterations required to reduce the error is one-half. The apparent conclusion here is never use Jacobi's method if you can use the Gauss-Seidel method. Now we turn to consideration of the SOR iteration. In advance we realize that this is more complicated than the Jacobi or Gauss-Seidel methods because of the extra parameter. Further, from (5.2.132) we see there is a connection between the spectral radii of the Jacobi and Gauss-Seidel methods and because Gauss-Seidel corresponds to SOR with « = 1, there is probably a relation between p ( [ G ] ) and p ( [ G ] ) or p([G]j). T h e iteration matrix is now given by (5.2.103) or (5.2.108), depending on the splitting of [A]. We S O R
G S
Finite Difference Solutions in Two Space Dimension
411
select (5.2.108) since it is simpler: (5.2.108)
[G]soR=([/]- [L]) ((l-«)[/] + [i7]). _ ,
W
The eigenvalues of [ G ]
W
follow from
S O R
tet(([I]-o[L])- ((l- )[l]
+
l
a
o[U])-\[l))=0
or det(to[f7] + ( l - f a ) ) [ / ] - X ( [ / ] - [ L ] ) ) = 0 W
or det(uj[f7] + < o A [ L ] - ( A + w - l ) [ / ] ) = 0 or finally det([l/] +
X[L]-^pi[/])=0.
But for our simple 4 X 4 system this becomes
(5.2.133)
4 4
_
α
1
_ λ
a
λ
0
det 0
4
_
1
0
= «ν-ì)=ο,
a λ
χ
4 4
Ό / ω - When ω for the Gauss-Seidel method. Now we can have that (5.2.134)
á
2=0~(λ + ω-1)
=0
or (5.2.135)
α - ì = 0 - ( λ + ω-1) 2
=VX.
We return to these equations shortly. Because the determinant of a triangular matrix is the product of its diagonal elements, it follows that
deta<,] )=det([/]-«[L])" det((l -ù)[Ι] l
SOR
:(1-ω)
ST
+ù[õ))
Elliptic Partial Differential Equations
412
However, det([G]
S O R
) = \,X 2
·λ
5 Τ
and thus max | λ, | s* 11 —
P([G]SOR)>|1-«|.
Thus the SOR method can converge only if 0 < ù < 2 ; otherwise, the spectral radius is greater than 1. But, of course, this does not yield the optimal value of ω, call it ω , corresponding to 0
(5.2.137)
SOR/-
For our 4 X 4 problem we could try a series of ω , 0 < ω < 2 , to find the optimum ω numerically. We would find the eigenvalues to be real or complex; if complex, however, the modulus would b e less than 1. However, if we tried ω > 2 , the eigenvalues would be complex with modulus greater than 1. As an illustration, if ω = 1.072 is selected, there results λ, = - 0 . 0 7 2 , λ = - 0 . 0 7 2 , λ =0.072, and λ =0.072. Thus p ( [ G ( « = 1 . 0 7 2 ) ] ) = 0 . 0 7 2 , which turns out to b e p([G(to^lson) for the 4 X 4 problem. In a broader sense, we could solve for the eigenvalues of the 0 <>º < a, 0 < y < b, «! = k = k, problem to find 0
2
3
2
4
SOR
2
/ pirk λ = ( 1 - ω ) + | λ ' / I cos \ a 2
,
q-nk - r b I
1- cos
J
.
T h e maximum λ, λ , corresponding \op = q = ] and a = b = 1 satisfies λ = ( 1 - ω ) + ω τ } λλ'' / 2
(5.2.138)
where η = cosirfc. Treating this equation as a quadratic in λ '
(5.2.139)
λ"
If we recognize η =cosirk
2
=
Tj + y L V - 4 ( < j - l ) 2
= p([G]j), then
/ 2
yields
Finite Difference Solutions in Two Space Dimension
413
As would be expected, when ω = 1, (5.2.139) yields X= t = p ([C] ) = p([C] ).
(5.2.141)
2
2
/
J
o s
in (5.2.138) and (5.2.139) with respect to ω N o w let us differentiate λ and λ to obtain, after some manipulation, 1 / 2
3λ'/ _
ηλ'/ -1
2
2
9ω
2λ
, / 2
-ωτ
and 3λ θω At ω = 1 , λ ' = η with η < 1 ; thus as ù increases, λ decreases provided that (λ - ω η / 2 ) > 0 and ω η — 4(ω — 1 ) > 0 , until the denominator vanishes. The slope gets steeper and steeper in this region until λ = ω η / 2 , whereupon /2
ι / 2
2
2
ι / 2
ω η =4(ω-1) 2
2
or
1+ / ΐ ^ η
(ω = ω ) . 0
2
It can be shown that this value of ω corresponds to the minimum value of λ or ω = ω . At this value of ω = w the maximum λ or the spectral radius P ( [ G ( w ) ] ) becomes ι / 2
0
0
0
S O R
(5.2.142)
1=
1-/1^
(ω = ω ) 0
1+ /ΐ-η
2
ι+ /Γ Beyond this value of ω = ω , λ begins to increase. Thus a typical shape for | λ | vs. ω is shown in Figure 5.10. Obviously, this curve is a function of k, and these results follow only for the model problem. It i s i m p o r t a n t to note that slight changes in ω from « may lead to much larger | λ | . However, it is better to move to ω > « than « < ω . The works of Carre (1961), Kulsrud (1961), and Hageman and Kellogg (1968) illustrate numerical procedures for locating ω . 0
0
0
0
0
Elliptic Partial Differential Equations
414
o.o
L
Figure 5.10. Modulus of maximum λ vs. ω for model problem. Let us now summarize part of this discussion (see Young, 1 9 7 1 , for detailed proofs). If [A] is real, symmetric, positive-definite, a n d of block tridiagonal form, then p([G]os)
=
P ([G] ) 2
}
and the optimal ω in the S O R method is given by (5.2.143)
ω = —
p([G]
2
0
1+ [1-p([C]GS)]
The optimal value of ρ([(/(ω = O ) 1 S O R ) ' W
(5.2.144)
G S
)
7
S
p([G("O)]SOR) = « O - > -
F r o m ( 5 . 2 . 1 4 3 ) a n d ( 5 . 2 . 1 4 4 ) , we see that
ω -1 = 0
i +
[ i - p ( [ c ]
g
s
) ]
,
/
2
or (5.2.145)
p([G(« )] B
) =
M R
fpl^f -
1-2,*.
where we have used p ( [ G ] ) = c o s 7 r / k . Thus the rate of convergence of the SOR method with the optimal w is 2
G S
0
(5.2.146)
K OR(«O)= -log oP([G(« )] S
1
0
S O R
)-0.4343(2 T«),
where Rsok.(
{[G{<->o)]sor)
R
?
Finite Difference Solutions in Two Space Dimension
415
and *SOR(" ) R
(S.2.,.47)
2 irk
0
c s
Obviously, the rate of convergence of the optimal SOR is much greater than that for the Gauss-Seidel method. Also, it follows that (5.2.148)
Λ
5 Ο Λ
(ω )-2/2(Λ,)' 0
/ 2
.
Corresponding to 3500 iterations for the Jacobi method (k = 35 and m = 3), the SOR method with an optimal ω requires about 81 iterations. In the case α Φ 1, b Φ 1 but Ac, = k = 1, we can show that 0
2
P([G(
1 / 2
0
^2(^ +
^ )
and /W"o)-0.4343(2 '/ ^2(^ + -l) 2
Y
).
These become (5.2.145) and (5.2.146) when a = b = 1. Finally, we note that we could write R ~ å }
^GS
~2å
*SOR~ /27 · 2
for small å there is a major improvement in R Table 5.2.
over R ,
SOR
}
as illustrated in
TABLE 5.2. Rate of Convergence for Jacobi (/?•), Gauss-Seidel ( R and Successive Overrelaxation ( / ? S O R ( " O ) ) Selected Mesh Discretization f o r
k Convergence *, = å Λ « = 2å 5
^ " O I S O R ^ V ^
_L 10
100
0.05 0.10 0.63
0.0005 0.001 0.063
),
Gs
416
Elliptic Partial Differential Equations
We now present a short analysis of the overrelaxed Jacobi (OJ) and Richardson (OR) methods. The iteration matrices are [G]
(5.2.104)
(\- )[l]
= <->[G], +
0i
U
and
[G] =[l]+ρù[Ë].
(5.2.105)
m
For the OJ method we note, from our manner of splitting [A], that
[ G ] ; = -[i>]" ([^ + [i/]) = [/]-[^]- [^] 1
|
and [C]OJ = " [ G ] J + ( 1 - « ) [ / ] = [ / ] - " [ ^ ]
_ ,
[^].
Thus we wish to select ω such that the largest eigenvalue of [/] — ω [ Æ ) ] ~ ' [ Λ ] , \ , is smaller than the largest eigenvalue of [ / ] — [ £ > ] ~ ' [ Λ ] , \ But since [£>]~'[Λ] has a unit diagonal, it follows directly that O J
1-λ
y
= «(1-λ,)
Ο Ι
or (5.2.149)
λ
= ( 1 - ω ) + ωλ,.
0 1
Thus, for the overrelaxed Jacobi to converge, -K(l-a>) + ioXj
If [A] is symmetric and positive definite, so is [D]~'[>4]; for λ an eigenvalue of [ D ] ~ ' [ i 4 ] , it then follows that \j = X
Qj
l-\
= 1 — ωλ
and |Ι-λ|<1 |1-ωλ|<1 for convergence of Jacobi and overrelaxed Jacobi, respectively. The best choice for ω is that for which 1 — X <*i = — (1 — X « ) . Thus min
m a x
Finite Difference Solutions in Two Space Dimensions
417
and λ
οι=É
1 _
λω | 0
2λ
1-
<1. +1 From (5.2.150) it follows that ù
(5.2.151a)
[OJ]
0
Jmax
and using the relationship A obtain (5.2.151b)
O J
= l-Au> and substituting A
p([G]oj(w ))
:
0
Jmin
2-λ,
min
^ Jmax
J m a x
for X , s
we
[OJ]
Further, it is possible to show that when the Jacobi method converges, the overrelaxed Jacobi always converges for 0 < ω < 1 ; but if Jacobi does not converge, p([G] )> 1, it is still possible to have the overrelaxed Jacobi converge for a proper value of ω. An analysis of the overrelaxed Richardson method follows in much the same way with the emphasis on the eigenvalues of [A], ë. T h e optimum value of ω is given by }
2/P
(5.2.152)
[OR]
max + ^ min
and the spectral radius by
(5.2.153)
P([G(o> )]or)0
^ max
^ min
^ max +
^ min
[OR]
which is independent of P. We could finally turn to an analysis of the SSOR, USSOR, M S O R , . . . methods. However, this goes beyond our durability and we refer the reader to Young (1970, 1971) and Kincaid and Young (1972).
Elliptic Partial Differential Equations
418
5.2.10
Line and Block Iteration Methods
In Section 5.2.9 we detailed a number of point iterative methods. T h e terminology point refers to the fact that we improve only u , and not other points; in other words, the corrections are done point by point b u t no combination of points is improved simultaneously. Thus a number of authors have suggested line-by-line or block-by-block improvements. Here we illustrate the line-by-line concept and indicate the extensions to the block-by-block procedures. Turning to (5.2.47) as an illustration, we see that 3
u
(5.2.47)
+ «,_,,,) - Õ ( Μ , . ,
,-γ,(Η ,.,
s
2
Ί+
+
+ « , . , - • ) = Y/,.„
1
1<J<S
1 < / < 7Λ
W e now consider a line Jacobi [LJ] method as (5.2.154)
«<", » +
Y l
( u ( - t » ) + „<"_+;,) = Y l><"> , + u\%,) +
2
+
+ γ/ „
[LJ]
5 -
a line Gauss-Seidel (LGS) method as
(5.2.155)
«& >-γ,(«&ν. + « ^
[LGS]
+,
and a line successive overrelaxation (LSOR) method as (5.2.156)
+ (1 - « ) [ u<:> - γ,(
u,» \,, +
+ «4"_>,.,)] +
yf ,,.
U
s
[LSOR] Each of these formulations holds for the horizontal lines t = 1,2,..., T. Perhaps an easier visualization of this line-type iteration can be seen from (5.2.48). In this concept, the line Jacobi method would b e (5.2.157)
([/]5-γ [^],){«} Γ -γ {«} " <
, ,
1
- Y 2 { « } , (
, 1
2
+ ( [ / ] 5 - y [ / / ] 5 ) { « } ! ' 1
,
+
I
)
- Y 2 { « } A (
-T2i«} ;-. ([ ]s-T,[«]s){«}r" (
+
= τ{^},.
)
2
/
+
, )
, 1
= y{^}„
= -ri''}7-.
'=1 /=2,...,r-i t = T.
[LJ]
Such a line requires the solution of a set of simultaneous equations but the coefficient matrix ([I] - Y , [ / / ] ) is tridiagonal, involving only three s
S
Finite Difference Solutions in Two Space Dimensions
419
unknowns. Thus we can turn to very efficient techniques for its solution; that is, one solves a tridiagonal system with, on line i = l, three unknowns u ,, " j + u > ° d ί-ι,ι> equivalent system on line r = 2 , and so on. Apparently, even though one uses the fast tridiagonal solution technique, this scheme involves more work than does a point method. In fact, this comparison is similar to what we did in discussing the solution of parabolic P D E via explicit (like point methods) and implicit (like line methods) finite difference approximations. s
a
Μ
t
n
e
n
a
n
W e can now calculate the eigenvalues of each line method, the maximum eigenvalue, and then the rate of convergence. For our model problem as an illustration, the maximum eigenvalue for the line Jacobi method is \ =
p([G] )^\-^k
2
u
and R([G] )-0A343n k . 2
2
u
N o t e that this rate is equal to the point Gauss-Seidel or twice the point Jacobi. In fact, one can show that
RaGU^lRUG},) R(lG] )^2R(lG] ) LGS
LGS
* ( [ C ( « O ) ] L S O R ) ^ K ( [ C ( " ) ] SOR/0
Considering the additional work needed over the point methods, these results suggest a discouragingly small improvement. Some authors, Parter (1959), have suggested solving multiple lines (or blocks) of equations simultaneously. When k lines are solved simultaneously the kLSOR converges J2~k times faster than the point SOR; but the additional work required weighs against the method. N o t e if k — ¾, the entire set of unknowns are solved simultaneously. A compromise seems to be the two-line procedure, in which one uses blocks of small enough size to be manageable. Below we tabulate the maximum eigenvalues for the point, line, and two-line methods; these are given in general form αΦä¥=\, k =£k , from which the simpler cases can be obtained. l
2
point Jacobi
2γ
è 2
line Jacobi
420
Elliptic Partial Differential Equations
A
2LJ
A
A
l
~
-2ð è
SOR
line Gauss-Seidel
-
I*
2LGS
A
point Gauss-Seidel
2
G S ~
LGS
two-line Jacobi
Y2
2
two-line Gauss-Seidel
1
-2^27Γ0'/
~
point SOR
2
1/2 L
-2(1)
LSOR
line SOR
Η 1/2
•2ir|-|
' 2LSOR
iri" .
two-line SOR
2
Y2
There is one interesting feature: If we use the rate of convergence for the SOR and LSOR, we find that 1/2 ^LSOR
R SOR
„
1+
( 2 ) ' ( γ )v ' / 2 / 2
2
and thus /?LSOR ^SOR always. For k = k = k, the case of equal spacing, the increase is V2 as mentioned before. However, the larger k is with respect to A, the better will b e the line convergence. Thus there is a rationale for uneven spacing as long as k > k,. In the recent literature the work of Benson and Evans (1972, 1976) illustrates an application of block S O R to special geometry, that is, a square with a hole in the center or a cylinder that is solid only in an annulus region. There a special ordering of the blocks (peripheral blocks) is used to obtain solutions in a fashion competitive with other methods. Although all of the material discussed above has concentrated o n Laplace's or Poisson's equations, the equivalent analysis can b e developed for the biharmonic equation. Earlier we showed that the two coupled equations >
t
2
2
2
(5.2.32)
>2> 2 V.. „ + r>
„ =
0
421
Finite Difference Solutions in Two Space Dimensions
were equivalent to the biharmonic equation. Ehrlich (1971, 1973, 1974) has exploited this feature to generate SOR, LSOR, and BSOR (block SOR) approaches to (3.2.32). Actually, he uses ω, in the first equation and ω in the second in an SOR context; thus he actually uses a MSOR approach. The results of numerical experiments indicate that the point SOR is probably the best and easiest to use. 2
5.2.11 ADI Methods A method for solving elliptic P D E which is currently in favor with many practitioners is the alternating-direction-implicit (ADI) method of Peaceman, Rachford, and Douglas. In Section 4.9.5 we have given many of the explicit algorithms that fall under the ADI umbrella; the solution of two-dimensional parabolic P D E was our main concern at that time. Now we are looking for long-time or steady-state (u ->0) solutions of the parabolic PDEs which are elliptic in the limit as χ -» oo. We return shortly to the equations of Section 4.9.5 but first let us look at the A D I methods in a different fashion. For proofs of some of the statements to be made Birkhoff, et al. (1962) and Young (1971) should be consulted. Let us split [A] into two matrices (sometimes the split is made into three matrices, but for this discussion this is not necessary) t
[A] = [H] + [V]
(5.2.158) such that 1.
[H]+p[I]
2.
It is convenient to solve
and [K] + p [ / ] are nonsingular for any p > 0 .
([H] + p[I]){u)
(5.2.159)
=
l
([V] + p[l]){u) where {/>},, {b}
2
2
{b)
l
= {b}
2
are any vectors and p > 0 .
Here the term "convenient" is taken to mean "easy to solve on a computer" and thus we shall select [H] and [V] as tridiagonal matrices (or matrices convertible to tridiagonal form) so that either of (5.2.159) may be solved directly. In the Peaceman-Rachford (PR) method, we select a value of p > 0 and write (5.2.160) ([H] + p[l}){uy" (5.2.161)
([v] + p[i]){uy
+ l / 2 )
+u
=
=
{b}-([V]-p[l]){uy
n)
{b)-([H]-p[i]){ y ^ +l
u
Elliptic Partial Differential Equations
422
with the vector { u } being an intermediate vector. Thus (5.2.160) is used with {uf \ the matrices [H] and [V], and ρ to calculate { « } " ; then . In this way the iteration proceeds (5.2.161) is used with ñ to evaluate { « } from {«} , The trick here is the selection of and (5.2.160) uses lines in the y direction only and (5.2.161) uses lines in the y direction only. The convergence properties of this algorithm can be ascertained in the same way as previously. Thus if we define an error vector { e } = { u Y - {«}, where {u}, the correct solution, satisfies ( n + 1 / 2 )
(0)
(
{u}°\... .
( n + l )
+ 1 / 2 )
[H] [V]
x
2
(n)
n )
([H) + [V]){u} = {b},
then it follows that (5.2.162) where
e
( n + l )
= [G]pC ' , (
, )
[G]-,=(iv]+m)^w-m)(w+mv (i l
(5.2.163)
is the iteration matrix. It is necessary for convergence that the spectral radius of [G]- satisfy p
(5.2.164)
p([G],)<1.0.
If [H] and [V] are positive definite, then (5.2.164) holds. We can develop an equivalent definition by writing (5.2.160) and (5.2.161) in matrix form (dropping the superscript for the moment)
[H] + p[I][[V}--p[I) ΪΗ]-ρϊί]ιϊν] + ρ[1)\ 0 ! ([H) + p[l))-\p[l){«}
[{«}]
{«}
{«}]
'{*}
[{!>}
~([y]+i[i}y\p[n-[H])\ ο +
( n i+ V m r
If we wrote this in our usual iterative form {«} " (
+
= [G]p{«}
, )
we can see the definition of [ G ] and {c}. ?
( n )
+ {c},
423
Finite Difference Solutions in Two Space Dimensions
We have written the Peaceman-Rachford method with only o n e p ; that is, the iteration is stationary since ρ = constant. The most efficient way to carry out the iteration is to use a sequence of ρ values, P | , i » , . . . p , for each iteration (a nonstationary iteration). N o w [G]- varies from iteration to iteration, call it [G]^. N o w the error formula, instead of being 2
(5.2.165)
{ }
( n + , )
E
= [G]y
+ 1)
{£} , (0)
B + 1
p = constant
(stationary)
p= p„
(nonstationary)
is given by {åγ"
(5.2.166)
+ η
= "Π [ G ] > } (
\
( 0
+ 1
( = 1
Now we are in a position to ask how to split [A] into [H] and [V] a n d how to select ρ or p , so that the spectral radius is as small as possible and thus the rate of convergence is as rapid as possible. The answer to these questions will now be o u r main concern. We can begin to answer these questions by reflecting on how the Peaceman - R a c h f o r d method actually is developed. Let us begin by writing Jacobi's iteration for the five-point finite difference approximation to Laplace's equation n +
(5.2.93)
u<",
+l )
= i(«i" i. >
+
f
«i"-../ + «ir, . + «'i:, -i) )
+
)
)
+
or as either u
s.i
s,i
U
^
4 ( j + 1,1 ™ i - l . r
¾
M
ι , ι + 1™ i . r - l
α
H
u
s , t
)
or
\"t
u
"
=
u
s " i
+ 4"
[( i+I. f M
~
2
u
\
n
]
+ "J-I. f) + ( "»!*/+
1 ~
2
u
s " i
+
"ί"/- I )] ·
T h e term in brackets involves two second differences evaluated at the n t h iteration. In the Peaceman-Rachford method, new values of one of the second differences is used in the first step, and in the second step the alternate second difference is advanced. Thus we may write, introducing a parameter p , ,/2)
= «<:,+ ρ[{»,ιν.ί -H : +<ev, ) =
2)
+(«< , ,-2 Λ ð
)
(
Μ
+
n l/2)
)
/2)
+ «Λ-,)] (
)
+« ν. -2^; +< )
ί
+
, )
ί
,
) Ι
)]·
424
Elliptic Partial Differential Equations
In the first equation we use the values at η to solve a tridiagonal system for values at η + then the second equation solves a tridiagonal system for values at η +1. We solve along the lines in t h e / , direction and then along the lines in the y direction. The first sweep yields intermediate values, n + {, and the second sweep yields the final values, η +1. From this analysis and (5.2.159), we can see that [H] and I T ] are merely special forms of the second-order differences. F o r our model 4 X 4 problem, as an illustration, 2
[H} =
2 -1 0 0
-1 2 0 0
0 0 2 -1
0 0 -1 2
2 0 -1 0
[VY
0 - 1 0 2 0 - 1 0 2 0 1 0 2
[Ç] is of course tridiagonal and [V] can be made so by simply changing some rows and columns. In the stationary case, ρ = constant, we can determine an optimal p. Because [H] and [V] commute, that is, [H)[V]
=
[V][H],
these matrices possess a common set of eigenvectors {v) given by (for our model problem) with a = b = \,
pq
with eigenvalues
[Ç]{ν}=ì{ν) [V){v)
=
a{v),
where
*=w(*f*)=w(^). These are bounded by c=4sin |^pj; 2
d = 4cos | 2
j ,
where 0 < ^ < ì , α * ζ α \ But if we now return to (5.2.163), we see that the eigenvalues for [G]^ are given by (ì-ρ)(«-ρ) (ì + ρ)(α + ρ) '
Finite Difference Solutions in Two Space Dimensions
425
which we wish to minimize by selecting p. A detailed analysis shows that the optimum ρ = p is given by 0
Po = icd
or . . irk irk . p = 4 sin — cos -γ = 2 sin irk. 0
Thus the spectral radius is given by substituting p into the definition of the eigenvalues of [G]^. 0
(5.2.167)
p([G]-J =
cos
irk T
irk - sin —
irk irk cos — + sin —
1 — unirk 1 + sin irk
(Ρο)·
But from (5.2.145) we see that this is exactly the same as the S O R iteration with an optimal ω . Because of the work involved we would always use the SOR method (if we could find ω ) ; thus we have the motivation to formulate a nonstationary form of the Peaceman-Rachford algorithm because the nonstationary form turns out to be much better than (5.2.167). Let us now return to our ADI formulation of parabolic P D E . In (4.9.33) we defined the PR sequence as 0
0
(4.9.33a) (4.9.33b)
( 1 " f «ί)«? i/ .,., = (1 + f « , * ) « , . , . , +
(ΐ-|*Α)«,
2
+
,.,., = ( ΐ +
|*ί)«?
+1/2.
s.i-
If we move the χ subscript r up as a superscript to indicate iteration number and interpret ρ as a factor p > 0 , then we have an equivalent P e a c e m a n Rachford formulation. Note this ρ is slightly different than the ρ we have used before, but the change is trivial. When (n+I) _ "s.i M
(n) _ s.l
"s.i
and the iteration has converged (n is large), (4.9.33) yields
which is our five-point approximation for the elliptic problem.
426
Elliptic Partial Differential Equations
We may also rewrite (4.9.33) in matrix form. If we define
[H}
2{I]
=
[V]
0
-[/]
-[/]
0
[B]
2[/]
=
[B]
-I']
2[/]
2 -1 -1 2 -1 [Â]-
1 0 where for a square of side 5 = Ô, [H] and [V] are size 5 and [B] and [/] are size 5. We then can write a vector {U} which has all elements u , taken line by line in natural order to yield 2
s
(5.2.168a) (5.2.168b)
[/] + ["] :
[I]
{V)
+ [V]
(n+l/2)
_
M-lv]
{UY
n
+
'
/ 2 )
+
{b}.
Here {b} is the total vector of all boundary values. The comparison to (5.2.160) and (5.2.161) is apparent. If we combine (5.2.168a) and (5.2.168b) by eliminating { U f \ there results an equation of the usual form, + l / 2
{ i / r + ' M c U t / r ' + ic}, where [G] is equivalent to that in (5.2.163), namely (5.2.169) p
[Gh
=
The eigenvalues are given explicitly by [recall (4.9.35)] 2
Ρ 2
• 2 — ~Ρ* 4Ë sin
-
2
2(5 + 1) Ρ
•2
Ρ*
2
_ ι
W
Ë
•
_ y L
2(5 + 1)
2 1™
—h4sin ——^ — + 4snr — ô Ρ 2(5 + l)J[p 2(5 + 1) and p([G]„)
427
Finite Difference Solutions in Two Space Dimensions
We could in the same way use the Douglas-Rachford (DR), (4.9.37), form or the Mitchell-Fairweather (MF), (4.9.40), form. As an illustration, if we select the Mitchell-Fairweather scheme, then from (4.9.40), [l-i(p-i)*,
(4.9.40a)
(4.9.40b)
] « r i / 2 . , , r = [l + i ( P + i ) * J « , . , . / 2
2 1
r
+
= [À + \(Ñ +
[\-Ηρ-1)*ϊ]^ χ.,., +
1)*ϊ]»%νι...,-
The totality of equations equivalent to (5.2.168) is (5.2.170a)
p-i
Ñ+ Ϊ
(n + l / 2 ) .
[/] + [//] {V)
(5.2.170b) 2 P+ l
{V)
P+ 6
P + ;
(n + l / 2 )
•[/]-[//]
+ {*}·
When {Uy = {U} = {U}, (5.2.170) becomes the nine-point finite difference approximation to Laplace's equation. From (4.9.42), which gives the amplification factor for the Mitchell-Fairweather method, we can also develop the spectral radius for [G] . We will not put this down explicitly. However, we do need to point out that when (5.2.170a) and (5.2.170b) are combined to eliminate { l / } " , the result is +u
(n)
p
(
+ l / 2 )
([H) + [V]-i[H)[V]){U)
= {b)
rather than ([H] + [V)){U)
= {b}
as expected. Now let us consider the nonstationary A D I algorithm. In other words, let ρ = p , in the first iteration (η -» η + { -» η + 1); then ρ = ρ , . . . , ρ = p , with m being the number of iterations. We now present some of the features of the approach used by Peaceman and Rachford, which yields a sequence {p,} that is quite good. Other approaches are also possible (see Young, 1971). In (5.2.165) we developed [G\- for the stationary (constant p ) case; for ì an eigenvalue of [H] and a an eigenvalue of [V], the eigenvalue relationship for [G)- is 2
p
[
G
U
u
)
- (
M
+
p)(a + p )
{ u }
'
m
428
Elliptic Partial Differential Equations
with {v} the eigenvector. For the nonstationary case {p,}, it also follows that
ι
Π =1
(ì-ρ,)(α-ρ,)
[G] , {v) =
,5|
P
(ì + ρ , ) ( α + ρ , )
{"}·
For a given value of m we now wish to minimize the maximum absolute value of this compound eigenvalue. Assuming that 0 < c * ^ , a < a \ that there are lower and upper bounds on ì and a, and that these bounds are the same, we can use
Π
max
' + Ρ,
For our model problem
. . irk
c - 4sin
—
2
d - 4 cos
2
^ .
Now, given a number /} in the range 0 < / i < 1, it can be shown that
Π1 1
max
1
T
P,
provided that the integer m satisfies
1+βÉ
(5.2.171)
~d
and provided that the m iteration parameters are given by 2f-I
P.=
d(
/ = l,2,...,w.
\+β
But from the equality in (5.2.171), we find that (5.2.172)
c
W2,-l)/2m
ι = 1,2,...,m.
These are the Peaceman-Rachford parameters. Note that if m = 1 (i.e., one iteration), (5.2.172) yields Pi
-
jcd,
which, as we noted previously, is the best stationary value of p.
Finite Difference Solutions in Two Space Dimensions
429
For this set of parameters the spectral radius of Π™ , [ ( / ] - is given by
II[G]
l/2m
l-(c/d) f
l+
(c/dY
/2m
For our model problem the Peaceman-Rachford parameters are p, = 4 cos
ttki
Tirk\ '(2
n/2m
and
Π
1[Gh,
tan =* 1 - 4
irk\* i vk\ 1 + tan^r\ ι I
/n
i= l
TTA:\ / |
The rate of convergence is thus proportional to k , which for m > 1 is much better than the optimum SOR. It is also possible to find the best value of m, in the sense that one maximizes the rate of convergence. If we define an average rate of convergence ] / m
avg
m
or-
and use (5.2.171) with the equality, there results
D
—
T h e choice of β that maximizes fl is determined by differentiation a n d setting the derivative equal to zero. This yields avg
i ^ I o g { ^ | = /HoB/l, whose solution is β = v 2 — 1 =0.414. T h e solution of (5.2.171) as an equality for a given value of m yields /
l/2m
(5.2.173)
\+
{c/d)
l/2m
430
Elliptic Partial Differential Equations
In summary, one estimates c and d a n d then finds the smallest integer m in (5.2.173); finally, the sequence p , , p , . . . , p is generated from (5.2.172). Actually, many authors, including Birkhoff et al. (1962), have shown that the A D I methods work better than predicted. It is important to point out that these A D I methods get better as k decreases. Thus for large k the optimum SOR method is probably superior; as k -»0, however, the rate of convergence of the A D I methods change only slightly, whereas that for the optimum SOR goes down significantly. For high-accuracy solutions the A D I methods seem to have a significant advantage. The method can be applied to different regions by patching or by using the Schwarz alternating procedure (see Stoutemyer, 1973) a n d with other types of boundary conditions (see Keast and Mitchell, 1967). The biharmonic equation can be analyzed in the same manner (see Mitchell a n d Fairweather, 1964). Moreover, L O D methods (Chapter 4), as applied to parabolic P D E , offer an equivalent avenue of solution (see Fairweather et al., 1967; Gourlay and Mitchell, 1969). There a r e even computer programs available (Saylor and Sebastian, 1973) for calculating the optimum set of iteration parameters {p }. Finally, we wish t o mention the strongly implicit method (SIP) of Stone (1968) and Weinstein et al. (1969), which was discussed in Chapter 4. This method, which applies equally well to rectangular or nonrectangular regions, does n o t need an optimum (or nearly optimum) set of iteration parameters, and can b e applied to higher-order elliptic P D E (see Jacobs, 1973), holds considerable promise for many practical problems. 2
m
(
5.2.12
Acceleration and Semi-iterative Overlays
In this section we consider briefly some methods that are overlays on the basic iteration procedures already developed. These methods use the basic iteration 2 procedures to generate values for {u}°\ {uf \... a n d then accelerate or extrapolate the results to speed up the convergence. Usually, the new iterations are nonstationary. In the following discussion we follow to some extent the superb work by Gourlay (1968, 1970). Let us first turn to acceleration concepts that go under the name of Richardson processes. Some of the concepts have already been mentioned. W e begin by summarizing the overrelaxed Jacobi iteration (OJ) a n d Richardson iteration (OR). The overrelaxed Jacobi process is given by [see (5.2.104)] { u } ' - » = «([σΐ,ί··}*-» + ( c } , ) + ( i - «){«>«-> + ,
= [ G ] { « } ' " + {c}o , <
O J
J
where [ó]
Ο Ι
=
ù
[ ó ] , + ( ι - « ) [ / ΐ = [ / ] -
[G], = -[Dr ([L] l
+ [U]) =
[ ι 9 ] - ì ] ,
ù
[l)-[Dr [A]. l
Finite Difference Solutions in Two Space Dimensions
431
The optimum value of ω is given by 0
2 2-m([G] )-M([G] ) J
J
where m([G],) and M([G]j) are the minimum and maximum eigenvalues of [G] , respectively, and the spectral radius is given by }
p ( [ G U « o ) ) -
2
_
m
(
[
G
]
j
)
_
M
(
[
(
?
]
j
)
-
This expression was given earlier as (5.2.151). In the same sense but using (5.2.105), (5.2.152), and (5.2.153), we find for the overrelaxed Richardson process that {< "= +
w
({ur+/'([^]{
= []OR{«}
( , , )
M
r-{/3}))+(i- o){ t
U
r
+ {C}OR.
with [G]OR = [ / ]
ω„ -
0
(\
P
{
[
G
G {
( U
u
°
]
) )
]
+
-2/Ñ M([A))
+
m([A})
.^([A])~m([A]) ™ -MiUU + miiA})' V
}
where Þ ( [ Λ ] ) and M ( [ / 4 ] ) are the minimum and maximum eigenvalues of [A], Each process uses a basic iteration and introduces a single parameter ( ω or ω ) to increase the rate of convergence or decrease the spectral radius. N o w we wish to introduce a nonstationary set of parameters ω , , ω , . . . , ω „ , . Before we d o this, however, we should also note that a more general formulation can be used. For any stationary iterative process we can write (5.2.62) 0
2
[^]{< =[^]{«Γ-([^]{«Γ-{*}) +,)
or = {[']-[Í]- [Λ]){Ì) 1
Ì
= [ G ] { « r + {c}
+
[Í]-\Â)
432
Elliptic Partial Differential Equations
and identify [N) = [D]
Jacobi
[N] = [D] + [L]
Gauss-Seidel
[N]=-([D]+u>[L])
SOR + [U]. The Richardson acceleration is then
with the splitting [A]=[D]+[L] given by [^]{«} " <
+
, )
=
[iV]{«r-«; ([>4]{«} " -{*}) ,
,
+1
or. after some manipulation, as {«} " (
+ , ,
= ([/]-«.
[^]-'[><]){·ι} " + « ,
+
1
[ΛΓ]- {6}. ,
,
1 Ι + Ι
But we recognize that for ω = ω this is the overrelaxed Jacobi process. In fact, if [ i V ] " ' [ / i ] has property R as defined by Gourlay,* in that all the eigenvalues of [N]~~ [A] are positive and real, and the minimum and maximum or m „ Λ/,, eigenvalues for [ΛΤΓ'[Λ] are m f l J V p ' M ] ) and M([N]~ [A]), respectively, and for [I]-[N]''[Λ] are m([I]-[N]- [A]), Μ([Ι]-[Ν] [Á]) or m , M , respectively, then m — \ — M and m = l — M , . For [ / ] ω [ Λ Τ ' Μ ] , we have m ( [ / ] - ù [ Ν ] ~ [ A ] ) , M([l\-ù[Ν)~ [Á)) or w , Λ/ where it can be shown that η + 1
l
l
l
2
2
i
[
2
2
l
χ
3
M 2— m — M MI
3
—
2
2
2
3 2
The reader may wish to connect the overrelaxed Jacobi and overrelaxed Richardson processes. For ω,, ω , . . . , ω „ , , Young (1954) has shown that the optimum choice of these parameters is given by 2
ω„ = 2 [ ( ™ , + Λ / , ) - ( Λ / , - m , ) / , ] " ' ,
« = 1,2
m
where t„ - cos (2« — 1)·=^- , L 2«i J "
« = l,2,...,«i
'Property R implies that all eigenvalues of [ Ν ] '[A] arc greater than zero. Hence the eigenvalue of [l]-[N]~*[A] lies between - 1 and + 1 . provided that Af, < 2 .
Finite Difference Solutions in Two Space Dimensions
433
are the zeros of the « th Chebyshev polynomial. For m parameters the convergence is faster than the constant parameter case, but round-off problems may cause difficulties in an actual calculation. If the original iteration does not have property R (the SOR method has complex eigenvalues for ω > 1 ) , then n o acceleration of the basic iteration may result. The Chebyshev semi-iterative procedure represents a slightly different process in which
{«Γ
(5.2.174)
+ ,,
=
(([/]-[ ν]- ì]){«} " + [ ν]- {Λ}) ,
ω(1
<
,
,
ί
+ (1-
ω η
ί
){ }
, π
Μ
-",
« = 1,2
Letting Μ be the maximum eigenvalue of ω , , ω , . . . is determined by
—
[CS] '[/!)), the sequence
2
ω = 1,
(5.2.175)
0
ω
ω
»+ι-('
, =
(ΐ-^-
4—J
·
«-1,2
These parameters are based also on the use of Chebyshev polynomials (see Young, 1971). Note that (5.2.174) uses a second-degree process since { κ } " is calculated not only from { « } but also from {u} "~ The spectral radius of (5.2.174) is given by (
+ | )
{
(n)
p([G(«)]cs) = ( « - l )
κ/2
l+(«-l)"j'
where
1+ /1-Λ/
2
which is the limit of (5.2.175). This can be applied to any of the basic iterations and it can be shown to converge faster than the basic methods. As an illustration, Gourlay (1968, 1970) applies both Richardson acceleration and the Chebyshev semi-iterative method to ADI algorithms. Writing the PR A D I method as (/5 [/] + [//]){W " ,
+
, / 2 ,
n
W]
+ [V}){uY"
+ l)
= (^[/]-[^]){«}
= (P [l]-[H}){uY * n
n
< n ,
,/2)
+ {M
+ {b)
434
Elliptic Partial Differential Equations
and then eliminating { H } " (
+ 1 / 2 )
, there results, after some manipulation,
Χ(()8 [/]-[//])(/3 [/]-[Κ]){«Γ+2^}). η
η
T h e Chebyshev semi-iteration then becomes {«}"'
+ ,)
= ([C] { r+2 8„( 8 [/] + W(I
B
U
j
J
n
[K]r(^[/] + ,
[//])- {A}) 1
+ (1-
M
where the ω„ are generated from (5.2.175) and [G]„ is the iteration matrix for the original A D I process defined in (5.2.163). As shown by Gourlay, t h e increase in convergence rate with almost no extra work over that of the original process is one or more orders of magnitude. We have, of course, only scratched the surface on this analysis. The work of Hadjidimos (1968, 1970), Evans (1963), Delia Torre and Kinsner (1973), and Iordanidis (1971) should be consulted for many further details.
S3
FINITE DIFFERENCE S O L U T I O N S IN THREE SPACE DIMENSIONS
In this section we turn to elliptic P D E s that involve three (or more if desired) space variables. Our discussion will b e relatively brief because the analysis essentially follows that given in Section 5.2 and in Chapter 4 o n parabolic PDEs. Using three independent variables, we can write the equivalent of Laplace's equation as ι*
*
, \
(5.3.1)
A 9 «, 3 «. 3 « Δ Μ = — - + — - + — - = 0, 2
2
2
dyf dy* dy}
which holds in the interior region G, y y , y-j eG, and Dirichlet boundary conditions on the boundary 3G. Taking the model problem as a cube of side length 1.0, these boundary conditions can be written as v
2
«=Λ( ·Λ.Λ). 1
(on3G)
Finite Difference Solutions in Three Space Dimensions
435
(5.3.2) «4(^1»!.
« =
«=«5(^ι.Λ.°).
(on9C)
Alternative boundary conditions are, of course, possible. 5.3.1
Finite Difference Approximations
Finite difference approximations of (5.3.1) can be obtained in much the same way as was done in the two-space variable case. Thus if we use k , k , AV as increments in the y , y , y direction with corresponding subscripts s, t, I, a direct application of the usual concepts can be made, li k = k = k = k, t
t
2
t
_
U
s + \ . , . l -
2
u
s . , , l +
k 4. s-'-l+\ U
2
3
}
~
2
u s
-l,,,l
,
U
s .
t
+
\ J -
2
" s . , , l +
3
",,,-!./
k
2
u
2
2
s . 1.1 +
U
s,i,l-\
_
q
or (5.3.3)
",.,./= s[( « 1 . , . / + " , - 1 . , . / ) + ( « , . , + 1 . / + (",.,./+!
+"*.,./-:)]
«Λ.,-1./)
+
Λ +
(1^ = k = kj = k). 2
Analogous to the standard five-point finite-difference approximation in two space variables, (5.2.2), we now have a seven-point approximation. In the same manner, as we developed the nine-point approximation for two space variables, (5.2.24), we can now develop a 19-point approximation in three space variables. Obviously, (5.3.3) is 0(k ), while the 19-point approximation is more accurate, 0(k ). We will not explicitly present this approximation. If k,¥= k ¥= k , then we can use the Taylor series expansion concept to develop the necessary finite difference approximation. Using the grid arrangement of Figure 5.11 and the form (note that seven points are involved) 2
4
2
3
., + u„ „ + >I->1
.»2>2
u „ = ¾. a,u,. M.I 3
'
1=0
'
Taylor series expansions in three variables and consolidation of terms leads to a set of algebraic equations for a a . Solving for the a, and substituting back, one obtains 0
6
(5.3.4) 2 | ^ - r
i,/c5 K
+ ^ - ^
s ks k 3
2
+ - ^ - r |
s ks k J
A
s
6
M
n 0
=
s^is^
+ s k)
1
2
+ s k(s k + s k) 2
2
2
+ s k(s
,K+S K)
A
4
2
+ S K(J K 6
5
+s k) 6
When J, = J - " · - 6 1> (5-3.4) becomes equivalent to (5.3.3). Perhaps the best way to present the finite difference approximation is in the form -
s
=
2
/
3
3
3
(=1
/=l
(=1
(5.3.5)
\
-,h.h >
U
=0
where «,„, , represents u ,,. For a — b = 0 , this yields the seven-point, 3
s
0(k ) 2
Finite Difference Solutions in Three Space Dimensions
form; for a = £ and b = 0 , the 19-point, 0(k ) a 27-point, 0(k ) form.
437
form; and for a = | and b = 35,
A
6
5.3.2
Iteration Concepts
It would seem obvious that (5.3.3) or (5.3.4) could be handled in exactly the same manner as the model two-space-variable problem. Thus we can order the points on they y plane and then proceed, plane by plane, in the j> direction to yield a set of linear algebraic equations of the form u
2
3
= {b),
U]{u)
where {b} comes from the boundary conditions. Also, we may apply the Jacobi, Gauss-Seidel, SOR, and other methods on a point basis in terms of the iteration matrix [G]. Even the line or block iteration schemes can be developed in much the same way as was done for the two-space-variable case. Thus we see no point in writing down all these forms. Note, however, that the dimension of [A] is no longer S but rather S . Because the A D I methods may be the best approach to these problems, particularly when high accuracy is desired, we spend some time discussing this technique. 2
3
5.3.3
ADI Methods
The basic principles of the A D I method in the three-space-variable case can be developed easily using the Peaceman-Rachford (PR) concepts. However, as was pointed out in our discussion of parabolic equations, the extension of the Peaceman-Rachford method from two to three space variables yields an amplification factor (now the spectral radius) no longer bounded by 1.0. Thus this approach is developed only as a conceptual model. For a working algorithm, we must turn to such methods as Douglas-Rachford ( D R ) , Douglas (D), or others. In the two-space-variable case, we split the A matrix into [A) = [H] + [V] In order to form
( [ # ] + ? [ / ] ) { « } . = {*}> ([Π+Ρ~[/]){«} = { * } 2 2
so that tridiagonal matrices could be generated. Then one can define a P R sequence by (5.3.6a)
[H]{u} "
(5.3.6b)
[.V]{«} "
(
(
+
+
] / 2 )
, / 2 )
+ [V]{uy ^-p{{u} )
(n
+ l/2)
+ [K]{«} - » = - p ( { « } (
+
l
(
+
, ,
-{uY )
+ {b}
n)
-{«}<-
+
|
/ ' ) + {6}. 2
438
Elliptic Partial Differential Equations
First we raise the exponent on {«} in the [H] product term and then in the [V] product term; at the same time we modify the right-hand side in the obvious manner. Rearranging (5.3.6), we can develop
([//]+p[/]){«}
([y] + - [i))n
={6}-([K]-p[/]){«r =
(n+n
P
{b)-([H}-- [i]){uy \ +W2
P
which is (5.2.160) and (5.2.161). In exactly the same way we split the [A] matrix into [A] = [H] + [V] + [T] for the three-space-variable case. The basic concept is to form
( [ " ] - [ / ] ) { « } = (>} ([v]-[n){u)={b) = {b}
([T]-[l)){u}
and define a Peaceman-Rachford sequence by (5.3.7a)
[H]{u)* + [V}(uY
n)
+ [T]{uy
n)
= -p{{u)*-{ Y )
+ {b}
= -p({u}**-{u)*)
+ {b}
n)
u
(5.3.7b)
[H}{u)* + [V]{u}** + [T]{uY
n)
(5.3.7c)
[H}{uy + [V}{u)** + [T]{uY
n
+ l)
=
-p{{uY"
+ u
-{u}**)
+ {b}.
Note how we increment each {M} one by one. Rearrangement of (5.3.7) yields (5.3.8a) (5.3.8b) (5.3.8c)
([H] + p[I]){u}*-{b}-([y] (lV] + p-[l]){u}** ([T] + p[I)){uY
n
+ l)
= =
+
[T]-p[l)){uY
n)
{b}-([H]-p[l]){u}*-[T}{uY
n)
{b)-([Y]-p[l}){u}**-[H]{u}*.
Finite Difference Solutions in Three Space Dimensions
439
The Douglas-Rachford (DR) differs from Peaceman-Rachford (PR) only in the way the right-hand side is structured. It uses, in contrast to (5.3.7), (5.3.9a)
lH][»)*
+ lV]{u}
(5.3.9b)
[H){ )*
+ [V){u)^
(5.3.9c)
U
+ [T){u)
M
= -p({u}*-{u} )
M
= - {{u}**-{uY )
+ [T]{uY
n)
[ / / ] { « } * + [ K ] { H } * * + [T-]{«} ' ,
+ {b)
M
+ {b)
n)
P
,+
1)
= -p({«} " (
+
-{«} ' )-r{*}
l ,
(
, )
or, if we define, {/J}
=
( n )
[//]{«} ' -r-[^]{«) ' -f-[r]{«} '' , ( ,)
, ,)
(
)
then (5.3.9) yields (5.3.10a)
[ / / ] ( { « } * - {uY )+
(5.3.10b) (5.3.10c)
{*}<"> = -?({«}·-
n)
[K]({«}*'-{«}
[T)(iuY'
+
< n )
{«} ) (B,
+ (*)
)=-p({«}"-{«}*)
»-iu)™)=-p({u}«
»-{*}··).
+
Douglas defined the scheme (D) (5.3.11a)
H//]({«}»+{«} V[^]{< l ]{"} ( n
(5.3.11b)
) +
r
< n )
= -p({«}*-{«}
< , , )
Η^]({«}* + {«} ) + ϋ^]({«}** + ί«} " ) + [ 7 ' ] { « } <Λ)
(
)
)+{M
<,,>
= - ñ ( { « } · · - { « Γ ) + {*} (5.3.11c)
Η//]({«}· + {«} ) + Η^]((«}** {«} ' ) + (η)
= -ñ({«Γ
+
,
+
)
-{«Γ) +
( ,)
Η7']({«}' + {«}") ,+(,)
()
{Μ·
Rearrangement of (5.3.10) now yields (5.3.12a) (5.3.12b)
(5.3.12c)
([/Õ] + ñ [ / ] ) { « } * = {Λ} - ( [ Π + [Γ] -ρ[/]){«} "> (
([η
+ ÑΪ/]){«}**=Ñν]{"}· + [^]{«}^
([r]-rp[/]){«}<" > = p [ / ] { « } * * + +
l
[r]{ }
U
[DR]
440
Elliptic Partial Differential Equations
and for (5.3.11) (5.3.13a)
([/Y] + 2 i 5 [ / ] ) { } . = 2 { / j } - ( 2 [ F ] + 2 [ Γ ] + [ / / ] - 2 p [ / ] ) ( « } ' (
, ,
H
(5.3.13b) ([K] + 2 p [ / ] ) { u } * * = 2 { f c } - [ / / ] { } ' - ( 2 [ r ] + [//] + [ K ] - 2 i 5 [ / ] ) { } ' (
M
([T] + 2p[l]){uY
(5.3.13c)
-([Η)
n
+ l)
, )
U
=
2{b)-[H]{u}*-[V]{u)** [Ô]-2ρ[ΐ}){"Û .
+ [í] +
η)
Obviously, there is a single composite for each of these split arrangements. Using the usual A D I parameters of Chapter 4, ρ = 1 / ρ , we can eliminate u* and u** in (5.3.12) and (5.3.13) to yield
(m [//])(m [F])(I^ + [r]){ }"'
(5.3.14)
+
+
M
+
"
m )(m )(m + [ /]
- ([Η] ë
2
+ [ K ]
+ [ν] +
+ m
[DR]
[Ô])
Ñ
2U1
(5.3.15)
, Ñ
+
[
Η])[ø [í})(ø
+
+
--Ë[Η]
+
[Ô])^Û"
+
»
[D]
[í]+[ô])
If { u } = {«}'"' = {«}, then both composites become equal to [/*]{«} = {b}. U p to this point we have merely said that we split [A] into [A] = [//]+[V] + [T]. T o show how this is done explicitly, we consider the seven-point finite difference approximation (5.3.3) with k = k = k = k and with S internal points in all three directions; thus there are S total internal points. We define < n + l )
{
2
3
3
[B] [V] =
[H} = [B]
21/],
-[/],
-[/],
2[7],
0 [/],
2[/],
Finite Element Methods for Two Space Dimensions
[T] =
2[/]
"[/]
-[/]
2[7]
441
-1 2
-I
[B) =
0
[/]
2[I]
-1 2
-1
where [ / / ] , [V], [T] are S X S\ [ / ] , is S X S, [/] is S X S , and [B] is S X S. Obviously, we may write either (5.3.14) or (5.3.15) in the usual form 3
2
{«}
( n + , ,
2
=[G]{«r+{<-}.
Then we can show that [Ç], [V], [T] commute in pairs and have a common set of eigenvalues. Finally, the eigenvalues can be determined and the convergence of [G] established in both the D R and D forms. Further details plus alternative forms can be found in Fairweather et al. (1967) and Douglas (1962). In particular, Fairweather et al. show that not all possible A D I forms become the solution of Laplace's equation when { w } " = {u) — { M } ; also they develop iteration parameters, p , , p , . . . , p for increasing the rate of convergence. Hadjidimos (1971) has also presented an extrapolated version which includes the extrapolation parameter ω as well as the . iteration parameters ρ p (
+ l )
(n)
2
m
m
5.4
FINITE ELEMENT M E T H O D S FOR TWO SPACE DIMENSIONS
In preceding sections of this chapter we have considered the approximation of specific forms of the general elliptic P D E defined by Au^.+2Bu .+C -S( ,y ,u,u u )
(5.1.1)
ri>
y2r
yi
2
yr
rt
= 0,
where B — AC<0 and the coefficients A, Â and C may be functions of y , y and u. The forms of (5.1.1) most often encountered in science and engineering, the Laplace and Poisson equations, are derived from their parabolic counterparts of Chapter 4 by taking the limit as time goes to infinity, 2
x
2
ê™ [ 0 ( j w , * ) + e ( « ) ] = e ( u ) = o .
χ — ac
2
Thus the majority of the material presented in Chapter 4 for the solution of parabolic P D E s using finite element methods is directly transferable to elliptic PDEs; one simply deletes the time approximation from the formulation. Because of the similarity in approximating the commonly encountered parabolic and elliptic equations defined in two space dimensions, we outline only briefly the finite element method as applied to second-order elliptic P D E . We
442
Elliptic Partial Differential Equations
prefer to utilize the finite element section of this chapter to discuss other aspects of finite element simulation which, although perhaps applicable to other types of PDEs, are most easily illustrated using elliptic equations. We introduce the discussion of the finite element approximation of elliptic P D E through an analysis of Poisson's equation in two space dimensions, ^
(5-1.4)
u +u ,=-f( ,y ).
=
VfV
yi
V2}
2
Recall from our earlier discussions of finite element theory that we must initially generate approximating equations from which a set of algebraic equations is derived. Of the several mechanisms available to obtain these approximating equations, we have employed the Galerkin and collocation methods. These methods can be classified as weighted residual methods in accord with the theoretical development of Chapter 2. 5.4.1
Galerkin Approximation
Let us first formulate a finite element approximation using Galerkin's method (see Chapter 2). We define an approximation «(>>,, y ) to the solution u(y , y) in terms of a finite series of undetermined coefficients U and basis functions 2
(5-4.1)
«(^Ι.ë)-«(>º.ë)=
Σ
x
2
^Φ (^Ι.ë)· ;
; =ι The basis functions are required, in general, to satisfy the essential boundary conditions imposed on our governing P D E and certain additional constraints necessary to assure convergence of the numerical scheme. A necessary condition for the approximation of a second-order P D E such as (5.1.4) is the continuity of $j(y\,y ) in the domain of interest. In other words, <j>j(y , y ) must belong to the C° class of functions as a minimum. This does not impose any difficulty inasmuch as all of the basis functions we have considered are at least in C ° . Moreover, the essential boundary conditions are also satisfied by the bases introduced in Chapters 2 and 3. The application of Galerkin's method is straightforward for Poisson's equation. Because ΰ is an approximation to M, the substitution of « into (5.1.4) will yield a residual R, 2
(5.4.2)
t
U, + f{ ,y ) yi
2
=
R(y y ). u
2
This residual can be minimized in a global sense through the relationship (5.4.3)
< Λ ( > ' „ Λ ) . Φ , ( > ' . . Λ ) > = 0,
» = 1,2,...,/V,
2
443
Finite Element Methods for Two Space Dimensions
where <·,*> = (
(){*)da.
A
J
One can interpret (5.4.3) in a number of ways. From the weighted residual concept one can consider (5.4.3) as a mechanism to minimize the weighted average residual using the basis functions as weighting functions. One can also consider (5.4.3) in terms of orthogonal functions. From the definition of orthogonal functions, (5.4.3) states that R(y , y ) must be orthogonal to each basis function φ,(.ν,, y ),i \,2 N. Finally, one can argue (see Oden, 1973) that (5.4.3) is the obvious approximation to the weak solution of (5.4.2) defined by x
2
=
2
<Δ«,φ >=-,φ >, 1
1 = 1,2,...,*,
ί
where ψ, are elements of a Hubert space. However one wishes to rationalize (5.4.3), it results in the approximate equations we require. This is apparent through the following series of steps. Let us substitute (5.4.2) into (5.4.3) to give (5.4.4)
(Δ
Μ
+ /(^,^ ),φ,>=0,
i = 1.2
2
JV.
Application of Green's theorem to reduce the order of the highest derivative in (5.4.4) and to incorporate natural boundary conditions into the operator yields (5.4.5)
( ý , , , , φ > + < f i , φ , > - JT(fi / + t y d s ιν
r j
ν
Ki
- ( / , φ , ) = 0,
Vi
/ = 1,2
N,
where Γ is the boundary of the domain A and l are direction cosines. The third term in (5.4.5) is used to define boundary conditions of second and third kinds (Neumann or Cauchy). Substitution for « in the area integrals of (5.4.5) yields y
(5.4.6)
2
^[<Φ, ,.Φ, > + ( Φ , , , Φ , > ] - < / , Φ > 1
7 = 1
Ι<
2
2 ΐ
1
Ι
J
- Jf_( u J y
yi
+ U yjy
2
)4>,dS =
0,
# = 1,2
JV.
When / is not available as an explicit function of y,, but discrete values can be obtained at the nodes, the second term in (5.4.6) can be expressed in the
444
Elliptic Partial Differential Equations
form
(5.4.7)
,*,>=<( Σ
Σ
Λ Φ * , Φ , ) =
\ k =ι
/
Λ<Φ*,Φ,>·
=ι
A
The boundary integral will be a known function (sometimes of u) along an element side lying in Γ or will not be required because the boundary node is Dirichlet, and thus the corresponding equation will be deleted from the global matrix equation. Let us assume that it is necessary to consider a third type of condition, for example,
au + b^- = c,
(5.1.9)
an
where a, b, and c may be functions of y, and η is the outward directed normal to Γ. The boundary integral [the last term in (5.4.6)] can be written
/ (Λ,Λ, +
(5.4.8) Combining
Γ
β,Λ,)* = Λ
/ |ί*. · Λ
ί
Γ
(5.4.8) and the Cauchy condition (5.1.9), we have
<·» /J*.*=/(ί-!«)**=/(f-f 54
r
1
j,"λ)**
r
y= i
1
When a, 6, and c are spatially dependent, it may be advantageous to utilize an expansion similar to that employed in representing / in (5.4.7). If we assume a functional form for / and a Cauchy condition along some segment of Γ, we have, as a general equation, Í
Σ Vj
(5.4.10) 7
=1
<Φν„-Φ,„> + <Φ, ,.Φ, ,> + 2
2
/
Γ
| φ Φ ώ /
1
Í
~ Σ
=0,
k=\
This expression is written in matrix form as
(5.4.11)
[A]{u)
+
{g}=0,
ι = 1,2
iV.
Finite Element Methods for Two Space Dimensions
445
where
u=U, g, = -
2 /.<Φ*.Φ,>-/τΦ,«*=θ,
ι = 1,2,....JV.
A comparison between (5.4.11) and the corresponding equation for the parabolic case (4.13.18) reveals that the spatial matrix elements are essentially the same as would be expected from our experience with parabolic P D E . 5.4.2
Example Problem
Let us consider the particular example of a Poisson equation described by Pinder and Gray (1977):
u(0,y ) 2
£ < 2 . (5.4.12)
Λ
= \
) = 0
^
dy
2
?(>Ί,Λ)=β(1.0*(>'.-1.>'2-1). where Q is a sink of unit magnitude. We assume that the domain of interest is subdivided into four triangles, such as illustrated in Figure 5.12, and that linear basis functions are used. The approximating equations for (5.4.12) are obtained using Galerkin's method. Because (5.4.12) is of the form (5.1.4), we can employ (5.4.10) directly and thereby obtain (5.4.13)
2
7 = 1
uU* ,* ) + (* .* A yiJ
yii
yiJ
+ <ρ(ι,ΐ)όΊ>,-ι, , -ι),φ >-f^*,ds = o >
2
ι
yii
i' = 1 . 2 , . . . , 5 .
446
Elliptic Partial Differential Equations ELEMENT
/
m I
κχ
Μ Ι
ΠΙ
Π
-NODE {Æ,Ï)
Figure 5.12. Finite element discretization of an example problem in the solution of an elliptic partial differential equation.
Note that the second term in (5.4.13) vanishes in all but the third equation, where it becomes (5.4.14)
< β ( Ι . 1 ) β ( > ' - 1 , Λ - 1 ) , Φ > = β(1,1)φ,| ι
ι
ί Ι Ι = Κ ι = 1
= ρ(1,1)=1
and the boundary integral (the third term) is nonzero only along the side The global equation (5.4.13) is written in matrix form as (5.4.15)
[A)(u}
+ {f)
= 0,
where (5.4.16a)
(5.4.16b)
U:=U:
o, (5.4.16c)
f,=
1,
i=4,5 ι=3 1,2.
The integration described in (5.4.16a) is carried out element by element. The resulting integrals are subsequently summed to form the global matrix. If each
Finite Element Methods for Two Space Dimensions
447
element of the global matrix is represented explicitly by this sum, where the location in the sum represents the element number contribution, one obtains as a typical element a , tJ
(5.4.17)
a
'J
=(a(
I )
\ IJ
+ a<
II)
IJ
+ a
< I ,
Ί
" + a
< I V )
).
') I
The term ajj* refers to the contribution of the triangular element (I) to the a integral. This convention yields, for this example problem, the following form of the [A] matrix (details of the integration procedure are found in Section 3.1.2): tJ
(5.4.18)
M] = 0 + 0 + 0 + 0 0 + 0 + 0 + 0 - 3 - 1 + 0 + 0
J-+0 +
4 - 4 + 0 + 0
0 + 0 + 0 + 0
4 +o+o-i
0+2-
+ 0 + 0 - 4
0 + 0 + 0 + 0 o - j - 4 + 0
1 + 1+ 1+ 1
0 + 0 + 0 + 0 0 + 0 + 0 + 0 0 + 0 - J - - 4
0 + 0 + 0 + 0
0 + 0 + 0 + 0
o - j - 4 + 0
o+i+i+o
0 + 0 + 0 + 0
0 + 0 + 0 + 0
0 + 0 + 0 + 0
0 +
0 + 0 + 0 + 0
0 + 0 + 4
0 - j - J ;
+ 4-
Summation of the individual entries for each element of [A] yields for (5.4.15),
u, -1
(5.4.19a) -1
-1
0
1
0
0
+
o °y\
= 0.
1 0 0
Thus far, we have not accounted for the Dirichlet conditions specified along y = 0 . From this condition we know I/, and U [i.e., « ( 0 , 0 ) = I/, = 1 , ΰ ( 0 , 2 ) = U = 1 ]. Because these two undetermined coefficients are, in fact, known through x
2
2
448
Elliptic Partial Differential Equations
the boundary conditions, we can eliminate the first two equations. Therefore, the first two rows and columns of [A] are eliminated as indicated by the partitioning in (5.4.19a). The reduced set of equations becomes 4 (5.4.19b)
-1
- Γ
'u u
' -1+2'
3
-1
1
0
-1
0
1
0
-
0 5
where the ( + 2) in the right-hand-side vector accounts for the Dirichlet boundary. The coefficient matrix in (5.4.19b) is readily inverted to yield
v (5.4.20)
3
—
1
— 2
1
1
1
1
1
3
1
0
1
1
3
0
1
2
=
1
2 . 5.
and the solution, therefore, is [«(0,0),
«(0,2),
«(1,1),
«(2,0),
«(2,2)] = [l, r
I,
j , \,
tf.
The analytical solution to this problem is given by (Tang, 1979)
u
=
1
sinh(X,j>,)fX)8h[X,(/->>,(l))]co8h(X.>> )cos(X.^(l))
_Zl_2
S
'
'„ =,
2
A cosh(X /) n
n
Λ(Ι) M= 1
_ZliH_2 /
γ
sinh( X y , ( 1 ))cosh[ λ , ( / - j>, ) ] c o s ( \ „ y )cos(\„y ( 2
n
1„ %
2
= Ι
1))
A cosh(X„/) n
y >yi(l)=\ }
Λθ) = 1 and \ = ηð/1, « = 1,2,..., where / is the side length of the square (i.e., / = 2 for our example). Evaluation of these expressions for >Ί = 1, >"2 = 1 yields 0.34085 and for y = 2 , y = 2 yields 0.5137. Comparison of these values with those obtained from (5.4.20) indicates rather remarkable accuracy considering the number of nodes and elements involved. It also indicates that the solution obtained at the location of the sink is less accurate than at the boundary. This should be expected due to the increased gradient in the vicinity of the sink. Η
x
2
Finite Element Methods for Two Space Dimensions
5.4.3
449
Collocation Approximation
In this section we attempt to solve the same example used in the preceding section on the Galerkin method. Let us begin with the collocation-weighted residual formulation, (5.4.21)
[Δþ + / ( > > , . ) ] Λ
ν ΐ ι
.
ν ΐ ι
=0,
i = l,2,...,JV,
where (y , y ) are the collocation points. Because the operator here is second order, we employ C cubic Hermite basis functions. The occurrence of the singularity at the center of the square makes the collocation formulation more difficult than the Galerkin approximation. The difficulty resides in the fact that the collocation equations are written at collocation points rather than at nodes. As a result we are constrained through consideration of accuracy to write our equations at specific spatial locations. These positions, in general, will not correspond to the source or sink location. T h u s we must formulate an approach different from that employed in using the Galerkin method. u
2l
1
T o accommodate the occurrence of the point sink we augment our trial function approximation. This is analogous to the scheme introduced in Section 4.13.5. Let us consider the problem in coordinates, inasmuch as one element in this system conveniently describes a 2 X 2 square (i.e., - Κ η, *s 1), which is precisely what we need. This problem is illustrated in Figure 5.13. The appropriate trial function for this problem will be chosen as
2
4 (-1,1)
(1,1)
X I-0.5 7 7 ,0.577)
X (0.577,0.577) Point
Sink
(0,0) Collocation point X (-0.577,-0.577)
(0.577 ,-0.577)
3 ^ (-1,-1)
Figure 5.13.
NODE
(1,-1)
Finite element net for collocation with a point sink.
450
Elliptic Partial Differential Equations
where Φ is selected to remove the singularity from the problem (see Section 4.13.5). In this problem we use the function proposed by Hayes et al. (1977), modified slightly for our operator,
(5.4.23)
2ð
R\
R)
The parameter R is selected to limit the domain of influence of the function. In our example problem R is chosen as unity to limit the function to the 2 X 2 domain of interest. The radial coordinate r is defined as (5.4.24)
' = [(*-1.,) +(*-ι»2.) ] 2
2
,
/
2
.
where the point ( η , , , t j ) is the location of the singularity, in our case the point (0,0). T o employ Φ in our formulation it is necessary to have available the Laplacian of Φ to substitute into (5.4.21). Application of the chain rule of differentiation yields 2i
FM5)4('-i)7-?(-i)' dr θη,
+•
From (5.4.24) we obtain (keep in mind that ( η , , , η / ) 2
=
(^0)]
dr 9η,
(5.4.26a)
dr 8η,
(5.4.26b)
^ (η 2
2
+
η 2," 2
(5.4.26c)
When the equation for η corresponding to (5.4.25) is combined with (5.4.25) 2
451
Finite Element Methods for Two Space Dimensions
and (5.4.26), we obtain (5.4.27)
" - ^ { [ « - ( ' - > ( 7 Ê ( · - ί ) > 5
+
«>-
+
I/2
^-(ί)-|(>-ί);-^('-ί)' 7('-ϊ)(4) +
Let us now return to the general problem described by (5.4.21). Substitution of (5.4.22) into (5.4.21) yields (5.4.28) W.
ι ^
9U
dU
)
2
= 0, 1l,.l2i
/ = 1,2,...,/V. The term ΔΦ is a known function once R is specified in (5.4.27) and consequently is relegated to the vector of known values. Because φ , <}> , φ , and φ,, are known, the matrix equation corresponding to (5.4.28) is readily generated (by a computer) once the collocation points are specified. If we use orthogonal collocation, the collocation points are the Gaussian integration points as indicated in Figure 5.13. When the operator (5.4.28) is evaluated at these points, we obtain the matrix expression ù
l0j
0 [ ;
+ {/}=0,
M]{«}
(5.4.29)
where the matrix elements are defined as (5.4.30a)
[A} =
-
1.44
44
- 0 718
0 667
0 0704
0 667
0 263
0 0704
0000
0 199
0 103
0 667
0 0704
0.263
0.000
0 199
0 103
0.103
0 0516
0 667
0 0704
0000
0
0 718
0 667 0667
- I 53
0 667 - I 53
-0
263
1.44
-I
-1.44
0.199
-0.103
0.103
0 667
-0
0.263
0704
-0
0516
0.000
- I 53
199
- 1 53
- 1 44
-0.263 0
103
0 000 -0.0516
1 44
0 718
- 0 0704
0 000
-0.103
-0
00516
-0
0704
-0.263
-0
263
-0.0704
0 263
1 44
103
I 44
0.000 0000 - 0
718
452
Elliptic Partial Differential Equations
(5.4,ob)
, . Η « , , . « ! . « ! . · ^ Μ2,^,3(7, 3ίΛ 1
3η, ' 3η2
3η, 3η2 3η,3η2 3
3η,3η 2 '
' 3η, ' 3η2 ' 3η,3η 2 '
4
' 3η, ' 3η2 ' 3η,3η2
(5.4.30c) {/} = {ΔΦ|_ 0577 ,_ α577 , ΔΦ|0.577,_0.577, ΔΦ| -0.577,0.577 ,ΔΦ
0.577,0.577
}Τ.
To solve (5.4.29), it is necessary to impose boundary conditions on the system. Along the side η, = — 1, the function u is specified. Thus the coefficients i/, and U2 are known. Along the side η2 = — 1, the normal gradient is specified as zero; thus 3ί/,/3η 2 and 3ί/ 3 /3η 2 vanish from (u). A similar argument for η2 = 1 yields 3/72/3η2 = 3ί/ 4 /3η 2 =0 and for η, = 1, 3ί/ 3 /3η, = 3£/ 4 /3η,=0. We now observe that where 3ί/ 3 /3η, = 3ί/ 3 /3η 2 = 3ί/ 4 /3η, = 3ί/ 4 /3η 2 =0, along 3G we can also write d2U:3 3η,3η2
_
32ίΛ =0. 3η,3η;
One may also argue (somewhat less convincingly) that the specification of 3κ/3η 2 =0 along η 2 = ±1 implies that 3 2 κ/9η,3η 2 =0 along η 2 = ± 1 ; this requires that a 2 i/,
_
3η,3η2
a2t/2
_n
3η|3η2
There remain four degrees of freedom in {u}: 3ί/,/9η,, 3ί/ 2 /3η,, U}, and U4. The matrices [A] and {«} are now modified to account for the known information. Coefficients in [A] corresponding to known coefficients in {u} are multiplied through and the resulting information stored in {/}. Thus only columns in [A] corresponding to the four unknown coefficients will survive this process. The resulting matrix equation is [A}{u} + {f}-=0,
(5.4.31) where (5.4.32a)
M=
-1.44 0.263 0.0704 0.103
0.0704 0.103 -1.44 0.263
0.667 -1.53 0.199 0.667
0.199 0.667 0.667 -1.53
Finite Element Methods for Two Space Dimensions
(5.4.32c)
{/} = {1.09,
-0.645,
1.09,
453
-0.645} . r
The solution of (5.4.31) yields (5.4.32d)
{«} = { - 0 . 4 4 1 ,
-0.441,
0.559,
0.559} . r
One can now obtain the approximate solution M ( T } , T J ) anywhere except at the point r = 0 . For the nodal locations ( 1 , - 1 ) and (1,1) we obtain 2
(
i i ( l , - 1 ) = 0.559-0.01 =0.549 ΰ ( 1 , 0 = 0.559-0.01=0.549, where 0.01 is the evaluation of (5.4.23) at the indicated nodal locations. This compares with «(1,-1)=«(1,1)=0.500, obtained using the four triangles and an analytical solution of M ( 1 , - 1 ) = W ( 1 , 1) = 0.5137. 5.4.4
Mixed Finite Element Approximation
In this section we consider a finite element formulation that generates a solution for both the function and its derivative. Using this approach, the derivative is continuous at the nodes and no preferential treatment is given to the function at the expense of the derivative. Let us consider the elliptic equation (5.4.33)
V-a( ,y )vu yi
+ f{ ,y )
2
yi
2
= 0,
where α is a scalar function of y, and y . This equation can be written in the equivalent form 2
(5.4.34a) (5.4.34b)
V ·»+/(>-,, j ) = 0 2
v/-a(y ,y )Vu=0. ]
2
In many problems in science and engineering the flux w as well as the function u is desired. Moreover, it is often important that this flux be continuous in the the function w becomes domain of interest. We note that when a(y y )=\, the derivative of u. We assume that for certain reasons, computational or v
2
454
Elliptic Partial Differential Equations
otherwise, we wish to employ C° basis functions. To assure w continuous, we select a trial function of the form
<ν,, )=**ο,, )=
(5.4.35a)
Λ
ηφι,ê).
Σ
Λ
y'=l
The function u is also approximated using C ° basis functions, but these functions may differ from those employed in approximating w,, Í
Σ
u{y y )^u{y„y )=
(5.4.35b)
u
2
2
U^{y^y ). 2
j=\
Thus one may elect to use different polynomials in approximating u and w. T h e approximating finite element equations will now be developed using Galerkin's method. We define two residuals from (5.4.34) as V-*+f(y ,y )=R
(5.4.36a)
l
r\-a(y„y )Vu
(5.4.36b)
2
=
2
]
R. 2
Each residual is required to be orthogonal to a set of weighting functions, (5.4.37a)
<Λ,,φ,> = 0,
/ = 1,2,...,/V
(5.4.37b)
(R ,^)
i=
= 0,
2
l,2,...,N.
Substitution of (5.4.36) into (5.4.37) yields (5.4.38a)
< V w + f(y
),φ,)=0,
i = l,2
Ν
(5.4.38b)
<*-α(.ν,.Λ)νþ.ψ >=0,
f = 1.2
yV.
lt
Λ
ι
The final set of algebraic equations are obtained through substitution of (5.4.35) into (5.4.38). T h u s we obtain for two space dimensions Í
(5.4.39a)
Í
Σ W(yx)j<* j,4n)+ yi
7=1
W i y J ^ ^
Σ
+ ifiy,,y ),4>,) 2
i = l,2 (5.4.39b)
W(yi)j<*j,*,)-
2
y=
= 0,
>=»
ι
Σ ί/,(β(>Ί.Λ)(ψ^
y=
+
/V
Ψ^).Ψ.)=0.
ι
i = l,2,...,/V
Finite Element Methods for Two Space Dimensions Í
(5.4.39c)
Σ
455
Í
Ðϊ2)Ë^^,)-
Σ U (a(y ,y ){* J
l
l
Vl/
+ 4, ),* ) rlJ
= 0,
l
7 = 1
7 = 1
1
= 1,2
Ν.
In (5.4.39) we write W(y ) and W(y )j to designate the undetermined parameters associated with the y, and y components of w, respectively. We also assume the a can be represented such that it is everywhere continuous within the domain. There are several features of the set of equations (5.4.39) that deserve mention. We find that to obtain flux continuity we have increased the size of our matrix problem from /V equations to 3/V equations. Moreover, the coefficient matrices are no longer symmetric and often contain zero elements on the diagonal. Although none of these difficulties is insurmountable, they impose obstacles to efficient implementation of the method. Notice that in formulating (5.4.39) we did not employ Green's theorem. This is because the flux boundary condition can be introduced directly through the undetermined coefficients W x
2
2
y
5.4.5
Approximation of the Biharmonic Equation
The biharmonic equation has been considered in some detail in the finite element literature because of its importance in the simulation of the bending of plates. Recall from Section 5.2.3 that the biharmonic equation can be written (5.4.40)
tfu
= ΔΔκ = « , « + 2 1 1 , 2 , 2 + u
yt
=
f(y,,y ). 2
This equation describes the transverse displacement w of a thin plate under an imposed force /(>»,, y ) with unit bending stiffness. It is important to attach physical significance to the equation at this point because of the variety of boundary conditions that can be imposed. We know, of course, that two boundary conditions will be required along the perimeter of the domain; the choice will depend upon the problem. The principal boundary conditions on this equation are those that involve derivatives up to and including first order. Boundary conditions involving derivatives of second order or higher are natural for this operator. The problem of a clamped plate thus involves two principal conditions, 2
(5.4.41a)
«=0
along Γ
(5.4.41b)
u„=0
along Γ.
Let us examine the methodology that leads to a finite element representation of (5.4.40) under these auxiliary conditions. There are two avenues of approach to approximating (5.4.40). T h e first is an extension of the mixed method of the preceding section. In this approach we
456
Elliptic Partial Differential Equations
introduce a new variable v{y
y ) such that
u
2
o = Au =
(5.4.42)
u +u . yiy
V2yi
Then (5.4.40) becomes Av^v +v =f{ ,y ).
(5.4.43)
yiy
y2y
y]
2
This procedure replaces a fourth-order operator, (5.4.40), with a coupled set of second-order equations, (5.4.42) and (5.4.43). The same procedure was used earlier in a finite difference context [see (5.2.31) and (5.2.32)]. While we have increased the number of degrees of freedom associated with each node, we have gained the flexibility of employing methodologies developed earlier for second-order elliptic equations. As an example we consider Galerkin's a p proximation. Let the new function ν a n d original function u be represented in the standard way using C ° bases, (5.4.44a)
v(y y )^o( ,y )=
£ j=\
(5.4.44b)
u( ,y )^u( ,y )=
2 j=\
u
yi
2
2
y]
yi
2
2
V^y^yJ
U^{y y ). u
2
We now require that the residual formed through substitution of (5.4.44) into (5.4.42) and (5.4.43) be orthogonal to each basis function Ψ,(>Ί, 7 )> 2
(5.4.45a)
<ΔΜ-ΰ,<ρ,)=0,
/ = 1,2,...,/V
(5.4.45b)
<Δϋ-/,φ,>=0,
i = l,2
Ν.
Equations (5.4.45) are now expressed in an alternative form arrived at using Green's theorem:
(5.4.46a)
<ν«,νφ,> + < ϋ , < ρ > -
(5.4.46b)
(νν,νΦ,)
(
+ (/,Φ,)-
/"« ψ,þ = 0 ,
/ = 1,2,...,/V
h
i=
η
•τ
n
•τ
\,2,...,N.
T h e final form of the algebraic equations is obtained through substitution of
Finite Element Methods for Two Space Dimensions
457
(5.4.44) into (5.4.46), (5.4.47a)
2 ι/(νΦ,,ν« )+ Σ ^ < Φ , . Φ , > - / « > , Λ = Ο . Ρί
7=1
(5.4.47b)
7=1
2 7 =
ι = ι.2,...,/ν
Γ
^ ( ν φ , , νφ,> + < / , Φ , ) - ( ι3 ,φ Λ=0, 1 r (
1
* = 1,2
yV.
J
We see that the line integral over Γ will accommodate N e u m a n n conditions up to third order. Thus, through direct variable replacement or integral evaluation, (5.4.47a) will account for specified u and «„, and (5.4.47b) will take care of u„„ and u „. T h e second type of formulation is motivated by a desire to reduce the number of dependent variables from two to one. The price we pay for this increased efficiency is a more stringent constraint on the admissible set of basis functions. While the formulation of (5.4.47) permits the use of C ° bases in a Galerkin formulation, the direct approximation of (5.4.40) will require C continuity. The reason for this requirement is evident from the Galerkin approximation. W e begin in the usual way by setting the residual }
1
R(y
(5.4.48)
lt
y) =
A u-f 2
2
to zero in an average sense by making it orthogonal to our basis functions
Φ,Οι,Λ). (5.4.49)
i
i
i = i.2,...,/v,
i
where the number of bases Ν will depend upon the particular formulation we choose. Substitution of (5.4.48) into (5.4.49) yields
(5.4.50)
( Δ « - / , φ , ) = 0,
f = l,2
2
yV
application of Green's theorem twice provides the relationship we require:
-<ν
(5.4.51)
(5.4.52)
3 Μ
, ν φ , > + / « Φ Λ - < Λ Φ ) = 0, •T
<ΔΑ,Δφ > + / β , φ Λ - / þ <
ϊ (
Ι
3 π
2 ι 1
1
φ
Λ <
ι
Λ-,φ >=0, ί
f = l,2
yV
i = 1.2,...,/V.
We now see that to avoid element integrands involving the product of Dirac delta functions, the trial function and basis function must have continuous first
458
Elliptic Partial Differential Equations
derivatives. It is also apparent that the line integral integrand contains the second- and third-order normal derivatives. This is consistent with our earlier observation that, for this fourth-order equation, natural boundary conditions would consist of derivatives of second order or higher. Thus the zero- and first-order boundary conditions we have considered in our example problem [i.e., (5.4.41)] must be imposed on the algebraic equations rather than reside naturally in the approximating equation. We examine this again after consideration of the spectrum of available basis functions. The requirement of C continuity is met by the Hermite family of basis functions. Recall that the trial function expressed in terms of cubic Hermite polynomials was of the form 1
u(y y )^u(y y )
(5.4.53)
u
•
2
v
2
"
Wj
Wj
d Uj 2
where the basis functions φ ^ , Φιο . Φοι > and φ , are Hermite cubics defined, in this case, in _v, and y . The approximating algebraic equations are obtained through substitution of (5.4.53) into (5.4.52) and subsequent integration where required. These equations are modified to account for essential boundary conditions and then solved, usually employing a direct solution scheme. On a rectangular net the application of Hermite-type basis functions is relatively straightforward. In the case of isoparametric elements, however, the situation requires considerable care. The transformation from global to local coordinates must be achieved using C ' continuous transformation functions. Moreover, their first derivatives must be continuous between elements or the trial functions are nonconforming. The mapping from (>>,, y ) to ( T J T J ) can be achieved using Hermite transformation functions provided that their tangential derivatives and cross derivatives are continuous at the vertices of the element. We discussed this problem earlier and suggested the use of elements with orthogonal corners and harmonic mean side lengths defined at corner nodes to achieve these continuity constraints. The use of Hermite rectangular or restricted isoparametric elements may impose unacceptable constraints in some problems. Thus a formulation based on the triangle is desirable. As a first step let us obtain a C ° cubic representation. We begin by assuming a cubic form for the basis function, 7
7
υ
2
2
(5.4.54)
2
1
+ ay 2
+ ayy 2
s
2
]
+ ay 3
+ ay
2
4
+ a y yi 9
l
+
2
+ a yy %
x
2
+ a y\
a yl, w
where the trial function Μ ( ^ , , >> ) is related to φ(.ν,, y ) by 2
2
10
(5.4.55)
*{yi.yi)=
Σ 7 = 1
vMy^yi)-
b
| (
+
a y\ 1
2
Finite Element Methods for Two Space Dimensions
459
The 10 coefficients of (5.4.54) can now be evaluated by imposing conditions on <j> We require that they be unity at the node for which they are defined and zero at all other nodes. The resulting set of 10 simultaneous equations can be solved for the required coefficients. In practice, the basis functions are defined and the integrals evaluated in local L, coordinates. The algebraic forms of (f> (L,, L , L ) are presented in Table 3.2. A useful extension of the C ° formulation described above is obtained when both the function and its first derivatives are required to be continuous at the nodal points. Because three conditions are now specified at each corner node (tJ, 3u/3j>(, 3w/3_y ) there remains only one degree of freedom to be determined. This tenth constraint is chosen to be the function value ύ at the centroid of the triangle. Thus we obtain 10 equations in the 10 coefficients a of (5.4.54). This element was also considered in Chapter 3 and the resulting functional form of L , L ) is presented in Table 3.3. In either of the r
;
2
3
2
2
3
cubic elements described above we can eliminate, at the element level, the degree of freedom associated with the interior node. This procedure, known as static condensation, results in a global system of equations with nine degrees of freedom per element. We have already noted that an admissible basis function for the solution of the biharmonic equation must be C continuous. Unfortunately, the preceding two examples do not satisfy this constraint. The new condition that must be imposed is the continuity of the normal slope across interelement boundaries. There are two principal ways of achieving this. The first involves the use of rational functions (see Mitchell, 1973). These are chosen to eliminate edge discontinuities in normal slopes without affecting the values of the function and its derivatives at the nodes. Because of the difficulty associated with integrating these functions numerically, we will consider a second formulation based on theory compatible with our development to this point. x
This alternative approach will extend the concept of polynomial expansions to consider a quintic polynomial. This fifth-degree polynomial will have 21 degrees of freedom; 18 of these will arise from nodal values of ύ, ΰ „ , « „ , « „ , . , M and The remaining three degrees of freedom must be selected such that ύ„ is continuous across element sides. There are two ways to achieve this objective. One is to specify ύ„ as a nodal parameter located at the midpoint of the side of each triangle. Because ΰ is a quintic along the element side, it is uniquely determined by U„ at the three nodes along the side and the edge derivative of U at the vertices. All of this information is available either directly as parameter values at the nodes or indirectly through the six parameters at the nodes. This formulation will be 0(h ) in u provided that the boundary is successfully approximated (Strang and Fix, 1973). Another approach involves the formulation of a quintic which is modified such that the u„ is reduced to a cubic representation along the element side. Thus only four parameters, those defining U„ and the edge derivative of U„ at the vertices, are required to define uniquely the normal derivative along the element boundary. Because the complete quintic is lost, the displacement error L L V
ð
n
6
460
Elliptic Partial Differential Equations DEGREES
Λ Λ ( U , U
V
Λ U y
2
Λ . U
V
)
OF
FREEDOM
Λ Λ , Uy y ^ U y ^ )
Λ Λ Λ Λ ( U , U y, . U » , , Uy
4
< y {
Λ ,U,
(
Λ y^Uy^)
(c)
»4
Figure 5.14. Triangular elements of class C". (a) Full quintic. (b) Reduced quintic with cubic variation in u„ along a side, (c) The parent and daughter triangles of the Clough-Tocher element. will degenerate from 0(h ) to 0 ( Λ ) (Strang and Fix, 1973). Numerical experiments by Cowper et al. (1969) have demonstrated that this loss in accuracy is more than compensated for by a decrease in computational effort. This is due to the reduction in the degrees of freedom associated with each element. Additional information regarding this type of formulation is available in Bell (1969) and Butlin and Ford (1970). A third possible approach to achieving a C conforming element involves the subdivision of each element into three daughter elements. The centroid of the parent element is the common vertex of the three smaller elements (see Figure 5.14). Each daughter element is defined using a cubic basis function formulation. Thus there are 10 degrees of freedom associated with each daughter element and 30 degrees of freedom for the combined parent element. Internal compatability requires a common value of «, ύ , and « at the centroid and ý„ along each internal side (nine constraints). Similarly, the requirement of a common value of «, « , and tJ provides three additional 6
5
1
Õι
v
v
Boundary Integral Equation Methods
461
constraints at each vertex of the parent triangle. There remain 12 degrees of freedom associated with the parent triangle. Through a careful elimination process one can obtain a parent element equation wherein the remaining 12 degrees of freedom are the values of Q, u , and u at each parent element vertex and the normal derivative «„ at the midpoint of each side of the parent element (see Figure 5.14). This type of formulation is known in structures and mechanics as the Clough-Tocher triangle (Clough and Tocher, 1966). yi
5.5
Vi
BOUNDARY I N T E G R A L E Q U A T I O N M E T H O D S
In this section we consider an approach to the solution of boundary value problems involving elliptic operators which is quite different in concept than methods discussed thus far in the book. Although the formulation to follow can be presented in three space dimensions, for the sake of clarity we consider only two-dimensional problems. Moreover, we limit ourselves to second-order operators, recognizing that the method may, in fact, be most effective in the treatment of the biharmonic equation. The fundamental motivation behind boundary integral equation methods, BIEM (also known as boundary element methods; Brebbia, 1978) is the reduction of the dimensionality of the problem. Thus we simplify our problem from one involving area integration to one involving line integration. In general, the number of equations derived from such a formulation will be fewer than in the case of an interior method. In contrast to the sparse matrices encountered in other methods, however, the BIEM-generated matrices are full. 5.5.1
Fundamental Theory
As the name would imply, the first step in the BIEM formulation involves the generation of an equation containing integrals over the boundary of the domain of interest (see Figure 5.15). There are several avenues of approach to obtaining this equation (see, e.g., Noble, 1977; Jaswon and Ponter, 1963). We have chosen to use a weighted residual formulation because of its inherent simplicity and the fact that we have used this approach previously in the development of finite element theory. Let us consider the Laplace operator and auxiliary conditions (5.5.1)
Δ«=0
on/1
(5.5.2)
-^-=q an
οηΓ,
(5.5.3)
u —U
1
οηΓ
Γ = Γ, + Γ . 2
2
462
Elliptic Partial Differential Equations
lb)
Figure 5.15. Discretization for BIEM formulation, (a) Node-centered elements, (b) End node elements. We now assume that the solution u(y ,y ) can be approximated by the function u(y,, y ). Substitution of ΰ into (5.5.1) generates a residual Λ, that is, x
2
2
Au = R.
(5.5.4)
From the method of weighted residuals we can minimize R in the following sense: fR*{y ,y )da=Q,
(5.5.5)
x
2
where ψ is a weighting function with properties to be considered shortly. Combination of (5.5.4) and (5.5.5) yields [Auida=0.
(5.5.6)
Imposing certain derivative continuity constraints on ψ, we can employ Green's theorem in two steps to yield (5.5.7)
- ί ν ý ν ψ þ + JA
Jr
an
f~^ds=0
Boundary Integral Equation Methods
463
or (5.5.8)
~^ds-[u^ds=0. Jf- on
(ýΔψα + f J on J A
r
We now impose an additional constraint on the weighting function ψ. It must satisfy the Laplacian identically. The first term in (5.5.8) thereby vanishes and we have only an integral over the boundary Γ,
< · -" 5
5
We now follow the development of Liggett (1977) and select as our weighting function ψ = In r, the singular solution to Laplace's equation. The distance r (Figure 5.15a) is measured from an arbitrary point Ñ to a point Q on the boundary. Substituting for ψ, (5.5.9) becomes
<»•'·>
J K e " ' - ^ ) * - -
In the event ύ and du/dn were known everywhere along Γ, the solution would also be known everywhere within A. The integrals in (5.5.10) are readily evaluated except in the vicinity of the singular point P. This point is excluded from the region by a small circle of radius r . We now write the required integrations as 0
where è increases counterclockwise when the integral along Γ is taken in a clockwise direction. We now examine (5.5.11) in the limit as r -*0 and find that the second term reduces to 0
(5.5.12)
-(
e
0
since l i m ^ r l n r = 0 implying boundary integral equation is now r o
(5.5.13)
0
0
=
"u^r de
= 2
0
that
/(altar
2ð J \ r
dn
u(P)2n
f^^idii/dn)r \r\ Q
M
dn
t a r
r d0 = 0 . 0
The
)*.
I
This equation provides a relationship between any point on the interior of A and information known only at the boundary. In the development of the BIEM we require a relationship at the boundary. In other words, we wish to examine (5.5.13) when the point Ñ is located along
464
Elliptic Partial Differential Equations
Γ. Revisiting (5.5.11), we have, for a smooth boundary,
When Ρ is located on the boundary (see insert, Figure 5.15a) r is collinear with η and 9 r / 9 n = — 1. Substituting this relationship into the second term in (5.5.14) and once again taking the limit, r -»0, we obtain Q
0
0
(5.5.15)
, i
m
/
e =
" ( ^ l n r
0
-
M
^ ) r
f8 = J
^
I 1\,
ir
e = o
0
\
„
ίθ-ð
f~o I
Je=o
The boundary equation for a point on Γ thus becomes (5.5.16)
â/,^Ι//^ π Jr\
v
Μ
dn
on
)
Λ
.
I
Before the boundary integral equation can be solved, boundary conditions must be incorporated into (5.5.16). Let us decompose Γ into two segments based on the boundary conditions (5.5.2) and (5.5.3), Γ = Γ, + Γ . 2
Equation (5.5.16) can now be written
(5.5.17)
nu(P)
=
^[u^-q\nr)ds
Equation (5.5.17) indicates that at any point along Γ either ύ or du/dn is unknown but not both. Our task now is to formulate an efficient scheme to determine these unknown functions.
Boundary Integral Equation Methods
5.5.2
465
Boundary Element Formulation
We begin by assuming an expansion for ύ and du/dn along Γ. Using notation consistent with our earlier finite element theory, we write (5.5.18a)
2
«(0=
Ufrtt)
7 = 1
5<0-!|*ft
(5.s..8b)
7 = 1
The coordinate £ is defined along Γ and
• J
'
* 7 - f ^ ^
(.0,
elsewhere,
1
T >
+
where we assume Δ£, to be the length of they th interval along Γ. Substitution of (5.5.19) and (5.5.18) into (5.5.17) yields a discretized form of the boundary integral equation,
(5.5.20)
N
Sin r
Í 7 = 1
dU
7 = 1
'J
J
L
where Í = TV, + 7V ; jV, elements are located along Γ, and 7V along Γ . This equation relates the value of the undetermined coefficient at node i, U,, to the undetermined coefficients U and 9 c / / dn at all other nodes along Γ. Note that in evaluating (5.5.20) a term involving integration along Γ, will have dUj/dn specified through the boundary conditions, and similarly along Γ the coefficient Uj will be known [see (5.5.17)]. The integrals of (5.5.20) are usually evaluated numerically. When ]ΦΊ these integrations present no unexpected surprises. However, when i = j , that is, when the integral contains the singular point P, the algorithm is modified. Along this segment dr/dn = 0 and the first integral of (5.5.20) vanishes, and we have 2
2
2
J
2
(5.5.21)
*U, = - ^ on
flnr.ds, Jr
which can be evaluated because In r is an integrable singularity.
466
Elliptic Partial Differential Equations
We now consider the set of algebraic equations arising out of (5.5.20). Let the integrals for the two undetermined parameters be defined as (5.5.22a)
H
I
= J ^ I L ^
G, =(
(5.5.22c)
º
J
Ö
In r,ds. Jr,
Equation (5.5.20) can now be written (5.2.23)
2^^-2-9-7^=0, 7=1
Í
i = 1.2
7=1
or [H}{u)-[G}[^}=0,
(5.5.24)
where the elements of the matrices correlate in an obvious way to equation (5.5.23). Recall, however, that yV, values of W,/dn and N values of U, are known from boundary conditions. Thus this information can be transferred to the right-hand side of (5.5.24) and the remaining equations reordered to give 2
(5.5.25)
MW
=
{/},
where {%} contains both U, and W,/dn and {/) is known from the boundary information. One can now solve for {%} using direct solution methods. Now that U, and dU /dn are known at each point along the boundary, one can compute ΰ anywhere in the interior. This is achieved by discretizing the general expression (5.5.13); t
Í
(5.5.26)
2ðύ,=2ðύ(Ñ)=
2
Í
UjH,,-
7=1
2 7=1
where
G„ =
l
I"',*
and r is now measured from the interior point P. (
W
-^G , tJ
467
Boundary Integral Equation Methods
Nod* Ο
NODE
•
SIDE
NUMBER NUMBER
(a)
1
1 I
Δΐι j-1/2 (b)
Figure 5.16. (a) Definition sketch for example problem for BIEM. (b) Definition sketch for integration formulas of Jaswon and Ponter (1963).
5.5.3
Example Problem
Let us consider the potential flow problem illustrated in Figure 5.16a and governed by the equations (5.5.27a)
Δκ=0
(5.5.27b)
u(0,y )=\ 2
u(\.y )
(5.5.27c)
2
=0
| f ( > - , . 0 ) = l ^ i ^ , . 1> = 0.
(5.5.27d)
The BIEM approximating equation is given by (5.5.20): (5.5.28)
,U=
I >= l
U j - ^ d s 1
/
Σ 7 = 1
^/inr.A, 1
/
* = 1,2
Í.
Elliptic Partial Differential Equations
468
The integrals of (5.5.28) will be evaluated using the algorithms of Jaswon and Ponter (1963). If the integral contains the point P, a different algorithm is required than when the integral does not contain P. When the point Ρ lies outside the interval, we have
/ lnr & = ^ ( l n r , |
(5.5.29)
r
f i
1 / 2
+ 4 1 n r,| +ln r , | y
).
/ + 1 / 2
The term In r \ refers to the distance between the point P and the location s on the interval iy. this is illustrated in Figure 5.16f>. When the segment Γ contains P (5.5.29) is inappropriate, and we use the relationship t
t
1 / 2
;
(
r
(5.5.30)
/ lnr,A-r,|,_, r
/ 2
{ - l + ln,-,|,_
1 / 2
} + r,|,
+ 1 / 2
{ - l + ln/-,|,
+
1 / 2
}.
Because of the slow variation of 3 1 n r , / 3 n with the position of P, we use the following simple relationship when Ρ lies outside the integration interval (Jaswon and Ponter, 1963):
<>•»»
where 31nr, _ 3 dn ~ 3- [ i ' n ( ( > ' „ - v . ) + ( . v , - > 2 , ) } ] 2
7
3v'i.
2
2
9VT
If Ρ lies on the integration interval, we evaluate the integral indirectly. O n e can sh-<w that the integral of d\nr /dn over the entire boundary Γ = Σ^=,Γ must equal ð. Thus one can use the relationship t
( 5
· · 5
3 2 )
i
r
^ r
d
s
= * -
Σ
/~3»~
~ Σ 2 Δ /
;
^
Boundan Integral Equation Methods
469
We now return to Figure 5.16a to evaluate the integrals of (5.5.28). It is evident from Figure 5.16a that, because of symmetry, it is only necessary to consider the integration for one nodal point. In other words, the same integrals will appear in each equation. We choose, quite arbitrarily, to consider (/, as the equation of interest. Equation (5.5.29) yields
(5.5.34)
j
ϊ(\η\É{\)
\nr,ds^
+(\f
2
+ 41n( 1) + l n ( 1 ) ' + ( 1 ) ) 2
V
= 0.03719 and (5.5.30) gives
j 1πΓ,Λ= ί { - Ι + Ι η 4 } + { - Ι + Ι η } = -Ι.693.
(5.5.35)
2
:
Equation (5.5.31) yields
(5.5.36)
j
9 In r.
ds -
3 In /• 9«
Finally, we use the relationship of (5.5.32) to give
(5.5.37)
/ •τ,
9 In r 9«
4 l
ds
=ν
—
9 In r, ~o~n~
ds = I T - 3 = 0 . 1 4 1 6 .
ds
470
Elliptic Partial Differential Equations
We are now in a position to write the approximating equation (5.5.28). Substitution of (5.5.29)-(5.5.35) into (5.5.28) yields, in matrix form,
0.1416-ν
1.000
1.000
1.000
1.000
0.1416— -π-
1.000
1.000
1.000
1.000
0.1416— w
1.000
1.000
1.000
1.000
(5.5.38)
-1.693
t/
0.1416-7Γ
-.3280
0.03719
-0.3280
0.3280
-1.693
-0.3280
0.0372
0.0372
-0.3280
-1.693
0.3280
0.0372
3
at/,
on dU
2
on at/,
-0.3280
-0.3280
= 0.
dn at/
-1.693
4
dn
However, we know from our boundary conditions that (5.5.39a)
I/, = 1.000,
(5.5.39b)
t/ = 0 . 0 0 0 , 3
2
dU
dn
dn
dU
(5.5.39c)
4
= 0.000.
Thus we can eliminate these variables from (5.5.38) and combine the resulting information to yield
1.693 (5.5.40)
0.3280
1.000
-0.0372
1.000
-3.000
0.3280
1.000
0.0372
1.000
1.693
0.3280
1.000
0.3280
1.000 -3.000
' at/, *
dn
u 3t/ 3
dn
3 -1
2
u*
- 1 -1
Boundary Integral Equation Methods
471
The solution of this set of equations yields (5.5.41) 31A
= [1.1559,
dn '
0.5000,
-1.1559,
0.5O0O]
5
The analytical solution is (5.5.42) dn
[1.000,
dn '
0.5000,
-1.000 ,
0.5000] . T
The solution for ύ is, therefore, exact. The normal gradient is less accurate but acceptable, considering the approximations employed in evaluating the integrals in the coefficient matrix; the algorithm of (5.5.31) is particularly inaccurate for this geometry. 5.5.4
Linear Interpolation Functions
T h e preceding formulation assumed the functions ύ and i j / d n to be piecewise constant along the boundary. This is implicit in the definition of φ presented in (5.5.19). We now extend this concept to consider a linear variation of ύ across each element (see Figure 5.15i>). This is east'y achieved by defining φ as the one-dimensional, linear basis functions of Chapter 2, J
(5.5.43)
Φ,
t(€ + l ) ,
ί, = 1,
where the ξ coordinate system is illustrated in Figure 5.1 'a. We can now write Node
t
ô
(α!
Pi-H
Pi-t
j - segment ( b)
Figure 5.17. (a) Definition sketch of £ coordinate system. (.'-) Two linear elements meeting along a boundary in BIEM.
472
Elliptic Partial Differential Equations
an expression for w along each segment or element as 2
fi(i)= Σ
(5.5.44a)
ί/,Φ,(€)
(5.5.44b) 7 = I
Because ύ and 9 w / 9 n are now functions of £, we cannot pass them through the integration operator. Rather, we must write our integrals in the more general form (assuming that P is on the boundary) i
(5.5.45)
The angle è is used here in lieu of ð because we must account for the fact that Γ is no longer smooth in the neighborhood of the point i (see Figure 5.176). This is a direct extension of the development presented earlier wherein we assumed the node to be located at the center of the boundary element. The discretized form of (5.5.45) is obtained by substitution of (5.5.43) and (5.5.44). Each node on the boundary is involved in two integrations, one associated with each adjacent element. We denote these segments of the boundary j — and j + (see Figure 5.17b). The information associated with each node can, therefore, be written
(5.5.46)
ί/Λ-5Τ
Ñ;
Γ. ,
The situation is now analogous to that encountered in standard finite element theory. The integrations performed at the local level (along each element) must now be assembled into a global matrix formulation. Keeping in mind the mapping between nodes in the local and global coordinate systems one can arrange the information above in the form
(5.5.47)
Boundary Integral Equation Methods
473
where the elements of [H] and [G] are defined as
«„ = / „ - * Equation (5.5.47) can now be modified to account for known boundary information and solved using direct methods as before. This general procedure can be extended to employ higher-degree polynomials for φ . There is no clearly established procedure for integrating the terms appearing in [G] and [H] Alternative schemes have, for example, been presented by Liggett (1977) u ;d Brebbia (1978). ;
5.S.5
Poisson's Equation
The BIEM is clearly a useful numerical tool for the solution of the Laplace equation. It has, in fact, been used by Liggett (1977) to solve a nonlinear boundary value problem. The method can also be used for the Poisson equation, although the methodology is more computationally cumbersome. To remonstrate this procedure, we write our governing equation as Διι + / ι > „ v ) = 0 .
(5.5.48)
2
The weighted residual equation becomes f(Au
(5.5.49) J
f( ,y ))^da=0.
+
A
yi
2
Application of Green's theorem twice to the second-order term yields (5.5.50)
f uA^da
J
+ (
f u^ds
J dn
J
r
A
r
+
dn
J
ί/ψþ=0. A
We now assume that the weighting function is defined as ψ =ln r such that Δψ = 0 and (5.5 50) reduces to (5.5.51)
( f\nrda+ J/
J dn r
f^lnrds-[u^? ds=0. J dn 1
r
To have equation (5.5.51) hold in the limit as r —0 (i.e., in the neighborhood of the point Ñ where the approximate equation is formulated) we examine
Elliptic Partial Differential Equations
474
(5.5.51), excluding a small region of radius r around P. Thus we have (see Figure 5.15a) 0
(5.5.52)
/ I n rda - jT/ln rda + ' J ( | £ In r -
j
A=o
+
l8r7
I n r
) ds
o-"-lS-) o* r
= 0
-
We can now consider the limit as r -»0. From our earlier discussion, we know that the surface integral over a yields 0
i
f* = 2 * ( du.
c
r
< · · 5
5
5 3
*
/ ,
=
0
.31nr \
,
0
( a » -
t
a
r
° -
/•«=2»,31nr
V ) * *
M
- J L
=
« ν ·
Λ
=
,
,
<
ρ
)
2
* ·
y ) vanishes as r -»0. This is apparent if
The term involving the function f(y,, we first write
2
0
Γ°//1η rdr.
lim f / I n rda = lim 2ττ
(5.5.54)
.,
0
¼-ΟΛ,
-Ό
¼-ο
Assuming that / is well behaved in o, we can express it as a series, 00
/=
1
a/.
ι = I
Thus (5.5.54) becomes
r
•U
= l i m 2ðê
-
ί + 2
a,r
°lnr Σ
0
,
V a
=
dr
,+
i
|
lnr i+ 2
(i+2)
2
1
= l i m 2 . | a ' ^ ,-0
ι =
1
1 Π Γ
i+2
°
+2
° (,+2)
/•' lnr
/+2
+ 2
lim
Γ
2
i+2
(/ + 2 )
2
Using L'Hospital's rule, one can show that l i m _ r ' l n r = 0 so that the last term in (5.5.55) vanishes. Similarly, we can take the limit as r — 0 and obtain + 2
r
0
0
(5.5.56)
2 π lim
¼-0
I '0 R'
+
2
Ll Nn
i +
R
'0
2
R'
'0
+ 2
(t+2)
= 0. 2
Boundary Integral Equation Methods
475
Combination of (5.5.54), (5.5.55), and (5.5.56) yields the relationship we require,
f/lnr
lim
The equation for a point on the interior of A can now be written (5.5.57)
fp»,*
+
The development now follows the same lines presented earlier for Laplace's equation, but the area integral provides an additional problem. A simple procedure to evaluate this integral is presented by Brebbia (1978). He suggests that the interior of A be subdivided into triangles as is normally done in finite element analysis (see Figure 5.15fe). One can then use a numerical integration formula to evaluate the integral as NIK fflnrda
(5.5.58)
= Ó
\ 1
"*( / I n r)
k
j A„,
where Í is the number of elements, Ê the number of integration points on each element, w the weighting function, and A„ the area of the nth element. y
5.5.6
Nonhomogeneous Materials
To this point, the BIEM assumes a homogeneous material such that a simple Laplace-type operator is applicable over the region of interest. The method can, however, be extended to consider nonhomogeneous materials, provided that such materials can be segmented into several regions, each region homogeneous within itself. Consider, for example, the two-property problem presented in Figure 5.18. Following the development of Brebbia (1978) we first formulate approximating equations for each region. The two regions are subsequently coupled by imposing the constraints that Μ and d u / d n are common along the internal boundary separating the two regions. Let us define the equations describing each region as [see (5.5.24)] (5.5.59a)
[//]!./
{«}.'' {»))
du dn j ι 8M 1
dn
1
J,
= 0,
476
Elliptic Partial Differential Equations
Figure 5.18.
Hypothetical two-material region for BIEM analysis.
where the superscript indicates these equations are written for region 1 and {»}?
(5.5.59b)
["],.,
[//]}.;
{«}, du W 9/7 11
[G]].i
9M I
2
9n),
where the superscript indicates the equations are for region 2. We have subdivided the vector of coefficients into those along the exterior boundary (subscripted 1) and those along the internal boundary (subscripted / ) . The imposition of common values of ύ and 9 i i / d n along the internal boundary can be written as (5.5.60a)
{ « } / = {«}/ = {«}/ 9M
(5.5.60b)
dn ) ι
du dn
du dn ) ι
Substitution of (5.5.60) into (5.5.59) yields
(5.5.61a)
["]!.,
[H]\,,
{«}!
[G]\.i
[GVU
[G]
duV
L UL
[c]y,
Iff 1
dn],
= 0
Boundary Integral Equation Methods
(5.5.61b)
["]?..
{«}
[//]/.,
{«}/
477
-lG]i,
2
=0.
[G]/.|
Let us express (5.5.61) as the single matrix equation [«]!.. [«])..
(5.5.62)
0
-[]!.,
-ic]!., 0 0
0
["]!. /
~ [ G ] \ .
t
0
0
["]). /
- [ G ] ) . ,
0
0 -[G]u
[«].. /
[G)l,
[Wlu
["]/. /
[G]).i
["]/, {«}! 9M]
1
3#I J I { « } /
1=0.
9M]
9/t ) ,
{«}ϊ 9M
^
9/t We will assume Dirichlet boundary conditions are imposed along Γ. Thus {M} , and {Μ} are known, columns 1 and 5 can be eliminated, and we have 1
2
~ [ G } \ ,
["])., <·· ) 5
5
63
I
0Λ
r
u
l
2
~ [ G ] \ . i
0
~ [ G ] \ , i
0
[ G ]
2
9M
dn {«},
- [ G f u
, ,
11
II 1*0.
[dn]. d n 11
2
0
0 0 0 0
{«}!
478
Elliptic Partial Differential Equations
Equation (5.5.63) can now be solved using standard elimination procedures. Once the unknown parameters are determined, the function is known throughout the domain. It is apparent that the effectiveness of BIEM degenerates as the number of subregions increases. In other words, the subdivision of the domain generates new variables along internal boundaries which lead to increased computational effort. There will be a crossover point where this increased computational effort will make standard finite element procedures more efficient. 5.5.7
Combination of Finite Element and Boundary Integral Equation Methods
Problems involving significant nonhomogeneity in selected regions may be best approached using a combination of finite element and boundary integral equation methods. A typical discretization of this kind is illustrated in Figure 5.19. The approximating equations for the region wherein finite elements are used are coupled to the BIEM equations along their common boundary. To illustrate this concept, consider the Galerkin representation of the Laplace equation (5.5.64)
% U.f
νφ-νφ,άα-ί
«%,Α=0,
ι' = 1,2,...,7V,
where Ν is the number of finite element nodes and where the subscript Ε denotes an external and / an internal boundary. Normally, the line integral
Common
Node
Figure 5.19. Combination of BIEM and finite element discretization. (NE here denotes the number of finite element triangles.)
Boundary Integral Equation Methods
either is equation Dirichlet we d o in
479
known through boundary conditions or is irrelevant because the along that element of the boundary vanishes due to a specified condition. Let us assume, however, that along Γ we express d u / d n as BIEM, as NE at/.
(5.5.65)
dn
where NE is the number of nodes along the boundary Γ. Then (5.5.64) becomes NE ftjj
Í (5.5.66)
2
Uj
νφ,-νφ,άα-
i = l,2
J φ φ,þ=0,
2 k=I
Á
N.
We can now partition the matrix equation expressed by (5.5.66) to yield
(5.5.67)
[A)o.o
[A]
[A],,
[A],.,
\A)
[A]
[A] _
0
[A] .o E
0
0
[*]/./ [B)
{«}/
LE
E
0
EJ
{«}o
0 E
EJ
0 0
[A] ,
0J
[B),.E [B] .e e
E
WE 0 du dn du dn
= 0.
In (5.5.67) the subscript 0 denotes coefficients or parameters associated with equations written for nodes on the interior of the finite element region. T h e elements of [A] and [B] should be apparent from (5.5.66). Let us now introduce the BIEM equations written for the boundary element of Figure 5.19. From (5.5.59) we have
{«}?
(5.5.68)
du dn ) , [G]/,i
du) dn),
B
where the subscript 1 denotes all matrix elements associated with nodes on the boundary Y . The subscript / denotes matrix elements along Γ, derived from B
Elliptic Partial Differential Equations
480
the BIEM equations. We now impose the constraints that the unknown parameters along Γ, be the same whether derived from (5.5.67) or (5.5.68), that is. (5.5.69a)
{ " } / / = { " } ? = {"}/ 9M I
9M
(5.5.69b)
9M
s
dn ) a
dn
Substitution of (5.5.69a) and (5.5.69b) into (5.5.67) and (5.5.68) yields (5.5.70)
[A],.ï
[A],.i
[Ah.,
0
[AV,
-[*]#.# -[*]*./
0
0
0
[A),.
E
0
0
[A] .,
0
0
-\B\E.E
T:
0
0
0
0
0
0
["]/./
["]...
["]/,
-[G], -IG],
{«},» {«}„
v) on I a
{«}, («}f 3M 1* 3* li
Let us assume that Dirichlet conditions are imposed everywhere along Γ such that {u} and {Μ}^ are specified. We can now eliminate columns 4 and 6 to give E
(5.5.71) 1*1.0
0
0
0
ΜΙ,,ο
Ml,,,, 0
0
-[*],.,
-[cl,.
0
0 ~[G] -[Gh.t
Mo {«}» 3«)
dn
ί ì
9M Ί
dn J å 9H ^
dn
B
Three-Dimensional Finite Element Simulation
481
0 -[A]
I. Å
0
'[A]
Å. Å
0
0
-[Ç]
0
-[Ç]
I.I /.I
This equation can now be solved for the unknown finite element and BIEM coefficients. The extension to elliptic operators in more than one dependent variable does not introduce any new concepts. It is. however, necessary to obtain appropriate fundamental solutions to employ as weighting functions in the method of weighted residuals. Additional details on more complicated problems can be found in two recent monographs on the subject, Brebbia (1978) and Jaswon and Symm (1977). When applicable, the BIEM or combined BIEM-finite element procedure appears to be an efficient numerical approach. Its primary advantages lie in reduced data input and computational effort. The method is less attractive when nonhomogeneous or anistropic materials are encountered. Numerical experiments suggest that, for selected problems, more accurate normal derivatives can be expected with BIEM than with standard finite element procedures.
5.6
T H R E E - D I M E N S I O N A L FINITE E L E M E N T S I M U L A T I O N
The extension of the two-dimensional finite element formulation to consider three dimensions is straightforward. The Galerkin formulation gives rise to a volume and surface integral. (5.6.1)
( ν ί · ν φ , ί Λ ) - (φ, V w - n a a = 0 ,
; = l,2,...,/V,
where
" = Σ Ufa
and
Φ, <Μ>Ί· >':< >Ό· =
The choice of basis functions is the same as encountered in earlier chapters (see Chapters 3 and 4). The resulting sets of algebraic equations are, of course, considerably larger than those encountered in two-dimensional problems. Because of the awesome matrix algebra problems associated with standard three-dimensional simulation, the concept of reducing the dimensionality of the problem through BIEM looks particularly interesting. Three-dimensional BIEM involves the same principles presented in Section 5.5 for two space dimensions. The line element is now replaced by triangles with one central
482
Elliptic Partial Differential Equations
node (constant boundary elements), linear triangles such as generally encountered in standard finite element theory, or higher-order (sometimes curved) triangles with side and corner nodes. The fundamental solution must now satisfy the three-dimensional operator. In the case of Laplace's equation, this solution is
The formulation of the BIEM procedure now follows directly from the preceding two-dimensional development (see Liggett (1977) where the two- and three-dimensional equations are generated in parallel).
5.7
SUMMARY
In this chapter we have examined a number of numerical schemes that provide efficient algorithms for the solution of elliptic equations. The emphasis in developing these methods has shifted slightly from solution efficiency to technique flexibility. The highly efficient finite difference schemes that are so effective in solving transient problems are less attractive when applied to elliptic problems. This is because the approximating algebraic equations are normally solved only one time for each set of imposed stresses. This is not the case, of course, when nonlinear equations are encountered. Because algebraic equation solution strategy is rather less important in elliptic equations than in the other two classes, other technical factors become significant in making a selection between alternative methods. When domain geometry is important or nonlinear geometry is encountered finite element methods, with their inherent flexibility in application, may provide the optimal approach. If the problem involves constant coefficients and irregular geometry, boundary solution schemes should be considered. The advantages of collocation are generally less pronounced for elliptic equations unless they are nonlinear. In this case, the coefficient matrix usually must be reestablished at each iteration. Because collocation coefficient matrices are formulated with very little computational effort, the method is particularly attractive for these problems.
REFERENCES Angel, E. S., "Dynamic Programming and Linear Partial Differential Equations," J. Math. Appl.,
Anal.
23, p. 628, 1968.
Aris, R., The Mathematical
Theory of Diffusion
and Reaction in Permeable
Catalysts,
Vols. 1 and 2,
Oxford University Press. N e w York, 1975. Bauer, L. and E. L. Reiss, "Block Five Diagonal Matrices and the Fast Numerical Solution of the Biharmonic Equation," Math. Comput., 26, p. 311. 1972.
References
483
Bell, Ê., "A Refined Triangular Plate Bending Finite Element," Int. J. Numer. Methods Engi., 1. p. 101. 1969. Benson, A. and D. J. Evans, "The Successive Peripheral Block Overrelaxation Method," J. Inst. Math.
Appl.,
9 , p. 68. 1972.
Benson. A. and D. J. Evans, "Successive Peripheral Over-Relaxation and Other Block Methods," J. Comp.
Phys., 21. p. 1, 1976.
Birkhoff, G. and S. Gulati, "Optimal Few-Point Discretizations of Linear Source Problems," SIAMJ.
Numer. Anal.,
11, p. 700, 1974.
Birkhoff, G.. R. S. Varga, and D. Young, "Alternating Direction Implicit Methods," in Advances in Computers, Vol. 3, Academic Press, N e w York, 1962, p. 190. Bramble. J. H. and Â. E. Hubbard, "On the Formulation of Finite Difference Analogues of the Dirichlet Problem for Poisson's Equation," Numer.
Math,
4, p. 313, 1962.
Bramble, J. H. and Â. E. Hubbard, "A Finite Difference Analog of the Neumann Problem for Poisson's Equation," SIAM
J. Numer. Anal.,
2, p. 1, 1965.
Brandt, Α., "Generalized Local Maximum Principles for Finite-Difference Operators,"
Math.
27, p. 685, 1973.
Comput..
Brebbia, C. Α.. "The Boundary 189.
Element Method for Engineers,"
Pentcch Press, London, 1978. p.
Butlin. G. and R. Ford, "A Compatible Triangular Plate Bending Finite Element," Int. J. Solids Struct.,
6. ñ 323. 1970.
Buzbee, B. L., G. H. Golub, and C. W. Nielson, "On Direct Methods for Solving Poisson's Equations," SIAMJ
Numer. Anal..
7. p. 627, 1970.
Carre. Â. Α., "The Determination of the Optimum Accelerating Factor for Successive Overrelaxation," Comput. J.. 4, p. 73. 1961. Clough, R. W. and J. L. Tocher, "Finite Element Stiffness Matrices for Analysis of Plate Bending," Proceedings. Conference on Matrix Methods in Structural Mechanics, A F F D L , TR-66-80, Wright-Patterson Air Force Base, Ohio. 1966. p. 515. Collins, D. C and E. S. Angel, "The Diagonal Decomposition Technique Applied to the Dynamic Programming Solution of Elliptic Partial Differential Equations," J. Math. Anal. Appl., 33, p. 467, 1971. Cowper. G. R , E. Kosko. G. M. Lindberg. and M. D. Olson. "Static and Dynamic Applications of a High Precision Triangular Plate Bending Element," AIAA J.. 17, p. 1957, 1969. Delia Torre. E. and W. Kinsner, "Convergence Properties of the Successive Extrapolated Relaxation (SER) Method," J. Inst. Math.
Appl.,
12, p. 175, 1973.
Distefano, N.. "Dynamic Programming and the Solution of the Biharmonic Equation," Int. J Numer.
Methods
Eng., 3, p. 199, 1971.
Dorr, F. W.. "Remarks on the Iterative Solution of the Neumann Problem on a Rectangle by Successive Line Overrelaxation," Math. Comput.. 23, p. 177, 1969. Dorr. F. W., "The Direct Solution of the Discrete Poisson Equation on a Rectangle," SIAM 12. p. 248. 1970. Douglas, J., "Alternating Direction Methods for Three Space Variables," Numer. 1962.
Math.,
4, p. 4 1 ,
Ehrlich, L. W . "Solving the Biharmonic Equation as Coupled Finite Difference Equations," J. Numer
Anal.,
Rev.,
SIAM
9, p. 278, 1971.
Ehrlich, L. W., "Solving the Biharmonic Equation in a Square," Commun.
ACM, 16, p. 711, 1973.
Ehrlich, L. W., "Point and Block SOR Applied to a Coupled Set of Difference Equations," Computing.
12, p. 181, 1974.
Evans, J. D., "The Extrapolated Modified Aitken Iteration Method for Solving Elliptic Difference Equations," Comput. J., 6. p. 193, 1963.
484
Elliptic Partial Differential Equations
Fairweather, G.. A. R. Gourlay, and A. R. Mitchell, "Some High Accuracy Difference Schemes with a Splitting Operator for Equations of Parabolic and Elliptic Type." Numer. Math., 10. p. 56, 1967. Fischer, D., G. Golub. O. Hald, C. Leiva. and O. Widlund. "On Fourier-Toeplitz Methods for Separable Elliptic Problems," Math. Comput., 28. p. 349. 1974. Gary. J.. "On Convergence Rates for Line Overrelaxation," Math.
Comput.,
21, p. 220, 1967.
Gourlay, A. R., "The Acceleration of the Peaceman-Rachford Method by Chebyshev Polynomials," Comput. J., 10, p. 378, 1968.
Gourlay, A. R., "On Chebyshev Acceleration Procedures for Alternating Direction Iterative Methods." J. Inst. Math.
Appl..
6. p. 1. 1970.
Gourlay, A. R. and A. R. Mitchell. "The Equivalence of Certain Alternating Direction and Locally One-Dimensional Difference Methods." SIAM J. Numer. Anal.. 6, p. 37, 1969. Hadjidimos, Α.. "On a Generalized Alternating Direction Implicit Method for Solving Laplace's Equation," Comput. J.. 11, p. 324, 1968. Hadjidimos, Α., "Extrapolated Alternating Direction Implicit Iterative Methods," BIT. 10. p. 465, 1970. Hadjidimos, Α.. "Optimum Extrapolated ADI Intcrative Difference Schemes for the Solution of Laplace's Equation in Three Space Variables." Comput. J.. 14, p. 179, 1971. Hagcman, L. A. and R. B. Kellogg. "Estimating Optimum Overrelaxation Parameters." Comput..
Math.
22. p. 60, 1968.
Hayes. L. J., R. P. Kendall, and M. F. Wheeler, "The Treatment of Sources and Sinks in Steady-State Reservoir Engineering Simulations," in Advances in Computer Methods for Partial Differential Equations. Vol. 2 (R. Vichncvetsky, cd.). IMACS, Bethlehem. Pcnn.. p. 301, 1977. Hockney, R. W., "A Fast Direct Solution of Poisson's Equation Using Fourier Analysis," J. ACM. 12. p. 95, 1965. Iordanidis, Ê. I., "Numerical Solution of the Third Boundary Value Problem for Laplace's Equation," J. Inst. Math.
Appl..
8. p. 308. 1971.
Jacobs, D. A. H., "The Strongly Implicit Procedure for Biharmonic Problems." J. Comput.
Phvs..
13, p. 303. 1973. Jaswon, M. A. and A. R. Ponter. "An Integral Equation Solution of the Torsion Problem," Ñ roc. R. Soc. Ser. A.
273, p. 237. 1963.
Jaswon, M. A. and G. T. Symm, Integral
Equation
Methods
in Potential
Theorx and
Elastoslatics,
Academic Press, N e w York. 1977. Jones. D. J., J. C. South, Jr., and Å. B. Klunkcr, "On the Numerical Solution of Elliptic Partial Differential Equations by the Method of Lines," J. Comput.
Phys.. 9 , p. 496, 1972.
Keast, P. and A. R. Mitchell, "Finite Difference Solution of the Third Boundary Problem in Elliptic and Parabolic Equations," Numer.
Math..
10, p. 67, 1967.
Kincaid. D. R. and D . M. Young. "The Modified Successive Overrelaxation Method with Fixed Parameters." Math.
Comput..
26. p. 705. 1972.
Kulsrud. Η. E., "A Practical Technique for the Determination of the Optimum Relaxation Factor of the Successive Overrelaxation Method." Commun. ACM. 4. p. 184. 1961. Lambiotte, J. J., Jr. and R. G. Voigt, "The Solution of Tridiagonal Systems on the C D C STAR-100 Computer," ACM.
Trans.
Math.
Software.
1, p. 308. 1975.
Liggett, J. Α., "Location of Free Surface in Porous Media." ASCE 1977.
Hydraul.
Div.. 103, p. 353,
Mallinson, G. D . and G. Davis, "The Method of False Transient for the Solution of Coupled Elliptic Equations," J. Comput. Phys.. 12, p. 435, 1973. Martin. E. D . , "Direct Numerical Solution of Three-Dimensional Equations Containing Elliptic Operators." Int. J. Numer.
Methods
Eng., 6, p. 201, 1973.
References
485
Mitchell. A R.. "An Introduction to the Mathematics of the Finite Element Method." in The Mathematics
of Finite
Elements and Applications
(J. R Whitcman, e d ) . Academic Press. N e w
York. 1973. p. 37 Mitchell, A. R. and G. Fairweather, "Improved Forms of the Alternating Direction Methods of Douglas. Peaceman and Rachford for Solving Parabolic and Elliptic Equations." Numer Math
. 6. p. 285. 1964
Noble, B.. "The Numerical Solution of Integral Equations" in The State of the Art in
Numerical
Analysis ( D . Jacobs, e d ) . Academic Press, New York, 1977, ñ 915. Odcn. J T.. "Finite Element Applications in Mathematical Physics," in Mathematics Elements with Applications
Parter. S. V.. "On Two-Line Iterative Methods for the Laplace and Biharmonic Equations." Numer. Pinder. G
F. and W
Math.,
of Finite
(J. R. Whiteman. e d ) . Academic Press, N e w York, 1973. p. 239. Difference
1, p. 240, 1959.
G. Gray, Finite
Element
Simulation
in Surface
and Subsurface
Hydrology,
Academic Press. New York. 1977. Rcid. J. K., ed.. Large Sparse Sets of Linear
Equations,
Academic Press. New York. 1971.
Rosscr. J B., "Nine-Point Difference Solutions for Poisson's Equation," Comput. Math. Appl.. I. p. 351, 1975 Savior. Ñ Å. and J. D. Sebastian. "Calculation of Optimum Parameters for A D I Procedures." Commun.
ACM.
16, p. 633, 1973.
Segui. W. Τ . "Computer Programs for the Solution of Systems of Linear Algebraic Equations." Int. J. Numer
Methods
Eng.. 7, p. 479. 1973.
Stone. Η L.. "Iterative Solution of Implicit Approximations of Multidimensional Partial Differential Equations." SIAMJ
5 , p. 530. 1968.
Numer. Anal..
Stone. Η S . "Parallel Tridiagonal Equation Solvers," ACM Trans. Math Software.
1, p. 289, 1975.
Stoutcmyer. D. R.. "Numerical Implementation of the Schwarz Alternating Procedure for Elliptic Partial Differential Equations," SIAMJ. Numer. Anal.. 10. p. 308. 1973. Strang. G. and G. J. Fix. An Analysis
of the Finite
Element
Method.
Prentice-Hall. Englewood
Cliffs. N.J., 1973. Sweet. R Α., "Direct Methods for the Solution of Poisson's Equation on a Staggered Grid." J. Comput.
Pins..
12. p. 422. 1973.
Tang. D. H., personal communication. 1979. Tee, Ci J.. "A Novel Finite-Difference Approximation to the Biharmonic Operator." Comput. J.. 6. ñ 177, 1963. Tinney. W F and W. S. Meyer, "Solution of Large Sparse Systems by Ordered Triangular Factorization." IEEE
Trans. Autom.
Control,
18, p. 333. 1973.
van Linde, H. J., "High-Order Finite Difference Methods for Poisson's Equation." Math. 28, p. 369. 1974.
Comput.,
Weinstein, H. G.. H. L. Stone, and Τ. V. Kwan, "Iterative Procedure for Solution of Systems of Parabolic and Elliptic Equations in Three Dimensions," Ind. Eng. Chem. Fund., 8. p. 281, 1969 Williams, F. W., "Comparison between Sparse Stiffness Matrix and Sub-structure Methods," Int. J
Numer.
Methods
Eng.. 5 , p. 383. 1973.
Wood. W. L , "Periodicity Effects on the Iterative Solution of Elliptic Difference Equations." SIAMJ.
Numer. Anal..
8, p. 439. 1971
Young, D., "On Richardson's Method for Solving Linear Systems with Positive Definite Matrices." J. Math.
Phys., 32, p. 243, 1954.
Young, D M., "Convergence Properties of the Symmetric and Unsymmctric Successive Overrelaxation Methods and Relaxation Methods.' Math. Young, D. M.. Iterative
Solution of Ijarge
Linear
Comput., 24, p. 793. 1970.
Systems, Academic Press. N e w York. 1971
Hyperbolic Partial Differential Equations
6.0
INTRODUCTION
This chapter is devoted to the discussion of hyperbolic partial differential equations. We noted in Chapter 1 that hyperbolic PDEs are characterized by curves or surfaces in space-time known as characteristics. Across these surfaces, derivatives of state variables such as velocity may have discontinuities. It is this discontinuous nature of the solution that gives rise to difficulties when standard numerical procedures are employed. Although there may be discontinuities across characteristics, the solution along characteristics is generally smooth. Thus one is tempted to integrate numerically along characteristics. In this procedure one must first establish the characteristic directions and then integrate in these directions. In one space variable this approach has achieved some degree of success. Two space dimensions, however, are another matter. Special algorithms are necessary for edge and corner conditions, and the resulting computer program evolves into a code of such complexity that n o programs of general applicability currently exist, although numerous attempts have been made. In this chapter we d o not consider the method of characteristics but rather focus on semidiscretization procedures. Finite element, finite difference, and collocation generally fall within the class of semidiscretization methods. This implies that the equations are numerically integrated in time and space in essentially orthogonal directions. We shall see that this procedure results in numerical errors of two kinds. In the neighborhood of sharp fronts, the numerical solution is characterized by either oscillations and overshoot relative to the analytic solution or smearing. The cause of these numerical phenomena can be traced to the wave propagation characteristics of the various numerical schemes. When waves are translated with incorrect phase, oscillations develop. When the waves are numerically overdamped, numerical smearing results. T h u s in the discussion of each numerical procedure we must examine the associated phase and amplitude errors. 486
Equations of Hyperbolic Type
487
In programs designed specifically to accommodate shocks, Lagrangian meshes (i.e., meshes that move with a material particle) are often used. There are certainly advantages to using this type of formulation provided that the computed deformations are not too great. Problems involving large deformations sometimes lead to mesh distortions which are of such severity that calculations cannot proceed. Various methods have been developed to attempt to circumvent these difficulties. In this chapter we implicitly assume an Eulerian mesh wherein boundaries and material surfaces move across mesh lines. The resulting methodology, however, can, in general, be transferred to a Lagrangian formulation. As in previous chapters, we first consider finite difference methods and subsequently finite element techniques.
6.1
EQUATIONS O F HYPERBOLIC TYPE
There are many forms of the model hyperbolic P D E that we use in analyzing various numerical techniques. These range from the simple one-dependentvariable first-order P D E through the multiple-dependent-variable second-order P D E with as many as three space variables. Let us start with the case (6.1.1)
a(x, y u)u y
x
+ b(x, >\ u)u
y
= c(x, y, u)
with initial and boundary conditions (6.1.2)
u(0,y)
= f(y),
(6.1.3)
u(x,0)=u (x),
0^y<\, x5*0.
0
Sometimes the additional condition u(x,l)=u (x)
(6.1.4)
l
may be added, but one must keep in mind that this becomes an overspecified system and may not be well posed. A simple example of (6.1.1) might be (6.1.5)
u + x
bu =Q, r
which is the advective or convective transport equation. The solution of (6.1.1) follows from the characteristics
Hyperbolic Partial Differential Equations
488
and (6.1-7)
£ = ±. ax a
In a more general sense, we may write ( 6 . 1 . 1 ) as
where [A], [B], a n d {c} are appropriate matrices. There are certain requirements on [A] a n d [B], such as that [ Λ ] - λ [ 5 ] must have real eigenvalues (usually distinct and positive) and a complete linearly independent set of eigenvectors. We might also write ( 6 . 1 . 8 ) as
<«."> [,]{|} [ ]{^} [ ]{^} (Ε,{^} = 0 . + β
+
Ο
+
(
where three space dimensions are involved. Another version of the model hyperbolic P D E is the so-called conservative form. (6.1.10)
l £ ! |
dy } = (0),
3 +
Ψ
where (} = {
<«•>·»>
{ e H M S H - i -
where [Φ'(Μ)] = È { Φ } / 8 ( Μ } = Jacobian matrix. This compares directly to ( 6 . 1 . 8 ) , and the constraints on [Φ'(Μ)] required to ensure hyperbolicity are as given above. As a simple illustration we could take
«<
+
(6.1.12)
Ur') 0 =
or M + V
uu
r
= 0.
Thus Φ = ί « and φ ' = « . It is of interest to note that whereas we can always derive an equation of the form ( 6 . 1 . 1 1 ) from ( 6 . 1 . 1 0 ) , the process is not always reversible. Thus we shall 2
consider ( 6 . 1 . 8 ) a n d ( 6 . 1 . 1 0 ) or ( 6 . 1 . 1 1 ) separately.
Finite Difference of Partial Differential Equations
489
Another model hyperbolic P D E (the wave equation) can be written as (6.1.13)
u
= bu .
b =constant>0
2
xx
2
rr
or (6.1.14) together with initial and boundary conditions (see later sections for a further discussion on these conditions) u(0,y)
=
f(y)
«v(o. y) =
My)
0*s y ^ l
u(x,0)=u (x) 0
x>0.
u(xj)=u (x) ]
Obviously, we need compatibility at the corners [i.e., / ( 0 ) = « ( 0 ) and / ( 1 ) = «i(0)]. Further, we may extend (6.1.14) to three space dimensions in the form 0
(6.1.16)
«„
«,„· + " , .
=
1
1 ;
+ «„„·
In the analysis to follow we start with the simpler case and work toward the more difficult.
6.2 FINITE DIFFERENCE SOLUTION OF FIRST-ORDER SCALAR HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS Perhaps the simplest model hyperbolic P D E we can consider is the transport or advection equation (6.1.5), (6.2.1) (6.2.2) (6.2.3)
u + bu =0, x
y
M
fe
= constant>0
( , >•)=/(>>) 0
u{x,0)=u (x). 0
In some cases a computational boundary condition (6.2.4)
u(x,l)=u (x) l
is added in order to employ certain numerical schemes. It must be kept in mind, however, that the problem is consequently overspecified.
490
Hyperbolic Partial Differential Equations
There are many finite difference approximations to (6.2.1). We could, for example, central-difference u and u , or alternatively forward-difference u and central-difference u . The number of combinations are almost unlimited. T o illustrate this point we tabulate a few of these in Table 6.1. We indicate the differencing approach used, the stability features, the mesh point arrangement, and whether the method is explicit or implicit. While we have used a simple procedure for developing the finite difference forms in Table 6.1, Pearce and Mitchell (1962) employ a different approach which uses the characteristics of (6.2.1) directly. They show, as an illustration, that (6.2.5) can be obtained directly by noting the error of the two finite difference approximations. x
v
x
v
Pearce and Mitchell also suggest a combination of (6.2.8) and (6.2.11) as a viable algorithm. Thus one would use (6.2.8) in the form i, o,\ (6.2.8')
/, bh \ bh Μ , - Η . , = ( l - y )«,., + -£-!.,.,-,
, for
„ bh 0 < y < l
and (6.2.11) in the form bh , -ι . ,,\ (6.2.1 Γ) r
κ
Γ + 1
1
.,= '
+
k
l~h
Urs
k
'
M""
r + 1
' "' v
.
bh T
A:
+
Both ranges of bh /k correspond to stable algorithms (see Table 6.1) and both are 0 ( 1 , 1 ) . Furthermore, although (6.2.1 Γ) is implicit, in that two values are involved on the r + 1 line, if one proceeds along an r + 1 line from left to right . the process is actually explicit because the only unknown is u r+
6.2.1
U i
Stability, Truncation Error, and Other Features
The finite difference forms for (6.2.1) given in Table 6.1 are only a sampling of those possible. Other forms are presented in Section 6.2.2. For the moment, however, we wish to establish the stability, truncation error, and other features of the present approximations. We do this only for certain selected items in Table 6.1, which illustrate the major features. We begin the discussion with the central-central form (6.2.5) it.
Ô Ο
(6.2.5)
U
r+\.i
~
T h
U
r-\.s
,
U L
r.s+
"r..i- I _
I ~
+ b
Y
k
r.
-0,
which is frequently referred to as the leapfrog formula. Defining (6-2.12)
~
P
=
b
4
Finite Difference of Partial Differential Equations
491
as the Courant number, we may rewrite (6.2.5) as «,+1., = « , - ! . , - P ( « , . , + 1 - « , . « - 1 ) ·
(6·2.5')
Now let us carry out a von Neumann stability analysis. We first substitute i e' in (6.2.5') to yield r
Psk
i =
i- -p(e« -e-'l"'). i
k
But we can substitute the Euler identity, e**-e~**=2isin|8*, into this expression to obtain £ +(2p/sin/3&)£-I=0. 2
The roots of this equation (the amplification factors) are £ =
-
ipsinfik
±\jl
- p sin /3,V . 2
2
If p s i n / 3 / c > l , then the absolute value of one of these roots exceeds unity; if p s i n / 3 f c < l , then both roots satisfy | ξ | < 1 . Thus the stability condition is ρ sin /3A < l or, assuming that the maximum value for sin fik must be considered possible, (6.2.13)
P
as given in Table 6.1. This, of course, compares to the condition ρ < j that we observed for the model parabolic PDE. Next, we turn to (6.2.7), which we write as u,
(6-2.7')
r+
s
= u_ , - 2 ρ ( « r
(
Λ
(
- u
r
_,).
s
If we substitute as before, there results -2u(l-e-"*) = i--i. Again using the Euler identity and the relationship +
=2cos/M:,
we obtain | +2p(l-cos/3A: + / s i n ^ ) ^ - l = 0 . 2
492
(6.2.7)
(6.2.6)
(6 2 5)
«,,. i A
«,-■.,«,,,
«W,
2Λ
"r.,+fc*,..+ ■ " ^ - '
—
",...,
1-ft
inite Difference Form
= 0
= 0
—0
C
_
B
F-C
C —C
Symbolic Difference
'
Unstable
Unstable
~7T
Stability
Explicit
Explicit
Explicit
Explicit or Implicit
TABLE 6.1. Various Finite Difference Forms for ux + huv = 0
r.s-1
Λ\.
1
I
o. .<[ -
r, s -
'■
J
l,s
1.J
V - i.s
}r+
)r+
O-'·5
Computational Molecule
r, < + 1
-o
τΟ
ο-ό
Ο:·
ό'. & ο.
áú
©—Ο
Ο.
å
Ο:·
:s
1
-Â £
11
Χ>
Γ3
BQ
I
U I
υ
υ
ι il-
ea I ο II
ο II
(Í
+
+
+
Γ *
(Í
(Í
493
+
494
Hyperbolic Partial Differential Equations
For simplicity we now take 5ΐηβÉ( = 0 and cos/3& = — 1 (this does not change the results), so that the roots are £= -2p±\/l+4p . 2
For any p > 0 (or for any b>0), one of the roots always exceeds unity, no matter how small ρ is. Thus (6.2.7) is unstable, as indicated in Table 6.1. It is necessary to add a word of caution at this point. The results on stability given above and those in Table 6.1 hold for b>0. The case b<0 may or may not be the same. Consider, for example, the two equations (6.2.8)
p*sl
(6.2.11)
p
b>0
for
but unstable for
b>0
for
but unstable for
b<0 b<0.
Thus some care must be used in extending directly the results in Table 6.1 to the case b<0. Perhaps it is worth pursuing this last point a little further. Suppose that we represent the model hyperbolic P D E as (6.2.14)
u — bu x
v
=0,
corresponding to b<0, and impose the initial condition u(0, y) = exp(iay). The exact solution is u(x, y) — e\p[ia(y + bx)]. Thus all modes of the initial condition are carried with equal speed b, undisturbed and undamped. However, through a specific choice of a, a wide class of functions κ(0, y) can be formed by superposing various trigonometric initial data. Each component can possess an arbitrarily assigned amplitude and by summing up the component solutions for different o's, the solution of the P D E with the generalized initial data can be obtained. Any number of component solutions can be perturbed and the result is an equivalent (small) perturbation in the solution; thus the model P D E is itself well posed. Suppose, however, that we finite-difference (6.2.14) using the forwardcentral approximation (6.2.6) and impose the same initial conditions as above. This yields (6.2.15)
u r+l,s u
0
s
—
h
U
= b
T.s+ 1
—U 2k
= exp(iay) = exp(task).
The exact solution is (6.2.16)
u ^ = (1 + ipsinak)* r
exp(iay).
As A, k -»0, (6.2.16) converges uniformly to u{x, y); the same holds true for all
Finite Difference of Partial Differential Equations
495
components and their sum. However, a stability analysis which ignores the initial conditions reveals that the finite difference approximation is unstable (it is unstable, in fact, if b < 0 or b > 0 ) . Thus some components of the perturbations introduced by the computation with (6.2.15) cannot be represented by the trigonometric data and grow out of bounds. Shortly, we return to this case and show how its instability can be corrected to yield a stable algorithm (i.e., the Lax-Wendroff method). Because we are considering the special model hyperbolic P D E , (6.2.1), it is apparent that the characteristics play an important role in the analysis. This was clearly pointed out by Pearce and Mitchell (1962). Thus on a mesh in (JC, y) space, the backward drawn characteristic from the mesh point u prescribes the value from the r t h line that should be allocated to u , . In any explicit finite difference equation using the lines r and r + 1, however, this value must be approximated by interpolation between values at the rth-line mesh points. It is a consequence of the Courant-Friedrichs-Lewy ( C F L ) convergence condition that these must include points on either side of that indicated by the characteristic. Stated in an alternative way, this condition specifies that for convergence to occur, the zone of dependence of the difference equation must include the zone of dependence of the differential equation. In the cases considered here, the C F L condition is exactly equivalent to the stability bound; that is, for (6.2.8) the convergence bound is p < 1. We have already mentioned that the truncation error can be ascertained by inspection of the specific difference used; thus (6.2.8), for example, would be 0 ( 1 , 1 ) . This can also be shown through Taylor series expansions. Rewriting (6.2.8) as r + l
r+
u
(6·2.8')
r + [ s
= (\-p)u
r
+ pu
s
r
s
s
_!
s
and developing the series about (r, s), Ur <.s
= [u + h»* + lh u +
" ,s-\
= [u~ku
•·-],
2
xx
+
r
+ \k u
]
2
v
s
y y
r
s
,
we form [u + hu + {h u 2
x
xx
+•••}
Canceling terms for u (6.2.17)
r
s
«
Ι+
r
=(\-p)u
and pu
r
s
r
s
+ p[u-
_
2
y
yy
- ···]
, there results
Κ =- | Κ +|^« =
ku + {k u
2 ë κ * , + \bku
yv
ì ι
, + ..· + ••• .
Thus the truncation error is 0 ( A , k) or 0 ( 1 , 1 ) , as suggested previously.
r s
.
496
Hyperbolic Partial Differential Equations
There are many other interesting features associated with the finite difference approximations in Table 6.1. As an illustration consider (6.2.5), the leapfrog method, which has good accuracy, 0 ( 2 , 2 ) , and a conditional stability bound. To initiate the use of this algorithm it is necessary that both u and u , (s = 0 , 1 , 2 , . . . , T V , N+1) be available; the algorithm can calculate the third line. Of course, after this the algorithm proceeds without any difficulty. are specified by However, neither the line w, nor the boundary values u the problem. These conditions are extraneous and the manner in which they are specified may affect the stability characteristics of the algorithm. Note that this problem comes about because the first-order derivatives are replaced with higher-order (second) differences. This is not an unusual problem in solving data are usually obtained via Taylor series expanODEs. The extraneous u sions using « and the P D E itself; we do not concern ourselves with this but rather with the influence of u , . At least two approaches seem reasonable: 0 s
t
r
t
N
+
{
L s
0 s
r
_ ^'
r,N+\
u
Λ
+ ι
r.N
/ the gradient inu in the >-direction, I u , is assumed small
,
\
u
v
(ϋ) _ j ,
/ average the values at r + 1 and r — 1 but \ at the N t h column.
When inserted into (6.2.5), these approximations yield (6.2.18)
« , + I..V - « r - Ι . Λ ί
+ñ(«,.ΛΓ-«Γ.ΛΤ-Ι)=0
and (6.2.19)
+
1 l + p/2
•
N
+
l + p/2'
respectively. A von N e u m a n n analysis on each equation yields (6.2.20)
I - j + p [ ( l - c o s fik) + /sin fik] = 0
and
K
ξ-IZjVl.I
2 21)
( 6 O
L
L
i
)
ò
l + p/2
ξ
L— -ifiL e
\+
=0
p/2
e
It is not too difficult to show that (6.2.20) is unstable (i.e., that | £ | > 1) and that (6.2.21) is conditionally stable (i.e., f | | < 1). Once again this illustrates the care that must be used in selecting finite difference approximations.
Finite Difference of Partial Differential Equations
6.2.2
497
Other Approximations
All of the finite difference approximations in Table 6.1 follow by direct replacement of the appropriate derivatives with difference approximations. There exist a number of other approximations which are developed in a more subtle manner and yet which have found extensive use in the literature. In this section we present some of these new approximations. We also establish the amplification factor and the truncation error associated with the approximations. This information will prove useful in a later section where we develop additional interesting approximations. Let us start by returning to the forward-central F —C approximation of Table 6.1, (6.2.6), which we write in the form (6.2.6')
[F-C]
This approximation is explicit, of formal order 0(1,2), but unstable. The local truncation error may be developed via Taylor series, * 1 u,, + +hl « + hu, + — — M
(6.2.22)
k
-u
+ ku -—u y
A-
k
2
k
}
7,
2
yy
+
3 X
+
—u yy
After rearrangement and cancellation, this yields at r, s.
(6.2.23)
u + bu = - ^ x
y
(
1
. -
-
4 - «
3
If one now invokes the original PDE, u + bu =0 may further write (6.2.23) as ( * τ > ë \
(6.2.24)
ι ,
« , + bu = y
hb
2
bk
h
2
- —
M
3
r
+
to yield u =b u . 2
r
x
a
xx
2
- —u
ix
^
+
yy
we
[F-C]
Some authors, such as Warming and Hyett (1974), prefer not to use the original PDE to yield (6.2.24); instead, they eliminate u by repeated differentiation of (6.2.23) itself. This follows because (6.2.23) is the actual form of the finite difference approximation. We shall return to this approach shortly. x
x
498
Hyperbolic Partial Differential Equations
The amplification factor can be established using von N e u m a n n ' s approach to generate
or i
F C
= 1 - f'psinβ/c.
But since this is a complex number, the absolute value of ξ is (6.2.25)
||
| = (l + p sin /3A:)' , 2
F C
2
[F-C]
/2
which is always greater than 1 (unstable) when p¥=0. Because (6.2.6') is unstable, Lax suggested that the term u the average at the s + 1 and s — 1 lines, that is,
r
"r.i
=
H«,.,+
s
be replaced by
l+W,,,-|)-
This then yields (6.2.26)
+
+
[L]
The local truncation error, obtained in exactly the same manner as before, is h k u + bu = - - u „ + 2j; VY
h ~-J ix
2
2
or, using u
xx
=
y
3y
2
yv
u + bu = x
{(\-p )!ju 2
f
~ ^ u The formal truncation error is 0(h,k , 2
vr
- b k u 2
)
x
k /h).
X
r
+ - -
.
[L]
The amplification factor is
2
= J- ( e * + e~ '<"<) - I ( e " * - e~* ) k
L
+ •••
2
bu ,
(6.2.27)
i
~bk u
u
U
x
k
= cos file - ι ρ sin fik
or (6.2.28)
| £ J = (cos 0A: + p s i n j 3 A : ) ' , 2
2
2
/ 2
[L]
Finite Difference of Partial Differential Equations
499
which is less than 1 if | p | < l . Thus the Lax method is explicit, of order equivalent to the F — C approximation, and conditionally stable. Returning to other forms in Table 6.1, we consider the forward-backward F —Â approximation (6.2.8) and the central-central C —C or leapfrog approximation (6.2.5). Equation (6.2.8) written as (6.2.8')
«Γ+Ι.Ι=(1-Ñ)«Γ., +
[F-B]
Ñ«Γ.,-Ι
is explicit, of formal order 0(1,1), and conditionally stable. Equation (6.2.5) written as (6.2.5')
"r+\.s
=
U
~ P(«r.,+ I
r~l.>
_
«r.s-
[C-C]
1)
is also explicit, of formal order 0 ( 2 , 2 ) , and conditionally stable. The explicit truncation error forms are, respectively, h u + bu = - -z u
(6.2.29)
x
v
h - -ru 2
Xi
+ \bku
vr
- bk u . 2
3x
3l
h k = Z P O - P ) y «,·,· - ^ « 3 , ~ bk u 2
+ •••
2
2
3v
+ •••
[F-B]
and u +bu
(6.2.30)
x
= -lp(\-?)!£u .+
r
[C-C]
••• .
3}
The corresponding amplification factors are £
F B
= 1 — p( 1 —cosβk
+ /sin/Mr ) = (1 — ρ + pcosfik)
—
ipsinfik
or, after some trigonometric manipulation. (6.2.31)
FBI
1/2
l-4p(l-p)sin (^) 2
and 1
ξ +(2ipύnβk)ζ -]=0. 2
cc
cc
The roots are £
c c
= - /psin β * ± / l -
p un fik 2
2
[F-B]
500
Hyperbolic Partial Differential Equations
and thus (6.2.32)
|iccl=10.
[C-C]
It is interesting to note that the F —C approximation is unstable while the C - C or leapfrog is stable (actually, it is marginally stable, since | £ | = 1.0). The problem in the former is that u is approximated around the line r; if, instead, it is centered at r + {, one gets an equivalent leapfrog scheme with its attached stability. Perhaps the most popular formula is the Lax-Wendroff ( L - W ) scheme, which we write here in the form (an equivalent two-step predictor-corrector form will be presented later) c c
v
(6.2.33)
u
= (\--o )u -p(\-- )u ,
+ ^(\
2
r+UK
ri
p
r s+]
+ p)u _ rs
r
[L-W]
This formula may be derived in many ways, but the simplest is to represent the PDE by u, + bu =
(6.2.34)
i
b hu 2
2
v
yv
and then to finite-difference this expression,
(6.2.35)
r-
—
which becomes (6.2.33). It is interesting to note that the Lax form (6.2.26) can be obtained in the same way but with the P D E
+Κ =
"Λ
k
2
2h "U
Further, we observe from the finite differencing in (6.2.35) (and in the Lax approximation) that one starts with the unstable F —C approximation and adds a correction term {b hu to yield (shown shortly) a stable approximation. The truncation error for the Lax-Wendroff approximation is obtained as 2
vv
M, +
bu . = %
h
.
+ {hb u 2
vv
-
Λ
2
y «
3
<
-
bk
^
"
3
,
+
Finite Difference of Partial Differential Equations
501
or as ,,*»,* (6.2.36)
,
I
L
>
hl
2
u + bu = | - — x
\
h b 2
"
2
b
+ - γ J κ,.,, -—u^-
r
bk
k
2
-g-« - + 3 l
2
- T « 3 , - - T - « 3
V
[L-W]
. +
Thus the approximation is 0 ( 2 , 2 ) . If one follows the W a r m i n g - Hyett (1974) approach mentioned earlier, the analogous result is (6.2.37)
u + bu = - - ( k x
+ b h )uj
2
2
l
[L-W]
+•
2
i
The amplification factor follows in the usual way to yield £
= (l — p ) + \p (e 2
2
L W
I \
+*-"*)-
ll3k
Bk \\ I pk l-2p sin — 2
2
\
1
ip(e'»
k
- e' "»*)
—IPSINFIK
11
or (6.2.38)
I*LW|
1/2
l-4p (l-p )sin (^) 2
:
2
4
[L-WJ
when ρ *£ 1, |£| < 1 and thus the Lax-Wendroff approximation is conditionally stable. Further, it is explicit and of order 0(2,2). Following the development of Hirt (1968), we see another interesting point. The P D E (6.2.39)
u. + bu„
=
UM,
has solutions that grow exponentially with χ if v<0 but decrease when v>Q. Thus υ < 0 is an unstable situation, whereas υ > 0 is stable. If we now carry out a Lax-Wendroff finite differencing on (6.2.39) and analyze the truncation error, there results [analogous to (6.2.36)] (6.2.40)
hb
v- —
u + bu. r
2
, ]u„, + •
T o the appropriate order of the finite difference equation, the actual problem being solved is , ,
/
U + bU = \ r
u
hb \ 2
t ) - y
U,.,
Hyperbolic Partial Differential Equations
502
rather than the original hyperbolic P D E . Thus the finite difference approximation will have stable solutions only when hb
2 n
or hb
2
In the same sense, the F — C approximation yields an equation (6.2.24) with the form
(6.2.41)
Μ χ
+ Æη/ = - ^ ν
Μ
, , ,
[F-C]
which is always unstable; by contrast the F —Â approximation (6.2.29) yields
[F-B]
κ, + ί κ , Η Μ ί - ρ ) ^ " , , .
(6.2.42)
which is stable as long as 0 < p < l , as before. T h e Lax-Wendroff approximation overcomes the instability of the F —C approximation by introducing a numerical diffusion or viscosity. This converts the negative coefficient of u to a positive coefficient. We may also show the influence of the diffusion or viscosity term in a different way. Thus let us represent u by the finite difference approximation (we suppress r here) vr
Y
u
=
(H^K
± 1
-2/8« -(l-j8)ii _ J
1
I
2k so that β=0
=»
2k '
β =+\
=>
- ^—-
β = —1
=»
u —u ——
[central difference] [forward difference]
LL
ι
•
[backward difference]
Finite Difference of Partial Differential Equations
Rewriting our approximation of
503
as , fik j u -2u 2 \
_",+ t-«,-i Ik
s+l
+
s
k
u_ s
}
2
we see that we have, to second order, an approximation that is consistent with
,Pk U +
-yU ,.
y
rt
Thus if we use the initial approximation for M,„ we have a formula consistent with
, • u +
bβk bu --—u .
x
v
yv
For β>0 (forward differences), the method is unstable; for β<0 (backward differences), the method is stable; for β = 0 (central differences), the method displays neutral stability. By now it is apparent that proper centering of the difference approximation of u is important in establishing a stable approximation. The algorithm due to Wendroff is an excellent example of this idea. The algorithm is written as v
(6.2.43)
Mr+i.
i
«r. -|-jq4(ii
=
J
r
+
l
[W]
, - -«,.,). J
l
This approximation may be obtained by representing u at the r + \ level as the average of the derivatives at r and r + 1 and u at the s — { level as the average of the derivatives at 5 and s — 1. Thus v
x
« * l r
+
l / 2 . . - l / 2 -
" v t r + I / 2 . S - 1/2
2
l .
_ 1/ -
/j
n
U
2 {
'
r-H.s~ r+K s— U
J.
'
I
^r.s
ι
j
^r,s— 1
with the model hyperbolic P D E leads to (6.2.43). Alternatively, we could increase the value of s by one to yield (6.2.44)
« , i. +
1+
t= «,. -|^|(« 1
r +
,.,-« . r
I +
,).
[W]
From the development of (6.2.43) or (6.2.44), it is apparent that WendrofFs approximation is 0 ( 2 , 2 ) ; we shall not pursue this point further. However, using (6.2.44), the amplification factor is
504
Hyperbolic Partial Differential Equations
This may be converted, using some extensive trigonometric manipulations, to l+ptan (^) + /(l-p)tan^ 2
( 6
· · 2
4 5 )
u
l
=
TBTYX
Ik-
l
w
l
( l - p t a n ( ^ ) ) + /(l + p ) t a n ^ A careful analysis of (6.2.45) reveals that Wendroffs approximation is unconditionally stable. Thus Wendroffs method is formally implicit of order 0 ( 2 , 2 ) and stable. Actually, because only two points are involved on the r + 1 line, the use of (6.2.44) can be carried out in an explicit fashion, either line by line or column by column. Finally in this section we present a Crank-Nicolson approach in which u is central-differenced and averaged around the r and r + 1 lines. Thus we obtain 2
r
U
r+\.s
~
r,s
U
,
h
b I U
r+]
s
, ~
¥
2\
U
,
r+
s
_ ,
U,, + 5
| ~ »
2k
f
i
)
- | \
2k
_ -
I
or, rearranging. (6.2.46)
«,νι., =
« , . , - ? ( « , +
4
+ «,.
i + 1
-«
r i i
-,).
[C-N]
As with Wendroffs approximation, we d o not develop the explicit truncation error but merely state that the C r a n k - N i c o l s o n approximation is 0 ( 2 , 2 ) . The amplification factor for (6.2.46) is _
*
\ - \ p { e ' ^ - e - '
p
)
k
Me'V-e-'" )
l+
CN
1
or, after multiplication above and below by (1 — ( / / 2 ) p s i n fik), /, , «x (6.2.47)
>
(l-4^ sin /3*)-/psin/3A: , + , 2 / 2
£ C N =
V
2
2
[
C
_
N
1
and |€CNI =
I-0.
Thus the Crank-Nicolson approximation is implicit, of order 0 ( 2 , 2 ) , and neutrally stable. In the present case the calculation is truely implicit because three values are involved on the r + 1 line. Only if the system is overspecified in that u , Ç is given on y — 1 can the algorithm actually be used for the model hyperbolic PDE. Comments on this point are made in Section 6.4. r+
Finite Difference of Partial Differential Equations
505
We have written all of these formulas in terms of the point values u 1 u , . . . ; however, by use of operator notation, a more convenient arrangement can usually be made. Thus if we define the forward and backward operators r
(6.2.48a) (6.2.48b) such that
(4 + V )« ,., = « r
l
r
( Δ ,. - V , > , .
=
t
M
we may write the Lax-Wendroff, (6.2.33), (6.2.44), and (6.2.46), as
r +
(6.2.50)
[l + 4(l + p ) A , ]
(6.2.51)
r
.
l
i
+
| - 2 H
r
,
+
Wendroff, and Crank-Nicolson
l - f K +vJ + jp^-v,.)
(6.2.49)
I.J
r " , . H
M +
1+ !(Δ, + ν,) 6.2.3
W r + l
j
= [l + H l - p ) A , ]
«-+1.,=
M r
1-5(A,+V ) r
forms,
[L-W] .
t
[W] [C-N]
Dissipation and Dispersion
Thus far we have not considered the question of "nonsmooth" or discontinuous solutions. In many fluid dynamical flows, however, such shock waves and discontinuities are the major feature of the physical situation. Because of the large (if not infinite) gradients associated with these nonsmooth profiles, accurate numerical solutions may be extremely difficult to obtain. Nonsmooth initial and boundary conditions may be imposed on elliptic and parabolic PDEs. But in these systems there is a built-in feature to smooth out the discontinuities near the point of generation, and higher-order approximations will yield accurate results. In the hyperbolic PDE, however, a discontinuity in the initial data propagates directly into the domain of interest and causes considerable computational difficulty. To "capture" such shocks numerically, von Neumann and Richtmyer introduced the artificial viscosity method for computing in an inviscid flow field. A quadratic term in u(x, y) as a function of y is added to the differential equation before finite differencing [recall (6.2.34)]. The resulting dependence on the gradient assures a rapid decay of the viscous term away from the shock front.
506
Hyperbolic Partial Differential Equations
Of course, in the case of the model hyperbolic P D E of this section [i.e., u + bu = 0], shocks are present if and only if they were originally present in the initial or boundary data. In nonlinear hyperbolic PDEs, shocks may be generated within the field of solution. Further, for our model PDE, the exact solution shows no damping or amplification of a boundary-generated discontinuity and no reduction or increase in the speed of the discontinuity. Thus the model numerical solution with b — constant should have n o dissipation (damping) or dispersion (phase change); unfortunately, finite difference solutions d o exhibit these two properties and many finite difference algorithms have been constructed to minimize one or both features. In fact, a number of first, second, and even third-order explicit methods have been proposed, some of which include a pseudo-viscosity term and some that d o not. At this time there is a question as to which algorithm is "best", it may well be that no one algorithm will ever prove to be best in a general sense. In this section we wish to point out a number of these algorithms and specify their dissipation and dispersion properties with respect to the model hyperbolic PDE. x
y
Before we detail these features we can show how an addition of pseudoviscosity is actually carried out. Let us suppose that the finite difference approximation to the model parabolic P D E is of the form (6.2.52)
«
r + 1
, = u -^(u .,+ s
rs
r
,-«,.,_,) + !(«,
J +
,-2u, ,+
s
_,),
where σ is a coefficient of the pseudo-viscous approximation to u . von Neumann stability analysis, it can be shown that a must satisfy iv
By a
p «; a < 1 2
for stability. Clearly, we desire to choose ó to obtain the best shock resolution. However, many of the algorithms fix a as some predetermined value; for example, Lax (6.2.26):
a= 1
Lax-Wendroff (6.2.33):
a= p
[ F - B ] (6.2.8'):
σ= ρ
2
have all been used to generate viable algorithms. For our model hyperbolic PDE, u + bu = 0, we can assume an elementary solution of the form x
u(x,y)=
I
v
F e' - '^\ ,a x+
n
η = — oo
where the F coefficients are dependent upon the initial conditions imposed on n
Finite Difference of Partial Differential Equations
507
the model PDE. The parameters a„ and β are, respectively, the temporal and spatial frequencies of the «th component of the series. The parameter β„ is commonly referred to as the wave number and defined as β„ = 2ir/L , where L„ is the wavelength of the nth component of the series. Figure 6.1 graphically displays two conventional means of depicting the propagation of a given wavelength. Associated points in each diagram are labeled showing the correspondence that exists between each representation. Because of the linearity of the governing PDE, one can evoke the theory of superposition. Thus one can establish the eigenfunction relationship using an arbitrary term in the Fourier expansion, η
n
uη
1
» f
c
Substitution of this expression into the model PDE, u + bu = 0, yields the x
y
Im
X
χ
d = Re
θ
27Γ
C .±.01
)
initial
)
analytic
•)
wave wave
computed
after
L/u
( numer i c o l ) w a v e
after
L/u
" L " 27Γ
e-0|.tan-<(-i*t) x
— *t
= amplitude
2ir
[ t - b\
Rt î
'
ratio
I B<] » phase
lag
Figure 6.1. Graphical representation of two ways of depicting the propagation of a wave of a given wavelength.
508
Hyperbolic Partial Differential Equations
analytical expression relating temporal frequency and the wave number or spatial frequency, that is,
dx
dy
which yields a
n
=-*/»,.
Therefore, a typical term in the general solution to the P D E can be written as (6.2.53a)
U
h
=
yhfi *
F
m
+ .fi.Y>
=
pyfijY-hx)^
The amplitude of the nth component is defined by F„ and the translation is described by e' " ~ \ Let us now consider the behavior of the Fourier components in a numerical algorithm. W e assume that the solution to our numerical approximation to the P D E in question can be written in a form analogous to the analytical case, that is, fi
ly
bx
"= - ρ where a' is the temporal frequency of the numerical scheme and ρ corresponds to the integer number associated with the smallest wavelength that can be propagated by the numerical approximation, usually 2k. As in the case of the analytical operator, it is necessary to consider only one term of this series. n
When this expression is substituted into the numerical operator (i.e., the finite difference expression for the PDE), we obtain a relationship between the temporal frequency a' and other parameters in the difference expression. We write this symbolically as n
a'„ = a'„(k,
Λ,b,fi ). H
The functional form of will not be the same as (6.2.53a), owing to the discretization in space and time. Thus we would expect, and indeed observe, differences in the dissipation and translation properties of the numerical and analytical solutions. Now we examine how these arise and how they can be quantified. The coefficients describing the initial conditions for both the numerical a n d analytical expressions are the same. Thus at x=0 the analytical solution is
Finite Difference of Partial Differential Equations
509
represented numerically to the degree of accuracy provided by the numerical approximation. After an elapsed time of A, typical terms in the analytical and numerical solutions have the following form: (6 2 53b)
M
X +
* = Fei' » * ' « l a
-
(6.2.53c)
Μ
«+*
u y
(Jt+
"
a
)+, s
h
]
= ρ \·<*.*
,
β
= u„'{„'
^|.^.«+*κ./ί.
=
= u*e ""'» [
h]
( ί
+
·β„é\ \ia„h\ e
(analytical)
*)ΐ
= u^„
(numerical)
where £" and are considered to be the analytical and numerical amplification factors, respectively. The magnitude of the amplification factor can be interpreted as the ratio of the amplitude of the n t h Fourier component after an elapsed time of h to its amplitude at the beginning of the time step. After the nth component has traveled one complete wavelength, this dissipative ratio takes the form
|*" '·"·*Ί = |*" "*Ί '"=|{/\ β
(6.2.53d)
β
Α
where N„ is the number of time steps necessary to propagate the nth component through one wavelength, "
bh
It should be apparent from (6.2.53c) that the numerical scheme will be stable only if |£„| is bounded from above by unity for all n. Let us now consider the analytical equivalent of (6.2.53d). Introducing the relationship a„ = - bfi into the definition of the analytical amplification factor, we obtain, after propagation of one wavelength, n
| ιο„ΛΓ„Λ| _ | - i A 0 „ \ „ A | _ ?
e
l ^ - i A ^ A j ^ _ ^ ^» a
— j
Thus the analytical expression requires that, in the absence of numerical error, the nth component not change amplitude as a function of time. This is consistent with our understanding of the behavior of hyperbolic equations. We can now introduce a measure of the error in the amplification of component n, call it R , n
It \N.
Ιί
I*.
If the numerical solution propagates the nth component without amplification
Hyperbolic Partial Differential Equations
510
error, R„ = l. When R is less than unity, the amplitude of this component after the propagation of one wavelength is less than anticipated; when R„ is greater than unity, the opposite behavior is implied. Now we turn our attention to the evaluation of the phase error. This is the error associated with the translational property of each component. It can be expressed in terms of the real and imaginary parts of the eigenvalue. To visualize how this is possible, again consider Figure 6.1. The nth component of the numerical Fourier series expansion exhibits a phase angle of < P after one time step has elapsed. Figure 6.1 indicates that this angle can be calculated as n
nFD
φ
(6.2.54)
Λ ρ ο = 1 α η
-.(^).
After this component has propagated through one wavelength, the value of the numerical phase angle is N
nFD
Another measure is given by the ratio of numerical to analytical phase angle,
2m
•
Alternatively, one may analyze the numerical scheme one time step at a time. In one time step, the analytical wave propagates a distance Φ = 2m/N„. From our earlier definitions of N and β„ we can rewrite this relationship as 0
n
Ð
ð
where è — fi k. The translation of the numerical wave in one time step is given by (6.2.54). In this section we deal with errors generated on a per time step basis. Later in the chapter the solution is examined after the nth component has propagated one wavelength. T o illustrate the use of this formulation, let us select the F — Â approximation, (6.2.8'), and the Lax-Wendroff approximation, (6.2.33). In the first case we have ð
n
«, i . , = 0 - P > , . , + P«,.,-.,
(6-2.8')
+
for which, using (6.2.31), we have
£
FB
= [ l - p 0 - c o s / 3 / c ) ] - i p s i n 0*
Finite Difference of Partial Differential Equations
511
and I£FBI
l-4p(l-p)sin ^ 2
1/2
In the second case, we have (6.2.33)
u
= (\-p )u^-r (\-p)u +\p(\
+
2
r + U s
P
rs+]
p)u ^, rs
for which, using (6.2.38),
l-2pW(f)
LW
— ip sin βÀί
and
I*L W l
l-4p (l-p )sin<(^) 2
2
1/2
By selecting a series of è„ — fi„k, Roberts and Weiss (1966) developed the data in Table 6.2 for ρ = 0.05, 0.25, and 0.5. It illustrates dissipation or damping for one χ step. It is obvious that the Lax-Wendroff approximation introduces much less damping than the F — Â approximation. In fact, if we choose ρ = { and 2ir/fik = 6, then the F - B approximation (use 0.8660) damps the amplitude by about 50% in 5 Λ steps, whereas the Lax-Wendroff approximation (use 0.9763) requires 15 χ steps. Only when ρ — 0, corresponding to h -* 0, does this damping decrease. Unfortunately, this is in conflict with numerical computational efficiency.
TABLE 6.2.
Dissipation or Damping in F — Â and L—W Approximations
FB [from (6.2.31)] »N =
fink
18° 30° 45° 60° 90° 120° 180°
ρ =0.05 0.9977 0.9936 0.9860 0.9760 0.9513 0.9260 0.9000
LW [from (6.2.38)]
ρ =0.25 ρ =0.50 0.9908 0.9746 0.9435 0.9014 0.7906 0.6614 0.5000
0.9877 0.9659 0.9239 0.8660 0.7071 0.5000 0.0000
ρ =0.05
ρ =0.25
ρ =0.50
1.0000 1.0000 0.9999 0.9997 0.9988 0.9972 0.9950
0.9999 0.9995 0.9975 0.9926 0.9703 0.9318 0.8750
0.9998 0.9983 0.9919 0.9763 0.9014 0.7603 0.5000
Reprinted from Ê. V. Roberts and Í. Ο. Weiss "Convective Difference Schemes," Mathematics of Computation: Volume 20, Number 94, pages 272 and 281. by permission of the American Mathematical Society. © 1966 by the American Mathematical Society.
512
Hyperbolic Partial Differential Equations
Crowley (1967, 1968) presented two different algorithms. The first, which is 0 ( 2 , 2 ) and has the stability bound ρ < 2, can be written
(6.2.55)
Μ
γ +
ι,, = « , . , + ΐ ( « , .
+
1 +
1 + Μ .,-,) + ^ ( « , . Γ
^(«,. -2-2" .. -Ι+2Μ , 1
λ
Note that this uses the points u The amplification factor is
r
s + 2
ϊ
Γ
and u, _ s
2
Λ
+
1
J
- Μ
+
Γ
-2u
2
I +
2
r s
).
u _) rs
2
[C]
in addition to the usual values.
1/2
(6.2.56)
+
|i [ = c
[C]
The second algorithm is fourth order but we d o not reproduce the equations here. Rather, we show in Figure 6.2 a comparison of the damping for one χ step as a function of the wavelength 2 π/βλ: for the F - B , Lax-Wendroff, and fourth-order Crowley algorithms. The specific values ρ = 0 . 2 5 , 0.5, and 0.75 are used in Figure 6.2. As a general rule the more accurate the formula (i.e., higher-order truncation), the less damping occurs, especially at large values of p. In contrast to the F - B and Lax-Wendroff approximations, one can show that for ρ = 0 . 5 , damping to about one-half the initial amplitude takes about 64 χ steps (rather than 5 and 15, respectively). By contrast to these results we point out that the C - C or leapfrog approximation, (6.2.5), and the Crank-Nicolson approximation, (6.2.46), each have amplification factors equal to unity. These methods do, however, introduce phase error or dispersion, as we show shortly. Thus the mode is propagated undamped but at the wrong speed.
Wavelength
2 7 Γ / 0
η
*
Figure 6.2. Damping vs. wavelength for (I) F-B, (2) Lax-Wendroff, and (3) Crowley fourth-order algorithms (from Morton, 1971).
Finite Difference of Partial Differential Equations
513
We now wish to specify some additional algorithms, which are dissipation free. These are d u e to Roberts and Weiss (1966) and to Fromm (1968). In particular, Roberts and Weiss developed a series of algorithms of different orders which have the feature that | £ | = 1. The first of these, termed the angled derivative scheme (we call it RW,), is given by
(6.2.57)
u r+
[RW,]
I.
and has a phase shift of psin/?Ar (6.2.58)
-sm
'-
1 +|(l-cos0A)
[RW,]
l + |p (l-cos0A-) 2
Consideration of the location in the computational molecule of the values in (6.2.57) shows that it resembles the Saul-yev approximation considered in our discussion of parabolic PDEs. It is recommended that this form a n d an alternate one be used sequentially as the χ steps increase (alternate the two forms). The stability bound is — K p < 2 a n d the method is second order, 0(2,2). Another second-order form, termed the staggered scheme, with | p | < 2 is given by (6.2.59)
Μ
Λ + Ι . Ι ~ ~
M
R , j
2 ^
M
r
+
1/2.i+1
M
[RW ] 2
R +Ι / 2 . Λ - I )
with a phase shift (6.2.60)
Φ
[RW ]
2 sin ' ( § sinjB*).
RW,
2
A fourth-order scheme 0 ( 2 , 4 ) on a staggered mesh, | p | < 2 , is also presented as (6.2.61)
U
r + \ , s ~
U
Ρ
r,s
+
j
1
/ .
(
U
R + L / 2 . s + L
P
R + L / 2 . s - L )
2
ºÁ [ ~ ϊ ) ^ 1
M
U r + 1 / 2 s
~ ~" 3
3
r +
'
/ 2 ί
'' [RW,]
514
Hyperbolic Partial Differential Equations
with a phase shift (6.2.62)
sin fik
Φ ™ = ± ί η - |sin0A: 6 + 3
[RW,]
2
5
Fromm used a rather nice trick to develop a new algorithm with minimum phase error properties. First, he noticed that the Lax-Wendroff approximation has a lagging phase error, while the form r+\.s
U
= r.s-p{ U
[
2 V , ) V ,.«,, + j ρ V ?. H , .
+
2
s
has a leading phase error. Thus he proposed a straight averaging of the two forms. This yields u
(6.2.63)
r + U s
=u
+ ^(u _,
r s
- u , , + κ,,,.2
rs
r
+
+
+
-
u) rs
^( r,s-\-2»r,s+ r. \) U
U
s+
£
^ (
M
r ,
J
- 2 - 2 «
r
.
i
_ , + «,.J.
[F]
The amplification factor and phase error for (6.2.63) are also given by Fromm, but we do not detail them here. With this information in hand and the phase-angle equations [these come directly from the appropriate amplification factors and (6.2.54)]
Φ
Γ Í
= ΐ3η-'Ι
C N
Φ
å < :
Psmfl* ι > l-|p sin )3fc 2
=8ίη
2
Crank-Nicolson[C-N]
1
' ( — punfik)
[C — C]
— psinftA: _ ^ I 1 + p (cosy8A: — 1)
Lax-Wendroff[L-W]
•"=--1 T r ^ S ) I
<' '
4>
LW
=tan-'
r
2
F
B
we show Figure 6.3 taken from Morton (1971). Here the relative phase change is plotted versus the wavelength for a variety of different algorithms and ρ = 0 . 2 5 , 0.5, and 0.75. W e can see that the F —Â algorithm behaves badly except at ρ = 0 . 5 (also at ρ = 1, which is not shown); however, other schemes,
Finite Difference of Partial Differential Equations
5
p'0.25
P'O.i
Wavelength
515
P'0.75
2W/0 k n
Figure 6 3 . Relative phase change vs. wavelength: (l) F - B ; (2) Lax-Wendroff; (3) C-C; (4) Crowley, fourth order; (5) Crank-Nicolson; (6) Fromm; (7) Roberts and Weiss, fourth order (from Morton, 1971).
such as the Lax-Wendroff and Crank-Nicolson, are even worse. The fourthorder algorithm of Roberts and Weiss is quite acceptable, as is the F r o m m algorithm. Actually, the C - C or leapfrog with no dissipation and only a modest amount of dispersion shows up surprisingly well. In an alternative fashion, we show in Table 6.3 the ratio Φ ο / * ο i° second-order and fourth-order staggered schemes as ρ - » 0 . T h e shortestwavelength components, fik = it, d o not move at all, and in the second-order case the wavelength 4k has only two-thirds of the proper speed; longer wavelengths (see also Figure 6.4), however, move with nearly the correct speed. Further, the fourth-order method seems better than the second-order method. F r o m m (1969) has also compared a number of the second-order and fourth-order algorithms given in Figure 6.4. Here the coordinates are Φ - Φ versus ρ at a selected value of X=4k or a wave number it/4k for the second-order algorithms and at a variety of λ for the two fourth-order algorithms. As can be seen, the errors diminish as the wavelength increases but never go to zero; also the fourth-order methods d o seem better than the second-order methods. Vichnevetsky and Shieh (1972) have also indicated this type of result in a different context. They subjected the model hyperbolic P D E to a step function in the variable. Then they computed the exact (step) response, the response using the C - C form, and the response using a mixed scheme. T h e mixed T
t n e
Ρ
0
Ρ Ο
Hyperbolic Partial Differential Equations
516
TABLE 6.3.
Phase Ratio as a Function of Wavelength
e=fik
Second Order
Fourth Order
18°
0.9836
0.9992
30°
0.9549
0.9947
45°
0.9003
0.9753
60°
0.8270
0.9304
90°
0.6366
0.7427
120°
0.4135
0.4652
180°
0
0
Reprinted from Ê. V. Roberts and N . O. Weiss "Convectivc Difference Schemes." Mathematics of Computation; Volume 20. number 94, pages 272 and 281. by permission of the American Mathematical Society ΐ 1966 by the American Mathematical Society.
2
nd
Order
Ñ 01
0.2
0.4
0.6
0.8
1.0
Figure 6.4. Phase error vs. p for second-order and fourth-order methods, λ„ = 2ir/ß„ (from Fromm, 1969).
Finite Difference of Partial Differential Equations
517
scheme used u
—u
.
w, = — - — r — • k r
1
first order
and M.
— 2k
second order
on an alternating basis at the grid points. Some of the results are shown in Figure 6.5, where it can be seen that dispersion causes oscillation in the response using the C - C algorithm while the mixed scheme eliminates these oscillations. Further, shown in Figure 6.6 are some error results generated using sinusoidal input with frequency ω. The improved features of the mixed scheme are apparent. There are also a number of interesting algorithms derived from generalized R u n g e - K u t t a principles in O D E solutions. The paper by Warming et al. (1973) presents an excellent development of the various equations; here we merely present the results. Because most R u n g e - K u t t a methods appear to have intermediate or predictor-corrector forms, we also wish to say a few words about this approach. Let us first return to the Lax-Wendroff approximation, (6.2.33). This can be derived by expanding u(x, y) in terms of χ to include w ; thus iv
h~
1 U f
True
4.06
Mixed Scheme
1.05
U
Response
Central Differences-^
4.04
[
" b=1
4.03
/
'•/
1.02
•7
4 04 1.00
/..\
|— — r* — " λ * * *
0.0
0 .15
S
f\ J 1
1 4.0
4.5
2.0
X
Figure 6.5. Solution of the model hyperbolic PDE using a step input and two numerical schemes (from Vichnevetsky and Shieh, 1972).
Hyperbolic Partial Differential Equations
518 0.045
or ο rr ^ Ul LJ Ο
- 2 — Point Backward •Central D i f f e r e n c e s Mixed Scheme
0.000
Differences
-0.045
r—
^
-0.090
0.10
•2 — Point Backward D i f f e r e n c e s Central D i f f e r e n c e s •Mixed Scheme
0.125
0.250
0.375
0.500
0.625
u;k/ b Figure 6.6. Amplitude and velocity error generated using a sine-wave input (from Vichnevetsky and Sbieh, 1972). But, because
u = -bu x
v
u
and
xx
=^(-
bu ) = y
bu , 2
yy
it follows that
u-hbu
y
+ —z—u
yy
+
If the point s(y) is now specified and u replaced by (Δ,. + ν )/2k and u by (Δ . — V )/k , then (6.2.49) results directly. However, it is also possible to y
2
ν
y
v
yv
Finite Difference of Partial Differential Equations
519
write a two-step Lax-Wendroff form. Thus we write
u
(6.2.64)
r+
l
/
2
i
, = *(«,.,-1 + « , , , - 1 ) "
«,+ .., = »,s ~ \(Κ
J (Κ + V > , . ,
+ V ,.)«,+
l / 2
.,.
[2SLW]
This may be regarded as calculating u by introducing an intermediate value M i / 2 . i - The latter value is an approximation to the true solution to first order, whereas the overall scheme is second order. When (6.2.64) is expanded, there results r + l
r
(6.2.65)
s
+
U
r + i
s
= U
r s
| ( "
-
.
R
J
+
- Μ,,,-ζΗ
2
+ 2 ~ " r . s + "r.v-z).
\ ( " r . s
2
which corresponds to (6.2.33) but with a width 2h. If, instead of (6.2.64), we had written (6.2.66)
Μ,+ ι/2.,+
=
1/2
l("r.
«r+l.i = «r.,
J
+
l
+
Κ , . , ) "
- P(«,+
f
("r.,+
l/2.,+1/2
« , . , )
1 ~
~ « r + 1 / 2 . 1 - 1 / 2 ) '
[2SLW]
then (6.2.33) would have resulted directly. In the present case either (6.2.64) or (6.2.66) is equivalent to (6.2.33). In this form we may also show that complications occur when b is not constant but rather b = b(u). F o r ρ = h/k, (6.2.64) can be written as (6.2.67)
«
Γ
+
u
, / 2 .
ί
r+\.s
= Κ«,.,
+ 1
= «,·.,- §
«Γ.,-,)-5Α,(Δ_ + ν . ) « , .
+
b
1Ι
, (Δ„ + /2
s+
V )«, r
>
+
,
/ 2
1
[b = b(u)]
.„
where b = b(u ). Alternatively, when b = b(x, y) we can write (6.2.33) as rs
s
(6.2.68)
u
r + u
, = u
+
r s
4 P
- |/>
2
( *
r
+
r + 1 / 2
1 / 2 .
, (A S
V
AA+
+ V
1 / 2 . S
,,)u V,
rs
+
ft 1/2.» r+
V A+1/2,,Δ,)κ,.,
Ι> = *0->')]·
520
Hyperbolic Partial Differential Equations
Second-order accuracy is maintained throughout. Wesseling (1973) has shown how a variable b may be treated in any algorithm using the information implicit in the characteristics. Returning to (6.2.64), we see that we use a first-order method to yield one value of u at r + \ and then a second method to yield an overall accuracy of second order. This is equivalent to a second-order R u n g e - K u t t a process; an equivalent third-order procedure can be achieved using two intermediate values and a final cleanup equation. In fact, this has been done by Rusanov (1970) and Burstein and Mirin (1970) to yield a third-order, 0 ( 3 , 3 ) algorithm. It is given as "*.,+1/2 =
(6.2.69)
+ ",.,)- f
:!(",.:.+I
("r.,+ l
- « r . J
« , ., = « , . - ^ ( 2 i i , , _ - 7 « , . _ + 7 M . + 1
l
i
1
2
1
r
J + 1
-2« . r
J + 2
)
[RBM]
, κ**, and the final value u , . Thus we have the intermediate values w* The term multiplied by the parameter ω in (6.2.69) is called the damping term and is fourth order. It does not affect the third-order accuracy of the overall process but is necessary for stability. Obviously, we could combine all these terms in (6.2.69) to yield a single equation which is r +
J + 1 / 2
(6.2.70)
H,
+
l
. , = « , . , - f (Δ,, + +
ν,.χΐ-^Κ,,
p (d -v,.Hi 2
v
5
+^K.
-|(^S )« . -^(« )u 3
i
4
r
i
r J
,
[RBM] where ì and δ are operators such that (",.,-H/2
+
",.,-l/2)
s
,
,
Using a von Neumann analysis, stability results if (6.2.71)
|p|
[RBM]
Finite Difference of Partial Differential Equations
521
|
r+i
J XXXX H s-2 s-<
s S-H s+2 y
Figure 6.7. Mesh points used in RBM algorithm.
and 4ρ2-ρ4<ω<3. The amplification factor is (6.2.72)
£ RBM = 1 - £- sm2ßk - | ( 1 + ipsmßk(\
+
-cosßk)2 \(\-cosßk)(\-p2)).
The explicit points involved in the use of (6.2.69) are shown in Figure 6.7; note the symmetry involved. Figure 6.8 shows the phase error plot for the RBM algorithm and the Lax-Wendroff algorithm for p=0.3 and 0.8, with several values of the parameter ω. As can be seen, the RBM algorithm is generally better. Wesseling (1972) has shown the dispersion and dissipation behavior for the RBM algorithm at the two limits of the bound on ω given in (6.2.71) (Figure 6.9). This shows that the algorithm is not as accurate with ω = 3 as with ω = p2(4 — p2 ). With « = 3, the damping for moderate wave numbers is more, for large numbers less, than for w = p 2 ( 4 - p 2 ) . In view of the fact that the dispersion increases as the wave number increases, this is undesirable; wave numbers with
LW RBM
Figure 6.8.
Phase error for LW and RBM methods (from Warming and Hyett, 1974).
522
Hyperbolic Partial Differential Equations P--o
β
ι
l ^ J
è
*
è
ir
LW
RBM
Figure 6.9.
Dispersion and dissipation in RBM algorithm (from Wesseling, 1973).
much dispersion should be damped out more quickly than wave numbers with little dispersion. For ω = 3, this is not the case; for è = π, where the dispersion is greatest, damping is even completely absent. Thus the choice ω = p (4— p ) seems to be the best value; at this condition, the RBM scheme is fourth order i n j , although still third order in x. Warming et al. (1973) specify that 2
ω = p (4 - p ) 2
2
for minimum dissipation
2
but (4p + l ) ( 4 - p ) 2
ω=
2
for minimum dispersion.
Important variations on the RBM scheme are given by Warming et al. (1973) and Anderson (1974); a second-order algorithm due to MacCormack and a third-order algorithm are presented. These have the feature of using noncentered (as contrasted to Figure 6.7) points, and in the third-order method two adjustable parameters are introduced. These two parameters are " t u n e d " to minimize either the dispersion or dissipation present at each step. In addition to the algorithms mentioned above, there are many others available. These are covered in detail under test conditions in many papers, including those of Emery (1968), Taylor et al. (1972) and Anderson (1974). However, the work of Wesseling (1973) is worth further mention. He develops a whole class of algorithms contained within the form ι
(6.2.73)
«,+ i . , =
Σ «,«,., + ,·.
ι= -2
corresponding to a general explicit finite difference molecule with known
Finite Difference of Partial Differential Equations
523
values on the r line. Subject to various values of /, consistency in the a, and minimizing dissipation, he finds, as an illustration, that for a _ = 0 four schemes are possible. 2
Scheme 1:
a = 1—p
Scheme 2:
a = l-|p|
2
0
a
0
-i
=
1+ ρ— a 2~
0
with Scheme 3:
_ cosVp a —— - —
Scheme 4:
a •
_ l-p-a a, —
0
cosirp
0
Scheme 1 is the Lax-Wendroff algorithm. By including a_ results Scheme 5:
ρ , ρ a = \ - ^ - p +j
Scheme 6:
a = 1 - -^p-
Scheme 7:
α =
Schemes:
a = ~
3
a_ =
2
0
0
n
with
5-2p +3coswp — 8 2
+
9
there further
2
a —1+ p
2
n 0
2
a_ = - a 1
2
0
0
^ ~ ^ ~ ' ^ ' / 3 ~
Q
+ l+
-2a +2-3p + p — 6 2
a. =
n
«P/3)
where scheme six turns out to be Fromm's algorithm. Figures 6.10 and 6.11 show dispersion and dissipation results for certain of these schemes. Figure 6.10 shows, as an illustration, that scheme four has more dissipation but less dispersion than the Lax-Wendroff scheme. Figure 6.11 shows an improvement over the results of Figure 6.10, but there is not much to distinguish the different schemes in Figure 6.11. Finally, we close this section with a comment from Orszag and Jayne (1974): "We take issue with the often repeated argument that low-order numerical schemes are the most appropriate for the simulation of discontinuous solutions. The present paper shows that as the order of the schemes increases the maximum local e r r o r s . . . decrease substantially.... Consequently, if dissipation is added to smooth the solutions the required dissipation can be smaller and more localized with higher-order schemes so that dissipative terms have less effect on the solution outside the discontinuous layer."
Hyperbolic Partial Differential Equations
524
Figure 6.10. Dispersion and dissipation for Lax-Wendroff ( ( ) of Wesseling (from Wesseling, 1973).
) and scheme four
Figure 6.11. Dispersion and dissipation for scheme five ( ). scheme six (Fromm's) ( ), and scheme eight (—) of Wesseling (from Wesseling, 1973).
6.2.4 Hopscotch Methods and Mesh Refinement In Sections 4.9.7 and 4.9.8 we described the use of the hopscotch algorithm for parabolic PDEs and outlined the concept of mesh refinement for these same PDEs. These techniques can be used in hyperbolic PDEs, as illustrated by Gourlay and Morris (1972) and by Ciment (1971, 1972) and Browning et al. (1973). Here we wish to show some of the details. Gourlay and Morris extended their hopscotch algorithm to the LaxWendroff approximations to ux + buv =0. Using the Lax method as an illustration, we start with the finite difference approximation [from (6.2.52)]
(6.2.74) where δ,2«Γ s = ur
«,+ .., = «,.,-ΙίΔ,, + ν , Κ , + σ β χ , , + {-2ur
s
+ ur s _,. Introducing the parameter 0ΛΙ, we can
Finite Difference of Partial Differential Equations
525
write (6.2.75)
u
r
+
U
+ e
s
r + U s
+ V )u
|(Δ,.
-aS u 2
Y
r + ]
s
r
+
l
s
where if r + s is odd if r + s is even.
â.
For a fixed value of r, we apply (6.2.75) for those values of s with (r + s) odd, thereby calculating alternate points explicitly. Using these points and (6.2.75) for those values of 5 with ( r + s) even, the overall method becomes computationally explicit. An alternative form, suitable over two applications of (6.2.75). is (6.2.76)
u
r
+
2
s
+ 6
r + h s
+ V )u
|(Δ,.
r
r + 2 i
-σδ; , Μ
+
2 < 4
= 2",+ , . , - { « , . , - * , . For the mesh points for which f ? " Λ
+
2
. »
r+2
=
t
= f? = 0 , (6.2.76) reduces to r s
2Μ,
+
1 - λ
- u , r
with the remaining points, corresponding to B — è, , = 1, requiring use of (6.2.76). A von N e u m a n n stability analysis reveals that rl
2
s
and Thus a may be adjusted in any way desired to include as little or as much of 8 u j as desired in the finite difference approximation. The difficulty with a variable mesh is that when any sharp wave moves through a coarse mesh to a fine mesh and then into another coarse mesh, it will undergo a change of phase speed; this in turn may cause wave interaction and destroy the meaning of a computation. Browning et al. (1973) analyze how the leapfrog algorithm (no dissipation) can adapt to this situation. They show, in fact, that no problems occur and that the overall algorithm is stable. However, it is necessary to represent the wave as accurately as possible in the coarse mesh areas. Extensive numerical results are given to illustrate the results. Note, however, that if an algorithm other than leapfrog is used, the results may be quite different. y
r
526
Hyperbolic Partial Differential Equations
6.3 FINITE DIFFERENCE SOLUTION OF FIRST-ORDER VECTOR HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS As the next step in complexity in the treatment of hyperbolic PDEs, we consider the model first-order vector case. Using (6.1.8) as an illustration with [Λ] = [ / ] and {c} = {0}, we may write a set of simultaneous first-order equations as
<"••>
ίûΜÉÇ-"·
where {•} is now a vector of dimension (η X 1) and [B] is a square matrix. The initial and boundary conditions are {u(0,y)}
(6-3.2)
=
(nXn)
{f{y)}
and { (x,0)} = {
(6.3.3)
M
M o
(x)}.
With only a slight reinterpretation of the form of the algorithm to reflect the vector-matrix notation, all of the material in Section 6.2 is directly applicable to the present case. Thus the Lax-Wendroff and Crank-Nicolson algorithms, (6.2.33) and (6.2.51), are written as (6.3.4) +
+ V y)
, ., = ([/]-l[B](\
+ mB] (A -V 2
)){u} ,,
y
v
[L-W]
r
(6.3.5)
([/]+|[Λ](Δ, + ν^)){ } Ι(
= ([/]-£[ΛΚΔ, + ν,)){ },. . [ C - N ]
Γ+ Κ ι
Â
Ι
where ρ = h/k. Instead of an amplification factor there now is an amplification matrix, [G] instead of ξ; thus using (6.2.38) and (6.2.47), we find that (6.3.6) (6.3.7)
[G]
= ([/]-23 [B] sin ^)-^[B]sini3A: 2
L W
([/] + | ? [ 5 ] s i n ^ ) [ G ] 2
2
[L-W]
2
2
= ([/]-^ [B] sin ^) 2
C N
-i^[B]sinfik.
2
2
[C-N]
Thus we may write all the formulas in Section 6.2 in vector-matrix notation without any difficulty.
527
First-Order Scalar Hyperbolic Partial Differential Equations
Certainly, some interpretation needs to be made. Equivalent to b>0 or b < 0 is the statement that [B] is positive definite or negative definite. However, the case where [B] is neither positive nor negative definite does not correspond to the material in Section 6.2. This does not usually cause any difficulties in the analysis as long as care is taken in specifying a well-posed problem. In terms of stability, the von N e u m a n n necessary condition now becomes (6.3.8)
|λ,[]|«£ΐ,
n\
/=1,2
that is, the eigenvalues of [G] or the spectral radius of [G] must be bounded to b e less than or equal to 1. This in turn converts the b o u n d for explicit methods such as the Lax-Wendroff algorithm to [L-W]
(6.3.9)
where the a, are the eigenvalues of [B]. In other words, the maximum eigenvalue of [B] replaces b in the previous stability bounds. O n this basis it is not necessary to consider further any of the explicit algorithms of Section 6.2. However, there is one physical system associated with the countercurrent heat exchanger or allied transport devices which involves a wrinkle worth pursuing. This discussion follows Herron and von Rosenberg (1966) and uses the system of equations (6.3.10a) (6.3.10b)
u + bu x
1
=
y
v - bv = x
2
Y
-c (u-v) l
c {u~v). 2
The different physical directions of the streams are embedded in b and — b and the right-hand sides represent transport between streams. A n associated set of initial and boundary conditions is x
(6.3.11a)
w ( 0 , . y ) = t > ( 0 , y)=0,
(6.3.11b)
«(0,0)=0
(6.3.11c)
u(x,0)=l
(6.3.lid)
o(x,l)=l.
2
y>0
Note that we have split boundary conditions corresponding to u at y = 0 and ν at y = \. If we invoke Wendroffs concept of averaging at the center of
528
Hyperbolic Partial Differential Equations
(/·, r + 1 ) and (s, s + \) [see (6.2.44)], there results /
v
+ t),V+
l,.r+
he.
Il
-fi-^ /,
V+
he,
I.ν-I + « .
" 2 C
>+
-„
2 - P
+ p,).,.
2
kV +
I. j + 1 - ~ - 2 ~ (
r . . « +
M
\
he, ,
É,.ϊ
«,.!-!)
/ Ac-, + (-l + -^+p
2
where ρ, = « 6 , / λ : and p = hh /k. This set of equations, when coupled with the boundary conditions, can be solved via a tridiagonal matrix formulation advancing in the χ direction. Here we find the split boundary conditions simplify the problem solution. 2
6.4
2
FINITE DIFFERENCE SOLUTION OF FIRST-ORDER VECTOR CONSERVATIVE HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS
Many problems of physical significance lead directly to hyperbolic PDEs that are conservative in form. In the present context this means PDEs written in scalar or vector form as (6.1.10), that is, (6.4.1)
κ, + φ,.=0
or (6.4.2) where φ = <J>(u) and {φ} = ( Φ ( Μ ) ) . Alternatively, we may write each as (6.4.3)
u + x
b(u)u =0 y
First-Order Vector Conservative Hyperbolic Partial Differential Equations
529
or
(6-4.4)
{å} ['<Ι"»]{£}=Ρ»· +
where b(u)=d<j>/du and [Zf({u})]= d{
(6.4.5) Moving d/dx
Λ / . " * =
2
-
Φ
under the integral sign and using φ| ^ = j -<j> dy, there results
(6.4.6)
y
y
/ " ' ( « , +φ,.)
At the point where all partial derivatives of u and φ are continuous, (6.4.6) then leads to u +
(6.4.1)
v
x
Note that because φ = φ ( « ) is nonlinear, all finite difference approximations will be nonlinear in that sense. If we write
-du-- < b{u)
then (6.4.3) results, that is, (6.4.7)
b(u)u =0.
u +
v
x
But this asserts that u is constant along the characteristic curves, that is, (6.4.8)
£
=
which, for u - constant, is a series of straight lines. The slopes of these straight lines depend on the solution «, and thus they may intersect; and where they do, no smooth solution will exist. Finite difference approximations can be applied to either (6.4.1) and (6.4.2) or (6.4.3) and (6.4.^), but care must be taken to ensure that the conservative property (6.4.5) is retained. We may, in fact, say that a finite difference scheme
530
Hyperbolic Partial Differential Equations
is conservative if it can be written in the form { " } r + I . , = {"},,, ~ p ( {*},.! + 1 / 2 - W r . , - 1 / 2 ) . where {*}r.,
+
./2 = {A}({«}|.{«}2
{A} . -, r
I
= {A}({u} ,{ii}
/ 2
0
{ « } , - , )
1
{«,},).
Further, for consistency {A} must b e related to {φ} by {*}({«},.
{u}
{«}„) = «>({«}).
2
The important item for a conservative finite difference scheme is the proper centering of the y derivative. Actually, most of the algorithms developed in Section 6.2 were originally specified o n the basis of (6.4.1) rather than u + bu = 0 . Thus most of these algorithms can be written down directly. As an illustration consider the F-C version of (6.4.2), x
(6.4.9)
Κ
+
,,= Η , - | ( { Φ } ,
Ι
+
v
|-{Ψ),,-,)·
[F-C]
In order t o study the stability of this equation we must use {
r s
(6.4.10) where
[G]
[p] = [fl]«/k
r c
r
s
= [/]-i[p]sin0*,
and that the maximum eigenvalue of [ G ]
λ,([σ]) = (ΐ + p W / 9 A : )
l/2
,
ρ=
F C
is
a „h/k. m
which is always greater than 1. Thus the method is unconditionally unstable, as before; however, because of the centering of the right-hand side of (6.4.9), it is conservative. By contrast, the equivalent F-B algorithm, (6.2.8'), is stable, b u t because it is not centered, it is not conservative. If we look at the Lax approximation, (6.2.26), which was derived from the F-C form by use of a central average, we can write it as
(6.4.11)
{«}
Γ + 1
, = ί
1({«}
Γ É
+ 1
+ ("} . - )-|({φ},. Γ
1
1
5+
1
-{φ}, - ), Ι
1
First-Order Vector Conservative Hyperbolic Partial Differential Equations
531
which is stable (conditionally) and conservative, that is. (6.4.l2a)
{Α},... . / 2 = - ^ ( { « } , . ,
(6.4.12b)
{Α}, _
+
Λ
Ι
/
2
, + {«},.Λ) + Η{Φ},.
+
=--ί({«}, -{«},..,. +
+ {*},.,-.)·
Λ
2p
Ι + {Φ},.Λ)
Ι +
This is one way to make the F-C form stable while retaining the conservative feature. The alternative way is to follow the Lax-Wendroff approach, which modifies the real part of [G]. Not only is stability achieved but a higher-order accuracy results. This is detailed shortly. Actually, this feature is not unusual. The reader will recall that in the RBM algorithm. (6.2.70), it was necessary to add a stabilizing term to the third-order algorithm. All odd-order algorithms seem to need such stabilizing terms. This point is of sufficient interest that we pursue it further by developing the conservative L-W algorithm, first in a single-step approximation and then in a two-step approximation. The latter scheme seems to have a computational advantage since [/?({«})] does not appear in the equations. We recall that one way to derive the L-W approximation is to expand u ( x , y ) in a Taylor series to order A . 2
and then using { d u / d x } = - { α φ / d y }
ÂΛ:
2
1
J 1.3*1 3>'/j
from (6.4.2) and from the chain rule.
9)
Thus we may represent { d u / d x } and { d u / d x } in the Taylor series in terms of y derivatives only. These y derivatives are then finite-differenced to yield 2
2
{«/,.,.^Μ,.Λ-^ίΦΚ,,.-ίΦ},,-,)
(6.4.13)
+ ã([β],,
+
ι/2({Φ} . Η-{Φ},. ) Γ
Λ
-[^-^({Φΐ,,-ίΦ},.,-,)), where the [B]
R
J +
l / 2
and [ B ]
f - S
_
i / 2
1
[L-W]
are centered between Λ + 1 and ί and 5 and
532
Hyperbolic Partial Differential Equations
5 — 1, respectively. In the literature one finds two ways to express these items: (6.4.14)
(/)
,
/
2
= H [ * ] , ,
+
[ # ] , , , , )
= l([B]({«},J (6.4.15)
(,ϊ) [ β ] , . , Ι
/ 2
=
+
[ β ] ( Η « } ,
[B]({»),. ^)) s
+ Η « } ,
1
ί
, , ) ·
To retain the conservative property (6.4.15) is probably correct; however, it turns out that most numerical results indicate almost no dependence on which form is used. Of course, if [B] is constant, then we return to the obvious notation associated with {du/ax} + [B]{au/dy} = {0}. There is also a two-step Lax-Wendroff approximation, which we can express (depending on the spacing used) as (6.4.16a)
{«};,,.,
= U{u) .s r
+
i + { « } , . , - . ) -
£ ( { * } , . , +
. - { « } , . , - . )
[2SLW] (6.4.i6b)
{«},+,.,={«},.,
- f ((Φ}; ,., , +
+
{Φ}; ,.,-ι) +
or (6.4.17a)
(6.4.17b)
{«},+1.,
=
{ « } , . , - ñ ( { Φ } ã +1/2..+
1/2-{Φ}ã+1/2.1-1/2)·
In either case, the intermediate values { « } * + or {u} 1/2,1 + 1/2 calculated first and then { w } , computed using these intermediate values. N o t e that the calculation of [B] does not occur in either form. It is interesting to note that this two-step procedure looks like the secondorder R u n g e - K u t t a process for y'= f(x, y), which involves a r e
r
r+
(6.4.18a) (6.4.18b)
r+
Λ
Λ + , / 2 = >•,, + §/,,< Λ , = Λ + +
Α/. ./2· +
/ , = / ( * „ . .V.) [ODE]
We can also see that (6.4.16) and (6.4.17) could have been obtained directly from (6.2.64) and (6.2.66) with the proper interpretation of {φ} instead of {u}. Many of the other methods in Section 6.2 follow in the same way; that is, the
First-Order Vector Conservative Hyperbolic Partial Differential Equations
533
R B M scheme of (6.2.69) now becomes (6.4.19a)
{«}?.,
(6.4.19b)
»/2
+
= i({«},..
i +
+
{ « } r . . ) - f ( { * } r .
{ « } « = {u},., - ^ ( { φ } ·
(6.4.19c)
s + 1 / 2
-
i
i-{*},.,)
+
{φ}·
1
/
2
)
= {«},,, - £ ( 2 { φ } , . , _ - 7 { φ } . , _ , + 7 { φ } .
+
2
-2{Φ},
+
Ι
+
Γ
Γ
Λ +
ι
) - ã ({Φ},*: -{Φ};.Ϊ-,)
2
+ Ι
{ " } , , - 2 ) ·
[RBM]
However, at the same time, certain of the previous algorithms, such as the Roberts-Weiss approximations, (6.2.57), (6.2.59), and (6.2.61), need careful analysis and revision before they are conservative. As an illustration we present the two second-order algorithms (i.e., the angled and staggered schemes)
u
(6.4.20)
r+]
s
= u
r s
- J[*,.,+ , + ( « , + +
-Α,.,-,Κ-ì.,-2
(6.4.21)
"/•+ 1. j
=
"r, j
r,s+
b
+
",..+2)
[R-W,]
W,.,)]
I " f + 1/2,
J
+ I
^f,i—l"r+l/2.i—1)·
[
R
"
W
2 ]
There are a number of other algorithms that have been developed for conservative systems. As an illustration, Zwas and Abarbanel (1971) extended the Lax-Wendroff approach to include the term { 3 M / 3 X } in the Taylor series expansion. They then replace { 3 M / 3 X } by the identity 3
3
3
3
which is developed from the model hyperbolic P D E ; the coefficient of { 3 M / 3 J C } is Λ / 6 . As a result, they can generate a third-order approximation. However, now all the terms in the finite difference approximation need to be 3
3
3
534
Hyperbolic Partial Differential Equations
of third order; thus the first derivative is replaced with 9φ
_
{Φ},.,-Η-{Φ},.,-1
2k
{»},., + 2-2{»},.,
+
l
+2t>},,,-.-t>},,,-2
\2k
which is accurate to third order. The end result is the approximation (6.4.22) { " } ë ι.» = { " } , . » - Ρ ( 4 ( { φ } , +
1 + 1
-2{φ},
+ γ([β],.
ί
+
ί
- { « ? } , . , _ , ) - - ^ ( { φ } ^. ί
+
1
Ι/2({φ},.
+
2
+2{ψ} , _,-{φ}, _ )) Γ
Λ +
ί
ί
2
,-{φ},. )-[β], -,/2 5
5
χ({Φ},.,-{Φ},.,-.))
-[B] ,s(Wr,> 2
+ l
-ίΦ},.,-,)+ ^[5} . -,({φ} .,-{φ} .^ )) 2
Γ
ν
Λ
Λ
2
The parameters δ and e are adjustable, but for third-order accuracy δ = å = 1.0; if, however, δ = å = 0, we return to the second-order accurate L a x Wendroff approximation. Since this is a third-order process our previous discussion indicates that a stabilizing factor must be added. The authors do this by adding a term proportional to { 3 « / 3 x } , which does not change the order but for which 4
4
On this basis they obtain a stable third-order algorithm. In the same sense of extending the Lax-Wendroff algorithm, Gourlay and Morris (1968a, 1968b) and then McGuire and Morris (1973, 1974) have developed some interesting explicit and even some implicit algorithms. Here we wish to show some of the features of the explicit forms. Thus we write the
First-Order Vector Conservative Hyperbolic Partial Differential Equations
535
two-step algorithm of (6.4.16) as (6.4.23)
{«}, i/2 = { f i } , - f ( * +
{ " }
r
+
r
+ V ,.){*},
|(Δ,. + ν ){ψ}
l = { " } r
ν
Γ+ ι / 2
,
[2SLW]
where
and
( i , . + v ){«} f
r
and the subscript J has been dropped for convenience. The new algorithm replaces (6.4.23) with (6.4.24)
+ ν,.){φ}
{«}Γ = {β},-βί3(Δ
ν
{u)
+ ^y)(dMr
+ι
r+l
= {u)r-f(K
[G-M]
Γ
+
cWr l) +
with a, d, and c as parameters. By expanding in Taylor series exactly as is done in the Lax-Wendroff approach and comparing with the series expansion of (6.4.24), they showed that, to order A , 2
ι Thus the new two-step algorithm is (6.4.25)
{ }; = {þ} -^(Δ +ν,.){φ} Μ
+1
Λ
ι
Γ
{«Κ . = ί«},-|(Δ · + ν . ) ( ( ι - ^ ) { Φ } , + ^ ί Φ } ; ) . +
ι
ι
+ι
[2SGM] The choice a = 1/4 returns (6.4.25) to the L-W approximation. T o study the stability of (6.4.25), it is necessary to assume that [B] is constant; in this local case {Φ},. = [ # ] { w } and a von Neumann analysis yields the amplification r
536
Hyperbolic Partial Differential Equations
matrix (6.4.26)
[G]
= [/]-^[f*] sin /}A; 2
G M
2
-^[fi]sini8A:(l + ^ ( - l + c o s ^ A : ) ) .
[2SGM]
A careful analysis of the eigenvalues of [G] and [B] reveals that (6.4.25) is conditionally stable, that is, (6.4.27)
[2SGM]
By contrast, the C F L condition is p=<2 because of the step sizes used. Thus a>\ is required with the equality corresponding to maximum stability. A careful analysis of this algorithm reveals, however, that data on the line, say y = 1, are needed in addition to those on y = 0 and χ = 0 . T o handle this case Gourlay and Morris evolve a predictor-corrector scheme that iterates on the corrector, that is, (6.4.28)
{ « } ^ = { « } , - ρ ^ ( Δ , + ν ,.)!>},
{«Ι'Λí^ί^,-ΙίΔ, + ν , ^ ι - ^ Ι ί Φ ΐ , + ^ίΦ)^,). [2SGM] where {Φ}Λ+ι {Φ}Λι ° d > = 2 . 3 , . . . represents an iteration sequence. By analyzing the linearized ( [ 5 ] = c o n s t a n t ) version of the corrector they show that the most satisfactory value for a is j , and thus the final algorithm is (
(6.4.29)
=
a
{<'!, = {*},-flA + v J W ,
{«}Λí = { " ) , - | ( Δ (
,
+ ν ) ( { φ } + {φ} / ). (
ν
ν
Γ
+ 1
7 = 1.2.3
It is interesting to note that whereas the Lax-Wendroff algorithm is analogous t o a predictor-corrector (6.4.18) for O D E s comprising the Euler's method and the midpoint rule ( C ) , (6.4.29) has the feature of using Euler's method and the
First-Order Vector Conservative Hyperbolic Partial Differential Equations
537
modified Euler ( C ) , that is. y!
(6.4.30)
+l
= y„ + hf„
iM fn + /Λ.)·
->Ul = y« +
We would be remiss if we did not mention the recent innovative approach used by Boris and Book (1973) for solving hyperbolic PDEs. They evolved a two-step procedure that contains antidiffusion, that is, part of the algorithm amounts to solving the parabolic heat equation backwards (unstable by itself). The method produces a sharp resolution of shocks and discontinuities and seems to produce better resolution than do other standard schemes. The first step of the algorithm solves u + φ, = 0 (note that we use a scalar notation for simplicity) by the predictor equation x
(6.4.31)
"Γ* Ι.. = " Γ . Λ - | ( « Γ . . + I +
—
+ (! + y)(«,.,
+
« r . 5 - l )
I
-2« . + « r
1
f - J
_ ). l
[BB,]
This is seen to be a variant on the Lax-Wendroff algorithm but includes a velocity (6 ^independent term which gives the equations a strong amount of diffusion (or viscosity). The amplification factor is
(6.4.32)
IBB,
(l-i(l-cosiSA))-
^(l-2p )(l-cos/3A-) 2
,
2
[BB,]
which is stable for | ρ | ^ / 2 . Further, the relative phase error is smaller than other algorithms such as F-C or L-W. The second step is to correct w* , using either an implicit or an explicit equation. This is derived by noting that for b-0, step 1 reduces to the diffusion equation, +
i
Removal of this diffusion by applying an equal and opposite antidiffusion can be carried out using (6.4.33)
«
r +
,., = < , " κ(« %,... , - 2 « % , . , + « ? , . , _ , ) , r
+
r
+
[BB,]
Hyperbolic Partial Differential Equations
538
which has an amplification factor (6.4.34)
ξ
  :
= 1+ ^ η
2
( ^ ) .
[BB ] 2
Thus (6.4.34) is unstable by itself; however, the two-step process is stable for
|p|
as a test problem; j{u}
2
= {φ}({«}). This also can be converted to
£ { « > + { « } £ { « } = {<>} as an alternative PDE. Many different initial and boundary conditions are attached to generate smooth or discontinuous solutions. We have at a number of points referred to the need to specify values at>> = 1 in order to use certain of the algorithms. This, of course, requires an overspecification of the model PDE. In the leapfrog algorithm it may also be necessary to add conditions on the r = 1 line. Parter (1962) and more recently Chu and Sereny (1974) have examined the result of this overspecification. In particular, the latter work using the Lax-Wendroff algorithm is the most definitive. They ran a series of numerical tests on
using various boundary conditions at y = 1. These conditions were: 1.
Specify u(x, l) = constant.
2.
Use a first-order approximation for u (x,
3.
Use a second-order approximation for u (x
4. 5-7.
\)-0.
y
v
y
1) = 0.
Integrate along the characteristics at or near ^ = 1 to yield u(x, 1). Use spatial one-sided difference forms at the boundary.
T h e results of these calculations were unexpected in a sense; (1) turned out to yield inaccurate results, (2) was surprisingly good since the test problem did
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
539
not have M , ( J C , 1) = 0 ; (4) turned out to be the best procedure. Obviously, these results cannot be taken as the final word but they d o indicate that the overspecification can be handled.
6.5
FINITE DIFFERENCE SOLUTIONS TO TWO- A N D THREE-DIMENSIONAL HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS
Now we turn our attention to the model hyperbolic P D E in two or three space dimensions. Many of the principles have already been developed and thus we d o not concern ourselves with the distinctions between scalar and vector equations; further, we only point out some of the features of three space dimensions since the results are very similar, conceptually, to those of two space dimensions. We do, however, point out new approaches that are basically unique to the multidimensional case. We write our model hyperbolic P D E in any of the forms (6.5.1)
M
v
+
fc M l
li
+ i> M , + /) t/ 2
l
1
l i
=
0
or, in conservative form, (6.5.3)
« . Ψ , · + Φν.. + Φ . , = 0 +
1
u +f x
Vi
+ g + v
P
v
=0
(6.5.4)
where {/} = {/({«})}, {g} = {«({"})}. {/>} = {/>({«})} and [ B ] „ [B] . and [ B ] may be the Jacobian matrices of { / } , {g}, and {/>}. We use the mesh intervals h,k k , and Ar and, correspondingly, the obvious notation p , , p , p and p , , p . p ; frequently, we use /c, = k = k = Ac, p = p = p = p, and ρ ι = p = p = p. Finally, we employ the subscripts /·, s, /, / as in Chapter 4 to indicate x, _y,, y < y , respectively. Obviously, initial and boundary conditions must be added to specify the system, but these can be assigned in any manner consistent with a physical problem. Usually, we have — oo < . y , y < + oo, χ > 0 as the region to be examined for numerical solutions. 2
3
]t
2
2
2
3
2
2
3
3
l
2
i
3
2
}
2
3
3
540
Hyperbolic Partial Differential Equations
6.5.1
Finite Difference Schemes
We could follow the procedure outlined previously of replacing the derivatives with appropriate finite difference approximations. The number of such possibilities is, however, staggering, and most of the results have never been looked at carefully. Instead, we should select a more formal approach, for example, a scheme by Gourlay and Mitchell (1966), which uses forward and backward operator expansions. Thus based on the operators
M }^.< {"}r.* + t.' { }r.5., M
=
_
M
V , » , . . , , = {«},,,., -{«},.,-!.,< with the obvious terminology for χ and y , they derived two generalized operator expansions for the two-dimensional form of (6.5.2). Then by suitable truncation of these expansions they were able to develop a number of finite difference representations. Here we present some of the results with [ S ] , , [B} as constant matrices and k = k - k. The first explicit form is 2
2
t
(6.5.5)
{«}
Γ+
1
2
. ., = ( [ / ] - ^ [ 1 ί ] Δ - ? [ β ] Δ ί
1
ν
2
ν ι
){ } ,.„ Μ
Λ
which is of order k, and the second explicit form is (6.5.6)
«^^^([/Ι-^Ëΐ,Ä,,-ϋΙβΙ^ +^ ψία/Ι + ^ Ë ß Ο Ä » ,
+~^([I]+ ftB] )# +m[BUB] 2
y
+ [Â] [*] )Δ,Δ, ){ι*} ,,, , 2
Ι
2
Γ
(
which is of order k . Equation (6.5.5) can be recognized as a FFF-type approximation with an amplification matrix 2
(6.5.7)
[C] = [/] + ^ ( [ B ] ( l - c o s / 8 * ) + [B] (l-cos/8 Ar)) I
1
2
2
-i^([5],sinj8,/c + [B] sinj8 it). 2
This has conditional stability for specific [B] interest is given by (6.5.8)
{ « } , + ,.,., = ( [ / ] - | [ β ] , ( Δ
2
T
ν ι
-§[β] (Δ,, + í 2
2
which is a F C C (or leapfrog) approximation.
and [B] .
A further form of
2
+
í„)
j){«} , ,„ r
s
2
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
541
Perhaps the most used explicit method is the Lax-Wendroff approximation in two space dimensions. We can write this in operator notation as (6.5.9) {«}, .. ., = ( ΐ / ] - | [ β ] . ( Δ , +
Ι
+ ν, )-|[Λ] (Δ , + ν, )
ι
Ι
2
ι
ί
+ |[β] Δ, ν . + | [Æ^Δ,,ν, 2
ι
ι
ι
ν,.,)(Δ, +ν . )){ } . ,.
+ | ( [ β ] [ 5 ] 2 + [β]2[β] )(Δ,, + 1
;
1
)
:
Μ
Γ
1
This approximation is of order k . In terms of a plane in (_>>,, y ) evolving in the Λ: direction (see Figure 6.12), (6.5.9) can be expanded to form 2
2
(6.5.10) {«},*..„ = ( [ / ] - ? ( [ β ] ú + Ú Λ ] ! ) ) { ι ι } . , - | [ Â ] ( [ / ] - β [ β ] ) Γ
Ι
ι
Ι
Χ{«},,.,., + | [ * ] , α ' ] + ρΊ*],){«},,-,.,
-|[θ] ([/]-?[Λ] ){ι.} . ., 2
2
Γ
Ι
+
Ι
+ | [ Λ ] ( [ / ] + ?[Λ] ){«} ., ,_ 2
+ γ([β]ι[«] +[Λ]2[β]ι)({«},.,.,.,
2
Γ
>
1
Μ" Ι » , . , +
2
The amplification matrix for the Lax-Wendroff approximation is (6.5.11)
[G] = [[I]-^[B] (l-co<>fi,k)
+
2
+ H[B] [B] l
- i ([B] P
2
+
[B] (\-cosfi k) 2
2
2
[B] [B] )sinfi ksinB k)) 2
l
l
2
sin β ^+[Â] ύηβ^).
]
[L-W]
2
If [B] and [B] are constant, it is possible to show that for \ and λ | as the maximum absolute eigenvalue of the eigenvalues of [B], and [B] and \ two sets of eigenvalues, the stability of the Lax-Wendroff scheme is governed i
2
[ B ] <
2
m
β ]
542
Hyperbolic Partial Differential Equations
lowrt η
wendroff Implicit (calculate explicit) r , « , t
Figure 6.12. Finite difference computational molecule for Lax-Wendroff, Wendroff, and Crank-Nicolson methods.
by (6.5.12)
2,'2|XJ
= -=-^ • ν'8|λ„,|
[L-W]
Note that this is much more restrictive than in the one-space-dimension case, where the equivalent condition would have been 1 Λ...Ι '
corresponding to the C F L condition. We return to this point later. While we have the Lax-Wendroff equations in hand, note that if [B] = [ 0 ] (go back to one space dimension) and [ B ] , = />=scalar, (6.2.35) results. One might then be tempted to extend (6.2.35) to two space dimensions. This would 2
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
543
yield (6.5.13)
",-H.,,, =
«,.,,,+ γ(«Γ.Λ-1.
, -
r . s + I.,)
U
+ y ( r . . ι - ! " , . Λ. M
-
i
+
2 ^ ( W
.
r
i
- l . , -
2
M
r .
J
.
i
+
"r. +l.,) i
+ ^ ( « , . . . , - 1 - Æ Μ , , , . , + Μ,-.,.,+ Ι ) .
In this case the amplification factor is ξ = 1 + ρ](cosj8,Ac — 1) + p (cos/J /c — 1 ) - / ( p , sin j8,/c + p sin/J A:) 2
2
2
2
which Fromm (1969) has shown to be unstable. This points out that the generation of two (or three) space variable approximations from the one-spacedimension version is not always direct. Now we turn to the development of Wendroffs and Crank-Nicolson's second order approximations in two space dimensions. As in the one-spacedimension case both are implicit but Wendroffs can be arranged to calculate in an explicit fashion. Gourlay and Mitchell (1969) develop both formulas in complete detail. The operator form (6.2.50) of Wendroff may be extended to two dimensions as
{[n+mn+nBh^jtin+wn+HB^^Wr+i,,
(6.5.14)
= ([/] + !([/]-Ñ [*] )Δ ,) :
2
1
xd'l + H l / l - ^ l f i D A j t w } , , , . When Δ now
ν ι
[w]
is zero this becomes (6.2.50) as it should. The amplification matrix is
(6.5.15) [C] = ( ( [ / ] c o s ^ +
χ(([/]
Μ
/3[5] sinM)( 2
[ / ] c o s
M
+
^
[ 5 ] i S i n
^-ί?[ί] þ^]([/],»Μ ^] 2
Η
ι
M)) '
þ
Μ|]. [W]
544
Hyperbolic Partial Differential Equations
which can be shown (not easily, however) to be unconditionally stable. Equation (6.5.14) can also be written as (6.5.16)
{«},+.., ,., , = {«},.,.,+(Μ+ΡΊ*],Γ'(Μ-ΡΊ*],) +
+
• ( { " } r . ,
+
+ ([À] +
=
l . , - { « } r + l . , . f « - l )
ρ{ÂÀν\[À)
+
x([/]-^*].)({«},.,.
ρ[Â] )-\[Ι]- ρ[Â] )
=
2
,-{«L ,.s ..,)
(+
+
+ ( [ / ] - β [ β ] , ) ( { « } , , ., - { ι ι } +
=
2
1
+
Ι
Γ + 1
+
.,. ).
[W]
ι
where eight mesh values are involved. Thus if the values on the two bounding planes are known (see Figure 6.12), the single point { w } , , can be calculated explicitly. By contrast, Crank-Nicolson approximation requires 18 mesh values (see Figure 6.12) and unless {«} is specified at, say, >>, = 1 a n d y = l, the algorithm cannot be used. Using (6.2.51) as a start, we may expand it to form r+l
s
+
1
+
2
([n+^BUA^+V^^n+'^BU^+vj)^}^,^
(6.5.17)
=
([/]-|[β] (Δ 2
ΐ ; +
ν
) :
))
x([/]-fi*],(A, +V,)){«}_,.
[C-N]
We forego rewriting (6.5.17) in the form of the mesh points of Figure 6.12 as well as specifying the amplification matrix. However, later we return to a revised version of this algorithm. When the coefficient matrices [B] and [B] depend on v, and v , most of these formulas become much more complicated. Thus for the Lax-Wendroff t
2
2
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
545
form there now results (6.5.18)
[/]-f[*].(A, + V,,)-f[i?] (A +v ) 2
+ |[β] Δ,,([/] + | [ β ] ) Δ 1
+ |[^Δ
ι
ΐ !
l :
-|[β],ν ([/]-ϊ[β] )ν ΐ |
([/]+|[5] )Δ„-|[β] ν 2
+ ^([β] Δ [β] Δ 1
1 ι
V :
2
1 ι
2
ΐ :
ι
([/]-|[β] )ν 2
+ [β] Δ [β],Δ, + [ β ] , ν „ [ β ] ν ,
1 :
2
|
1:
ΐ ι
2
) ;
:
+ [β] ν ,[β] ν +[β] Δ, [β] ν, + [β] ν [β] Δ 2
ι
ι
ΐ 1
+ [β] ν,,[ί?] Δ ι
2
1:
ι
2
ι
;
2
ι
) 2
1 |
+ [5] Δ, [/7],ν ) 2
ΐι
:
+ ^([β] Δ, [β] ν, + [β],ν„[β] Δ + [β] Δ,,[β] ν,. 1
|
1
ι
ι
) |
2
2
+ [Â] ν,,[β] Δ ,) {«},,,· 2
2
[L-W]
ι
When [B] and [ B ] are functions of χ as well, then all [ 5 ] , and [Z?] must be located at r + \ as well. It is apparent that we can develop many other algorithms. However, most of these will be given in Sections 6.5.2 and 6.5.3 and we d o not specify them here. t
2
6.5.2
2
Two-Step, ADI, and Strang-Type Algorithms
We have previously observed that the Lax-Wendroff algorithm for one space dimension can be written in single-composite or two-step form. The latter is much more feasible in a computational sense, at least for conservative systems. It follows in much the same manner that the two- and three-space-dimensional problems can be written in two-step form. In the literature these are referred to as Richtmyer forms since he was the first to develop them. In the ensuing discussion we follow Wilson (1972).
546
Hyperbolic Partial Differential Equations
By analogy to (6.2.64), we may write
+ [β] (Δ,, + ν,,){«},.,.,) 2
l »
(6.5.19)
[2SLW]
,..„ = { « } , . „ - f ([Λΐ,ίΔ,,, + ν „){«},%,.,.,
r +
+[ί] (Δ,+ν,){«}; ,,,), 2
+
where
{a} = U{«},., i., +{«<},., -.., + {«},.».,.. + {«},..,., - .)· +
This is equivalent to advancing 2h steps per calculation. By contrast, we can also write (in expanded form and with ρ, Φ p ) 2
=
{"}r+\/2.s.l
H{ }r.s->
1 / 2 . / + i )r.s
U
-1/2.1
U
+
{
M
} r . . i . / +
+ {«}r.,.,-./ )-y ([*].({«},.. 2
-y([e] ({«K. ., 2
4
+
1/2
./2.,-{«},.,-l/2.,))
+
./2-{«},.».,-./ ))
[2SLW]
2
(6.5.20)
{ }/4., ., M
s
= {w} . .,-P,[5] ({"}r l/2.., r
_
1
5
+
P [ 5 ] 2 ( { } r + l / 2 . . v . / + l/2 M
2
_
+
l/2./-{w}
r
+
l/2.v-|/2.,)
{«}/+l/2..,.r-l/2)
for a single step. Figure 6.13 shows that the computational molecule is actually diamond-shaped rather than rectangular; this may cause difficulties in use near boundaries. Wilson (1972) has also presented two other versions of this two-step form. The first is termed the modified scheme and the second the rotated scheme. In the modified version a different average is used in the first step, and in the rotated version the original points are merely rotated by ð/4 in the plane. Figure 6.13 also shows the mesh points for these cases. Explicitly, the two
Two- and Three-Dimensional Hyperbolic Partial Differential Equations -
Δ
o
547
Intermediate plane
points
4 — 0
(a)
0-
-oΟ
•
-o-
-Q
1
Ο—I
-0
0 — Φ -0
—
lb>
•o-
6
k 2
-0
(c)
Figure 6.13. Computational molecule for two-step L W or Richtmycr schemes, (a) Associated with (6.5.20) 2SLW. (b) Associated with (6.5.21) modified 2SLW. (c) Associated with (6.5.22), rotated 2SLW. (After Wilson, 1972.) Reprinted from J. Inst. Maths Applies with kind permission from the Institute of Mathematics and its Applications.
schemes are written as
{
M
}r+l/2.i./~4({
w
} r . i + l/2.i + l/2 + {
"*"{"}/·. v+ l / 2 . ( - l / 2 +
Õ
( [ # ] l ( { " } r .
I
y([£j2({"}r. ., t
+
M
} r, I
{
l / 2 . / -
+
M
-
1/2./ + 1/2
}r.j-|/2./--l/2)
{"},.,-
1/2.,))
1/2 "{"Ê..,.,-1/2))
(6.5.21) {"}r+l.
[modified 2SLW] 5.
, = {«},..,. ,
- P | ( [ * ] l ( { « } , + I / 2 . 5 + 1/2., " W r t l / 2 . . -
~ ^ ( [ ^ ( { " J r *
1 / 2 . 1 , , + 1/2 -
{"Ê + Ι/2.Λ.,
l /
2
) )
1/2.,))
548
Hyperbolic Partial Differential Equations
and {«}r+ l/2.i.( =
4({«}r.j+l/2.r+l/2 +
+
{ " } r. j - 1/2.» + 1/2
+ 1/2,» - 1 / 2
{ }r.5 u
+
{"}r.i-l/2,»-l/2)
^ " ( [ ^ ] l ( { } » - . . v + l/2.» + l / 2 +
-
U
_
_
{"}»·,i-1/2.»+1/2
^ ( [ ^ ( { " h . 5 +
_
{ )r.s
_
1 / 2 . » + 1/2 +
{ « } r . j + l / 2 . » - 1/2
+
u
\/2.1-1/2
{"}»·,
t-1/2.»-1/2))
{ " } r.s - 1/2. f + 1/2
-
{ " } r. ν - 1/2.» -
(6.5.22)
1/2))
[rotated 2SLW]
{"},+ !.,., = { " } , . , . , - y ( l ] l ( { " K + 1 / 2 . 5 fi
+
_
2
{ }r M
{
M
1/2
+ l / 2 . 5 + 1/2. » - l / 2
{ }r M
+1/2.5-1/2.»+
1/2
} r + l / 2 . s - l / 2 . » - l / ) )
([^W {"}»•+ 1 / 2 . 5 + 1 / 2 . / —
+ 1/2.,-
2
+ 1/2 +
{"}»· + 1 / 2 . t + 1/2./ — 1 / 2
{ }r u
+ 1/2..1 - 1 / 2 . » + 1/2
{"}<· +
1/2.1-1/2.(-1/2))·
Using an equivalent value of h and k for the four schemes given by (6.5.19)(6.5.22), the stability bounds are 1 / ^ 8 , 1 / / 2 , 1 / / 2 , and 1, respectively, for ρ ι = p = p. Thus the rotated Lax-Wendroff approximation has extended the region of stability to the C F L limit. On this basis, and also by examining the number of arithmetic operations in the four schemes, Wilson concludes that (6.5.22), the rotated Lax-Wendroff, is the best algorithm. For the interested reader, Wilson (1972) also presents the equivalent equations for three space dimensions; these are, however, too long to be written here. The discussion above concentrated on the explicit Lax-Wendroff approximation; however, we also have available the implicit Wendroff, (6.5.14), and the Crank-Nicolson, (6.5.17), forms. Just as in the two-space-dimension parabolic PDE, we may develop suitable ADI pairs that yield the composite already presented. We show only the Wendroff version as developed by Gourlay and Mitchell (1966); it is probably fair to say that the C r a n k - N i c o l s o n approach is only of academic interest. 2
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
549
Gourlay and Mitchell (1966) started with the general Peaceman-Rachford (PR) formulas (6.5.23) ([/] + (e[/] + /[B] )A, ){«} 2
J
r +
([/] + ( ^ / ] + /[â].)Δ,){«}
I / 2
Γ
+
= ([/] + (r[/] + ,[B] )A, ){«}
r
= ([/] + (Γ[/] + 5[â] )Δ, ){ }
Λ+
I
1
2
i
2
Μ
ι / 2
,
where the subscripts 5 jind / have been deleted and r, s, e, and / are scalar between the two equations, coefficients involving p. Eliminating {u) , expanding in Taylor series, and equating coefficients of terms in ku , {k u j-A: u , . . . , after replacing derivatives with respect to χ by r+i/2
2
Vt
r
2
These values lead to the PR form of Wendroffs approximation, namely ([/] + i ( [ / ] + p[Bj K,){«},-H/2
(6.5.24)
2
= ([']
+ ΗΙ/]-ΡΊ*].)Δ,,){«},
= ( [ / ] + i([']-?[e] )A ,){«}, 2
I
+ 1 / 2
.
[WPR]
The composite of (6.5.24) is of course (6.5.14). Clearly, the algorithm proceeds by solving a recurrence relationship 1.
In the y direction at the half χ step.
2.
In the y direction at the full χ step.
2
{
The interested reader should refer to the Gourlay-Mitchell (1969) article for
550
Hyperbolic Partial Differential Equations
details. But since only a forward difference operator Δ or Δ , , is on the left-hand side, only two points are involved; if one has a starting point, the algorithm behaves essentially in an explicit fashion. We also wish to point out that a Douglas-Rachford ( D R ) form is possible, namely 2
([/] + i([/]
+ i[B]2)A ,){«}, , r
l
+
= ([/] + i ( [ / ] - , 5 [ l i ] ) A , ) { « }
/ 2
I
|
(6.5.25) ([/]
f
[WDR]
+ 3[Λ] )([/] + 2
Ú
( [ / ]+ 3[Â].)Δ . ){«} 1
1
Γ
+
=-2?[Â] {Μ} 2
1
Γ
+
1
/
2
([/l+i([/]-?l*l.)A ){u} r i
r
and that a three-space-dimension version of (6.5.24) is possible, ([l\+H[I]+HB] )A ){u) 2
r2
r+Kn
= ([/]+Μ/]-ñ [*] )Δ, ){Μ}, :
1
(6.5.26)
+
([/]+
1
^[Â],)Δ,,){ } Μ
Γ
+
2
/
3
=([/]+Κ[']-ñΊ*]2)Δ, ){«}, 3
+
1 /
,
(WPR]
([/Ι + Ê ΐ º + ϋ ΐ β ^ Δ , , Μ ι ι } , ^ = ([I] +
{([I]- [B] )A ){u} : :
i
P
Vx
r+2/y
Just as the ADI approach uses a series of one-space-dimensional algorithms to develop the multidimensional solution of an implicit scheme, there exists a very powerful approach, due to Strang (1963, 1964, 1968), which uses an explicit algorithm. This approach compounds an initial one-dimensional L a x Wendroff calculation in the y direction with a second one-dimensional L a x Wendroff calculation in the y direction to solve the two-dimensional problem. Conceptually, this is very similar to the ADI approach. In particular, Gourlay and Morris (1968a, 1968b, 1970) have formulated multistep versions of this approach which have very favorable computational characteristics. Thus we consider first the one-dimensional problem for which the L a x Wendroff algorithm is either }
2
(6.5.27)
{u} ,^={ii]-p [B} ){u}^~rp[B]([l]-HB]){u} _ 2
2
r
r
+ rp[B]([l]
+
P
[B]){u} ^ r
i
s
+ l
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
551
from (6.2.33) or, in two-step form, (6.5.28)
{ « ^ , . ^ Η Μ , . , + ι^+ {«},.,-./:) -M({u},.,
l/
+
2-{«},.,-./2)
{«}r.,-Mfil({«}? .
{«)r .., =
+l
+
i+l/
2-i«'}r ..,-i/2) +
from a revised version of (6.2.66). For simplicity, we define the operators / ,{ }r.. i
M
= !
*v{«)r.,
f v{"}r 2({"}r. 1
S
= * > • { " } r={ )r.s
J +
l/2 + {«}r. -l/ ) 5
2
+ \/l - { « } r , 5 - I / 2 .
U
so that (6.5.28) can be written as {u}: =ì {»}r- ψ-^{»}r
(6.5.29)
£
+l
v
{«},+. = {«},-?[«]*»;+.· In any of the forms we can represent the overall process by (6.5.30)
{«}, = L {«},, + l
r
where L, is a Lax-Wendroff operator in t h e y direction which transforms {u} into {M},+ |. The equivalent two-step version of (6.5.29) in two space dimensions can be written as r
(6.5.31)
{^: ^Ηì +ì ){ ),-^{[Â}Á^) +
ν
ί2
{«} , = r+
+
Γ
α
[Â] ä {α} ) 2
ν:
Ã
(«},-i([i]i8,»: i+[ei2«, {«}; i)t
:
+
Now we ask what the equivalent operator is for (6.5.31) as compared to (6.5.30). Strang showed that the following two schemes hold: (6.5.32)
{u}
and
{«},=U„ . L,.A„ ){«} ,
r
(6.5.33)
+ t
+r
= HL L +L L ){u} y
l2
v
2
yi
[Si]
r
;
[S2]
r
where L a n d L,., are Lax-Wendroff operators in the y, and y directions, respectively, and L is the equivalent one-dimensional operator over an h/2 span ( I an Λ step). In both cases second-order accuracy is maintained. Further, the stability bound in each case is better than the one-dimensional case ( 1 / / 8 ) . However, (6.5.32) takes approximately twice as long to compute as (6.5.31) and thus the end result is only marginally improved; by contrast. 2
y
552
Hyperbolic Partial Differential Equations
Strang (1968) showed that L
v
> I/
L — L., 2 } 1/ 2 > I
and thus (6.5.33) could actually be written as (applying the operator twice) (6.5.34)
{«}
r+ 2
=(L, L .L,L,L . i ;
l
l
i / 2
){ } . M
[S2]
r
This makes the scheme (6.5.34) comparable in efficiency with the normal Lax-Wendroff method. Gourlay and Morris (1968a, 1968b) developed a multistep version of (6.5.32) by introducing the quantities { » } r + l . < 2 > . l > } r + l.<2,. { » } r + l . < 4 ) . { > } , + |.(4).
where {»}r+l.(2)= fv {«},;
«>}r+1.(2)
3
{»}
4 ) = L,. »} i.,2>; {w)
=
=Ljw}
f
r +
r +
M
{"},+! = i ( { » } r
r+ l ( 4 )
r
+ M
2
)
+ l.,4)+ { W } , + |. 4))(
This leads to the scheme
{HO,
+
i
.
( 1 )
=
{»}r+l.(2) =
M > } , - ^ « , > } ,
{«}r P[*l2* _
V
l
{«'}r+l.|l)
{ » } , + É.(2) = { « } , - ñ Ι Â 1 Λ , { « } ã + É . ( É )
(6.5.35)
{»}r
{w}
r
+1.(3)
+
K (
=P,-,i«}r
2~- *,- {«}r+l.(2» L
+ 1.(2»
3) = M , , { v v }
1
. 2 ) - ^ ^ 5 , { " } r + l.,2) L
r + 1
1
(
l
+ 1.(4, = { ϋ } + 1.(2) - Ñ [ β ] | δ , { ΐ / } Λ
{
> l
'}r l.(4) = +
{
M
ν
{w}, ,. 2)-p[5] 6 ,{M} +
(
2
1
|. 3)
Λ +
(
r + l
} r + I = i({«>}r-M.(4) + {»'}r+l.<4)).
, 3 (
)
[SI]
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
553
where the subscript (/) refers to the multistep level. An equivalent form of (6.5.33) (Gourlay and Morris, 1970) is given by »}r+t.(l> = r*v,{"}r
6
0}r+l.(2> = { « } r -
δ
V,{"}r
,,{"},+
1.(1»
(6.5.36) _ρΙ*1ι
f
δ ι
>},
+ 1
.<4>
_£llii«{«}
,
r +
..(5>-
{ιι}, = ί«>>' + '.<« ' 2 where the compounding is obvious and is therefore omitted. Figure 6.14 shows =
+
1 ΐ , }
+
Μ 4 )
l
1
9 — Φ — 9
£ — 9 ã
O—-i
Ä
Intermediate points
r— ρ——ζj>——cρ—^r—? c
s
A /
V
k j
Γ
ð S
>
6—i >—< > — J »
tΓ
f1
J
>
d
J< *
f
τ
J
L—6
(b)
Figure 6.14. (6.5.36).
Computational molecule for (a) Strang 1, (6.5.35), and (b) Strang 2,
554
Hyperbolic Partial Differential Equations
the mesh points required for (6.5.35) and (6.5.36) as given by Wilson (1972). This shows that the intermediate values are required on the boundaries; that is, boundary conditions are required for u on>>, = 0 , 0 < y < 1 and y = 1,0*£ y < 1 in order for the schemes to be feasible. Gourlay and Morris develop the techniques necessary for the introduction of these additional conditions. Wilson, in particular, suggests that the Strang 2 and the rotated Lax-Wendroff forms are the best computationally among all the algorithms developed in this section. Gourlay and Morris (1970) and Wilson (1972) have also indicated how this approach may be extended to three space variables. Thus, analogous to (6.5.32) and (6.5.34), 2
{u}
(6.5.37)
r
+
[
r +
l
t
2
= HL L L +L L L ){u} r
V!
v
v
l:
Vi
[SI]
r
and (6.5.38)
{«)
=(L,
i / 2
L
l v :
L,A,
A, .,){«},·
[S2]
Further efforts along the line of Strang's approach were made by Burstein and Mirin (1970). who develop a third-order form, and Gottlieb (1972), who considers a second-order scheme in terms of stability, number of computational steps, and number of neighborhood points required in the computation. 6.5.3
Conservative Hyperbolic Partial Differential Equations
Now we turn our attention to the two- and three-space-dimensional form of the conservative hyperbolic P D E (6.5.4), (6.5.4) By this time we have learned that certain algorithms are better than others, and we concentrate on the "better" ones. In general, only the two-space-dimensional algorithms will be detailed since the three-space-dimensional cases are very similar and are cumbersome to present. Obviously, any algorithm in this section can be rewritten in nonconservative form by choosing [/?],, [B] , and [B] as constant matrices; however, as we pointed out in the beginning of the chapter, the reverse procedure is not always obvious. Perhaps the most comprehensive and detailed approach to the present problem is given by Turkel (1974) and Gottlieb and Turkel (1974). Thus we follow and present many of their results. However, this deals with second-order methods and we should mention some third-order approaches. Along these lines, Zwas and Abarbanel (1971) present an extended version of the L a x Wendroff algorithm in terms of [ £ ] , , [B] , {d//dy ), and {dg/dy ). The Rusanov-Burstein-Mirin (1970) approach can also be extended to two-space 2
3
2
t
2
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
555
dimensions [see Gottlieb (1974)] as well as the W a r m i n g - K u t l e r - L o m a x (1973) noncentered or staggered scheme. The interested reader may wish t o consult these references for details. Turkel (1974) has analyzed almost all of the known algorithms in terms of their phase error. In doing so he has presented the amplification matrix [G] and the numerical phase (based on [G]) for second-order methods which involve, in two space dimensions, a nine-point rectangular scheme at the Λ: level. The rationale here is that going beyond this rectangle may lead to all types of difficulties at corners and for irregularly shaped domains. We quote a number of these below but d o not discuss the algorithms of F r o m m (1968), Boris and Book (1973), Crowley (1967), and Gourlay and Morris (1968a, 1968b); most of these were considered earlier in the chapter. As the first algorithm of interest we turn to the two-step Wendroff or Richtmyer scheme. This can be written in many ways, such as
{ « } * * 1.!.,
=
- I . I - I
+
+
{«}r.A
+ I . , - I +
+ ! . , + !
{ « } , , - . , η ) - ^ ( { / ) , , η ã { / 1 , - , , )
- ^ U * } , , , + ,-{*},.,,-,)
(6.5.39) { " } , - r
I.
("Jr.,. , - 3 P | ( { / } , * f | . ,
,=
-ί^α^.,,+
+
[2SLW]
! . , - { / } * + I . , - ! . , )
,-ω;.,.,-,).
where {«}*+, , is an intermediate value, or as presented by Singleton (see Wilson, 1972),' v
{ « } r - M / 2 . » f 1/2.1 = i ( { « } , . , . ,
+ {«},.. +I.f)
HP,((/L.
,.,-{/}„.,)
(6.5.40)
[2SLW]
{ " } r + 1 / 2 . * . , + 1/2 =
1( {«},.,., + {«},..»., + |) - lh(
- i ? l ( { / } r . , f
{"}r-f 1
.
=
J
~
P
2
l.,
+
{ / } , . ,
U}r. s . ,
+1
{/}r.,-l.,
+ ! . , + ! - { / } , . , - I . , "
. , " P l ( { / } r + 1 / 2 . i + I / 2 . /
( ( f }r+l/2.t./ +l/2
_
-
{/}r+l/2..
t
{^}Γ + É / 2 . Λ , / - | / ) . 2
-{g)r.s.l)
-1/2./)
+ l)
556
Hyperbolic Partial Differential Equations
However, these forms begin to become opressive to write in long form. Thus if we once again define Mv,Mr...l=2-({«}r.. +1/2.1+{ }r.,-l/2.r) M
5
. {"}r.. .< ({ }r.5 + l/2.,-{w},.v-|/2.,) =
l
M
t
*i- r»,. {«}r.,.r = i ( { « } , . l
|
1 +
l., - { « } , . , - ! . , ) .
we may convert (6.5.40) to
{«}
[ì„{"} - 2-PA,{/} - i^rt.A^vjtijldj.s
+i/M
(6.5.41) {«}(2). . Ι
Ι/2 = [ ì ^ « } - 5 Ρ | ì Λ Ρ ν { / } - 5 Ρ 2 , { « } ] 2 , . δ
ί +
ι
ι
2
(
!
+
1
/2. + ./2 (
[2SLW] {«}r+l.,. = [{«),....-pA,(/}(l)-PA («)(Jl] ,. .,1
:
l +
J
The amplification matrix is (6.5.42)
[G]
2 S L W
=[/]- (3 [fi],sin 8,A: + 3 [B] sin^A:) i
1
/
2
2
-(^[β] (l-cos/3,^) + ^[5]^(l-cos/8 ^) 2
2
The numerical phase error [ £ ( / j , A : β k )], defined by Turkel as compared to an analytical phase, - ( p , [ £ ] , / ? , A + p [B] fi k). is given by 2
2
2
2
(6.5.43)
2
[£]2SLW = i(^[fi] (i8 A-) + ^ [B] (/? A) -(3 [B] /? A: 3
L
1
+ J> [B} fi k) ) 3
2
2
3
2
2
2
2
1
+ 0{(fi k) +(fi kY). 4
i
2
1
L
[2SLW]
N o t e that this error [ £ ] has been obtained by expansion in series through third-order terms.
Two- ami Three-Dimensional Hyperbolic Partial Differential Equations
557
Next we consider the leapfrog (CCC) method and the staggered leapfrog of Roberts and Weiss (1966), (6.5.44) {u)
r
+
, = <>},_, -
3A.M {/}, - M v 2 M , i s } , ri
= {«},-,-^({/},.
(6.5.45)
[G]
L F
i
+
.,-{/} . -,. )-f
1
r
i
({g},5.,
(
1
1
1
2
2
l
[£]
l f
,
= - / ( ^ [ 5 ] s i n / S A : + 32[fi]2sinjS A:) + (l-(^,[fl],sin)3 A: + 3 [fi] sin)3 A:) )'
(6.5.46)
+
2
0((M)
= [£]2SLW +
4
2
[LF]
/2
2
+ (&*))4
[LF]
The phase error is identical to the Lax-Wendroff scheme through third order terms. The staggered leapfrog is written (6.5.47)
{u)
r+l
=
{u),-t{w 6 V)
-
(
r v
M
r
+
ri
ri
5 Ι
ι
Ρ
+1/2.5.,-l)]
{g}r
ι
2
l/2
)
l.f)
[SLF]
2
2
[ Β], sin J3, A: + 3 [ £ ] s i n β k) 2
(\ - {{ΐάΒ^ύΐËβ^
[E\M
+
/}Γ+É/2.Λ-
[ϋ] . = [/]-1(3 [«]ι5ίηβ Α;+^[β] 8ίηβ Λ) + i(
(6.5.49)
ftp 6 {g},
4 [ P | ( { / } r + 1/2,5 +
} r ~
+ P2({?}r+l/2.»,» + l ~
(6.5.48)
+
} / 2
- ±y [ Pl
+ i [B\ smfi k] ) i
2
+
= i(UB\^kf Β)φ,k
2
2
2
1
W2
[SLF]
MBUp\kY)
+ p [ B) fi k f + 0{( β^ Û + (p\k)") =
2
2
2
[SLF] Comparing (6.5.46) and (6.5.49) we can see that for a small χ step, they are quite similar [also (6.5.43)]; for large χ steps, the staggered leapfrog is the best.
558
Hyperbolic Partial Differential Equations
except that problems may occur near boundaries. When dissipation is not desired, this algorithm is probably the best second-order method available. The Strang time-splitting approach may also be used. From our previous discussion, it seems best to choose Strang 2, (6.5.38), which now is {0}r+l.(l) =
M
{y}r+l.(2) =
{w} -2P5,,{/}r l.(l
1,(3)
(6-5.50)
.
>
{ « } , - 4 K , { / } r
1
r
+
=M,. {t)} J
{e}r ..(4) = { 0 } r +
{"}r+l. 5 . /
=
+
)
-\pS {g} ) yj
r+ L < 2 )
r+u2
[S2]
..,2.-H {g}r ..(3) I
+
{ " } r + 1.(6) = {v}r+
1.(4) ~ i P *
V
|
{ / } r + !.($)
with (6.5.51)
[£]
= ί(?[Â] -(^[β] ) )(/ί Α) 3
5 2
ι
1
3
ι
+ ( 3 [ 5 ] - ( 3 [ S ] ) ) + 0((/8,^) + (^A:) ). 3
2
4
4
2
[S2]
In our previous discussion we indicated that the rotated Lax-Wendroff or Richtmyer scheme was, with Strang 2, the best among the algorithms examined. Thus Turkel suggests a generalization due to Burstein which includes the rotated scheme. This scheme is
(6.5.52)
{«}
r
+
I
=
{ « }
r
- ^
2 l
A
2 2
{ W , - ( V 2 « ) ( 3
l
M
l
A , { / } *
- ( l - l / 2 « ) ( e . { / } + e . {g},). r i f
V i
r
r:Ml
2
[B]
N o t e that there are two parameters in this equation, ν and a. When ν = 0 and α = 5 , this becomes the rotated Richtmyer scheme. But other values are possible as well. The term v8YSYi{u}r is equivalent to including a fourth-order artificial viscosity; v—0 means no added viscosity. The amplification matrix is given by Turkel (1974), but we shall not present it here because of its length. Numerical results have been presented by Turkel (1974) for many of the foregoing algorithms as compared to an analytic solution. The data show how
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
559
Figure 6.15. Numerical phase vs. fitk for algorithms listed in Table 6.4 (from Turkel, 1974).
β ë k
the numerical phase representations compare to this analytic solution using [B] = [B] = b = scalar, = /? A and for pb = \ to maintain stability. Figure 6.15 shows some of these results, with Table 6.4 indicating the scheme numbers of the figure. Table 6.4 gives the phase value for each scheme at = Pk = ð/5. Of interest is the observation that the first-order Lax algorithm (not developed here but presented later) is clearly inferior to the others and that the leapfrog, Lax-Wendroff, and Burstein approaches, the latter with v=0 and a = 100, are all similar. Figure 6.16 shows the effect of adding the artificial viscosity term, νφà. in (6.5.52). For small the effect of the viscosity term is small. t
2
2
2
TABLE 6.4. Í
1 2 3 4 5
6 7 8 9
Listing of Algorithms in Figure 6.15 and Value of Phase at /3,ë = ð / 5
Scheme Analytic Lax (first order) Strang 2 Lax-Wendroff Leapfrog Burstein. ν =0. a = \ Burstein. ν = 0 , a = \ Burstein. c = 0 . α = I Burstein, i>=0. a = 100
" ( / V Corresponds (o Scheme Number of Figure 6.15).
Phase at /?,λ = π / 5 0.31416 0.42205 0.29528 0.29868 0.29830 0.24356 0.27099 0.28455 0.29788
Hyperbolic Partial Differential Equations
560
(.
Analytic
2.
L o x - Wendroff
3 .
Burstein
ν « Ο , a
4.
Burstein
ν *
5.
Burstein
ν = 0,
6.
Burstein
y = 0.0625 , a = 4 00
« 4
0.0625 , a = 4 a
*
400
.63 4.26 2.51 3.44 β k ê
(o)
3.44
4 .
Analytic
2 .
Lax -
3.
Burstein
Ê ¼ ,
*4.
Burstein
ñ * 0.425, a = 4
5.
Burstein
V * 0 , 0. = 4 0 0
* â .
Burstein
ν « 0.4 2 5 ,
Wendroff a
- 4
a
-400
Figure 6.16. Numerical phase vs. /3,/c with artificial viscosity in (6.5.52). Only starred curves of (b) are different from corresponding curves of (a) (from Turkel, 1974).
Further, Turkel ran a number of computational test problems using the foregoing algorithms. Without presenting the details here, it is of interest to quote some of the conclusions. 1.
For smooth problems where dissipation is not wanted, the leapfrog method seems to be ideal, involving a good phase representation with a reasonable χ step.
2.
For problems with shocks, one should go to schemes with dissipation (with the artificial viscosity built in).
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
561
3.
Among the nine-point schemes the Strang 2 seems the best since it has a small phase lag and a maximal χ step.
4.
The rotated Richtmyer scheme has a phase error much larger than that of the Lax-Wendroff or Strang schemes and should not be used for wave propagation problems.
5.
Although these results were obtained for linear problems, they still hold roughly for nonlinear problems. Thus Strang 2 is a reasonable first try for solving any problem of the present type, followed by the leapfrog or the Lax-Wendroff scheme.
Gottlieb and Turkel (1974) followed up on the foregoing results to present two new algorithms. The first is a new linear family of methods and the second is a nonlinear scheme. Thus they defined a family of two-step methods given as
+ ^ ( « , , { / ( ì , { « } , ) } + « ,{?(ì,,{«},)}) ι
(6.5.53)
ι
{«} = {«}, + Η,(/(Μ,,{«}*))+Η,(ί(Μ,-{«}*)) Γ+1
Ρ
where P\ = Pi = P
N o t e that a new parameter γ has been added to (6.5.53) and a removed. When v—Q, γ = 0 , (6.5.53) becomes the rotated Richtmyer scheme. However, a careful analysis shows that this algorithm has a poor phase representation a n d t h e y , step is severely limited in size. If fact, from among the family embedded in (6.5.53), the rotated Richtmyer is the best. On this basis the authors developed a nonlinear version of (6.5.53) for which the parameter γ can either increase or decrease the phase error. Finally in this section we wish to point out the interesting recent work by Harten and Zwas (1972), in which hybrid or composite schemes were proposed to handle smooth and nonsmooth problems. The basic concept involves writing (6.5.54)
{ttU.^L.+O-OLjKn},,
where O * ; 0 < 1 is an automatic switch parameter, L , a first-order algorithm,
[GT]
562
Hyperbolic Partial Differential Equations
and L a second (or higher)-order algorithm. By this combination the first-order algorithm becomes operative in a nonsmooth region and the second-order algorithm in a smooth region. As an illustration for the one-space variable case, the choice 2
(6.5.55)
L,{«}, = {«},
+
I
= i(i>},.
J +
, + {«},..-.)
and (6.5.56)
L {«} = 2
r
[
M
+
}
f
+
1
=
{ii}
f ( [ * ] r . ,
r
+
+
| ( { / } ,
i
+
1
- { / } , . , _ , )
. / 2 ( { / } , . . . , " { / } , , )
-[^-.^({/Κ.,-ί/},.,-,)) could be used. Equations (6.5.55) and (6.5.56) are the Lax and Lax-Wendroff schemes, respectively. These can be inserted into (6.5.54) to yield an overall equation for [u} +,. However, the main question is how to select È. Harten and Zwas suggest that a normalized pseudo-viscosity term which is a function of the spectral radius of [B] be specified to allow è to switch, depending whether one is in a smooth or nonsmooth region. This concept is also extended to the two-space-variable case and a numerical example detailed. This is a most interesting technique and should lead to further composite approaches. r
6.6 FINITE DIFFERENCE SOLUTION OF SECOND-ORDER MODEL HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS In previous sections we considered only sets of first-order hyperbolic model PDEs; now we turn to the second-order PDEs. We concentrate first on the one-space-dimensional case and then extend the results to two and three space dimensions. 6.6.1
One-Space-Dimension Hyperbolic Partial Differential Equation
We have already defined the model equations as (6.1.13) and (6.1.15): (6.1.13)
u
= bu , 2
xx
u{0,y)=f(y),
VY
b = constant > 0 2
0
Second-Order Model Hyperbolic Partial Differential Equations
u,{0,y)
(6.1.15)
= My),
563
0
u(x,0)=u (x),
x>0
u(x,\)
x>0,
o
= u (x), ]
with the case b — 1 as a subset of (6.1.13). Actually, we have taken a number of liberties in defining (6.1.13) and (6.1.15); in the classical Cauchy initial value problem. - oo < y < + oo and only the initial conditions are involved. Further, in the mixed initial boundary value problem above we could specify the flux at y = 0 or y = 1, or a combination of « and the flux. However, most of the latter changes or additions could be handled without serious difficulties. Because (6.1.13) is linear, we may solve it analytically. Defining the new variables £ and η by 2
ξ = y + bx η = y — bx (6.1.13) reduces to (6.6.1)
4/> φ =0. 2
ίη
where φ(ξ, ?j)= u(x, y). Integrating (6.6.1) twice then yields u(x,y)
= £,(y
+ bx) + t\( y
-bx),
where £ , ( · ) and !:,(·) are arbitrary twice differentiable functions. Along the lines y - bx, ι:, (or I:,) can be considered as a wave that moves to the left (or right) with speed ± b. These lines correspond to y ± k = constant and are the characteristics of (6.1.13). We plot in Figure 6.17 y ± bx = constant on an .γ - y diagram. The lines intersect at the values x*, y*. The solution at x*.y* depends only on the initial values in the interval AB at A = 0 ; the triangle CAB is termed the domain of dependence and its base, AB, the interval of dependence. Further we note that the extension of the region into χ space is determined by the boundary conditions (i.e., we must use the data on y = 0 and y - 1 to proceed further into χ space). Later we return to Figure 6.17 to help us decide on feasible finite difference approximations; at that time we show that the domain of dependence of the numerical difference approximations must include the domain of dependence, triangle CAB, of the P D E . Also, we should point out that this question never came up in the parabolic case; there the characteristics are horizontal lines and the domain of dependence is the entire χ — y space.
564
Hyperbolic Partial Differential Equations
*. y
y - bχ constant
-y + bx « c o n s t a n t
Figure 6.17. (6.1.13).
/A
Characteristic
curves
for
If we define U= K
and
s
w= «
v
we may also write (6.1.13) as a set of first-order PDEs, namely (6.6.2a)
v — bw
(6.6.2b)
w = bo .
x
x
v
r
The lines y±bx = constant are still the characteristics and the domain of dependence is still the triangle CAB in Figure 6.17. Further, we could write (6.6.2) as (6-6-3)
±{u)
+ [B]j}{u}
= {0}
or (6-6.4)
dx
dy
{φ} = { 0 } ,
where
<·>=[:]=
«Ç-*
~ο\·
•=[:]•
Now we have a P D E which is very similar to that used in previous sections of the chapter. 6.6.2
Explicit Algorithms
In this section we develop a number of explicit finite difference algorithms that are candidates for solving the model hyperbolic P D E (6.1.13). Before we carry this out, however, we need to spend some time discussing convergence and the
Second-Order Model Hyperbolic Partial Differential Equations
565
domain of dependence. Let us assume that we have obtained an explicit finite difference approximation which we overlay on Figure 6.17. The point x*, y* of Figure 6.17 corresponds to w , while other points in the difference approximation are at r and r — 1 for various s values. In addition, the scheme includes the ratio h fk. Thus we can state that the numerical solution at r + \ , s ~ x\y' depends only on the value of u at the mesh points in the triangle formed by the initial data and the two lines with slopes ±h/k [i.e., y ±(k/h)x = constant] passing through x*,y*. This region is called the numerical domain of dependence. r + 1
u
s
u
Clearly, the numerical domain of dependence will be greater than or equal to the domain of dependence of the model hyperbolic PDE, for JC*, y*, if and only if
k *
f
For p-bh/k, this becomes p * £ l . But if p > l , then some of the initial data along portions of the line AB can be changed and it will not affect the numerical solution at JC*, y*. Thus Courant-Friedrichs and Lewy stated that
The difference solution cannot converge to the exact solution of the model hyperbolic P D E as h -»0 and A: -»0 for constant ρ > 1.
This then leads to the C F L condition for convergence, that is, ρ 1. Stated in another way this means that the numerical domain of dependence for any finite difference scheme should include the domain of dependence of the model P D E or convergence may not occur. We can show some results of this requirement for the scalar equation (6.1.5), (6.6.5)
u + bu =0, x
v
b>0.
Here the characteristic curves are y = bx + constant and the domain of dependence of x*, y* is the set of points on y = bx + y* — bx*. Further, if we impose the initial conditions «(0, y)= f(y), solution is "(x,y)
=
then the exact
f(y-bx).
Thus the exact solution depends on data to the left of y. Now let us use a F-F
566
Hyperbolic Partial Differential Equations
type of approximation to (6.6.5); this yields (6.6.6)
u
r +
, , = (1 + p ) M , , ~ p u s
r
J + 1
.
[F-F]
But now u depends on data to the right of y(u ), and thus for j o > 0 , the numerical domain of dependence cannot include the domain of dependence of (6.6.5); the numerical procedure is not convergent as h, k — 0. If, instead, we use a F-B approximation to (6.6.5), then r
+
r-J+1
u
(6.6.7)
,.^Ο-ñΚ.,
ΙΙ,+
+
ñΧ,.,
[F-B]
and the domain of dependence of (6.6.5) is within that of (6.6.7). In both cases above, the convergence corresponds to the stability condition. However, this is not always true, as shown by the unstable F-C scheme (6.2.6), (6-6.8)
M , + i., = « , . , - f («r..+ | - « r . « - i ) .
which is convergent. However, the Lax idea of replacing u r. >-i) yield u
[F-C] r
by {(u
s
r
l 4
(
+
t o
(6.6.9)
« ã + É , ^ ^ Ι - ñ Κ . , + É
+
Η Ι +
ñΚ.,-!
[ L ]
is both convergent and stable. Let us now return to the problem u„ =
bu 2
rr
u(0.>>)=/(y),
0
u (0,y)=f (y), x
0
l
where we ignore for the moment the values on the boundaries y = 0 and ν = 1. An obvious finite difference approximation is
r?
-*
k~
2
or (6.6.10)
=2(ΐ-ñ Ê. 2
Λ
+ p (u .,+ , + « , . , _ , ) - « , . _ , 2
5
r
t
,
with the two initial conditions to be added. Note that (6.6.10) relates three r lines ( r + 1 , r, r — 1) and thus the scheme can be used only when the lines corresponding to r=Q and r = \ are completely known. We develop this further after analyzing the truncation error.
Second-Order Model Hyperbolic Partial Differential Equations
567
If we expand (6.6.10) in Taylor series, there results
But if we use u
= bu , 4
4x
Av
Λ
the last equation becomes
( « „ - Α \ > ^ ( ΐ - ρ ^
2
4
ι
. +
..,
The next term not shown on the right-hand side has a (1 — ρ ) multiplier in it; thus we see that the algorithm is 0 ( 2 , 2 ) and for the special case ρ = 1, the truncation error is actually zero. In this case, ρ = 1, and (6.6.10) becomes (· 6
61
0
U
r+\.s =
U
r .
s
I +
+
" r . 5 - I
"r-l.».
_
which is exactly correct. N o w let us see how the initial conditions u(0,y)=f(y)
(6.6.12) u (0,y)
(6.6.13)
=
x
f (y) i
can be used. Obviously, (6.6.14)
«,„,, = /,
exactly; thus we have an exact representation for u on the initial line r = 0 . For (6.6.13) we can write »r+l.s- r.,
_
U
h
or for
f
J U
r—0, "l.5="0..v
+
/
'/| I
But this is only O(h) and thus, although it gives the required information using the (exact) u and f , it is less accurate than (6.6.10). Instead, let us extend r back to r — 1 and write 0
s
u
r+
U
or, for (6.6.15)
l.j ~
U
r - ι, ι _
f
r—0, u
Us
=
u_ ,+2hf , K
u
568
Hyperbolic Partial Differential Equations
which is 0(h ).
N o w we select jo = 1, and use ( 6 . 6 . 1 1 ) with r = 0 :
2
(6.6.16)
«\.s =
Elimination of u_ (6.6.17)
t
s
M
U. +1 S
+
« O . i - Ι
« - ι . , ·
_
between (6.6.15) and (6.6.16) yields
«,. = Κ « ο . . + «Ό.,-.)+Α/. Ι
ί +
ί
(P = l)-
If instead of (6.6.11), ρ = 1, we had used (6.6.10) with ρ Φ1, there would have resulted (6.6.18)
«,. = ( 1 - ? ) « ο . + γ ( « ο . , 2
Ί
ί
+ Ι
+ «ο.,-.)+Α/ , Ι
(Ρ*0·
In either case, (6.6.17) or (6.6.18), the second line of values «, can now be calculated to 0(h ) from the exact values u and f . Let us now turn to the stability of (6.6.10). Using the usual von Neumann approach, it follows directly that s
2
r
5=2(l-p )+p ( 2
2
, ? e
ls
s
*+e"*)-r'.
But using the trigonometric identities e**+
= 2 cos #fc
(l-cos^) = 2sin (^) 2
there results (6.6.19)
| -2(l-2p sin (^))^l=0. 2
2
2
Thus 1/2
In order for £ the amplification factor to be < 1, it is necessary that 2(l-2p sin (^)) -4<0, 2
which immediately specifies that
2
2
Second-Order Model Hyperbolic Partial Differential Equations
569
for all β. This in turn leads to the necessary condition for stability of (6.6.10) that (6.6.20)
p
We could have also rewritten (6.6.10) in two-level form by defining
This would have led to a vector equation in w and t; and a subsequent amplification matrix
[G]
ο By analyzing the eigenvalues of this matrix and specifying that their absolute values be bounded by unity, (6.6.20) again results. Now we are in a position to outline the algorithm for (6.6.10) or (6.6.11). If we now specify the M calculate M, using (6.6.17) or (6.6.18), then all the u are known on the first two lines. When we add the conditions at y=0 and v = l. x > 0 , (6.6.10) or (6.6.11) can be calculated point by point, along the third line ( r = 2). then the fourth line ( r = 3), and so on. In this manner the entire domain can be filled in via an explicit algorithm. Although it is possible to develop many other algorithms besides (6.6.10) and (6.6.11), these have almost never been used. As a result we present no further details but instead go on to implicit methods. 0
j (
s
6.6.3
Implicit Algorithms
There are a number of implicit algorithms that we can develop for solving (6.1.13)-(6.1.15). We could, for example, replace κ with χ ν
and then «,.,. with (Ë
..
W
" i t
(ii) «,.,.
—
U
r + \ . \ + \
2
u
r +
I,.ν
U
r ^
I. ν - 1
^2
(
M
r - H . . +
| -
2M
r
+
|,
i
+
M
r + l -
,_ )-r-(K,._ l
| | J > t |
-2w ._ , >
l
t
+
l< ._ )
| -
,.. ) l
2 k.2
In (i) we replace «,.,. with a finite difference at the r +1 level and in (ii) with the average of the r + 1 and r - 1 levels (a Crank-Nicolson approximation).
Hyperbolic Partial Differential Equations
570
We also could weight the r + 1 and r — 1 levels with a parameter just as was done for the model parabolic PDE. We would end up with three unknowns at the r + 1 level and a solution can be effected by tridiagonal techniques.
1,s+ 1
r.
o
—
ο
—
ο
r — 1,5
r — 1.s — 1
.( + 1
r r- -
1,s +
1
However, here we wish to show the more general approach wherein we weight the values at the r + 1, r and r — 1 levels. Thus (6.6.21)
r+\.s
"r.s
U
2
+
"r-l.t
_
7i
b
,
1 f
.
- 7 T l » ( " r f ι.,+ ι - 2 w , + I . , + + (1-2ί)(« . Γ
+
e
(«r-l..+
Λ +
ι
«,+
,.,-,)
- 2 « , . , + i/ . r i J
|-2« .-|. + (
i
W,.-|. -l)}, 1
where 0 < 0 « 1 . Note that when f? = 0 , we return to the explicit approximation (6.6.10); when è = 4 , we obtain the average form (ii) above. The computational points for (6.6.21) are also shown above and we see that tridiagonal techniques are still applicable. The truncation error for (6.6.21) can be ascertained via Taylor series expansion. Without showing any details, the result is h {u -b u )=b h-k [-h^-p ) 2
2
xx
2
2
+ ffp ]^
2
2
yv
>
+ ••• •
When 0=0. this reverts to the explicit approximation; however, when 0=^0, there is no special cancellation of the truncation error associated with ρ = 1. The method is again 0 ( 2 , 2 ) . Turning now to the stability of (6.6.21), we again follow the von Neumann approach; this leads to the form |-2+
= p -jr?(£e'^-2| + |e ^ ) + ( l - 2 f ? ) ( e ' ^ - 2 + e 2
A
)
,l3k
Second-Order Model Hyperbolic Partial Differential Equations
571
which becomes, after some algebraic manipulation.
(6.6.22)
l-
l -2 2
1+1=0. I+40p sin 2
\ 2
Note again that when è = 0 , we obtain the equation for the explicit approximation (6.6.19). An analysis of the roots of (6.6.22) reveals that stability occurs when
(i) è:
ρ<
unconditional stability
00
(ii) 0 < f ? < | ,
0
conditional stability.
1-4(9
When è - \ (the weighted average at the r + 1 and r - 1 levels), the algorithm is unconditionally stable. We then have (6.6.23)
- y ( M
f
+
i . ,
+
+
i
w
r +
i. -i) A
+ (l + p ) "
,.,
2
r 4
= T( r- ., . + «r-..,-.) + 2«,. -(l + P K-,. M
2
1
+
t
1
=
When è = \. which is the lower bound for the unconditionally stable approximation, we have (6.6.24)
-Bl(u P
6.6.4
Ull
+
i
£\u
1.Λ
2
( " r . A + l
+
+ u„ _ )+ll
r + U i + ]
_
2
M
r . . v
+
M
r . . , - l )
£( .-.. l r- . - ) M
+ M
J +
l
t
l
+ 2«.,. f
1+ T
«r-..,
(β=ί)·
Simultaneous First-Order Partial Differential Equations
Let us now return to the alternative form of the second-order model hyperbolic PDE, (6.6.2) or (6.6.3). If we treat the left-hand sides of (6.6.2) identically in terms of finite differences and treat both right-hand sides identically (the left sides are not treated necessarily the same as the right sides), we may fall back on the previous material for the scalar or vector equation. Thus suppose that
Hyperbolic Partial Differential Equations
572
we finite-difference (6.6.2) by (6.6.25)
-
-
h
Y
_
k
fr(«r.5-t-|-«r.i-l)
2fc But this is nothing more than the F-C approximation (6.2.6), which we previously stated was unconditionally unstable. The same holds for (6.6.25). To illustrate this point using the von N e u m a n n analysis, let us define
where Á Φ Â are constants. Substitution into (6.6.25) yields directly A(£
r+
B(i e'P r+,
e'
l
Psk
- £ e' )=^B(ξ β' r
fisk
Ã
-£ e'P )=
sk
r
"* -
βï+
^A(£ e'
sk
r
ξ'β' '~ *) β(
-
p<5+nk
ξ β' ~ ). Ã
Cancellation of common terms and elimination of A/B equations results in
U-\f
= £(e'e
k
- e-'"*) 2
p sin /3*. 2
But this then yields £ = l ± / p s i n fik and |£|
= ( l + p sin )8Ar) , 2
F C
2
I/2
which is (6.6.25). Thus the F-C algorithm is unstable. In the same sense we could write
l}
2
β(!
l)A
between the two
Second-Order Model Hyperbolic Partial Differential Equations
573
which is the C-C or leapfrog approximation. Just as (6.2.5) is conditionally stable for | ρ | = | bh/k | < 1, so (6.6.26) has the same bound. The important point to realize is that the finite difference must remain within the domain of dependence of Figure 6.17. Thus if we use a forward difference in the χ direction only, central differences in the y direction will be useful at both ends y ± bx - constant. We see that values at half-points are used frequently; this is to keep the formulas within the region of dependence. Recall that the derivation of Lax's approximation, (6.2.26), came about by replacing, in the unstable F-C form, the term u by u = {(u , + u _,). The resulting algorithm was conditionally stable (i.e., p < 1 . 0 ) . We may d o the same here with the identical result. Thus we write from (6.6.25), r
(6.6.27)
-
(6.6.28)
h
s
r
s
r
s +
r
s
2k
which has the stability bound ρ < 1.0. Another explicit algorithm is given by (6.6.29a)
(6.6.29b)
^
v
5
^
,
r + i . , -
w
,
^
r , .
,
+
,
-
^
b(v
_
h
-
,
)
-v - )
r+Us+l
r+Us ]
2k
The amplification factor for this approximation is U-l) +p £sin 0A:=O, 2
2
2
leading to the stability bound of p«s2.0. As an example of another disguised algorithm, we write (6.6.4) as , , ,
l
f
t
v
(6.6.30a)
1/2.5
+ 1/2
- | ( { " } Γ , ,
^
_Μ{Φ},.,
(6 6 30b)
M ' * ' . '
=
+
+ 1 +
{ » } Γ . , - | )
,-ι>}„)
k
^((Φ)^
+'/2.5
+1/2-{Φ}/ +
ι/2..«-1/2)
which involves a Lax half-step type of approximation followed by a second half-step which is leapfrog. When combined, this becomes the standard L a x Wendroff approximation to (6.6.4).
574
Hyperbolic Partial Differential Equations
Although each of the schemes described above has been explicit, there now exists, since u(x, y) is given a t y = 0 a n d y = 1, a rationale for implicit methods. Thus if we select (6.6.29) and average the right-hand-side terms at r + 1 and r (a Crank-Nicolson approach), we find that r+i.s
(6.6.31a)
v
h
r,s
-
°
\ί
_
~ 2k*-
r
s
+
[
/
--/'
z
( r i.s \/2~ r+i.s-\/l)]
+
W
W
+
^+1.5-1/2
(6.6.31b)
W
r.s~\/2
_
b
Κ ' ~
Yk
=
\
Wr s ] 2
v
«-1)
s
+
+
( ' · * ~ °'+ •·» - • )1 •
This is completely equivalent to an implicit finite difference approximation for namely u = bu , 2
xx
yy
8 u +28 u . 2
+
2
r+Ks
r s
8 u _^ 2
r
4k' The amplification matrix for (6.6.31) is \-a /4 2
[G] =
\+
a /4 2
ια \-a /4 2
ια
where a = 2p/[s'm(fik/2)]. The eigenvalues of this matrix both have absolute values of one; thus (6.6.31), as expected, is unconditionally stable. Finally, we illustrate, by analogy to what we did with the model parabolic PDE, a weighted implicit method (6.6.32a)
ϋ
'
+ ι
\ *=Vr
^ ' • ' "
(6.6.32b)
k ( H V
k
>
"
r
' '
=
l N
+
p
, ,
<
- H .
r
, , . , . . , )
+ 8,(
^ ^ r ^ . , ) + l
i
W r
, J
/ i 2 ( ^ ,
W f
l
t
, ..,)] I
r ^ , J l
with α .β ,α ,β as weighting factors. When α, = β, = a = β one obtains a second-order accurate implicit scheme. When a, = 0 , /?, = l , a = 1,/?, = 0 , it is transformed into {
[
2
2
2
2
2
(6.6.33a)
(6.6.33b)
Λ
/ι
λ
A
which is referred to as the cross scheme analogous to Richardson's method in parabolic systems.
Second-Order Model Hyperbolic Partial Differential Equations r\
/-\
r\
r\
r
k
\
J
\
A
ΚJ
"V.
)
r\
/ k
k
\
f
h
>—·
<•X-
<>
575
<
—< J —
Vr,s-I Of W,, -<
V , , or W,,, , r
5
s +
+
ία)
k/2
Ο - Ä - Ο Vr.(,s VrH,s-< Wr*t,s-(/2
Ä—Ο—Aw,,s+4/2 Wr.i-t/2
V , r
Ä
W ,s-(/2 r
s
(b)
Figure 6.18. Mesh configuration and computational molecule for { a ) Lax (6.6.34) and ( b ) centered (6.6.35) scheme; ®, þ indicate known information. With all these equations in hand, we now turn to a brief discussion of how the equations are actually used computationally. Consider for a moment that we know all the values of ν and w on the boundaries of the domain of interest (see Figure 6.18). Turning first to the Lax-type scheme, we rewrite (6.6.27) as
, =Η
(6.6.34a)
v
(6.6.34b)
w , , , = i(w,
r+
r+
,
s
f „,-,)
+
r
+ ^K. , - w s+
, , + w _ ,) + I(o _, , +
r
s
r
+
o
r
r
_,)
s
, ) .
Because the only unknowns (in the χ or y direction) are v and w , , it is apparent that we can calculate these unknowns using the triangular array of points shown in Figure 6.18. The calculation proceeds line by line with staggered values calculated. N o difficulties in this calculation are anticipated. r+
L l
r¥
4
576
Hyperbolic Partial Differential Equations
Next we turn to the centered scheme, v
(6.6.35a) (6.6.35b)
r+l
=v
s
r
+ p(w
s
r.s-\/i
MV+i.5-1/2 =
w
r
- w_ rs
1 + l / 2
+ Ρ(»,
+
ι., ~
1 / 2
)
»,+ι.,-ι)·
In this case the calculation schemes on k/2 are as shown in Figure 6.18. The two unknowns v , and w _ are calculated at different points. Thus on any line we can use (6.6.35a) to calculate every other point, and then the missing points are filled in with (6.6.35b). This proceeds line by line as far as desired into χ space. Finally, we turn to the implicit method, (6.6.31), which we rewrite as r+
(6.6.36a)
v
r + u
(6.6.36b)
w
r + 1
s
r+
, - |w
.^
1
/
2
r + l
Ul
l / 2
+ |w
J + 1 / 2
-|υ,
+
ι
r + 1
., + | » ,
+ ι
(
_
1 / 2
.,_, = w . , - , r
/ 2
+ f (»,v .,_,). r
Now there are three unknowns in each equation at the r + 1 level. However, if we eliminate w from the first equation the result is a single equation in v _ , u , ,, and t ? _ , (the reverse can also be done for the second equation) and we can use the tridiagonal property of this system to solve for all the u | on the line simultaneously. Thus we can fall back on well-known implicit techniques to solve (6.6.36). To illustrate how the initial and boundary values on õ and w are determined, let us pick a specific set of conditions. Thus we use r+t
A+1
r +
r + l i J
r +
"(0,y)
=
\[y(\-y)]
u (0,y)=Q x
χΦÏ
u ( x , 0 ) = w ( x , l ) = 0,
and choose b = \. Note that «(0,0) = 0 and «(0,1) = 0 and thus the corner compatibility is maintained. Because w = u and u =({)y( \ ~ v), it follows that =(:)(! ~2y) along x=0\ further, ν = M and thus ν = 0 along χ = 0 . Thus ν and w are now known at all points on the line χ = 0 . Turning to y = 0 , we see that u = 0 ; but since ν = M , it follows directly that ν = 0 along this vertical line. But since t; = 0 and thus c = 0 , from v = w we find that ηγ = 0 . This, in turn, says that we have a relationship between w and w , or w _, and w , (in the y direction). Thus it is sufficient to have available both ν and H- on the line ν = 0 . Once this is known, the explicit algorithms proceed without difficulty. For the r
w
(
a
x
x
v
r0
r
r
r
Second-Order Model Hyperbolic Partial Differential Equations
577
implicit case, the same type of reasoning must be used at y = \. Obviously, more complex conditions than those we have used will cause more complications, but these are not difficult to accommodate. To recapture u from ν and w, we may use u,. = w at a fixed r to yield, in a trapezoidal sense,
u s
+\
=
u
s
+
2( * w
+
5 + i ) -
w
Thus, once the w are known on an r line, the u on this same line can be calculated with second-order accuracy. 6.6.5
Mixed Systems
It is of interest to consider some of the features of P D E of the form u + bu =
(6.6.37)
x
au .
y
yy
We refer to this as a mixed system because it has components of the hyperbolic and parabolic P D E ; that is, if b=0 we have our model parabolic PDE, whereas if a = 0, the result is the first-order hyperbolic system. Further, when b = u. u + uu —
(6.6.38)
l
au \
y
yy
this serves as a one-dimensional model of the Navier-Stokes equation and is referred to as Burger's equation. We discussed briefly the mixed system (6.6.37) in Section 4.11. Turning to (6.6.37) first, we can select some finite differencing scheme: let us use forward differences for u and central differences for w, and This yields x
u
+
,
—
u
'ºι
b , '~
+
2 p
M
a ,
, r
s
+
1
~
- ' '
=
^2"("'"'
. +
1
~
2
u
' - *
>'
+
or (6.6.39)
u
r+
L l
= (1 - 2p )u,+
( Ρ - f ) «,. , + ( ρ + | ) « . ..,, ί +
Γ
Λ
[FCC]
where p = bh/k and p = ah/k . In terms of stability the von N e u m a n n analysis leads to the amplification factor 2
(6.6.40)
i = {]-2p)+p{e
ll>k
= (1 -2p)
+ 2pcosβk
+ å-'^)-^(β' ' β
-e^' ) 0k
- /psin βλ: = 1 - 2 p ( l - c o s ( 8 / c ) - /psin/3A:. [FCC]
578
Hyperbolic Partial Differential Equations
The absolute value is thus I i-1 = {[ 1 - 2ρ(1 - cosySA:)] + p s i n ^ A : } '
(6.6.41)
2
2
2
72
-
[FCC]
As shown by Hindmarsh and Gresho, 1983, stability may be expected if Λ is chosen to be the more restrictive of the parabolic limit or the hyperbolic limit, that is, h < min
(6.6.42)
lA \ b ' 2a J J2a 2
This shows the combined features of the two types of PDEs. If, instead, we use a forward ( « ) , backwards («,.), and central (κ,.,.) differencing, there results v
or (6.6.43)
ι/
Γ + 1 ι
=
(1-ρ-2 Κ. Ρ
+ ρ , , , + ( ρ + ΡΚ,,_
5
Μ
, .
J +
[FBC]
Now a stability analysis yields £ = (\-p~2 )
+ e' +(p
and with e~'
fik
= cosβk
—
+
fik
P
P
p)e'^
k
isinfik,
ξ = l - ( p + 2 p ) ( l - cos βk)-ip
sin fik.
Thus (6.6.44)
|£| = { [ l - ( p +
2p)(l-cosM)]
2
+
P sin0A-} 2
, / 2
.
[FBC]
Now the stability bound becomes (6.6.45)
\\
h<
/L b/k
/
|
Γ
l l FBC
2 '
+2a/k
which is about half the limit if either the parabolic or hyperbolic part operated alone. Thus we see the superposition of the two types of response. However, if (6.6.42) is used as a guide, a safety factor of about 5 must be added to ensure a proper stability bound. This feature also holds for higher-dimensional cases. Thus for u, + bu.. — a(u
v
+ Μ
,. ) ,
Second-Order Model Hyperbolic Partial Differential Equations
the stability bound is (k^k
579
= k)
2
1
b/k
+4a/k
:
For u +bu x
+ bu
yi
= a(u
y2
+ u
riri
r i r i
).
the stability bound is (A , = k = k) -
2
',2
b/k+2a/k
Now the safety factor must be even greater in these two-space-dimensional problems than in the one-space-dimensional case. Finally, we turn to Burger's equation, ( 6 . 6 . 3 8 ) , where in fluid dynamical systems a — 1 / R e , Re = Reynolds number. The question now is how to handle the quasilinear term M M , . A S shown by Cheng ( 1 9 6 9 ) , finite differencing is usually applied to MM, = ( | M ) , . . Thus one possibility is 2
<"·«>
"-^[(τΐ,,,-ίτ)..,,,
or as
(V),L
_ (u ). 2
t
+
|+
au («^|-ιι,_|)-(Μ ) . æ
ί
Λ
2(2 + a)k
with
-\n
2{2+a)
where a is an arbitrary parameter with α = 0 yielding
(6.6.47)
(^),L="' (
2
2 )
+
I 4
~
( m 2 ) i
-'
(e=0)
and a = oo yielding
(6.6.48)
\ 2
U
),·!,-
Jk
(fl-oo).
580
Hyperbolic Partial Differential Equations
On this basis Cheng proposed the two algorithms
(6.6.49)
« ,
+
=
«,_,., - i p [ ( « ,
, ) -(««,.,_ , ) ] 2
I +
2
and K.s
=
"r.s
~
^
[("r.5+ l)
+ ΡΚ.,+
(6.6.50)
«
r +
,., = « , . , -
2
_
( " r .
5
-
i f ]
Ι - 2 < , + « , . , - |]
5 [«, , ) - (<,-,)] 2
2
+
Both algorithms are second-order accurate and use (6.6.47) to replace the quasilinear term. Of interest is the fact that the first one (6.6.49) also treats the P D E via leapfrog and D u F o r t - F r a n k e l differences. Both algorithms have the feature that the stability bound is ρ *å 1 independent of p. Thus a special type of formulation has allowed the double stability bound depending on ρ and ρ to be removed. 6.6.6
Two- and Three-Space-Dimensional Hyperbolic Partial Differential Equations
As a natural extension of the one-space-dimension hyperbolic model PDE, we now consider either the two-space or three-space-dimensional case. We illustrate the necessary principles using the two-space-dimensional case, with most of the material being extended in an obvious fashion to the three-spacedimensional case. Thus, by direct analogy to the previous material, we now consider the initial value problem = «,•„•, + " . · , , · ,
(6.6.51) (6.6.52a) (6.6.52b)
u(0, ,y ) yi
=
2
f{ ,y ) yi
2
« (0,y,,y ) = /,(y,,y ). t
2
2
where we have assumed that y, and y lie in [0,1] for ease in presentation. To solve this hyperbolic P D E numerically, we need to add boundary information 2
Second-Order Model Hyperbolic Partial Differential Equations
581
on u at y, = 0,1 and y = 0 , 1 : 2
(6.6.53a)
u(x,0,y )
(6.6.53b)
u(x,l,
(6.6.53c)
u{x,y .0)
2
=
u {x) 0
y )=u (x) 2
l
t
= u (x)
(x>0)
2
u(x,y ,l)=u (x).
(6.6.53d)
t
3
In this way we get the mixed initial and boundary value problem. If we had three space dimensions we would need to add the independent v a r i a b l e ^ . To start our analysis we consider the initial value problem only [i.e., (6.6.51) and (6.6.52)] and select a point x*, y*, y* in space. Now we ask how much of the initial data at x = 0 is needed to determine uniquely the value of the analytical solution at x*, y*< y*. The answer is related now to a cone with y , which cuts out a circle (the interval of dependence on the vertex at J C * , original y , y plane) according to the equation 2
t
2
(y -yr) +(y -yi) <(x*) -
(6.6.54)
2
2
l
2
2
This is the characteristic cone in two space dimensions, analogous to the line in the one-space-dimensional case. The C F L condition can be detailed now in a simple fashion using the concept that the domain of dependence of an explicit difference equation must contain the domain of dependence of the P D E itself (the circle in the y,, y plane). Assuming that we are using k = k = k, the numerical mesh lines of the y,, y plane at x=0 form a square; but the circle associated with the analytical domain of dependence can be made to fit within this square with the circumference just touching the centers of the four sides of the square. But in this case the distance k is greater than the radius of the circle and rotated in position by 45° from the contact points [i.e., from (6.6.54), x* = h]. Thus it follows that 2
}
2
2
,
A<
k
—
or (6.6.55)
p < - l .
[2D]
l/2
In three space dimensions we talk about a sphere inside a cube and. using the same type of reasoning, obtain the C F L condition (6.6.56)
p= - L /3
[3D]
582
Hyperbolic Partial Differential Equations
N o t e that as the dimensionality increases, the C F L condition becomes more and more restrictive on the step sizes h and k that can be used in the numerical solution. With this information in hand, we turn to the only explicit finite difference approximation that we consider. In a straightforward way we can write ,+ i.,.i- r.,.,
u
lu
« -i.,.,
+
_
r
" Γ , . - Η , , - 2 " Γ , , , , +
h
k
2
« , , , - ! , ,
2
k
2
or (6.6.57)
, , = 2(1 ~2p )u
,,, + P (u
2
M r + I
2
r
r
s + ]
γ +
t
r s
_
U l
+ u
r s l + y
« r . , . f - l ) - « r - l . , . , .
+
where Μ ι , The Taylor
,+ u
k — k = k and p~ = h/k. Here the single point on the r + l plane is related to five points on the r plane and one point on the r — 1 plane. truncation error for (6.6.57) can be ascertained in the usual way via series and yields t
2
hh k {(\-f)(u +u J-2fu }+---.
(6.6.58)
2
2
4y
4
2}i2y2
Neither the selection p- \ nor \/]/2 leads to any serious truncation of this error term as it did in the one-space-dimensional case. Stability of (6.6.57) can be analyzed via the von Neumann approach to yield an amplification factor ξ = 2(\-2ρ )+ρ (å· +å- '+e 2
2
βê
φ
+
,pk
1 e-' )fik
ξ
or (6.6.59)
ξ - 2 [ l - 2 p ( l -cosjSfc ) ] | + 1 = 0 , 2
2
where we have used /?,/:, =fi k = fik. A careful analysis of (6.6.59) reveals that, to generate ξ *£ 1 requires that 2
(6.6.60a)
2
P
or (6.6.60b)
P ^ T ^ -
which is identical to the C F L condition.
Second-Order Model Hyperbolic Partial Differential Equations
583
Finally, we note from (6.6.57) that we need the data on planes r = 0 and r = 1 before we can start using this explicit algorithm. Just as we used u (0, y ) ~ f \ ( y ) and the line r — — \ to generate (6.6.18), now we can use the plane at r = - 1 to generate y
f-(«o.,+
«i. .,=(>-2f> )«o. ., +
(6.6.61)
2
i
J
i./
+
«o. -i., 4
+ "ο.,.,+ ι +
ιί+Α/ι...,.
"ο.*.ι-
where / , , = / , ( $ , / ) . Thus we now have information on the r = 0 plane (given initial data) and on the r = 1 plane (6.6.61) and the explicit algorithm may proceed. All we need to do is add the conditions (6.6.53) on the boundaries and the point-by-point evaluation of w(x, y,, y ) on the entire plane r — 2 can be made. Then we proceed to plane r = 3 , 4 , . . . and the computational algorithm is developed. 2
6.6.7
Implicit, ADI, and L O D Methods
We could obviously develop any number of implicit algorithms for (6.6.51) following the material for one space dimension in Section 6.6.3. But the results would not be useful in a practical sense because of the large number ( > 3 ) of unknowns at the r + l level. Thus, instead, we turn to the device used so successfully in the parabolic PDE, namely to represent the implicit forms in a split rather than composite sense. This, in turn, means that we will consider a variety of ADI and L O D methods. The paper by Fairweather and Mitchell (1965) possibly represents the best work in the ADI area. First, they outline two methods due to Lees (1962), which are perturbations on a variable weighted implicit method (thus they are Douglas-Rachford-type methods) and then a special higher-order-accuracy algorithm. To show these various forms, we delete the subscripts s, t and use the notation 8 u = u, ,-2« , + . s - \.i — ^ u/< ' ' k, = k = k. On this basis, for one space dimension, we may write (6.6.21) as u
2
r
u -2u r+]
t
t
il + L
+u
r
l
s o
e t
+
2
i
a
2
=p 8 (e , +(l-2e)u 2
r
2
r
r i i
U ti
r
eu .,). r
where O < 0 < 1. The first algorithm of Lees, called Lees 1 here, is then in two space dimensions, (6.6.62a)
u* -2u +u +x
r
=p 8 {eu* +(\-2e)u 2
r
l
+ eu
2
+x
i
r
r
+ p 6, [(l-20) ,+20 . ] 2
2
;
(6.6.62b)
u
r+i
M
= ut^+ep%(u ^-u r
r
t V
,),
1
,)
584
Hyperbolic Partial Differential Equations
where u%, is an intermediate value. Alternatively, we may rewrite (6.6.62) in split form as (6.6.63a) (l-(?p e ) * 2
2
i
U
+ 1
=2 ,U
_
M r
1
+ p 6 [ ( 1 - 2È )u, + fK_,] 2
+ p%[(
2
1 -20 Κ
+ 20 _,] U r
(6.6.63b) ( ΐ - ί Τ ί δ ^
) ^ ^ ^ , - ^
2
^ . , .
2
[LI]
Now we have three unknowns on each left side of (6.6.63), with the first operating in the y^ direction and the second in the y direction. The attractive tridiagonal feature of all A D I methods is retained. If we eliminate « * in (6.6.63), the composite form 2
+ )
(6.6.64)
M
r
+
I
-2
+ « _ =i5 (5 + 5 J [ 0 2
M
r
r
+(l-2(9)
2
2
l
U r + 1
M r
+ 6' _ ] Ur
1
,-«,_,)
[LI]
is obtained. A Taylor series expansion of (6.6.64) reveals that the local truncation error is - k<[(6 - ^ ) p + T ^ I K ,
+ 0(A ).
+ « ,)
4
5
4L
Finally, a von N e u m a n n stability analysis shows that the algorithm is unconditionally stable for è > i. The second method proposed by Lees has the same truncation error and stability but a different form. In turn, the split and composite forms are (6.6.65)
U
*
+ 1
=2
M r
-
_
M r
+ P%u
2
M
+ 1
M r
+ 9 _ ] (
H r
1
[L2]
r
2
+
2
2
r+
u,
2
= u%, + èρ ä ( u -2u
u, (6.6.66)
+ p « [f? * +(l-2f9)
l
r+l
r
« _,) r
- 2 u + u,_, = p ( δ + δ ) [ β ι ι , , + (1 - 2È)«, + 9χι,_,] 2
r+
2
2
r
+
-ρ^ δ δ ( 2
2
2
Μ Γ + |
-2
Μ Γ
+
Μ Γ
_,).
[L2]
Fairweather and Mitchell point out that (6.6.64) and (6.6.66) are special cases of (6.6.67)
« , - 2u + u _, = - ( δ + δ ) ( β ι ι , , + bu + 2
r +
r
r
2
2
+
r
cu _,) r
Second-Order Model Hyperbolic Partial Differential Equations
585
This may be written in the form (6.6.68a)
u* , = 2u - u _, -
(6.6.68b)
« , = « * , - 5, ( au ι
r+
r
, + bu + c « _ , )
r
r
+ f «, + f
2
r +
2
+
r
r+
,)
provided that = a . On this basis, they carried out a Taylor series expansion of (6.6.68) and found those values of α / , which would yield an 0 ( 6 , 6 ) ADI or composite form. The specific values 2
a = c= i(l-p );
Z> = - i ( l + 5 p ) ;
d = f=Mi-p ) -<
? = - ^ ( l + 10p + p )
2
2
2 2
2
4
were found, yielding (6.6.69a)
u%, = 2u - u _, - £ (1 - p ) « 2
r
,
2
2(1 + Sp ) 2
r
i-p [FM]
2(l + 10p + p ) 2
(6.6.69b)
«
f + l
=
^
+
1
- T k ( l - P
) « v
2
2
i
2
;
4
—
+
2
(i-p r 2
and the composite form (6.6.70) U
r
+
|
- 2 «
r
+ U
r
_
|
- - ( «
2
+ «
2 3
) [ ^ ( l - P
- i ( l + 5j5 ) 2
2
) ( « . M
]-S o [ i (l-p ) (u 2
M r
+ « r - . )
2
2
;
1
2
4
r + 1
+ u _ ) r
1
- J j ( l + 10p + p ) « ] . 2
4
r
As we mentioned earlier, these forms are 0 ( 6 , 6 ) , and a von N e u m a n n stability analysis reveals that the ρ *£ / 3 - 1 must be satisfied. However, this does not seem to be a serious drawback to the use of the method. The extension to three space dimensions can be developed in exactly the same manner. However, the complexity of the results prevents our writing them here. They are all given in Fairweather and Mitchell (1965).
586
Hyperbolic Partial Differential Equations
Next we turn to a series of locally one-dimensional (LOD) algorithms as developed by Gourlay and Mitchell (1969). Following the parabolic L O D material, we would write the two-space-dimensional model hyperbolic P D E (6.6.71)
=
+
in the form (6.6.72a)
ι-*» = «,•„-,
(6.6.72b) Each term in (6.6.72) operates in only one space direction. For the three-spacedimensional case, we would also write (6.6.73a)
«v> = » , , , ,
(6.6.73b) (6.6.73c) The principal question is which algorithm should be used to represent each equation in either (6.6.72) or (6.6.73). Common practice starts from the average or Crank-Nicolson form in one space dimension, that is, from
we write Π
-T7TL("r l.,- ]2k~
2«,-Μ.
+
h
Λ
+ "r+l.,-|)
This may be given in operator notation as (6.6.74a)
(1 - 4 j 5 5 )u , 2
2
r+
+ (1 -
{p 6, ,)u _>=2u 2
2
r
r
or (6.6.74b)
{\-\pX)(u i r+
+ u _,) = 2u . r
r
Second-Order Model Hyperbolic Partial Differential Equations
587
But if we apply this to each term in (6.6.72) over an χ step, we can write ( -4p «, ,)(w + « _ i )= 2 1
2
2
r
(À- ?&ί)( ,
(6.6.75)
4
ν +
+ α,- )
Ι / 1
2
r+]
1 / 2
[LOD]
+ u) =
2
..
= 2u,
t/2
(l - ip 5, , )(u
M r
r
2u + .
r
r
i/2
When t h e y , . y region is rectangular, the δ and δ, , operators commute and we and w from (6.6.75) to yield the composite form may eliminate u _ 2
2
2
r
l / 2
r + 1 / 2
(1 - p%)(1
(6.6.76)
- ip%)( ,
4
-2u +
u .,)
r
Mr+
r
= ^[(ίί + ^ ) - ^ β ^ ] ι . , .
[LOD]
2
T o complete the algorithm, we need to add conditions for /• = 0 and r = 1 and have a means available to calculate the values at u + , the intermediate points. This can be done using (6.6.52). r
u(0,y ..v )
(6.6.52a)
l
(6.6.52b)
=
2
l/2
f(y ,y ) l
2
« (0.>-,, r ) = / , ( y , . y ) 4
2
2
and adding H ( x , y,, y ) = « „ ( x , y,, y ) ,
(6.6.77)
2
2
λ 5*0
on the boundaries corresponding to perhaps y , = 0 , 1 and y = 0 , 1 . Thus we may outline the algorithm as 2
1.
"o.j,,
= / — p l a n e r = 0 is determined. ί - (
2·
+ :Α (δ + δ ,)/ plane r = l is determined exactly the same manner as previously.
in
3·
" + 1/2 4 Ñ δ , ) ( " ϋ . Γ + "ο.Λ+ ι ) b o u n d a r y planes from (6.6.75) and (6.6.77).
\
"Ι.ë.ι -
/v.ι
=
2
A/I.a.i
+
_
2
2
2
5
2
—
r
conditions for all
Now we may use (6.6.75) and (3) to advance into the χ domain as far as desired. Only tridiagonal techniques are required. Alternatively, one may consider the general composite (6.6.78)
(l + α δ ) ( 1 + < ) ( u 2
r
+
,-2u
r
+ u _,) r
= ρ [ ( δ + δ, ) + b8 %] 2
2
2
;
y
u
r
588
Hyperbolic Partial Differential Equations
which can be split into the L O D form (1 + α δ ) ( « , _ , - 2 « , _
(6.6.79a) (6.6.79b)
+ « , ) = {J> f>,\u _ 2
2
(l + aol)(«,_
1 / 2
-2u
(1 + α δ ) ( , - 2 u
(6.6.79c)
+ u
r
r + 1 / 2
r + 1 / 2
l / 2
tfifr,
) =
+ « ,) = j-p^
2
M
r
1 / 2
2
r +
«
r + 1 / 2
provided that b-2a + ΐ ρ . When a - b — - j p , we return to (6.6.75). When a = ij — 0p , b = {, where è is a parameter, (6.6.78) becomes 2
2
2
(6.6.80)
( V-^).5 J(«
[l+( t -^).S 2][l + 1
2
1
l
s
r + I
-2« + « _ ) r
r
l
When 0 = 7 2 , we obtain the Fairweather-Mitchell A D I form (6.6.70); and when è = \, that due to Samarskii (1964). Gourlay and Mitchell show that (6.6.80) is stable for all p > 0 if è>\ and that the local truncation error has the form
(fl-i^AVThus all members of (6.6.80) have order 0 ( 4 , 4 ) except the Fairweather Mitchell form, which is 0 ( 6 , 6 ) . In much the same way we could analyze the three-space dimension L O D form (6.6.73). Thus we would have the three-layer scheme (l-sP « )(«,-. 2
(6.6.81)
( l - i f J
2
«
2
2
+
, ) ( « , - t / 3
«•,-1/3
+
r
H
+
( ΐ - ί ρ δ ) Ê + ", 2
(ΐ-ίΡ δ 2
2 :
)Ê
+
2/3
+
+
Μ
2
=
2
w
, - l / 3
= 2u
t / J
2
« r - 2 / 3
=
2/3
=
^ É
=
2
2
[LOD]
r
" r
+
l / 3
" r
+
2 / 3
The composite form of (6.6.81), assuming rectangular regions, is (6.6.82)
(ΐ-^ δ )(ΐ-^ δ )(ΐ-| 2
2
2
2
2
Ρ
δ )( 2
Μ
Γ
+
= ρ [ Σ δ - & Ó 6 % + Tk?S %6 ] 2
2
2
γ
r
1
-2^ + «ι„
Μ Γ
_ ) 1
[GM]
First-Order Model Hyperbolic Partial Differential Equations
589
where Σδ
2
Óä ä =ä ä 2
6.7
2
δ + δ + δ 2
Î
2
2
+
2
2
ä ä}+ä ä 2
2
2
FINITE E L E M E N T S O L U T I O N O F F I R S T - O R D E R M O D E L H Y P E R B O L I C PARTIAL DIFFERENTIAL E Q U A T I O N S
In this and succeeding sections, we turn our attention to the simulation of hyperbolic equations using finite element methods. We discover that standard Galerkin methods do not, in general, provide satisfactory finite element approximations and other methodologies are invoked. Because hyperbolic equations are associated with wave propagation we find that an examination of the behavior of Fourier components enhances our understanding of the various numerical schemes. This was mentioned earlier in this chapter when dealing with finite difference methods. Let us begin our discussion of hyperbolic equations with a reexamination of the model first-order hyperbolic equation. (6.2.1)
u +bu =0 y
/>=constant>0
r
(6.2.2)
u(0,y)=f(y)
(6.2.3)
u(x,0)=u (x). o
6.7.1
Galerkin Approximation
The standard Galerkin approach is readily applied to equation (6.2.1). The trial function «, defined as Í
(6.7.1)
= 2
u(x,y)*»u(x.y)
^(χ)φ),
7 = 1
is substituted into (6.2.1) to yield a residual Λ, (6.7.2)
R(x,y)=u
+ bu .
x
r
T h e basis functions Φ,(ν) are specified a priori and required to satisfy the essential boundary conditions imposed on (6.2.1). The residual R is now made orthogonal to each basis function φ,, / = 1,...,/V. :
(6.7.3)
JR(x.y)4>,(y)dy=0,
i = l,2
N.
590
Hyperbolic Partial Differential Equations
Substitution of (6.7.2) into (6.7.3) yields (6.7.4)
/ ( Λ + Æ > Μ , ) φ , >-=(),
N.
ι = 1.2
(
y
A set of O D E s in time can now be obtained through combination of (6.7.4) and (6.7.1), that is,
(6-7.5)
" ldU, άφ, Σ ][ - ^ Φ , Φ , + Wj-jj*.)
\
f
>- = 0,
d
i = l,2
N.
We can write (6.7.5) in matrix form as
[A\[f
(6.7.6)
x
} + [ C ] { } = {0}, W
where α
,,=/φ,Φ,φ·.
du, _ dU, dx
dx
Given a set of basis functions, the coefficient matrices [A] a n d [C] can be obtained and the resulting set of O D E s solved using several schemes. For problems involving discontinuities in the initial data, however, we would in general obtain an oscillatory solution. We consider this problem in detail in the remainder of this chapter. We should point out here that there is an alternative formulation of the Galerkin method that we could have employed. H a d we elected t o use a two-dimensional basis function [i.e., φ, = φ,(χ, y)] the trial function would read Σ
&(x,y)=
(6.7.7)
Ufa{x,y).
7 = 1
Substitution of this expression into (6.7.4) yields " (6.7.8)
Σ
,/θφ,
Uji^.
3φ,
\
+b - d ^ d y ^ -
/=
1.2,...,7V.
First-Order Model Hyperbolic Partial Differential Equations
591
We can write this expression in matrix form as [A]{u)
(6.7.9)
{0),
=
where 9φ, 3φ, ^ Φ , + ^ Φ , | ^
and
u, = U,.
Thus we have replaced the set of O D E s with a set of linear algebraic equations. Had we selected an appropriate finite difference scheme to approximate the time derivatives appearing in (6.7.6), we could, in fact, obtain the same set of algebraic equations as represented by (6.7.9). T o demonstrate the difficulties encountered in the solution of (6.2.1) using standard Galerkin methods, let us formulate a problem using piecewise linear chapeau functions. We have used these bases several times in earlier chapters: they are illustrated in Figure 2.4 and are defined as y - y , - i
(6.7.10)
Φι
y,-y,-1 y,+\-y y,+\-y,
(y,-i
(y.^y^
>-, ). +)
where y\ — ik. When the definition (6.7.10) is introduced into (6.7.5). we obtain, after integration, the general expression
<«·'•»>
i ( ^ - f + % M ^ H
This expression must be modified, of course, for boundary nodes. We observe that the space derivative is replaced by a central difference approximation and the time derivative is represented by a spatial average. From our experience with the convection-dominated transport (Chapter 4), we should anticipate that the central difference approximation of the spatial derivative will lead to numerical difficulties. Let us rewrite (6.7.11) in the more general form
It is now apparent that when α = l, we have a standard finite difference scheme and when a = \, we retrieve the finite element form (6.7.11). With malice aforethought we adopt a trick introduced by Vichnevetsky and Peiffer (1975). Let us relabel every other value of U, as V ; in other words, consider the values t
Hyperbolic Partial Differential Equations
592
of U associated with odd indices as V We can now rewrite (6.7.12) as t
<«·»·>
r
« f + ( ¥ ) ( ^ ^ M ^ H
for even values of i, and
«·'·'»>
( ¥ ) ( ^ ^ ) + 4 H ^ H
for odd values of ;'. It should be apparent that this system of equations is consistent with the set of PDEs (Vichnevetsky and Peiffer, 1975). (6.7,4.)
. g
+
{
, - . ) g
^ .
+
0
and (6.7.14b)
(
1
_
α
)
_
+
α
_
+
Æ
, _
=
0
.
We assume here that the nodal values <7, and V are point realizations of relatively smooth functions u and v. We now take the arithmetic mean of (6.7.14a) and (6.7.14b) to give t
(6.7.15a)
_ ( _ )
+
Ë
_ ( _ ) = ο
and subtract one-half of these same equations to yield
It can be shown, using the methodology of Chapter 1, that equations (6.7.15) are characteristic equations for the set (6.7.14). We now note that (6.7.14) is second order, whereas our original P D E is first order. Thus we require two boundary conditions to solve this numerical approximation. Vichnevetsky and Tomalesky (1971) demonstrate how to treat this extraneous boundary condition using a method of characteristics near the boundary y y . Examination of (6.7.15) provides insight into the numerical behavior of the standard Galerkin approximation. The function ( ( u + v)/2) in (6.7.15a) clearly represents the smooth part of the numerical solution. This is evident from the fact that it is the arithmetic average of solutions at adjacent nodes and travels at the velocity b, as would be expected from the form of (6.2.1). The second characteristic solution is associated with the oscillatory part of the solution. Vichnevetsky and Peiffer (1975) demonstrate, using frequency analysis similar max
First-Order Model Hyperbolic Partial Differential Equations
593
I nitial
U
Figure 6.19. Illustration of the "smooth" and "oscillating" parts of a numerical solution to the first-order hyperbolic equation with indicated initial function (from Vichnevetsky and Peiffer, 1975). to that employed elsewhere in this chapter, that this behavior is associated with the wavelength 2k, which travels at the velocity b(\-2a). This phenomenon is illustrated in Figure 6.19. Soon we will demonstrate modifications to the standard Galerkin formulation which will eliminate these undesirable spurious oscillations. While we are involved with linear basis functions and the Galerkin method of approximation, it is interesting to consider the relationship between this scheme and finite difference methods introduced earlier. Mock (1976) presented a general formulation which, under certain restrictions, gives rise to explicit finite difference formulas. Following his development we introduce the expression
2/(t-T
(6.7.16)
Ak Ur 2
'«>, -
+ kpUj%
' φ , - U/φ, + ν>
Bk'U/φ^
- Ïιψõ/φ^φ,dy=0,
i = 1,2,...,/V,
where ρ = bh/k ^ C o u r a n t number. The integrand in (6.7.16) has already been discretized in time and three parameters. A, B, and C, have been introduced. If we assume linear chapeau basis functions for Φ,(>), use integration by parts for the second-order terms in (6.7.16), and perform the specified integrations, we obtain for a typical internal node, (6.7.Π)
|
(t//_V +
wr
- Ak{u;^
1
+
t/; V) - 1 ( u ; _ , + +
- 2u;
+1
+
+ u;/: )+Bk( u;_, - 2 / 7 ; + u ; , ) +
+ k \ ( u ; , - £//_,) - ck p ( , 2
+
ru;+u; ,)
- 2 u; +
u; )=o. +l
where the subscript s here refers to nodal location in a finite difference sense
594
Hyperbolic Partial Differential Equations
and r is the time step: we use r as a superscript here to minimize confusion in latter developments where multiple subscripts are used. When we choose A — \. (6.7.17) describes an explicit approximation. õ;
(6.7. i8)
+ ,
- ϊ ( ν;.,
+ AU; + õ; ,)
+ Â{ õ;_, - ιõ;
ë
+ § (ί// , - ί//-,) +
+
cp (u;_, - w ; + ί / / 2
+
õ; ,) +
, ) = ο.
If we further assume that  = { and C = {, we obtain (6.7.19a)
IT
1
- U; + \(ί// , +
- t / / _ , ) - ί p (ί7/_ , - 2 ( 7 / + ί// ,) = 0 2
+
or (6.i7.i9b)
c/;
+ ,
= (i-p )(v;-|(i-p)t/; 2
+ 1
+ f(i + p)c/;_ . 1
Those readers with remarkable memories may recall that (6.7.19b) is, in fact, the Lax-Wendroff scheme (6.2.33) developed in Section 6.2.2. Selected values of the three coefficients will generate additional finite difference schemes. Moreover, using higher-degree polynomial bases and a suitable inner product expression, third- and fourth-order difference approximations can be obtained. One may ask whether the oscillatory behavior of the solution can be circumvented using higher-degree polynomial bases. In the general case the answer is no. Higher-degree polynomials will not in and of themselves eliminate spurious oscillations, although their amplitude may be less. These higher-order approximations remain symmetric and, as we will now show, a nonsymmetric equation is required. 6.7.2
Asymmetric Weighting Function Approximation
We found in Chapter 4 that the method of weighted residuals with asymmetric weighting functions provided oscillation-free solutions for the transport equation even when very small dispersion coefficients were encountered. One would anticipate, therefore, that the same procedure could be used to obtain smooth solutions for the first-order hyperbolic equation. We begin by selecting a trial function based on chapeau functions as in the previous case, that is, Í
(6.7.20)
«*«=
Σ
uMWy).
7 = 1
where ^(y)
are defined in (6.7.10). From the method of weighted residuals, we
595
First-Order Model Hyperbolic Partial Differential Equations
write (6.7.21)
JR{x,y)w,(y)dy=0,
N,
/ = 1,2
where, as in the preceding section, R(x,y)
(6.7.2)
= u + bu . x
y
Substitution of (6.7.2) into (6.7.21) yields (6.7.22)
f{u +bu )w,(y)dy=0, x
ι = 1,2,...,/V. !
y
We now face the task of selecting a functional form for the weighting function w {y). In the preceding section we chose w (y)= 4>,(y) which gave rise to the Galerkin method. In anticipation of achieving a smooth solution we will now select an asymmetric weighting function of the form (Huyakorn, 1977) t
(6.7.23)
l
w,=
y-y,-\ y,-y,-\
, (y-y,-i)(y-y.) --3α, (y,-y,-\f
y,+\-y
,, (y-y,)(y-y,+ + 3a (y, -y,)
y,+\-y.
:
,
— i)
^ ^ , (y,-,
(y.^y^y.+
2
x).
+l
where a, is a free parameter assigned by the analyst. The first term on the right-hand side of each expression in (6.7.23) is simply the chapeau function used earlier [i.e., (6.7.10)]. The second term in each expression generates the asymmetry. These weighting functions are given in Figure 4.16. A set of O D E s in time can now be generated by substitution of (6.7.23) and (6.7.20) into (6.7.22) and subsequent integration over the space coordinate. The resulting expression for a typical internal node i is
= *(1 + α ) ί / _ - α , Λ ί / - * ( 1 - ο ) £ / 1
ι
1
1
1
ι + Ι
.
It is apparent from (6.7.23) that when a , = 0 , the asymmetric weighting function reduces to the basis function and we have the Galerkin approximation. As one would expect, the asymmetric approximation (6.7.24) then reduces to the symmetric case (6.7.11). On the other hand, if we select a, = I, the right-hand side of (6.7.24) becomes "upstream weighted." In other words, the
596
Hyperbolic Partial Differential Equations
spatial approximation is one-sided in the direction opposite to the sense of b. (6.7.25)
k
(i
+
, ) ^
l^
+
k
+
k
i - i ) ^ l
{
=
b { U i
_ i
.
U i )
Unfortunately, this scheme is not convergent. To obtain an asymmetric convergent scheme we apply the asymmetric weighting function w (y) to the spatial term and the symmetric function $,(y) to the time derivative. Thus we obtain t
(6.7.26)
+ ^!%,)^=0,
^(^φ,
,' = 1.2
Í.
This particular scheme does not fall within the umbrella of the method of weighted residuals. Consequently, we rely on Fourier analysis to demonstrate its numerical acceptability or lack thereof; this, we d o shortly. When we substitute (6.7.7), (6.7.10). and (6.7.23) into (6.7.26) and perform the indicated integrations, we obtain, for a typical interior node /,
kdU^ 6 dx
(6.7.27)
dx
3
dx
6
••^(\ + a )U,. -a bU-^(l-a )U, l
l
l
l
+
l
.
This scheme can be shown to be convergent for a suitable approximation of
dUJdx.
Let us assume that a finite difference approximation is introduced for such that (6.7.27) becomes
dlljdx
(6.7.28)
ί
(õ,-.ν - ν;.,)+1(õ,"
1
- õ;)+ί ( õ , - õ;,,) 1
.^(lllaiii-.V-.w"'- ^^,') 1 1
+
. _, (0±^ -. .. ._(lza) (1
)
(<
1
fl
l
).
This time approximation becomes a backward difference, Crank-Nicolson, and forward difference scheme when «9 = 1,6· = 0 . 5 and è = 0 . 0 , respectively. To demonstrate the impact of asymmetry (i.e., a , ) on solution to (6.2.1), we consider the propagation of a step discontinuity over the range Ο ^ ί ^ * ! .
597
First-Order Model Hyperbolic Partial Differential Equations FINITE Λ 'v ""•<-'
N
u/u
/
ELEMENT
θ · 0.5
> 1
h
= (.0
k
= (.0
\\
b
= 0.5
onalytic
0
—
ι
*^α,
\ττ \ ·.
=0.25
\ ·.
Figure 6.20. Finite element solutions to the first-order hyperbolic equation using a Galerkin (a, =0) and asymmetric («, = 0.25) approximation.
0.0
The following system of equations apply:
ox
dy
u(0,>0 = 0.0,
0
M ( X , 0 ) = M = 1.0,
0<x
0
The solutions obtained using (6.7.28) with ο, = 0 (standard Galerkin) and a, = 0 . 2 5 (upstream weighting) are presented in Figure 6 . 2 0 . * A C r a n k Nicolson time approximation was used in each case. r+l When the left-hand side of ( 6 . 7 . 2 8 ) is lumped (i.e., only V' and U, are considered), an asymmetric finite difference approximation results: (6.7.29)
ur' - u;=ρβ[
i/,:V - « , ß Ô 1
n
J
1 + «ι
+ p(1 - « ) ( - j -
1
^ ~
ί//-, - a , t / / -
ι/Ë7) 1 — α,
\ t// ,) · +
This equation is solved for the same parameters used in the finite element scheme and presented in Figure 6 . 2 1 . Thus we can compare an upstream weighted finite difference and finite element scheme by examining Figures 6 . 2 0 and 6 . 2 1 . In each case a value of a, was chosen just large enough to suppress spurious oscillations. The calculations indicate that the oscillations generated •The calculations presented here and in the examples to follow were performed by A. Shapiro, a research assistant in the Department of Civil Engineering, Princeton University.
598
Hyperbolic Partial Differential Equations
Figure 6.21. Finite difference solutions to the first-order hyperbolic equation using β, = 0 and a, =0.31.
through numerical dispersion or phase error are suppressed at the expense of excessive dissipation. This dissipation smears the sharp front and generates a solution to a second-order parabolic rather than first-order hyperbolic system. In other words, the solution exhibits a diffusive element consistent with what one would expect from the convective-diffusive transport equation. In this case we have numerical rather than physical diffusion. 6.7.3
An Ç
1
Galerkin Approximation
In addition to the formulation outlined above, other schemes have been developed to accommodate the problems associated with the solution of first-order hyperbolic equations. One of these is the H~ Galerkin method, first introduced by Rachford and Wheeler (1974) for two-point boundary value problems and later extended to first-order hyperbolic equations by Baker (1975). We begin by writing the weighted residual expression for (6.2.1) as l
(6.7.30)
/Jfl + HSjH'^ ' 0
,= 1
' 2 N
Application of integration by parts yields ι
<«·»·>
/,(£•>-<)*
+
WW,
ο
= 0,
i = l,2,....JV.
W e now introduce our standard expression for u,
(6.7.1)
u(x,y)=
Σ
u.ixWy)-
First-Order Mode) Hyperbolic Partial Differential Equations
5M
The weighted residual formulation (6.7.31) now becomes (6.7.32)
N.
2
Let us now consider the constraints imposed on j(y). To evaluate (6.7.32), we note that (fy^dvtjdy must be integrable. Thus we impose higher-order continuity constraints on w (y) than on
(
r
6.7.4
2
Orthogonal Collocation Formulation
In this section we present first a general collocation formulation for the first-order hyperbolic PDE and then illustrate a modification of this theory to incorporate asymmetric basis functions. We observe a remarkable improvement in the numerical solution when the asymmetric bases are employed. The collocation method is a specific case of the weighted residual method wherein the weighting function w, is selected to be the Dirac delta function, (6.7.33) Substitution for R(x, y) yields (6.7.34)
f(u
x
+
bu )t(y- )=0. y
yi
i = l,2
M.
βοο
Hyperbolic Partial Differential Equations
Equation (6.7.34) can be written in the equivalent form (u + bu )\ =O
(6.7.35)
A
y
y
/ = 1,2
t
A/.
The trial function u(x, y) we write, using Hermite bases, as dU
N
(6.7.36)
2U (x)* {y)
«=
J
0j
-^(x)t (y).
+
}j
In previous chapters we have used a coordinate transformation when Hermite bases were employed. Because of the simplicity of the first-order hyperbolic operator, we develop this approximation using global coordinates. The Hermite basis functions are defined as:
^j(y)=-n(y-yj-kY[2(y-yj)+k],
(6.7.37a)
(6.7.37b)
(6.7.37c)
(6.7.37d)
^\j*i(y)=Ti(y-yj~k)(y-yj)
•
The subscripts j and j + 1 refer to nodes located on the left- and right-hand sides, respectively, of a typical element. In other words, a typical element spans the interval (jk =£ y< (j + 1 )k). T o obtain the approximating equations, we first combine (6.7.35) and (6.7.36) to yield, for the case of b — \,
(6.7.38)
£
l
d u
,
d_
+ dx
dy
1
dy
dy
dy
=0, ; = 1,2
M.
When (6.7.38) is modified to account for boundary information, the number of degrees of freedom Ν will be the same as the number of equations M. Although (6.7.38) is a complete problem description, it is difficult to visualize the form of each collocation equation. T o clarify this point we examine next the collocation equations for a specific element. There will be two equations in the four unknown parameters U, dU /dy, U and dU^ , /dy. Because these coefficients are common to equations in two adjacent elements. t
J+
First-Order Model Hyperbolic Partial Differential Equations
601
the correct balance of equations and unknowns is achieved only when the complete set of equations is assembled. For one element we can write (6.7.38) as
(6.7.39)
~dx~^ Tx\ ly~j^ ^~ay~ ly~~ay~ +U
+
d
+
^Φο + ι
IdU,
+ dx
7
dv
dU
dy
+1
J+l
~lx~ '^
+
4 i
Λφ +| υ
dy
dy
= 0, f = 1.2.
wherey, = [ 7 + 3 ( 1 — 0 . 5 7 7 ) } A r a n d y = [; + ( 1 for the interval [jk, O' + l ) * ] . T o evaluate derivative of ( 6 . 7 . 3 7 ) . that is, 2
6
d
(6.7.40a)
dy
~ A-
3
2
are the Gauss points we require the spatial
+0.577)]* (6.7.39)
[(y-yMy-yj-k)],
(6.7.40b)
if^iy-t-Wiy-y,)-'']'
(6.7.40c)
d
(6.7.40d)
dy
_
1
~ ^ Tk
iiy-yMy-y^k).
It is now necessary to evaluate (6.7.37) and (6.7.40) a t y , and>- . Having carried out this procedure, we can now write 2
Φο,Ι,
(6.7.41a)
d
(6.7.41b)
dy
(6.7.41e)
2
-6ba k b (2a
(6.7.41c)
(6.7.41d)
-α (2α-3)
2
ά φ .Oj
+ \)
-6ba
dy *by .L„ = * (2fl + l ) 2
+
802
Hyperbolic Partial Differential Equations
tab k
% j + \
d
(6.7.41 f)
dy
(6.7.41g) 6ab k
<*Φο;+ι dy
(6.7.41h)
(6.7.4Π)
d
(6.7.41J)
-a{3b-\)
dy
(6.7.41k)
b ak 2
(6.7.411)
= -ft(3a-l)
dy
(6.7.41m)
*\j+l\y
d
(6.7.41n)
= l
^ \ j + \
^\ \\y J+
(6.7.41p)
dy
b
2
a
k
~b{3a-\)
dy
(6.7.41ο)
~
=
2
~a bk 2
~a{3b-\), V2
where a = ( l + 0 . 5 7 7 ) / 2 and b=(l - 0 . 5 7 7 ) / 2 . The two collocation equations can now be written by combining (6.7.39)-(6.7.41). Thus we obtain (6.7.42a) dU,
,
d I <M, \
6ba
+ b\2u + \ ) dx- ^ - b ' a k 4dxd - [ dUj+\\ dy d
d
, 6ab
V, dU.
First-Order Model Hyperbolic Partial Differential Equations
603
and
dU dx
-fl (2o-3)
J + l
2
~a(3b-\)
— 7 ^ = 0 .
".v
In matrix form (6.7.42) becomes (6.7.43)
d
Vj
dx dUA -α (2α-3) 2
b (2a 2
+ \)
a bk
b (2a + \)
2
2
b ak
-a {2a-3)
2
2
-
b ak
dx \ dy J
-
a bk
dU
2
2
J+l
dx
dU Al dx \ dy J+
-6ba k -6ba
-a(3b-\) -b(3a-\)
6ab k 6ab k
-b(3a-\)
A
-a(3b-\)
dy
d
dU
J+i
dy
We write (6.7.43) as (6.7.44)
where the elements of [A] and [B] are evident through examination of (6.7.43). This system of O D E s is generally solved using a finite difference approximation of {du/dx}. Employing a general weighted scheme, (6.7.44) becomes (6.7.45)
[A]
{«Γ'-{"Γ
) + 0[Â]{ΗΓ
+
,
+ ( 1 - 0 ) [ * ] { Η Γ = {Ο}.
When 0 = 0 . 5 , a Crank-Nicolson scheme results. A "solution" to the step
604
Hyperbolic Partial Differential Equations ORTHOGONAL
COLLOCATION
t
, STANDAF STANDARD l\ -ATION ,' r * ^ FORMUL,
to
u/u
\ ' V I \ JL^ASYMMETRIC WEIGHTED
0
0.5r-
0.0
0 .5
4
Figure 6.22. Collocation solution to the first-order hyperbolic equation using a standard and asymmetric approximation.
0
y
propagation problem is presented in Figure 6.22; the oscillatory behavior clearly precludes its utility for practical applications. 6.7.5
Orthogonal Collocation With Asymmetric Bases
The oscillatory pattern of the orthogonal collocation solution presented in Figure 6.21 is similar to that observed in finite difference and finite element solutions. This behavior is consistent with our expectations regarding the symmetric approximation evolving out of the Hermite basis functions. An asymmetric formulation is readily achieved using the modified Hermites introduced in Chapter 4. The new bases are written as (6.7.4a) (6.7.4b)
Φο, = Φο, + « ο * Φθ/+ι
=
Φο +ι + 7
a
o
w
(6.7.46c)
4> \j = 4>\j + <*M
(6.7.46d)
Φ ! + | - Φ ι ^ + ι + «ι '* .
a
ί
Μ
:
7
where the function w generates the asymmetry and is given by (6.7.47) N o t e that in (6.7.46) there are two undetermined parameters, a and a,. These parameters are assigned values depending on the numerical behavior of the 0
First-Order Model Hyperbolic Partial Differential Equations
60S
system. O n e wishes to assign values of a and a, that are adequate to eliminate oscillations while rrunimizing numerical diffusion (dissipation). T h u s o n e would ideally like to assign values as close to zero as possible; unfortunately, this is not always possible, as Figure 6.22 demonstrates. The numerical procedure now involves substitution of (6.7.46) for (6.7.37) in the preceding section. The remaining elements of the procedure are unaffected by this redefinition of the basis functions. Figure 6.22 illustrates the improvement in the solution achievable using asymmetric bases. When a — a, = 0 , the method obviously reduces to the standard orthogonal collocation formulation. U p to this point we have presented several schemes for solving the first-order hyperbolic PDEs. Now we wish to examine their relative merits and numerical behavior using the same type of Fourier analysis techniques outlined in Section 6.2.3. Q
0
6.7.6
Dissipation and Dispersion
T h e concept of dissipation and dispersion in the numerical solution of firstorder hyperbolic PDEs was introduced in Section 6.2.3. The extension of methodology presented there for finite difference schemes to finite element methods is not difficult in concept. In practice, however, finite element analysis is generally more algebraically complicated and computationally tedious. The reason for this is that the analytical expressions for the eigenvalues using Hermites generates formulas that are awesome. In spite of these impediments, we now undertake an analysis of dissipation and dispersion in these methods. There appears to be n o other approach that provides the same degree of insight into the behavior of numerical solutions to hyperbolic equations. Recall from Section 6.2.3 that the numerical error associated with the solution of hyperbolic PDEs can be viewed in terms of wave theory. If the desired solution is described in terms of a Fourier series, one can investigate the behavior of the solution through an examination of the individual components of the series. These individual components are identified with sine-cosine waves that propagate with specific phase and amplitude (see Figure 6.1). Unfortunately, we find that numerical operators, such as finite element or finite difference equations, do not preserve the correct phase and amplitude. Errors associated with the phase are observed as the spurious oscillations we encountered earlier in Figures 6.19 through 6.22; we denote this type of error dispersion. When the amplitude of the numerical wave is damped relative to the analytical wave, discontinuities in initial conditions are smeared or diffused during the solution process. This phenomenon is illustrated in Figures 6.20 through 6.22 and is designated dissipation (we earlier referred to this smearing as numerical diffusion because it affects the solution as if a second-order "diffusion" term were added to the equation). In Section 6.2.3 we developed criteria for the quantitative evaluation of dispersion and dissipation. There were two methodologies presented. One
606
Hyperbolic Partial Differential Equations
examined phase error and amplitude error at the end of each time step; the other considered these phenomena after the nth wave had propagated one wavelength (i.e., N„ time steps). In this section we use the latter formulation. Using this approach, we define the amplitude modification as the ratio of the amplitude of the numerical wave to that of the analytical wave after N„ steps, li \ -
\£\ "
N
(6
' ' 7
N
*· ÉâΓΜÉ*
481
=
=
,
ù
·
where ξ" and are the amplification factors of the analytical and numerical operators, respectively. The phase error is given by È =
(6.7.49)
Ν„φ -2ð,
η
ηΝ
where φ is the numerical phase change of the nth component after one time step and is given in terms of the amplification factors £„ as ηΝ
(6-7.50)
*„„ = t a n - ' ( ^ ) .
This relationship is easily seen through examination of Figure 6.1. In summary, we compute phase error θ „ and amplitude error R„ using (6.7.48) and (6.7.49) and the amplification factors of each numerical scheme. An examination of the error behavior will provide insight into the relative merits of each numerical approach.
Galerkin Finite Element In Sections 6.7.1 and 6.7.2 we developed the standard Galerkin finite element and asymmetric weighting function approximations, respectively. The standard Galerkin scheme was shown to be a special case of the more general asymmetric weighting function approach. Consequently, it is necessary to develop only the theory for the asymmetric approach. We found, in Section 6.7.2, that the asymmetric weighting function approach generated an approximation for the model first-order hyperbolic P D E of the form (6.7.24)
dU^ dx
3
I6
dx
4
dx
= |(1 + α )1/ _,-α,61/ -^(1-α )ί/ 1
1
ί
Ι
Ι + 1
Let us employ a finite difference approximation for dU /dx. m
. The resulting
First-Order Model Hyperbolic Partial Differential Equations
607
equation is (6.7.51) 1 + a,
1
+ [j + 0 a , p ] t / / +
a
|
+ ,
(i i) o-.» +
+
U f l o
1
_
t
t
'
l + a,
+
1-a, [ ( I - ^ ) - ( i - i ) p ^ j i / ; , .
[j-(i-i)„ p] /;+ 1
i
I
We now introduce one component of the series representation of «, ύ„ =
(6.7.52)
F e ' '» " . [ a
x+ifl
v]
n
Equation (6.7.52) can be written for discrete time as ,5'+*=
e „1ι«*
+ ΐ» + ιβ..ν\ — ñ fX<< \e\"''« h
x
+
t»y\
t
where £ , = e'""* is defined as the amplification factor. Thus for discrete time and space, we obtain lFE
(6.7.53) where we introduce the subscript s to designate the spatial coordinate. Substitution of (6.7.53) into (6.7.51) yields the relationship
(6.7.54a)
{, | I FE
+ +
i-(l-«,„
l 5 +
i + ^ - if-Ilil ) e
l-A«l(I + i + ( l - i ) i ± i l )
^"«•"(ΐ-ΐ-ο-^ρ-^);
f
Hyperbolic Partial Differential Equations
608
This equation is readily solved for £
n F E
. The resulting expression is
(6.7.54b) i PE = [ ! - ( i - e ) « , P + ^ ' ( |
+ ^ +
N
( i - i ) p ^ )
+ · ™ ( Η - ο - · » ^ ) ] X [j + èα-p + e I - * * > ( 1 + * - rp'-ø
)+
(1 -
-I
*
Given the relationship (6.7.54) and the amplitude and phase error definitions of (6.7.48), (6.7.49), and (6.7.50), we are now in a position to examine the numerical characteristics of the Galerkin finite element and asymmetric weighting function algorithms. Let us first consider the standard Galerkin formulation. In this case the asymmetric weighting function parameter is zero (i.e., a, = 0 ) . Equation (6.7.54) becomes 2
(6.7.55)
£
n F E
+
< ?
[-/»„*]
(l
+
(
1
-
f
)
|)
+
e
B
M,(l-
(
1
-
f
)
j)
=
We can observe the behavior of each Fourier component by evaluating (6.7.48)-(6.7.50) and (6.7.55) for selected values of n. The resulting curves are presented in Figure 6.23. Figure 6.23a tells us that, for all components of the Fourier series, the numerical wave is propagated with the same amplitude as the analytical wave. In other words, there is n o nonphysical amplification or damping induced by the numerical scheme. This would appear to be an asset but, as we now discover, in some instances numerical damping can, in fact, be an advantage. To see how this can take place, consider the phase-lag diagram, Figure 6.236. Wavelengths greater than 10* are propagated with very little phase lag. Smaller wavelengths, however, exhibit significant phase lag. In fact, the 2k wave does not propagate at all. Thus those Fourier components of shorter wavelengths get out of phase and lead to the oscillatory behavior of Figure 6.20. We consider the importance of this phenomenon in more detail in the discussion of collocation. The case depicted in Figure 6.20 is particularly sensitive to phase error. This is because the propagation of a sharp front requires resolution identified with small wavelengths. When these components are not propagated with the correct phase, the solution degenerates. The use of higher-degree polynomials will
First-Order Model Hyperbolic Partial Differential Equations
609
2.0
—
k * 1.0 h « t.O b = 0.5
1.5
0
=0.5
Ο
or
1.0
3
Z.
0.5
å
0.0 1.0
Wavelength
10.0
/ Space Increment (a)
k h b
300
c
θ
200
100
0
( l_n / k )
=1.0 =4.0 =0.5 =0.5
® 100
a οι
in
0 -100
a
f
- 2 0 0 •300 1.0
Wavelength
10.0
/ Space
Increment
400.0
( L
n
/ k )
(b)
Figure 6.23. Amplitude ratio (a) and phase lag ( b ) for Galerkin finite element formulation based on linear chapeau basis functions. generally enhance the accuracy of the scheme, but not as markedly as one might anticipate (see Gray and Pinder, 1976). The question naturally arises as to whether the spurious oscillations appearing in Figure 6.20 can be reduced or eliminated, and at what cost. If the smaller wavelengths could be propagated more accurately, we would expect, and indeed observe experimentally, an improvement in solution quality. This generally requires the use of a higher-order method, with its associated increase in computational effort.
610
Hyperbolic Partial Differential Equations
An alternative course of action is to eliminate through numerical damping those wavelengths that exhibit deleterious phase lag. The higher modes are thereby selectively eliminated from the Fourier series. The sharp front, now devoid of these components, is no longer sharp but rather smoothed or smeared. As mentioned earlier, this is often referred to as numerical diffusion and the associated damping phenomenon is known as dissipation. Numerical dissipation is easily introduced through the approximation of the time derivative. We have used the centered-in-time approximation in this example, and it generates no numerical dissipation. As we increase è from 0.5 to l.O, numerical dissipation is introduced. This is apparent from a comparison of the magnitude of the numerator and denominator of (6.7.55). It is interesting to draw a comparison between finite difference and finite element behavior whenever the opportunity arises. Such a situation occurs when the time derivative approximation is lumped, as illustrated in (6.7.29). This finite difference equation leads to the relationship (6.7.56) 1-(1-ί)ρ
β |
+^-'Λ*Ι(1-ί)ρ-^-^.*Ι(]-β)ρ-!-^
l+0pa,- +
^,Ì - 1Æ^1 è ρ
Following the procedure presented above for the finite element formulation, we now obtain the amplitude and phase error plots for the finite difference scheme. These are presented in Figure 6.24. The amplitude ratio is still unity, as in the case of the finite element method. Thus all components are propagated without numerical amplitude error. The phase behavior is similar to, but different from, the finite element case. Comparison of Figures 6.236 and 6.246 reveals that this is, indeed, the case.
Asymmetric Weighting Function Approximation We now consider the behavior of a finite element formulation that leads to an asymmetric spatial discretization. One possible choice of numerical operator is given by (6.7.51). The standard Galerkin formulation given above was the special case of a, = 0 . Consider now the possibility of changing a, to obtain an oscillation-free solution. The obvious course of action is to use (6.7.51) directly with an appropriate modification of a,. Unfortunately, this leads to a nonconvergent solution. An alternative convergent scheme is obtained by employing symmetric weighting on the temporal term and asymmetric weighting on the spatial term. The resulting algorithm is given by (6.7.28). Substitution of the n t h Fourier
First-Order Model Hyperbolic Partial Differential Equations 2
611
0 k h b
θ
=1.0 =1.0 =0.5 =0.5
ο ο
1.0
α> 3 •-
Ο.
0.5
Ε <
0.0 1.0
400
Wavelength
/
100.0
Space Increment (a) k h b
300 C
θ
200
( L
n
/ k )
=1.0 = 1.0 = 0.5 = 0 5
100
Ο
in
Ο -C
0 -100 -200 -300 4.0
40.0
Wavelength
/
Space
100.0
Increment
( L
n
/ k )
(b)
Figure 6.24. formulation.
Amplitude ratio (a) and phase lag (/>) tor centered finite difference
component into this equation yields the following relationship: (6.7.57) f SiFE A
1 + a,
-
+ e 7/3,,*] Ι X
J
- +
/ι
6
o \ - '
Ο"·)*"
l
W
2 0p
°Ί
1 + a,
1-a,
612
Hyperbolic Partial Differential Equations
It is interesting to compare this expression with the earlier relationship for the more general asymmetrically weighted approximation (6.7.54b). It is observed that as one increases a, from zero, the spurious oscillations in the numerical solution decrease in amplitude. Simultaneously, the sharp front becomes smeared, owing to numerical diffusion. The trade-off between numerical diffusion and spurious oscillations is evident. The decision as to the optimal value of a, is consequently a subjective one. In some nonlinear problems, oscillations lead to nonconvergence and oscillations are therefore intolerable. More often, however, it is simply a question of esthetics.
2.0 k
c 5 Ο
h b
θ
1.5
« 4.0 «4.0 =0.5 =0.5
4.0
-ó
3 -
ex
0.5
å <
0.0 4 .0
Wavelength
40.0
/
k h b
300 C
®
400.0
Space Increment (a)
è
200
( Ln /
k)
=1,0 = (.0 « 0.5 =0.5
400 ó
_l
»
0
-too
in ó
f
- 2 0 0 - 3 0 0 4.0
Wavelength
40.0
/ Space
Increment
400.0
( L
n
/ k )
(b)
Figure 6.25. Amplitude ratio (a) and phase lag (b) for asymmetric weighting of the spatial term in finite element formulation.
First-Order Model Hyperbolic Partial Differential Equations
613
To determine why asymmetric weighting ameliorates the numerical solution, it is necessary to examine the amplitude ratio and phase error plots of Figures 6.25 and 6.23. This comparison reveals that the phase error of the finite element scheme is essentially unaffected by the introduction of upstream weighting in the spatial derivative term. The amplitude ratio, however, is markedly changed. A broad spectrum of components are severely damped. In fact, those components that exhibit the most significant phase lag are also those that are the most damped. Thus one can conclude that the dissipative process eliminates the spurious oscillations through selective damping of specific Fourier components. Unfortunately, this process also destroys those components that define the sharp front. The solution now exhibits the smeared appearance characteristic of numerical diffusion (see Figure 6.20). Once again we have an opportunity to compare finite element and finite difference methods. When the time derivative is lumped at node i in the sense that the contributions from nodes (/' — l) and (/ + !) no longer appear in the discretized equations, the asymmetric weighting function approach reduces to an upstream weighted finite difference scheme. Specifically, the general relationship of (6.7.28) becomes the finite difference scheme of (6.7.29). The amplification factor relationship derived from (6.7.29) is given in (6.7.56). T h e amplitude ratio and phase error for a, =0.31 are presented as Figure 6.26. A comparison of Figures 6.26 and 6.24 reveals that upstream weighting in finite difference and finite element schemes results in similar numerical behavior. The finite difference phase error is not influenced significantly by upstream weighting. The amplitude ratio, however is changed significantly. Over a broad spectrum of wavelengths considerable numerical damping is introduced. Once again this damping minimizes the impact of the phase lag by suppressing the most deleterious components. The result is a smooth solution that exhibits significant numerical diffusion (see Figure 6.21). In summary, we can say that phase error in a finite element or finite difference scheme leads in general to spurious oscillations. An asymmetric spatial approximation introduces dissipation, which suppresses the troublesome Fourier components. Unfortunately, these wavelengths are required to properly define sharp fronts. Consequently, the smoothed solution is also smeared and resembles a solution wherein physical diffusion has been introduced. This smearing due to dissipation is known generally as numerical diffusion. When initial conditions are representable by longer wavelengths, the short-wavelength oscillations should be less troublesome.
Orthogonal Collocation To complete our discussion of dispersion and dissipation, we now consider the orthogonal collocation schemes used to generate the solutions appearing in Figure 6.22. This analysis differs from the preceeding inasmuch as we now consider two dependent variables per node. Even for this very simple analytical operator, the approximating algebraic equations are rather cumbersome. They are given for the symmetrical case by (6.7.42).
614
Hyperbolic Partial Differential Equations 2.0 k h b
θ
c
rr
4.5
·
1.0 «1.0 «0.5 =0.5
σ 4.0
a>
¼
a
0-5
å <
0.0 4.0
40.0
Wavelength
30
®
c
-
/
100.0
Space Increment (a)
0
κ h b
θ
200 400
o _1 σ .c 0_
( L p / k )
= 1.0 = 1.0 = 0.5 0.
0 -40
0 /
-200 -300
1
4.0
r
/
/
/
•I
*·
•
•
-
/
40.0
Wavelength
/
400.0
Space Increment (b)
( l_r\ / k
)
Figure 6.26. Amplitude ratio ( a ) and phase lag (ft) for an upstream weighted finite element formulation.
The development begins by selecting one component of a Fourier representation for u and DU/DY, (6.7.58a)
U„(x,y)=F
{
)
n
e^
+
" ^ i
and (6.7.58b)
du { x , y ) = F y ° ^ dy
+
<»^.
First-Order Model Hyperbolic Partial Differential Equations
615
These expressions can now be used to obtain (6.7.59a)
U,r
(6.7.59b)
dU,, dy
=
h
LM:
du; dy
+h
Substitution of (6.7.59) into (6.7.45) yields (6.7.60)
du;
du;
+ -^-(€-c-D*.
+ -^-(«.,-i)* ""XH ,
i
dy
1
dy
dy
1
dy
1
du; dy
άώ, dy
dy
+ 1
0,
dy
i
=
l,2.
We have left the equation general in the sense that the form of the basis function does not appear explicitly. Thus the formulation holds for both the symmetric and asymmetric basis functions. Let us now rewrite (6.7.60) in matrix form as
M1W
(6.7.61)
= {0},
where
U-c-DK + pi[«
l f
+
+
e "-* *^.) 1
1
(l-i)](^
+
i
I
A
^
1
= 1,2
616
Hyperbolic Partial Differential Equations (ί.,-1)(ψ„ + «'"·"*ι^.)
'„=
ί = 1,2
*, = (// *
dy •
2
For a solution to (6.7.61) to exist the determinant of [A] must vanish, det[/l]=0. This provides the required equation in £ . This equation can be solved and, after a great deal of algebra, we obtain the two roots n c
_ -
(6.7.62)
B±(B -4AC) 2A 2
1/2
where Á = ( β + βα ){α 2
4
+ èα,)-(α,
η
 = (α +èα )[α (\-2è)-2α ]-(α Ë
2
- a,(a
ίί
s
º
+ èα )+
+
2
7
α = pk 2
4
dy
dy
dy
dy
fl3 = K + * " ' * S . ] . v 1
,
+
=ê+* "-*»φ 1
â 4
õ + 1
]
ν ι
]
6
5
%
+ e)-a \
2
èα )[α {\-2è)-2α ]
+ èα )
º
C = [a (\-e)-a ][a (\ g
5
}
α (α
6
+ «,)( a + èα,)
l
+ {a (\-e)-a ][a (e-l) b
5
l
+ a] 3
First-Order Model Hyperbolic Partial Differential Equations
1*ϋdy
a = pk b
α = pk
\ΦÌ*»1ΐ+ dy
ι
+
Â
dy
8
617
dy
In the evaluation of (6.7.62), one may use either the symmetric bases of (6.7.37) z.o k h b
è
1.5
σ
= 4.0 = 4.0 =0.5 =0.5
t .o
or 0)
3 ^
0. 5
a.
Ε <
0.0 4.0
Wavelength
/
40.0
Space Increment (a)
30 0
h b
200
c
©
è
400.0
( L r i / k )
= 4.0 = 4.0 = 0.5 õ
400 C7> ó _J
0
a> - 4 0 0
«ó a.
- 2 0 0 -
300 4 .0
Wavelength
4 0.0
/
Space Increment (b)
400.0
( L ç / k )
Figure 6.27. Amplitude ratio ( a ) and phase lag (/>) for orthogonal collocation with symmetric "Hermite" basis functions.
Hyperbolic Partial Differential Equations
618
or the asymmetric bases of (6.7.46). We consider both possibilities. The collocation points and y are selected as the Gauss points and we employ a regular net. The evaluation of (6.7.62) for selected values of η yields two amplification factors; one is unity and the other is a computational or nonphysical value. The use of the physical root yields the amplitude ratio and phase lag plots of Figure 6.27. As expected, in a centered difference approximation there is n o numerical damping imposed on the solution. T h e phase lag is improved over other schemes we have considered, even when the fact that there are two dependent variables per node is taken into account. Note also that the 2k 2
1.2 u < c 1.0 « η b θ α, α
0.6
= 1.0 • 1 0 =0.5 =0.5 =0.09 =0.16
0
c ο
i
°·«
Õ
Η-
α.
å
<
0.2
0.0
1.0
10 0
100.0
Wavelength / Spatial Increment (a) 2.0, k =
n
/ k )
t.O h = 1 0 b = 0 5 θ =0.5 a, =0.09 A =016
c -
( L
1 5
0
ο 1.0!
3
Å <
οο (.0
Wavelength /
40.0
Spatial
Increment
100.0
(L
n
/k)
(b)
Figure 6.28. Amplification factor ( a ) , amplitude ratio (ft), and phase lag (c) for orthogonal collocation formulation using asymmetric "Hermite" basis functions.
First-Order Model Hyperbolic Partial Differential Equations
619
k « 1.0 I
t
»t.o «0.5
«0.5 fi α 4 = 0 . 05)
c« 0 *
0 . 46
ο 0.
-200 - 300 4.0
4 0.0
Wavelength / S p a t i a l
Increment
400.0
( L
n
/ k )
(c)
Figure 6.28.
(Continued)
wavelength component is propagated in contrast to the preceding formulations. This is consistent with the solution presented in Figure 6.22. The spatial frequency of the spurious oscillation is higher than observed for the finite element solution of Figure 6.20, which, in turn, is higher than observed for the finite difference solution. We now consider the behavior of the collocation method using asymmetric basis functions. The amplification factor of (6.7.62) is computed using the modified Hermite polynomials of (6.7.46) with a, = 0 . 0 9 and a = 0 . 1 6 . The solution is presented for a spectrum of η in Figure 6.28a. Because \ξ? | is less than unity for all n, the scheme is stable for the parameters employed. The amplitude ratio is modified, as expected, by the introduction of asymmetry. The small wavelengths are numerically damped. The phase lag is particularly interesting. For the first time in our discussion of finite element methods, we see a phase acceleration. We do not observe oscillations preceding the front, however, because these Fourier components are numerically damped. It is very interesting that the asymmetry has not only modified the phase error but also appears to have decreased it. This is apparent through an examination of Figures 6.21b and 6.28c. 0
η
Recapitulating the material of this section, we state the following. The solution of first-order hyperbolic problems is schizophrenic. One can achieve a sharp front with associated spurious oscillations or a smooth solution that is smeared due to numerical diffusion. The trade-off between these two deleterious effects is elucidated through an analysis of phase and amplitude error attributable to the numerical scheme. Although all the numerical schemes considered here suffer from this limitation, some methods exhibit behavior superior to others.
Hyperbolic Partial Differential Equations
620
6.8 FINITE ELEMENT SOLUTION OF TWO- A N D THREE-SPACE-DIMENSIONAL FIRST-ORDER HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS The extension of the preceding section to include several space dimensions is now the subject of discussion. The model equation we consider is u + b +b u
(6.5.1)
x
lUy
2
+ bu
r2
3
= 0.
y]
The formulation of the finite element approximating equations follows the same general procedures outlined earlier.
6.8.1
Galerkin Finite Element Formulation
T o obtain a Galerkin approximation we begin by defining the approximations
(6.8.1)
J
u(x, y , y , >< )^ u(x, y , y , y )= t
2
x
3
2
2
U^x^iy^
y, 2
y,),
where we have employed a separation-of-variables approach rather than incorporating the time dimension (x) into the basis function. Let us now impose the Galerkin requirement (6.8.2) where R is the residual defined by (6.8.3) Substitution of (6.8.3) and (6.8.1) into (6.8.2) yields
(6-8.4)
iJX-j}*,
9%
Equation (6.8.4) can be written in matrix form as
(6.8.5)
[A]{f
x
}+[C]{ } = {/}, M
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
621
where typical elements of the matrices are (6.8.6a)
Jy
(6.8.6b)
c
'=i\ ^ ^ ^M b b +b
(6.8.6c)
du,^^ dx dx
(6.8.6d)
u, = U,
dv
and the vector {/} contains boundary information. Normally, we would now approximate the time derivative using a finite difference scheme. Several possibilities were introduced in Section 4.11.2. The most common approach is to locate the spatial derivative operator in time using the parameter è introduced earlier, (6.8.7a)
[A]{u -u } r+l
r
+ h(\-e)[C]{u}
+ he[C){uY
r
= Λ(1-0){/Γ + «0{/Γ
+ ι
+ >
0<è<\
,
or (6.8.7b)
([A] + he[C)){u}
r
+ ]
=([A}-h(\-e)[C]){ur + «(9{/}
r +
l
,
+
h(l-e){fY O«0
where we admit the possibility of time-dependent boundary conditions. Any direct or appropriate iterative scheme can now be used to solve (6.8.7) once suitable Φ,(>Ί, y , y ) have been selected and the integrations performed. If b (/ = 1,2,3) is a known function of space, one can easily perform numerically the integrations defined by (6.8.6b). Often, however, the coefficient values are known either by element or by node. Coefficients defined by element are easily handled because the integrations are performed elementwise. Thus the coefficients are simply treated as constants for each element. In the case of coefficients defined nodally, the procedure is more complicated. One approach is to assume a series representation for each coefficient, 2
3
t
Μ.8)
Μ >>, y , Λ ) = Σ ifa(y\. b
2
Λ -^ ) ·
622
Hyperbolic Partial Differential Equations
Then a typical coefficient c, becomes y
(6.8.9)
c„ = 2 k
Note that in proceeding along these lines, the integrand is a higher-degree polynomial than encountered earlier. In the case of a nonlinear problem, these integrals d o not change, although the summation procedure must be repeated whenever b, changes. The choice of basis function depends upon the desired solution behavior, problem geometry, degree of homogeneity, and solution form. The experience gained from the preceding section on one-dimensional problems is applicable to problems in higher dimensions. More specifically, it is advantageous to employ upstream weighted basis functions when a smooth solution is sought in the neighborhood of a solution discontinuity. On the other hand, for more forgiving initial conditions, (i.e., differentiable functions such as a Gaussian distribution curve), a centered scheme free of dissipation effects may prove most satisfactory. A selection of available basis functions is cataloged in Chapters 2 and 3. Much of the material presented in Section 4.13 is applicable to the multidimensional first-order hyperbolic system. Thus we d o not repeat this information in this section.
6.8.2
Orthogonal Collocation Formulation
The point of departure in formulating the orthogonal collocation equations is the weighted residual constraint f R(x,y y ,yy)8(y „y „y )dv=0,
(6.8.10)
u
2
[
2
/ = 1,2,...,/V,
yi
Jy
where R is defined in (6.8.3) as R(x,
(6.8.3)
y ,y ,y ) }
2
}
= u + bu x
x
yt
+ bu 2
Vi
+ 6 κ 3
( ι
and u(x, y , y , _y ) is given by (6.8.1) for the case of C ° bases, that is, x
2
3
u{x,y ,y ,y )^u{x,y ,y ,
(6.8.11)
x
2
3
x
2
y) = 2 3
U (x)^ (y y ,y ) J
J
lt
1
)
7 = 1
and S{y , y , would be one using chapeau extending the u
2t
y ) is the Dirac delta function. The chapeau basis functions possible choice of for this first-order equation. An example functions for a first-order O D E is given in Section 2.2.2. In method to higher dimensions one must be careful to account 3i
Two- and Three-Dimensional Hyperbolic Partial Differential Equations
623
properly for boundary conditions. This may require the use of additional collocation points in the neighborhood of boundaries. It is also possible to employ Hermite or modified Hermite basis functions for this problem. In this instance the trial function is written in local coordinates in two spatial dimensions as (6.8.12)
Μ
3(7, ( χ , η , , η ) - ( χ , η , , η ) = Σ t/,Φίχ,, + τ ^ φ ' 3η, 2
Μ
2
7 = 1
ay +
d Uj
,
2
3V°''' ^A' +
where φ ^ , φ', ,, φ , and φ',,y are defined in Table 2.7a and illustrated in Figure 2.13. One now employs the chain rule and certain properties of the bases to obtain 0
(6.8.13)
0 1 ;
9^, W, Σ l/,Φο, + ^ Φ ' , , , + J ^ , , ΰ(*,η,,η ) = Σ 2
7 =1
9 *V, , ^ · · . 2
+
3 L/ , 3 L/ ^ Τ - ν + ^Φ,,, . 2
2
]
Φ
+
Φ
2
where the new bases are defined as (6.8.14a)
Φ0 -Φοο >
(6.8.14b)
ι _ ι ό\ν, . By, . 9 y, Φ , ν - Φ . ο ^ + Φ ο , ^ + Φ π . 9 ^
(6.8.14c)
3 Λ , ,ι Λ Φ,^-Φ-ο^ + Φ ο υ ^ + Φ π ^ η ^
7
7
2
(6.8.14d)
(6.8.14e)
(6.8.14f)
3
>Ί > 2 θ η 3η, 9
Φ>º.>º/
.ι *iw
Φ"7
=
Λ
ι
φ
9
2
,
%y 9>Ί 3 η 3η, 2
2
M M
">3ι, 3τ, ' 2
=
2
3
ι
þ φ | ι
1
M M
^3η 3η,· 2
If we assume the elements are rectangular, this expression may be simplified
624
Hyperbolic Partial Differential Equations
because 3 > ί / 3 Τ ) = 0 and d y / d r \ 2
2
x
= 0 . The trial function reduces to
dU,
(6.8.15)
«*(*.>W2)=
^ Φ ό , + 3>>, ^ Φ ΐ ν
Σ
d u, 2
W
J
.
3^2
3>ί3^
1 2 7
ΟVΙ| .V 2 ; 2
'
The trial function (6.8.15) is now introduced, together with (6.8.3), into the two dimensional form of (6.8.10) to yield, for each element,
(6.8.16)
Σ
3
d
dx
+
° v, 2
I
3^,3^2 \
d
3
a>,
,
- a ^
1
=0,
v
/ = 1,2,3,4,
where the collocation points are defined in the local coordinate system and the indices j= 1,2,3,4 refer to the nodes on the corners of the element. Equation (6.8.16) represents four O D E s , one written for each of the four collocation points in the element. There are, however, 16 unknowns, four defined for each of the four nodes. When the global matrix is assembled, the fact that each set of nodal unknowns is common to the four adjacent elements comes into play. Thus when all boundary conditions have been properly accounted for, the system of equations is closed. T o evaluate the coefficient matrix arising out of (6.8.16), it is necessary to transform the derivatives of the basis functions from global to local coordinates so that they can be evaluated at the collocation points ( η , , , τ? ). Thus we require a transformation matrix, which is obtained as follows: 2ι
Γ3(-)l (6.8.17a)
3>º
dfr
3TJ,
dη
3r/,
3(·) 3η
3^1
3^2
3η,
dη
2
]
2
Γ aC - ) 1 a* 3(·) 3^
2
625
Vector Hyperbolic Partial Differential Equations
or, by inverting the Jacobian matrix, 9() (6.8.17b)
9(·) dy 2
3^2
3^2
θη
9η
2
2
9^ X
3η
9
^2
9η, 3^2
9η,
2
_ Μ θη
3>Ί 9η,
2
ί
3(·) θη, 9(·) 9η 2
In the case of rectangular elements, one can determine the elements of the Jacobian matrix from the element side lengths, that is. (6.8.18a)
(6.8.18b)
dy k 9η, 1=
±
3^2 _
9η
2
2 k
2
2
The off-diagonal elements vanish as indicated above. One can now combine (6.8.17) with (6.8.16) to generate the required algebraic equations. The implementation of boundary and initial conditions in the first-order scalar hyperbolic P D E is not difficult. This holds even in the more complex isoparametric case. The procedure involves eliminating those nodal degrees of freedom that are specified as first-type boundary conditions. In the formulation presented above, one would simply specify appropriate values of V at boundary nodes and transfer this known information to the right-hand side of the equation. We see in the next section that in a vector P D E the procedure is somewhat more complicated. j
6.9
FINITE ELEMENT SOLUTION O F FIRST-ORDER VECTOR H Y P E R B O L I C PARTIAL D I F F E R E N T I A L E Q U A T I O N S
The first-order vector hyperbolic P D E is approximated in a manner similar to its scalar counterpart. The principal difference lies in the treatment of boundary conditions when isoparametric elements are employed. The model first-order vector hyperbolic P D E was presented in one space dimension as (6.3.1), (6.3.1)
Hyperbolic Partial Differential Equations
626
This equation describes a coupled set of equations with D unknowns, where D is the dimension of the vectors in (6.3.1). We limit our discussion to the special case D = 2 and the Galerkin finite element formulation. In limiting our scope in this way we are able to examine in depth the behavior of various numerical schemes arising out of the fundamental Galerkin formulation. The conceptual extension to D>2 is not difficult.
6.9.1
Galerkin Finite Element Formulation
We consider as our model P D E the expressions (6.9.1a)
•È7 *'"87~ +
du.
3u,
(6.9.1b)
0
dx
' "
dy
2
or, in a form consistent with (6.3.1), 3u, 3*
(6.9.2)
3u
+
2
17
6,
0
0
b
du
2
17 du,
"37
2
The Galerkin formulation begins with the definition of a trial function for each dependent variable. We employ separation of variables to obtain
(6.9.3a)
Σ
u {x,y)^u (x,y)= i
i
õ (χ)φ) ×]
/ = •
Í
(6.9.3b)
u (x,y)-u (x,y)= 2
U (x)+j(y),
2
2
2J
where U (x) and U (x) are time-dependent undetermined parameters. The basis functions Φ/y) are C ° continuous basis functions of any desired degree. O u r discussion focuses on linear " c h a p e a u " bases as defined by (6.7.10), Xj
2j
ί (6.7.10)
Φ.Ο) =
y-y,-\ y, 1 +
[y,-
y,-y,-\ ~
y,+\-y,
y
(y,*y
Vector Hyperbolic Partial Differential Equations
627
We now apply the Galerkin constraint to each of (6.9.1), (6.9.4a)
/ / ? , ( * , >>)
/ = 1,2,...,/V
(6.9.4b)
|/? (χ,>')φ,ν=0.
1 = 1,2,...,/V,
2
where (6.9.5a) (6.9.5b)
*i(x.y)=iT7
Λ 2
θΰ,
(,^ ^ ) =
+
θκ l>i 3
+ &2
2
Α.
The finite element approximating equations are now obtained through combination of (6.7.10) and (6.9.3)-(6.9.5). For a uniform finite element grid the specified integrations yield the following discretized equations for a typical interior node:
<«·«·»
1(^+^+^Μ^^Η·
We now wish to investigate a number of methods of solving this coupled set of O D E s . Such an analysis was conducted by Gray and Lynch (1977) and Lynch (1978) and we follow their work in the ensuing development. 6.9.2
Dissipation and Dispersion
In this section we introduce various time-discretization schemes and examine their dissipative and dispersive effects. We analyze each using a Fourier decomposition approach. Let us begin by obtaining the analytical expressions for the amplification factors of (6.9.1). We write the general solution to (6.9.1) using the Fourier series (6.9.7a)
«, =
J η
(6.9.7b)
u= 2
= —
X
2
F^'"-"**-^
F,„e '"f
, [ +
"'-'-l,
Hyperbolic Partial Differential Equations
628
where a„ and β„ are the temporal and spatial frequencies of the n t h component, respectively. The spatial frequency, or wave number, is defined as fi =2n/L (see Figure 6.1 for definitions of wave parameters). The coefficients F and F , are independent of space and time. We now invoke the theory of superposition, which permits us to consider only one of the η components when determining the amplification factor relationship of (6.9.1). Thus we write n
n
0n
u
(6.9.8a)
"in
(6.9.8b)
l
0 n
r
e
\n
r
2 n
e
We now establish the relationship between a and β„ as determined through (6.9.1). Substitution of (6.9.8) into (6.9.1) yields n
(6.9.9a) (6.9.9b)
'«
b ifi„F =0.
ι„ +
/ Γ η
2
OH
In matrix form we have 0
^0n
(6.9.10)
1> ιβ»
0
ia„
2
For a nontrivial solution the determinant of the coefficient matrix must equal zero. Thus we obtain the equation a +
(6.9.11a)
b b,J, =0
2
2
t
n
or (6.9.11b)
<*n =
±
βηί^É
·
The behavior of the n t h component may now be written (6.9.12a) (6.9.12b)
U
r
2 n
\n
e
1
In proceeding from time χ to χ + η , we observe the following relationship: (6.9.13)
uf„
+A
= F =
I l
0
j.
n
e ^ '
( i f 7
p
^
(
x
+ h ) + , p
-
y ]
l-/»./^*l.
T h e magnitude of el-'0«v^*i*i describes the change in amplitude of the n t h
Vector Hyperbolic Partial Differential Equations
629
component in one time increment; it is unity as expected for a hyperbolic equation. The n t h component will propagate a distance ^b b h. T h e relationship ' -'^-ν^ϊ*!*! = e' n is denoted as £"„, an amplification factor. x
a
2
h
Let us now turn our attention to the determination of the numerical amplification factors. These depend upon the time approximation that is adopted. We begin with the simplest conceptual model, that is, the approximation of the time derivatives using finite difference theory.
Finite Difference in Time The approximation of the time derivatives in (6.9.6) using finite differences yields (6.9.14)
+ {ua\-UU,)]
+ A{U{r-U(,)
i[{U^\-Ul,^)
+ ø (õ ι χ \ - u l{{UC.\-Ui,.,) + A{U{r-lJ{,)
(õ
{l • _ ' , ) + l l ^ J .
(6.9.15)
+(ι/,-,:
{ÄÆ
+
, -1£
_,)=ο
{U{X\-U{ )}
+
ι - ê-D+
ι
l+i
(í,•, - Ê - . ) = 0 .
2
¢
where è is the factor locating the spatial derivative in time, p , = b^h/k, and p — b h/k. When 6* = 0 , 0.5, and 1.0, the time approximation is forward, centered (Crank-Nicolson), and backward, respectively. The objective now is to obtain an amplification factor relationship for the numerical scheme. We introduce the η th component of the Fourier series, but now defined using a numerical frequency a'„, 2
2
(6.9.16a)
f7, = F , ? "
(6.9.16b)
i/ = F ,t?" "* *"'-l.
|,e
0(
e
2
^"-
JI+
(
vl
+,
l(
Substitution of (6.9.16) into (6.9.14) and (6.9.15) yields (Lynch, 1978) (6.9.17)
2Ç(èξ 2ΰ(èξ
η
+
η
+
\-è)ίÂ
]-è)ίÂ
where /l = £[4 + 2cosft,A-], β = sin ft,*,
>ο„'
.ν
0 0
630
Hyperbolic Partial Differential Equations
For a nontrivial solution to (6.9.17), the determinant of the coefficient matrix must equal zero. Thus we have a quadratic equation for the amplification factor £„, (6.9.18)
{A
2
+ 4ΰÇè  )ξ 2
2
+
+ [8G/70(1 -
2
È)Â -2Á ]ζ 2
2
η
A +4B GH(\-e) =0 2
2
2
The solution to this equation is
(6.9. ,9)
e = ' -
4
C
T
" ^
)
±
,
\+4ΕÈ
<
4
£
2
)
l
/
'
where _ B GH
,_ _
2
F
2 + cos/3„*
un%k
and the superscript F D emphasizes that this factor arises from a finite difference approximation. As in the analytical case, there are two amplification factors, one associated with the progressive wave and one with the retrogressive. Numerical stability requires that | £ J < 1. Note that for the C r a n k - N i c o l son scheme (0 =0.5), the magnitude of (6.9.19) is exactly one; this we refer to as neutral stability. The stability constraint is thus t9>0.5. T o determine the accuracy of this scheme we now compute the amplification error and phase error using (6.7.48)-(6.7.50), Rn=\t,\ -
(6-7.48)
N
and (6-7.49)
& = ð
Ν Φ „-2ð. η
η
where
(6.7.50)
«,„
= t a
„-.(£|),
N„ is the number of time steps required to propagate the nth wave through one wavelength, R„ is the amplification ratio, and θ„ is the phase lag. The parameter N„ is calculated according to the relationship
».=-^=
Vector Hyperbolic Partial Differential Equations
444 _
'
72
Ñ*·
0
o -1
° α
40
É/Ñ
º.0
//
//
-216
/ /
-288
1
400
W a v e Éâ ç g t h / S p a c e
s
1 /
-560 t
I I I
1
4
Increment
1—ι—Γ
1
0.5
I
-72
•«· -<4 4
Å <
1—ι—ôç
0-0.5
c ?
631
I
I
40
400
Wa ve t e n g t h / S p a c e
(L„/k
n
Ô 1
Increment
)
(b)
(a)
Figure 6.29. Amplitude ratio (a) and phase lag (b) for finite-element-in-space/finitedifference-in-time algorithm for vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications The amplitude ratio and phase lag are presented in Figure 6.29. The parameter p* = ^ p , p . When ί>, = & , then ρ* = ρ, = p . The phase lag exhibits behavior similar to that observed in the scalar first-order P D E case. Figure 6.24. Shorter wavelengths (higher spatial frequencies) are dramatically out of phase. This phenomenon appears to be exacerbated by increasing the magnitude of p*. Because there is no numerical damping inherent in this scheme, those components subject to phase error are not suppressed. The cumulative effect of these phase errors is node-to-node oscillations. 2
2
2
Finite Element in Time Although we have used separation of variables thus far in defining the trial functions, an alternative approach can be used. The trial function can be written Í
u(x,y)<*u(x,y)
(6.9.20)
= 2
V^(x y), t
; = i
where
i[(i/r ti-i/i- )+4(t/ r -i/r )+(i/. ;: -i/i )] ,
+
(6.9.21b)
l
l
] p , ( ^ : ' ,
i[{U{^-U{,_^ + \h{u(,X
1
-
,
,
1
l
+1
õ '+\) + ί ρ , ( 1 / / , - U{,_ , ) = 0 2
+ 4{U{r-U{) 1-
< +
+
(U{X\-Ui )\ +i
uf-1)+ih(v(,+,-£/,',-,)=0.
632
Hyperbolic Partial Differential Equations
Substitution of (6.9.16) into (6.9.21) yields (6.9.17) with β = \. The resulting expression for is C• F E~
(6.9.22)
1
- (°· Κ°· ) ^ )' 4 £
6 7
3 3
±
4 £
/ 2
l+4£(0.66)
with 2 + cos/3 *
sin β,A:.
n
The amplification ratio and phase lag relationships obtained using (6.9.22) are presented in Figure 6.30. It is interesting to compare this figure with the finite-difference-in-time counterpart, Figure 6.29. As one would expect from our consideration of the scalar equations of Section 6.7, the phase error is relatively unaffected by the change in è from 0.5 to 0.67. The amplitude ratio, however, changes significantly. The shorter-wavelength components are in general numerically damped. The troublesome wavelength of 2k, however, is not damped and will continue to cause oscillatory behavior. Thus there does not appear to be any significant advantage to employing finite-element-in-time rather than finite-difference-in-time. Both the finite-element-in-time and finite-difference-in-time schemes require the simultaneous solution of tV, and U . Considering the limited accuracy of these schemes due to the behavior of the short-wavelength components, it is worth considering alternative methods for treating the time domain. One scheme which uncouples the solution of tV, and U is based on the leapfrog algorithm. 2
2
Å 4
40
Wavelength / Spatial
400 Increment
40 4 Wove l e n g t h / S p a t i a l
4 00 Increment
( L „ / k ) ( b)
Figure 630. Amplitude ratio (a) and phase lag (b) for finite-element-in-space/finiteelement-in-time formulation for vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Vector Hyperbolic Partial Differential Equations
633
Leapfrog in Time This algorithm is based on the idea of approximating the time derivative using a central difference scheme written about time level r. Thus the time derivative approximation will involve time levels r + 1 and r — 1, but the spatial approximation will be located at the r t h time level. Using this approach, (6.9.6) becomes (6.9.23a)
| [ ( ^ l - ^ , : ! ) + 4 ( c / r - i / r ) + (c/^ -«7,';; )] l
,
l
,
l
l
1
1
+ y(t//, ,-^,-,)=0 +
(6.9.23b)
i[{U , _\ -U{~\) +
2
+ 4(t/T
1
-U r') 2
+
{U{X\ -
V{-\)]
+ ^(t/i ,-i/i-,)=o. +
Substitution of (6.9.16) into (6.9.23) yields the following relationship (Lynch, 1978): 4HiB (6.9.24) 4GiB where A , B , G, and Ç were defined in (6.9.17). for a nontrivial solution of (6.9.24) the determinant of the coefficient matrix must vanish. This gives rise to a fourth-order equation for (6.9.25)
+ (e) [16£-2]+l=0.
(e)
4
2
The solution of (6.9.25) for ( ξ £ ) is 2
(6.9.26)
(£ ) = 1 - 8£ L
n
2
±4i]JE-4E
2
where Ε is defined in (6.9.19). Two of the roots in (6.9.25) describe the physical wave behavior and two are computational modes. The physical wave roots describe the progressive and regressive waves. The computational modes have no analytical counterpart and, although they are not considered in terms of amplification ratio and phase lag, they are important in examining stability. The computational modes may be introduced numerically (i.e., through roundoff error or startup) and thus could lead to instability. Examination of (6.9.26) reveals that when Ε >4E , ( | ^ ) is complex and its magnitude is given by 2
Ê«ί)º=ι.ο.
2
634
Hyperbolic Partial Differential Equations
This scheme therefore appears neutrally stable. When £ > 0 . 2 5 , ( ξ ^ ) is real and | ( | ^ ) | > 1.0, indicating an instability. The stability constraint can be calculated in terms of b and b as (Gray and Lynch, 1977) 2
2
t
2
bjhbjjh k
k
3
Because of this stability constraint, it is necessary to consider smaller values of p* in the amplitude ratio and phase lag calculations. The amplitude ratio and phase lag plots determined from (6.9.25) appear in Figure 6.31. There is n o numerical damping introduced by this scheme. Higher spatial frequencies, however, are out of phase. The phase error plot exhibits both a phase lag and a phase lead, depending on the value of p*. Let us examine the relative merits of the finite element-leapfrog scheme. The principal advantage is the uncoupling of U and U . It is apparent that t7, can be calculated from (6.9.23a) using known values of U{. Similarly, U{ can be computed using (6.9.23b) with U{ known. Thus the two dependent variables can be computed sequentially rather than simultaneously with a significant reduction in computational effort. These savings are particularly impressive when /3, and b are nonlinear coefficients. The coefficient matrix is symmetric and remains time invariant. Moreover, there is no necessity to iterate since p, and p are known at the preceding time level through our knowledge of U[ and U{, respectively. The major disadvantage is the stability constraint. Moreover, the 2k wave, although out of phase, is not damped. This leads once again to spurious oscillations in the solution. t
2
r + l
+1
2
2
< 4 4 _
7 2 c
®
ΐ
- 7 2
J-216 Q.
-2È8
1
10
Wavelength/Spatial ( L
n
/ k )
(a)
too Increment
-
<
ι I I
1
1 1 1
^ " • 0 . 5
o
_l . - 1 4 4
Å <
ι
- 3 6 0
jr - J - j 1 -
1
r *
1
0.125
1 1 1
1
1
10
Wave l e n g t h / Spatial ( L
n
1 1 1
100
Increment
/ k ) ( b)
Figure 6 3 1 . Amplitude ratio (a) and phase lag (b) for finite-element-in-space/ leapfrog scheme in time (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Vector Hyperbolic Partial Differential Equations
635
Second-Order A dams- Bashforth Scheme Another method that uncouples the solution for U and U is the Adams-Bashforth scheme. This approach differs from those considered earlier inasmuch as a lumped time derivative is employed. We begin by approximating the time derivative in (6.9.1) using finite differences, l
2
,..«7.,
*
, . . « * )
, , . . - , ,
r
. -
i
;
+
( f | & - i ^ ) = 0
M
, , . ( | £ - · > £ ΐ ) = . .
+
When the trial functions of (6.9.3) are substituted into (6.9.27) and Galerkin's method is applied, one obtains (6.9.28a)
U ( ^ - l - ^ ' - i )
+
4
(
i
/
i '
+
,
+ (^: ,-i/r, ,
- ^ )
+
,)]
+Y[mw -u{,_ )-{(u r \-u z\)]=o r
]
(6.9.28b)
l
2 +
2l
i[{U r\-U{,^)+4{U{r-U{,)
+ {U{; \-U{,
2
+
+
]
)]
+ y[!(i/i .-i/.i-.)-i(^i; .-^- ,)]=o. ,
,
+
Substitution of the Fourier representation of (6.9.16) into (6.9.28) and the subsequent expansion of the determinant of the coefficient matrix yields a fourth-degree polynomial in ξ* (Gray and Lynch, 1977), Â
(6.9.29)
(C ) -2(C ) B 4
B
3
+ (1
+9£)(C )
B 2
-6£^
Â
+ Ε = 0.
T w o of the four roots of this equation are computational and are very small in magnitude. They d o not contribute significantly to the computation. The two physical roots indicate that the scheme is weakly unstable. Because the instability is weak, the method can be used for short-term simulation and is therefore of more than theoretical interest. The amplitude ratio and phase error associated with this scheme are presented as Figure 6.32. It is evident from Figure 6.32a that, as the value of p* increases, the amplitude ratio increases. In other words, as p* increases, the magnitude of the numerical wave increases relative to the amplitude of the analytical wave. N o t e that there is no numerical damping of the 2k wave. The phase lag is a sensitive function of p*. For small values of this parameter, a modest phase lag is observed (see Figure 6.32i>). For larger values of p* there is a substantial phase lead. Thus for large p* the scheme does not appear acceptable considering either the amplitude or phase behavior.
Hyperbolic Partial Differential Equations
636
Å
1 tO 400 Wavelength / S p a t i a l I n c r e m e n t (L /k ) (a)
4
40
4 00
W a v e l e n g t h / S p a t i a l Increment
n
( L
n
/ k
)
(b)
Figure 632. Amplitude ratio ( a ) and phase lag (b) for the finite-element-inspace/Adams-Bashforth-in-time scheme for vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Partially Corrected Second-Order A dams-Bashforth Scheme A modification of the Adams-Bashforth scheme was proposed by Gazdag (1976). T h e idea here is to improve the behavior of the Adams-Bashforth method through the introduction of a "corrector" step. Thus this scheme becomes a two-step algorithm employing a "predictor" equation followed by a "corrector" equation. Let us introduce the intermediate or temporary values u* a n d ύ*. If we finite-difference the time derivative in (6.9.1), we obtain the predictor expression (CM*,,
(..wot.)
ί
Γ
* .r
' - ^ ψ ( ^ - ψ ) = 0
i s +
M( ^-^)=o, 3
and the corrector expression,
The finite element equations are obtained by substituting the trial functions of (6.9.3) into (6.9.30) and (6.9.31) a n d subsequently subjecting the resulting residual to the Galerkin type of minimization. T h e resulting equations are, for
Vector Hyperbolic Partial Differential Equations
637
the predictor step,
i[(uruv-urUi)+<^: -^)+(^-V-^:-x)] +l
(6.9.32a)
+ (6.9.32b)
^[3(t// , - U { , - , ) - { u i r l+
+
\
=o
-U{~\)]
ι[(i/r v -1/ %,)+4(t/ r· - i/ r)+(l/ *iv +
2
2
2
2
- 1 / - , ) ] 2
+ j [3( c/,%, -1/£ -,) - (i/,r i - ί / ί : i)] = o, +
and for the corrector step, (6.9.33a)
i[(^:^-t/ % ) + 4(i/r -t/,0 + (^- .-i/.'-.)] +
(6.9.33b)
,
,
l
1
χ[(^ V r
+
ϊ[{õ{^-õ{
ι+
- Ui,-i ) 1
,) +
+(
,
-
l/V-.)] = ο 2
Ë(õ{; -õÀ)Çõ{^-õ{,^)] ι
+ 7 [(^.r v - urr:)+.
-
+
,)] =o.
The equation for i is obtained through substitution of (6.9.16) into (6.9.32)-(6.9.33). T h e determinant of the resulting coefficient matrix must vanish for a nontrival solution. A sixth-degree polynomial in £ * results (Gray and Lynch, 1977): A B C
B C
(e ) -2(C ) +(l-16£)(C ) +24£(e ) BC
6
-17£(e
BC
B C
5
) +6£(C 2
BC
B C
4
BC
3
)-£=0.
Of the six roots t o this equation, four are computational and t w o physical. Both physical and two computational roots represent stable modes. There are two computational modes which are unstable for small wavelength space increment ratios. In addition, the 2k wave is undamped. The amplitude ratio and phase error plots are given in Figure 6 . 3 3 . They indicate a smaller phase error than is observed in the case of the Adams-Bashforth scheme and a general numerical damping of some of the troublesome smaller-wavelength components.
Lax-Wendroff Scheme In Sections 6 . 2 and 6 . 3 we encountered the finite difference form of the Lax-Wendroff approximation. N o w we wish to consider the finite element (Galerkin) counterpart. We begin by differentiating (6.9.1)
Hyperbolic Partial Differential Equations
638
ο
Ε < 100 Wavelength / S p a t i a l
Increment
Wove l e n g t h / S p a t i a l
(L /k )
Increment
( L„ / k )
n
(a)
(b)
Figure 6.33. Amplitude ratio ( a ) and phase lag {b) for the finite-element-inspace/partially corrected Adams-Bashforth scheme in time for vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
with respect to time, θ κ, , 3w ^ + ,,-^1=0 2
(6.9.34a)
v
2
^ T T2 +
6.9.34b)
'
2T-T- -
fc
dx
2
dxdy
=0
We now substitute (6.9.1b) into (6.9.34a) to yield - ± -
(6.9.35a)
b
]
b
2
- ± = o .
Equation (6.9.34b) can now be modified using (6.9.1a),
( 6 . . J 5 b )
_ J
Equations (6.9.35) are the classical wave equations written for «, and u . 2
Let us now expand u, a n d « in terms of a Taylor series written about time level r. We obtain 2
,6.9.36a)
„;..
= „
;
+
*M
+
*!|4
+
...
Vector Hyperbolic Partial Differential Equations
639
and
„ . = „; ^ ί!0 ....
(6.9.36b)
Γ
+Α
+
+
We now substitute (6.9.1) and (6.9.35) into the truncated form of (6.9.36) to yield (6.9.37a)
^.^-.(..^'^(..^a)'
and (6.9.37b) Equations (6.9.37) are the point of departure for our finite e l e m e n t - L a x Wendroff formulation. In carrying out the indicated transformations we have introduced a second-order term. One would anticipate that this would lead to increased dissipation with concurrent reduction in oscillatory behavior. Application of Galerkin's procedure in conjunction with the chapeau basis functions of (6.9.3) and (6.7.10) yields the discretized equations
(6.9.38a)
iliU^-U^^
+^ r - U ^
+
iU^-U;,^)]
+ y (U{, , - U{,_,) - ø-(U{ , +
(6.9.38b)
i[{U{^~U{,.^A{U{r-U{) l l l
+
U{,_,)=0
{U{X\-V{, )]
+
+ %(U{ -U ' - )-£&(U{, l+l
-2U{, +
l+
+x
l
- 2U{, + (//,_,)=0.
T o obtain the relationship for £ j - , one introduces (6.9.16) into (6.9.38) and expresses the resulting equations in matrix form. A nontrivial solution is possible only if the determinant of the coefficient matrix vanishes. Imposition of this constraint generates a second-degree polynomial in £ j " with roots (Gray and Lynch, 1977) w
w
e =l-4G//(^)±2,7f, w
where C = 1—οο$β /æ. This scheme can be shown to be stable for 2JGH <JT/3, which is the same constraint observed in the leapfrog case. η
Hyperbolic Partial Differential Equations
640
The amplitude ratio and phase lag diagrams for this scheme are presented in Figure 6.34. As expected, the method is highly dissipative, severely damping shorter wavelengths. Notice that the 2k wave is numerically damped. The wave phase is accurate for small p* and exhibits a phase lag. F o r larger values of p*, a phase lead is observed. The scheme provides solutions with relatively little dispersion but significant dissipation, a trade-off encountered in most numerical schemes.
Three-Level Semi-implicit Scheme This scheme was developed by Kwizak and Robert in 1971 for atmospheric modeling. We begin by time-differencing (6.9.1) as follows: (6.9.39a)
„ .r
(6.9.39b)
. - „
<
,(5i£l
url+tji
.
Γ
^ ( 9 £ !
+
^)=„
+
^
+
)
=
.
0
Equations (6.9.39) can be rewritten ÈΜ*
(6.9.40a)
u '-2u -
(6.9.40b)
u^-2u f
i
1
1—r-r-|
Ñ
4.0
0.6
0.0
d
kp ^-=0. 2
j -
0.4 0.2
l
-
-0.125
:
kp - -y=0
r— ι — r - r
4.2
0.8
+
r ,
4.4
ο DC
+
l
l
-
/
/
•
R~-/°.o.5 ι
ι ι I
4 to Wavelength / S p a c e (L /k) n
(a)
ι
1
• •
too
Increment
4
40
Wavelength
/Space
4 0 0 Increment
(L„/k) (b)
Figure 6 J 4 . Amplitude ratio (a) and phase lag (b) for the finite-element-inspace/Lax-Wendroff scheme for the solution of vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Vector Hyperbolic Partial Differential Equations
641
where u* - Uj ' + rearrange the result:
We now differentiate (6.9.40b) with respect to y and
(6.9.41) '
= -kp2—f T dy a
+
L
y
+2-^— • dy
y
2
This expression is now combined with (6.9.40a) to yield '
iif - *j>, ( k p j ±
(6.9.42)
2
^ τ ) -
2
2
" Γ ' =0.
Equation (6.9.42) can be expanded and rearranged to give (6.9.43a)
«[
+ 1
- k ^ f a - ^ -
= « Γ + * 1
2
p , p
2
- ^ -2*p,
,
where all the known information appears on the right-hand side. Rearranging (6.9.39b), we have a
(6.9.43b)
-
^
-
.
-
^
^
+
Ml).
which again contains known information on the right-hand side. Equations (6.9.43) can be solved sequentially for u\ and u '. Galerkin's method is now applied to (6.9.43) using linear chapeau basis functions. The resulting discretized equations are +
r +
1
2
(6.9.44a)
i [ ( U { + \ - U[~\) + 4(U{+ - Ι / , ' Γ ) + (U{,l\-
U{,~
}
1
+
\)]
-p.ft[(£/,^l-2£/r + ^t!)+(i/r.;;-2i/ r -^:l)] ,
,
l
+p,(i/ r ,-f7 r_ )=o ,
(6.9.44b)
i
+
2
1
2
i[{U{,t\ - U { - \ ) + 4 ( U ' , 2
+ 1
-U{,~ )
+ (t// -U{~\)]
1
+
+ f [(«/,',: 1 - i c 1 ) + ( 1 -
U{~ J ) ] = 0 .
The substitution of (6.9.16) into (6.9.44) yields a set of equations in F and £,„. The determinant of the resulting coefficient matrix must vanish for a nontrivial solution. This constraint generates a fourth-degree polynomial in ff" (Gray and Lynch, 1977), 0n
(1 +
4F)(|f
3
)
4
+
( 8 £ - 2)( ξ„ ) + 1 - 4 F + 8 £ = 0, 513
2
642
Hyperbolic Partial Differential Equations
where
F =
2GHC _ P | P
2
2 + cos ft, k
ft,*].
[1-cos
This scheme is unconditionally stable and the 2k wave is damped. The modulus and phase error of this method are presented as Figure 6.35. The amplitude ratio plot indicates that the system is numerically damped for the smaller wavelengths, including the 2k wave. The phase error plot indicates a phase lag for the two values of p* considered. The phase error evidently increases with the magnitude of p*. The scheme is characterized by significant dissipation and modest phase error. An important advantage of this scheme is encountered in the solution of the nonlinear counterpart of (6.9.1). The nonlinearities can be easily centered in time, thus precluding the need for iteration. Moreover, the matrices are symmetric and time independent, important considerations in the generation of an efficient code.
Two-Level Semi-implicit Scheme The last algorithm we consider for the solution of first-order vector hyperbolic equations is a variant of the three-level scheme described above. The method was described and analyzed by Gray and Lynch (1977). We proceed by finite differencing the time derivatives in (6.9.1)
Å < 1 to Wavelength / S p a c e
too Increment
t
to
Wavelength /Space
too Increment
( b)
Figure 6 3 5 . Amplitude ratio (a) and phase lag (b) for the finite-element-inspace/three-level semi-implicit scheme for the solution of vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Vector Hyperbolic Partial Differential Equations
643
to yield k p , 3t/',
(6.9.45a)
kp
(6.9.45b)
3«J
2
where u[ = u[* + u \
u' = u \
and
x
+ 1
2
+ u . r
2
Let us differentiate (6.9.45b) with respect to y to yield du'
(6.9.46)
du
2
dy
2
kp
dy
d u\ 2
2
dy
2
2
-0.
This expression can be combined with (6.9.45a) to give (6.9.47)
«[
+
,
-«ί+^ί
2
du'
kp id u\ ' 2
2
3y
+
2
2
d u[ 2
|
\
= 0.
3^2
Equations (6.9.47) and (6.9.45b) can be rewritten such that known information appears on the right-hand side,
3wf
(6.9.48b)
dy
dy
It is apparent that (6.9.48) can be solved sequentially for u, and w . The discretized equations are obtained by employing Galerkin's method in conjunction with the linear chapeau bases. The resulting equations are 2
(6.9.49a)
i l i ^ i - ^ - . J + ^ ' - i V r J P\P2
+ it/^'.-i/^,)]
[(iC 1 - iu;; + tci)+(u{, , - w;, + £//;_,)] 1
+
+
(6.9.49b)
y ( ^
i[{U{^-U{,_,) +
τ
[(^:
+
, - ^ , - , ) = o
+ A{U{r-U{,) 1 -
ί / , ' - ' , ) + (
+ +
,
{U{; \~U{ ,)} +
-
J7i_ , ) ] =
l+
ο.
644
Hyperbolic Partial Differential Equations
The behavior of (6.9.49) is established once again using Fourier analyses. The Fourier components (6.9.16) are substituted into (6.9.49) and the resulting coefficient matrix made to vanish. This generates the quadratic equation in £f (Gray and Lynch, 1977), 2
(1 +
F)(tf )
2 2
+2(£-l)(£
S I 2
) + l- £ + 2£=0.
This scheme is unconditionally stable. The amplitude ratio and phase error plots are presented in Figure 6.36. The behavior of this scheme is similar to that of the three-level method. The small wavelengths, including the 2k wave, are numerically damped. In this algorithm, however, the nonlinear terms would not be centered in time, and consequently iteration would be required. This scheme is therefore computationally less efficient than the analogous three-level method. In summary, we have examined the dissipative and dispersive behavior of a number of methods for discretizing the time domain while using finite elements in space. The Adams-Bashforth and partially corrected Adams-Bashforth schemes have unstable roots and are therefore of limited application. The semi-implicit and Las-Wendroff algorithms have second derivatives in space which serve to d a m p the troublesome 2k waves. The Lax-Wendroff and finite-element-in-time schemes are both heavily damped; the finite-element-intime scheme, however, does not d a m p the 2k wave.
4.4
(44
4. 2 4.0 0
8
0
6
0.4 0.2
4
40
Wavelength /Space (L„/k )
400 Increment
_1 I I I I 4 10 Wavelength / S p a c e
(Ln/k)
•
1_L 400 Increment I
(a)
(b)
Figure 636. Amplitude ratio (a) and phase lag {b) for the finite-element-inspace/three-level semi-implicit scheme for the solution of vector hyperbolic partial differential equations (after Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Finite Element Solution of Two- and Three-Space-Dimensional First-Order
645
6.10 FINITE ELEMENT SOLUTION O F TWO- A N D THREE-SPACE-DIMENSIONAL FIRST-ORDER VECTOR HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS The solution of first-order vector hyperbolic PDEs involves, for the most part, the extension of concepts presented in earlier sections of the chapter. The time-stepping algorithms discussed in the preceding section represent a sample of the approaches that might be extended to two or three space dimensions. The message we should receive at this point is that the solution of first-order hyperbolic equations using classical finite difference a n d finite element methods requires some type of numerical damping. This damping may be explicit and appear as energy dissipation terms in the governing P D E . Damping may also be introduced implicitly through truncation error associated with the numerical scheme. U p to this point, we have considered only the implicit case and have elected to examine the simplest model problem. In this section we generalize slightly and consider the model equations
ø. *ρ
(6.10.1a)
ox
+ óι
+
Ι>ι
dy,
oy
=
2
9Μ θ J ^ + ^Jii
(6.10.1c)
*ì ο
+
M
j
=
.
0
Equations of this form arise in the consideration of linearized mass and momentum conservation. In the case of the shallow-water wave equations, u, is the elevation of the free surface, u and u are horizontal velocity components, £>, is the bathymetry, b is gravity, and £> is a friction coefficient. T h e shallow-water equations are generally of a much more complex nonlinear form. We have simplified them here for clarity of presentation. 2
3
2
6.10.1
3
Galerkin Finite Element Formulation
The two- and three-dimensional counterparts of the one-dimensional vector hyperbolic P D E considered in the preceding section are formulated in a straightforward way. The only new problem of consequence involves the specification of certain boundary conditions. We begin by assuming a separable solution for each dependent variable, Í
(6.10.2a)
«, = «,= Σ 7 = 1
õ {χ)φ ,γ ) õ
χ
2
646
Hyperbolic Partial Differential Equations Í
(6.10.2b)
u ^u 2
= Σ
2
J
U (xfo (y„y ) lj
J
2
=I Í
(6.10.2c)
Σ
Μ ^ý = 3
3
U (x)
J
]
2
Galerkin's approach now requires that the residuals R, generated as a result of the combination of (6.10.1) and (6.10.2) satisfy the relationship ( RAx,y , 2)*,{yuy2)da=0,
f = 1,2
Af-
(6.10.3b)
[R (x,y ,y ^(y ,y )da=o,
/ = 1,2
Í
(6.10.3c)
(R {x,yi,
/ = 1.2
/V,
(6.10.3a)
x y
A
J
2
i
2
i
2
y )«?,(>-,,y )da=0,
3
2
2
where « /
(6.10.4a)
\
(6.10.4b)
3«,
3uj
3þ
3M,
2 ι
_ ,
(6.10.4c)
,
du,
,
, 3à,
du.
Combination of (6.10.2)-(6.10.4) yields the following set of O D E s :
Σ
f .,<Φ,. Φ,> + ^ 2 ; < Φ , „ , Φ,) + b U {
^
x
v
yiJ
ι = 1,2,..,,ΛΤ
Σ
7=1
^ *V*- Φ,> + WxMya* Λ/
y
φ
<>
+
^ 2 , < Φ , , Φ,> = 0 * = 1.2
Σ
7=1
^
ί / / Φ . Φ,> + W y < * K , . * . > + W / Φ , . Φ,> 3
7
2 j
0 ι = 1.2
where ( · , . ) = / ( · ) ( . ) ί / ο . /<
ΛΤ
7V,
Finite Element Solution of Two- and Three-Space-Dimensional First-Order
647
The problem can now be expressed in the form of a matrix equation, [A}[^}+[B]{u}
(6.10.5)
=
{0),
where the elements of [A] and [B] are 3 X 3 matrices, 0
*.<Φ,„.Φ,>
*ι<Φ,„.Φ,>
*>2<Φ,„.Φ,>
*>3<Φ,,Φ,>
0
*2<Φν ,.Φ,>
<>3<Φ,.Φ,>
0
2
<Φ,.Φ,>
ο
ο
ο 0
<Φ,,Φ,> 0
ο (φ,,φ,)
and the elements of {du/dx}
and {«} are 3 x 1 matrices,
du Tx'
dx dU^ dx dU^ dx
The set of O D E s defined by (6.10.5) can now be solved using techniques such as those introduced in our discussion of one-dimensional problems. As an example, we present the leapfrog formulation of Lynch (1978) [see G r a y and Lynch (1979) for a discussion of the semi-implicit formulation]. The leapfrog scheme is obtained through a centered difference approximation of {du/dx}, (6.10.6)
ΰ[Ë)[ '+*- '-*) ν
α
+ [Â]{ιÕ = [0).
It was shown by Lynch (1978) that this scheme has an instability related to the evaluation of the friction term, that is, the term involving i> . T o circumvent this constraint this troublesome term is evaluated at the ( r - 1) time level. Thus we have 3
(6.10.7)
^ì]κ -<θ+[*]>Γ+[*] {«Γ + ,
2
_ ,
= {ο},
Hyperbolic Partial Differential Equations
648
where the elements of [A] and {«} are as before and the elements of [B] IB] are
1
and
2
4,=
0
*.<φ,·„.φ/>
νψ,,,-φ,)
*2<Φν„.Φ,>
0
0
*2<Φ, ,.Φ;>
0
0
2
0
0
ο
0
& <Φ,.Φ,>
ο
0
0
* <Φ>.Φί>
3
3
Collecting all the known information to the right-hand side, one can rewrite (6.10.7) as
[A]{uY
(6.10.8)
=([A]-2h[B] ){uy- -2h[B] { y.
+
l
2
l
l
U
Because of the structure of [A] one could solve for each dependent variable separately provided that appropriate boundary conditions were imposed. We now consider the question of boundary condition implementation. 6.10.2
Boundary Conditions
The solution of (6.10.1) and consequently (6.10.8) requires the specification of boundary conditions along the perimeter of the domain of interest. Keeping in mind the physical significance of (6.10.1), that is, its evolution from the equations of mass and momentum conservation, one normally specifies either U|, or u and t# along the boundary. T h e specification of u, is straightforward. O n e simply eliminates the equation identified with the node where u, is specified. For example, if the value u (x, y , y ) is given as u*(x, y , y ), then U is also known through the trial function relationship. We denote this as U*. The row of coefficients associated with U* in (6.10.8) is set to zero except for the diagonal element, which is set to unity. The remaining coefficients in column / are multiplied by U* and transferred to the right-hand side of their respective equations. The right-hand side of the equation associated with U is set to (/*. A similar procedure is followed when either u or M is specified. If we identify u and u with velocity, then these variables will be specified explicitly only when a rectangular net is employed. Because one of the primary advantages of the finite element method is the ability to represent irregular geometry, it is necessary to investigate a scheme for accommodating nonrectangular elements, that is, elements where the direction normal to the element side is not coincident with the coordinate axes. 2
3
t
u
2i
u
2l
u
u
2
2
3
3
The first step in developing a scheme applicable to irregular boundaries is to rearrange the equations of (6.10.8) so that the velocity equations are treated
Finite Element Solution of Two- and Three-Space-Dimensional First-Order
649
simultaneously. Thus we rewrite (6.10.8) as (6.10.9a)
Ml2.3{"}2.V ={7/2.3
(6.10.9b) where
{f}2. =([Ah. -2h[Bh){u} ;/-2h[B} {u}\ 3
3
2
l
and <φ,-φ,>
o
0
<Φ,,Φ,>
( 2. ),.y = a
3
(ft2.3),., =
[V*>-.*,>.
*Ι«!,·,7.Φ.>]
yi
&3<Φ,.Φ,>
0
0
*3<Φ,,Φ,>
*>2<Φ, ,.Φ,> 2
(«.), = <Ί. («2.3)/
=
ι/ , 2
Whereas (6.10.9) is written in terms of velocity components in the _y, and y coordinate directions, the boundary condition is normally imposed in terms of a normal velocity. Thus it is advantageous to rewrite (6.10.9) in terms of normal-tangential coordinates. This allows us to readily impose normal velocity conditions. Let us assume that the normal direction to the boundary has been established for a boundary node i. Moreover, let the angle between the >>, axis and the normal direction be denoted as χ,. Then the tangential velocity « is related to M and w through the relationship 2
T
2
(6.10.10a)
3
2
3
650
Hyperbolic Partial Differential Equations
and the normal velocity u is given by a
(6.10.I0b)
t
y. = t 7 c o s x + . y s i n x . 1
2l
(
3l
l
Equations (6.10.10) can be written sin ,
-cosx,
cosx,
sinx,
X
(6.10.11)
'Vi,
Following the development of Pinder and Gray (1977), we construct an (Ν X N) diagonal matrix [Ai] wherein
when no normal boundary condition is specified at node / and
"
[sinx,
-cosx,
[cosx,
sinx,
when a normal boundary condition is specified at node i. The matrix [M ) has the property [ Λ / ] = [ Λ / ] ~ ' . Therefore, we can write (6.10.9b) as Γ
[M][A} AM] [M]{uy y
(6.10.12)
=[M){f} .
T
2
2
2J
We now define [A*] , =[M][A] [M]
(6.10.13a)
T
2 }
2}
(6.10.13b)
(«*}2. 3'=[^]{"}2.V
(6.10.13C)
{/*} .3=[M]{/}2.3-
+
2
Equation (6.10.12) now simplifies to (6.10.14)
M*] .3{"*}2.3 = 2
{/*}2.3-
Now our approximating equations have normal and tangential velocities (i.e., U and U ) in those locations in the unknown vector where normal velocity boundary conditions are to be imposed. T h e boundary conditions are now imposed easily. T h e procedure is the same as that outlined above for M,, or u and w , specified on a rectangular net. After the algebraic equations are solved, the normal-tangential velocities can be readily converted back to u and u . The only problem that remains is the determination of the direction normal to the boundary at points where the boundary is not smooth. ai
TI
2
3
2
}
Finite Element Solution of Two- and Three-Space-Dimensional First-Order
651
The procedure we describe for determining the normal direction is taken from Lynch (1978). The problem of a nonunique normal direction is encountered, in general, at the corner nodes of most isoparametric and triangular elements. The normal to each element side intersecting at a boundary node is likely to be different. The question arises as to how to select a normal direction that will satisfy the normal boundary condition in an average sense. One possible approach is the following. Let the specified normal velocity at the boundary be defined in terms of a basis function expansion, (6.10.15)
«.(^ι.Λ)-·ί.(>Ί.Λ)=
ß4*Φ*(>ι.Λ).
Ó A= I
where Μ denotes the number of boundary nodes where the normal velocity is specified. We now impose the constraint Ì
(6.l0.l6a)
Ì
Ó (U \+V \)* -nds
/
2k
u
Ó^ΑΦΑ*
=/
k
>A = l
or (6.l0.l6b)
Ó
J
A= l
s
J
s
0,
where U and U are the velocity components at the boundary nodes, η is the unit normal to the actual finite element grid, and the integration is performed over the boundary on which the normal velocity is specified. One can satisfy (6.10.16) in a "local" sense by setting each component in (6.10.16b) to zero independently. lk
(6.10.17)
u
(U i+U i)' j$ nds/f$ ds 2k
u
k
k
Thus the nodal normal direction, let us call it n , is defined as k
(6.10.18)
n == (<j> n ds / f $ ds. k
k
k
This expression can be written in the equivalent form (
(6.10.19) / 4> nds k
652
Hyperbolic Partial Differential Equations
We now employ the divergence theorem to obtain
(6.10.20)
The elements of (6.10.11) are now obtained from
(6.10.21a)
COS
X A
(6.10.21b)
1/2
For the special case of triangular elements, this criterion produces the same zero normal flux approximation as that used by Wang and Connor (1975). While the preceding discussion provides the rationale for selecting the boundary normal, even when the boundary is nonsmooth, there is an alternative approach to the problem of specifying normal velocities. The method was pioneered by King (1978) and is based on the idea of selecting the locations of midside nodes on quadratic elements so as to force the boundary to be smooth. T o illustrate the idea, consider the isoparametric element of Figure 6.37. The . y 2 . i o ) 0 > •) corner nodes 8 and 10 are located at ( > Ί , ^ . g ) —(0,0) and (y , respectively. We assume that we require an infinite slope at node 8 and zero at node 10.* =
uw
-8
Recall from our discussion of isoparametric elements that the quadratic basis functions, defined in local ξ coordinates, are (6.10.22a)
Φ» = 4€0 + €)
(6.10.22b)
φ =
(6.10.22c)
9
1-ξ
2
Φ,ο = -*€0-Ο·
'This example was provided by W. G. Gray, Department of Civil Engineering, Princeton University.
Finite Element Solution of Two- and Three-Space-Dimensional First-Order
653
Figure 6\37. Isoparametric quadrilateral element with a boundary side (—-). Node 9 is to be located such that the normal at nodes 8 and 10 is uniquely defined.
T h e derivatives with respect to ξ are (6.10.23a)
^
(6.10.23b)
^7T =
»
=
(
^ o
=
+
ξ)
2
-U
at
(6.10.23c)
1
_ ^
(
1
_
2
i
)
.
We can now use the isoparametric transformation concept as follows. We express the y . y coordinates as functions of ξ, t
2
(6.10.24a)
^ ι ( { ) = ^ι.βΦβ + ΛΊ.ίΦί + >Ί ,ιοΦιο
(6.10.24b)
y U)
Λ.9Φ9 +
= Λ . βΦβ +
2
Λ.ιοΦιο-
1 he slope can now be written (6.10.25)
slope = S =
dy
2
dy
)>2 dj
d
d
4>9 . dj
$% . dj
d
·»
,ι
d<
d
+
+
y
2
A
7
,
°
9 1
0
t> 10 dj
d
0
Thus (6 1026)
0 - ^ 2 - ^ 2 . 8 ( 1 + 2 0 - 4 ^ - ^ , 0 ( 1 - 2 0
>Ί. (1+2€)-4>',. ί-Λ.,ο(1-2θ 8
9
654
Hyperbolic Partial Differential Equations
T o obtain the slope at node 9, we write dy dy, ί = ο
=
dy,
2
9
>Ί ,8
>Ί. ίο
Thus a constraint on our present problem is c
^2,8
-V2.10 ^ -
y\.*-y\
10
c
Consider now the nodal arrangement of Figure 6.37, that is, (y, ,y ») (0,0), (y\.\0' > 2 . ι ο ) ( 1 < 1)· Because the slope at node 8 is infinite and at node 10 is zero, the equation of the slope reduces to =
i
2
=
S =
- 4 ^ 2 . 9
-1+2*
-40>, . , - 1 + 2 { ·
Let us now evaluate this equation at node 10; we obtain c
or y
2
9
t0
- ^1 ~dy,
= 0= 0(1-2) +
Λ ι 9
(4)-3
= \. In arriving at this equation we have assumed that
(i)
-4£y,.,-1+2**0
00
>Ί.9^3·
We now use the information available from node 8. T h e defining equation for the slope at node 8 yields c 8
- M
= oo
~ dy,
:
^ , , 9
+ 1'
from which we obtain oQ + >Ί.9
=
4 oo
2 _ 1 4
T h u s the appropriate location for this node is (y , y ) (4,1). N o t e that there are certain cases where this scheme does not work (e.g., when 5 = 1.0). In this case the slope at nodes 8 a n d 9 are the same, and this is inconsistent with a quadratic form for the boundary. =
l9
2<9
8
One-Space-Dimensional Hyperbolic Partial Differential Equations
655
6.11 FINITE ELEMENT SOLUTION OF ONE-SPACE-DIMENSIONAL SECOND-ORDER HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS While we have expended considerable effort investigating the finite element approximation to first-order hyperbolic equations, probably the best known hyperbolic P D E is the "wave equation," which is second order. Therefore, as our model operator in this section, we consider the following form of the wave equation: (6.11.1)
b<0.
u.„ + i i i , = 0 , r
The numerical procedures used to solve (6.11.1) are essentially those employed earlier for parabolic equations; the only new feature is the approximation of the second-order time derivative. Consequently, we focus on the general formulation of the Galerkin finite element equation. For detailed discussions on the use of various basis functions the reader is referred to the general introductory material of Chapters 2 and 3 and the specific applications in Chapters 4 and 5. 6.11.1 Galerkin Finite Element Formulation We begin the approximation of (6.11.1) by introducing a trial function of the form (6.11.2)
u(x,y)*u{x,y)
= £
^(χ)φ).
7 = 1
Alternatively, we could select the undetermined coefficients U to be time independent and carry the time dependence in the basis function, (6.N.3)
u(x,y)*u(x,y)=
Σ
U^(x,y).
7=1
We use (6.11.2) in our development in this section; the use of (6.11.3) was demonstrated in Section 4.13.1. The Galerkin method requires that the residual generated through substitution of (6.11.2) into (6.11.1) be made orthogonal to each of the basis functions
(6.11.4)
fR(x,y)*Ay)dy=0,
i = l,2
Ν
Hyperbolic Partial Differential Equations
656
where
R(x,y) = u + bu .
(6.U.5)
xx
and (6.11.5),
yy
The approximating equations are obtained through combination of
(6.11.4)
/ («„φ, +fen,,*,)dy =0, / = 1,2,.., N. y
Application of integration by parts to the second-order space derivative yields the alternative expression / (β,Α-.Μ^,).»> + Μ^ | =0, (
0
«" = 1,2
JV,
(6.11.2)
where / is the length of the domain of interest. Introduction of the trial yields function
£
,/ dWj
do, dA \
I
ο
Equation
(6.H.7)
(6.11.6)
i=
= 0,
\,l,...,N.
can be written in matrix form as
Ml{0}+[*]{«} + {/} = {o},
where
o = f
l
y
^ —
N-ay-dj^
d\_d U, — r dx dx 2
— 7 2"
2
,
u. = U,.
The task now becomes one of developing an effective time approximation. We assume that the initial conditions u(0, y), and du(0, y)/dx are known and that the simulation period is broken into equal time intervals h.
One-Space-Dimensional Hyperbolic Partial Differential Equations
6.11.2
657
Time Approximations
There are four generally used time integration procedures. We outline each and then select one for more detailed analysis.
Central Difference Approximation One approach to evaluating the set of O D E s represented by (6.11.7) approximates the time derivative as { ^ } = -i-{ ' /r [ dx J
(6.11.8)
U
1
+ 1
-2M' + u'-'}+ 0(« ). 2
If we evaluate (6.11.7) at time rh, we obtain (6.11.9)
^[^]{« h
, +
,
-2«'+^-'} + [Λ]{«}
Γ
+ { / } = {0}
or
[A]{uY
+
,
+(h [B]-2[A]){uY 2
+
[A]{uy-
i
+ h {f} 2
= {0}.
N o t e that only the matrix [A] is associated with the unknown vector ( « } ' . If [A] is diagonalized either through a lumping procedure or special numerical integration schemes such as described in Section 4.13.4, the scheme becomes explicit. Under these circumstances the equations can be solved individually and a very efficient algorithm results. As we shall see, however, the explicit scheme is only conditionally stable. r +
An interesting variant on (6.11.9) was presented by Gray and Lynch (1977). They introduced a weighting factor è such that (6.11.9) becomes
(6.11.10)
^-[A]{u ~2u +u - } r+l
h
+ [Â]{|ιΓ
+ ,
r
+(1
r [
- $ ) U ' +
f « ' " ' } + { / } = {0},
0<0
The case of è = 0 is the explicit formulation of (6.11.9); the choice è > 0 results in an implicit approximation. It is important to note, however, that irrespective of the choice of È, the spatial approximation will always be centered in time. We revisit (6.11.10) in our discussion of dispersion and dissipation in Section 6.11.3.
Houbolt Method»/ Approximation The Houbolt method was introduced in 1950 (Houbolt, 1950) for the analysis of the dynamic response of elastic aircraft. It is an implicit four-level scheme based on a second-order finite
658
Hyperbolic Partial Differential Equations
difference approximation to the time derivative, (6.11.11)
i^fl [ dx
J
= ^{2ii' h
-5«'+4w'- -ii'- }+0i> ).
+ l
l
2
2
The algorithm is generated by considering the spatial operator at the r + l level, (6.11.12)
ì]{0Ρ'+[*]{«}'
+,
+ {/} = {ο}.
Substitution of (6.11.11) into (6.11.12) yields (6.11.13a)
\[A]{2u
r + ]
h
-5u
r
-MM'
-
- 1
u~} r
2
+ [5]{«Γ' + {/} = {0}, which, rearranged for computation, becomes (6.11.13b)
{l[A} + h [B}){u) 2
-{A]{uy-
2
r
-5{A){u} +4[A){u) -'
+
x
+ h {f}
r
r
= {0}.
2
The solution of this equation for time level r + 1 requires knowledge of three time levels, r, r — 1, and r — 2. Thus it is necessary to initiate time integration using another algorithm, possibly the central difference method. In contrast to the central difference method, the Houbolt method cannot be formulated as an explicit scheme. T h e space and time matrices premultiply { u } ' and cannot be meaningfully diagonalized. Therefore, one must solve a system of equations initially and at any point in the simulation when [A], [B], or h changes. On the other hand, the method is unconditionally stable. + l
Wilson θ Method of Approximation The idea behind the Wilson method (Bathe and Wilson, 1976) is to assume a linear interpolation of {d u/dx } from rh to ( r + 6)h (è>1). A choice of 0 = 1 would result in the standard linear interpolation from rh to (r + \ )h. The algorithm can be developed in the following way. Let us write a Taylor series expansion for {d u/dx } around time rh, 2
2
«•»•« m " ' - m '
+
2
2
i m ^ -
We assume a finite difference approximation for the second term on the
One-Space-Dimensional Hyperbolic Partial Differential Equations
659
right-hand side and obtain
««•»·»)
m"'-{%Wffl"'-\%
A similar argument can be used to develop expressions for {du/dx} {u} . The resulting expressions are
and
r+r
r+t
(6.11.16) (du\
r+r
\du\'
, d (du]'
(å«)
idu\'
. d (du\'
(eh)
d
2
(du\
2
l(d u\
2
2
r
\d uY\
r + e
2
(6.11.17)
{«}
={«}
^ - { u )
+ _
r i r , L d , +(å»Û •«& 2!
—
d
2
ν
1
, , Λ Γ
+
J
'
d
x
2
{„}
. i">
(«A) 3WA
3
1
2
r+e
and { M } ' * about time
m " - m ^ i m -
and for (<Λχ} written about ( r + 0 ) « , Λ
«•»·»>
+..
(d u
We now write a Taylor series expansion for {du/dx} rh,
«•••·»>
+ _ _ { „ }
{ £ Ç £ Γ - Ý ( £ Γ + - ·
Subtraction of (6.11.19) from (6.11.18) yields
+
660
Hyperbolic Partial Differential Equations
In the same manner, one can write
Y +' y + £ y
(6.11.21a)
{u
= {u
9h
[u
0A d \ 3
+
€£AL y {u
3
r
A finite difference approximation in the last term yields
(6.11.21D)
{uy = (uy + eh±{ y + ^j- {uy +e
2
u
d
2
3!
+
d
i({«r'-{«>')]+
2
x
or (6.11.21c)
{«}'*' = («)' + « £ { « ) '
Equations (6.II.20) and ( 6 . l l . 2 l c ) can now be used to obtain expressions for {du/dx) and {d u/dx ) in terms of { « } ' . From ( 6 . l l . 2 l c ) we obtain r+e
2
2 r+i
, +
2
J
eh 2
2
χ((.}"·-.Μ')-έ{έ)' -. +
Combination of (6.II.22) with (6.II.20) yields an expression for (6.H.23)
rf« dx
)
r
+ e
[duV
" { f } '
-'{=Γ
. 9h
T ( { S } ' ^ ( t . r ' - w )
+
+
έ(Μ"·-Μ')-?{0}'-
{du/dx} , r+e
One-Space-Dimensional Hyperbolic Partial Differential Equations
661
Now that we have the necessary time derivative approximations, the timeintegration algorithm can be formulated. The O D E equations are written at the ( r + f?)A time level,
[A]
(6.11.24)
du 2
+ [B){uY ° + {f) = {0}. +
dx
2
Equation (6.11.22) is used to express {d u/dx } in terms of {u) plus additional information known from the r t h time level. Having calculated {u} we use (6.11.22) again to compute {d u/dx } . Setting å = Λ in ( 6 . 1 1 . 1 5 H 6 . 1 1 . 1 7 ) we obtain expressions for {d ufdx }, {du/dx} \ and { u } . We have now completed the cycle and can return to (6.11.24) for the calculation of the next time level. As a result, no special procedures are required for startup. Bathe and Wilson (1976) report that (7 = 1.37 is required for unconditional stability and θ = 1.40 is usually employed. 2
2 r+e
r+e
r+e
2
2 r+e
2
r+
2
r + l
Newmark Method of Approximation The Newmark method (Newmark, 1959) is a weighted-average scheme that can be developed using Taylor series expansions. We begin by writing two Taylor series, one about {du/dxY, the other about {du/dxY . The two series are then weighted by δ and (1 - 8) as follows: +l
.{*p- _[(*}'-{*}' .
, „ „ 5 a , (1 l)
=(1
l)
t4
+
Subtraction of (6.11.25b) from (6.11.25a) yields du 2
dx
2
This is the first Newmark equation. The second Newmark equation is generated by taking a weighted sum of Taylor series expansions,
(6.11.26a)
(i-e){uY *+{{--$) +
(
(6.11.26b)
6{uY
= e
\ r+ 1
I
•* f
dx
º
Γ
+ I
h"
2
ι
2!
d "
2
dx
I 2
Ë
Hyperbolic Partial Differential Equations
Subtraction of (6.11.26b) from (6.11.26a) yields (6.11.27a) r + I
or (6.11.27b)
{«}
[ u
Y
+
h
j. Y 2e {f u {u
+
h
x{
}
The third term on the right-hand side of (6.11.27b) can be interpreted as a difference approximation to d {u} /dx . Introduction of this approximation yields 2
(6.11.27c)
{«}
Γ+
,
r+,
2
=={·ι}' + Α-£;{«}' + h \({-e)-f {uY
+ e-f- {uY
2
1
2
+
] + - - .
which is the working form of the equation. Equation (6.11.27c) is now written such that the second-order term at the ( r + 1) level is expressed in terms of {u} and additional known information. r+1
(6.11.28)
Equation (6.11.28) is now combined with (6.11.7) written at the (r + \) level. Having obtained a solution for {u} ', we can employ (6.11.28) to retrieve the second-order term. The first Newmark equation (6.11.25c) can now be used to obtain the first time derivative. The cycle is now complete. The information required to evaluate (6.11.28) for the next time level is now available. The Newmark scheme is unconditionally stable provided that δ 3*0.5 and è>0.25 ( δ + 0 . 5 ) ; optimal accuracy is achieved using δ = 0 . 5 , è = 0 . 2 5 . r+
One-Space-Dimensional Hyperbolic Partial Differential Equations
663
There are other schemes possible for the time integration of (6.11.7). O n e family of three-parameter methods has been reported by Hilber et al. (1976). 6.11.3
Dissipation and Dispersion
In Section 6.9.2 we examined in detail the dissipative and dispersive characteristics of a number of time-integration methods for the solution of first-order vector hyperbolic PDEs. The approach introduced there is also employed in studying the second-order equation. As an example, we analyze the generalized central difference approximation of (6.11.10); the development follows Gray and Lynch (1977). We begin by rewriting (6.11.10)
^z[A]{u -2u +u h r+i
r
'}
r
+[ β ] { |
Μ
'
+ 1
+ ( 1 - ί 9 ) ^ + | - ' } + { / } = {0}, Μ
where [A] and [B] are the standard temporal and spatial coefficient matrices, respectively, and {/} contains known information. If we assume that linear chapeau basis functions are used in the evaluation of [A] and [B], a complicated difference expression results. The analytical eigenvalue associated with this expression is given by Gray and Lynch (1977), (6 π 29)
l-2F(l-/J) /[4F-4F (l-2g)] 2
±
where
2 + cos(/J„A:)
[l-cos(/U)]
and β„ is the spatial frequency or wave number. Recall that the dissipation in a numerical scheme can be described by the amplification ratio, which we denote as R„ and write (6-7.48)
R. = \ t / \
where £„ is the numerical eigenvalue and N is the number of time steps required to propapate the nth wave through one wavelength. The amplification ratio indicates the degree of overdamping (or underdamping) introduced through the numerical scheme. In addition, each wave exhibits a phase error due to the numerical approximation. After the wave has been propagated one wavelength, this error is given by n
(6.7.49)
è =
Ν Φ -2ð, η
ηΝ
664
Hyperbolic Partial Differential Equations
where (6.7.50) Details regarding the development of (6.7.48)-(6.7.50) are found in Section 6.2.3. T h e numerical behavior of the finite element in space-central-differencein-time approximation of the wave equation is obtained by substitution of (6.11.29) into (6.7.48)-(6.7.50). By considering a range of wave numbers a graph is generated that characterizes the accuracy of the scheme. Plots of amplitude ratio and phase error for this method are presented as Figures 6.38 and 6.39. Figure 6.38 is for an implicit formulation with è = 1, and Figure 6.39 is the explicit case where è = 0. As is generally the case with methods that are centered in time, there is n o amplitude error. This is true for both the implicit case and the explicit case since the space derivative is centered in both cases. The phase lag is better in the implicit case for p * = 0 . 5 than for p* = 2.0. N o t e that the 2k wave is propagated in this scheme. This is an important feature in minimizing spurious oscillations. It is interesting to compare this scheme to its vector hyperbolic counterpart. One must keep in mind, however, that in the vector case the scheme is centered in time only for è = 0 . 5 . For this particular situation Figures 6.29 and 6.38 can be compared. The amplification ratio is unity for all wavelengths in both cases. The phase lag is greater in the vector hyperbolic case. More important, the 2k wave is propagated in the wave equation formulation b u t is stationary in the vector equation approximation. Thus one would anticipate a more accurate and less oscillatory solution for u using the wave equation formulation.
4 .4
π
' — m
1
1—r-r
P*-0.S;P*-2.0
» .2
J
t.O 0.8 0.6 0.4 0.2 0
-I 2
1
Wavelength
L_lJ
6
40
/ Space (a)
I 20
ι
1_l 6 0 400
Increment
2 6 40 2 0 Wavelength /Space (Ln/k)
6 0 400 Increment
(b)
Figure 638. Amplitude ratio (a) and phase lag (/>) for the finite-element-inspace/implicit-finite-difference-in-time formulation of the wave equation (Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
Two- and Three-Space Dimensional Hyperbolic Partial Differential Equations 2)6 c
•
"Ô
72
ó» ó _J
0
«
-72
ó
-(44
VI £
α.
' M l
144
1
'
I ' _
Χ*
-
-
\
Γ
^"=0.425
-
Figure 639. Phase lag for the finite-elementin-space/explicit-finite-difference-in-time formulation of the wave equation (Gray and Lynch, 1977). Reprinted from Advances in Water Resources Journal © CML Publications
-246 -288
I
2
ι
665
I ι I
1
6 to 2 0
Wavelength/Space
ι
I
ι
6 0 too
increment
In Figure 6.39 we present the phase lag relationship for the explicit wave equation formulation [è = 0 in (6.11.10)]. The amplitude ratio is unity, as in the implicit case. In contrast to the implicit equation, where a phase lag was observed, the explicit formulation is characterized by a phase lead. Note that once again the 2k wave is propagated using the explicit wave equation scheme.
6.12 FINITE ELEMENT SOLUTION O F TWO- A N D THREE-SPACE-DIMENSIONAL SECOND-ORDER HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS The solution of second-order hyperbolic PDEs in two and three space dimensions involves the synthesis of concepts presented in earlier sections. The model equation we employ is (6.12.1)
if„+6 «,. . + 1
i l
i
6 ii ,. + 2
r i
i
*,H . ,. =0, l
i
j
b,<0.
The approximation of the second-order time derivative was treated in Section 6.11.2. The spatial operator is elliptic and was considered in detail in Chapters 4 and 5. Nevertheless, for completeness, we outline briefly the Galerkin approximation of (6.12.1). 6.12.1
Galerkin Finite Element Formulation
The trial function for the Galerkin formulation will be written assuming a semidiscrete approximation [referred to as the Kantorovich method by Mitchell and Wait (1977)], Í
(6.12.2)
u(x,y y )^u(x,y„y ) u
2
2
= £
j=t
^)φ,(^,.
Λ
),
where, as earlier, the 1/ are undetermined, time-dependent coefficients and
666
Hyperbolic Partial Differential Equations
A(y ,y ) are basis functions satisfying the essential boundary conditions imposed on (6.12.1) and certain completeness and continuity requirements. The Galerkin method requires that the residual generated through substitution of (6.12.2) into (6.12.1) be orthogonal to each of the basis functions of (6.12.2). The resulting set of approximate equations is x
2
(6.12.3)
(à ,φ,)
+ b^
χχ
V
l
l
^ ^ + b (u t) 2
+
y;y!
b (u ^,)^0, 3
Vyy
/ = 1,2
/V,
where ( · , * ) is the inner product defined in three space dimensions. Application of Green's theorem to the second-order spatial derivatives yields (6.12.4)
(u ,
<#>,) -
xx
*,<«,,, φ , „ > -
Α < ϋ Φ > - ft,
ι ν
ν;(
+ ( b a,$ da J
A
n
t
φ,„>
v
= 0,
/ = 1,2
Í
or, equivalently. Í
(6.12.5)
Σ
dU
.
2
t
Γ <Φ, - Φ. > -
U
J (*
•<*.·,
J < *.·,. > ~ ^ ( Φ , ,
- * 3 < Φ . . „ . Φ , - „ > ) + f bJ^da^O,
, .Φ,,, >
/ = 1.2
/v.
The matrix form of (6.12.5) is (6.12.6)
[Á]\^\+[Â]{ } dx õ
+ {/} = {0),
where
« „ = <Φ,.Φ.>
/ = ί 1>„ύ φ,άα. β
Equation (6.12.6) is of the same form as (6.11.7). Consequently, the techniques employed to solve the set of PDEs described by (6.11.7) can also be applied to (6.12.6). Boundary conditions are introduced using the procedures employed for elliptic and parabolic PDEs. Dirichlet conditions can be accommodated in two
References
667
ways. The simplest procedure is to introduce unity for the diagonal element of the equation in (6.12.5) corresponding to the Dirichlet node /'. The remaining elements of row and column / are set to zero. The corresponding element of {/} is set to the specified boundary value (i.e., U ). Neumann and Robbins (second and third type) boundary conditions are introduced through the surface integral of (6.12.5). When the normal gradient M„ is specified, it is introduced into the integrand and the integral is evaluated as described in Section 3.3. This integral is subsequently incorporated into /,. In the Robbins case the substitution of the boundary condition into the surface integrand results in a term that contains the unknown variable. Consequently, this term becomes part of the coefficient matrix associated with {«}. In summary, the extension of our discussion of second-order hyperbolic PDEs to two and three space dimensions does not introduce new concepts. The spatial operator was considered in the discussion of elliptic and parabolic equations and time integration was covered in the presentation of one-dimensional problems. 0l
6.13
SUMMARY
Hyperbolic equations represent the most challenging and perhaps most interesting class of PDEs to solve using standard numerical procedures. The twin problems of numerical dissipation and dispersion create a multiplicity of difficulties in formulating a satisfactory numerical scheme. In problems characterized by rectangular geometry and regular meshes, the finite difference and finite element methods provide anticipated results; collocation, although promising, remains to be tested in practical problems. The use of irregular subspaces, such as normally employed in finite element simulation, requires further investigation to ascertain the role such mesh configurations play in numerical dissipation and dispersion. T h e use of irregular global geometry and concomitant elements of nonrectangular geometry present particularly interesting problems with respect to the appropriate specification of boundary conditions. Several interesting schemes have recently been forwarded for treating this problem. At this time, the finite element and collocation schemes d o not appear to have advanced to the stage where they present a serious threat to the more established finite difference approaches, provided that these standard approaches are applicable.
REFERENCES Anderson. D. Α.. "A Comparison of Numerical Solutions to the Inviscid Equations of Fluid Motion," J. Comput.
Phys., 1 5 , p. I. 1974.
Baker. Ci. A , "A Finite Element Method for First Order Hyperbolic Equations," Math. 29. p. 995. 1975. Bathe. Ê and E. L Wilson. "Numerical
York. 1976. p. 528
Methods
in Finite
Element Analysis."
Comput.
Prenticc-Hall. N e w
Hyperbolic Partial Differential Equations
668
Boris, J. P. and D. L Book, "Flux-Corrected Transport. 1. SHASTA, A Fluid Transport Algorithm That Works," J. Comput. Phys., 11, p. 38, 1973. Browning, G., H. Kreiss, and J. Oliger, "Mesh Refinement," Math.
Comput., 27. p. 29. 1973.
Burstein. S. Z. and A. A. Mirin, "Third Order Difference Methods for Hyperbolic Equations," / . Comput.
Phys., 5, p. 547, 1970.
Cheng, S., "Accuracy of Difference Formulation of Navier-Stokes Equations," High Computing
in Fluid Dynamics,
Phys. Fluids Suppl.
II,
Speed
12, p. 34, 1969.
Chu, C. K. and A. Sereny. "Boundary Conditions in Finite Difference Fluid Dynamic Codes," J. Comput.
Phys.. 15, p. 476, 1974.
Cimcnt, M., "Stable Difference Schemes with Uneven Mesh Spacings," Math. 1971.
Comput., 25, p. 219,
Crowley, W. P., "Second-Order Numerical Advection," J. Comput. Phvs., 1, p. 471, 1967. Crowley, W. P., "Numerical Advection Experiments," Mon. Weather Rev., 96, p. 1, 1968. Emery, A. F„ "An Evaluation of Several Differencing Methods for Inviscid Fluid Flow Problems," J. Comput.
Phys., 2, p. 306, 1968.
Fairweather. G. and A. R. Mitchell, "A High Accuracy Alternating Direction Method for the Wave Equation," J Inst. Math.
I, p. 309, 1965.
Appl.,
Fromm. J., "The Time Dependent Flow of an Incompressible Viscous Fluid," in Methods
Comput.
Phys. 3, p. 345, 1964.
Fromm. J. E., "A Method for Reducing Dispersion in Convective Difference Schemes," J. Comput Phys., 3 . p. 176, 1968.
Fromm, J. E., "Practical Investigation of Convective Difference Approximations of Reduced Dispersion," High
Speed Computing
in Fluid Dynamics,
Phvs. Fluids Suppl.
Gazdag. J., "Time-Differencing Schemes and Transport Methods," J. Comput. 1976.
II,
12, p. 3. 1969.
Phvs., 20, p. 196,
Gottlieb, D „ "Strang-Type Difference Schemes for Multidimensional Problems," SIAM Anal..
J. Numer.
9, p. 650, 1972.
Gottlieb, D., "On the Stability of Rusanov's Third-Order Scheme," J. Comput. Phvs., 15. p. 421. 1974. Gottlieb, D. and E. Turkel, "Phase Error and Stability of Second Order Methods for Hyperbolic Problems II," J. Comput.
Phys., 15, p. 251, 1974.
Gourlay, A. R. and A. R. Mitchell, "Two-Level Difference Schemes for Hyperbolic Systems," J. SIAM
Numer. Anal..
3 , p. 474, 1966.
Gourlay, A. R. and A. R. Mitchell, "A Classification of Split Difference Methods for Hyperbolic Equations in Several Space Dimensions," SIAM
J. Numer. Anal.. 6, p. 6 2 , 1969.
Gourlay. A. R. and J. L. Morris, "Finite-Difference Methods for Nonlinear Hyperbolic Systems," Math.
Comput.,
22, p. 28, 1968a.
Ciourlay, A. R. and J. L. Morris, "Finite-Difference Methods for Nonlinear Hyperbolic Systems II." Math.
Comput.,
22, p. 549, 1968b.
Gourlay, A. R. and J. L. Morris, "On the Comparison of Multistep Formulations of the Optimized Lax-Wendroff Method for Nonlinear Hyperbolic Systems in Two Space Variables," J. Comput.
Phys.. 5, p. 229, 1970.
Ciourlay, A. R. and J. L. Morris, "Hopscotch Difference Methods for Nonlinear Hyperbolic Systems," IBMJ.
Res. Dev., 16, p. 349, 1972.
Gray, W. G. and D . R. Lynch. "Time-Stepping Schemes for Finite Element Tidal Model Computations," Adv. Water Resour.,
1, p. 83, 1077.
Gray, W. G. and D . R. Lynch, "On the Control of Noise in Finite Element Tidal Computations: A Semi-implicit Approach," Comput. Fluids, 1, p. 47, 1979.
References
669
Gray. W. G. and G. F. Pinder, "An Analysis of the Numerical Solution of the Transport Equation," Water
Resour. Res., 12, p. 547, 1976.
Harten, A. and G. Zwas, "Self-Adjusting Schemes for Shock Computations," J. Comput. p. 568. 1972.
Phys., 9,
Herron, Å. Η and D . U. von Rosenberg, "An Efficient Numerical Method for the Solution of Pure Convective Transport Problems with Split Boundary Conditions," Chem. Eng. Sa„ 21, p. 337, 1966. Hilber, Η. Μ., T. J. R. Hughes, and R. L. Taylor. "Improved Numerical Dissipation for Time Integration Algorithms in Structural Dynamics," Lawrence Berkeley Laboratory Rep. LBL4486. p. 19, 1976. Hirt. C. W., "Heuristic Stability Theory for Finite-Difference Equations," J. Comput. p. 339. 1968.
Phys., 2,
Houbolt, J. C , "A Recurrence Matrix Solution for the Dynamic Response of Elastic Aircraft," J. Aeronaut.
Sci.. 17. p. 540. 1950.
Huyakorn, P. S., "Solution of Steady-State, Convective Transport Equation Using an Upwind Finite Element Scheme." Appl. Math.
Modelling,
1. p. 187, 1977.
King, I. P. and W. R. Norton, "Recent Application of RMA's Finite Element Models for Two-Dimensional Hydrodynamics and Water Quality." in Finite Elements in Water Resources, Vol. FE-2 (C. A. Brebbia. W. G. Gray and G F. Pinder. e d s ) . Pentech Press, London. 1978. p. 2.81. Kwizak, M. and A. J. Robert, "A Semi-implicit scheme for Grid Point Atmospheric Models of the Primitive Equations," Mon. Weather Rev., 99. p. 32, 1971. Lees, M., "Alternating Direction Methods for Hyperbolic Differential Equations," SI A Ì J.. 10, p. 610. 1962. Lynch, D . R„ "Finite Element Solution of the Shallow Water Equations," Ph.D. dissertation. Dept. of Civil Engineering, Princeton University. 1978. McGuire, G. R. and J. L. Morris, "A Class of Second-Order Accurate Methods for the Solution of Systems of Conservation Laws," J. Comput. Phys., 11, p. 531, 1973. McGuire. G. R. and J. L. Morris, "A Class of Implicit, Second-Order Accurate, Dissipative Schemes for Solving Systems of Conservation Laws," J. Comput. Phys., 14, p. 126, 1974. Mitchell. A. R. and R. Wait, The Finite
Element
Method
in Partial
Differential
Equations,
Wiley,
1977, ñ 195. Mock, M. S., "Explicit Finite Element Schemes for First-Order Symmetric Hyperbolic Systems," Numer.
Math..
26, p. 367, 1976.
Morton, K. W.. "Stability and Convergence in Fluid Flow Problems," Proc. R. Soc. Lond., 323, p. 237, 1971. Newmark. Í. M., "A Method of Computation for Structural Dynamics," ASCE Div.. 85. p. 67, 1959.
J. Eng. Mech.
Orszag, S. A. and L. W. Jayne, "Local Errors of Difference Approximations to Hyperbolic E q u a t i o n s , " / . Comput.
Phys., 14. p. 93, 1974.
Parter, S. V., "Stability, Convergence and Pseudo-Stability of Finite-Difference Equations for an Over-Determined Problem," Numer. Math., 4, p. 277, 1962. Pearce. R. P. and A. R. Mitchell, "On Finite Difference Methods of Solution of the Transport Equation," Math.
Comput.,
16, p. 155, 1962.
Pinder, G. F., and G. Gray, Finite
Element
Simulation
in Surface
and Subsurface
Hydrology,
Academic Press, N e w York, 1977, p. 295. Rachford, Η. H.. Jr. and M. F. Wheeler, * * H Value Problem." in Mathematical
Academic Press. N e w York, 1974.
-1
Galerkin Procedure for the Two-Point Boundary
Aspects of the Finite
Element
Method
(C. D e Boor, e d ) .
670
Hyperbolic Partial Differential Equations
Roberts. Ê. V. and N . O. Weiss, "Convective Difference Schemes," Math. 1966.
Comput.,
20. p. 272.
Rusanov. V. V.. "On Difference Schemes of Third Order Accuracy for Nonlinear Hyperbolic Systems."V. Comput.
Pins.. 5. p. 507, 1970.
Samarskii, Α. Α.. "Local One-Dimensional Difference Schemes for Multi-dimensional Hyperbolic Equations in an Arbitrary Region," Zh. Vychisl. Mar. Mat. Fiz., 4. p. 21, 1964. Strang. G., "Accurate Partial Difference Methods I: Linear Cauchy Problems," Arch. Mech. Anal..
Strang. G., "Accurate Partial Difference Methods II: Non-linear Problems," Numer. p. 37. 1964. Strang. G., "On the Construction and Comparison of Difference Schemes," SIAM Anal..
Ration.
12. p. 392. 1963.
Math.. J.
6.
Numer.
5. p. 506. 1968.
Taylor. T. D . . E. Ndefo, and B. S. Masson, "A Study of Numerical Methods for Solving Viscous and In viscid Flow Problems," J. Comput. Phys.. 9 , p. 99, 1972. Turkel. E., "Phase Error and Stability of Second Order Methods for Hyperbolic Problems. I." J. Comput.
Phys.. 15. p. 226, 1974.
Vichnevetsky. R. and B. Peiffer, "Error Waves in Finite Element and Finite Difference Methods for Hyperbolic Equations." in Advances in Computer
Methods for Partial
Differential
Equations.
(R. Vichnevetsky. ed.). A1CA Bethlehem. Penn.. 1975. p. 53. Vichnevetsky. R. and Y. S. Shieh. "On the Numerical Method of Lines for One-Dimensional Water Quality Equations," N A M N o . 42. Dept. of Computer Science. Rutgers Univ., 1972. Vichnevetsky, R. and A. W. Tomalcsky. "Spurious Wave Phenomena in Numerical Approximations of Hyperbolic Equations." Proceedings of the 5th Annual Princeton Conference on Information Science and Systems, Princeton University. 1971, p. 357. Wang, J. D. and J. J. Connor, "Mathematical Modelling of Mean Coastal Circulation." MIT Parsons Laboratory Rep. N o . 200. 1975. Warming, R. F. and B. J. Hyett, "The Modified Equation Approach to the Stability and Accuracy Analysis of Finite-Difference Methods," J. Comput. Phys., 14. p. 159. 1974. Warming, R. F.. P. Kutler, and H. Lomax. "Second- and Third-Order Noncentered Difference Schemes for Nonlinear Hyperbolic Equations," AIAA J., 11, p. 189, 1973. Wesseling. P., "On the Construction of Accurate Difference Schemes for Hyperbolic Partial Differential Equations." J. Eng. Math..
7. p. 19. 1973.
Wilson. J. C . "Stability of Richtmyer Type Difference Schemes in Any Finite Number of Space Variables and Their Comparison with Multistep Strang Schemes," J. Inst. Math. Appl.. 10, p. 238, 1972. Zwas, Ci. and S. Abarbanel, "Third and Fourth Order Accurate Schemes for Hyperbolic Equations of Conservation Law Form," Math. Comput., 25, p. 229, 1971.
Index
Aitken extrapolation, 223, 224 Amplification factor, 171 Amplification matrix, 176 Area coordinates, 110-116 Artificial viscosity, SOS Base curve, 17 Basis functions: cubic polynomial type, 63, 66-67,118120, 295 Hermite polynomial type,67-78,86-90,98, 129-132, 295-297, 299-301, 600 Lagrangian type, 79-80, 83 linear polynomial type, 61, 63, 83, 289 quadratic polynomial type, 61-66,1 Ιοί 18, 295 quintic polynomial type, 459 serendipity type, 80-86 Block-centered finite difference grid, 152 Boundary conditions: Cauchy type, 29 Dirichlet type, 29, 96,136-138, 292, 311-312,336, 357,443,447,667 first kind, see Boundary conditions, Dirichlet type Neumann type, 29, 96, 131, 137, 286, 357,457,667 Robbin's type, 29,137-138, 286, 292, 311-312, 336, 357, 376, 443-444, 667 second kind, see Boundary conditions, Neumann type third kind, see Boundary conditions, Robbin's type Boundary integral equation method (BIEM),461,481 boundary element formulation, 465473 using linear basis fuiictions, 471-473 using piecewise constant basis functions, 465-471 •71
combination with finite elements, 478481 fundamental theory for, 461-465 nonhomogeneous material, formulation for, 475-478 Poisson's equation, solution of, 473-475 Canonical form, 12, 17 Cartesian-natural coordinates relationship, 110,115 Cauchy problem, 4-6 Chapeau function, 51, 307,591 Characteristic cone, 581 Characteristic curve: application of, 7-11, 24-28 definition of, 5 for systems of PDE's, 24-26 Clough-Tochcr element, 460-461 Collocation method, 52-53,58, 75, 99 Collocation point, 52, 331 Composite finite difference approximations: global, 219 local, 219 Conservative property, definition of, 529 Consistency, definition of, 592 Consistently ordered set, 393 Courant-Friedrichs-Lewy (CFL) convergence condition, 495, 565, 581 Courant number, 491, 593 Cross derivative approximation, see Mixed derivative Curvilinear (a,) coordinates, 332-339 Dirac delta function, 52, 299 Direct solution methods: cyclic reduction, 383-385 odd-even reduction, 383-385 Thomas algorithm, 216 Dispersion, numerical, 505-524, 605-620, 627-644,663-665 Dissipation, numerical, 505-524, 605-620, 627-644, 663-665
672
Index
Eigenvector, 389,424 Eigenvalue, 26, 177, 182, 389, 424 of tridiagonal matrix, 180 Elliptic partial differential equations, 355-482 biharmonic equation: finite difference approximation of, 373-375 finite clement approximation of, 455461 boundary conditions for, 357-358 boundary integral equation method solution, see Boundary integral equation method comparison of finite difference, finite element, and boundary clement method solutions, 482 definition of, 16,18, 20 finite difference approximations of: five point formulas, truncation error for, 360-371 for an irregular boundary, 364-366, 376377 nine point formulas, truncation error for, 371-372 in three space dimensions, 434-441 alternating direction methods (ADI), 437-441 iteration methods, 385-392,437. See also iterative solution of matrix equations in two space dimensions, 360-434 iterative methods, see Iterative solution of matrix equations finite clement approximation: in three space dimensions, 481-482 in two space dimensions, 441-461 see also Finite element method model equation, 355-356 Energy norm, 323 Euclidean norm, 390
Finite clement method: assembly procedure, 94 basic concepts, 34-107 basis functions, see Basis functions boundary conditions, approximation in, see Boundary conditions coefficient matrix: element level, 95, 102 global level, 94, 102,446 collocation method, see Collocation method consistent time approximation, 321330,610,613 derivatives, calculation of, 78-79 functional coefficient approximation, 304 Galerkin's method, see Galcrkin's method interpolation functions for, 49,61 irregular subspaces for, 109-148 isoparametric type, see Isoparametric finite elements lumped time approximation, 321-330, 610,613 via Simpson's rule integration, 328-330 via summation, 322-323 method of weighted residuals, 49-53 mixed clement approximation, 453-455 overlapping finite elements in time, 313 rectangular elements, 79-90 relationship to finite difference method, 104-107 shape functions for, 49. See also Basis functions subdomain formulation, see Subdomain method subparametric clement type, 124 superparametric clement type, 124 trial function for, sec Trial function triangular clement type, see Triangular finite elements Frequency: spatial, 507 temporal, 507, 508
Finite difference method: approximating equations, 90-104 approximation formulas, 34-38 basic concepts, 34-107 notation, 35-36, 38-41 in one dimension, 41 relationship to finite element method, 104-107 representation of irregular boundaries, 240-241 in two dimensions, 41-44
Galcrkin's method, 50-51, 55, 71, 91, 278-280, 132,138,285-289,442448, 589-594, 620-622, 626-627, 645-648, 655-663, 665-667 Gaussian quadrature integration, 59-60, 126 Heavisidc step function, 297 Hyperbolic partial differential equations, 486-667 conservative forms of, 488 definition of, 16, 18, 20
Index
domain of dependence, numerical, 565 finite difference method: alternating direction implicit methods (ADI), 583-589 approximation formulas, 492-493 Boris-Book antidiffusion method (BB), 537-538 Burstein algorithm (B), 558 central-central approximation (C-C), 490-499 Cheng's approximation, 580 for conservative equations, 528-539, 554-562 Crank-Nicolson approximation (C-N), 526, 542-544 Crowley fourth-order algorithm (Q, 512,515 Fairweather-Mitchell approximation (FM), 584-585 for first-order scalar equations, 554562 for first-order vector equations, 526539 forward-backward approximation (F-B), 499-500 forward-backward-ccntral (FBC), 578 forward-central approximation (F-C), 497-498,572,577 Fromm method (F), 514, 515, 524 Gottlicb-Turkel algorithm (GT), 561 Gourlay-Mitchcll composite approximation (GM), 588 hopscotch methods, 524-526 Lax approximation (L), 498-499, 575 Lax-Wendroff approximation (L-W), 500-501,510,512,521,524,526528, 531-532,541-542,573-574 leapfrog formula (C-Q, 490-499, 540541,557,573 Lee's I method (LI), 583-584 Lee's 2 method (L2), 584-585 locally one-dimensional method (LOD), 586-588 mixed scheme of Vichnevetsky and Shich,515,518 for mixed systems, 577-580 modified two-step Lax-Wendroff approximation (modified 2SLW), 547-548 Roberts-Weiss angled derivative method (RW,), 513,533 Roberts-Weiss fourth-order method (RW ), 513,515 3
673
Roberts-Weiss staggered method (RW,), 513,533 rotated two-step Lax-Wendroff (2SLW), 547-548 Rusanov-Burstcin-Mirin (RBM), 520521,533 Samarskii approximation, 588 for second-order model equations, 562-589 explicit algorithms, 564-569 implicit algorithms, 569-571, 583 for simultaneous first-order equations, 571-577 stabiUty of, 490-496 staggered leapfrog (SLF), 557 Strang 1 (SI), 551-552,554 Strang 2 (S2), 551-552,554 truncation error of, 490-496 two-step Gourlay-Morris method (2SGM), 534-536 two-step Lax-Wendroff approximation (2SLW), 519,532, 546,555-556 in two and three space dimensions, 539-562,580-589 variable mesh, influence of, 525 weighted implicit method, 574 Wendroff approximation (W), 503, 542-543 Wcndroff-Douglas-Rachford method (WDR), 550 Wcndroff-Pcaceman-Rachford method (WPR), 549-550 Wcsscling's method, 522-524 Zwas-Abarbancl method (Z-A), 533534
finite clement approximation: boundary conditions, treatment of, 648-655 for first order model equations, 589 for first order vector equations, 625-644 in one space dimension, 655 for second-order equations, 655, 665667 time derivative, treatment of: finite difference, 629-631,657 finite clement, 631-633 Houbolt method, 657-658 Lax-Wendroff method, 637-640 leapfrog method, 633-634, 647-648 Newmark method, 661-663 partially corrected second-order Adams-Bashforth method, 636-637 second order Adams-Bashforth method, 635-636
674
three level semi-implicit method, 640-642 two level semi-implicit method, 642645 Wilson β method, 658-661 in two and three space dimensions, 620-625, 645-655, 665-667 H ' Galerkin approximation, 598-599 Orthogonal collocation formulation, 599-606,613-620,622-625 -
Initial value problem, 6-7 Isoparametric finite elements, 120-137 basis function-transformation function relationship, 124-129 boundary conditions, formulation of, 137-141 hexahcdral element, 141-144 mixed element formulation, 124 in normal-tangential coordinates, 131137 numerical integration for, 126-129,141, 145-148 quadrilateral clement, 120-141 serendipity Hermitian element, 129131 tctrahcdral element, 147 transformation function, 129 Iterative solution of matrix equations, 385-392 acceleration of, 391 alternating direction implicit method, 421-430,437-441 Douglas approximation (D), 439-441 Douglas-Rachford approximation (DR), 439-441 MitchcU-Fairweather approximation (MF),427 Peaccman-Rachford approximation, 423-430 Chebyshev semi-iterative procedure, 391,433-434 consistent method, definition of, 389 convergence, 386-392 asymptotic rate of (R), 390,429 weak, 389 extrapolation in, 391 first degree, definition of, 386 line and block methods, 418-421 convergence, rate of, 419 line Gauss-Seidel method (LGS), 418, 420 line Jacobi method (LJ), 419
Index line successive overrelaxation (LSOR), 418,420 multiple line successive overrelaxation method (kLSOR), 419, 420 nonstationary iteration procedure, 391, 423 one step procedure, definition of, 386 point iterative methods: convergence, rate of, 408,415 convergence of, 405-417 formulation of, 392-405 Gauss-Seidel method, 397-399, 408410,420 Jacobi method, 395-397,405-408, 419 Jacobi overrelaxation, 401,416-417 Liebmann method, 397-399 modified successive overrelaxation (MSOR),403 Richardson overrelaxation method, 401,416-417 successive displacement method, 397399 successive overrelaxation method (SOR), 399-401,410-415,420 symmetric modified successive overrelaxation (SMSOR), 404 symmetric successive overrelaxation (SSOR), 402 unsymmetric modified successive overrelaxation (USMSOR), 404 unsymmetric successive overrelaxation (USSOR), 402 Richardson acceleration for, 391 second degree, 391 semi-iterative overlays, 430-434 stationary iterative procedure, 386 strongly implicit method (SIP), 430 Jacobian, 116,126 Jacobian matrix, 92,113-116,129-135, 141-144,624 Kronecker products, 345 Laplace modification of PDEs, 348 Lax equivalence theorem, 168 L'Hospital's rule, 474 Lobatto integration formulas, 128 Matrices: diagonally dominant, 380 irreducible, 380
Index Maximum principle, 359 Method of weighted residuals, 49-53, 277-278, 462 application of, 53-60 residual, definition of, 99 Mixed derivative, approximation of, 134135,243, 253 Monge cone, 11 Natural coordinate system, 109-110 Natural ordering of nodes, 393 Normal-tangential coordinates, 131-132 Notation: finite difference, 35-36, 38-41 for general PDEs, 1-4 Numerical integration: for isoparametric hcxahedral elements, 145-148 for isoparametric quadrilateral elements, 126-129 for tctrahedral elements, 145 for triangular elements, 113-114 Ordinary differential equations, general form of, 3 Overspecification of hyperbolic PDEs, 538 Parabolic partial differential equations, 149-354 comparison of finite element, finite difference, and collocation approximations, 350-351 definition of, 16, 18, 20 finite difference method: alternating direction explicit method, 244-245 alternating direction implicit method, 245-255 Douglas-Brian method (DB), 268-270 Douglas method (D), 251 Douglas-Rachford algorithm (DR), 249, 252, 254,267,271 extended Mitchell-Fairweather approximation (EMF), 271 Fairweather-Mitchcll method (FM), 270-271 McKec-Mitchcll algorithm, 253 McKec-Mitchcll algorithm for mixed derivatives, 253-254 Mitchell-Fairweather algorithm (MF), 249-250, 252 Peaceman-Rachford method (PR), 247-249, 251-252, 254, 266
675
stability of Peaceman-Rachford method, 247-248, 266 variable coefficient approximation, 255 asymmetric finite-difference approximations: Barakat-Clark approximation, 196, 239 hopscotch method, 192-197, 261264 Liu I method, 196, 198 Liu II method, 197 Saul'ycv ι method, 194, 197, 237 SauPycv H method, 195, 238 backwards implicit approximation, 174, 159-160, 242 box approximation, 211-213 classic explicit approximation, 155-157, 168, 171, 178, 180, 230 composite solutions, 219-234 classic explicit-Crank-Nicolson method, 232-234 global extrapolation, 220-224 local combination, 226-230 numerical results from, 239-231, 224226 Saul'ycv-classic explicit method, 232 stability of, 227-229 truncation error of, 230, 232 consistency of, 162-166 convergence of, 162-166 Crank-Nicolson implicit approximation, 160-161,182,242 cylindrical coordinate approximations, 199 derivation of difference formulas, 153162 Douglas approximation, 188 DuFort-Frankcl explicit approximation, 157-158, 167, 173, 181,239 explicit difference form of, 152, 159, 167, 176, 186,234-240 fractional splitting methods, 255-260, 272-273 higher order approximations, 187-190 implicit difference form of, 152, 159, 167, 176,241-244 irregular boundaries, approximation of, 240-241 iterative methods of solution, 274-275 Douglas-Rachford ADI method, 276 strongly implicit procedure (SIP), 275-276
676
successive overrelaxation method (SOR), 275 local one-dimcnsional-altcrnating direction implicit comparison, 258 local one-dimensional methods (LOD), 255-260, 272-273 mesh refinement, 264-265 model approximation, 151-153 nonlinear approximations, 203 predictor-corrector method, 190 Richardson explicit approximation, 158-159,169,173,177 spherical coordinate approximation, 199 stability of, 166-185,197-198, 204 by Heuristic analysis, 168-170 influence of lower order terms, 186187 by matrix analysis, 179 by Von Neumann analysis, 170-179 in three space dimensions, 265-276 in two space dimensions, 234-265 variable coefficient approximation, 199 variable weighted implicit approximation, 161-162, 175 finite clement method, 276-351 alternating direction procedure (ADG), 342-348 asymmetric weighting functions for, 306-309 formulation using Dirac delta function, 297-299 Galerkin approximation of model equation, 277-280 nonsmooth subspacc approximations, 340 in one space dimension, 285-309 orthogonal collocation approximation, 299-306, 330-339 in three space dimensions, 309-348 time derivative approximation: backward approximation, 281 Crank Nicolson approximation, 284 forward approximation, 280-281 Galerkin's method, 292-294, 309-314 Lee's three-level approximation, 282283 lumped and consistent time matrices, 321-330 modified backward approximation, 283 modified predictor-corrector approximation, 284
Index predictor-corrector approximation, 284 variable weighted approximation, 281282 treatment of sources and sinks, 339 in two space dimensions, 348-350 model equations for, 149-151,153, 265 well-posed problems, 151,153 Partial differential equations: boundary conditions for, 28-53 canonical form of, 12-17 classification of, 13-21 definition of, 1 first order, 4-6 initial conditions for, 28-33 linear form of, 2, 12-17 non-linear form of, 2, 11-12 quasi-linear, 2,4-6, 17-20 second order, 12-21 systems of first order, 21-28 well-posed problem for, 3 Phase angle, 510 Property A, 393 Property R, 432 Red-black ordering of nodes, 403 Relaxation parameter, 399,412 Simpson's rule, 106 Spectral radius, 177, 388 Spline function, 58,67 Static condensation, 120,459 Subdomain method, 51-52, 56 Subparamctric finite clement, 124 Superparamctric finite clement, 124 Taylor scries expansions, 36-37,46,48 Thomas algorithm, 216 Trial function, 54,98, 134, 277, 300, 314,334,341,349,449 Triangular finite elements, 109-120 area coordinates for, 110-116 axisymmetric problem formulation, 113 global coordinate formulation, 113, 125 integration formulae for, 1)3, 114 local coordinate formulation, 110-120 Volume coordinates, 145 Von Neumann condition for stability, 171 Wavelength, definition of, 507
Index
Wave number, definition of, 507 Weak solution, 443
677
Weighting function, 50-51, 56 asymmetric form of, 306-309, 316-321, 594-598,610-613
This page intentionally left blank
Breinigsville, PA USA 22 September 2010
245807BV00001B/9/A