You are on page 1of 6

Some details of the Galerkin finite element method

M. F. N. Mohsen
Department of Civil Engineenng, University of Petroleum Saudi Arabia (Received February 1982; revised March 1982) and Minerals. Dhahran,

The incorporation of the Galerkin technique in the finite element method has removed the constraint of finding a variational formulation for many problems of mathematical physics. The method has been successfully applied to many areas and has received wide acceptance. However, in the process of transplanting the concept from the Galerkin method for the entire domain to the Galerkin finite element method, some formal details have been overlooked or glossed over in the literature. This paper considers some of these details, including a possible reason for integration by parts and the contribution of interelement discontinuity terms. Key words: Galerkin finite element method, integration element discontinuities, Dirichlet boundary condition by parts, inter-

Introduction
During the last two decades, the introduction of the Gale&in technique to the finite element method has broadened the domain of the latter to include problems for which a variational formulation may not be known. With this addition the present-day finite element method is capable of dealing with the majority of continuum problems in mathematical physics. First used in structural engineering, the method was later recognized as an instance of the Rayleigh-Ritz principle. With this connection established, mathematicians helped place the finite element method on a much stronger foundation by studying the existence, uniqueness and error bound of this piecewise continuous solution.1*2 Although the Gale&in finite element method is now generally recognized as a powerful numerical tool, some necessary details are not treated explicitly in many texts.3-6 The fiial answers are written without going through the details of the treatment of the inter-element discontinuity and its effect on the integral of the residual. However, recent texts7*a have discussed integrabihty conditions of functions involved in the integrand of the general weighted residual form of a boundary value problem. The omission of details in some references3-6 may have resulted in the process of transplanting the concepts from the Gale&in method for the entire domain to the Gale&in finite element method. The weighting (basis) functions in the former are: (a) continuously differentiable over the entire domain; (b) chosen to satisfy the essential (Dirichlet) boundary conditions. However, none of the above is true for the shape functions of the Galerkin finite element method. Details are necessary 0307-904X/82/030165-06/$03.00 0 1982 Butterworth & Co. (Publishers) Ltd.

to establish that shape functions not satisfying the above conditions may still be acceptable. These aspects that are not explicitly mentioned are: (i) The weighting functions Ni (the shape functions) are not all zero at the boundary. Absence of explicit detail in some texts,6 leaves room for the reader to construe that an implicit assumption has been made that all Ni = 0 at the boundary as is usually done in the Galerkin method over the entire domain. In other texts, terms involving Nj at the boundary are rejected without assigning reasons and consequently may lead to confusion. (ii) There appears to be a lack of clarity as to why integration by parts should be performed. Some authors3 refrain from stating these reasons. Others4 state that integration by parts frees us from the requirement of choosing the interpolation functions to a class* with slope continuity.4 (iii) Some authors, 3p4invoke the continuity of physical quantities represented by the boundary terms evolving from integration by parts in order to cancel them. These aspects will be treated separately, each with a specific example.

Discussion of state of art derivations


All shape functions Nt do not vanish on the boundary

In reference 6, the following problem is presented as an example. This problem will also be adopted as the model problem for the greater part of this paper. * Class here refersto a set of functions with
specified function derivative the continuity of a order of their derivatives across the element boundary. A belonging to a class C will have continuity of the rth across the element boundary.

Appl.

Math.

Modelling,

1982,

Vol

6, June

165

Galerkin

finite

element

method:

M. F. N. Mohsen

d2@ -+Q=O
cLx2

where: r$ = dependent variable; Q = Q(x), a generalized source term; and x = space coordinate. Equation (1) is required to be solved under the boundary conditions: d(O) = 0 @CL> = 0 Let: ? = I: Nitit (3) , (24 (2b)

appropriate measures have been taken to integrate the discontinuous integrand. As will be shown subsequently, one may start from equation (5) or directly from (4) to obtain identical results without any necessary assumption on slope continuity. However, a problem arises from another direction. In the integrated form, it is not known how to incorporate Neuman boundary conditions if present in the problem. Thus it appears that the main reason for integration by parts is that it readily allows the incorporation of the Neuman boundary condition. Cancellation of boundary terms generated by integration by parts Desai3 presents the Galerkin finite element method by taking the fourth order beam bending equation:

be a chosen form of the required approximate solution where: Ni = shape functions; @i= value of @J at discrete points. Zienkiewicz6 has demonstrated the general method of weighted residuals, the residual of equation (1) is orthogonalized with respect to weighting functions Wi, which are defined over the entire domain and chosen so as to vanish on the boundary. This yields:

F$-,=o

O=GxGL

(7)

(4)
0

where: F = F(x), properties of the beam section; w = vertical deflection; and p = p(x), load. Proceeding as before, a trial function is assumed of the form:

The above equation on integration by parts yields: where Wi = nodal vertical deflections. The residual of equation (7), is then orthogonalized with respect to the shape function over an element:
0

In Zienkiewicz,6 the boundary term (the first term in equation (5)) was dropped using the vanishing property ofWj at x = 0 and x = L, yielding:

(9) Integration of equation (9) twice by parts, yields:

S(
0

(6)

x2 I XI

The Galerlcin method was then introduced by choosing Nj for Wi. However, such a choice in (6) is admissible only if we may still delete the boundary term Wi(d$/dx) for Ni = Wj. But it is to be noted that all Ni do not vanish at the boundary as Wj did. Thus this term must be carried along until the final matrix is formulated. The boundary conditions are incorporated in the final system by appropriate modification of the matrices. In a similar treatment Segrelind, neglected the boundary terms at the ends of the domain, without establishing the necessary reasons. Reason for integration by parts Huebner: while explaining the role of integration by parts states. . . it lowered to one the order of the highestorder derivative appearing in the integrands of the thermal coefficient matrix [K,]@; thus approximating functions need to preserve continuity of value not of slope. However, integration by parts merely gives an alternative formulation; it does not have any intrinsic property to permit lowering of the requirements of the assumed function. For example, if a Co class function be acceptable for the integrated form of the problem equation (5), it should also be acceptable in the form prior to integration (equation 4) provided

d Nj d2Ni FD zdxwi

The last two boundary terms of the element equation (10) are identified as end shear and moments respectively. In the process of assembling, it is stated by Desai3 that: It may be noted that if there were no externally applied joint forces, when joint load vectors are assembled for all elements in the discretized body, only the terms related to the two ends of the entire beam will remain, whereas the other terms will be zero due to alternating plus and minus signs. In spite of this cancellation, the final results,3 show discontinuities in the shear force diagram, showing that the end shears do not cancel. Segerlind treats the beam deflection problem by the second order equation (of the same form as equation (1)) with the bending moment as the forcing function. Referring to the boundary term evolving out of the integration by parts, he states, This term is neglected if nothing is known about the slope at the nodal point. No justification was given as to why these terms are neglected.

166

Appl.

Math.

Modelling,

1982,

Vol

6, June

Galerkin

finite element

method:

M. F. N. Mohsen

Formalized transition Galerkin-element


Galerkbl parts) finite element

from Galerkin
solution (including

domain
in tegratiorl

to
by

infinite discontinuity at node 3, the integral itself is convergent. Rewriting equation (1 l), we have: 1,+1,=0 where:
L I1 = .I - ,)I. d?dx

(12)

In order to clarify the intermediate steps the model problem equation (1) under the boundary conditions (2a) and (2b) will be solved in detail. Two quadratic elements of equal length 1 will be used. As a consequence of this assumption, the graphs of 8, d@dx and d*$/dx will be as shown in Figure 1 (qualitatively). The quadratic shape functions and their first and second derivatives within each element are presented in the Appendix. It is to be noted that the value of a shape function and its derivatives as given by the equations in the Appendix are valid within each element. Outside this element the values are zero. Following the Gale&in method for the entire domain, the residual of equation (1) is orthogonalized with respect to each of the shape functions Nj over the entire domain:

I dx*

(13)

0
L

I2 =

s
0

QNj dx

(14)

Directing our attention to II, because of the discontinuity in d*&dx* at node 3, the integral over the entire domain will be decomposed into three parts, one over each element excluding the bordering end point and one at the bordering node:

Referring to the first portion of the integrand in equation (1 I), it is to be noted that even though d*&dx* has an

Element . 1 2

No 1

_ I_ II 3 Mid -side

Element

No2

4 nodes

X-

where 6(x,) = a Dirac delta function at x3 and [ I@) = superscript in parenthesis indicates element number, or:

Y-

(16) where:

Bj =

otherwise

Thus:

(17)

where [Kij] is the assembled matrix of element matrices KG defined by: qj =

x-

s
0

dNj dNi - - dx dx dx

(18)

where I@) = length of eth element. Writing out the full system for all the nodes, we have:

Appl.

Math.

Modelling,

1982,

Vol

6, June

167

Galerkin

finite

element

method:

M. F. N. Mohsen
&J -dx 0 x, (1)

I,=

Combining 1, and Ia, in equation (12), one obtains:


f -d$j (1) dx x, 0 0 0 &$ (2) dx x5

- [Kij]{@A + Cr;:) =0

(23)

\
[xijl{&l +

where:

(24)

Equation (23) may be re-written as:

Utilizing the properties of Ni, equation (20) reduces to:

I, =

- [Kill{@i)

f4 &j

(2)

d,$2) -z xs
0 ,

f+dy. *s
The result (25) is comparable to the final systems obtained in references 3, 5 or 6 except for the following factors: (a) The boundary terms are still present. (b) It was not necessary to invoke the continuity of any physical quantities in cancelling the interelement terms. It is in this form of equation (25) that the essential boundary conditions may be introduced. Pinder and Gray: outlined the procedure described above. However, the details involved in the cancellation of the inter-element boundary terms as shown in equations (lS)-(22) were not given. For the sake of comparison the matrix [Kij] will be explicitly presented. It may be shownS that:
14 -16 2 -16 32 -16 14

&j(')

+
El.:'

-dx 0 / x; I

(21)

It is at this step that the entries at the node 3 (the bordering node) of the first and the last vectors in equation (21) cancel out, to yield:

(26)

2 -16

168

Appl.

Math. Modelling,

1982, Vol 6, June

Galerkin

finite element

method:

M. F. N. Mohsen

The corresponding assembled matrix form will be: 14 -16 1 G 16 0 0 32 -16 28 -16 0 -16 0 32 -16 2 -16 2 -16 2 0 0 0 0 2 14

Referring to the Appendix, Ktl as:

may be explicitly computed

(32)

The assembled matrix [~ij] will then be: 4-8 16 -32 4 0 .o -8 0 0 4 16 8 4 16 -32 -8 0 0 -8 0 0 4 16 4 and (33)

In order to compute the entires in (Bj}, (d$/dx)l$) (d$/dx)lt+) wilI be computed as shown below. 3 Incorporating the Dirichlet boundary conditions 4, = $7 and @s= & (in the model problem 4: = 4: = 0) into the system (27), we have: 1 0 0 32 0 16 Cl 0 d@=) dxThus we have: -dNf) dx .(e) pl

!m 0 -16 28 -16 61 0 0 -16 32 0 0 0 0 (35)

(28)

=f[4~~-492+3P31 Substituting the values of (d$/dx)l$ the expression for {Bj) one obtains:
\

(36) and (d$/dx)l$!! into

Galerkin finite by parts

element

forndation

without

integration

Returning to equation (1 S), for the chosen quadratic shape functions (Appendix), d2$/dx2 is a constant. Thus equation (15) may be written as:

{Bj) =

(29) Introducing (29) into (12) we have: [Kij] I

0 0

{$i> - {Bj) = Cfi>

(30) =1
1

where [~ij] is the assembled matrix of E$) and I?: is defined as:
r(e) i
0

--~@+%J,-@s-$I+%-%~
0

Ni dx

(31) \ 0

Appt. Math. Modelling, 1982, Vol 6, June 169

Galerkin

finite element

method:

M. F. N. Mohsen

the major reason for integration by parts is to facilitate incorporation of the Neuman boundary condition.

Conclusion
Boundary terms emerging out of integration by parts over each element cancel with the integration of the discontinuities. It will be paradoxical to invoke the continuity of physical quantities represented by them. The reason for integration by parts is to achieve a convenient means to incorporate Neuman type bounary conditions. Unlike the weighting function Wi in Galerkin method over the entire domain, the shape function Nj in the Gale&in finite element method are not alI zero on the boundary. The end terms involving fVi should be retained until the time of incorporation of boundary conditions by modification of the final matrix system.

Introducing the values of [ail] and {Bj) from equations (33) and (37) respectively into equation (30) yields:

--

1 61

1
4-8 16 -32 4 0 -8 0 0 0 0 0 0 -6 0 0 0 0 0 -4 8 2 -16 0 _ 0 0 -16

4 16 8 4 0 0 0 0 -8 -8 16 -32

0 0

0 0 4 16 4.

0 0 24 0 0 0 0 32 -16 8 -4. -6 0 0 0 0 2 0

Acknowledgement
The author is grateful for many fruitful discussions on the subject matter with Dr M. H. Baluch, Associate Professor, Department of Civil Engineering, University of Petroleum and Minerals, Dhahran, Saudi Arabia. He also acknowledges the support provided by the University of Petroleum and Minerals, Dhahran, for this research.

--

1 61

24 -36

or: -4 28 -16 0 -16 -4

'41
$2

1 61

32 -16

h = fs (38)
$4 .#5 I f4 ifSI

'fl
f2

References
1 Aziz, A. K. (Ed.). The mathematical foundations of the finite element method with applications to partial differential equations, Academic Press, New York, 1972, Proceedings of a Symposium held at University of Maryland, Baltimore, Maryland, 26-30 June, 1972 Strang, G. and Fix, G. J. An analysis of the finite element method, Prentice-Hall, Englewood Cliffs, 1973 Desai, C. S. Elementary finite method, Prentice-Hall, Englewood Cliffs, New Jersey, pp 171-187 Huebner, K. H. The finite element method for engineers, John Wiley, New York, 1975, p 112 Segerlind, L. J. Applied finite element analysis, John Wiley, New York, 1976, pp 347-351 and p 367 Zienkiewicz, 0. C. The finite element method (3rd edn), McGraw-Hill, London, 1977, pp 51-55 Brebbia, C. A. The boundary element method for engineers, Pentech Press, London, 1978, pp 25-27 Brebbia, C. A. and Connor, J. J. Finite element techniques for fluid flow, Newnes-Butterworths, London, 1976, pp 18-21 Pinder, G. F. and Gray, W. G. Finite element simulation in surface and subsurface hydrology, Academic Press, New York, 1977, pp 69-71

Introducing the boundary conditions 4, = & and @5= $2 we may write:

2 3 4 5 6 7 8 9

-1
1 ii 0 0 _o 0 -16

0
32 -16

0
28 -16

0
0 32

0 -16 0 0

Appendix
(39)

N,(e)= 1-3+2
I Nf) ,4 - 4x I Recognition of the equivalence of equations (28) and (39) establishes: (a) For Dirichlet boundary conditions, it is possible to arrive at the correct system equation without restoring to integration by parts. (b) If, however, Neuman boundary conditions are present, equation (38) does not readily provide a means of incorporating it, while equation (27) does. Thus, it appears, that ,5=22-2
I2 I

l2 12

dN$@ -=--dx d2Nc) 1 -=d.u2 dzN() 2


-=--

4x 1 4 I2
8

1 I

dx2
d2N() 3
-=-

I2
4 1

dN,(e)
-=---

4s
l2

3
1 8x

dx

dx2

dN$@ 4 dx =7-F

170

Appl.

Math. Modelling,

1982, Vol 6, June

You might also like