basic course in finite element methods

72
Computer Physics Reports 6 (1987) l-72 North-Holland, Amsterdam BASIC COURSE IN FINITE ELEMENT METHODS K.W. MORTON Oxford University Computing Laboratory, Oxford, UK 0167-7977/87/$25.20 0 Elsevier Science Publishers B.V. (North-Holland Physics Publishing Division)

Upload: swamy-nadh

Post on 28-Dec-2015

24 views

Category:

Documents


0 download

DESCRIPTION

Basic course in finite element methods

TRANSCRIPT

Page 1: Basic Course in Finite Element Methods

Computer Physics Reports 6 (1987) l-72 North-Holland, Amsterdam

BASIC COURSE IN FINITE ELEMENT METHODS

K.W. MORTON

Oxford University Computing Laboratory, Oxford, UK

0167-7977/87/$25.20 0 Elsevier Science Publishers B.V. (North-Holland Physics Publishing Division)

Page 2: Basic Course in Finite Element Methods

Contents

1. Introduction. .............................................. 3

2. Equilibrium of springs, bars. frames. beams etc. ...................... 3

2.1. Linear spring system ..................................... 4

2.2. Model of bar under axial stress ............................. 6

2.3. Uniform bending beam ................................... 9

3. Self-adjoint two-point boundary-value problems ..................... 10

3.1. Three formulations ...................................... 10

3.2. Ritz approximation using piecewise linear elements ............... 11

3.3. Numerical quadrature .................................... 15

3.4. Solution of linear algebraic system ........................... 17

3.5. Outline error analysis .................................... 19

3.6. Detailed error analysis in 1) . II (, ............................. 21

3.7. Errors in other norms .................................... 24

3.8. General boundary conditions ............................... 25

3.9. Higher order elements .................................... 27

3.10. Fourth order equations ................................... 31

3.11. General form of error analysis .............................. 33

4. Poisson’s equation in two dimensions ............................. 34

4.1. Extremum and variational principles ......................... 35

4.2. Piecewise linear approximation on triangles. .................... 36

4.3. Calculation and assembly of element stiffness matrices. ............ 38

4.4. Error analysis for piecewise linear approximation. ................ 42

4.5. Higher order elements on triangles ........................... 44

4.6. Hierarchical basis functions ................................ 47

4.7. Isoparametric elements ................................... 48

4.8. Quadrilateral elements ................................... 51

4.9. Numerical quadrature and its effect on accuracy ................. 53

5. General second order equation in two dimensions .................... 56

5.1. Extremum and variational principles for the self-adjoint problem ..... 56

5.2. Finite element approximation .............................. 58

5.3. Error analysis. ......................................... 58

5.4. Non-self-adjoint problems and Petrov-Galerkin methods ........... 59

6. Eigenvalue problems in one dimension ............................ 64

6.1. Sturm-Liouville problems ................................. 64

6.2. Rayleigh-Ritz approximation .............................. 66

6.3. Error analysis. ......................................... 6X

Page 3: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 3

1. Introduction

The literature on both the theory and the application of finite element methods is now so vast that these notes have to concentrate on the basic essentials. Even there we have to be selective as several alternative approaches to the subject are possible.

The potential of finite element methods was first recognised and realised by engineers, in the context of stress calculations. Subsequently their mathematical foundations have been thor- oughly established for wide classes of problems and they have been applied with increasing success in a great variety of fields.

What then are their key characteristics? There are five which we shall try to bring out in these lectures and notes: - (i) they make consistent use of an underlying approximation to the unknown quantities -

stresses, displacements, potentials, velocities, temperatures, etc;

(ii) these approximations are based on dividing the problem region into finite elements so that complex geometries can be handled in a standard way - in two dimensions the elements are usually either triangles or quadrilaterals which may have either straight or curved sides;

(iii) within each element a hierarchy of approximations is available to give increasing accuracy and this can be combined with element sub-division in an adaptive approximation strategy;

(iv) variational principles and other physical principles are used whenever possible to generate the equations defining the finite element approximation;

(v) these lead to a powerful error analysis which shows that the approximations are optimal in a certain sense and have important super-convergence properties.

The following typical references range from the introductory to the advanced and from the mathematical to the practical engineering and/or programming approach: -

[l] A.J. Davies, The Finite Element Method (a first approach) (Oxford University Press, London, 1980).

[2] E. Hinton and D.R.J. Owen, Finite Element Programming (Academic Press, New York, 1977).

[3] O.C. Zienkiewicz, The Finite Element Method, 3rd ed. (McGraw-Hill, New York, 1977). [4] G. Strang and G.J. Fix, An Analysis of the Finite Element Method (Prentice-Hall, London,

1973). [5] J.T. Oden and J.W. Reddy, An Introduction to the Mathematical Theory of Finite Elements

(Wiley-Interscience, New York, 1976). [6] P.G. Ciarlet, The Finite Element Method for Elliptic Problems (North-Holland, Amsterdam,

1978). Some further references on particular topics are given within the text.

2. Equilibrium of springs, bars, frames, beams etc.

We start at the origin of finite element methods in the direct modelling of simple physical structures.

Page 4: Basic Course in Finite Element Methods

4 K. W. Morton / Basic course in finite element method.7

2. I, Linear spring system

Suppose that n springs with stiffnesses k’. e = 1, 2,. . . , n are joined end-to-end in a straight line. Let external forces c;, i = 0, 1,. . . , n be applied at the nodes between the springs and at the ends and let u,, i = 0,. . , n be the consequential displacements of the nodes, with both { 6) and { U, } being directed along the line of springs from e = 1 to e = n as in the diagram below:--

nodal forces (external) F, + F, + F2 + F n--l + F, + ww+ ... --MA

element stiffnesses k’ k: ..,k”--1 k n

nodal displacements u0 + Ul + U2’ ... u II_ 1 + u,,+

We first consider the equilibrium of each spring element and then that of the whole assembly: the process may seem cumbersome for this simple system but it is representative of the approach for more general systems.

For each spring element we introduce the following two vectors, the components of which refer to the nodes of the element taken in some order:-

ae 1 vector of element nodal displacements.

qe = vector of element nodal forces (acting on the element at the nodes).

(2.la)

(2.lb)

With the ordering from left to right, as shown in the diagram, Hooke’s law that “force = stiffness x compression” yields the following relationships

(2.2a)

that is,

qe = Kea’, e=l,2 ,..., n, (2.2b)

where K’ is the 2 x 2 element stiffness matrix defined by (1.2a). These relationships correspond to internal equilibrium within each element.

For the whole assembly of spring elements we need to impose two conditions, (i) compatibility of displacements and (ii) equilibrium of nodes. The former gives for the interior nodes

r+l _ az=a, -u,, e=1,2,...,r2-1 (2.3a)

and we also write at the ends

a’=24 I 03 a; = u,. (2.3b)

Page 5: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 5

The latter requires that the external force at a node equals the sum of the forces transmitted to the elements meeting at the node; hence in a fairly obvious notation,

<= L&i,; (2.4) (e)

or, rather more explicitly,

I;I=q;+qi+‘, i=l,2 ,..., n-l (2.5a)

F,=q;, F,=q;. (2.5b)

Combining (2.2a), (2.3) and (2.5), we obtain the more familiar form for the equilibrium equation at interior node i

&=kki(u,-uUi_l)+ki+l(ui-uj+l), i=l,2,...,n-I

corresponding to the diagram:

F, + v---a

k’ k’+’

u + r-l ui + u + r+l

and at the ends we have

F,=k’(u,-u,), F,=k”(u,-z+).

Eqs. (1.6) can be combined in matrix notation as

that is,

k1 -k’ 0 . . .

-k’ k’+k2 -k2 0

0 -k* k2+k3 -k3

0 -k3

k”-‘+ k” 0 0 0 . . . 0 -k”

f,(f) = K(f)u(f).

The full stiffness matrix K cn has the three properties:

0

0

-k” k”

UO

Ul

u2

un

(2.6a)

(2.6b)

(2.7a)

(2.7b)

(i) it is symmetric, because of Newton’s third law (as expressed in Hooke’s law (1.2)); (ii) it is tridiagonal, expressing the fact that each interior node is connected through the spring

elements either side to its immediate neighbours; (iii) it is singular, because it allows a rigid body motion with no net external force since

F,+F,+ ... +F,=O.

Page 6: Basic Course in Finite Element Methods

6 K. W. Morton / Bnsic, c’ourse rn /Irlrte element nwthds

To resolve the last point it is necessary to apply hortndurv conditions. For example, we could fix the left-hand end by setting

II<) = 0. (2.8)

K, the vector

Then the first row and column of K”’ are deleted to give an n x n global stiffness nutrix

force vector F:=(F’,, Fz,.... c,)T can be arbitrarily prescribed and the displacement u:=(u,, U?,..., u,~ )T calculated from

Ku= F. (2.9)

because now K is positive definite if all the stiffnesses k’ are positive. We could of course just as easily fix the right-hand end: but if we had fixed an interior node the system would have broken up into two independent sub-systems of equations.

To formalise (2.3), (2.4) and (2.5) into matrix notation it is convenient to introduce an (H + 1) x 2 Boolean matrix L” for each element to relate the numbering of the nodes within the element to the global numbering of the nodes. Thus the first column of L" has a unit entry in the eth row and the second in the (e + 1)th row so that the compatibility conditions (2.3) can be written as

or= (L")T~'FJ, r= 1, 2..... n:

indeed L" could be defined through this relation. Then (2.4) can be written

(2.10)

F (f) _ - c L%f. (2.11)

<‘= I

Further, because ( Z_“)TL” = 12, the 2 x 2 unit matrix, we have from (2.2)

k y(r) _ __ 2 L”K’( L,‘)TU’ f)

c= I

and hence we can write the assembly of the full stiffness matrix as

K (0 = c L'K'(L')T. (2.12) e= I

These relationships seem rather formal and complicated for this simple problem but they become increasingly useful and important for more complicated systems in more dimensions.

In practice when programming the method, the information in the Boolean matrices { L") is stored in a conncctir?i<l arru~’ (say, LNODS (NELEM, 2) in the notation of Hinton and Owen 121). Thus LNODS( L. I) is the global node number of node I in element L: in the assembly process h-,‘, (the yuantity in row i. column ./ of the stiffness matrix for element e) is added to the position in the full stiffness matrix corresponding to row LNODS( r, i) and column LNODS(e. ,i).

2.2. Model of hur under axial stress

We will start by considering a composite bar, before simplifying to a uniform bar. So suppose a bar is composed of II elements. rigidly joined end-to-end, with cross-sectional areas A’ and

Page 7: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods I

Young’s moduli E’ for e = 1, 2,. . . , n: let the nodes corresponding to the ends of the elements

have coordinates x0, x1,. . . , x, before any forces are applied:-

A’, E’ A2, E2 A”, E”

0 - - . . . . . . - 1 0

0 1 I I 1 I 1 I I >

0 X0 Xl X2 X n-2 X n-l Xn X

Now suppose an external force f(x) in the positive x-direction is applied of the bar and that the resultant displacement is approximately linear element i, with nodes at xi_, and xi we have

u(x) = u,-1+ x-xx,-1 (ui-ui_l), x,_lIxIx,, Xi-X,-]

throughout the length in each element: for

(2.13a)

where ui is the displacement at node i. This can be written in matrix notation as

u(x) = xi - x x - x,-r u,-r

xi - x,-r x,-xx,_1 I[ 1 u, ’ (2.13b)

the row vector on the left being called the element shape function matrix. The strain-displace- ment equation is given by

strain ~=du/dx=(~~--x~_~)-‘[-l 11[“_‘] (2.14)

and the stress-strain relation (for linear elasticity) in each element gives

stress B= E’c. (2.15)

We make use of the Principle of Virtual Work which states that, under an arbitrary system of (virtual) displacements, the work WE done by external forces plus the work W, done by internal forces sum to zero. Denoting a virtual displacement by u(x) and supposing this is also linear in each element (and continuous between elements), the total external work is clearly seen to be

WE = /x’~(x)f(x) dx = i/“’ u(x)f(x) dx x0 1 X,-l

We can write this as a global inner product

w, = .O(f)T F(f),

where v(” = [u 0, ,..., u1 u,lT and the vector PC” = [F,, F,, . . . , FnlT has components

<= J xn+,(x)f(x) dx x0

(2.16a)

(2.16b)

Page 8: Basic Course in Finite Element Methods

8 K. W. Morton / Basic course in finite element methods

given in terms of basis functions defined by

4&4 := E X,~.X~X,,

.X,~_, IX I X , ’

i= 1.2 ,.... n-l.

X, Ix I x,+1.

(2.17)

&(x):= .I”-;-’ x,,_, Ix-lx,,. ,1 n -1

Thus each G,(X) is a “hat” function which is non-zero only between x, , and x,+ ,. If we denote by c(‘)) the strain due to the virtual displacement I!(X) and aCU) the stress arising from the displacement U(X), the internal work done by their combination, taking due account of directions, is given by

[A’E’/(s,-x,_,)][-1 l][U;’ lj = -2+C)TK(f)U(‘). (2.18) i

Here uCf) = [u,, u,, . . . . u,,]~ and the full stiffness matrix Ktf’ reduces in the case of a uniform

bar divided into equal elements of length h to the simple form

i -1 1 -1 2 . -1 . . 0

0 Q’.‘=AE . -1 2 -1

h . L 0 . -1 . . . -1 0 -1 2 1~

(2.19)

The principle of virtual work requires that W, + W, = 0 for all virtual displacements that are

Page 9: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 9

compatible with the constraints on the system. As with the spring system, we need some boundary conditions: for example, fixing the left-hand end and leaving the rest of the bar free to move requires that u0 = 0 and u0 = 0. This in effect strikes out the first row and column of KC0 to give the global stiffness matrix K and similarly reduces uCf) to II and PC0 to F. Then since

ui, u2,..., u, can be arbitrary, the principle of virtual work yields the n x n system of equations

Ku=F (2.20)

with K obtained from (2.19) and F from (2.16b).

2.3, Uniform bending beam

If w(x) is the transverse displacement of the axis of the beam and j the distance of a point in the beam from the neutral axis (i.e. the zero-strain line), the strain at that point can be written in

terms of the curvature as

d*w EXZ -y- dx2 ’

(2.21)

The flexural rigidity of the beam is defined as an integral over the cross section of the beam

EI=E J*dA, J A

(2.22)

where E is Young’s modulus. Hence we obtain

strain energy density = ~Ec: = :EI( w”)~. (2.23)

If the beam is subjected to a transverse force f(x) the total (internal and external) potential energy can therefore be written

P.E. = /[ +EI(w”)‘-fi] dx (2.24)

and we can apply the principle of minimum potential energy to obtain the equilibrium displace- ment distribution: namely, the equilibrium displacement is such that the P.E. is a minimum (taking account of any constraints etc.); a strict minimum gives a stable equilibrium. This yields a variational principle of a kind commonly sought for finite element methods. If the beam is divided into elements and an approximation to w(x) substituted into (2.24) the result will be a quadratic form in the nodal parameters defining the approximation: differentiating with respect to each of them and equating the result to zero will yield a linear systems of equations similar to (2.20). Notice however that a piecewise linear approximation to w(x) will be inadequate to define (2.24): greater smoothness is required and Hermite cubic elements would be a typical choice. We will therefore not pursue this example further at this stage.

In these three sections 2.1-2.3 we have presented three simple examples of basic engineering structures and treated each slightly differently. The first used a direct statement of equilibrium, the second the principle of virtual work and the third that of minimum potential energy. When

Page 10: Basic Course in Finite Element Methods

they are all applicable, they are equivalent: but the last is closer to the mathematical treatment we shall start in the next section.

From these simple structures, the way in which one sets up a finite element analysis of a more complicated structure should be clear. There are a number of stages which should be dis- tinguished in the overall procedure:-

(i) represent the structure by a collection of finite elements joined at nodes: (ii) find the element stiffness matrices { K”} relating nodal forces and (iii) assemble the element nodal forces q’ into a full force vector F”): (iv) assemble the element stiffness matrices into a full stiffness matrix (v) remove rows and columns corresponding to fixed nodes: (vi) solve the resultant global stiffness equations KU = F for the nodal (vii) use the displacement solution in the rows corresponding to the

displacements:

unknown reactions at these points.

K’f’.

displacements U: fixed nodes to find the

In stress anaiysis all finite element procedures have this basic form and both this and much of the terminology has now been taken over into other fields of application.

3. Self-adjoint two-point boundary-value problems

In this chapter we consider similar problems from a more mathematical viewpoint. This will be quite a long chapter as we exploit the simplicity of the one-dimensional problem to present in detail many of the special features of finite element methods.

Consider the Sturm-Liouville problem for u(s) on 0 I x _< 1.

- &iptx)gj + d+ =f(xj, (3.Ia)

where we assume that

p(x)>p”,i”>O and y(x)20

and impose the Dirichlet boundary conditions

(3.lb)

24(O) = (I, U(l) = h. (3.Ic)

(i) This is the classical formulution of the problem: with p(x) and q(.~) sufficiently smooth. for any forcing function fE CO(O. 1) we seek a solution u E C’(0, l), so that the diff~r~l~tial equation is satisfied in a classical sense. (ii) This diffe rential equation, however, is the Euler equation for the following cxtremum

principle:

Page 11: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 11

The only question here is, over what class of functions U(X) should I(u) be minimised? Clearly we need the integral to exist: that means that u’ and u should both be square integrable over the interval (0, 1). Such a space of functions is called a Soboleu space and is denoted by H’(0, 1). It is also necessary to impose the so-called essential boundary conditions u(0) = a, u(1) = b. We shall use a special notation for such a class of functions over which the extremum is sought:-

H::=(o(x)l~‘(0~*+Dl)dx<~. u(O)=a, u(l)=b). (3.3)

(iii) If u E Hk is a function satisfying the extremum principle, a variation about that function yields the variational principle (or weak form) of the differential equation: -

/I[ pu’( 6~)’ + q&u] dx = /‘f&4 du Mu E H’E,. 0 0

Here we have used the notation

H~0:=ju(x)$,1(c’2+u2)dxcm, u(O)=u(l)=O)

to denote the set of allowed variations to u, which clearly

(3.4)

(3.5)

have to satisfy the corresponding homogeneous boundary conditions. This weak form is obtained from (3.2) by noting that

I(u+Su)-l(u)=~l[pu’(Su)‘+(yu-f)Su] dx+f~1[p(Su)12+q(Su)2] dx (3.6)

and if this is to be positive for all au, then (3.4) must be satisfied. Indeed one can show fairly readily that the two formulations (ii) and (iii) are completely equivalent. Compared with the classical formulation (i), they allow for more general data functions f because they can deal with less smooth solutions. But if the data is continuous one can show that all three formulations are equivalent. However, it is the last two that are most appropriate for setting up finite element approximations.

3.2. Ritz approximation using piecewise linear elements

Suppose we use the extremum principle (3.2) but minimise over a finite dimensional functions, namely continuous piecewise linear functions with the n + 1 knots

0 = x0 < x1 < x2 < * * * -=c x, = 1

space of

(3.7)

which need not be equally spaced. We can take as basis functions the hat functions { G,(X), i =

0, 1,. . .) n } defined in (2.17) which have the property

+,Cxj> ="J' (3.8)

where a,, is the Kronecker delta function. Thus an approximation satisfying the essential boundary conditions has the form

n-1 (3.9a)

Page 12: Basic Course in Finite Element Methods

12 K. W. Morton / Basic course in finite element methods

where (3.8) implies that V( x,) = VI, i = 0, 1,. . . , n and we have imposed V0 = a, F7 = h. Such functions form the trial space

Si:= { V(x) given by (3.9a)). (3.9b)

The Ritz approximation U(x) to (3.1) is then given by the property

UE s; s.t. z(u) I z(v) VVE s;, where I( .) is given in (3.2). Hence we have

Z(U)= mm J’[;(pV2+yV2) -f-V] dx v,. --.v,, , 0

where

K, = /l[ ~(+#+)d+4 + d+#d++)] d-x 0

and

F, = ‘f(x)+;(x) dx J i=O, l,..., n.

0

(3.10)

(3.11)

j=O,l , . . . , n (3.12a)

(3.12b)

The superscript (f) stands for the full matrix and vector, as in section 2, with (n + 1) x (n + 1) and (n + 1) components respectively. However, in the minimisation only the coefficients

v,,..., v,-, may vary: so one obtains the following (n - 1) equations for the unknown vector U:= (U,, u, )...) u,_,)T :-

that is

( K’f’U’f’), = 6 i=l, 2 ,..., n-l.

Separating out and using the boundary values we have

I,- 1

c K,,U,+Ki,a+Ki,b=~. i=l,2 ,..., n-l /=I

or. in vector form

(3.13a)

(3.13b)

(3.14a)

KU=F-ak,-bk,, (3.14b)

Page 13: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 13

where k, has only the leading term non-zero,

(3.15a)

dx. (3.15b)

This form clearly shows how the extremum principle leads on to the variational principle (3.4)

with {G,, &,..., +n } replacing 6~. To evaluate the integrals in (3.13) it is convenient to treat one element at a time and go

through an assembly process familiar from section 2. We consider first an example in which the integrals for the stiffness matrix can be evaluated exactly.

Example. Suppose p(x) = p, q(x) = q with p, q positive constants. The i th element has nodes xi-i and xi so that its contribution to the stiffness matrix comes from

: J ( x’ pV2 + qV’) dx,

X,-l (3.16a)

where

V(X)= ~_,~i-1(~) + all= [vi-l(Xi-X) + ~(X-Xi-,)]/(Xi-Xi-l). (3.16b)

It is convenient to change to a local co-ordinate s which maps the element onto the unit interval:

(3.17a) x = Xi&1 - s) + x,s,

in terms of which

V/(x(s)) = 1/_,(1 -s) + I+.

Then the integration of (3.16a) gives

: 1 ( X’ pV’* + qV2) dx

x1-1

- f + kqh, I E + +qhi

I

(3.17b)

(3.18a)

(3.18b)

where we have written hi for xi - xi-i. Comparing with (3.11) we can identify the 2 X 2 matrix here as the element stiffness matrix K’. Suppose we assume equal mesh spacing, hi = h Vi, and

Page 14: Basic Course in Finite Element Methods

14 K. W. Morton / Basic course in finite element methods

impose the boundary conditions (2.2~): then the global stiffness matrix readily simplifies to the (n- 1) X (n - 1) matrix

0 . . . -1 21

The first matrix, apart from the coefficient, is the same as that obtained in (2.19) (2.20) and arises from the second-order term in the differential equation (3.19): it properly represents a physical phenomenon of stiffness. The second, however, which arises from the second term in (3.la), will often occur in vibration problems etc. and is then called the FUSS matrix. The fact that we have combined them here as the stiffness matrix results from our taking over the engineering terms and applying them in a more general mathematical context.

Before leaving this example it is of some interest to obtain the form (3.19) directly from the expansion in basis functions (3.12a). Thus it is easy to see that, away from the boundaries.

if j-C-1 or j>i+l

if j=i-1

if j=i

if j=i+l

and similarly that

10 if j<i-1 or j>i+l

J +;(x>+j(x) dx=

/

ih, if j=i-1

:(h,+h,+,) if j=i

+h r+1 if j=i+1.

(3.19)

Putting h, = h Vi and substituting (3.20a,b) with (3.12a) readily reproduces (3.19). With this equal mesh spacing, with F, defined by (3.12b) and with the boundary

from (3.15a,b) as

(k,), = (k,),,_l = - f + iqh, (3.21)

we obtain the system of (n - 1) equations (3.14b) explicitly as

(2; + :yh)u, - (f - ;qh)U, = 4 + if - +qh)u.

(3.20a)

(3.20b)

vectors given

(3.22a)

-if-aqhjc:~I+!2~+jqh)L;,-i~-~qhj~+~=I;; i=2,3,...,fl-22, (3.22b)

-($ - iq+J_, + (2; + jqh)Un_l = F,_, + (f - tqh]b. (3.22~)

Page 15: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 15

This can, in this case, be written very compactly in difference form after dividing by h, as

+ q(1 + gP)u, = t&y i=l,2 ,..., n-l, (3.23)

where U, = a, U, = b, and a2 is the usual difference operator defined by

S’Q := lJ_, - 2u, + u,,,. (3.24)

As an approximation to -pu” + qu = f, this is obvious apart from the treatment of the qu term (and the averaging of f(x)).

3.3. Numerical quadrature

For all but the simplest forcing functions f(x) the integrals / f+, dx will not be integrable exactly: and for most p(x) and q(x) the term in the stiffness matrix will similarly need approximate numerical evaluation. If we carry this out very crudely we will often reproduce a familiar finite difference approximation. For example, a one point quadrature rule gives (on a uniform mesh)

et:= /

f(x)&(x) dx = hf(xi):

if in addition we had similarly approximated

J q+i(X)+j(X) dx=hqs,j,

(3.25)

(3.26)

then (3.23) would have become precisely the standard difference approximation. However, such a crude approximation will usually lose many of the advantages of the finite

element method: this applies both to the accuracy and global properties of the numerical approximation obtained and also to the error analysis which is so natural when exact quadrature can be assumed. A variety of schemes are available to improve on (3.25) and (3.26) but those which are in commonest use, and provide a hierarchy of approximations of increasing accuracy, are the Gaussian quadrature formulae. These are based on the standard interval ( - 1, + 1) and take the form

s 1

_lg(t) d5 = CWig(Si), (3.27)

where the weights W, and the abscissae ci for the first few formulae are given in the table below. Gaussian quadrature formulae have the full accuracy that one might expect with the number of free parameters that are used: thus the m-point formula, with 2m parameters, will integrate exactly all polynomials of degree 2m - 1 and the error is O( h2’?‘).

Page 16: Basic Course in Finite Element Methods

16 K. W. Morton / BUSIC course in finite element methods

Table 1 One-dimensional Gauss-quadrature parameters

No. points Weights Abscissa(e)

1 2 0

2 1 il/& 3 g/9 0

5/9 jy 0.774597

4 0.642145 + 0.339981 0.347855 iO.861136

Because of these formulae, it is common in much of the finite element literature to use a local co-ordinate system in each element which ranges over (- 1. + 1). Thus instead of (3.17) one writes for the i th element

x = i(l -<)x,-r + :(l + Ux, (3.28a)

=x,-PM +-w*(t) (3.28b)

and

v(x(<)) = +(I - ‘gyp, + $0 + 5)y (3.29a)

= I/-p,(t) + wg5)3 (3.29b)

where we have introduced the element basis functions in terms of the local co-ordinate [ E [ - 1, + l] - see fig. 2. Note how x and V(x) are expressed in terms of the same basis functions or shape functions.

Returning to the variational integral of (3.11) one can now write using the one-point Gauss rule first of all, for the forcing function,

(3.30)

by substituting 5 = 0 into both (3.28b) and (3.29b). Introducing the notation x,_,,? for 4(x;_, + x,) and noting that F, is the coefficient of v in (3.30) we have

-1.0 1.0

Fig. 2.

Page 17: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 17

With the two-point rule this becomes

J fVdx=: i: hi(f(x,-l/2-hi/20)[t( 1-k l/fi)v,_, + :(l - l/fi)V] i=l

+f(“j_1/2 +hi/20)[+(1- l/0)1/,_, + +(l + l/fi)V,]).

As a result we have

<z+ [ (1 - wqw

+ (l + l/G)hi+

‘( Xi-l/2 - hi/2fi) + (l + l/O)hij( xi_1/2 + hi/20)

lf ( xi+l/2 - hi+l/2fij + C1 - 1/~)hi+lf(xi+1/2 + hi+l/2fi)] 1

(3.32)

(3.33)

a four-point average of f(e).

For variable CJ( e), the integral of qV2 can be approximated in the same way and clearly will involve values of q( .) at the Gauss points of each interval: we have only to replace f by q and square the values of V in the formulae (3.30) and (3.32). Thus the one-point rule gives

+ qV2dx-+ J

2 h4Xi_,/,)( Y-;+ K)2. i=l

(3.34)

Notice that this does not agree with (3.18) when q is constant because the formula is exact only for linear polynomials and has an error of U( h2). The two-point rule, however, has an error of O( h4) and is exact for any cubic, so that it will be exact for a linear coefficient q. From (3.32) after a little manipulation we have

+ qV’dx=+ J

~ hi(cl(xi_,,,-hi/2~)[(~ + l/~)~/i2, + 3V,_,V,+ (~-l/~)~‘] i=l

+4(Xi-l/2 + hi/2~)[(5 - l/~)~/i’-, + 5~,_lV, + (: + l/~)~‘]> (3.35)

which clearly agrees with (3.18a) when 4 is constant. Finally, since dV/dx = (dV/do(2/hi) is constant in interval i, we have

+/pV” dx = + 2 /;lp(dV/d~)2(2/h;) d$ = + k (V -hV-1)2 I1 p dt

i=l i=l I -1 (3.36)

and the quadrature rule is merely applied to the coefficient p. The level of approximation sought in any particular case depends on the accuracy of the basic

method and other possible sources of error. So we shall return to this question when we have carried out some error analysis for the ideal case when all the quadratures are performed exactly.

3.4. Solution of linear algebraic system

The matrix K in the linear system (3.14b) has several important properties, as we have noted earlier: it is symmetric because of the self-adjointness of the problem; it is banded because of the

Page 18: Basic Course in Finite Element Methods

1x K. W. Morton / Rusic course in fmte element methods

fact that we use localised basis functions - for example. for the piecewise linears that are so far all that we have used, it is tridiagonal; and finally it is positive definite because

(3.37)

is positive unless U = 0. This makes the system particularly we11 behaved if solved by Gaussian elimination (i.e. LU decomposition). No pivoting is needed in the el~nljnation because each principal minor of I( is also positive definite by the same argument as that above. An important point to note here is that the use of numerical quadrature must not be allowed to remove any of these properties.

For the tridiagonal system obtained in this one-dimensional problem with piecewise linear basis functions, the LU deconlpositio~ can be written out explicitly in a double recurrence known as the Thomas algorithm. Thus writing the equation as

-%Ur -1 +p,q-y,L/1+,=6, i-l,2 ‘..., n-1 (3.38)

with r/, = LC, U, = h given, the elimination gives a forward sweep of the form

E,, = 0, F, = a, (3.39a)

(3.39b

Then the backward substitution corresponds to

U,=E,&+,+I; i=n-1, n-2 ,.... 2,l (3.39c >

starting from the boundary condition U,, = h and ending with the condition CJ, = (I satisfied because of the initial conditions (3.39a) for E and F.

The symmetry of K implies that Y[_~ = a, and. although it is not worthwhile here, for more complicated problems this may be exploited by using a Choleski decompositio1~ LTDL, where D is diagonal, instead of the LU decomposition What are important, however, are inequalities satisfied by the coefficients in (3.38) because of the positive definiteness. Thus we have

P, 2 I a, I + I Y, I and /3,>0.

These imply that / E, / 5 1 Vi: for if ( E,.. 1 ( 2 1 then

(3.40)

I Y, I (3.41)

and the result holds by induction. This means that there can be no build-up of error in the back substitution (3.39~): moreover by a similar argument there can normally be no more than a mild build-up of { F, ) in the forward sweep (3.39b) since the coefficient of F, 1 in the expression for F, then has the following bound:-

(3.42)

Page 19: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 19

Thus the process is very well-conditioned as well as very efficient. When p, q and h are constants as in our example, equations (3.19) (3.22) enable us to

identify the coefficients of (3.38) as

a,=y,=;-;qh and /3!=2: +$qh (3.43)

for i = 2, 3,. . . , n - 2 with (Ye = yn_ 1 = 0. Hence (3.40) is clearly satisfied always but it is worth

noting that when

qh2 > 6p (3.44)

both (Y~ and y, will be negative. This means that all the E, will be negative and that both E; and U, are likely to oscillate in sign. This is a particular feature of the finite element approximation and will be referred to later in the sections dealing with error analysis: it does not happen with the corresponding difference equations where (Y, = yi = p/h.

3.5. Outline error analysis

The integral in the extremum principle (3.2) and the variational principle (3.4) involve the bilinear form a (. , - ) defined by

a(u, w) := [‘[ p(x)u’(x)w’(x) + q(x)u(x)w(x)] dx. (3.45) JO

We need to work with a class of functions for which this is defined: and in order to take the limits implicit in these principles we need a complete space. The natural choice is the Sobolev space H’(0, 1) already introduced in section 3.1: this can be shown to be a complete space under the norm

1

l/2

II u II H’(O.1) := d2 + u” ) dx (3.46)

Then if p( .) and q(v) are bounded and integrable, a(u, w) is defined for every pair u, w E H’(0, 1) by the Cauchy-Schwarz inequality. Under our original assumption (3.lb), a(., .) is thus a bilinear, symmetric and positive definite form over H’(0, 1) x H’(0, 1). We have also introduced, in (3.3) and (3.5) respectively, the linear manifolds of functions in H’(0, 1) which satisfy the inhomogeneous (resp. homogeneous) boundary conditions.

Thus in terms of a(. , .) the exact solution u E H’, of the Sturm-Liouville problem (3.1) is given by

a(u, w) = (f. w) VWEH&,, (3.47)

where the L, inner product ( . , .) is defined by

J 1

(u, w) := vu’ dx. 0

(3.48)

Page 20: Basic Course in Finite Element Methods

20 K. W. Morton / Basic course in finite element methods

Similarly, the Rayleigh-Ritz approximation U E Si given by (3.10) satisfies the Gaferkin equa-

tions

a(U, W) = (f, W) VWWE sgh,

whereS,h=span{+,, i=l,2,...,n-1) sothatthisis piecewise linear functions is called a conforming space

we can more generally define

S” .= Sh n H’ 0 . 4,

(3.49)

equivalent to (3.13). The trial space Sh of because S” c H’(0, 1) and SAC Hk:. Thus

(3.50)

to emphasise the fact that So” c H&. This has the important implication that we can substitute the W of (3.49) into (3.47) to obtain

a(u, W) = (f, W) VWWE sgh. (3.51)

Thence subtracting (3.49) from (3.51) we obtain the error projection property

a(u- u. W) =o WvWEs; (3.52)

which is at the heart of the error analysis: in the sense of the inner product defined by a( ., .) the error u - U is orthogonal to Sgh.

Suppose now that V is any function in Si: then

a(u-V, U- V)=a(u-utu- V. U-u+u- V)

=a(u- u, u-r/)+2&-u. u- V)+u.(U- c’, u- V)

=a(u- u, U- U)-tQ(U- V, u- V) (3.53)

with the last step coming from observing that U - V E St and applying (3.52). Because CI(. . . ) is positive definite it follows that

a(u- u, u--U)= ih;,a(u- v, u- v). (3.54)

That is, U is the closest approximation to the exact solution u of all members of the trial space, in the sense of the norm defined by a(. , .), the natural energv norm

Ij u 11 u := [ a( u, u)]“* c’ E H’(0. 1). (3.55)

This is the crucial property of finite element approximations: if numerical quadrature has to be used, it should be accurate enough not to materially affect this property; and if the method is to be extended to more general problems, this is the key property to be aimed for.

A simple example will serve to emphasise the point. Consider

-z/‘=f(x) u(O)=a. u(l)=h, (3.56)

that is p = 1, q = 0. Then for the piecewise linear approximation U, a( u - U, +,) = 0 reduces to

J ‘(z&U’)+; dx=O.

0

Page 21: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 21

That is, for the nodal errors ej := u(x;) - U, we have

e, - e,-1 ei+l - ei = 0 Xi-xi-l x,+1 -xi

because $: is piecewise constant. Since e, = e, = 0 and (3.57) can be written as

hi+l

ei = hi + hi+1 ei-l + hi

h, + h,+l ei+l’

(3.57a)

(3.57b)

we have a maximum principle and can deduce that

U, = u(xi) Vi, (3.58)

that is, the finite element approximation is exact at the nodes. However, it should be noted that this remarkable result assumes that we can evaluate the integrals J f(~)$~( x) dx exactly. Also it does not hold if p is not constant and q is not zero.

The exactness of the nodal values (3.58) is really a special consequence of the general optimal approximation property (3.54) in the case of (3.56). It can be stated in terms of approximation theory as follows: “the best fit in the Dirichlet norm [ / u’~ dx]‘12 to a function u E H’ by a continuous piecewise linear function, which has the same boundary values, is exact at the nodes”. In these terms we can also consider the other extreme p = 0, q = 1: we then obtain the best least squares fit by a continuous piecewise linear function to U; and the nodal values in this case will normally oscillate either side of u. This is the reason why, as noted at the end of the previous section, when qh2 is large compared with p the nodal values of U have a tendency to oscillate - it is a direct consequence of the optimal approximation property (3.54) and should not be regarded as a disadvantage of the finite element method.

3.6. Detailed error analysis in 11 + 11 a

For the general problem (3.1) we define the interpolant of u as follows:-

U’(X) := iU(XJ&(X). 0

(3.59)

Then for Galerkin approximation U, (3.54) implies

II u - u II c1 s II u - J II a’ (3.60)

Sometimes other comparison functions are used, but z? is the most convenient for our present purposes for we can readily establish the following approximation result.

Lemma 3.1.

For u E C’(O, 1) we have

max [x,?x,+Il

1 u’(x) - 24I’(x) I I (x,+~ - x,),Xmy l I u”(x) I /) r+l

(3.61a)

Page 22: Basic Course in Finite Element Methods

22 K. W. Morton / Basic course it7 finite element methodr

and

(3.61 b)

Proof: Consider A(x) := u(x) - U’(X) in [x,, x,+r]. It is zero at the ends and hence A’(z) = 0 for

some z E (x,, x,,, ). Note also that for linear elements A” = u”. Hence

to give (3.61a) immediately. Also the maximum of A( X) occurs at some interior point z at which A’(z) = 0: we expand A(s) at the end-point nearest to z; supposing x, is the nearest, we have

O=A(x,)=A(z)+(x,-z)A’(z)+:(s,-#A”(t), [~(x,. I).

that is,

A(z) i $(_x, -z)‘]A”(t) 1 I i(x,+, - 1,)’ max 1 u”(x) 1

to give (3.61b). This is a simple lemma which could then be used through (3.60) to give an error bound for G’.

However, it is more natural to use bounds which involve the L2 norm of U” rather than its sup

norm. We do this with the help of Fourier analysis.

Lemma 3.2.

For u such that U” E L’(0, 1) and h = max,( s,, , - x, 1,

and

II u’ - U” 11 L’ I ih I/ u” jl 1_~.

Proof In (x,, x,+ ,) we can expand

%

(3.62a)

(3.62b)

A( X) as a convergent Fourier sine series

A(x) = &,, sin 1727r(x--.~,)/(.~~,_.~ -x,).

By the hypothesis on u, this can be differentiated either once or twice and the L2 norms

evaluated to give

J “.‘A2 dx = ;(x,+, -x,)&;~;

‘8 1

(3.63a)

(3.63b)

Page 23: Basic Course in Finite Element Methods

K, W. Morton / Basic course in finite element methods 23

and

J X’+‘A’r2 dx = +(x;+~ x,

(3.63~)

In bounding the first and second by the last, the worst case occurs for m = 1. Hence we have

p2 dx = xi+l - xr uft2 dx

71

and

2 x,+1

ij u”2 dx.

x,

Summing over i and introducing h then gives (3.62).

Theorem 2.1.

If the solution u to (3.1) is such that u” E L2(0, l), h = max,(x, - xi+i) and U is the piecewise linear Ritz-Galerkin approximation to u, then

where p,, and q,, are upper bounds to p and q respectively on (0, 1).

Proof: From (3.60)

11 u - u 11; s 11 u - 22 11: = /(pk2 +qA’) ~~~P~~~II~‘II~~+~~~~I~~II~~

and the desired result follows from lemma 3.2.

If we put u(x) = a +

homogeneous boundary

-(Pu’)+q~=fo

where

(b - a)x + u(x), th en u(O) = u(1) = 0 and u satisfies conditions : -

fo(x):=f(x)+(b-a)p’(x)-[a+@-a)x]q(x). (3.65b)

(3.64)

the problem with

(3.65a)

Because we have modified u by only a linear function the optimal approximation (and therefore the Ritz-Galerkin approximation) V to u is such that u - U = u - V. Hence (3.64) applies to u - V and u” = u” but now we can obtain an a priori bound on (I u” II r~ in terms of the data function f,.

Page 24: Basic Course in Finite Element Methods

24 K. W. Morton / Basic coune in finite element methods

Lemma 3.3.

If p E C’(0, 1) and q E C(0, 1) in (3.65), assuming (3.lb), there exists a constant C, such that

II 1”’ II Ll 5 c, II hl II I,‘. (3.66)

ProoJ: This is a standard result in differential equation theory (see, e.g., L. Bers, F. John and M. Schecter, Partial Differential Equations, Interscience. 1964) but for completeness we give a simple proof. From (3.65a) we have

I, c’ = ;,,, -p’&fo)

from which we obtain by the triangle inequality

11 Cl” /I 1.2 I $- [de II fP2~~ II L’ + I P’ I max II 1” II LZ + II fo II 121 . ITIll,

(3.67)

Now taking the inner product of the equation (3.65a) with c’ we have

(fo, u) = II q1’2c, [I$ + 11 p”2d II::, (3.68)

after integrating the last term by parts and using the boundary conditions. Hence, using the Cauchy-Schwarz inequality, we have

I/ .&I II L’ I/ u II 1,: 2 II P2c1 III? + Pm,” II u’ lll?~

Also it follows by the arguments of Lemma 3.2 that

(3.69)

so that clearly both I/ q’& II Lo and II U’ I( r-’ can be bounded by some multiple of I/ .1;, I/ L:. Substituting these into (3.67) then gives the required result.

Corollorary to Theorem 3.1.

If f~ ~~(0, I), p E C’(0. l), q E C(0, 1) and assuming (3.lb), then

where f0 is given by (3.65b) and C, is as in Lemma 3.3.

3.7. Errors in other norms

(3.70)

The error bounds (3.64) and (3.70) are the most basic and follow directly from the variational principle. However, they give only Lo(h) convergence in this norm, which is best possible, and a

Page 25: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 25

natural question is whether faster convergence takes place in other norms. Also the result seems very weak compared with the special case leading to 3.58).

Suppose then we define the Green’s function G(x; x*) for problem (3.1) :-

-(pG’)‘+qG=6(x-x*), (3.71a)

G(0; x*) = G(1; x*) = 0, (3.71b)

where 6( 0) is the Dirac delta function. Then taking the inner product with the error gives

U(~i)-ul=(S(.-Xi), U-U)=a(G(.; Xi), U-U)=U(U-U, G(.; X,))

=a(~- U, G(.; x;) - v) VVVE sgh,

from (3.52). That is,

u(x;)- q.5 IIu- Ull,IjG(.; x,)-VII., W’ES;. (3.72)

Thus if G(. ; xi) can be well approximated by a piecewise linear function we shall have better than O(h) convergence at the nodes. This is called super-convergence. One example, (3.56) leading to (3.58), was the special case when the Green’s function is itself linear. Generally it will be exponential in form and one can show that an extra order of accuracy is achieved.

To obtain a bound on the L2 norm problem where u - U is the data: find

a(~, u)=(u- U, u) VUEH&.

Then choosing u = u - U we obtain

of the error, consider the following ancillary variational ZEH& such that

(3.73)

IIU- we= ( a z, u- U)=a(u- u, z)=a(u- u, z-v) VVESgh

from (3.52). Suppose we choose V to be Z, the Ritz-Galerkin approximation to z. Then we can use the error bound (3.70) twice to obtain, if we write

c,=c, -$&nax+ $&x ) [ I

l/2 (3.74)

71

II u - U 11;~ s II u - U II a II z - Z II o 2 C2h II fo II Lz C,h II u - U II ~2,

where (3.70) has been applied to z - Z with u - U as the data. Hence we obtain

II 24 - u II L* 5 G2h2 Ilfcl II L2 (3.75)

so that U is second-order accurate in the L2 norm although only first order in the H’ norm. This argument is due to Aubin and Nitsche and can be applied much more generally.

3.8. General boundary conditions

So far we have considered only the Dirichlet boundary conditions in (3.1~). Suppose now we replace the condition at x = 1 by

u’(l) + au(l) = b with (Y 2 0, (3.76)

Page 26: Basic Course in Finite Element Methods

26 K. W. Morton / Basic course rn finite element methodr

but otherwise leave the problem (3.1) unchanged. If we multiply the differential equation (3.19) by w E H’(0, l), integrate by parts and substitute from (3.76) while setting ~(0) = 0, we obtain

= /-‘pu%v dx + @u(l) - h)p(l)w(l). (3.77) Jo

The extra term at x = 1 arises from the fact that (3.76) is a natural boundary condition (rather than an essential condition as we have so far dealt with) and hence we do not set u’(l) = 0 in the variational principle. The linear manifold in which we seek a solution is now redefined as

H’, := { c’ E H’(0, 1) 1 u(0) = a }, (3.78a)

with the variations 6~ in the subspace

H’E,, := {u E H’(0, 1) ) u(O) = O}. (3.78b)

We can still define Sk := h S n Hk in terms of these new definitions. Then to write (3.77) in the form of a variational principle we define the associated bilinear form as follows :-

a(u, w) := J “‘(p U’H” + qw) dx + ~~~(l)z~(l)w(l) (3.79)

instead of (3.45). This is again symmetric and, because (Y 2 0, it is also positive definite. In terms of (3.79). it is clear from (3.77) that u E H’, is given by the variational problem:-

a(u. w) = (f, w) + bp(l)w(l) VW E HL(,. (3.80)

That is, the data for the natural condition is included in the variation principle rather than imposed on the sought after solution as for an essential condition. Correspondingly we can write

the extremum problem for u E Hk as :-

min { +a(o, 0) - (f, 0) - hp(l)r~(l)}. r’t H;

(3.81)

For the Ritz or Galerkin method using a piecewise linear trial space we have

S::= [V(x) =a+,(x) + iv+,(*)) I

(3.X2)

so that the coefficient of $,, is left free as compared with (3.9). The Galerkin equations are therefore, for u E Si,

a(U, &)=(f, +,)+@(l)+,(l) i=l,2,...,n

corresponding to the extremum problem

(3.83)

(3.84)

Page 27: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods

Either (3.83) or (3.84) leads to an n X n system of equations

21

KU= F-ak,+bp(l)e,, (3.85)

where U= [U,, U,, . . . , UnIT and e, = [0, . . . ,O, llT: k, has only the leading term non-zero as defined before in (3.15a), while K and F correspond to the KC0 and F'" defined by (3.12) but with only the first row (and column for K) deleted, corresponding to the essential condition on U,. The only other change is that K,, has an added term ap(1) coming from the last term of

(3.79). When p, q and h are constants, the system of equations is as in (3.22) except that in (3.22~) b

is replaced by the unknown U, and a final equation is added of the form

-(f-;qh)Un-I+(f ) +:qh+ap U,=F,+bp. (3.86)

It is interesting to consider this as a the differential equation with one to tial equation for ui := 24(x,),

;qhu,_, + fqhu, - F, = :hpu”.

difference equation since it combines an approximation to the natural boundary condition. Clearly, from the differen-

(3.87)

Hence from a Taylor expansion about x = 1

;(u,, - u,_r) + (iqhu,_, + fqhu, -F,) =pu’(l) + 0(h2)

so that (3.86) is an O(h*) approximation to (3.76).

3.9. Higher order elements

Piecewise linear elements are the simplest conforming elements for the second-order equation (3.1) but within each element it is possible to use approximations by polynomials of any degree, determined either by their values at interior nodes (Lagrangian interpolation) or by also using values of derivatives (Hermite interpolation). We give just two examples to illustrate the possibilities.

(i) Quadratic elements, with the mid-point as the extra node For the global expansion there are just two types of basis function, $I,( x) based on the

inter-element nodes and $.J_ r,*(x) based on the mid-points. Each takes unit value at its own node and is zero at all others - see fig. 3 below. Thus for the Dirichlet problem (3.1) the trial space Sk is made up of functions of the form

n-1

v(x) = ahdx) + b+,h) + c J’%,(x) + 5 L,2J/i-1,2b). (3.88) 1 1

Within each element these form three element basis functions: thus in the i th element N,( [)

Page 28: Basic Course in Finite Element Methods

28 K. W. Morton / Basic course in finite element methods

Fig. 3.

comes from %r(x), K(5) from &(x> and N*(6) from I,~-,,~(x) as in the sketch above. In the local co-ordinate system (3.28a), that is

these three basis functions have the forms

N,(5) := - $31 - ‘g, (3.89a)

(3.89b)

(3.89~)

and we can write in the i th element

e(‘t>> = I/I-,%(5) + K-,,2~2(8 + ww. (3.90)

The overall approximation will be a series of connected quadratic curves but with the first derivative discontinuous at the inter-element nodes just as with the piecewise linear approxima- tion. The contribution I,(V) to the variational integral (3.2) is then given by

= +[ Y-1 K-1,2 KpqLI Y-1,2 Y]‘- [vi-l c/2 Y]C (3.91)

where K’ is the 3 X 3 element stiffness matrix and F’ is the 3 X 1 element load vector. In general we shall need to use the Gaussian quadrature rules of section 3.3 to evaluate the

components of K’ and F’, especially the latter: but for constant calculate the stiffness matrix. Thus since dx/d< = :h; we have

K’ _%! *“-h _ 1

/I N,‘N; d6 + :yh,ll N,& d5 1 -1

p and q we can readily

(3.92)

Page 29: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 29

and elementary computations give for K’

Similarly if f(x) = 1, the load vector is given by

F’=+h,[l 4 llT. (3.94)

When the matrices (3.93) are assembled into the global stiffness matrix only the top-left and bottom-right components overlap, as the basis function I$([) is entirely internal. The resulting matrix is quindiagonal and corresponds to two different difference approximations to the differential equation. For the mid-point nodes, the approximation to -pu” + qu = 1 on a uniform mesh is

1P ‘h [ - Su,_, + 16u,_,,, - Sri] + &qh[ q._, + 8u,_1,2 + LJ] = :h (3.95a)

which corresponds to the straightforward differencing St,* for u” on the halved mesh. At the inter-element nodes however we obtain

1p ui_, 3h [ - 8u,-I,, + 14u, - 8q.+1,2 + q,,]

+ $qh [ - tT_l + 2q_1,2 + Su, + 2u,+,,, - u,,,] = :h.

Thus we have here a combination on the half and the full mesh

(3.95b)

giving the approximation to the derivative.

(ii) Hermite cubic elements The Lagrangian cubic element normally has internal nodes at 6 = + i : but if we move these to

the ends of the element to merge with those there we obtain double nodes. This is one way of regarding the Hermite cubic element which is parametrized by the values of the function and its derivative at the inter-element nodes. This gives a smoother C’ approximation and an approxi- mation space of smaller dimension: for the Dirichlet problem one has (n - 1) + (n + 1) = 2n free parameters rather than (n - 1) + 2n = 3n - 1 for the Lagrangian case. The global expansion, as for the quadratic case, has two types of basis function so that Sk is composed of functions of the form, for the Dirichlet problem,

n-1

(3.96)

Page 30: Basic Course in Finite Element Methods

30 K. W. Morton / Busic course in finite element methodr

Fig. 4.

The basis functions are sketched above and are determined by the properties

+,(x,> = a,,, 4:(x,> = 0 vi, j,

$i(xi) = 0, $:(xi) = 6,, Vi, j.

(3.97a)

(3.97b)

Within an element there are four basis functions (see sketch), Ni and N2 from +, ~, and +,_ , respectively and N3, N4 from $, , I/J,. In local coordinates we can deduce from element relations corresponding to (3.97) the forms

N,(5) := :(l - 02(2 + 0, (3.98a)

N,(t) := $(I + 5)2(2 - 6) = Nl( -t>, (3.98b)

N,(5) := a(1 - 02(1 + 0, (3.98~)

N,(t) := i(l + 02(1 - <) = -N,( -<). (3.98d)

Note that here we have normalised to N;( - 1) = 1, N,‘(l) = 1. Thus to keep the same parameters as in (3.96), in the ith element we have the expansion

I%(<)) = I’:_,N,(<) + +h;LN,(t) + T/IN&) + :h,l/l’N,(O. (3.99)

The element stiffness matrix is now 4 X 4 and is given in the same way as (3.91) and (3.92): again for constant p and q it can be evaluated to give for K’ the symmetric matrix

1 P 30 h,

-36 43:; 3, ;;] I $I; (/ :;I ;, :I].

For f(x) = 1 we obtain the load vector

F’= &hj[3 1 3 -11.

(3.100)

(3.101)

Page 31: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 31

When K’ and F’ are assembled, there are now two parameters in common and there is complete overlapping of the element matrices. The approximation of the differential equation on a uniform mesh for the & basis function therefore takes the form

$[-36q-r- 3hQ’, + 12u, - 36q.,r + 3hU&]

qh + 420[54u;_, + 13hqIi’, + 312Q + 54L$+, - 13MJ:,] = h

in which it can be seen that the second derivative is approximated by

6 s*L$ 1 A&J ,, 5 h2 -y*=u 3

(3.102a)

(3.102b)

in terms of the usual centred differences. For the #i basis function one similarly obtains

$-[3q_, - hq.1, + 8hq’ - 3q.+, - hq;,]

qh2 + 420 [ - 13q._, - 3hUj’, + 8hQ’ + 13Q+r - 3hLJ;,] = 0 (3.103a)

which approximates the derivative of the differential equation by the difference scheme

3 6hq - 6A& - hS2V,‘] + g [26&J -t (2 - 38*&‘] = 0 (3.103b)

in which the left hand side

We have not attempted either here or in the difference equations (3.95) to assess the truncation errors or even indeed their orders. For with finite element methods this does not bear on the overall accuracy that is attained: very often they produce two or more difference schemes of lower order of accuracy than is achieved by the overall method by means of their judicious combination.

3.10. Fourth order equations

Corresponding to (3.la) a general symmetric fourth order equation takes the form

(ru”)‘‘-(pu’)‘+qu=f on (0,l)

where we shall assume

r(x) 2 rmin > 0, p(x)20 and q(x)kO.

(3.104a)

(3.104b)

Page 32: Basic Course in Finite Element Methods

32 K. W. Morton / Busic course m finite element methods

The associated bilinear form, if we omit the effect of boundary conditions, is

a(u, w) := il( ru”w” + pv’w’ + quw) dx (3.105)

which generalises that obtained for the bending beam (2.24). For this integral to be bounded we need u, w to have square integrable second derivatives, that is, we require them to be in the Sobolev space H’(O, 1). Thus a conforming finite element approximation now needs continuity of first derivatives: and only the Hermite cubic elements of those we have so far considered is acceptable, i.e. satisfies Sh c H2(0, 1).

Typical boundary conditions, of which there needs to be four are as follows: those not involving derivatives of the highest order occuring in (3.105) are called essential; and those involving second derivatives are called natural and are not imposed on the trial space.

(9 At x = 0, we impose conditions corresponding to a clumped end in the bending beam

problem, namely

u(0) = z/(o) = 0

(ii) both of which are essential conditions. At x = 1, we impose conditions corresponding to a free& supported end, namely

u(1) = u”(1) = 0

the first of which is essential and the second natural. So we can define

H; := {v E H’(O, 1) 1 u(O) = v’(0) = v(1) = 0} =: Hi,,

and the extremum problem is

mini$se Z(v):= $u(v, v) - (f, u), I

while the variational form for u E Hi is

+, w> - (f, w> v’w E Hi<,.

Using Hermite cubits, the trial space Si = St is composed of functions of the form

n-1

(3.106a)

(3.106b)

(3.107)

(3.108)

(3.109)

(3.110)

where c#+, 4, are given as in (3.97). When p, q and Y are constant the element stiffness matrix will be of the form

rKi + pK,’ + qK,!, , (3.111)

where K; and KA are given in (3.100) and KG is readily calculated from substituting (3.98) into

8r 1 K& = -

/ 2P ’

h; -1 N;‘N;’ d< + h, ~, / N,IN; d< + +qh$ NaNB dt

-1

(3.112)

Page 33: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 33

to give

r 6 3h, -6 3hi 1

(3.113)

3.11. General form of error analysis

Suppose the bilinear form a(u, w) is defined on H”(0, 1) x H”(0, l), where m is a positive integer, and a conforming finite element space Sh is used which contains all polynomials up to degree k - 1 on each element. We can assume that k > m.

In all cases, whatever the order 2m of the differential equation or the boundary conditions, the Ritz-Gale&in approximation satisfies

a(u- U, W)=O VWWES:

as in (3.52), and hence

II u - u II a = iZdh II u - v II a s II u - u1 II n E

as in (3.54) and (3.60), where ut E Sk is generally chosen as the interpolant of For all the finite element approximations we have so far considered one can

U.

base the analysis on ur. In general however one can take as a criterion for the selection of the finite element approximation space that it satisfies an approximation property of the following kind: for every integer 1 I k and every u E H/(0, l), there is an approximation VE Sh such that

II(u- V)‘S’llL2~C~h~-SIIu(‘)IIL~, O<s<min(m, l-l), (3.114)

for some constants C,, where h = max hi. For example, it is readily checked that (3.114) holds for the quadratic elements (3.89) with k = 3 and m = 1, just as we showed in (3.62) that it holds for linear elements with k = 2 and m = 1. For the Hermite cubic elements of (3.98) we can take m = 2 and k = 4. To see this suppose, as in Lemma 3.1, that A(x) is the interpolation error on (xi, xi+i). Then

A(x,) =A’(x,) = 0, A(x;+J = A’(x,+i) = 0 (3.115)

so that if u E H4(0, 1)

~r’+‘~~,,)’ dx = _ /*‘+‘AfA”’ dx = /I”‘AA”” dx = /*‘-‘Au”” dx

x, x, X! x,

and therefore

11 A" Il&(o,l) = (A, div)) . (3.116)

Page 34: Basic Course in Finite Element Methods

34 K. W. Morton / Basic course in finite element method.s

Just as in (3.62), Ij A I/ L: can be bounded in terms of f/ il” /I L2 and hence from (3.116), using the

Cauchy-Schwarz inequality. we have

11 A” 11;~ I jl A 11 L-! II u(“) 11 I_2 i 5 11 A” II ,_2 II u(~” II L:

and hence

(3.117a)

as one case of (3.114). Then bounding 11 d’ 11 r~ in terms of 11’; II r’ as in (3.62), gives the other main case

/I (u - d) /I L? I $ /I ZP 11 1.2. (3.117b)

Thus we need look no further than the interpolant to establish (3.114) in this case. In general, then. the optimal approximation property of iJ together with (3.114) for I = k and

f = m gives

(I U - u II u I CP”’ 11 UCk) )I L: (3.118)

for some constant C. This generalises the error bound (3.64) and in particular covers all the cases considered in this chapter. Then in exactly the same way as we obtained (3.75), the Aubin-Nitsche argument can be used to obtain an error bound in the L’ norm: for simplicity we assume k 2 2m, so that for the ancillary problem we can apply (3.114) with I= 2m to obtain

11 z - Z 11 il I C,h” 11 z(2m) II Lz.

Then from an a priori inequality // z(~“‘) /I ,_z I const. // u - U j/ Lz as in (3.70), we obtain

11 II - U // Lz I C’h” 11 II(‘) f\ ,_: (3.119)

for some constant C’. That is, for a sufficiently smooth solution, U gives an approximation which attains the full order of accuracy obtainable from the degree of polynomials employed in the approximation space.

4. Poisson’s equation in two dimensions

We limit our consideration to a simple differential equation so that we can concentrate on the new issues raised by moving from one dimension to two. Thus consider first the problem

-v2u=f in !dCR’ (4.la)

with homogeneous Dirichlet boundary conditions

u=O on %I. (4Sbj

Page 35: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 35

Here G is assumed to be a bounded open region of R * with its boundary aQ locally Lipschitz (i.e. the boundary can be covered by a finite number of patches within each of which it can be defined by a Lipschitz continuous function in a local coordinate system). For example, this enables the region to have corners but not cusps.

4.1. Extrernum and variational principles

The associated bilinear form for this problem is

ah w> := /lQ(Vv) *(VW) dx dy (4.2)

which is symmetric as well as bilinear and bounded on H*(Q) X H’(Q). The extremum problem corresponding to (4.1) is as follows: because of the homogeneous boundary conditions we have Hb = Hk, given by

H&:= {u~H~(fi)lv=O on an} (4.3)

so that u E Hk is defined in the same way as in (3.2) from the extremum principle:-

mi$m$el(v):= +a(~, v) - (f, u), (4.4)

where the inner product ( . , .) is now defined by

(f, v) := /Lfv dx dy. (4.5)

A word of explanation is in order regarding (4.3): in two or more dimensions point values of u may not be defined for every v E H’(Q), as they were in one dimension. Thus (4.3) is defined by considering firstly all infinitely smooth functions which are zero outside compact subsets of Q and then taking the completion of this set, denoted by CT(G), under the norm

11 v 11 H'(Q) := v* + I v’u I *) dx dy (4.6)

This device, of taking the limit of results established with smooth functions, is very common in functional analysis and the mathematical foundations of finite element methods.

Because of the completion process one can show that there is a function u which minimises the Z(v) in (4.4) and that this lies in HL. In the same way, and as in (3.6) one can carry out variations of (4.4) and obtain

I(u+8u)-I(u)=j-j$vu)~(v8u)-f8u] dxdL.+/-/jvSul*dxdy, (4.7)

to deduce that the solution of (4.4) can also be defined from the variational principle: u E H’, such that

a(~, w) = (f, w> VWE@,, (4.8)

Page 36: Basic Course in Finite Element Methods

36 K. W. Morton / Basic course in finite element methods

To complete the identification with (4.1) we need to apply a Green’s identity to (4.8) to obtain

JJ I)(~~)*(~~) dx dy= -j-1 n(uv2~) dx dll u E H;,,, (4.9)

which, together with (4.1) will be valid only if u is sufficiently smooth. This smoothness in turn depends not only on the smoothness of the source function f but now in two dimensions on the shape of the region Q and the smoothness of the boundary aa. We shall at this stage want to assume that f E L*(Q) and that Q and as2 are such that, as with (3.66) a constant C exists for which the a priori bound holds

11 U 11 H’(Q) 5 c iI f II L’(D)- (4.10)

where

(4.11)

For example, this will in general exclude the possibility of re-entrant corners to the region, since an interior angle of (~7 could lead to u - Y ‘Ia behaviour in the corner.

4.2. Piecewise linear approximation on triangles

Suppose that Q is a convex region, so that any inscribed polygon can be exactly covered by a set of triangles: and suppose a family of such sets of triangles is parametrised by h, the maximum edge length over all the triangles. Then we are said to have a regular triangulation of Q if the following conditions hold:-

(i) each set of triangles completely covers an inscribed polygon of Q so that we can define

(ii)

(iii)

i&:=U{ACti}

with aQ2, the inscribed polygon;

(4.12)

any pair of triangles in Q;t, intersect only along a complete edge, at a vertex or not at all ~~ see fig. 5 below; if we define p”, and p’, as the radii of the escribed and the inscribed circle respectively of the triangle A, then (a) there is a constant (Y, independent of h, such that

sup (p’,/piA)<a as h+O and A=%

(4.13)

(b) for any compact set KC f2, there exists a positive 6 such that

(4.14)

These last two conditions ensure that triangles may not become arbitrarily long and thin, and that if they are made sufficiently small then Q2, can cover as large a part of !A as one wishes.

Page 37: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 37

@ O.K.

G7 not O.K.

Fig. 5.

The piecewise linear approximation space Sh on a regular triangulation is then composed of functions V( x, y) which are linear on each triangle. This requires specification of three values in each triangle and if we are to have a conforming space, that is Sj c HL, I’ must be continuous in G and zero on XL Thus if we parametrize V by its values at the vertices of the triangulation we ensure that it is continuous between triangles (being linear on the common edge) and can ensure that it is zero on aQh: then we merely have to extend it to be identically zero between afi2, and a!CZ to ensure it is continuous on all of 52 and zero on XL That is, we have Sk = Sk given by

S,h:={VEH1(Q)I V/IA islinear vAEQh; u=O on G2/tih}. (4.15)

If we number the nodes (i.e. vertices in this case) j = 1, 2,. . . , N, including those on XJh, we can introduce basis functions $(x, y) for which as usual we have

+jixl, Yi> = ‘;jT (4.16)

where Pi = (xi, y,) is the i th node. Then Gj(x, y) is a pyramid-shaped function which has unit value at Pj and decays linearly over each of the surrounding triangles which have this common vertex to zero at the neighbouring vertices - see typical configurations below. We can write, with

“; := V( x,, y,).

f’k y) = : y+,(x~ _v) (x~ Y) E ah (4.17) j=l

for every V’E Sh, and for V E Si set 5 = 0 for boundary nodes. The RayleighRitz approximation is obtained just as in one dimension: U E Sk is given by

(4.18a)

Fig. 6.

Page 38: Basic Course in Finite Element Methods

38 K. W. Morton / Basic course in fin& element methods

that is,

I(U) = (4.18b)

As with (4.4)-(4.8), this discrete extremum principle is equivalent to the variational principle, defining U through

a(U, W) = (f, W) VWWE s,h. (4.19)

Using the same notation as in section 3 we can introduce the full stiffness matrix KC” and load vector F’n which, through the substitution of (4.17) give

u( V, V) = ( v~f~)TK(fv(f) (4.20a)

and

(f, V) = ( V’f’)TF’f) VVE 9, (4.20b)

where Vf):=(Vr, I’,,..., V,)‘. From these forms it is clear that the minimisation leads to the Galerkin equations, which are equivalent to (4.19) and can be obtained from it by substituting W= $I, for each P, E ah: because of the homogeneous boundary conditions, they can be written simply as the linear system of equations

KU=F. (4.21)

If we number the nodes so that j = 1, 2.. . . , N * correspond to the interior nodes, then V:= ( Vl, V2, . . . . V.e)T, F:= (F,, F2,. .., I$*) and K is the N* x N* global stiffness matrix where

~,=(f, +,) i=l,2,....N*. (4.22a)

and

K?,=u(+,, +,) i, j= 1, 2 ,..., N*. (4.22b)

This is a convenient form for analysis but, even more than in one dimension, in practice this vector and matrix is assembled element by element which we will consider in the next section.

4.3. Calculation and assembly of element stiffness matrices

There are several possible choices for a canonical triangle and a local coordinate system: one of the commonest and simplest is that in fig. 7 below. The transformation from the global Cartesian coordinates (x, y) to the local coordinates (t, n) is an affine transformation given by the following, for a triangle with vertices r, := (x,. y,), i = 1, 2, 3 :-

(4.23a)

(4.23b)

Page 39: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 39

Y/n (X3tY3 )

(x1 tY,) 4 (X2,Y2)

)X

IL 3

1 2

(O,O) Cl,01 5

Global co-ordinates vocal co-ordinates

Fig. 7.

so defining the element basis functions Ni(6, q): the form of these functions is easily deduced from the property (4.16) which implies that the basis function for any vertex is proportional to the expression defining the opposite edge. The Jacobian J of the transformation (4.23) is clearly given by

J= a(.% Y) = x2-x1 Y2-Yl

a(#$, TJ) [ x3--1 Y3-Yl 1 from which we deduce

i.e.

1 J 1 = 2A123~

Xl Yl 1

x2 Y2 1

,x3 Y3 1

(4.24)

(4.25a)

(4.25b)

where A,,, is the area of the triangle A( r,, r2, r3).

Similarly for any V E Sh we have

V(r(L 17)) = JVfXt, 77) + JW2(5, 17) + KJ3k 4 (4.26)

in terms of the element basis functions. To evaluate the element stiffness we need the gradient of V in the global frame: but from the transformation (4.23) and Jacobian (4.24) we have

that is,

av 1 _p ax- IJI b3 -4 - (Yz -,,,$I.

av 1

q- IJI --[-(x3-x,,~+(x2-xl)~].

(4.27)

(4.28)

Page 40: Basic Course in Finite Element Methods

40

Hence

K. W. Morton / Music course in finite element methods

lf/21vV]2= ,rJ--.rl12(~~*+ ,r2-r,,*i%t)*-2(r~-rl)*(r2-rl)~~ (4.29)

and from (4.26) and (4.23)

(4.30)

Since VV is constant in the triangle, the contribution to u( V, V) is

jj-IvVl* dxd.y=A,,,IvV12= IW’1*//jJI d<dq= ;lJl IvV}’ (4.31 a L?,

giving (4.2Sb) again. Substitution of (4.29) and (4.30) into this yields the element stiffness matrix however, because of the lack of symmetry in this local coordinate system, one first has to note for the coefficient of V: that

1 r3 - q 1 2 + 1 r2 - r, 1 2 - 2(q--,)*(q-qj= lq-~l’

and for the coefficient of V,V,

-2)5-r, 1’+2( r2 - rr> l (r2 - rr) = 2(5 - r3) l (r3 - rr)

with a similar result for the coefficient of VI&:,. Then one has the simple cyclic symmetric form involving only the triangle edges:-

(4.32)

It is worth noting that for the canonical triangle itself one has

K’(canon.) = $ - 1 i: -I -;j

(4.33)

with the zero entries arising because two edges are perpendicular. Assembly of the global matrix entails relating the local numbe~ng of the nodes to the global

numbering system. In matrix notation we can introduce for each element a Boolean matrix L’ which is N X 3 in form: if in calculating (4.32) for the element, the node with position or is the i th in the global numbering then the first column of L' has a unit entry in the i th row: and in a similar way the second and third column depend on the global numbering of the nodes with positions rz and v, in (4.32). Then just as in (2.12) the global stiffness matrix can be written as a sum over the elements e= 1, 2,.... M :-

K’f’ = E L’K’( IJT, (4.34) E= 1

which is clearly N x N as required.

Page 41: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 41

Nodes : 1,2,3 . . .

Elements: 1,2,3 . . .

Fig. 8.

As remarked in section 2, to program this one holds the information contained in these Boolean arrays in a connectivity array, say LNODS(. , a) which has dimension M x 3 and in which LNODS( e, j) is the global number of the node 5 in element e. Then when Kz; has been calculated from (4.32) this is added into the global stiffness matrix at the row LNODS(e, i) and column LNODS(e, j). Indeed, one may go even further and never assemble the whole global stiffness matrix: in the frontal solution procedure (see the numerical linear algebra notes, lecture by Dr. Reid) the assembly process is combined with the solution process so that only part of the stiffness matrix is held at any one time.

As an example, suppose one has a section of a square mesh divided into right triangles as in the diagram below and with the global numbering indicated there. There are six elements meeting at node 1 and if we consider only these we have the following 6 x 3 connectivity array, or rather its transpose :-

135162 4 1 5 7 1

314617 I

In order to obtain the equation corresponding to node 1 we need only the 1st row of the global stiffness matrix and the six entries corresponding to the six elements together with their sum is given in the table below :-

element node

1 2 3 4 5 6 7

1 2 -1 -1 2 1 -1 3 1 -1 4 2 -1 -1 5 1 -1 6 1 -1

Total 8 -2 -2 0 -2 -2 0

They have been obtained from (4.33), omitting the common factor i, as follows: clearly from the first element, where the local numbering corresponds to the global numbering, we just take the first row of (4.33); for the second, we see from LNODS that LNODS(2, 3) = 1 so that it is the

Page 42: Basic Course in Finite Element Methods

42 K. W. Morton / &sic course in fitllte element methods

3rd row of (4.33) that is used and - 1 goes into column LNODS(2, 1) = 3 while 1 goes into column LNODS(2, 3) = 1; and so on for the rest of the elements. Multiplying the total by i one obtains in stencil form the familiar five point difference operator

-1 -1 4 -1

-1

because the “diagonal nodes” 4 and 7 have no entries. Finally, we note that the load vector F”’ is built up in the same way. Thus we have

contributions of the form

(4.35)

there being three from each element, corresponding to i = 1, 2. 3: these are added into the entries of F’n at the rows equal to LNODS( e. i). In general. of course. they will need to be approximated by quadrature formulae which we shall discuss in section 4.9.

4.4. Error analysis for piecewise linear approximation

From (4.8) and (4.19) because we have a conforming approximation so that S,” c Hr;,, and we can substitute W into (4.8). we have the error projection property

a(u- U, W)=O VWWES:. (4.36)

where we have assumed for the present that (,f, IV) is evaluated exactly. This means as usual

that

(4.37)

where II u 11,’ := a( u, u). Our assumption that f E L’ and that (4.10) holds ensures that u is smooth enough for its piecewise linear interpolant U’ to exist and we use this as the comparison function in (4.37).

On each triangle we can expand any smooth function M in a Taylor series about a point q,.

u(r) = z&) + (P rO) l vu(r,) + R, (4.38)

where R is the remainder. If h is the length of the largest side, then R = 0( h’) for any triangle. But since clearly u - ui = R - R’. we need a bound on V( R - R’) and this will depend on the shape of the triangle. For example, consider the triangle in fig. 9 and R = x2. Then

R’=t 1_ 2Y 4 i h tan B

and a,.(R- R’) = &

which is Co(h) only if 8 is bounded from zero. This is the reason for the regular triangulation condition of (4.13): under these conditions one can establish that there is a constant C such that

II v(u - J) II LZ(ci) s Ch 124 I Z,Q? (4.40)

Page 43: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 43

c------ h

Fig. 9.

where 1 . ) 2,a is the semi-norm part of (4.11) given by

Establishing (4.40) on each triangle and hence on a,, requires series argument given above: then extending the result to all of skin 52/Q,, has measure 0(h2).

As a result of (4.37) and (4.40), and using also (4.10), we can C, and C, such that

Ilu - u Ilo 5 C,hlul2,a s WI f II LVZ).

(4.41)

some refinement of the Taylor Q depends on the fact that the

deduce that there are constants

(4.42)

This is the basic error bound. From it one can deduce an error bound in the L2 norm by the Aubin-Nitsche argument, just as in section 3.7: the ancillary problem for z with data u - U is exactly as in (3.73) and if Z is its piecewise linear Galerkin approximation we have, as there and using (4.42), that

(IU- Ullr$=a(u- u, z-z)

5 C,h II f II LZGh II u - u II ~2 so that

II u - U II Lz s C,zh* II f II LX (4.43)

and we have second-order accuracy in this norm. On the other hand, the superconvergence results are rather different in two dimensions from

what they were in one. The argument regarding the error at the nodes breaks down because the Green’s function has the logarithmic form In ) r - r* I: this is unbounded and not well approxi- mated by piecewise linears. In fact the accuracy at the nodes is only U( h2) as it is for the L2 norm, although the constant may well be smaller.

However, for a Poisson problem there is generally less interest in the solution u, which represents a potential, than in VU which represents a field. This is approximated by a piecewise constant in the present case and, as indicated by (4.42), is generally only first order accurate. There may, however, be points of superconvergence at which the order of accuracy is higher. Indeed, one can show that if u E H3( 52) if the mesh is fairly regular and if in particular there are always six triangles meeting at each node (which there has to be on average), the midpoint of each edge is a point of super-convergence. More precisely, the derivative along the edge and the mean of the normal derivatives either side of the edge give second-order accurate approximations

Page 44: Basic Course in Finite Element Methods

44 K. W. Morton / Basic course in finite element methods

to the gradient at the midpoint (Lin Qun and Lu Tao, J. Cornp. Math. 1983 and Levine, I.M.A. 9. Numer. Anal., 1985).

4.5. Higher order elements on triangles

(i) Quadratic elements. Continuity between elements is assured if the quadratic variation along the common edge is shared, and this is so if there are three common nodal values on the edge. Thus the midpoints of each edge are taken as nodes: this gives six nodes in each triangle, the values at which completely determine the quadratic form within the triangle, a1 + a2x + a3y +

u4x2 + a,xy + a,y2. We can use the same affine transformation from global to local coordinates as in the linear

case, namely (4.23a). Then suppose the nodes are numbered as in fig. 10. One can deduce the form of the element basis functions as follows: Ni( 5, 17) has to be quadratic in form and zero at nodes 2-6; these lie on the two lines 2, 4, 3 and 5, 6 so taking the product of the expressions defining these lines and scaling so that N,(O, 0) = 1 gives N,(t, 77). In this way we obtain the set of basis functions

and can write in this element

where the nodal parameters { V,} are the values of V(r) at these nodes. One therefore has, in the element,

$=(4~+4~-3)C;+(4<-l)V,+4q(V,-&)+(4-8<-4q)V,;

5 =(4<+477-3)V,+(4n-1)v3+45(Vq- v,)+(4-45-8n)I:,

(4.46)

and substitution into the relation (4.29) for 1 VP 1 2 enables the element stiffness matrix to be computed. This computation involves the integration of ( aV/ao2, ( ~I’,GIYI)’ and (in general but not for a right-angled triangle such as the canonical triangle) the cross product (aV/X’)( ~V/%J)

n \ 3

1‘\. 5 4

1 6 2 75

Fig. 10.

Page 45: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 45

Fig. 11.

over the canonical triangle. Such elementary integrals of quadratic expressions can be carried out analytically, but rather tediously: it is probably simpler and preferable to use a quadrature formula which is exact for quadratics and applicable to more general problems - see section 4.9. There are plenty of program packages available which incorporate routines to deal with this element.

It is instructive, however, to note the global stiffness matrix form on a regular square mesh divided into right triangles. When V(r) is expanded in terns of global basis functions it has the form

1 N+l

(4.47)

where as before j = 1,. . . , N refers to the vertices with basis functions +Fv and we have labelled the edge midpoints j = N + 1,. . . , N + A4 with basis functions $I:“. On the square mesh I+Y has support over six triangles as in the case of linear elements while the @” have support over only the two triangles which share the common edge: in fig. 10 we have labelled the neighbouring nodes for each type of basis function in compass point notation. In terms of this notation we can write out the Galerkin equations in the form of difference equations. We have the following set for Laplace’s equation, that is for f = 0. Just as with the linear elements the equation correspond- ing to a vertex simplifies considerably with a right triangular mesh to become

4U, - $(u* + u, + u, + U,) + f(u, + us + UE + uw) = 0. (4.48a)

For the midpoint of a diagonal edge and of a vertical or horizontal edge it turns out that one has the same difference scheme, despite the different shapes of support for the basis functions, namely

Qu,- 4(u,+ us+ ue+ u..)=O. (4.48b)

An important feature of these equations is that, considered individually, as difference approxi- mations to Laplace’s equation, they are each only second-order accurate. Yet in combination, even on a non-uniform mesh, they give third order accurate values for U, as we shall see below: indeed, one can show that on a uniform mesh they give fourth order accuracy.

Page 46: Basic Course in Finite Element Methods

46 K. W. Morton / Basic course in finite element methods

(ii) Hermite cubic elements. A general cubic on a triangle is defined by ten parameters and, to ensure continuity between triangles, four of these parameters should be associated with each edge. This leads naturally to specifying V and VV at each vertex, so that for each edge the function value and the tangential derivative at the two ends completely specify the common variation along the edge. Note, however, that the normal derivative has a quadratic form along the edge so that specifying its values at the two ends is insufficient to guarantee C’ continuity between elements - unlike the situation in one dimension. Specifying V and VV at each vertex fixes nine parameters in each triangle: the tenth is usually taken to be the function value at the centroid. We number the nodal parameters in the canonical triangle as in fig. 12 below.

Using again the affine transformation (4.23a) to the canonical triangle, we obtain the element basis functions in the following way. The centroid basis function has to be zero and have zero gradient at each vertex, which implies that it has to be identically zero on the perimeter of the triangle: scaling to unit value at (f, 5) then determines it as

~~(6, 77) = 276~0 - 5 - 77). (4.49a)

For vertex 1 the basis function Nr has to be zero along the hypotenuse from vertex 4 to vertex 7 and to make sure that it is zero at the centroid we write it as

where Q(c, n) is a quadratic form still to be determined. However it is clear that it can be taken as a function q(t) of t = 5 + q, for then (1 - t)q( t) can be determined to satisfy the function and derivative conditions at t = 0, 1 which correspond to those at the vertices. This implies that q(0) = 1, q’(0) = 1 and q(1) = 0 and hence we have

&(6, 17) = (1 - 5 - n)$ + 2< + 277) - 75170 - 5 - 77). (4.49b)

The basis function for the &derivative at vertex 1 clearly contains a factor ((1 - < - n) and that for the n-derivative n(1 - 5 - q), because they have to be identically zero along two sides of the triangle. Applying the derivative conditions on the third side plus the condition at the centroid determines the remaining linear factor to give

&(L 77) = 50 - 5 - 7710 - 5 - 217) (4.49c)

ML 17) = 170 - 5 - 17)(1 - 25 - 17). (4.49d)

The remaining basis functions can be determined in a similar way.

II 7,8,9

.

1’0 c

1,2,3 4,5,6

Fig. 12.

Page 47: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 41

Within the triangle and in terms of the & and q-derivatives of V we have the local expansion

I+(-$, 77)) = c,yJy&, 77) + c&qjy& 111 + wtJq&(L SL (4.50)

in which C, runs over (Y = 1, 4, 7, 10, C2 runs over (Y = 2, 5, 8 and C, runs over (Y = 3, 6, 9. Here, the local gradients (a,V, a,V) at each vertex have to be given in terms of the global gradients VP’ at the vertex through the Jacobian transformation (4.27), which we recall is constant over the triangle and is therefore the same at all three vertices. This then determines V(v) at any point in the element in terms of the global parameters. For the stiffness matrix we need VP’ at points in the element and this needs application of J-i to the whole expression (4.50) when it has been differentiated with respect to E and 17. We give that part of the resulting expression which depends on the three nodal parameters at 6 = 0, 11 = O:-

(4.51)

As with the quadratic elements, products of such expressions have to be integrated over the triangle to obtain the stiffness matrix.

4.6. Hierarchical basis functions

The basis functions given in section 4.5 are not the only possible choices: they have the advantage that the multiplying parameters equal the value of the function (or its derivatives) at a corresponding node; but there are other advantages to retaining the linear basis functions and then adding to them if one wants to go to higher order. There is clearly some advantage for a general computer package which allows the user to choose the order of his elements in a flexible way: it may even be possible to take advantage of some of the setting up of the stiffness matrix previously done with lower order elements when considerations of accuracy lead to a change to higher order elements. However a more substantial advantage which is often claimed is that the resulting stiffness matrices are better conditioned.

To illustrate what is involved, we consider only a system equivalent to the quadratic basis functions of (4.44). Suppose we use the notation NIL, NzL, N3L for the linear basis functions defined in (4.23). Then an equivalent basis is obtained by adding only the last three basis functions, corresponding to the mid-edge nodes, which we will denote by NdQ, Np, NR: for we see immediately, using the same notation for the other basis functions of (4.44)

NiQ = NIL - +Np - +NeQ, Q L N2 = N2 - :NeQ - $NdQ, Q N3 L = N3 - +NdQ - +N,Q. (4.52)

If we expand V(r) in terms of the new basis, in the form

Page 48: Basic Course in Finite Element Methods

48 K. W. Morton / Basic course in finite element methods

we can easily check that using { V, } in the first sum is justified and that, for the parameters in the second sum, comparison with (4.45) gives

V4=Q4+:(V2++& &=Q5++(P’i+VJ, Vb=Q6+:(V,+VZ). (4.54)

In vector and matrix notation suppose we write the equivalent sums (4.45) and (4.53) as

( NQ(S, 17))Ty= (NH@, q)JTVH, (4.55)

where { NaH, (Y = 1, 2,. . . , 6) are the hierarchical basis functions in (4.53) and { V,“, CY = 1, 2,. . . ,6}

the corresponding parameters. Then (4.54) gives the relation

v= RVH. (4.56a)

where

(4.56b)

and I3 is the 3 X 3 unit matrix: and similarly (4.52) implies

NH@, 17) = RTNQ(5, 17), (4.57a)

so that (4.55) is satisfied. This also enables us to transform the element stiffness matrix Ko for the form (4.45) to KH, that for the hierarchical form (4.53): thus from (4.56a) and

VTKQV= ( VH)TKHVH,

we deduce that

KH = RTKQR (4.57b)

in terms of (4.56b).

4.7. Isoparametric elements

The error analysis for the higher order elements relies in the interior on a general approxima- tion theorem: if the triangulation is regular and if Sh includes all polynomials of degree less than k on each triangle, then for s = 0, 1,. . . , k - 1

I#-U’I s,D, s ,shk-’ 1 u 1 k,Cl,, (4.58)

as in (3.114). However there are difficulties in maintaining this increase of accuracy with k when 52 # Q,. With linear elements, extending V E Sh to be identically zero in 52 - ti2, with meas.( !G! - a,) = Lo( h2) and 1 VU 1 bounded, meant that the energy error )I u - ur 11,’ was still 0( h2) when the skin was ignored: but we cannot achieve an energy error 0(h2’kp”) for k > 2 without treating this skin more carefully. Moreover, extending V E Sh to be zero in Q - ah clearly implies ur @ Sh in the quadratic and cubic cases.

Page 49: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 49

n 3

L

4

1 2 5

Fig. 13.

There are several ways of overcoming these difficulties but the most natural is to use isoparametric elements to give curvilinear triangles near the boundary: indeed, one need consider only triangles with a single curved side. The essence of the isoparametric element is to use the same type of approximation in the transformation between local and global coordinates as in approximating 24.

(i) Quadratic elements. For a triangle with a single curved side one need introduce only one extra node, which one would normally choose to be on the boundary i3Q as fig. 13. We have labelled the extra point r,, consistent with the numbering in the general case, and it is most convenient to use the hierarchical system (4.53). Then we have the transformation

r(5, 71) = (1 - < - n>rl + 5r2 + nr3 + 4Enq4 (4.59a)

= rINrr.(5, 77) + rl&L(t, 1,) + r3NjL(t, 77) + 4,KQ(5, 77), (4.59b)

which generalises the affine transformation (4.23) by the addition of one quadratic basis function from (4.44). The nodal parameter vector q4 is determined by the fact that r, is mapped into 5 = 77 = : and, consistently with the first equation of (4.54), we have

q4 = r, - f(r2 + r3). (4.60)

The Jacobian J for this transformation is linear in 5 and n: writing r, = (x,, y,) and q4 = (s4, t4) we have

J= b2--1)+4%17 [

(Yz-Y1)+%7) (x3-x1)+%5 b3-_h)+%t 1

from which we obtain, as in (4.25a)

(4.61)

i

Xl Yl 1

( J 1 = det x2 + (4x, - 2x2 -2X3)77 Y2+ (4Y4-2Y2-2Yh 1 .

I

(4.62)

x3 + (4x, - 2x, - 2X,)< Y3+ (4Y,-2Y,-2Y,)t 1

As with (4.25b) this can be expressed in terms of triangle areas, but now needs some expansion of the terms in the determinant: the result is

1 J 1 = 2A123 + @%24 - 4A123)t + @434 - 4A123h* (4.63)

Page 50: Basic Course in Finite Element Methods

50 K. W. Morton / Bn.r~c, course 111 finite rlenzent methods

To ensure that the transformation (4.59) is non-singular. that is 1 J 1 # 0 in the whole triangle, it is clearly sufficient to show that 1 J 1 > 0 at the three vertices. This requires that

A 124 ’ iA, and A,,,> 6A121. (4.64)

Roughly speaking, this means that in choosing the location of r4 to fit the boundary as accurately as possible one must ensure that it is in the central half of the arc from r, to c~. It is clear from (4.60) that if the boundary is straight r4 should be taken as the midpoint of rzr7 so

that (4.59) collapses to (4.23).

(ii) Hermite cubic elements. Again we consider a triangle with a single curved side. Thus. in the notation we used earlier for the Hermite cubic element, the only nodal parameters that we should use are 1, 4, 6, 7, 8 and 10 because 2, 3, 5 and 9 correspond to derivatives along the & and ,q-axes. Considering how we derived the form of Nz and Ni in (4.49b,c) it is clear that N6 and N, have a factor 5~ like N,,, in (4.49a), so that any linear combination of N6, N, and N,, can be written as <q( a + b< + CT). It is also useful to work again with hierarchical basis functions so that we use the usual linear basis functions for the function values at the vertices: hence it is convenient to retain the numbering and notation of the linear and quadratic cases and denote by rl, 3’~ and r3 the position of these vertices. Gathering all this together we have as the appropriate generalisation of (4.23) and (4.59)

r(5, 11)=(1-~-17)r,+5r?+77~+4~77(44+~qs+~6). (4.65a)

This is still more general than is necessary: it is reasonable to try to match the tangent to aL? at rz

and q and for the transformation to collapse to (4.23) when these are parallel to the r2r3 line; also one leaves the transformation to be linear along this line. The result of these simplifications is

45, 77) = (1 - 5- q)r, + 5r2 + 175 + t77(K25 + K38)(2rl - r2 - 5:), (4.65b)

where K~, K~ are the proportional distances along the line from the midpoint i( r2 + ~~3) to r1 that the tangents to ati at r2 and r3 cut this line. A straightforward calculation gives for the Jacobian

I J I = A& - t(t + 2d’Q - d% + d’%] (4.66)

so that the transformation is non-singular if K,. K~ < 1.

\ .’ f (r2+r3) & .’ I- ‘- ----

. . . . r2

_’ :1

Fig. 14.

Page 51: Basic Course in Finite Element Methods

K. W. Morton / Busic course in finite element methods 51

To carry out an error analysis with isoparametric elements is beyond the scope of these lectures: but it has been shown by Ciarlet & Raviart (Comp. Math. in Appl. Mech. and Eng., 1972) that, for a smooth boundary, interpolation of essential boundary conditions on the approximate boundary enables the optimal order of accuracy predicted by the interior estimates to be achieved. In practical computations the improvement in accuracy is often dramatic. However, since J depends on (E, n) and J-’ is involved in calculating the stiffness matrix, numerical quadrature becomes essential - see below.

4.8. Quadrilateral elements

These are often preferred to triangular elements, particularly by engineers, partly because of their simpler generalisation into three dimensions. Rectangles and squares are important special cases which give schemes linking more directly with difference methods. The highly structured mesh that one obtains in this case, and also if it is smoothly transformed by a global co-ordinate transformation into quadrilaterals, makes data and program organisation much simpler and opens the way to using powerful multigrid techniques for solving the systems of algebraic equations. (See the lectures on Numerical Linear Algebra by Dr. Reid)

The definition of a regular subdivision of G into quadrilaterals can be given in terms of that for triangles by merely drawing diagonals to the quadrilaterals: that is, one excludes non-convex quadrilaterals and draws both diagonals.

(i) Bilinear elements. Used on a rectangle, these form the simplest elements of this class. If the sides are parallel to the (x, y)-axes the functional form in the interior will be a, + a2x + a,y + a,xy. The four parameters are taken as the function values at the vertices and this ensures continuity between the elements since for fixed x or y the function is linear in the other variable.

In general quadrilaterals are best dealt with by an isoparametric transformation to a canonical square, (- 1, 1) x (- 1, 1) in the local coordinates (5, n), as in fig. 15. The four element basis functions can be written down immediately:-

Y 54

IQ

z3

ri

r2 I .x

C-1,1) , h

rl (l,l) 4 30

)5

1 2

(-1,-l) 0

(1,-l)

Fig. 15.

Page 52: Basic Course in Finite Element Methods

52 K. W. Morton / Busic course in finite element methods

Note that they are just the tensor products of the one-dimensional basis functions (3.28). Then the isoparametric transformation is

(4.68)

Note that the coefficient of (77 here is (q - r4) - ( r2 - rl) which is zero when the original quadrilateral is a parallelogram: in this case (4.68) reduces to an affine transformation as for the linear triangular element.

The Jacobian of the transformation will have entries which are linear in [ and n and indeed its determinant is also linear in 5, 77. We write J in terms of the row vectors Ye:

(4.69)

and it is because the coefficients of < and 77 here are equal that 1 J 1 is linear. Thus we need calculate it only at the four corners, denoting the values by 1 J 1 1 etc. In the usual way we find

lJl,=b%m IJI,= t&,, . . . . (4.70)

Thus I J 1 > 0 for any convex quadrilateral. As with any isoparametric element, we expand a member of the approximation space within a

quadrilateral in the form

(4.71)

with r( 5, 7) given by (4.67). Because the Jacobian is not constant, the bilinear variation in (5, q)

is not necessarily reflected in a similar variation in (x, r). However, along each edge r varies linearly (so that the quadrilateral has straight edges) and so does V, so that continuity is ensured. To obtain the stiffness matrix one has to differentiate (4.70) with respect to < and 17 and use the inverse Jacobian transformation (4.27) to obtain VI/. Note that this will lead to rational functions of 5 and 77 so that analytic evaluation of the integrals is generally out of the question.

Bilinear elements give a very similar level of approximation to that obtained by linear elements on triangles. Generally their theory is somewhat more complicated because of the isoparametric transformation: but there is one respect in which it is simpler, for Zlamal (Math. Comp., 1978) has shown that the gradient VU is second-order accurate when sampled at the centroid of each element so long as the distortions from a uniform mesh are not too great. This superconvergence is much used in engineering computations.

(ii) Biquadratic elements. These will normally be used with a sub-parametric (i.e. bilinear) transformation from global coordinates to the canonical square in the interior of the domain with the isoparametric transformation, similar to (4.59), used to obtain one or more curved sides at the boundary. We consider only the interior elements. Then the linear variation along the sides of the canonical square ensures that midside nodes are carried over from the (6, ~7) to the (x, .v)

Page 53: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 53

v Fig. 16.

plane, as well as the origin carried into the centroid. We number the nodes as in fig. 16. AS in the bilinear case the element basis functions are tensor products of those in one dimension - see

(3.89). Thus

&(5, 77) = [ - :w - <)I[ - :a - 41 = M1- m - 17) (4.71a)

and so on for N2, N3, N4; while for the midside nodes

&(5, 77) = (I - P)[- MI - 17)l = -Ml - E2>(I - 77) (4.71b)

and so on for N6, N,, Ns with the centroid giving

&(5‘, 11) = (1 - t2)(1 - n2). (4.71c)

Very often the centroid node is omitted, giving the so-called serendipity element. In any case, in the elimination process all the centroid variables V, would be eliminated first before assembly of the global stiffness matrix, an inexpensive process called static condensation.

(iii) Hermite bicubics. Again these will be used in the interior with a bilinear transformation from global rectilinar quadrilaterals to the canonical square. The basis functions are tensor products of the one dimensional basis functions given in (3.98) giving sixteen in all. The corresponding parameters are I’, aV/ax, aV/ay and a2V/ax ay given at the four vertices. Clearly even more care than in (4.51) is needed in transforming VI’ to obtain the stiffness matrix. However, the one great advantage of this element holds only on rectangles, for which the transformation is greatly simplified: the Hermite bicubic on rectangles is the only element we have presented which has both V and VV continuous between elements. Hence it is the only one that can be used to give a conforming approximation to fourth-order problems, where we need Sh E H2(s2).

4.9. Numerical quadrature and its effect on accuracy

As has been mentioned at various points in the last few sections, it will often be necessary (and when not necessary sometimes convenient) to use numerical quadrature to evaluate the entries in the stiffness matrix as well as those in the load vector. This is particularly true when isoparametric elements are used: for, as we have seen in (4.27) and again in (4.51) obtaining VI’ from the derivatives with respect to 5 and n in the local coordinate frame involves the inverse of

Page 54: Basic Course in Finite Element Methods

the Jacobian; since with the isoparametric elements this will usually be non-constant, the basic integrals will involve rational functions in < and 77 for which an analytic expression may not be available.

The quadrilateral elements are mapped into the canonical ([, q)-square ( - 1, 1) x ( - 1, 1) so that we can immediately use the Gaussian quadrature formulae of section 3.3 in tensor product form. The order of accuracy is that given in table 1 of that section. For the canonical triangle there are special two-dimensional formulae that have been devised to give various orders of accuracy - see for instance p. 184 of Strang and Fix, where formulae which are symmetric in the area coordinates of the quadrature points are given. One of the simplest examples uses the three mid-points of the edges and is exact for all polynomials of degree two: on the other hand another which uses the centroid together with three symmetrically placed points is exact for polynomials of degree three. The most accurate formula given uses thirteen points and is correct for polyno~als of degree seven.

The whole theory of integration formulae in two dimensions is much less developed and coherent than the Gaussian theory in one dimension. Thus the examples give above should be compared with the observation that exact integration of polynomials of degree p imposes l( p + l)( p + 2) constraints on a formula which, if it uses m arbitrarily placed points, has 3nz free parameters: that is 3, 6, 9. 12, . _ . parameters are available for satisfying 1, 3, 6, 10, 15, 21, . . . constraints. It is seldom that an exact match of these two numbers is achieved even when it might seem possible: an exception is the seven point formula which achieves the optimal order of accuracy of five. However the development of finite element methods has given this field considerable stimulus and even for quadrilaterals a number of new formulae have been proposed to compete with the product Gaussian formulae.

Let us now consider what accuracy is needed to maintain convergence as the mesh is refined and what is needed to maintain the order of accuracy achieved with exact integration. Strang and Fix (pp. 181-192) summarises the situation as follows. Suppose that numerical quadrature and any other approximations, such as those at the boundary when curved isoparametric elements are used, mean r? E S,h is obtained from the equations

a@, W>=,“(W) WVES:, (4.72)

instead of U given by (4.19). Here ,” W) is a linear functional of IV obtained by approximating the integral (f, IV) and a”(. , .) is a bilinear form, which we assume is still coercive, obtained by approximating the entries in the stiffness matrix. Then defining 1( IV) := (,f, IV), we have

CT@, U- 6) -n(u, u- ti) = (r”- ,)(U- fi)

and hence

c(u-- 6, u- fij = (G- aj(u, u- ti) - (II- /)(u- U) in a fairly obvious notation, which leads to the following result.

(4.73)

Theorem 4.1.

Suppose that a”(. , .) is positive definite and that

[&u)(U, w)/+I(tl-f)(W)I__<Ch”IW/, VWES,:. (4.74)

Page 55: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element method 55

Then the errors due to these approximations to a(. , -) and 1( 0) are bounded by

11 U- 0 11~ I Chp. (4.75)

Proof. We have only to substitute IV= U- c in (4.74) and apply (4.73). So far as quadrature errors are concerned, the essential parameter is the degree n such that for

all polynomials p, of this degree we have

u”(p,, w) = a(p,, w) VWE s;. (4.76)

For n 2 1 we will have convergence: and for n 2 k - 1 we can maintain the order of accuracy achieved with elements that include all piecewise polynomials of degree less than k. To see how these deductions follow from Theorem 4.1 we consider first a typical term in (a - C)( U, IV): let D denote a derivative with respect to x or y and, looking ahead to the next chapter, let us introduce a coefficient c( x, y); then we can write a typical term as

Jl cb> y)(Du)(DW) dx dy - &v(P,) (“U)(P,) (DW)(P,). 0. (1)

However, if (4.76) holds then for any polynomial p,_ 1 of degree n - 1 we can rewrite this term, in an abbreviated notation, as

m cDU-p_i]DWdx dy- CW,[CDU-~,~_~];(DW),. D (0

In each element we can choose p,,_ I so that the difference in square brackets is 0( h”) provided CVU is sufficiently smooth, which will be so if the data for the original problem are sufficiently smooth. Hence this is the order of accuracy achieved in (4.74) for this term. Now let us consider a typical (I - T)(W) term: and suppose that the derivatives of WE S,h consist of all polynomials up to some degree q so that (4.76) implies that all polynomials of degree q + n - 1 are integrated exactly. Then we can write

u-m9 = jjJ/w-P,+J dx dY - cw,[w-Ppq+,I-l],~ (1)

where the polynomial pyinmm I can be chosen to give an error of 0( hq+“) multiplied by derivatives up to this order of fw. Only q + 1 of these derivatives can apply to IV, each one of which introduces a factor h- ‘. Hence the error will be of the order, assuming f is smooth enough,

@(hq+” II J+‘II q+i) = O(h” II W II a>.

Thus when (4.76) holds then we can take p = n in Theorem 4.1 and the deductions we have made above follow.

Let us finally consider how these results apply to particular cases. Even for the simplest problem -u” = f it is clear h t at if I, E Sh may be any polynomial of degree k - 1 in each

Page 56: Basic Course in Finite Element Methods

Sh K. W. Morton / Basic COUY.~ in finite element methods

element, the positive definiteness of a”( +, +) requires that at least k - 1 quadrature points are used in each element: otherwise there will be a non-trivial polynomial I*’ of degree k - 2 which is zero at every quadrature point and hence gives no contribution to u”( Y, V). This is clearly a general and minimal requirement. As regards accuracy (and convergence), for linear elements on triangles if we wish to retain an error bound of the form (4.42) it is necessary to satisfy (4.76) with n 2 1, which can be achieved by a single quadrature point as needed for the positive definiteness, and arbitrarily placed because the integrand is constant: however, to keep close to the optimal approximation, an extra order of accuracy is desirable and that can be achieved by taking the quadrature point at the centroid of the element. Similarly for quadratic shape functions on triangles, maintaining the order of accuracy requires n 2 2 in (4.76): this implies a quadrature formula of second-order accuracy since both VP,, and VW are linear: thus the formula using the mid-points of the edges could be used, but a third order formula may be preferable.

On quadrilaterals the requirements are more severe since o W in (4.76) will have some higher order terms and at least the bilinear co-ordinate transformation (4.67) is needed to transform to the canonical square. It turns out however the first-order quadrature is sufficient with bilinear elements both for convergence and in order to ~laintaill the 6( Cz) error in I/ . // tl: thus the one-point centroid formula would normally be used. For biquadratics we need n > 2 in (4.76) to maintain accuracy which would seem to imply a fourth-order accurate quadrature formula: in practice however the 2 x 2 third-order accurate Gaussian formula is usually used. For both the bilinear and biquadratic case there is a further practical reason for using these particular quadrature formula. We have already mentioned the fact that the gradient is superconvergent at the centroid in the first case: and LeSaint and Zlamal (R.A.I.R.O.. 1979) have shown super- convergence in the biquadratic case occurs at the 2 X 2 Gauss points. and that this is a general phenomenon.

5. General second-order equation in two dimensions

In this chapter we assume the same types of finite element are to be used for a similar region ti as were considered in the last chapter, but generalise the treatment to more general scalar differential equations and boundary conditions.

5.1. Extremum and variational principles for the self-udjoint problem

Corresponding to (3.1) we consider

-v-(pVu)+qu=f in 1;2CIw2,

where we assume

P(X, ~) rP,llin > 0 and 4(x, v) 20:

and corresponding to (3.76) we take boundary conditions

u = g, on aa,,

(5.la)

(5.lb)

(5.k)

(S.ld) au

P,, +au=g2 on as2,, ~~20,

Page 57: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 57

where a!& u LX&, = i3G, ati, and a&$ do not overlap and a/an denotes differentiation along the outward normal. We shall not be concerned to allow the most general data and will therefore assume that f~ L2(SI), g, E L2(XI,) and g, E L2(aQ2): we also assume that p, q and (Y are piecewise continuous.

Multiplying (5.la) by w E H1( SI) and applying Gauss’ theorem gives

JJ,[ P@'u> *(VW) + quw] dx dy - k-p$w ds = (f, w) (5.2)

which leads naturally to making the following definitions:

H’,:= {u~H~(Q)lu=g, on as2,j, (5.3a)

H&:= {uEH’(~)~u=O on i3Q2,}, (53b)

corresponding to imposition of essential boundary conditions; then substitution of (5.ld), the natural boundary condition, into (5.2) leads to the associated bilinear form which generalises (3.79) and (4.2)

u( u, w) := JJ,[ p( vu) l ( VW) + quw] dx dy + /-, (YUW ds. 2

(5.4a)

This is symmetric and, because of the assumptions on p, q and (Y, is coercive as well as bounded on H& x Hi,. Similarly, we define the linear functional

I(w) := (f, w) + j-n g,w ds 2

(5.4b)

which is bounded on HkO. The weak or variational formulation for u E Hb is then

a(u, w) = I(w) VW E H&.

Correspondingly, the extremum principle for u is

mini~sel(u) := +a(~, u) -Z(u). E

(5.5)

(5.6)

Proof of existence for the solution u, and establishment of an a priori inequality for it, follow most easily if all data is combined in a single functional: it is also convenient for setting up a theoretical framework for the finite element solution. We have assumed more than sufficient smoothness in g, to guarantee the existence of some G, E Hk, i.e. Hk is not empty: then we can define

seek

Z,(w) := Z(w) - a(G,, w),

a solution u,, E HLo to

a(~,, w)=&(w) VWEH&

(5.7a)

(5.7b)

Page 58: Basic Course in Finite Element Methods

58 K. W. Mortorr / Btmc course itz jit~rtr eiemetzt methair

and finally set u = u(, + G,. The argument is a generalisation of that used in section 3.6, leading to (3.65): and the existence of the solution ug to (5.7) follows from the Lax-Milgram lemma (see, for instance Oden and Reddy or Ciarlet). The a priori bounds (3.66) and (4.10) generahse to bounds on z+, in terms of bounds on the linear functional 1,,( .).

One can construct Si c Hi;,, exactly as in section 4 except that, when dividing Q into triangles or quadrilaterals, nodes should be placed where as2, and X& meet. NodaI parameters are then left free on aa, so that the boundary condition (5.ld) is treated naturally. The full trial space can be regarded as given by

where G, E HL is as introduced above. In practice, however, the finite elements near the boundary ElQ, will often be constructed using the isoparametric formulation and the inhomoge- neous Dirichlet data (5.1~) will be imposed directly on the nodal values. This could correspond to assuming G, to be in the approximation space S” and hence approximating g1 by an appropriate polynomial form when XJ2, coincides with as2. In any case, as we have seen in section 4.9, all the integrals will need to be evaluated by numerical quadrature so the details of the assumed form for Sg are less important than the appropriate bilinear form a”( I’. W) and linear functional ,“( W) that result from the quadrature, the approximation to ati, and the approximation to g,.

In very much the same way as described in section 4, either the extremum principle or the variational principle leads to the linear system of Galerkin equations of the form KU = F, where K is the stiffness matrix, U the vector of unknown nodal values (of derivative as well as function values in the case of Hermite elements) and F the load vector, resulting from the data f, g, and g,. The main difference in F is that it may through g, involve an integral along the boundary: but this may be approximated by quadrature in the local coordinate system. In the element stiffness matrices the coefficient p and the extra term ~I% cause little extra difficulty, once it has been accepted that numerical quadrature is going to be used anyway. Thus as in (4.72) the result is an approximation fiO E Si to ug which satisfies

(5.9)

although one can also think in terms of having 6 E St. approximating the solution u of (5.1) or (5.5).

5.3. Error unalysis

We assume for simplicity here that all quadratures are performed exactly and that Si is truly contained in H’,, with all that that implies: errors due to departures from these assumptions are estimated as in section 4.9. Then the solution of the Galerkin equations yields an approximation

Page 59: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 59

U which satisfies the error projection property and is optimal in the energy norm, as in earlier cases :

(5 .lOa)

(5.10b)

(5 .lOc)

As in one dimension we assume an approximation theorem which characterises the approxima- tion space Sgh by an integer k, the order of the approximation attainable with the space: for every positive integer 1 < k and every u E H’(G) n H’E,, there is an approximation WE Si such that

JU- W(s,oIC,h’-“Ju~,,,, OIslZ-1, (5 .ll)

for some constants C, where 1.1 s,n denotes the semi-norm of order s similar to (4.41). It follows immediately from (5.10) and (5.11) that

(I U - u 11 n 5 Chk-’ 1 U 1 k,Q, (5.12)

when K?, the coefficients p and q and the data are smooth enough for the solution u to lie in Hk(s2). The smoothness that we have assumed for p, q and i!KZ are sufficient for the usual a priori bound to apply so that the Aubin-Nitsche argument can be used on an ancillary problem, with data f replaced by u - U and g, = g, = 0. Then in exactly the same way as for (4.43) we obtain the expected result

11 U - u 11 Lo 5 C’hk 1 U 1 k,n (5.13)

for some constant C’.

5.4. Non-self-adjoint problems and Petrov-Galerkin methods

Typical of these problems is the diffusion-convection problem

-v.(pvu-m)+qu=f, (5.14)

with the same boundary conditions and assumptions as (5.1), but with the addition of the convection term dependent on the velocity field r( x, y): very often the latter is incompressible so that v l r = 0, and we will make that assumption here.

An associated bilinear form can be introduced in the usual way, but it will no longer be symmetric and this has important consequences both practically and theoretically. To emphasise this distinction we use a different notation and write

(5.15)

Page 60: Basic Course in Finite Element Methods

60 K. W Morton / Basic course in finite element methods

where a(. , -) is defined by (5.4a). There is no extremum principle but the weak or variational formulation still holds as

B( U, VV) = ,( w) VW E H;,,, (5.16)

where 1( .) is defined in (5.4b). It is convenient and natural to suppose that u is prescribed by Dirichlet boundary conditions at all points of ati where the flow is ingoing, i.e. where r* n < 0. then it is easy to show that B( . , .) is bounded and coercive relative to a( ., -): that is, there are positive constants y and r such that

IB(u> w)l ~~ll~ll~llwll. vfu, WE@,,- (5.17a)

and

B(u, u) 2 Y II v II,’ v’u E Hk,,. (5.17b)

As a result, the existence of the solution u follows from the Lax-Milgram lemma in the same way as in the self-adjoint case.

Similarly an approximation U E Si can be constructed from the Galerkin equations and it satisfies the error projection property

B(u- u, w)=o vIVWEs$ (5.18)

However, because B( . , -) is unsymmetric when Y f 0, there is no sense in which U is an optimal approximation to u although it is of optimul order as h + 0. Indeed, the equations for U may be very ill-conditioned and the approximation very poor for practical element sizes.

From (5.17) and (5.18) we have

IJu-Ul1,2-<(l/y)B(u-U, u-U)=(l/y)B(u-U. u- I’) WCS;.

5 WY> II u - U II u II u - v II 0’

Hence we can deduce

(5.19)

which shows that U is not optimal, although of optimal order of accuracy, in the II . II L, norm: this is also a natural norm to use since a( *, .) is the symmetric part of B( ., s). We can even still apply the Aubin-Nitsche argument to show that we obtain 0( hk) accuracy in the L* norm. The only modification is that the ancillary problem is set for the adjoint equation:-

B(w, z)=(u- U, w) VWEH;,,. (5.20)

Thence we have

Ilu- Ull$=B(u- U, z)=B(u- U, z-Z) VZES;

(5.21)

and the rest of the argument follows as usual.

Page 61: Basic Course in Finite Element Methods

K. W. Morton / Busic course in finite element methods 61

In the important case when q = 0, a more refined analysis shows that (T/y) in (5.19) can be replaced by 1 + 0( 1 r 1 h/p), the dimensionless ratio here corresponding to a mesh Peclet number or mesh Reynolds number in two of the important applications in fluid flow. In convection- dominated flow, where p is very small, this parameter may be very large indeed and the Galerkin approximation U virtually unusable: typically, it suffers from spurious oscillations on the wavelength of the mesh.

An effective remedy for this problem is to generalise from the Gale&in approximation to a Petrou-Galerkin method. In all the approximations we have so far looked at, the space Sh plays two r6les: it is the space in which we seek a solution U, that is it is our trial space in an extremum principle; and it is also the test space against which we “test” the residual obtained when U is substituted into the equation in the weak formulation. In the Petrov-Gale&in method we may choose a different test space from the trial space: we will denote it by T,h and assume it is of the same dimension as Si and contained in Ha. Hence we obtain U E Sh, given by

B(U, W) = Z(W) VWET;. (5.22)

Of course the crucial question still remains: “How should we choose the test space for a given trial space?” The theoretical answer is straightforward and it corresponds to widely used practical methods.

The assumptions (5.17) enable one to deduce from the Riesz Representation Theorem that there is a linear operator R : Hi, + H’,, such that

B(u, w) =a(u, Rw) Vu, WE Hk,. (5.23)

In effect R, or rather its inverse, acts as a symmetrizer on the unsymmetric form B( ., e). Now suppose we could choose the test space Tl so that

RT,h = Sgh. (5.24)

Then the Petrov-Gale&in solution U to (5.22) satisfies

B(u- u, IV)=0 V’WE T;,

i.e.

a(u- U, RW)=O VIVWET~~, (5.25)

i.e.

a(u- U, W) =0 VWE s,“.

That is, U is now the optimal approximation to u in the 11 * 11 u norm and we have overcome all the problems of non-self-adjointness. Of course, in practice the operator T cannot usually be found explicitly and the test space given by (5.24) cannot be constructed and used. However, it can be approximated very effectively and approximations very close to optimal can be generated in many cases: in particular, the factor in (5.19) by which optimality is lost can be made independent of the mesh Peclet number /3 := I r I h/p.

Page 62: Basic Course in Finite Element Methods

62 K. W. Morton / Basic course in finite element method.7

There is a large literature on this topic which we can only summarise briefly here. One can distinguish at least four approaches to generalising the Galerkin formulation but they can all be regarded as generating basis functions for a test space in which the emphasis is shifted “upwind” relative to the corresponding basis functions for the trial space. We will illustrate the differing approaches by reference to the simple one-dimensional model problem

--u”+ (/3/h)u’=f on (0, l), (5.26a)

u(0) = u(l) = 0, (5.26b)

where the mesh Peclet number /3 is positive. If the Gale&in method with a piecewise linear trial space on a uniform mesh of size h is used, we obtain as in (3.23)

-S’u, + ,8A,u, = hF,, (5.27)

in which hu’ is approximated by the central difference A,U, := i( U,, 1 - iI_ 1). When p > 2 this is easily seen to generate the spuriously oscillatory approximations which the Petrov-Galerkin approximations are designed to avoid. The four approaches are as follows:-

(i) Exponential fitting. Initiated for finite difference methods by Allen and Southwell (Quart. J. Mech. Appl. Math., 1955) and Il’in (Math. Notes Acad. Sci. USSR, 1969), this is prompted by the idea that the solution of (5.26) is often a positive exponential in form. Thus the difference scheme should be chosen to fit exponentials (rather than polynomials as in the usual Taylor series approach). Introducing the backward difference operator

A-u,:= u,- cT,pl, one can replace (5.27) by

S”u, + p[(l - ‘y)A, + aA_] 7.J = hc (5.28a)

and find that the choice

(Y = coth( ,&‘2) - (2/p) (5.28b)

achieves this. One can also write (5.28a) in the form

- (1 + &$)S’u, + PA& = hF, (5.28~)

to see that in effect the diffusion coefficient has been artificially enhanced in this scheme: it is this that damps the spurious oscillations.

(ii) Streamline diffyion. A straightforward extension of the Allen and Southwell difference scheme (5.28) to two dimensions is not particularly effective. However, starting from (5.28) Hughes and Brooks (Amer. Sot. Mech. Eng. AMD Vol. 34, 1979) introduced a tensor diffusivity in the multi-dimensional problem to enhance the diffusion just in the streamwise direction. As developed by,, Johnson and Navert (Conf. on “Anal. and Num. Appr. Asymp. Prob. Anal.“, North-Holland, 1981), this leads to a Petrov Galerkin method in which the test function for (5.14) is augmented by a term r* v+,, where +, is the trial basis function. For (5.26) it gives

q,(x) z=+,(x) + +h+;:(x), (5.29)

Page 63: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 63

which reproduces the difference operator (5.28a) and prompts the choice (5.28b) for (Y. The upwinding of J/i is evident from this form but note that this gives a non-conforming method in which the integrals have to be evaluated element-by-element.

(iii) Upwinding. Th e 1 ‘d ea of upwinding the test functions in order to eliminate the spurious oscillations of the Gale&in method is due to Zienkiewicz: various practical schemes for achieving this have been developed by him and his collaborators (see, for example, Christie et al., Int. J. Num. Meth. Engng., 1976 and Heinrich et al., ibid 1977). For the model problem (5.26) a typical test function is quadratic and given by

$i(x> ‘=+i(x> + (yui(x), (5.30a)

where ai( x) = a(( x - x,)/h) and

u(s) := -3s(l - Is I). (5.30b)

Again, the difference operator of (5.28a) is reproduced and this suggests the choice (5.28b) for (Y. In two dimensions one uses bilinear elements with the test functions taken as tensor products of (5.30a) and the parameters (Y determined by the two velocity components.

(iv) Green’s function. We saw in section 3.7 for the self-adjoint problem how the approximation of the Green’s function by the trial space was the key to nodal accuracy. The same argument holds here and was exploited by Hemker in his thesis (Math. Cent. Amsterdam, 1977). Suppose G( x; x *) is the Green’s function for the adjoint problem of (5.16). Then in the same way as with the Aubin-Nitsche argument

u(x~)- Llj=B(u- U, G(.; xi))=B(u- U, G(.; x,)- I’) VIQT,h. (5.31)

For the model problem G(. ; x * ) has a negative exponential form: choosing such a form for the test functions gives exact nodal values in the case of (5.26) just as was obtained in (3.58) for the equation (3.56). A typical example of such a test function is shown in fig. 17. It should be noted that this form again gives the operator on the left of (5.28a) with the special choice (5.28b) for (Y: where it differs from other test functions of course is in the value of Fi = / f#i dx.

The relationship between these various approaches and the general theoretical framework given above is set out in the following theorem - see Morton and Barrett (Comp. Meth. Appl. Mech. Eng., 1984) and Morton and Scotney (Proc. MAFELAP V, Academic Press, 1985).

x x

Trial basis function Test basis function

Fig. 17.

Page 64: Basic Course in Finite Element Methods

64 K. W. Mor:on / Busic course in finite element methods

Theorem 5.1, Suppose any symmetric bilinear form Bs( . , -) is chosen such that boundedness and coercivity

relations of the forms (5.17) hold for B( =, m) with respect to the norm // - // Bs induced by B,( -, -). Let R, be the Riesz Representer for which

B( v, w) = B,( v, R,w) Vv, w E H;<,. (5.32)

Suppose also that a test space T,h, of the same dimension as Sgh, satisfies an approximation property of the form: !lAs < 1 such that

Then the Petrov-Galerkin approximation U obtained from using Sl and Tt satisfies

(5.34)

Proof (see references given above). If one applies this theorem to the model problem (5.26), using the symmetric part u(. , .) of

B(. , -) as above, one obtains some interesting properties of the schemes given above. For the Galerkin method, the bounding factor (1 - A’,)- “2 in (5.34) becomes proportional to ,l3 as /3 tends to infinity; for the Hemker test function it is always unity, because as noted earlier exact nodal values correspond to optimal approximation in the 11 e 11 iI norm; for the test function (5.30) it tends to 1.2383.. . as /3 -+ 00; and for (5.29) a corresponding limit is 1.1547 _ . . ! This indicates just how successful these schemes have been in attaining their objective in this simple case. We re-emphasise here that this is with the choice (5.28b) for (Y so that all schemes give the same operator on the left of (5.28a): but they sample f(x) differently and (5.34) gives a worst case bound over all forcing functions.

6. Eigenval~~ problems in one dimension

Eigenvalues often represent vibration frequencies in strings, membranes, bridges, rotating shafts etc. etc. Commonly it is the few lowest frequencies that are required to assess the strength, safety or some other aspect of a design. In this chapter we will discuss the problem of conlputing such eigenvalues and their associated eigenfunctions in the context of the one-dimensional equations of section 3. Generalisation to two-dimensional problems raises very similar issues to those considered in sections 4 and 5.

6. I. Sturm- Liouville problems

We consider the problem of finding a real number X and real full~tion u(x) satisfying

-(pu’)‘+qu=Xu on (0,l) (6.la)

Page 65: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods 65

where we assume that, as in (3.lb),

p(x) kpmin > 0 and q(x) 2 0 (6.lb)

and choose as typical boundary conditions

u(0) = 0, U’(1) = 0. (6.1~)

Such a problem has an infinite number of solutions: more precisely there is an infinite sequence of positive eigenvalues { A ;, i = 1, 2, . . . }, which we can order as

O<X,<X,<A,< e-0 -00, (6.2)

together with corresponding eigenfunctions U;(X). If we introduce as before in (3.45) the

associated bilinear, symmetric, positive definite form a( u, w) := J

( pu’w ’ + quw) dx and define

as in (3.78b) H& := {u E H1(O, 1) 1 u(O) = 0}, we clearly have from (6.1) for i = 1, 2, . . .

a(~,, u) = A&, u) Vu E H&. (6.3)

Hence

‘iC”t~ Uj) =U(“i, Uj) =U(Uj, U,)=Xj(Uj, Uj),

and so

(Xi-hj)(ui, Uj) =o vi, j: (6.4)

that is, the eigenfunctions for distinct eigenvalues are orthogonal. By normalising each eigenfunc- tion we can ensure that we have an orthonormal system,

(% u,) = Si, Vi, j, (6.5)

which is also complete. The eigenvalues and eigenfunctions can be characterised by means of a minimux principle. We

introduce the Rayleigh quotient defined by

44 4 R(u) := (u, u> u E H’(0, 1).

Then the lowest eigenvalue is given by

A,= min R(u). u=Hko

(6.7a)

Moreover, if S, is any k-dimensional subspace of H’E,, we have the minimax characterisation for k = 2, 3, . . .

A, = Tkn pE;xR(u). k

(6.7b)

Page 66: Basic Course in Finite Element Methods

66 K. W. Morton / Basic course it2 finite element method.7

Since { U, } forms a complete orthonormal sequence over H’(0, 1) we can expand an arbitrary u E Hi;.., as

U(X) = ca,+, a, = (u, “,) (6.8a)

so that

(6.8b)

We can take S, to be the span of any set of k eigenfunctions. Then clearly the maximum in (6.7b) will equal the highest eigenvalue from this chosen set: and the minimum will be attained when S, is the span of the first k eigenfunctions.

For the constant coefficient case of (6.la)

(u’, u’) R(u) =4+p (& u> (6.9)

so that q just shifts all the eigenvalues and p scales the sequence. We can write the eigenfunc- tions and eigenvalues explicitly as

U,(X) =JZsin(k- ~)vx, A, =q+p(k- $21. (6.10)

In particular, by putting p = 1, q = 0 we have from R( ZI) > A,

(6.11)

which corresponds to the result quoted in (3.69): in general, it is through these eigenvalues that the optimal constants in such a PoincarkFriedrichs inequality are obtained.

6.2. Rayleigh-Ritz approximation

The weak form of the eigenvalue problem results immediately from the stationary properties of the Rayleigh quotient: find u E Hi:,, and h E Iw such that

a( u, u) = A( u, u) Vu E Hi,,,. (6.12)

Then just as for the boundary value problem we can introduce a finite element approximation space S,” c H’,, and seek an approximate eigenfunction U E S,” and an approximate eigenvalue A E Iw such that

a(U, W) =A(U, W) VWW Si.

Equivalently, we seek stationary points of R( V), V E Si :-

A,= minR(V) VE$

(6.13)

(6.14a)

Page 67: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methods

and, more generally if (S,“), is any k-dimensional subspace of Sgh, we have

A,= min max R(V). (Soh)k VC($),

67

(6.14b)

It is clear from this characterisation that

A,& for 1 <k< N, (6.15)

where N is the dimension of Sgh: the result for k = 1 follows immediately from comparing (6.14a) with (6.7a) since Si c HLO; the more general case follows in the same way.

Through an expansion in global basis functions, on a mesh as in (37) and for any of the elements described in section 3, we can write for I/E St

N

V(X) = C yGji(x>. (6.16)

This leads in the usual way to the definition of a global stiffness matrix K with entries

K,, = a(Gi3 +jI> and mass matrix M with entries Mlj = ( c$,, ~~)i>, which differ from the full

matrices assembled element by element only in having the first row and column deleted, corresponding to the boundary condition u(0) = 0 of (6.1~). This then leads through the weak form (6.13) to the generalised matrix eigenvalue problem

KU=AMU.

The Rayleigh quotient can also be written in these terms as

(6.17)

R(V) = sv VE sgh. (6.18)

Both K and M are symmetric and positive definite, and methods which are specially effective in finding the first few eigenvalues and eigenvectors of such a problem are available and will be presented in the lectures on Numerical Linear Algebra by Dr. Reid.

Example. Suppose p(x) = p, q(x) = q with p, q constant, the mesh is uniform with spacing h and piecewise linear elements are used. Then in terms of the matrices

K,=;

2 -1 0 0’ -1 2 -1

0 -1 2 -1 2 -1

(j . . . 0 -1 1.

) M=i

4 1 0 ... 0 14 1

01 4 d 1 4 1

(j . . . 0 1 2

(6.1)

M is the mass matrix and the stiffness matrix is pK, + qA4 so that we have

(pK,+qM)U=AMU. (6.20)

Page 68: Basic Course in Finite Element Methods

6X K. W. Morton / Basic coutxe in finite element method7

This can be written in difference notation by doubling the last equation and introducing

UN,, := I!&_, to give

[ -~S’+gh(l+:S’)]li,=Ah(l+~6’)1/; ,...,N. ,i= 1.2 (6.21)

Substituting a Fourier mode einl’ to give

L/: = (j(m) einzJh

we obtain in the usual way

S’U, = fi(m)[2 cos mh -

Hence by writing s = sin imh

(6.22a)

21 e ‘*‘lh = ( - 4 sin2imh) U,.

(6.21) reduces to

(6.22b)

[4ps2 + qh*(l - +s2)] fi= Ah’(1 - :s2)lj

from which we obtain

A(m)=q+p 4s2

h2(1 - 2s2/3) (6.23a)

-q+pm2 as mh-,O. (6.23b)

The essential boundary condition U, = 0 implies that the _t m nodes need to be combined to give U, = fi( m) sin rnjh: and the natural boundary condition Cl,,,, 1 = U,,, _ , becomes cos m sin mh = 0,’ which implies -that

m=(k-+)71, k=l,2 ,..., N.

Thus the first N eigenfunctions have the correct form (at the nodes) as given

(6.23~)

by (6.10) N being

the maximum number that can be distinguished on the mesh since Nh = 1. We also see from (6.23b) that the corresponding eigenvalues are well approximated for small values of k: more detailed analysis of (6.23a) gives

A(m) -A, = O(m4h’)

which implies that we need k = U( N’j2).

(6.24)

6.3. Error analvsis

Most of this section will apply to the general linear self-adjoint problem, two-dimensional as well as one-dimensional, because the key properties (6.2) and (6.5) still hold. We use the same basic assumptions as in the error analysis of earlier chapters.

Let P be the projection operator from Hk,, to the Rayleigh-Ritz approximation in Si: that is. for any u E H&

a(u - Pu, W) = 0 VWE Sgh. (6.25)

Page 69: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element methoak 69

Also we denote by Ej the span of the first j eigenfunctions of the continuous problem,

E,:= span{ q, u2 ,..., ui}. (6.26)

We shall assume for any eigenvalue h, that we are attempting to approximate that h and j are sufficiently small for Pu f 0 to hold for u E E,; that is,

IIu-Pull < IIull VUEE,. (6.27)

For the example of the previous section where the nodal values of eigenfunctions are exact, this means that not all the nodes can be placed at zeros of eigenfunctions in E .

As a result of the assumption above we can be sure that PE; has dimension j and can be used in the minimax principle so that, comparing with (6.14b), we have

A, 5 p& R(V) = fgR(PU). I I

(6.28)

By obtaining an upper bound to R( Pu) and combining (6.28) with (6.15) we can establish the following result.

Theorem 6.1.

For a conforming approximation space S,h containing all polynomials of degree less than k on each element and for sufficiently small h, we have

hj I A, I h, + Ch2(kp1)h; (6.29)

for some constant C.

Proof. Because of (6.25) we have for u E H’E,

a(u-Pu, u-Pu)=a(u-Pu, u+Pu)=a(u, u)-a(Pu, Pu),

so that

a(Pu, Pu) lU(U, u).

On the other hand

II Pu llL”z = II u II& + II u - Pu I@ - 2( 0, u - Pu)

and if u is normalised to )I u II 2~ = 1 we have

11 Pu II& 2 1 - 2( u, u - Pu).

Putting both of these into (6.28), with h small enough for (6.27) to hold, gives

A,< m~a$u(u, u)/(l-2(u, u-Pu))]. I

(6.30a)

(6.30b)

(6.31)

(6.32)

Page 70: Basic Course in Finite Element Methods

70 K. W. Morton / Basic course in finite element methods

It is convenient to expand v as

1 1

so that

(v, v- Pv) = &, 1

v-Pv) = f: L a(u,, i i

/ (U,?

I XI v-Pu)=C 2 a(u,-Pu,. Cl-Pv). l 1 1 XI

(6.33)

(6.34)

The error bounds that we have obtained earlier, in (3.118) (4.42) and (5.12), give bounds for

II u - PO II U and 11 U, - PM, 11 u so that for some constant C, we have

(c’, v - Pv) I C;h*” ‘) ~fic,/h.jil~i~~c,u;~,~. (6.35)

Furthermore, we can regard each U, as generated by a boundary value problem with X,U, as data so that the a priori inequalities that we have earlier used in (3.66) and (4.10) give

~$c,+ +.^.u.JLJ. (6.36)

Indeed, such bounds can be generalised to give for some constants C,

~ + jl 2 CL11 +?*u, illi. Hence (6.35) can be reduced to

(6.37)

(v, v - Pu) I CfC,Zh2”-” ic,Xjl’ ‘u, II

II II -&‘u,

11 5 ;Ch2’/‘ ‘)A’, ’ /I CI 11 Lz (6.38)

1 IlLZll 1 I I.2

with C = 4C,?: ready for substitution into (6.32). In order finally to obtain (6.29) we have only to observe that for v given by (6.33)

a(v, v) =R(u) IX,

and that, for any 7 E [0, i], we have (1 - 27) ’ I 1 + 47 which we can apply to (6.38) for sufficiently small h.

Thus the eigenvalues converge at the same rate as the energy where one similarly has, as in (6.30a) but in our usual notation,

Iju]j,2- ]IUl],2= I]z.- UII,‘=O(h*” ‘)):

that is, the error is O(h’) for linear elements, 0( h4) for quadratic elements and so on. It is

Page 71: Basic Course in Finite Element Methods

K. W. Morton / Basic course in finite element metho& 71

important to note also that conforming elements always give over-estimates of the eigenvalues: as these often correspond to frequencies, one can think of the discrete mechanical system as being “too stiff”. It is for this reason that engineers commonly use non-conforming elements, or make other modifications to the discrete system to make it “softer”, in attempts to obtain closer approximations to the frequencies.

Let us now consider the accuracy of the corresponding eigenfunctions. We have the following results which are similar to those for boundary-value problems.

Theorem 6.2. For St as in Theorem 6.1 and a simple eigenvalue Xj, and with the approximate eigenfunction

normalised to 11 q. 11 r2 = 1, we have

11 uj - q 11 L2 I C’hkA;‘2

for some constants C and C’ and sufficiently

Proof: Since ui and q. are both normalised

small h.

(6.39a)

(6.39b)

II ‘j- q II~=a(uJ~ Uj)+a(q, uj)-2a(uj, q)=Xj+Aj-2X,(uj, u,),

and also

IIu,- ~ll&=2-2(uj, u,).

Hence

II ‘I- U, II,2 = (‘I- ‘j) + ‘j II ‘I- u/ IIS (6.40)

so that (6.39a) follows from Theorem 6.1 if (6.39b) holds. To prove this second result we bound (I uj - UJ II L2 in terms of 11 u, - Puj II Lo to which we can

apply the error analysis of the earlier chapters. We write j3 := (PM,, Uj) in the expansion

puj=pq.+ c (PUj, qi)u, (6.41a) if/

and also have

A,(& PUj) =a(q, PUj) =u(q, Uj) =xj(u,, Uj)

so that

(A,-X,)(PU,, q> =h,(uJ-Puj, vi). (6.41b)

Now from (6.2) and (6.29), it follows that for sufficiently small h there is a separation constant p > 0 such that

‘j I I Aj_Xi IP Qi*j- (6.42)

Page 72: Basic Course in Finite Element Methods

72 K. W. Morton / Basic course in /inite element methods

Thus we can deduce from (6.41)

that is,

11 PU, - /3l$ (( Lz I P II uj - p”j II L”

Next we have

IPI=](PU;, U,)l I ~lP~~lIL211u/IIL’--< II”jIIL2=1

and we can choose the sign of u, so that 0 I ,8 I 1: hence

1 = II uj II L2 s II ‘j - PU, II L* + II Pq II L’ = II ‘I - Pu, II L’ + P

i.e.

(1 -J> S II u, - Pq II LL,

so that

11 UJ - UJ 11 L2 I (I ldj - Pl$ 11 L’ + (I - P) II ‘1 II I,’ ’ 2 II ‘, - PU, II L’*

(6.43)

(6.44)

Putting (6.44) and (6.43) together through the triangle inequality gives

II uj - q II L2 ‘: 2[ II U, - PU, II ~2 + 11 PU, - PL$ 11 L’] 5 2(1 + P) II us - p”j II L’. (6.45)

Our earlier estimates enable II uj - Pu, II Lo to be bounded by Chk 1 u, 1 k and application of (6.37) finally gives the error bound in the form (6.39b) since 1) u,, 1) Lo = 1.

Acknowledgements

I am most indebted to the book of Strang and Fix for its stimulating treatment of finite element methods, and in many cases this treatment is closely followed in these notes. 1 am also grateful to Dr. Martin Reed for reading all the manuscript and making many helpful suggestions.