.j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an...

381
-- - - - - V. .j1::1 -= 11. -.. - V 'P - -- - - - - - - V - = - - V V -- 2.- - VVVV - -

Transcript of .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an...

Page 1: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

-- - - - -

V.

.j1::1

-=11. -.. —

•- V

'P

- -- - - - - - -

V

-

=

-- V V --

2.-

-- VVVV - -

Page 2: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Application and Implementationof Finite Element Methods

J. E. AKINDepartment of Engineering Science and Mechanics,The University of Tennessee,Knoxville, Tennessee, USA

1982

ACADEMIC PRESSA Subsidiary of Harcourt Brace Jovanovich, PublishersLondon New YorkParis San Diego San Francisco São PauloSydney Tokyo Toronto

Page 3: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

ACADEMIC PRESS INC. (LONDON) LTD24—28 Oval Road

London NW1

US edition published byACADEMIC PRESS INC.

111 Fifth AvenueNew York, New York 10003

Copyright © 1982 byACADEMIC PRESS INC. (LONDON) LTD

All Rights ReservedNo part of this book may be reproduced in any form, by photostat, microfilm or

any other means, without written permission from the publishers

British Library Cataloguing in Publication Data

Akin, J. E.Application and implementation of hniteelement methods.1. Finite element method—Data processingI. Title515.3'53 TA347.F5

ISBN 0-12-047650-9LCCCN 81-69597

Printed in Great Britain by Page Bros (Norwich) Ltd

Page 4: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Preface

The finite clement method has now become a welJ-established branch ofcomputational mathematics and the theoretical foundations have beenpresented in several texts. However, the actual application of finite elementprocedures requires extensive programming effort. The present text hasbeen developed to illustrate typical computational alogrithms and theirapplications. Whilst the theoretical discussions have been limited to theminimum required to introduce the topic, most of the computationalprocedures are discussed in detail. Many universities follow an introductoryfinite element course, with a course on the related computational pro-cedures. This text should be well suited for such a course.

Numerous programs are presented and discussed. A particular control-ling program and data structure have been included for completeness sothat specific applications can be examined in detail. Emphasis has beenplaced on the use of isoparametric elements and numerical integration.The discussion of the programs for isoparametric elements, Chapter 5, andtheir example applications, Chapter 11, should clarify this important topic.Since practical problems often involve a large amount of data the subjectof mesh generation is also examined. A very limited discussion of timeintegration procedures has been included. Also included is an Appendixwhich describes some subroutines of secondary interest, which are men-tioned in Chapters 2 and 6, together with various sample applications andthe input formats for MODEL.

Figures referred to in each Section are included at the end of the Section,followed by the Tables.

The text reflects the many studies and conversations on finite elementsin which I was able to participate during a period in which I was on leavefrom the University of Tennessee. These studies were conducted at theUniversity of Texas at Austin, Brunel University, and the California Insti-tute of Technology. The support of a UK SRC Senior Visiting FellowGrant and a US NSF Professional Development Grant is gratefully acknowl-edged. I would also like to acknowledge the support and encouragementof J. T. Oden, J. R. Whiteman, T. J. R. Hughes, E. B. Becker, and W.C. T. Stoddart.

Copies of the MODEL software are available either from the author,or from the Institute of Computational Mathematics at Brunel University.

University of Tennessee . J. E. AkinJanuary 1982

V

Page 5: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Contents

Preface . . . . . . .v

Program Notation . . . . . . . .. xi

Finite Element Concepts1,1 Introduction . . . . . .

. I1.2 Foundation of finite clement procedures . . . . I

1.3 General finite element analysis procedure . . . 4

1.4 Analytic example . . . . . . . . 13

1.5 Exercises . . . . . . . . . . 18

2 Control and Input Phase2.1 Introduction . . . . . . . . . 19

2.2 Control of major segments . . . . . . 22

2.3 Data input . . . . . . . . . 32

2.4 Exercises . . . . . . . . . . 35

3 Pre-element Calculations3.1 Introduction . . . . . . . . . 37

3.2 Property retrieval . . . . . . . . 41

3.3 Effects of skyline storage . . . . . . . 46

3.4 Exercises . . . . . . . . . . 49

4 Calculation of Element Matrices4.1 Introduction . . . . . . . . . 51

4.2 Square and column matrix considerations . . . . 51

4.3 Auxiliary calculations . . . . . . . 53

4.4 Condensation of element's internal degrees of freedom . 594.5 Economy considerations in the generation of element

matrices . . . . . . . . . . 62

5 Isoparametric Elements5.1 Introduction . . . . . . . . . 65

5.2 Fundamental theoretical concepts . . . . . 65

5.3 Programming isoparametric elements . . . . 74

vu

Page 6: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

vu'

5.4 Simplex elements, a special case . . . . . 77

5.5 Isoparametric contours . . . . . . . 84

5.6 Exercises . . . . . . . . .. 90

6 Element Integration and Interpolation6.1 Introduction . . . . . . . . . 91

6.2 Exact integrals for triangular and quadrilateral geometries 91

6.3 Gaussian quadratures . . . . . . . 94

6.4 Numerical integration over triangles . . . . . 101

6.5 Minimal, optimal, reduced and selected integration . . 105

6.6 Typical interpolation functions . . . . . . 107

6.7 Interpolation enhancement for C° transition elements . 115

6.8 Special elements . . . . . . . . 122

6.9 Exercises . . . . . . . . . . 127

7 Assembly of Element Equations into System Equations7.1 Introduction . . . . . . . . . 129

7.2 Assembly programs . . . . . . . . 130

7.3 Example . . . . . . . . . . 137

7.4 Symbolic element assembly for quadratic forms . . 144

7.5 Frontal assembly and solution procedures . . . 148

7.6 Exercises . . . . . . . . . . 152

8 Application of Nodal Parameter Boundary Constraints8.1 Introduction . . . . . . . . . 153

8.2 Matrix manipulations . . . . . . . 154

8.3 Constraints applied at the element level . . . . 160

8.4 Penalty modifications for nodal constraints . . . 160

8.5 Exercises . . . . . . . . . . 164

9 Solution and Result Output9.1 Economical solution techniques for the system equations . 165

9.2 Output of results . . . . . . . . 175

9.3 Post-solution calculations within the elements . . . 180

9.4 Exercises . . . . . . . . . . 181

10 One-dimensional Applications10.1 Introduction . . . . . . . . . 18310.2 Conductive and convective heat transfer . . . . 18310.3 Plane truss structures . . . . . . . 19310.4 Slider bearing lubrication . . . . . . . 20510.5 Ordinary differential equations . . . . . . 21210.6 Plane frame structures . . . . . . . 225

Page 7: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

ix

11 Two-dimensional Applications11.1 Introduction . . . . . . .

. 231

11.2 Plane stress analysis . . . . . . .. 232

11.3 Heat conduction . . . . . . .. 245

11.4 Viscous flow in straight ducts . . . . .. 255

11.5 Potential flow . . . .259

11.6 Electromagnetic waveguides . . . . .. 276

11 .7 Axisymmetric plasma equilibria . . . . 280

11.8 Exercises . . . . . . . . .. 284

12 Three-dimensional Applications12.1 Introduction . . . . . . . .

. 285

12.2 Heat conduction . . . . . . . . 285

13 Automatic Mesh Generation13.1 Introduction . . . . . . . . . 295

13.2 Mapping functions . . . . . . . . 299

13.3 Higher order elements . . . . . . 302

14 Initial Value Problems14.1 Introduction . . . . . . . . . 317

14.2 Parabolic equations . . . . . . . . 318

14.3 Hyperbolic equations . . . . . . . 331

14.4 Exercises . . . . . . . . . . 344

References and Bibliography . . . . . . . . 345

Appendix —A Summary of Input Formats and SupportingPrograms . . . . . . . . 351

Subject and Author Index . . . . . . . . 367

Subroutine Index . . . . . . . . . . 371

Page 8: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Program NotationAD = VECTOR CONIAINING FLOATING POIN1 VARIABLESAJ = JACOBIAN MATRIXAJINV = iNVERSE JACOBIAN MATRIX

C = ELEMENT COLUMN MATRIXCB = BOUNDARY SEGMENT COLUMN MATRIXCC = COLUMN MATRIX OF SYSTEM CRUATIONSCEO = CONSTRAINT EOS COEFFS ARRAYCOORD = SPATIAL COORDINATES OF A SELECTED SCT OF NOULSCF = PENALTY CONSTRAINT COLUMN MATRIXCUTOFF IS SPECIFIED NUMBER FOR CUTTINO OFF ITERATIONS

O = NODAL PARAMETERS ASSOCIATED WITH A GIVEN ELEMENTDI' = SYStEM LIST OF NODAL PARAME1ERS000LI' = SYSTEM LIST OF NODAL DOF FROM LAST ITERATIONDELTA = LOCAL DERIVATIVES OF INTERPOLATION FUNCTIONS H

ELPROP = ELEMENT ARRAY OF FLOATING POINT PROPERtIES

FLTEL = SYSTEM STORAGE OF FLOATING PT ELEMENT PROFFLTNIS = SYSTEM STORAGE OF FLOATING PT MISC, PROPFLTNF = SYSTEM STORAGE OF FLOATING PT NODAL PROPFLUX = SPATIAL COMPONENTS OF SFECIFIEII BOUNDARY FLUX

GLOBAL = GLOBAL DERIV.S OF INTERPOLATION FUNCTIONS N

N = INTERPOLATION FUNCTIONS FOR AN ELEMENT

II' = VECTOR CONTAINING FIXED POINT ARRAYSIBC = NODAL POINT BOUNDARY RESTRAINT INDICATOR ARRAYINDEX = SYSTEM DEGREE OF FREEDOM NUMBERS ARRAYIF INRHS.NE.O INITIAL VALUES OF CC ARE INPUTIF IPTEST,GT,O SOME FROPERLIES ARE DEFINEDIR1 = NUMBER OF ROWS IN ARRAY FLTNF1P2 = NUMBER OF ROWS IN ARRAY NPFIX1P3 = NUMBER OF ROWS IN ARRAY FLTELIP4 = NUMBER OF ROWS IN ARRAY LPFIXIPS = NUMBER OF ROWS IN ARRAY PRTLPIISAY = NO. OF USER REMARKS TO BE I/O

JPI = NUMBER OF COLUMNS IN ARRAYS NPFIX AND NPROPJP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPJPJ = NUMBER OF COLUMNS IN ARRAY MISFIX

KFIXED = ALLOCATED SIZE OF ARRAY IDKFLOAT = ALLOCATED SIZE OF ARRAY ADKODES = L1ST OF DOF RESTRAINT 1NDICATORS AT A NODE

= NUMBER OF COL IN ARRAYS FLTNP & PRTLPT a PTPROPKP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND ELPROPKP3 = NUMBER OF COLUMNS IN ARRAY FLTMISRI-KS = NO. OF COLUMNS OF FLOATING PT CONSTRAINT DATA

LBN = NUMBER OF NODES ON AN ELEMENT BOUNDARY SEGMENTIF LEMWRT = 0 LIST NODAL PARAMETERS BY ELEMENTSIF LNOMO=l ELEMENT PROPERTIES ARE HOMOGENEOUSLNODE = THE N ELEMENT INCIOENCES OF THE ELEMENTLPFIX - SYSTEM STORAGE ARRAY FOR FIXED PT ELEMENT PROPLPROP = ARRAY OF FIXED POINT ELEMENT PROPERTIESIF LPTEST.GT.O ELEMENT PROPERTIES ARE DEF1MEII

xi

Page 9: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

N Nt). OF SYSTEM NODESMAXBAN = MAX. HALF BANDWIDTH OF SYSTEM EQUArION5IF MAXTIM.UT.O CALCULATE CPU TIMES OF MAJOR SEGMENTSMAXACT NO ACTIVE CONSTRAINT TYPES ( =MAXTYP)MAXTYP = MAX NODAL CONSTRAINT TYPE (=3 NOW)MISCFL = NO. MISC. FLOATiNG POINT SYSTEM PROPERTIESMISCEX = NO. MISC. FIXEE' POINT SYSTEM PROPERTIESMISFIX = SYSIEM ARRAY OF MISC. FIXED POINT PROPERTIESMTOTAL = REQUIREI' SIZE OF ARRAY Al'Ml TO MNEXT = POINTERS FOR FLOATING POINT ARRAYS

N = NUMBER OF NODES PER ELEMENTNCURVE = NO. CONTOUR CURVES CALCULATED PER PARAMETERNE'FREE = TOTAL NUMBER OF SYSTEM I'EGREES OF FREEDOMNDXC = CONS rRAINT EQS DOE NUMBERS ARRAYNE = NUMBER OF ELEMENTS IN SYSTEMNELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTNG = NUMBER OF NODAL PARAMETERS (DOE) PER NODEIF NNOMU=l NODAL SYSTEM PROPERTIES ARE HOMOGENEOUSNITER = NO. OF ITERATIONS TO BE RUNNLF'FIX = NO. FIXED POINT ELEMENT PROPERTIESNLPFLO = NO. FLOATING POINT ELEMENT PROPERTIESNNPFIX = NO. FIXED POINT NODAL PROPERTIESNNPFLO = NO. FLOATING POINT NODAL PROPERTIESNOCOEF = NO COET-T IN SYSTEM SO MATRIXNODES = ELEMENT INCIDENCES UP ALL ELEMENTSNOTHER = TOTAL NO. OF BOUNDARY RESIRAINTS .GT. TYPE1NPROP = NODAL ARRAY OF FIXED POINT PROFERTIESIF NPTWRT = 0 LIST NODAL PARAMETERS BY NODESNRANGE = ARRAY CONTAIN1NG NODE NO.S OF EXTREME VALUESNREO = NO. OF CONSTRAINI EQS. OF EACH TYPENRES = NO. OP CONSTRAINT FLAGS OF EACH TYPENSEG = NO OF ELEM BOUNDARY SEGMENTS WITH GIVEN FLUXNSPACF = DIMENSION OF SPACENTAPE1 = UNIT FOR POS1 SOLUTION MATRICES STORAGENTAPE2.3,4 = OPTIONAL UNITS FOR USER (USED WHEN 0)

NIOLAL = REQUIRED SIZE OF ARRAY II'IF NULCOL.NE.0 ELEMENT COLUMN MATRIX IS ALWAYS ZERONOMCE = NUMBER OF CONSTRAINT EQSNi TO NNEXT = POINTERS FOR FIXED POiNT ARRAYS

PRTLPT = FLOATING FT PROP ARRAY OF ELEMENT'S NODESPTPROP = NODAL ARRAY OF FLOATING FT PROPERTIES

RANGE: i-MAXIMUM VALUE, 2—MINIMUM VALUE OF DOF

S = ELEMENT SQUARE MATRIXSB = BOUNDARY SEGMENT SQUARE MATRIXSS = 'SQUARE' MATRIX OF SYSTEM EQUATIONS

TIME = ARRAY STORING CFU TIMES FOR VARIOUS SEGMENTSTITLE = F'ROBLEM TITLE

X = SPATIAL COORDINATES OF ALL NODES IN THE SYSTEMXF1 = SPATIAL COORDINATES OF A CONTOUR F'OINT

Page 10: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

I

Finite element concepts

1.1 Introduction

The finite element method has become an important and practicalnumerical analysis tool. It has found application in almost all areas ofengineering and applied mathematics. The literature on finite elementmethods is extensive and rapidly increasing. Extensive bibliographies areavailable [59, 76] but even these are incomplete and are rapidly becomingoutdated. Numerous texts are available which present the theory of variousfinite element procedures. Most of these relegate programming consider-ations to a secondary, or lower, level. One exception is the text by Hintonand Owen [42]. The present work takes a similar position in that it aimsto provide a complete overview of typical programming considerationswhile covering only the minimum theoretical aspects. Of course, the theorybehind the illustrated implementation procedures and selected applicationsis discussed.

This chapter begins the introduction of various building block programsfor typical use in finite element analysis. These modular programs may beutilized in numerous fields of study. Specific examples of the applicationof the finite element method will be covered in later chapters.

1.2 Foundation of finite element procedures

From the mathematical point of view the finite element method is basedon integral formulations. By way of comparison the older finite differencemethods are usually based on differential formulations. Finite elementmodels of various problems have been formulated from simple physical

1

Page 11: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2 1. Finite element concepts

intuition and from mathematical principles. Historically, the use of physicalintuition led to several early practical models. However, today there isincreased emphasis on the now well established mathematical foundationsof the procedure [10, 28, 611.

The mathematical rigor of the finite element method was lacking atfirst, but it is now a very active area of research. Modern finite elementintegral formulations are obtained by two different procedures: variationalformulations and weighted residual formulations. The following sectionswill briefly review the common procedures for establishing finite elementmodels. It is indeed fortunate that all of these techniques use the samebookkeeping operations to generate the final assembly of algebraic equa-tions that must be solved for the unknown nodal parameters.

The earliest mathematical formulations for finite element models werebased on variational techniques. Variational techniques still are veryimportant in developing elements and in solving practical problems. Thisis especially true in the areas of structural mechanics and stress analysis.Modern analysis in these areas has come to rely on finite element techniquesalmost exclusively. Variational models usually involve finding the nodalparameters that yield a stationary (maximum or minimum) value of aspecific integral relation known as a functional. In most cases it is possibleto assign a physical meaning to the integral being extremized. For example,in solid mechanics the integral may represent potential energy, whereasin a fluid mechanics problem it may correspond to the rate of entropyproduction. Many physical problems have variational formulations thatresult in quadratic forms. These in turn yield algebraic equations for thesystem which are symmetric and positive definite. Another importantpractical advantage of variational formulations is that they often have errorbound theorems associated with them. Numerous examples of variationalformulations for finite element models can be found by examining themany texts available on the theory of variational calculus. Several appli-cations of this type will be illustrated in the later chapters.

It is well known that the solution that yields a stationary value of theintegral functional and satisfies the boundary conditions is equivalent tothe solution of an associated differential equation, known as the Eulerequation. If the functional is known, then it is relatively easy to find thecorresponding Euler equation. Most engineering and physical problemsare initially defined in terms of a differential equation. The finite elementmethod requires an integral formulation. Thus, one must search for thefunctional whose Euler equation corresponds to the given differentialequation (and boundary conditions). Unfortunately, this is generally adifficult, or impossible task. Therefore, there is increasing emphasis on thevarious weighted residual techniques that can generate an integral for-

Page 12: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.2 Foundation of finite element procedures 3

mulation directly from the original differential equations. Both the differ-ential equation and integral form are defined in physical coordinates, say

(x, y, z).As a simple one-dimensional example of an integral statement, consider

the functionalL

[K(dt/dx)2 +Ht2]dx,

which will be considered in later applications. Minimizing this functionalis equivalent to satisfying the differential equation

Kd2t/dx2 — Ht = 0.

In addition the functional satisfies the natural conditions of dt/dx = 0 at anend where the essential boundary condition, I to, is not applied.

The generation of finite element models by the utilization of weightedresidual techniques is a relatively recent development. However, thesemethods are increasingly important in the solution of differential equationsand other non-structural applications. The weighted residual method startswith the governing differential equation

L(p)=Qand avoids the often tedious search for a mathematically equivalent vari-ational statement. Generally one assumes an approximate solution, say

and substitutes this solution into the differential equation. Since theassumption is approximate, this operation defines a residual error term inthe differential equation

L(4*)_Q=R.

Although one cannot force the residual term to vanish, it is possible toforce a weighted integral, over the solution domain, of the residual tovanish. That is, the integral over the solution domain, Q, of the productof the residual term and some weighting function is set equal to zero, sothat

1=1 RWdQ=0.Jc�

Substituting interpolation functions for the approximate solution,and the weighting function, W, results in a set of algebraic equations thatcan be solved for the unknown coefficients in the approximate solution.The choice of weighting function defines the type of weighted residualtechnique being utilized. To obtain the Galerkin criterion one selects

w=

Page 13: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4 1. Finite element concepts

while for a least squares criterion

W =

gives the desired result. Similarly, selecting the Dirac delta function givesa point collocation procedure; i.e.

w = a.

Obviously, other choices of W are available and lead to alternate weightedresidual procedures such as the subdomain procedure. The first two pro-cedures seem to be most popular for finite element methods. Use ofintegration by parts with the Galerkin procedure usually reduces the con-tinuity requirements of the approximating functions. If a variational pro-cedure exists, the Galerkin criterion will lead to the same algebraic approx-imation. Thus it often offers optimal error estimates for the finite elementsolution.

For both variational and weighted residual formulations the followingrestrictions are now generally accepted as means for establishing conver-gence of the finite element model as the mesh refinement increases [871:

1. (A necessary criterion) The element interpolation functions must becapable of modelling any constant values of the dependent variable orits derivatives, to the order present in the defining integral statement,in the limit as the element size decreases.2. (A sufficient criterion) The element shape functions should be chosenso that at element interfaces the dependent variable and its derivatives,of one order less than those occurring in the defining integral statement,are continuous.

1.3 General finite element analysis procedure

1.3.1 Introduction

In the finite element method, the boundary and interior of the continuum(or more generally the solution domain) is subdivided (see Fig. ii—illustrations are arranged together at the end of the section in which theyare mentioned) by imaginary lines (or surfaces) into a finite number ofdiscrete sized subregions or finite elements. A discrete number of nodalpoints are established with the imaginary mesh that divides the region.These nodal points can lie anywhere along, or inside, the subdividing meshlines, but they are usually located at intersecting mesh lines (or surfaces).Usually, the elements have straight boundaries and thus some geometric

Page 14: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.3 General finite element analysis procedure 5

approximations will be introduced in the geometric idealization if the actualregion of interest has curvilinear boundaries.

The nodal points are assigned identifying integer numbers (node num-bers) beginning with unity and ranging to some maximum value, say M.Similarly, each element is assigned an identifying integer number. Theseelement numbers also begin with unity and extend to a maximum value,say NE. As will be discussed later, the assignment of the nodal numbersand element numbers can have a significant effect on the solution time andstorage requirements. The analyst assigns a number of (generalized)degrees of freedom, (dof), say NG, to each and every node. These are the(unknown) nodal parameters that have been chosen by the analyst togovern the formulation of the problem of interest. Common nodal par-ameters are pressure, velocity components, displacement components, dis-placement gradients, etc. The nodal parameters do not have to have aphysical meaning, although they usually do. It will be assumed herein thateach node in the system has the same number (NG) of nodal parameters.This is the usual case, but it is not necessary. A typical node, Fig. 1.1, willusually be associated with more than one element. The domains of influenceof a typical node and typical element are also shown in Fig. 1.1. A typicalelement will have a number, say N, of nodal points associated with itlocated on or within its boundaries. It is assumed herein that every elementhas the same number (N) of nodes per element. This is the usual situation,but again it is not necessary in general.

This idealization procedure defines the total number of degrees of free-dom associated with a typical node and a typical element. Obviously, thenumber of degrees of freedom in the system, say NDFREE, is the productof the number of nodes and the number of parameters per node, i.e.NDFREE = M* NG. Similarly, the number of degrees of freedom perelement, say NELFRE, is defined by NELFRE = N* NG.

Recall that the total number of degrees of freedom of the system cor-responds to the total number of nodal parameters. In general the systemdegree of freedom number, say NDF, associated with parameter numberJ at system node number I is defined (by induction) as:

NDF=NG*(I_1)+J, (1.1)

where 1 I M and 1 J NG so that 1 NDF NDFREE. Thiselementary equation forms the basis of the program "bookkeeping" methodand thus is very important and should be clearly understood. Equation(1.1) is illustrated for a series of one-dimensional elements in Fig. 1.2,where a system with four line elements, five nodes and six degrees offreedom (dof) per node is illustrated (i.e. M = 5, NE = 4, NG = 6, N2). There are a total of thirty dof in the system. We wish to determine the

Page 15: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6 1. Finite element concepts

dof number of the fifth parameter (J = 5) at system node number four(1 = 4). Equation (1.1) shows that the required result is NDF = 6(4 —

1) + 5 = 23 for the system dof number. For element three this correspondsto local dof number 11 while for element four it is local dof number 5.Therefore we note that contributions to system equation number 23 comesfrom parts of two different element equation sets.

In addition to the above constants it is necessary to define the dimensionof the space, say NSPACE, that is associated with the problem. As willbe pointed out as the discussion proceeds, these quantities can be used tocalculate the size of the storage requirements for the matrices to begenerated in the analysis. The actual programs that read the problem datawill be discussed in a later section.

Data must be supplied to define the spatial coordinates of each nodalpoint. This array of data, say X, will have the dimensions of M*NSPACE.It is common to associate an integer with each nodal point. The purposeof the code is to indicate which, if any, of the nodal parameters at thenode have boundary constraints specified. This vector of data, say IBC,contains M integer coefficients. To accomplish this nodal boundary con-dition coding process recall that there are NG parameters per node. Thus,one can define an integer code, IBC, (right justified) to consist of NGdigits. Let the ith digit be a single digit indicator corresponding to the ithparameter at that node. If the indicator equals j where 0 j 9 then thisis defined to mean that the ith parameter has a boundary constraint oftype j. If the single digit indicator is zero, this means that there is noboundary constraint on that parameter. As will be discussed later, thepresent program allow several common types of nodal parameter boundaryconstraints. Figure 1.3 illustrates a set of boundary condition codes for atypical set of nodes with six parameters per node (NG = 6). This code isalso considered in the example in Section 7.3 and all the applications.

An important concept is that of element connectivity, ie the list of globalnode numbers that are attached to an element. The element connectivitydata defines the topology of the mesh. Thus for each element it is necessaryto input (in some consistent order) the N node numbers that are associatedwith that particular element. This array of data, say NODES, has thedimensions of NE*N. The list of node numbers connected to a particularelement is usually referred to as the element incident list for that element.The identification of these data is important to the use of Eqn. (1.1).

1.3.2 Approximation of element behaviour and equations

It is assumed that the variable(s) of interest, and perhaps its derivatives,can be uniquely specified throughout the solution domain by the nodal

Page 16: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.3 General finite element analysis procedure 7

parameters associated with the nodal points of the system. These nodalparameters will be the unknown parameters of the problem. It is assumedthat the parameters at a particular node influence only the values of thequantity of interest within the elements that are connected to that particularnode. Next, an interpolation function is assumed for the purpose of relatingthe quantity of interest within the element in terms of the values of thenodal parameters at the nodes that are connected to that particular element.Figure 1.4 illustrates a common interpolation associated with that particularelement. Figure 1.4 illustrates a common interpolation function and itsconstituent parts defined in terms of the nodal coordinates (x,, y), theelement area Ac, the spatial location (x, y) and the nodal parameters T1,T, and Tk.

After the element behaviour has been assumed, the remaining funda-mental problem is to establish the element matrices SC and Ce. Generally,they involve substituting the interpolation functions into the governingintegral form. Historically these matrices have been called the elementstiffness matrix and load vector, respectively. Although these matrices cansometimes be developed from physical intuition, they are usually formu-lated by the minimization of a functional or by the method of weightedresiduals. These procedures are described in several texts, and will beillustrated in detail in later chapters.

Almost all element matrix definitions involve some type of definingproperties, or coefficients. A few finite element problems require thedefinition of properties at the nodal points. For example, in a stress analysisone may wish to define variable thickness elements by specifying thethickness of the material at each node point. The finite element methodis very well suited to the solution of non-homogeneous problems; therefore,most finite element programs also require the analyst to assign certainproperties to each element. It is usually desirable to have any data that arecommon to every element (or every node) stored as miscellaneous systemdata. The analyst must decide which data are required and how best toinput and recover them.

1.3.3 Assembly and solution of equations

Once the element equations have been established the contribution ofeach element is added to form the system equations. The programmingdetails of the assembly procedure will be discussed in Section 7.2. Thesystem equations resulting from a finite element analysis will usually be ofthe form

SD=C, (1.2)

Page 17: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

8 1. Finite element concepts

where the square matrix S is NDFREE*NDFREE in size and the vectorsD and C contain NDFREE coefficients each. The vector D will contain theunknown nodal parameters and the matrices S and C are obtained byassembling (as described later) the element matrices, se and Ce, respec-tively. Matrices SC and CC are NELFRE*NELFRE and NELFRE*1 in size.In the majority of problems SC, and thus S, will be symmetric. Also, thesystem, S. is usually banded about the diagonal. It will be assumed hereinthat the system equations are banded and symmetric. l'hus, the half-bandwidth, including the diagonal, is an important quantity to be consideredin any finite element analysis. From consideration of the technique usedto approximate the element behaviour, it is known that the half-bandwidth,say IBW, of the system equations due to a typical element "e" is definedby

IBW = NG* (NDIFF + 1), (1.3)

where NDIFF is the absolute value of the maximum difference in nodenumbers of the nodes connected to the element. Equation (1.3) will bederived later. The maximum half-bandwidth, say MAXBAN, of the systemis the largest value of IBW that exists in the system. That is,

MAXBAN IBWmaximum. (1.4)

The quantity MAXBAN is one of the important quantities which governthe storage requirements and solution time of the system equations. Thus,although the assignment of node numbers is arbitrary, the analyst, inpractice, should try to minimize the maximum difference in node numbers(and the bandwidth) associated with a typical element. The assemblyprocess is illustrated in Fig. 1.5 for a four element mesh consisting ofthree-node triangles with one parameter per node. The top of the figureshows an assembly of the system S and C matrices that is coded to denotethe sources of the contributing terms but not their values. A hatched areain these indicates a term that was added in from an element that has thehash code. For example, the load vector term C(6) is seen to be the sumof contributions from elements 2 and 3 which are hatched with horizontal(—) and oblique (I) lines, respectively. By way of comparison the termC(1) has only a contribution from element 2.

In closing, it should be noted that several efficient finite element codesdo not utilize a banded matrix solution technique. Instead, they mayemploy a frontal solution or a sparse matrix solution. These importanttopics will be covered in some detail.

After the system equations have been assembled, it is necessary to applythe boundary constraints before solving for the unknown nodal parameters.The most common types of nodal parameter boundary constraints are

Page 18: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.3 General finite element analysis procedure 9

(1) defining explicit values of the unknowns on the boundary, and(2) defining constraint equations that are linear combinations of thenodal quantities.

Methods for accomplishing both of these conditions will be presented inSection 8.2. Another type of boundary condition is the type that involvesa flux or traction on the boundary of one or more elements. These elementboundary constraints contribute additional terms to the element squareand/or column matrices for the element(s) on which the constraints wereplaced. Thus, although these (Neumann type) conditions do enter into thesystem equations, their presence may not be obvious at the system level.Flux boundary conditions are considered in Sections 4.2. and 11.2. Thereare other applications where the analyst may need to specify and input theinitial terms in the system equations column vector. For example, instructural mechanics, any applied concentrated nodal forces would be readdirectly into the system column matrix. Any additional loading termscalculated within the program would then be added to the initial set ofspecified loads.

After all the above conditions are satisfied, the system equations aresolved by means of procedures which account for the sparse, symmetricnature of the problem. This can greatly reduce (by 90% or more) thenumber of calculations which would normally be required to solve theequations. The three most common methods for solving the system equa-tions are by (1) Gauss Elimination, (2) Choleski Factorization, (3)Gauss—Choleski Factorization.

The relative merits of all three methods will be discussed in Section 9.1.The present program utilizes an in core solution method. However, theprogramming concepts of out of core techniques, that must be used forvery large systems of equations, are also discussed in the literature. Thecomparison of full and compact band storage modes for S are shown inFig. 1.6. where D's, C's, R's, and dots denote non-zero entries. Note thatthe rows, R, remain as rows but that columns, C, do not. The last dot ineach row locates the bandwidth of that row. The largest bandwidth in thesystem defines the size of the array that will store the half-bandwidth ofS.

After the Eqns. (1.2) have been solved for the unknown nodal par-ameters, it is usually necessary to output the parameters, D. In some casesthe problem would be considered completed at this point, but in others itis necessary to use the calculated values of the nodal parameters to calculateother quantities of interest. For example, in stress analysis one uses thecalculated nodal displacements to solve for the stresses and strains. Ofcourse, these secondary quantities must also be output in some manner.Techniques of this type are usually called post processing.

Page 19: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10 1. Finite element concepts

1.3.4 Other considerations

The above discussion has been in terms of problems which lead to linearalgebraic equations. Other computational problems, which can arise in atypical finite element analysis, include eigenvalue problems, time integra-tion algorithms, and nonlinear problems. Entire books have been writtenon each of these subjects, but only limited discussion will be includedherein.

One related task that also often arises with the finite element techniqueis the problem of data generation. One disadvantage of finite elementprocedures is that they can require large amounts of data. For regions withcomplex geometries, the requirements of closely approximating the bound-aries together with the desirability of a fine mesh make it desirable to usea large number of nodal points and elements. The specification of thelocations of such a large number of nodal points and elements is a timeconsuming job in which there is a high probability of human error. Datapreparation and evaluation can require as much as thirty to forty percentof the total cost and time involved in the solution of large practical problems.To minimize the data preparations time and the probability of error severalschemes for the automatic generation of much of the required data havebeen developed. However, no optimum technique has yet been found.Chapter 13 presents one useful technique.

Fig. 1.1 Influence domains

Page 20: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 1.2 Calculation of degree of freedom numbers

NODE NUMBER 1 2 3 1=4 5

ELEMENT NUMBER

1 7 13 19 25NODAL 2 8 14 20 26

DEGREE OF FREEDOM 3 9 15 21 27NUMBERS 4 10 16 22 28

5 11 17 J=5, 296 12 18 24 30

Fig. 1.3 Interpretation of nodal boundary code

Boundary code for nodal parameter number, JNode IBC J=1 2 3 4 5

1 111111 1 1 1 1 1 1

2 0 0 0 0 0 0 03 220000 2 2 0 0 0 04 100 0 0 0 1 0 05 11000 0 1 1 0 0 0

Fig. 1.4 Common interpolation components

T, Nodal coordinates (x1, y,)

bI=y1—yky) = xJyk — xky,

Tk

____________

(x1, Yl) = — I k

k 2A—a,+a1+a*

Assumed polynomial Nodal parameters\ a b- c1

x,y) = [a1 b, C)] IT11

Interpolatedbk Ck 1T)

Elementquantitygeometricconstants

or(e(xy) = T, + H,e(x,y) T1 + Tk

ze(x,y) =Hc(x,y)r

Page 21: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 22: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.4 Analytic example 13

Fig. 1.6 Storage of system matrix, X

0-diagonal C-column

1.4 Analytic example

In order to review the previous introductory concepts consider thefollowing model problem which will serve as an analytic example. Thedifferential equation of interest is

d2t(1.5)

on the closed domain, x E [0, U, and is subjected to the boundaryconditions

t(L) = t0 and = q. (1.6)

The corresponding governing integral statement to be used for the finiteelement model is obtained from a variational statement. In this case the

R-row

• D • • • •

• • 0 • •...D..e ZERO

• • • D • •C • \• • D • •

L_.1 •.D•C •\ • • • . o c • • • •

\RRRR RD RRRRI \\ I. S.C D• • •i \\ 1.C.D...I\ C D •

C • • • D

I • • • • D • • • •

• • 0. • •

I fl. • D • • S •

\[J . . • 0 • •ZERO

I. . • • 0 •\ L___1,• • • D

• 0

(a) Full (b) Compact

Page 23: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14 1. Finite element concepts

variational formulation states that the function, t, which satisfies the essen-tial condition, t(L) = and minimizes

= lJL[(dt/dx)2 — 2tQ] dx + qt(O). (1.7)

also satisfies Eqns (1.5) and (1.6). in a finite element model I is assumedto be the sum of the NE element and NB boundary segment contributionsSO that

(1.8)

where here NB = 1 and I" = qt(0) and a typical element contribution is

je = j [(dte/th)2 — 2QeteJ dx

where 1e is the length of the element. To evaluate such a typical elementcontribution it is necessary to introduce a set of interpolation functions,H, such that

= He(x) Te = TeTHeT

and (1.9)c

— =dx dx dx'

where Tt denotes the nodal values of tfor element e. Thus a typical elementcontribution is

(1.10)

where

— f dHerdHe

dx(1.11)

and

if the domain, [0, L], contains M nodes such that t(0) = T1 and t(L) =TM, then the non-essential (natural) boundary term is

TbTCb = T1q.

Page 24: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.4 Analytic example 15

Clearly, both the element degrees of freedom, Te, and the boundarydegrees of freedom, Ti', are subsets of the total vector of unknown par-ameters, T. That is, T and C T. Of course, the are usually asubset of the TC (i.e., C TC and in higher dimensional problems HbC He). The main point here is that 1 = 1(T) and that fact must be consideredin the summation in Eqn. (1.8) and in the minimization. The considerationof the subset relations is merely a bookkeeping problem. As will be shownlater this allows Eqn. (1.8) to be written as

I = — TTC,

whereNE

S = BCTSCBe,e=i

NE

C

B denotes a set of symbolic bookkeeping operations. Thecombination of the summations and bookkeeping is commonly referred toas the assembly process. It is often simply (incorrectly) written as a sum-mation. No uniformly accepted symbol has been developed to representthese operations.

It is easily shown that minimizing 1 = 1(T) leads to

aI/3T = 0 = ST — C,

as the governing algebraic equations to be solved for the unknown nodalparameters, T. To be specific, consider a linear interpolation element withN = 2 nodes per element. If the element length is = — x1 then theelement interpolation is

He(x) = [(x2 — x)/Ie (x —

so (1.12)

= [ — iiie I/Ic].

Therefore the element square matrix is simply

Se....1[1 1](1.13)

while the element column matrix is

cc= f Qe

— x)}th

(x—x1)

Page 25: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

16 1. Finite element concepts

Assuming that Q = 00, a constant, this simplifies to

(1.14)

The exact solution of the original problem for Q = 00 is

t(x) = to + q(x — L) + Q0(L2 — x2)/2. (1.15)

Since for Q0 * 0 the exact value is quadratic and the selected element islinear, our finite element model can give only an approximate solution.However, for the homogeneous problem Qo = 0, the model can (and does)give an exact solution. To compare a finite element solution with the exactone, select a two element model. Let the elements be of equal length,1C = L/2. Then the element matrices are the same for both elements.

The assembly process yields, S T C. as

(1+1)

However, these equations do riot yet satisfy the essential boundary con-dition of t(L) = T3 = That is, S is singular. After applying this conditionthe reduced equations are

2 1 1 1T11 Q2L iii qi 0

1 2liTJ -or Sr Tr = C,.. Solving for T,. C,. where

1

2[iyields

rT1i 00L2 qL ilTr=t j 1+tot J.

(1.16)8 3 2 1 1

These are the exact nodal values as can be verified by evaluating Eqn.(1.15) at x = 0 and x L/2, respectively. Thus our finite clement solution isgiving an interpolate solution. That is, it interpolates the solution exactlyat the node points and is approximate at all other points. For the homo-geneous problem, Qo 0, the finite element solution is exact at all points.These properties are common to other finite element problems. The exactand finite element solutions are illustrated in Fig. 1.7. Note that thederivatives are also exact at least at one point in each element. The optimal

Page 26: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1.4 Analytic example 17

derivative sampling points will be considered in a later section. For thisdifferential operator it can be shown that the centre point gives a derivativeestimate accurate to 0(1e2) while all other points are only 0(je) accurate.For Q = Q0 the centre point derivatives are exact in the example.

Ag. 1.7 A two element solution

t(x)

dt

\ \

f2

00 0

0 L/2 L

L x

Page 27: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

18 1. Finite element concepts

1.5 Exercises

1. Derive Eqn. (1.1) by induction.2. An alternate way of assigning degree of freedom numbers is to number

the ith parameters at all nodes before numbering the (i + 1)th par-ameters. Derive by induction the resulting equation that would beanalogous to Eqn. (1.1). Does Eqn. (1.3) remain the same?

3. Repeat the graphical assembly in Fig. 1.5 after adding mid-side nodesto the elements.

4. Redraw Fig. 1.2 using NG = 3. Calculate the degree of freedom numberat I = 4, J 2.

5. Determine the maximum and minimum element degree (i.e. numberof connecting elements) of the nodes in Fig. 1.1. Also determine themaximum nodal degree of a node.

6. Construct the Pascal triangle of complete polynomial terms correspond-ing to the three triangular elements in Fig. 1.8.

7. List likely nodal parameters and required properties data for a probleminvolving: (a) linear stress analysis, (b) heat conduction, (c) potentialflow, (d) fluid dynamics, and (e) magnetic fields.

8. Employ a local coordinate system, 0 r 1, so that Eqn. (1.12) isreplaced by Hi(r) = (1 — r) and H2(r) = r, where x(r) = H1x1 + H2x2.Evaluate Eqn. (1.11) using this system.

9. Evaluate the element matrices se and CC when Q varies linearly overthe element.

10. Suggest how to evaluate numerically the convergence rate of the centrepoint element derivatives as the element sizes decrease uniformly.

11. Replot Fig. 1.7 considering only the particular part of the exact andfinite element solutions.

Fig. 1.8 First three members of the triangular element family

AA

Page 28: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2

Control and input phase

2.1 Introduction

The practical application of the finite element method requires the useof a computer and a sizeable amount of programming effort. If a potentialuser of the finite element method were forced to program the entire codefrom scratch, he would be faced with a long, difficult, and often impracticaltask. It is therefore essential that the programming effort and knowledgeof previous workers be utilized as much as possible. A number of largefinite element computer codes have been developed. Several of the earlycodes were developed at a great cost in both money and labour, yet theywere highly specialized, machine dependent, and difficult to modify; thusthey rapidly became obsolete.

The most desirable types of general purpose finite element codes arethose that are designed for comprehension, modification, and updating bythe user. It is also desirable for the user to be familiar with the internalfunctions of the computer code if full advantage is to be taken of its basicpotential and if inappropriate applications are to be avoided. These desir-able objectives are most easily met if the program consists of severalbuilding blocks or modules. Generally, any specific function performedwith some degree of repetition (or having a particular educational value)is separated into a distinct subroutine (or module) with a conscious efforton the part of the original programmer to make obvious the subroutine'sfunction. By applying this concept one can establish a program library thatcontains many such building blocks. Then, for a given application, it ispossible for the user to assemble the appropriate subroutines from thelibrary plus any that he has written to meet his special needs. Of course,such a system of finite element codes generally requires a simple mainprogram whose function is to call the various required subroutines in theappropriate order.

This modular approach to programming a finite element code has a

19

Page 29: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

20 2. Control and input phase

number of important advantages. From the educational point of view, itis useful in that the student of the finite element method has only to masterone elementary concept at a time. Therefore, it is easier to master thegeneral programming concepts associated with the finite element method.The modular approach also makes it easier to apply the finite elementtechnique to various fields of analysis such as heat transfer, fluid flow, andsolution of differential equations. It also reduces to a minimum the amountof computer codes that the user must write when undertaking an analysisin a new field of application. Of still greater importance, however, is thefact that the modularity of such a code allows someone other than theoriginal author to keep a program from becoming obsolete by incorporatingnew types of elements, solution techniques, input/output routines and otherfacilities as they become available. The various building block programsto be presented herein were developed by the author with these objectivesin mind. These programs have been kept as short and independent as ispractical in order to make their application as general as possible. Theauthor has also attempted to reduce the solution time and storagerequirements.

A typical finite element program will require the storage of a largenumber of matrices. These matrices include the spatial coordinates of thenodes, the element incidences, the element matrices, the system equations,etc. In general, the size of a typical matrix can be defined by the controlparameters (number of nodes, number of elements, etc.) and/or the inputdata (element nodal incidences, etc.). This fact allows the programmer toutilize efficiently the available in-core storage. Unfortunately, most pro-grams do not take advantage of this option. Instead they specify, once andfor all, the maximum size of each array. That is, the program sets limitson the maximum number of nodal points, elements, boundary conditions,etc. Usually a typical problem will at most reach one or two of these limitsso that the sizes of the other matrices are larger than required and storageis wasted. Of course, the size of the limits can be changed, but this usuallyinvolves changing several dimension statements in the program and itsvarious subroutines. A procedure is described which allows for the semi-dynamic allocation of storage for these matrices. The first step is to dimen-sion a single vector of a size large enough to contain all the matrices neededin an average problem. Next, the size of each matrix is calculated, for theproblem of interest, by using the control parameters and the input data.Then, as illustrated in Fig. 2.1, a set of pointers is defined to locate theposition, in the storage vector, of the first coefficient of each matrix ofinterest. By using this approach, the user has only one limit about whichto worry. That limiting number is the dimension of the single storage vectorand that limit in turn is usually governed by the size of the computer system

Page 30: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2. 1 Introduction 21

to which the user has access. Only one dimension card has to be changedto modify the in-core storage capacity of the present building block pro-gram. The disadvantage is that one must do the extra "bookkeeping"necessary to define the pointers to locate the matrices.

In some cases, an additional storage saving is possible through over-writing. Referring to Fig. 2.1 for three representative matrices, A (3 x 3),B (1 x 5), C (2 x 1), assume that the matrix B is generated, stored andcompletely utilized before matrix C is generated and stored. Thus, to savestorage space one could define the pointer for matrix C as 13 = 12. Thiswould result in the coefficients of matrix C, and the following matrices,being stored in the now unneeded space that matrix B occupied.

It is possible to write a FORTRAN code so as to obtain true dynamicstorage allocation abilities, see E17]. However, these extra details will notbe considered here.

FIg. 2.1 An efficient matrix storage technique

- 3x3

1x5

2x1

14

I

Matrix C

L Storage vector V

Page 31: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

22 2. Control and input phase

2.2 Control of major segments

The controlling main program and the data input routines are veryimportant to the user. They significantly affect the ease of program use aswell as its range of analysis capabilities. However, they vary greatly fromone program to the next. For example, large commercial packages suchas PAFEC [39], tend to have special control macros, free-format input,and extensive graphics to simplify the ease of use. Other small systemsmay use special macros to simplify the order of data input. An exampleof this type of code is the one presented by Taylor [69] in the appendix ofthe text by Zienkiewicz. Other programs often use the more classical typeof fixed format data input. That is the procedure utilized here in theMODEL program.

The major point of the discussions of the routines in MODEL is toillustrate the typical calculations that go on within a finite element analysissystem. The details of interfacing with the user are given lesser importancehere. However, when considering a large commercial code a user shouldprobably reverse the order of the above priorities.

Having made these choices for MODEL the details of how the controllingprogram and input routines work is probably not important to the readerat this time. However, for the sake of completeness the input formats andthe subroutines employed for these phases are given in Appendix A.

Figure 2.2 presents a flow chart that illustrates the major steps that fallunder the control of the main program, MODEL. It is important that oneunderstand the relationships between these operations. The first half ofthe steps, down to point 1, deal with initializing the system, determiningthe input options to be utilized, reading and printing the input data, andassigning storage locations that will hold the information to be generatedin later phases. For future reference, Fig. 2.3 lists the names of the majorsubroutines that control the corresponding segments listed in Fig. 2.2.

The steps from points 1 to 2, in Fig. 2.2, deal with the generation ofelement matrices, setting up data to be used for later secondary calculations,assemblying the system matrices, and applying the essential boundaryconditions before solving the equations. Between points 2 and 3 the systemequations are solved (factorized) to yield the unknown nodal parameters.If additional calculations are desired then the required auxilary data arerecovered from storage and the post-solution calculations are executed.

A problem with a material or geometric nonlinearity would have anadditional loop such as the one shown between points 1 and 3 in Fig. 2.2.For example, if a temperature calculation involves temperature dependentthermal conductivities then it is necessary to estimate initially the conduc-

Page 32: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2.2 Control of major segments 23

tivities in each element. After the nodal temperatures have been computeda more accurate value of the conductivity is obtained and compared withthe previous estimate. If all element conductivities are reasonably close tothe estimate then the calculated temperatures are acceptable, otherwisea new estimate must be made and the solution repeated.

A linear time dependent problem would involve a loop through points2 and 3 at each time step. Other combinations are possible such as anonlinear dynamic analysis that requires material property iterations at theend of each time step. Thus the main controlling program can haveplicated logic if it is designed to be very general.

The major subroutines ASYMBL, APLYBC, FACTOR, SOLVE, andPOST that are listed in Fig. 2.3 will be considered in more detail in a laterchapter. Their names and comparison of Figs. 2.2 and 2.3 should suggesttheir major functions. The assembly segment control program, ASYMBL,uses several of the subroutines to be discussed in Chapters 3 and 4. It willbe discussed in detail in Chapter 7. However, Fig. 2.4 is included here tooutline its major operations and to identify the relative functional positionsof some of the routines to be presented in the next few chapters. Chapter4 will discuss typical procedures utilized in the generation of elementmatrices. Additional specific details are given later beginning in Chapter10. Figure 2.5 illustrates the flow of operations in the element generationcontrol segment, GENELM, and identifies some of the subroutines itutilizes.

Since the generation of the popular isoparametric elements requiresspecial programming considerations they are given detailed attention inChapter 5. The major steps that occur in a program, say ISOPAR, thatcontrols the generation of isoparametric elements is shown in Fig. 2.6. Italso identifies typical routines to be presented later. From Fig. 2.6 it isnoted that isoparametric element generation usually requires the knowledgeof element interpolation, or shape, equations and numerical integration.The latter two topics are included in Chapter 6.

Following the presentation of the assembly procedures in Chapter 7 theapplications of the algorithms for applying constraints to the nodal dof isdiscussed in Chapter 8. A flow chart for the operations in a controllingroutine, say APLYBC in Fig. 2.3, is given in Fig. 2.7. As discussed later,the type of constraint is defined by the number of dof occurring in thelinear constraint equation given in the input data.

Chapter 9 will give specific details of the equation solution process andthe output of the calculated nodal dof, that is the operations of FACTOR,SOLVE, WRTPT, and WRTELM in Fig. 2.3. It also gives the typicalprocedures for executing any post-solution calculations defined at theelement level and stored at assembly time. These are listed in Fig. 2.8.

Page 33: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

24 2. Control and in put phase

Very detailed examples of common applications of finite element analysismethods are given in Chapters 10, 11, and 12. These include the elementmatrices, typical post-solution quantities of practical importance, and spe-cific input and output data. To aid in generating larger and more practicalmeshes, Chapter 13 is included to present an algorithm for automatic meshgeneration. The last two chapters are included to demonstrate the imple-mentation aspects of selected time dependent finite element solutions.However, since there are at least thirty time integration algorithms theones presented may not be typical of those procedures employed in themore advanced applications.

As the reader proceeds through the following chapters it will probablybe useful to refer back to flow charts given previously. If the reader isinterested in searching in the text for specific programming details, thenthe Index of Subroutines along with these flow charts should allow the textto also serve as a quick reference book.

Page 34: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 2.2 A typical analysis sequence

START

ZERO

11/0 CONTROL DATAI

BEGIN ARRAY POINTERS

I/O SPATIAL, TOPOLOGICAL.& BOUNDARY CODE DATA

L I/O CONSTRAINT EQUATIONS DATA

I/O PROPERTIES DA1 A

INITIAL CONDITIONS

I/O ELUX CONDITIONS

DETERMINE. HALF-BANDWID ti-I

A

L

COMPLETE ARRAY POINTERSCHECK DIMENSIONS

Page 35: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 2.3 Subroutines related to the segments in Fig. 2.2

I-----

(CORECT)

I I

I I

i (MODEL)I I

I I

L___I———-—

Stop

Start

Page 36: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 2.4 A typical assembly flow chart

Generate corresponding systemequation numbers: INDXEL

Generate element square, column,boundary flux, and post-

solution matrices: GENELM

Add the element matrices into thesystem equations: STORSO, STORCL

Start

(Begin element loop)

p.

element nodes: LNODES

noReturn

Page 37: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 2.5 A typical element generation procedure

Start

Retrieve element nodal coordinates: ELCORD

Retrieve element properties: ELPRTY, LPTPRT]

If nonlinear, recover nodal dof

[of element: ELFRE

[Form element square matrix: ELSQ

Form element column matrix: ELCOL

Generate and save the post-solution data: ELPOST

Return

Page 38: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 2.6 Steps in generating matrices for isoporametric elements

Return

Page 39: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 2.7 Applying nodal constraints to the system equations

Generate penalty matricesand add to systemequations: PENLTY, PENMOD

Page 40: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 2.8 Evaluating element's post-solution variables

Return

Page 41: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

32 2. Control and input phase

2.3 Data input

The basic data dealing with the nodal points and elements are read bysubroutine INPUT. This routine reads the node number, boundary codeindicator and the spatial coordinates for every node in the system. Nextit reads the element number and the element incidences (node numbersof all nodal points associated with the element) for every element in thesystem. These data are also printed for the purpose of checking the inputdata. Given the number of nodes, number of elements, the number ofnodes per element, number of parameters per node, and the dimensionsof the space, this subroutine sets aside storage for the spatial coordinates,element incidences, and the nodal point boundary code indicator. Thisroutine and its input instructions are shown in the Appendix.

The nodal point boundary code indicator serves the important task ofindicating the number and type of nodal parameter boundary conditionsoccurring in the system. Several pieces of data are included in this code.Subroutine PTCODE extracts these data. This program takes the integerboundary code indicator (consisting of NG digits, right justified) andextracts NG single digit integer codes. These single digit codes range fromzero to nine and they identify the type of constraint equation (defined bythe analyst) that the parameter must satisfy. A zero code implies noconstraint. This allows the analyst to write programs to handle up to ninetypes of boundary constraint conditions. The present set of building blockprograms use only the single digit values of 0, 1, 2, and 3.

After subroutine PTCODE has extracted the NG single digit integercodes associated with the NO parameters at a node, these codes must bescanned to count the number of different types of nodal parameter boundaryconditions encountered in the system. This is done by subroutine CCOUNTwhich utilizes the nodal point indicators, KODES, to count the numberof non-zero constraints of each type that occur in the system. SubroutineCCOUNT calls subroutine PTCODE, and both are given in the Appendix.For the example shown in Fig. 1.3, the constraint indicator counts arenineteen zeros, nine ones and two twos. As discussed in Section 1.3, thesedata imply nine Type 1 nodal parameter constraints and one Type 2constraint.

Once the number and type of nodal parameter boundary conditions havebeen determined, it is necessary to supply the constraint equation data.These nodal parameter constraint data are read by subroutine INCEQ (seeAppendix). The nodal parameter constraint equations will be discussedin detail in Section 8.1. At this point it is only necessary to note that thepresent program allows the following three types of linear equations:

Page 42: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2.3 Data input 33

TYPEI D1=A

TYPE2 AD1+BDk=C (2.1)

TYPE3 ADJ+BDk+CDI=E

where A, B, C, and E are constants and j, k, and I denote system degreeof freedom numbers associated with the nodal parameters (D). The pro-gram can easily be expanded to allow for nine types of linear constraintequations. Regardless of which type of constraint equation one has, it isstill necessary for the analyst to input the constant(s) and identify thedegree of freedom number(s). The degree of freedom numbers are iden-tified indirectly by specifying the node where the parameter is located andits local parameter number. The coefficients in the equation are specifieddirectly. Subroutine INCEQ reads two sets of data for each constraintequation of each type. These data include identification (node number,parameter number) of the constrained degree of freedom numbers and thecorresponding coefficients of the constraint equation. The input formatsfor this routine are shown at the beginning of the Appendix.

As outlined in the above section, the present program specifies threeallowable types of linear constraint equations. It can easily be expandedto allow for nine (or more) types of linear constraint equations. For anygiven type of linear constraint equation it is necessary to define an integerarray, NDX, and a floating point array, CEQ. Both of these arrays willhave the same number of rows. The number of rows is of course equal tothe maximum number of degrees of freedom in the constraints. Each rowof the integer array contains the system degree of freedom numbers of thenodal parameters occurring in a particular constraint equation. The floatingpoint array contains the corresponding set of coefficients occurring in theconstraint equation. The number of columns equals the total number ofnodal constraint equations.

The degree of freedom numbers will be calculated from the input databy using Eqn. (1.1) and the input coefficients will be modified so that thecoefficient associated with the first parameter in the equation is defined tobe unity. For example, a TYPE 2 constraint equation AD1 + BDk = Cbecomes D1 + aDk b, where a = B/A and b = C/A. Thus, it will benecessary to store only two integers (j and k) and two floating pointnumbers (a and b) for each equation of this type. In general, the numberof rows in these two arrays equals the constraint type number. The use ofthese data will be shown in Section 8.1.

Subroutine INPROP (Appendix) inputs the various properties necess-ary to define the problem. If there are nodal point properties, then thenode number and corresponding properties are read for each nodal point.

Page 43: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

34 2. Control and input phase

Similarly, if element properties are to be input, the element number andcorresponding properties are read for each element. Finally, any miscel-laneous system properties are also read. The user is allowed the option ofspecifying the nodal point and element properties to be homogeneous.This greatly reduces the required amount of data in several problems. Thespecific input instructions are presented in Appendix A. Later applicationswill illustrate the use of these properties.

In some applications, the initial forcing vector (system column matrix)terms will be known to be non-zero. In such cases, the non-zero initialcontributions must be input by the analyst. Subroutine INVECT readsthese contributions and then prints the entire initial load vector. Thesubroutine is also shown in the Appendix, as are the corresponding inputinstructions. In subroutine INVECT each specified coefficient has an iden-tifying parameter number and system node number associated with it. Itis necessary to convert the latter two quantities to the corresponding systemdegree of freedom number. This calculation is defined by Eqn. (1.1), whichis included in subroutine DEGPAR for possible uses elsewhere.

There are numerous applications with boundary conditions which do notdirectly involve the nodal parameters. Usually these conditions involve aflux across, or traction on, a specified segment of an element boundary.For example, in a heat transfer problem one may specify the componentsof the heat flux across a portion of the boundary, while in stress analysisone may have an applied pressure acting on a portion of the structure'ssurface. Generally, these types of boundary conditions lead to contributionsto the system matrices. The calculations of these contributions are closelyrelated to the calculation of the element's square matrix and column matrix.The latter two matrices are discussed in Sections 4.2 and 5.3. The additionof the flux contributions to the system matrices is closely related to theprocedures to be given in Section 7.2.

Subroutine INFLUX (see Appendix together with its input formats)reads the flux type boundary condition data for each boundary segment.The actual calculation of the flux contributions is carried out by a problemdependent subroutine called BFLUX which is discussed later. If the speci-fied segment has LBN nodes associated with it and NO parameters pernode, then subroutine BFLUX would utilize the NO components of FLUXto calculate the contributions of the flux to the NFLUX = LBN * NOsystem degrees of freedom on that segment. Since the actual calculationsin BFLUX would vary from one application to another the analyst couldchoose to interpret the specified flux components to be normal and tan-gential to the segment instead of being components in each of the spatialdirections.

Page 44: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2.4 Exercises 35

2.4 Exercises

1. Several programs test for gaps in the input of sequential data. Such gapsare filled by generating supplemental data by linear interpolationbetween the bounding data sets. Write a supplementing input subroutinethat will:(a) assign missing coordinates by linear interpolation and set the bound-ary code equal to the last value before the gap; and(b) assign missing element incidences lists by incrementing consistentlyfrom the two lists bounding the gap.

2. Structural analysis can require solutions for several forcing vectors (sys-tem column matrices). Modify INVECT to account for NRHS suchvectors. That is, expand CC to a rectangular array. What correspondingchanges do you think would occur in the control variables and storagepointers?

3. With quadratic (or cubic) elements it is desirable for omitted mid-side(or third point) coordinates to lie on a straight line between the boundarycorner points. Write a routine to calculate these coordinates. Wouldchanges in INPUT be required?

4. The properties' definitions do not specifically include a definition of amaterial number and a number of properties per material. Later appli-cations will show how this can be done. Write the changes necessary todirectly include the input of such properties.

5. It is common for Type 1 nodal constraints to assign zero nodal values.Write a version of INCEQ that will assign a default value of zero to anyomitted type 1 constraint. If necessary, include IBC or other quantitiesin the argument list.

6. A number of codes allow only Type I nodal boundary codes. Thus forparameter I at a node KODE(I) is zero or unity. Only dof with a zerocode need to have an equation number. Write a routine to generate anarray, say IDEQ(NG, M), that contains the equation number of par-ameter I of node J for all I NG and J M. The equation numberIDEQ(I, J) is zero if the parameter is specified with a Type 1 constraint.

7. Use the IDEQ array to generate an element location array, say LM(NG,N, NE), where LM(I, J, K) contains the equation number of dof I oflocal node J on element K.

Page 45: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 46: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

3

Pre-element calculations

3.1 Introduction

After the problem control parameters and properties have been input,some useful preliminary calculations can be executed. One important stepis the calculation of the half-bandwidth size of the system equations. Thisinformation is necessary to calculate the amount of storage to be requiredby the system equations. It is used to test the feasibility of proceeding withthe calculations. This type of calculation requires the identification of thenode numbers (element incidences) connected to a typical element. Thelatter operation is performed by subroutine LNODES. This subroutineextracts the N element incidences of a specified element from the elementincidences list for the entire system. As shown in Fig. 3.1, the N elementincidences are stored in a column matrix, called LNODE.

This elementary operation is also very important to the bookkeepinginvolved in various parts of the program. The operation is illustrated inFig. 3.2. Once the element incidences of the specified element have beenextracted (by subroutine LNODES) from the input data, they are scannedto determine the maximum difference in these node numbers. This differ-ence is node numbers is then substituted into Eqn. (1.2) to determine thehalf-bandwidth associated with that particular element, without regard tothe effect of constraints. These elementary operations are executed bysubroutine ELBAND, which is shown in Fig. 3.3, and they are based onFig. 3.4.

The simple but important task of determining the value of the maximumhalf-bandwidth of the system equations is performed by subroutine SYS-BAN, Fig. 3.5. The half-bandwidth of each element is checked and thelargest value found in the system is retained. The system equations usuallyoccupy a very large percentage of the total storage. Knowing the systemequation's half-bandwidth, determined above, and the total numbers of

37

Page 47: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

38 3. Pre-element calculations

degrees of freedom in the system, the storage requirements for thesebanded, symmetric equations are easily determined. It is possible for nodalparameter constraint equations to increase the half-bandwidth of the systemequations. This depends on how the constraints are implemented.

There are certain basic operations that must be carried out before oneactually generates the element matrices for the particular problem understudy. For simplicity it will be assumed that the problem under study islinear and involves a quadratic functional. One must always use the spatialcoordinates of the nodes associated with the element. Recall that the spatialcoordinates of all the nodal points and the element incidences of allelements are available as input data. Thus to define an array containingthe spatial coordinates of the nodes associated with an element one simplyextracts its element incidences with subroutine LNODES and then extractsthe spatial coordinates of each node in the list of incidences. The presentprogram for this purpose, ELCORD, is shown in Fig. 3.6. A similarprogram, PTCORD, for extracting the spatial coordinates of a single nodeis shown in Fig. 3.7.

Fig. 3.1 Subroutine LNODES

SUBROUTINE LNODES (LID,NE,N,NDDES,LNCUE)CC EXTRACT NODES ASSOCIATED ELEMENT LIDC ** ************************

CIMENSION NI3DES(NE,N), LNODE(N)C NE = NUMBER OF ELEMENTS IN SYSTEMC N NUMBER OF NODES PER ELEMENTC LID = ELEMENT NUMBERC NODES = NODAL INCIDENCES OF ALL ELtMENTSC [MODE = THE N NODAL INCIDENCES OF THE ELEMENT

DO 10 I = 1 N10 INCOE(II = N6DES(LJD,1)

RETIRNEND

Page 48: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 3.2 Typical mesh data

Msl1*NSPACE

I 000RD I

NE.N

LNODE

Nodal Nodal Incidences of allbaindary coordinates elementscodes

FIg. 3.3 Subroutine ELBAND

SUBPOUTINE ELBAND (N,NG,I 8W,CC ELEMENT bANDWIDTH CALCULATIONC

DIMENSION LNODE(NIC LNODE = ELEMENT INC1DENCESC N = NUMbER OF NODES PER ELEMENTC = NUMbER OF PARAMETERS PER NODEC 18W = HALF BANDWIDTH INCLUDING Ii-IE DIAGONALC CF A SYMMETRICAL SYSTEM

18W = 1

NLESS = N — 1DC 2C I = L,NLESSII = I + 1IN! = LNODE(I)IF ( LN1.LT.1 I GO TO 20DO 10 J = II NNEW = + 1)IF ( NEW.GT.IBW 1 18W = NEW

10 CCNTINLJE20 CC.NIINUE

RET L. RNEND

Page 49: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 3.4 Element bandwidth and column sizes

t.E— C LBW

FIg. 3.5 Subroutine SYSBAN

SUBROUTINE SYSBAN (NE,N,NG,IBw NOCES LNCCE LMAX)CC DETERMINE UPPER HALF BAND WIDTH OF SYSTEMC

DIMENSION NODES(NE,N), LNODE(N)C NE = NUMBtR OF ELEMENTS IN SYSTEMC N = t'4UMaER OF NODES PER ELEMENTC NO = NUMBtR OF PARAMETERS (DOFI PER ELEMENTC IBW = MAXIMUM HALF BANDWIDTH = LBn MAXC NODES = NLDAL INCIDENCES OF ALL ELEMENTSC INODE tLEMENI INCLDEP'ICES LISTC LBW = ELEMENT HALF BANDWIDTHC LMAX = LAST ELEMENT CAUSING LBW

IMAX 1IBW = IDO 20 1=1 NECALL LNOD&S (I,NE,N NODES LNODE)CALL ELBAND LNO6EIIF ( LBWIBW 1 20,20,10

10 IBW = LBWLMAX = I

20 CCNTINUERETURNEND

I

I

Page 50: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

3.2 Property retrieval 41

FIg. 3.6 Subroutine ELCORD

SUBROUTINE ELCORD (M,N,NSPACE1X,COOR0,1N00E)CC

DETERMINE CCORDINATES CF NCUES ON ELEMENT

EOP IMPLICIT R[AL$B(A—H,O—flDIMENSICt' LNCDF(MI

C N NUMBER OF NODE TENC NSPACE = OF SPACEC N NUMBER CF NODFS PFR ELFMFNT

X =

C = INCIDENCEc CF ELEMENTDO 20 K 1,NSP#CE00 tO I —IF C LNOCE(1).LT.L J GO TC ICCOORD(I,KI =XILNOOF(I),K)

10 CONTINUE20 CONTINUE

RETURNF ND

Fig. 3.7 Subroutine PTCORD

SUBROUTINE PTCORD (IPT,M,NSPACE,X.CCORD)CC EXTRACT COORDINATES OF POINT NUMBER IPTCCOP IMPLICIT REAL*8(A—H 0—LI

XIM,NSPA1E), COOROIL,NSPACE.IC X = SPATIAL COORDINATES OF ALL NODES IN SYSTEMC COORO = SPATIAL COORDINATES OF THE NODEC M = TOTAL NUMBER OF NODES IN SYSTEMC N = NUMBER OF NODES PER ELEMENTC NSPACE = DIMENSION OF THE SPACE

DO 1C ..$ = i,NSPACE10 COORD(1,JI

RETURNEND

3.2 Property retrieval

Recall that the input data include the element properties for each elementin the system. Thus it is a simple matter to scan these data and extract theproperties for any particular element. This operation is executed by sub-routine ELPRTY. After the element properties have been extracted theycan be passed to the subroutine(s) that calculate the element matrices. Theabove discussion assumed that the element properties do not vary spatiallyover the element. If this is not the case then it would be necessary tointroduce an alternative procedure that could define a spatial variation ofelement properties. This could be accomplished by inputting the propertiesat the nodal points and using the element interpolation functions to alsodefine the spatial variations of the properties.

Subroutine LPTPRT can be used to establish an array containing thenodal point properties of all nodes connected to a particular element. The

Page 51: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

42 3. Pre-elemer?t

routine uses the element incidence list to guide the extraction of the properdata from the input nodal properties array. The properties data associatedwith the element incidences are stored in array PRTLPT and are passedto the element matrices routines. Subroutines ELPRTY and LPTPRT areshown in Fig. 3.8 and Fig. 3.9, respectively. The ability of the finite elementmethods to treat many different types of properties is one of their majorpractical advantages. Examples of the types of properties (or differentialequation coefficients) that one commonly encounters are the thermal con-ductivity in a heat conduction analysis and the nodal point temperaturesin a thermal stress analysis. Several specific examples of typical propertydata will be given in the example applications beginning in Chapter 10.

Consider a typical nodal point in the system and recall that there areNG parameters associated with each node. Thus at a typical node therewill be NG local degree of freedom numbers (1 J NG) and a corre-sponding set of system degree of freedom numbers. If! denotes the systemnode number of the point, then the NG corresponding system degree offreedom numbers are calculated by utilizing Eqn. (1.1). These elementarycalculations are carried Out by subroutine INDXPT. The program assignsNG storage locations for the vector, say INDEX, containing the systemdegree of freedom numbers associated with the specified nodal point—seeTable 3.1 and Fig. 3.10 for the related computations.

Recall from the previous section that in order to calculate the systemdegree of freedom numbers at a point it is necessary to know the systemnode number of the point. Similarly, it is necessary to know the systemnode numbers (element incidences) associated with a particular elementif one wishes to calculate the system degree of freedom numbers associatedwith the element. By utilizing the list of N nodal points (element incidences)associated with a specific element, it is possible to again apply Eqn. (1.1)and calculate the system degree of freedom numbers that correspond tothe N*NG parameters assigned to the specific element. These calculations,illustrated in Table 3.2, are executed by subroutine INDXEL as shown inFig. 3.11. Storage locations are established for the N element incidences(extracted by subroutine LNODES) and the N*NG system degree offreedom numbers, in vector INDEX, associated with the element.

If the properties depend on the nodal parameters, as they often do inan iterative solution, then one may need to recover the previous nodalparameters associated with an element. Subroutine ELFRE, Fig. 3.12,uses the above element INDEX vector to extract those data. We will seetypical uses of the above pre-element calculations in later sections.

Page 52: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 3.8 Subroutine ELPRTY

SUBROUTINE ELPRTY (LID,LHOMO,1P3, 1P4,JP2,KP2,1 LPF1X,FLTEL,LPRUP,ELPRCP)

CC EXTRA(..T PROPERTIES OF A ELEMENI,LID, FROM TCTAIC PROPERTIES ARRAYSCCDP IMPLICIT REAL*8(A—H,O—Z}

FLTEL(1P3,KP2J, ELPROP(KP21,1 LPFIX(1P4,JP2), LPROPLJP2)

C LPFIX = SYSTEM ARRAY OF FIXED PT ELEt4 PROPERTIESC LPROP ELEM FIXED PT PROPERTIES ARRAYC FLTEL = SYS ARRAY OF FLOATING PT NODAL PROPC = ELEM FLOATING PT PROPERTIES ARRAYC IF LHOMO=I ELEMENT PROPERTIES ARE HtMOGENEOUS

I = LIDIF ( LHOMO.EQ.1 I I = 1

C FLOATING POINT PROPERTIESDO 10 J =

10 ELPROP(J1 = FLTEL(I,JIC FIXED POINT PROPERTIES

DO 20 J = 1,JP220 LPRCP(J) = LPFIX(I,JI

RETURNEND

Fig. 3.9 Subroutine LPTPRT

SUBROUTINE LPTPRT1 LNODE,NHQMO)

CC EXTRACT FLOATING POINT PROPERTIES AT NCOAL PCINTSC OF AN ELEMENTCCDP IMPLICIT REAL*8 (A—H,O—Zi

DIMENSION FLTNP(IP1,KP1I, PRTLPT(1P5,KP1}, LNODE(NIC FLTNP FLOATING POINT PROP. ARRAY SYSTEM NODESC PRTLPT= FLOATING POINT PROP. ARRAY tiE ELEMENT NCDESC INODE = ELEMENT INCIDENCES ARRAY CF THE ELEMENTC N = NUMBER OF N(DES PER ELEMENTC IF NHOMO=1 NCOAL PROPERTIES ARE HCMCGENtOUS

DO 20 I = 1 N= LNDDELII

IF ( ) IROW = 100 10 J = 1,KPI

10 PRTLPT(I,J) = FLTNP(IROW,JI20 CONTINUE30 CCNTINUE

RETURNEND

Fig. 3.10 Subroutine INDXPT

SUBROUTINE INDXPT UPT,NG,INOEXICC DETERMINE DEGREES OF FREEDOM NUMBERS AT NOCEC ** ************** ** ** ******

DIMENSION INDEX(NGIC IPT = SYSTEM NODE NUMBERC NG = NUMBER OF PARAMETERS (DOE) PER NODEC INDEX = SYSTEM DOF NOS OF NODAL DOF

= NG*(IPT—1JDO 10 J = 1,NG

C INDEX(JI = NG*(IPT—1I + J10 INDEX(JI = NGIMI + J

RET RNEND

Page 53: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 3.11 Subroutine INDXEL

SUBRCUTINE INDXEL (N,LEMFRE,NG,LNCDE,INOEX)CC DETEMMINE OEGREES OF FREEDOM NUMBERS CF ELEMENTC

DIMENSIUN INDEX(LEMFRE1, LNODE(N1C N = OF NODES PER ELEMENTC NO = NUMBER OF PARAMETERS (DOF) PER NODEC LEMFRE = N*NG = NUMBER OF DOF PER ELEMENTC LNODh = NODAL INCIDENCES OF THE ELEMENTC INDEX = SYSTEM DOF NOS OF ELEMENT OaF

00 20 I( = 1,NIDOF = —MGIF ( LNiJDE(KI.GT.O ) IDOF = IDOF + NG*LNCOE(K)NGKM1 = NG* (ic—ilCO 10 IG = 1,NGIELM = N(,KML + IG

C = NG*(LNODE(K)—fl+IG10 INDEX(IELM) = IDOF + IG20 CCMIINUE

RETL RNEND

Fig. 3.12 Subroutine ELFRE

SUBROUTINE ELFRE (NDFREE,NELFRE,C,DC,INCEX)CC EXTRACT ELEMENT DEGREES OF FREEDOM FROM SYSTEM DOFCCOP IMPLICIT REAL*8(A—H,O—Z)

DIMENSION D(NELFRE), DD(NDFkEE), INCEX(NELFRE)C D = NODAL PARAMETERS ASSOCIATEDC DO = SYSTEM ARRAY OF NODAL PARAMETERSC = ARRAY OF SYSTEM DEGRtE OF NUMBERSC NELFiE = NUMBER OF DEGREES OF FREEDGM PER ELEMENTC NOFFEE = TOTAL NUMBER OF SYSTtM CEGkEES CF FREEDCM00 10 1 = 1,NELFRE[(I) = 0.00

IF C INUEX(I1.GT.O I D(I) =10 CCNTINUE

RET RNEND

Table 3.1

Degree of freedom numbers at node L

Local

1 INDEX(1)2 INDEX(2)

J INDEX(J)

NG INDEX(NG)

*INDEX(J) = NG*(l, — 1) + J

Page 54: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

CD zI- —+ + +

-,+

I H2.0 W Ui UiE 0 0 0C Z Z zE *

D CD CDz z zI-

0a)a)I-0)a,

C -) CDa) —E + +a, CD

z*CD CD

N z.1I-I

iii 2 ZEa,0 UJW Ui Ui Ui

00 00 0 0 0zz z z zII _I._J ..J

I-

EE-,(5

(SC

00—_.I C

Page 55: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

46 3. Pre -element calculations

3.3 Effects of skyline storage

Up to this point we have been assuming that a banded storage mode willbe used. While this is the case in most of the discussions, here it shouldbe noted that other important storage modes can also be treated easily.For example, the skyline or profile storage is suggested by Taylor [69] andBathe and Wilson [14]. To use these procedures we must know the max-imum height (out to the last non-zero term) of each column of the assembledsystem equations.

One easy way to find these data is to find the contribution of eachelement to the column heights and retain the maximum encountered foreach column in the system square matrix. Thus we can have routines similarto ELBAND and SYSBAN. From Fig. 3.4 we note that the typical columnheight, of an element is = J — + 1. These simple calculationsare executed by subroutine ELHJGH and the system maximums are tabu-lated by routine SKYHI which loops over all of the elements and callsELHIGH.

Other information of importance to skyline solution procedures is thelocation of the diagonal elements and the total number of coefficients tobe stored (which is always less than or equal to the band storage). If wedecide to store the columns from the top down, then these calculations aresimple, as shown in subroutine SKYDIA. Note that the location of the lastdiagonal coefficient also corresponds to the total number of coefficients tobe stored. The last three programs are shown in Figs. 3.13 to 3.15. Anexample of typical equation heights due to various element contributionsis shown in Fig. 3.16. Also shown is the assembled form of the systemequations for the mesh in the figure. Figure 3.17 shows a typical systemsquare matrix. It indicates which columns would be stored, and the locationof the diagonal coefficients.

The above discussion has shown how to reduce storage requirementsand problem costs by using efficient storage techniques. More importantlywe have a better understanding of how to relate the element and systemequation numbers, and how to recover basic input data needed for cal-culating the element matrices. In the next chapter we will outline additionalimportant concepts associated with the generation of various elementmatrices. Very specific and extensive details of these concepts will bepresented in the chapters on typical applications.

Page 56: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 3.13 Subroutine ELHIGH

SUBROUTINE ELHIGH (NELFRE,INOEX,LI-IC-HJCC FINC SYSTEM COLUMN HEIGHTS OF AN ELEMENTC

INDEX(NELFREI, LHIGH(NELFREIC NELFRE = NO OF DEGREES OF FREEDOM OF ELEMENTC INDEX SYSTEM DOF NOS OF ELEMENT PARAMETERSC LH!GHII) = COLUMN HEIGHT FOR INDEX(fl

WIN INOEX(1IC FINC MiNIMUM INDEX

DC 10 1 = 1,NELFRELHICH(I) = 0

= INDEXII)IF C NDX.LT.1 I GO TO 10IF ( MIN = NOX

10 CCNTJNUEC CeNVERT TO COLUMN HEIGHTS

WIN = MIN — 100 20 1 1,NELFREI\DX = INOEX(IIIF I NDX.LT.1 GO TO 20lRTCrlLII = NDX — MIN

20 CONTINUERETL RNEND

FIg. 3.14 Subroutine SKYF-fi

SUBROUTINE SKYHI (NOFREE NE,N,NG,NELFRE,NCOES,1 LNODE,!NDEX,LHAGH,IOCFHI)

CC FIND COLUMN HEIGHTS OF SYSTEMC SYMMETRIC SKYLiNE STORAGE MODEC

OIMENSICN NODIS(NE,N),1 LHIGHINELFREJI IDOFHIINCFREE)

C NOFREE TOTAL NO OF SYSTEM 001-C NELFRE NO OF ELEMENT PARAMETERS (ODE)C = NUMBER OF ELEMENTSC K = NUMBER OF NODES PER ELEMENTC NG = NO OF PARAMETERS PER NOuEC NODES = NODAL INCIDENCES OF ALL ELEMENTSC LNOCE = ELEMENT NODAL INCIDENCESC IP4OEXIII = SYS DOF NO OF ELEMENT COF IC IDOFHI(1J = CDL HEIGHT OF SYS DOE ICC ZERO HEIGHTS

CALL ZERO! CNDFREE,IDOFH1)C LOOP OVER ELEMENTS

CC 20 IE 1,NEC EXTRACT NODES, FiND DOF NOS

CALL LNODES (IE,NE NODES,LNODE)CALL INOXEL

C FIND ELEMENT COLUMN HEIGHTSCALL ELHIGH INELFRE,INDEX,LHIGH)

C COMPARE WITH CURRENT MAXIMUMSDO 10 J = 1,NELFREI'SDX = IPIOtX(JiIF ( NDX.LT.1 I GO TO 10IF (IDOE-HI(NDXJ.LT.LHIGH(J)I 100FHIINDX)=LH1GH(JJ

10 CCNTINUE20 CONTINUE

RETURNEND

Page 57: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 3.15 Subroutine SKYDJA

SUBROUTINE SKYDIA (NDFREE,IOOFHL,IDIAGJCC LSE COLUMN HEIGHTS TO FIND DIAGONAL COEFFiCIENTSC FOR SYMMETRIC SKYLINE STORAGE MODECC ASSUMING SYMMETRIC COLS STORED FRCM lop

DIMENSION IDCFHI(NDFREEI, ID1AG(NCFREEIC NDFREE = TOTAL NO OF SYSTEM tQUATICNSC IDOFIII(LJ = CCL HEIGHT OF EQ I, WITH DIAGC = LOCATION OF DIAG OF I—TN EQC NO COEFF IN UPPER TRIANGLE = IDIAG(NCFREEI

IPOINT • 000 10 I = 1,NDFREEIPOINT = IPCINT + IDOFHJ(II

10 IO!AGIII = IPOINTRET U RNEND

FIg. 3.16 Sample element and system coiumn

DOF index (5Minimum value = 3

Column height = (3

Element: 2

DOF index (3Minimum value 2Column height = (2

System equationsSystem DOF indexMaximum height

o=(1 2 3 4 5) X X X X X=(1 134 4)X 0 X X00xx

Column 1 2 3 4 5

5

Element: 1

Total mesh (NG 1)

Location in system0000043) 0000021) 00 XXX00xxx

0000025)

0 0 0 0 00xx0xxxo

34) 00000X 0 X X

3

DOF index (1Minimum value = 1

Column height (1

Page 58: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

3.4 Exercises 49

Ag. 3.17 A typical skyline storage of the system square matrix

0 0 0 0 0

s2 o o o 0 0

s33 o o r.çi o oo 0s=

sym

(a) Actual system square matrix

1 2 — 6 — — — — 1

347———— 3

5 8 — 12 — — 5

9 10 13 — — 9

11 14 — 18 11

15 16 19 1517 20 17

21 21

(b) Corresponding vector locations (c) Diagonal location

3.4 ExercIses

1. Refer to Fig. 3.18. Determine the bandwidth if the elements are: (a)four node quadrilaterals; and (b) two node lines.

2. Renumber the nodes in Fig. 3.18 by numbering across line 1—18 firstand then proceeding to the right. How much is the bandwidth reduced?Determine a node numbering that gives a smaller bandwidth. What isthe element bandwidth in each of the three cases for the quadrilateralin the bottom left corner?

3. Calculate the element column heights in the bottom left quadrilateralin Fig. 3.18. What are the heights if there are two degrees of freedomper node?

4. Consider Fig. 3.19. If the elements are two node line elements sketchthe skyline of the assembled equations; what is the system bandwidth?Repeat these operations with the node numbers alternating from sideto side (that is, 6 becomes 3, etc.).

5. Utilize the arrays, IDEQ and LM, developed in exercises 6 and 7 ofSection 2.4 to develop alternative versions of the programs INDXPTand 1NDXEL.

Page 59: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 3.18 Problem mesh 1

18 19 20 21 22

1 2

Fig. 3.19 Problem mesh 2

2

3

14 15 16 IT8 9 10 II 12

Page 60: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4

Calculation of elementmatrices

4.1 Introduction

In this chapter typical computations related to problem dependent ele-ment calculations will be outlined. These correspond to the boxes after

1 in the flowchart of Fig. 2.2. Much more detail will be given whenxample applications are considered later. The major subjects of interestere are typical data requirements for the element square matrix, element)Iumn matrix, auxilary element calculations and boundary flux contri-'itions. The absolute minimum problem dependent calculation involvesne generation of an element square matrix. Thus our discussions begin

this.

4.2 Square and column matrix considerations

A typical definition of an element square matrix S, frequently called theelement stiffness matrix, is often of the form

I / aHTaH\5e.I

JVe \ 3x 9x 3y c9y t3zJ

This can be considered as a three-dimensional extension of Eqn. (1.11).The integral is over the volume of the element, thus the necessity ofdefining the spatial orientations of the element; i.e., the nodal coordinates.The integrand involves typical element properties (Ps, P), and theelement interpolation functions, H, and/or their spatial derivatives,aR/ox, as shown in Section 1.2. The evaluation of such an integral can be

51

Page 61: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

52 4. Calculation of element matrices

difficult or impossible in closed form with the result that numerical inte-gration is often used. Numerical integration techniques will be reviewedin Chapter 6. In the present program the element square matrix is calculatedin subroutine ELSQ, Fig. 4.4 and the element column matrix is calculatedin ELCOL, Fig. 4.5 (see Section 4.3). These subroutines are two of thefew programs that change from one typical problem to another. Severalspecific examples are given in Chapters 10, 11, and 12.

The following parameters are included in the argument lists to theroutines ELSQ and ELCOL which are used to calculate the problemdependent element square and column matrices:

N = number of nodes per elementNELFRE = number of element degrees of freedomNSPACE = dimension of the spaceCOORD(N,NSPACE) = spatial coordinates of the element's nodesD(NELFRE) = nodal parameters associated with the element

from the previous iteration (if any)ELPROP(KP2) = floating point properties of the element (if any)LPROP(JP2) = fixed point properties of the element (if any)PRTLPT(1P5,KP1) = floating point properties (if any) associated with

the nodes of the elementFLTMIS(KP3) = miscellaneous floating point properties

common to the entire system (if any)S(NELFRE,NELFRE) = element square matrix (output)C(NELFRE) = element column matrix (output)

In addition, the property arrays' dummy dimension parameters 1P5, JP2,KP1, KP2, KP3 are also included in the argument list. If any array is notneeded, then the corresponding dummy dimensions are set equal to one(in the main program) so that only one storage location is wasted. Thearray D is usually utilized only in problems requiring iterations. Otherproblem dependent data are often included in additional dimension orcommon statements within the subroutines ELSQ and ELCOL. In thepresent building block programs COMMON statements are utilized onlyin the problem dependent routines ELSQ, ELCOL, ELPOST, andPOSTEL, see Section 4.3. All of these routines also have in their argumentlist four auxiliary storage unit numbers, NTAPE1, NTAPE2, NTAPE3,and NTAPE4. The latter three units are available for use by the analystif they are assigned positive unit numbers. The value of NTAPEI(when > 0) represents the auxiliary unit on which data generated byELPOST are to be stored.

A typical column matrix, C, frequently called the load or force vector,

Page 62: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4.3 Auxiliary calculations 53

is often defined by an integral of the form

ce =

g is some known quantity (e.g. rate of heat generation) that variesover the element. in the present program the calculation of the elementcolumn matrix is carried out in subroutine ELCOL. Several specific exam-ples will be presented in Chapters 11 and 12. In some cases the programmingwill be most efficient if both the element square and column matrices aregenerated in a single subroutine, say ELSQCL. This is particularly true ifthe integrals are evaluated numerically.

4.3 Auxiliary calculations

There are two other problem dependent subroutines that are closelyrelated to ELSQ. They are ELPOST, Fig. 4.6, and POSTEL, Fig. 4.7,and they are both related to any post-solution calculations to be performedonce the nodal parameters have been calculated. Subroutines ELPOSTand POSTEL, respectively, generate and process element data that arerequired in any post-solution calculations. For example, if the nodal par-ameters represent temperatures, these routines could perform the calcu-lations for the temperatures and temperature gradients at specific pointswithin the elements once the temperatures (nodal parameters) have beencalculated. Subroutine ELPOST usually shares selected element data withsubroutine ELSQ by means of a problem dependent COMMON statement.It utilizes these data and/or other information to relate "secondary" quan-tities of interest to the, as yet unknown, nodal parameters. SubroutineELPOST contains the input parameter NTAPE1 in its argument list, ifNTAPE1 is greater than zero, it represents the external unit number onwhich any element data associated with the post-solution calculations areto be stored. Of course, the parameter NTAPE1 must be greater than zeroor this subroutine is not called.

Subroutine POSTEL is called (if NTAPE1 > 0) after the nodal par-ameters have been calculated. This program reads, from NTAPE1, thedata that were generated by ELPOST. Its argument list contains thefollowing parameters:

NTAPE1 = the external unit containing data generated by ELPOSTNELFRE = number of degrees of freedom per elementD(NELFRE) = array of nodal parameters associated with element JEIE = element numberNTAPE2,3,4 = additional scratch units

Page 63: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

54 4. Calculation of element matrices

It combines the data stored by ELPOST and the calculated nodal par-ameters, 0, to determine secondary quantities of interest within elementIE.

The element square and column matrices must be generated for eachand every element in the system. These calculations can represent a largepercentage of the total computing time and so these calculations shouldbe programmed as efficiently as possible. Some economy considerationsassociated with generating the element matrices will be presented in Section4.5.

In an integral formulation involving a Neumann-type boundary conditionthe boundary flux contributions usually define a column matrix, say Cb,

with NFLUX coefficients and a corresponding square matrix. These mat-rices are often defined by integrals of the form

=

Sb= f HIHbP ds,

where f denotes the specified flux components, P = P(f) is a coefficientdefined on the boundary, and Hb represents the element interpolationfunctions along that boundary segment. If the flux components and theparameter of interest both vary linearly along the element boundary seg-ment, one obtains (as shown later) a boundary column matrix contributionsuch as the one shown in Fig. 4.1, where is the line segment and thereis a linear variation in the flux (fr.

Similar contributions for two flux components on a quadratic segmentare shown in Fig. 4.2. The calculation of boundary segment matrices fortypical segments, such as Fig. 4.3, are carried out by the problem dependentsubroutine BFLUX.

Typical examples of the problem dependent arguments in ELSQ,ELCOL, ELPOST, POSTEL, and BFLUX are given in Figs. 4.4 to 4.8.The specific applications will not be considered until later, beginning withChapter 10. Future references to these routines will include specific problemdependent calculations.

Most of the previous operations that are required to generate the elementproblem dependent calculations can be combined into a single routine.Figure 4.9 shows subroutine GENELM which is typical of an elementgeneration control routine. This was discussed in Chapter 2. Some programsalso store the element matrices on auxiliary storage for later use.

Page 64: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 4.1 Typical boundary column matrix C for a segment, with linear variation ofthe flux (fr, and parameter of interest

k

'an

y

"I

C1 2 0 1

C2 2 0C3 6 2

C4 sym. 2]

(a) General Flux

1c1 111

IC2

=C3

Lc4i(b) Special Case, = X, f, = 0

C1 4 020—1C2 4 0 2 0 —1

16 0 2 0C4 30 16 0C5 4C6 sym. 4

I I

*/

Fig. 4.2 Typical boundary column matrix for a quadratic variation

F,

Page 65: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 4.3 Typical boundary segments

NSEG 2

LBN 3

,

Fig. 4.4 Subroutine ELSQ

SUBROUTiNE ELSQ (N,NELFRE,NSPACE,1P5,JP2,KP1,KP2,I KP3 COORO,D,ELPRCP,LPROP PRTLPT,FLTMIS,2 5, ,Nf APEI,NTAPE2, NTAPE3,NfAPE4)

CC GENERATE ELEMENT SQUARE MATRIX** ************** ** 4*44* * 4*COP IMPLICIT REAL*8(A—H 0—fl

DIMENSION ELPRCP(KP2I,1 LPRCP(JP2), S(NELFRE,NELFREJ,2 PRILPT(1P5,KPI), FLTMIS(KP3)

C = NUMBER OF NODES PER ELEMENTC •ELFRE NUMBER OF DEGREES OF FREEDOM PER ELEMENTC SPACE = DIMENSION OF SPACEC P5 = NUMBER OF ROWS IN ARRAY PRTLPTC P2 NUMBER OF COLUMNS IN ARRAYS LPFIX ANC LPRUPC P1 = NUMBER OF COLUMNS IN FLTNP & PRTLPT C PTPROPC = NUMbER Of COLUMNS IN ARRAYS FuEL AND ELPRCPC (P3 = NUMBER Of COLUMNS IN ARRAY FLTMISC = SPATIAL COORDINATES OF ELEMENTS NCDESC D = NODAL PARAMETERS ASSOCIATED WITH AN ELEMENTC ELPROP ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPROP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NODESC FLINIS SYSTEM STORAGE OF FLOATING PT MISC PROPC S = ELEMENT SQUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGLC NTAPEZ,3,4 = OPTIONAL UNiTS FOR USER (USED WHEN > 0)CC *4* ELSQ PROBLEM DEPENDENT STATEMENTS FQLLCW ***C

RETURNEND

Page 66: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 4.5 Subroutine ELCOL

SUBRCUTINE ELCOL (N NELFRE,FISPACE 1P5,JP21KP11KP2,1 KP3

CCCCOP IMPLICIT REAL*8(A—H 0—fl

DIMENSION D(NELFRE), ELPRCP(KP2),I LPROP(JP2), C(NELFREJ, PRTLPT(1P5,KP1),2 FLTMIS(KP3)

C N = NUMBER CF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX ANC IPROPC KPI = NUMBER OF COLUMNS IN FLTNP C PRTLPT C PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND ELPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FL.TMISC COORD = SPATIAL COORDINATES OF NCDESC D = NODAL PARAMETERS ASSOCIATED WITH A ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATiNG PCINT PROPERTIESC LPRCP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTIPT = FLOATING POINT PROP OF ELENENTS NODESC FLTMIS = SYSTEM STORAGE OF PCINT MISC. PROPC C = ELE'IENT COLUMN MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAC-EC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 0)C .

C *** ELCOL PROBLEM DEPENDENT STATEMENTS ***C ...... .

RET URNEND

FIg. 4.6 Subroutine ELPOST

SUBROUTINE ELPOST (NTAPE1,NTAPE2,NTAPE3,NTAPE4)C ** ************** ** ********C GENERATE DATA FOR POST SOLUTICN CALCULATICNSCCDP IMP-L1CIT REAL*8(A—H,O—Z)C = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (WHEN > 0)

C *** ELPOST PROBLEM DEPENDENT FCLLCW ***C ..

RET RNEND

Fig. 4.7 Subroutine POSTEL

SUBROUTINE POSTEL (NTAPEI,NELFRE,G,TE,NTAPE2,1 NTAPE3,NTAPE4,IT,MTER,NE,M)

C ** ****************** * *** **C ELEMENT LEVEL POST SOLUTiON CALCULATICNSCC NTAPE1 = UNIT FOR POST SOLUTION MATRICES STCRAGEC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC 0 NODAL PARAMETERS ASSOCIATED WITH THE ELEMENTC IE = ELEMENT NUMBERC NTAFE2,3,4 = OPTIONAL UNITS FOR USER (USED WI-EN > 0)C IT = CURRENT ITERATION NUMBERC NITER = MAXIMUM NUMBER OF ITERATIONSC NE = TOTAL NUMBER OF ELEMENTSC H = TOTAL NUMBER OF NODESCOP IMPLICiT REAL*8 (A—H,O—Z)

DIMENSION D(NELFREIC .........C *** POSTEL PROBLEM DEPENDENT STATEMENTS FOLLCW ***C .... ...e.......

RETURNEND

Page 67: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 4.8 Subroutine BFLUX

SUBROUTINE BFLUX (FLUX,COORD,LBN,NSPACE,NFLUX,I NG,C,S,IQPTII** **** ****** ******** ** ****

C PROBLEM DEPENDENT BOUNDARY FLUX CONTRIBUTIONSCCDP IMPLICIT REAL*B (A—H,O—Zi

DIMENSiON COQRD(LBN,NSPACE), FLUXILBN,NG), C(NFLUX),1 S(NFLUX,NFLUX)

C FLUX = SPECIFIED BOUNDARY FLUX COMPONENTSC COORD = SPATIAL COORDINATES OF SEGMENT NODESC LBN NO. OF NODES ON AN ELEMENT SEGMENTC NSPACE = DIMENSION OF SOLUTION SPACEC = LBN*NG MAXIMUM NUMBER OF FLUX CONTRIBUTIONSC C = BOUNDARY FLUX COLUMN MATRIX CCNTRIBUTICNSC S = BOUNDARY FLUX SQUARE MATRIXC NG = NUMBER OF PARAMETERS PER NODE PCINTC IOPT = PROBLEM MATRIX REQUIREMENTSC 1, CALCULATE C ONLYC = 2, CALCULATE S ONLYC = 3, CALCULATE BOTH C AND SC S

C ** BFLUX PROBLEM DEPENDENT STATEMENTS FOLLCW **C S..

IOPT = 0PETLRNEND

Fig. 4.9 Subroutine GENELM

SUBROUTINE GENEIM (IE,M,N,NSPACE,NELFRE,1 NUFREE,NITER,LPTEST,Le1C?IC,NNPFLO,IP1,2 1P311P4, 1P5 ,JP2!KPI,KP2,NTAPE1!3 LNOuE1INDEX1LPFiX,LPRCP,X,FLTNp,FLTEL,45 PRTLPT,KP3,NULCDL,NIAPE2,NTAPE3,NTAPE4)

CC GENERATE ELEMENT MATRICES AND POST SOLUTION DATAC ** ************************COP IMPLICIT REAL*8 (A—H,O--Z)

DIMENSiON X(M,NSPACE), FLTNP(1P1 KP1I, FLTEL(1P3 KP2),1 FLTMIS(KP3) COCRD(N2 S(NELFRE,NELFREJ,3 D(NELFRE) PRTLPT(1P5 KPII, LNCDE(N)4 LPFIX(1P4,JP2I, LPRGP1JP2I

C IE ELEMENT NC, H = NO OF SYSTEM NOCESC N = NO OF NODES PER ELEM, NSPACE = DIM OF SPACEC NELFRE = NUMbER OF DEGREES OF FREEDOM PER ELEMENTC NOFREE = TOTAL NUMBER OF SYSTEM DEGREES CF FREEDCMC NITER NO. OF ITERATIONS TO BE RUN (USUALLY 1)C IF LPTEST.GT.O ELEMENT BEEN DEFINEDC IF LHOMO=1 ELEMENT PROPERTIES ARE HOMOGENECUSC NNPFLO = NO. FLOATING POINT NODAL PROPERTIESC IP,JP,KP PROPERTIES ARRAYS DIMENSICN DATAC IF NI$OMO=1 NODAL PROPERTIES ARE ktOMO&,ENEOUSC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 OPTIONAL UNITS FOR USER (USED WHEN > 0)C LNODE = THE N ELEMENT INCIDENCES CF THE ELEMENTC INOEX = SYSTEM DOF NUMBERS ASSOCIATED WITHC LPFIX = SYSTEM ARRAY OF FIXED PT ELEM PROPC LPPCP = ELEM ARRAY OF FIXED PT ELEM FèCPC X = COORDINATES OF SYSTEM NODESC FLTNP, FLTEL, FL.TMIS = FLOATING PCINT PRCPS CF SYSTEMC COORD = COORDINATES OF ELEMENT NODESC 0 = ARRAY OF ELEMENT DEGREES OF FREECOMC ODOLD = SYSTEM NODAL PARAMETERS FRCM LAST ITERATIONC PRTLPT= FLOATING POINT PROP. ARRAY OF ELEMENT NODESC IF ELEMENT COLUMN MATRIX IS ALWAYS ZEROCC—-> EXTRACT NOCAL COORDINATES

CALL ELCORD (N N,NSPACE X COORD LNCDIIC EXTRACT NODAL (IF ANY)

IF ( NNPFLO.GT.O I CALL LPTPRT (N,IPI,1P5,KPI,FLTNP,1 PRTLPT,LNTJDE,NHQMOI

Page 68: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4.4 Condensation of elements internal degrees of freedom 59

Fig. 4.9—continued

C EXTRACT NCJOAL PARAMETERS FROM LAST ITERATICN (IF ANY)IF ( NITER.GT.l ) CALL ELFRE (I\CFREE,NELFRE,O,030LD,

INDEX)C——> EXTRACT tLEMENT MATERIAL PROPERTIES (IF ANY)

IF ( LPTEST.GT.O ) CALL ELPRTY (1E,LHOMC,1P3,IPA,JPL,1 KP2,LPFIX,FLTEL,LPROP,ELPROPJ

C——> C-ENERATt LLEMENT SQUARE AND MATRICESCALL ELSQ (N,NELFRE,NSPACE, !P5,JP2,KPI,KP2,KP3,COORD,

1D,ELPROP,LPRGP,PRTLPT,FLTI'IS ,S,NTAPE 1,

2IF ( NtJLCOL.EQ.O ) CALL (N NELFRE NSPACE,IP5,

1 JP2 KPI ELPRCP,23

C——> STORE DATA FOR POST SOLUTION (IF ANY)IF I NTAPEL.GT.O I CALL ELPOST (NTAPEI,NTAPE2,

NTAPE3 ,NTAPE4)C 1SYS PROP UPCATE COULD BE DONE HERE

RETURNEND

4.4 Condensation of element's internal degrees of freedom

As one becomes more experienced with the finite element method onefinds it desirable at times to consider elements with internal degrees offreedom. Here the word internal is used to mean that the quantity ofinterest is not shared with any other element (or master element). Figure4.10 illustrates the concept of distinguishing between internal and shareddegrees of freedom. Internal degrees of freedom can be introduced toimprove the accuracy of the interpolating functions and/or as an artificeto reduce the amount of input data. The most common use is illustratedin part (d) of Fig. 4.10. This shows a master quadrilateral element withfour nodes which is input by the user. In the subroutines that define theelement matrices for the quadrilateral the following procedure is utilized.First an internal node is defined to be at some convenient location suchas the centroid of the quadrilateral. This internal node is used to definefour triangular sub-elements. The element matrices of these triangularelements are generated and assembled together to represent the matricesof the quadrilateral element with five nodes. However, this combinedelement would have more degrees of freedom (5*NG) than the systemdefinition indicates it should have (4*NG). Therefore, it is desirable tocondense out the element's internal degrees of freedom. To do this it isnecessary, in effect, to require the governing functional to also be minimizedover the element. This allows one to write the element equations as:

ISAA SAB DA — CA)

- (4.1)

Page 69: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

60 4. Calculation of element matrices

where the element equations have been partitioned to distinguish betweenshared degrees of freedom, DA, and internal degrees of freedom, Fromthese equations it is possible to relate DH to DA; that is

= — SBADA). (4.2)

Therefore, the clement equations can be rewritten in condensed form as

S *AA A'—A'

where S* and C* are defined in terms of the original matrices S and C.The use of internal degrees of freedom has been shown to improve accuracyand reduce the number of system equations that must be solved in manycases.

The operations, illustrated for a numerical example in Fig. 4.11, requiredto condense out the internal degrees of freedom are executed by subroutineCONDSE. Since matrix SBB can be relatively large for some elements, itis desirable to avoid the actual inversion of this matrix. Therefore, theroutine uses Gaussian elimination, which is computationally much moreefficient. The elimination begins with the last degree of freedom to becondensed and works backwards towards the first one. SubroutineCONDSE is shown in Fig. 4.12.

Fig. 4.10 Typical internal 'nodes'

(0) (b) (c)

(d)

Page 70: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 4.11 Example condensation procedure

[SAA SAB1 [DA1 — ICA1 B internal dof

[SBA SBBjLDB] LCBj

8 1 0 1 2 D1 24

8 1 0 2 D2 37

0 1 8 1 : 2 D3 — 40

1 0 1 8 2 D4 — 46

2 2 2 2 16 D5 110

(a) Original Element Equations

=

1 0 11 1 1 1 7.75 0.75 —0.25 0.75

* 1 8 1 0 I 1 1 1 1 — 0.75 7.75 0.75 —0.25SAA

0 1 8 1 I 1 1 1 1 f — —0.25 0.75 7.75 0.75

1 0 1 8] 1 1 1 ii 0.75 —0.25 0.75 7.75

241 ii 10.25iI_ 23.25

CA— 401—13.7 ii 26.2546] 1] 32.25

(b) Condensed Element Equation

Fig. 4.12 Subroutine CONDSE

SUBROUTINE CONOSECC CONDENSATION OF ELEMENT MATRI&.ES 10 REMUVEC INTERNAL DEGREES Uf FREEDCMCCOP IMPLICIT

DIMENSION S(NTOTAL,NTOTAI.1, C(NTCTALJC INT RNAL DEGREES OF FREEDOM *MtJST* LASTC SAA SAB DA I CAC .. ....l =C SBA SBB OB I CBC ENT R FULL ; RETURN CONDENSED iN AA ANC CAC DIMENSIGN SAA(NELFRE NELFRE) CA(NELFRE)C SAA* = (SAAJ —C CA* = (CAl — (SABJ*(SBBII*(CBJC NIOTAL = ORIG. NO. OF D.O.F. OF ELEMENTC NELFRE = FINAL NO. OF D.O.F. OF ELEMENTC S = SQUARE ELEMENT MATRIX, C = ELEMENT CCLUMN MATRIX

NELIM = NTOTAL — NELFREZERC = 0.0000 30 1 = I,NELIMJ = NTOTAL — I(= .1+1SKK = S(K,K1CI( = C(K)IF ( SKK.EQ.ZERO I GO TO 30C(K) = CK/SKKDO 20 L =SLKSKK = S(1,Kl/SKKS(L,KI = SLKSKKDO 10 M = L,JS(L,M) S(L,M) —

10 S(M,Lj = S(L,M)CIII = C(Li — CK*SLKSKK

20 CCNTINUE30 CONTINUE

RETIRNEND

Page 71: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

62 4. Calculation of element matrices

4.5 Economy considerations in the generation of element matrices

The calculation of the element matrices can represent an expensiveoperation. This is especially true for the more advanced element types suchas a sixty degree of freedom elastic solid element or a higher order shellelement. In such cases the programmer may find it necessary to take specialsteps to obtain an economical solution. The present building block routinesdo not have these features but could be easily modified to implement thefollowing procedures.

For simplicity, assume that the element properties are homogeneousthroughout the system. In that case, the element matrices would dependon certain geometrical parameters such as its size, shape, and orientationrelative to the global coordinate system. That is, if these parameters arethe same for a group of elements then the element matrices of that groupwill be identical. Consider the mesh illustrated in Fig. 4.13(a), whichcontains twenty-four triangular elements. Note that elements 1 to 12 aregeometrically identical as are the group of elements from 13 to 24. Thusit is only necessary to evaluate the element matrices for element number1 and then to use these matrices for elements 2 to 12. Of course the matricesfor element 13 would be evaluated and used for the remaining elements.This approach would only require the evaluation of two sets of elementmatrices instead of twenty-four. Such a reduction can represent a majoreconomy if the elements have a relatively high number of degrees offreedom.

To take advantage of this concept, one must generally have a uniformgrid spacing over most of the mesh area. Assuming this is the case, it isstill necessary to identify clearly those elements which are the same. Someprograms allow the user to input a special integer element code to indicateif an element is geometrically the same as the previous element. This is asimple and effective procedure but it places the full burden on the user.Another method is to have a special program segment in the routine forevaluating the element square matrix that checks the important geometricalparameters of the element. If any of these parameters differ from thoseof the previous element, then a new element matrix is calculated; otherwise,the subroutine simply returns with the matrix calculated for the previouselement. The latter approach is relatively inexpensive since many, if notall, of the geometrical parameters are required for later use in calculatingthe element matrices. Also, elements of different geometries are oftenquickly identified. For example, if their areas differ, a new element matrixwill be required. This approach to more economical matrix generation hasan added advantage in that the average user does not have to know of its

Page 72: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4.5 Economy considerations in the generation of element matrices 63

existence. Of course, the user should be requested to number (or input)geometrically similar elements in a consecutive manner.

Figure 4.13(b) illustrates another economy that some authors recom-mend, that is to use exact formulations of rectangular elements wherepossible and mix them with numerically integrated curved elements whenit is necessary to match curved boundaries. The matrices for a singlerectarjgular element can be used again and again when multiplied by ascaling factor. This approach is especially attractive when the problem isthree-dimensional. The numerically integrated elements are shown hashedin Fig. 4.13.

Fig. 4.13 Element economy considerations

(a) Groups of repeated elements

A

I . —.---.

— —

— —

(b) Combining exact and numerical integration

Page 73: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 74: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5

Isoparametric elements

5.1 Introduction

In modern finite element methods the use of numerically integratedisoparametric elements is becoming increasingly common. In order tounderstand the programming concepts associated with isoparametric ele-ments, it is necessary to understand some of their basic theoretical foun-dations. Since detailed treatments of isoparametric elements are lacking,or incomplete, in most theoretical texts, the basic foundations will bereviewed in the next section before their programming aspects areconsidered.

5.2 Fundamental theoretical concepts

Isoparametric elements utilize a local coordinate system to formulate theelement matrices. The local coordinates, say r, s, and t, are usually dimen-sionless and range from 0 to 1, or from — 1 to 1. The latter range is usuallypreferred since it is directly compatible with the definition of abscissautilized in numerical integration by Gaussian quadratures. The elementsare called isoparametric since the same (iso) local coordinate parametricequations (interpolation functions) used to define any quantity of interestwithin the elements are also utilized to define the global coordinates ofany point within the element in terms of the global spatial coordinates ofthe nodal points. Let the global spatial coordinates again be denoted byx, y, and z. Let the number of nodes per element be N. For simplicity,consider a single scalar of interest, say V(r, s, t). The value of thisvariable at any local point (r, s, t) within the element is assumed to bedefined by the values at the N nodal points of the element (V7, 1 i

65

Page 75: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

66 5. Iso parametric elements

N), and a set of interpolation functions (H1(r, s, t), 1 i N). That is,

V(r, s, t)=

s,

or symbolically, as illustrated in Fig. 1.4,

V(r,s,t) = HVC, (5.1)

where H is a row vector. Generalizing this concept, the global coordinatesare defined as

x(r, s, t) = Hxe, y = Hye, = Hze.

Programming considerations make it desirable to write the last threerelations in a partitioned form

(5.2)

where the last matrix simply contains the spatial coordinates (COORD inthe building block code) of the N nodal points incident with element e. Toillustrate a typical two-dimensional isoparametric element, consider a quad-rilateral element with nodes at the four corners, as shown in Fig. 5.1. Theglobal coordinates and local coordinates of a typical corner, i, are (x1, y,)and (r1, s1), respectively. The following local coordinate interpolation func-tions (shape functions) have been developed for this element:

+rrj(1 +ss1), 1 (5.3)

Recall that

V(r, s) H(r, s)Ve

V1

V2= [H1

V3

V4

and

x(r, s) = H(r, S)Xe,

y(r, s) = H(r, s)ye.

Note that along an edge of the element (r = ± 1, or s = ± 1) these inter-polation functions become linear and thus any of these three quantitiescan be uniquely defined by the two corresponding nodal values on thatedge. If the adjacent element is of the same type (linear on the boundary),

Page 76: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.2 Fundamental theoretical concepts 67

then these quantities will be continuous between elements since their valuesare uniquely defined by the shared nodal values on that edge. Since thevariable of interest, V, varies linearly on the edge of the element, it is calledthe linear isoparametric quadrilateral although the interpolation functionsare bilinear inside the element. The shape functions for this element arepresented in subroutine SHP4Q and are given for future reference in Fig.5.2. It has been shown that, in general, the isoparametric shape functionsmust satisfy the relations

= 1

and (5.4)if i=j

J-I,(r1, s1)tO if

at the node points. The above two relations can be utilized to checknumerically subroutines such as SHP4Q. The latter condition should bechecked at each node and the first relation should be checked at randompoints within the element. A typical routine, SCHECK, for checking shapefunction routines is shown in Fig. 5.3.

For future reference, note that if one can define the interpolation func-tions in terms of the local coordinates then one can also define their partialderivatives with respect to the local coordinate system. For example, thelocal derivatives of the shape functions of the above element are

+ ss1),

s)+ rr1).

(5.5)

In the three dimensions, let the array containing the local derivatives ofthe interpolation functions be denoted by a 3 by N matrix, where

=

at

The expressions in Eqn. (5.5) have been incorporated into subroutineDER4Q, which is shown in Fig. 5.4. These partial derivatives are necessaryto establish certain relationships between the two coordinate systems. The

Page 77: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

68 5. Iso parametric elements

functions in subroutine DER4Q (or similar programs) can be numericallychecked in several ways. They could be checked at random points withinthe element by comparing with finite difference approximations based onthe use of subroutine SHP4Q. However, a simpler check is available.Taking the local derivatives of Eqn. (5.4). we obtain

aH1(r,s)

(5.6)

Checking these two equations at random points in the element would givea numerical check of the functions programmed in DER4Q. A checkingroutine, DCHECK, of the latter type is shown in Fig. 5.5. To have a validset of shape functions, it is necessary that they satisfy the checks inSCHECK and DCHECK.

Although x, y, and z can be defined in an isoparametric element in termsof the local coordinates, r, s, and t, a unique inverse transformation is notneeded. Thus one usually does not define r, s, and t in terms of x, y, andz. What one must have, however, are the relations between derivatives inthe two coordinate systems. From calculus, it is known that the derivativesare related by the Jacobian. Recall that from the chain rule of calculus onecan write, in general,

a aax aay aaz=—— +—— +——ar axar ayar äz3r

with similar expressions for a/as and 3/9t. In matrix form these becomea ax ay az a

ar är ar t3r axa aX c9y 3Z a

57(ja ax ay az a

at at at at az

where the square matrix is called the Jacobian. Symbolically, one can writethe derivatives of a quantity, such as V(r, s, t), which for convenience iswritten as V(x, y, z) in the global coordinate system, in the followingmanner

= J(r, S. t) OgV,

where J is the Jacobian matrix and where the subscripts I and g have beenintroduced to denote local and global derivatives, respectively. Similarly,

Page 78: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.2 Fundamental theoretical concepts 69

the inverse relation isOgV=J'OIV. (5.8)

Thus, to evaluate global and local derivatives, one must be able to establish

J and J -'. In practical application, these two quantities usually are evaluatednumerically. Consider the first row of the Jacobian in Eqn. (5.7). Since x,y, and z can be defined, for isoparametric elements, by Eqn. (5.2) it isnoted that

Lar ar an Lar I

Generalizing this observation yields

ax a)) .9Z

an an t3r

=H [xc ye zCJNX3, (5.9)

ax ay 8z

or, in symbolic form,

J(r,s,t) = [xc yC ZC]. (5.10)

This numerically defines the Jacobian matrix, J, at a local point inside

a typical element in terms of the spatial coordinates of the element's nodes,[Xe ye zel which is referenced by the name COORD in the subroutines,and the local derivatives, of the interpolation functions, H. Thus, atany point (r, s, t) of interest, such as a numerical integration point, it ispossible to define the values of J, J ',and the determinant of the Jacobian,

Jj. Figure 5.6 illustrates a subroutine, JACOB, which evaluates numericallythe Jacobian matrix at a point. A simple program to invert and find thedeterminant of a one-, two-, or three-dimensional matrix Jacobian is shownin Fig. 5.7.

The integral definitions of the element matrices usually involve the global

derivatives of the quantity of interest. From Eqn. (5.1) it is seen that the

local derivatives of V are related to the nodal parameters by

.3r

"a

as

at at

Page 79: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

70 5. iso parametric elements

or, symbolically,

01V(r,s,t)3x1 = (5.11)

To relate the global derivatives to the nodal parameters one substitutesthe above expression into Eqn. (5.8) to obtain

—1gV — 3x3 3xN'Nxl,

OgV(r,s,t)3x1 (5.12)

d(r, s, t) J(r, s, t) - s, t). (5.13)

The matrix d is very important since it relates the global derivatives of thequantity of interest to the quantity's nodal values. For the sake of com-pleteness, note that d can be partitioned as

Hj

so that each row represents a derivative of the interpolation functions withrespect to a global coordinate direction. In practice the d matrix exists innumerical form at selected points. Clearly, at such a point one wouldevaluate the matrix (call DER4Q), calculate the Jacobian (call JACOB)and its inverse, and numerically evaluate the product in Eqn. (5.13).Equation (5.13) is evaluated by subroutine GDERIV, which is shown inFig. 5.8.

FIg. 5.1 A four node isoparametric element

or

where

d(r, s, t) =

H

H (5.14)

V3

(—1,—I)

2

(x4 ,y4)V2

(x, , y,)

(xf,y1)

Page 80: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 5.2 Subroutine SHP4Q

SUBROUTINE SMP4U (R,S,I-f)CC SHAPE FUNCTIONS OF A 4 NODE ISOPARAMETRIC QUADCCOP IMPLICIT REAL*8 (A—H,O—Z1

DIMENSION H(41C (R,SJ IS A POINT IN THE LOCAL 000RDS 4——3C H LOCAL COORD INTERPOLATION FUNCTIONSC 1-ERE HI!) = O.25*(1+R*R(IH*(1+S*S(1))C R(I) LOCAL R—COOROINATE OF NODE 1 1—2C LCCAL COOROS, j=(—1,—l) 3=(+1,+l)

= 1. + RPM = 1. — RSP = 1. + SSM=1.—S

= O.25*RM*SMI-(2) = O.25*RP*SMH(3) = O.25*RP*SP1-14) = O.25*RM*SPRET L RNEND

Fig. 5.3 Subroutine SCHECK

SUBRCUTINE SCHECK (H,N)CC NUMERICAL CI-ECKING OF N SHAPE FUNCTICNSI N,TC LCCAL POINT IN AN ISOPARAMETRIC ELcMENTCCOP IMPLICIT REAL*8 IA—H,O--Zi

DIMENSION H(N)C U = LOCAL COORDINATE INTERPOLATION FUNCTIONSC N = NUMbER OF SHAPE FUNCTIONS

CNE = 1.00SUM = 0.0000 10 1 = 1,N

10 SUM = SUM + HI!)IF I SUM.NE.GNE ) WRITE (6,5000)

5000 FORMAT I ' SUPPLIED SHAPE FUNCTICt'iS INCORRECT')RETURNEND

FIg. 5.4 Subroutine DER4Q

SUBROUTINE DER4Q (R,S,DELTAJCC LOCAL DERIVATIVES OF THE SHAPE FUNCTIONS FOR ANC QUADRILATERAL WITH FCUR NODESCCOP IMPLICIT REAL*8 (A—H O—Z)

DIMENSION OELTA(2,41C OELTA(1,I) = OH/DR I DELTA(2,I) = OH/OSC H = LOCAL CCORDINATt INTERPOLATION FUNCTIONSC 1-ERE D(H(lIi/DR = O.25*R(I)*(1+S*S(II,i, ETC.C (R,S) IS A POINT IN THE LOCAL COCRDINA tSC P11) = LOCAL R—CCOROINATE OF NODE I

RP = 1. + RRM = 1. — KSP = 1. + SSM = 1. — SDELTA(I,1) = —0.25*SMDELTAII,2) = 0.25*SMDELIA(1,3) O.25*SPDEL TA(1,4) = —O.25*SPDEL TA(2,1) = —0.25*RMDELTA(2,2) —O.25*RPDELTA(2,3) = 0.25*RPDELIA(2,4) = O.25*RMRETURNEND

Page 81: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 5.5 Subroutine DCHECK

SUBROUTINE OCHECK (DELTA,N,NSPACEJCC. CHECKING OF THE LOCAL CCORDINATE DERIVATIVES OFC THE N SHAPE FUNCTIONS AT A LCCAL POINTC FOR AN ISOPARAMETRIC ELEMENTCCOP IMPLICIT REAL*8 (A—H,O—Z1

DIMENSION DELTA(NSPACE NiC DELTA = LOCAL DERIVATIVES OF SHAPE FLjNCTIONSC N = KUMBER OF SHAPE FUNCTiONSC NSPACE = DIMENSION OF LOCAL SPACE

ZERO = 0.0000 20 J = 1,NSPACESUM = ZERO00 10 1 1,N

10 SUM SUM + OELTA(J,I1IF ( SUM.NE.ZERO I WRITE (6,50001

5000 FORPAT (' SUPPLIED20 CCNIINUE

RET L RNEND

Fig. 5.6 Subroutine JACOB

SUBROUTINE JACOB (N,NSPACE,UELTA,COCRO, AJICC CALCULATE THE JACOBIAN MATRIX AT A LOCAL POINTCCDP IMPLICIT REAL*8 (A—H,O—fl

DIMENSION DELTA(NSPACE,N),

C N

C OF SPACEOF

C FUNCTIONS. EVALUATED AT POINT CF INTEREST.C GOURD = SPATiAL COORDINATES OF ELEMEKT'S NCDESC AJ = JACOBIAN MATRIX = OELTA*COORC

DC 20 1 = 1,NSPACECO 20 J = 1,NSPACESUM = 0.0DO 10 K = 1 NSUM = SUM + 6ELTA(I,K)*COORD(K,Ji

.10 CCNTINUEAJII JI = SUM20 CONTINUE30 CONIINUE

RET 1. RNEND

Fig. 5.7 (a) Subroutine INVDET

SUBROUTINE INVOET (AJ,AJINV DET,NSPACEICC FIND INVERSE AND DETERMINANT OF JACOBIANC ** ************************CDP IMPLiCIT REAL*8 (A—H,O—Z)

DIMENSION A.J(NSPACE,NSPACE), AJINV(NSPACE,NSPACE)C NSPACE = NUMBER OF SPATIAL DIMENSIONSC AJ JACOBIAN MATRIX AT A POINTC AJINV = INVERSE OF AJC DET = DETERMINANT OF AJ

GO TO (100,200,300,4001, NSPACEC——> 1—0

100 DEl = AJ(l,1IAJINV(1,1) = 1.00/DElRETURN

C——> 2—D200 CALL

RETURNC——> 3—D

300 CALL 138Y3 (AJ,AJINV,DETIRETURN

C UNSLPPORTED OPTION400 WRIIE (6,100011000 FORMAT (' INVALID DATA SUBR INVDET'}

END1

Page 82: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 5.7 (b) Subroutine 12BY2

S(JBRCUTINE I25Y2 (A,AINV,DETICC CALCULATE THE DETERMINANT AND INVERSE OF 4(2,2)CCDP IMPLICIT REAL*8 (A—H 0—fl

DIMENSION A(2,2J, AINV(2,2)DET A(1,1)*A(2,2) — 4(1,23*4(2,1)AINV(1,1) = 4(2 23/DETAINV(1,21 = —A(I,2)1DET

= —4(2,1)/DElAINV(2,21 = 4(1,11/DElRET U RNEND

Fig. 5.7 (c) Subroutine 13BY3

SUBROUTINE 13BY3 (A,ALNV,DET)CC FIND INVERSE AND DETERMINANT OF MATRIX 4(3,3)CCOP IMPLICIT REAL*8 (A—H,0—Z3

DIMENSION AINV(3,3)AIN'v(1,1) = —A(3,2)*A(2,3)AINV(2,11 = _A(2,l)*A(3L3) + A(311)*A(2,3)AINV(3,1) = A12,1I*A(3,t) — 4(3,11*4(2,23AINV(1,2J = —A(1,2)*A(3,31 + A(3,2)*A(1,3)AINV(2,23 = A(1,1)*A(3,3) — 4(3,13*4(1,3)AINV(3,2) = —A(1,1)*A(3,2) + 4(3,11*4(1,21

= A(1,2)*A(2,3) — A(2,2)*A(1,31ALNV(2,31 = —4(1,13*4(2,3) +AINV(3,3) = A(1,1)*A(2,2) — A(2,1)*A(1,flDET =AL1,1)*AINV(L,1) + A(1,2)*AINV(2,1)

I + A(1,3)*AINV(3,13DO 20 J = 1,300 10 1 = 1,3

10 = AINV(I,J)/DET20 CONTINUE

RETEND

FIg. 5.8 Subroutine GDERIVSUERCUTINE GDERIV (NSPACE,N,AJINV,DELTA,GLOBAL)

CC NSPACE GLOBAL DERIVATIVES OF N INTERPOLATICNC FUNCTIONS AT A LOCAL POINT.CCOP IMPLICIT REAL*8 (A—H,0—Z)

DIMENSION AJINV(NSPACE1N$PAt..E), CEITA(NSPACE,N1,1 GLOBAL(NSPACt,N)

C NSPACE = DIMENSION OF SPACEC = NUMBER OF NODES PER ELEMENTC AJINV = INVERSE JACOBIAN MATRIX AT LOCAL POINTC DELTA = LOCAL COORD DERIV OF N INTERPOLATIONC FUNCTIONS. EVALUATED AT POINT OF INTEREST.C GLOBAL = GLOBAL DERIVATIVES MATRIX AT LOCAL POINTC GLOBAL = AJINV*DELTA

DC 30 1 = 1,NSPACEDO 20 J = 1,NSUM 0.00DO 10 K = 1,NSPACESUM = SUM + AJINV(I,K)*DELTA(K,JJ

10 CCNTINUEGLOEAL(I,J) = SUM

20 CCNIINUE30 CONTINUE

RET L RNEND

Page 83: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

74 5. isoparametric elements

FIg. 5.9 Subroutine CALPRT

SUBROUT INE CALPRT (N,NNPFLO,H,PRTLPT, VALUES)CC CALCLLATE NNPFLO PROPERTIES AT A LCCAL PT USINGC ELEMENT'S NODAL PROPERTIES, PRTLPT, AND THEC iNTERPOLATION FUNCTIONS, H, AT THE POINTCCDP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION H(NI, PRTLPT(N,NNPFLOI,VALUES

C N = NUMBER OF NODES PER ELEMENTC NNPFLQ = NO. FLOATING POINT NODAL PRCPtRTLESC H = INTERPOLATION FUNCTIONS FOR AN ELEMENTC PRTLPT = FLOATING PT PROPS OF ELEMENT'S NCCESC VAL(JES = LOCAL VALUES OF PROPERTIES

DO 1,NSUM =

10SUM

CCNTINUERETURNEND

5.3 Programming isoparametric elements

The element matrices, SC or Cc, are usually defined by integrals of thesymbolic form

Ac JffBe(x,y,z)dxdydz,

where BC is usually the sum of products of other matrices involving theelement interpolation functions and problem properties. With the elementformulated in terms of the local (r, s, t) coordinates, where Be(x, y, z) is

transformed into Be(r, s, t), this expression must be rewritten asrl (I ci

Ac=jJ J—1 —1 —1

In practice, one would use numerical integration to obtainNIP

[At] W,OC(r1, s,, t,) s1,I

where BC and IJI are evaluated at each of the NIP integration points andwhere (r1, s1, t,) and W1 denote the tabulated abscissae and weights, respec-tively. The general procedure for programming an isoparametric elementis outlined below:(A) Initial Programming Steps

1. Define a subroutine (such as SHP4Q) to evaluate the N interpolationfunctions H(r, s, t) for any given values of the local coordinates (r, s, t,1.

Page 84: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.3 Programming iso parametric elements 75

2. Define a subroutine (such as DER4Q) to evaluate the NSPACE localderivatives of the interpolation functions s, t) for any given valuesof the local coordinates.3. Tabulate or calculate the number of integration points, NIP, and theweight coefficients W,, and local coordinate abscissae (r,, s,, r,) of eachintegration point.

(B) Steps Preceding the Element Matrix Subroutines1. Extract the global coordinates, ye COORD, of the nodes ofthe element.2. Extract any constant element properties (ELPROP and/or LPROP),and tabulate the nodal point values (LPTPRT) of any properties whichvary with local coordinates.

(C) Steps Within the Element Matrix Routine1. Establish storage for any problem dependent variables (H, d, J,J', etc.).2. Zero the element matrices.3. Perform the numerical integration (see Part D).

(D) Steps for Each Integration Point1. Extract, or calculate, the weight and abscissae of the integration point.2. For the given abscissae (re, s1, t,) evaluate the interpolation functions,[H], (call SHP4Q) and the local derivatives of the interpolation functions,

(call DER4Q).3. Calculate the Jacobian matrix at the point (call JACOB):

s,, t1) s,, t1) COORD.

4. Calculate the inverse, J(r1, t1)', and determinant the Jacobianmatrix (e.g., call 12BY2).5. Calculate the first order global derivatives, d, of the interpolationfunctions (call GDERIV):

d =J'&6. If the problem properties vary with the local coordinates, use thenodal values of the properties and the interpolation functions to calculatethe properties at the integration point (call CALPRT, Fig. 5.9).7. Execute the matrix operations defining the matrix integrand. In gen-eral, this involves the sum of products of element properties, H, and d.8. Multiply the resulting matrix by the weighting coefficient and thedeterminant of the Jacobian and add it to the previous contributions tothe element matrix.9. If any of the above data are to be utilized in post-solution calculations,write them on auxiliary storage.A typical arrangement of the latter operations is illustrated in subroutine

Page 85: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

76 5. iso parametric elements

ISOPAR which is shown in Fig. 5.10. Note that the global coordinates ofthe integration point are also determined since they are often used for lateroutput of the derivatives. Of course, in an axisymmetric analysis the globalradial coordinate is required in the integrand. For most practical problemsthe Jacobian inverse can be easily obtained with a routine such as LNVDETin Fig. 5.7.

The interpolation function routine, SHAPE, and the corresponding localderivative routine, DERIV, will be considered later. Numerical integrationis also reviewed in more detail in a later section. The control section ofsubroutine NGRAND is shown in Fig. 5.11. Its purpose is to evaluate theactual problem dependent integrands, such as (grad H grad H) whichoccurs in a Poisson problem. As we will see later it is sometimes desirableto use different integration rules for different parts of the integrand (seeSection 6.5). Thus two or more versions of NGRAND might be requiredin a typical application. Therefore, in calling ISOPAR the name NGRANDis treated as a dummy EXTERNAL variable so that the user passes in thename of the subroutine that is actually required for the problem. Specificexamples will be given in Chapters 10 and 11.

Fig. 5.10 Subroutine ISOPARSUBFCLJTINE ISOPAR (N,NSPACE,NELFRE,NIP,SQ1CCL,QPT,

I QWT,H,DLH,DGH,COCRD,XPi,AJ,2 AJINV,NTAPE1,NGRANDI

CC NUMERICAL INTEGRATION IN AN ISOPARAMETRIC ELEMENTCCDP IMPLICIT REAL*8 (A—H 0—fl

DIMENSILN ,I2 OGH(NSPACE,N),COORD(N NSPACEJ XPT(NSPACE),3 AJ(NSPACE,NSPACEJ,

CC NO

NO ELEMENTCCC SQ,CQL = PROB DEPENDENT SQ AND INIEGRANDSC H = ELEMENT INTERPOLATION FUNCTIONSC DLH, OGH = LOCAL, AND GLOBAL DERIVATIVES CF Ii

C COORO = GLOBAL COORD OF NODES OF ELEMENTC XPT = GLOBAL COCRD OF QUAORATURE PCINTC AJ,4.iINV, GET = JACOBIAN, ITS INVERSE DETERMINANTC NTAPE1 = STORAGE UNIT FOR POST CATAC NGRAND = 'EXTERNAL' PROS DEP INTEGRAND ROUTINEC——> ZERC INTEGRANDS

CALL ZEROA (NELFRE,COL)LSQ = NELFRE*NELFRECALL ZEROA (LSQ,SQ)

C——> BEGIN INTEGRATIONDO luO 1P = I NIP

C FUNCTIONSCALL SHAPE

C FIND GLOBAL CUORD. XPT = I1*COORDCALL MMULT COORD XPT,l,N,NSPACE)

C FIND LOCALCALL DERIV (QPT(l,IP) DLH,N,NSPACE)

C FIND JACOBIAN AT THE PtCALL JACOB (N,NSPACE OLH,COORD,AJI

C FORM INVERSE AND OF JACOBiANCALL INVOET (AJ AJINV DET NSPACE)

C EVALUATE GLOBALCALL GDERIV (NSPACE N AJINV,DLH

C *** FORM PROBLEM INTEGAANDS ***CALL NGRAND OFT H,DGH XPT,N,N$PACE,

100 'CONTINUERETURNEND

Page 86: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.4 Simplex elements, a special case 77

Ag. 5.11 Subroutine NGRAND

SUBROUTINE NGRAND (WT,DET ,H,DGH,XPT,N,NSPACE,1 NELFRE,COL,sc,NTAPEI)

CC PROBLEM DEPENDENT INTEGRANO EVALUATICN INC AN ISOPARAMETRIC ELEMENTCCDP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION CtJL(NELFREJ, SQ(NELFRE,NELFRE),I H(NJ, DGH(NSPACE,N), XPIU'iSFACE)

C N = NUMBER OF NODES PER ELEMENTC NSPACE = NUMBER OF SPATIAL DIMENSIONSC = ND OF ELEMENT DEGREES OF FREEDOMC H = ELEMENT INTERPOLATION FUNCTIONSC DGH = GLOBAL DERIVATIVES OF HC XPT GLOBAL COGRDS Of THE POINTC MT = QUADRATURE WEIGHT AT POINTC DEl = JACOBIAN DETERMINATE AT POINTC COL = PROB DEP COLUMN MATRIX INTEGRANDC SQ = PROB DEP SQUARE MATRiX INTEGRANCC = STORAGE UNIT FOR POST SOLUTION OATACC *** NGRAND PROBLEM DEPENDENT FOLLCh ***C

RETLRNEND

5.4 Simplex elements, a special case

A complete discussion of isoparametric elements should also include thespecial case of simplex elements. These are the simplest of all finite elementsand they have the following properties:

1. The number of nodes per element, N, is one greater than the dimensionof the space, i.e. N = NSPACE + 1.2. The element interpolation functions, H, are complete linear functionsof the local coordinates.3. The global interpolation functions are continuous over the entireregion of the problem.

The first three members of this family of elements are the line element,triangular element, and tetrahedral element. The first two are frequentlyutilized in current finite element programs, but the latter has been foundto be computationally inefficient and has generally been displaced by thehexahedral isoparametric element family.

As shown in Fig. 5.12, all these elements can be defined in terms oflocal non-dimensional coordinates, say (r, s, t), which range from zero tounity. Note that the triangle could be thought of as a face of the tetrahedronand the line element as an edge of the tetrahedron (or triangle). Theintroduction of the non-dimensional local coordinates (r, s, t) makes itpossible to define element interpolation functions, H,(r, s, t), which areindependent of the geometry of the element in the global system. For

Page 87: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

78 5. Isoparametric elements

example, the two line element interpolation functions areHi(r) = 1 — r

(5.15)= r

and for the triangle one has

Hi(r, s) = 1 — s

H2(r,s)= (5.16)

H3(r,s) = s.

Note that line interpolation is a subset of that of the triangle, etc. Thegeneralization of this subset concept for complete polynomials is illustratedin Fig. 5.13.

Recall that the definitions of element (or boundary segment) matricesinvolve integrals of the interpolation functions, and/or their derivatives.Thus typical coefficients in these matrices can be defined in terms ofintegrals of the local coordinates (r, s, t). The main importance of thesimplex elements is the fact that the integrals, over the element, of theirlocal coordinates can be expressed in closed form. This occurs because theJacobian of the transformation from local to global coordinates is constant.For example, consider an integration over a triangular element. It is knownthat

p = I = 2AT(m + 1)F(n + 1)(5 17)

JAC F(3+m+n)where F denotes the Gamma function. Restricting consideration to positiveinteger values of the exponents, m and n, yields

m + n)!

where ! denotes the factorial and where Kmn is an integer constant givenin Table 5.1 for common values of m and n. Similarly for the line elements

ILCdl = LC

(1m.)! = LV(1 + m) (5.19)

and for the tetrahedron

p. (5.20)(3+m+n+p)!

Thus, one notes that common integrals of this type can be evaluated bysimply multiplying the element characteristic (i.e. global length, area, or

Page 88: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.4 Simplex elements, a special case 79

volume) by known constants which could be stored in a data statement.These exact integrals can also be utilized for higher order elements if theirJacobians remain constant. That is, if their nodes are in the same relativelocations as on the parent elements (i.e. at mid-sides for quadratics, thirdpoints for cubic, etc.). These element families are shown in Fig. 5.13.Figure 5.14 summarizes the closed form of integrals for polynomials andTable 5.1 gives commonly used constants.

To illustrate the application of these equations in evaluating elementmatrices, we consider the following examples, where H(r, s, t) =[H1H2. . .

r r 1(1 — r)) ILe — Le121

r J J 2 ii

(1—r—s) Ae_Ae,3_Ac13 1

12Ef JJTda=J f r 1dr4AC

J t. Js AC/31

(5.22)

and

I I r(1—2r+r2) (r—r2)-iI HTHdI= I

I Id!JLC JLC L sym. r J

F(Le — 2LV2 + LC/3) (LCI2 — Ld/3)1 2 1

= I sym. j 6[i (5.23)

Many element matrix definitions involve global derivatives of the inter-polation functions. Recall from Eqn. (5.14) that these can be representedas

Fx1 1H,1

d(r, s, t) — [dj [away] [HY811/az

where, from Eqn. (5.13),

d =

in which J is the Jacobian of the transformation and is the local derivativematrix given in Eqn. (5.10). For simplex elements all three of these matricesare constant. Thus they can be moved outside some integrals. For example,consider the integral of the x derivative of the interpolation function H,

Page 89: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

80 5. Isoparametric elements

i.e. of

I dTjdl=h{

At this point it is interesting to compare the exact and numerical inte-gration procedures. Consider a typical term such as

I= f HTq dl,

where q is a known variable scalar quantity. Assume that one defines thevalue of q within the element by interpolating to its known nodal values,i.e. q(r) = H(r)Qe. Integrating this expression numerically for a constantJacobian one obtains:

I (5.24)

where denotes the tabulated weights, r denotes the tabulated integrationpoint and where the scalar q(r,) . By way of comparison the exactform would become

I= j dl

= (ILC HTHdl)Qe =

[2 1](5.25)

Of course, the expressions (5.24) and (5.25) are identically equal for aproperly selected numerical integration order, but in this simple case theexact form is probably faster to compute. However, it is possible foradditional terms to occur in the integrand. For example, assume that theintegral contains an additional variable, v, which is also defined by itsnodal values, ye. The numerical integration is easily extended to includeany number of additional terms. For example,

I= j d1 JI

where the scalar v, The exact method is less easily extended. Forexample,

I =J

HTvq dl= f vHTq dI,

i =veT[JHTHTHdI]Qe

where the quantity in the square brackets must be considered as a

Page 90: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.4 Simplex elements, a special case 81

hyper-matrix. A hyper-matrix is a matrix whose coefficients are themselvesmatrices. This concept is not usually covered in most engineers' formaleducation. Also, as more terms appear in the integrand the resultinghyper-matrices become more and more complicated and difficult to evalu-ate. The resulting hyper-matrix multiplications rapidly become costly asthe number of terms increases. Since the numerical integration does nothave this added complexity, and also allows one to generate curved ele-ments, it is recommended as the best procedure for the beginner. Ofcourse, one should utilize the known closed form of the simple integralsif it is more efficient.

Before leaving the subject of simplex integrations one should give con-sideration to the common special case of axisymmetric geometries, withcoordinates (p, z). Recall from calculus that the Theorem of Pappus relatesa differential volume and surface area to a differential area and length inthe (p, z) plane of symmetry, respectively. That is, dv 2irp dA anddS = where p denotes the radial distance to the differential element.Thus, typical axisymmetric volume and surface integrals reduce to

= = 2JrJ HTpda

= 2n (j HTH da) pe

2112JrAc[i

2 1]pe

112and

Is= JHTdS= 2JrfHTpdl

= 2Jr(f 11T11 dl) pe

2,rLc[2 1]

= 62JpC,

since p = Hpe. Many workers like to omit the term and work on aper-unit-radian basis so that they can more easily do both two-dimensionaland axisymmetric calculations with a single program.

Page 91: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 5.12 The simplex element family

z

3/L/7

r2 1-.-2 r

5//

0

S

3

2

(0,0)

4

2

V

(1— r

Global Local definition

2

4

Page 92: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 5.13 Complete polynomial families

(P+NSPACE)iNr

P1 NSPACE'

Polynomial orderDimension of space

N Number of coefficients

NSPACE

N 3

N 10

integrals for constant Jacobian elements in unit

LtI

Im!n!

(2+m+n)!m!n!p!I

jvc

P

1

2

3

4

N

N

N

N

N

N

1

NSPACE

NSPACE =3= 6Vc

Page 93: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

84 5. Iso parametric elements

Table 5.1 Exact Integrals in Unit TriangleCoordinates

A =fdA,Ifr°?dAa b N

0 0 1

1 0 30 1 32 0 61 1 12

0 2 63 0 102 1 301 2 300 3 104 0 153 1 602 2 901 3 600 4 15

5.5 Isoparametric contours

Contour plotting on two- or three-dimensional isoparametric surfaces isa problem facing many finite element code developers. Most proceduresuse some type of linear interpolation to approximate the contour locations.In general, the use of linear interpolation to locate contour lines on higherorder isoparametric finite elements destroys much of the inter-elementinformation contained within the results of an analysis. Without adequatemeans of visually showing the results of higher order finite element cal-culations, numerous developerspf finite element codes have been reluctantto include these elements in their element libraries. Akin and Gray [6]have presented an interpolation procedure for contouring on any isopar-ametric finite element surface. This procedure is based upon the isopara-metric interpolation function itself and as such does not destroy or inventany information that was not already contained within the results. Thework presented here extends the procedure with regard to accuracy infollowing the contour lines.

Consider any isoparametric element formulated in local coordinates, rand s as shown in Fig. 5.15. At any local point the value of the quantity

Page 94: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.5 Isoparametric contours 85

of interest is as in Section 5.2:

t(r, s) = H(r, s)Tc, (5.26)

where H and TC again denote the interpolation functions and the nodalvalues, respectively. If a contour of t can be defined in the local space,then it can easily be converted to the global space.

Assume that the contour is given by t = K where K is the contour level,and also assume that the local coordinates (re, 50) of one point on thecontour are known. The equation of such a curve is given by dt = 0. Inlocal coordinates, this becomes

(5.27)

where dr and ds are components of a displacement dL which is tangentialto the contour. Select a constant step size, dL, to be used in tracing thecontour path. As shown in Fig. 5.16, if the contour segment makes anangle of 0 with the r axis, then dr = dL cos 0 and ds = dL sin 0. Clearly,the value of tan 0 can be obtained from Eqn. (5.27) using the values ofät/är and ôt/3s, which are obtained easily for any isoparametric element byutilizing the local derivatives of Eqn. (5.26). That is,

at/ar = aHIarT,

=

or symbolically

(5.28)

where the subscript I denotes local derivatives. Thus, given a starting pointon an element contour line, all one needs to trace the line through theelement are the nodal values of the function, the local coordinate derivativesof the interpolation equations, and an assumed step increment dL. Usingthis assumption, the formulae which predict the position of the contourline's next (or new) location with respect to the previous (or old) locationare

rfat\2+1—I I[\arj \asJ J

IdL\ atr0Id

+ k—)(5.29)

/dL\ atSnew Sold — I — I —.\ g / ar

Page 95: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

86 5. Iso parametric elements

Clearly the accuracy and cost of such a procedure depend on the sizeof the local increment, dL. This procedure will tend to deviate from thetrue contour path because of the numerical errors involved, that is, at theend of a single step the new contour value is not exactly equal to the onewhich was supposed to be followed. The gradient of the new contour willbe used to calculate another position which is more inaccurate than theprevious one, etc. in practice, however, this accumulation of error is notperceptible visually except when dealing with a closed contour. Becauseof the above inaccuracies, the contour will not close; instead it will spiraluntil an element boundary is reached, or the maximum number of allowablepoints upon a contour has been exceeded.

The above procedure can be modified to make the accumulated erroracceptably small without excessive increase in computational cost by takinga simple correction step normal to the contour line to reduce the amountof deviation. in our terminology, the corrected local coordinates may becalculated from the equations

/1\2rcor E Tflew — [t(rnew, Snew) K],

— (1)2ät— K],

where K is the correct contour value. This simple correction producescontour lines which are in most cases more accurate than it is possible torecord on a graphics display device.

To terminate the contour, one checks the coordinates at the end of eachnew segment to see if they remain within the element. For higher orderelements it is likely that some contours will be closed loops, and in thiscase the test would fail to stop the calculations. Thus, it is necessary tohave a maximum number of allowable segments on any one contour. Therequired value is MAX P/dL, where P is the element perimeter length.

Once a contour has been completely traced in the local space, all pointson the contour are converted to the corresponding global coordinates andreturned for plotting. The global values would generally be transformedagain for isometric or perspective plotting.

The selection of the local coordinate starting point can involve twooptions: one for conveying quick and inexpensive engineering information,and another for detailed quality plots of specific contour values. In thefirst case, one could plot contours beginning at specific points instead ofthose which have specific values. For example, one could plot all contoursbeginning at the mid or third points of each edge of each element. Thiswould give contour segments that are Continuous across two elements and

Page 96: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5.5 Isoparametric contours 87

then terminate. This eliminates the need for expensive contour locatinglogic but is not desirable for final reports.

The application of the second and more common procedure is moreexpensive. One must test each element to determine if a specified contourvalue lies within the element. The local coordinates of a contour intersectingthe edge of a linear, quadratic, or cubic element are easily found. However,a given curve will usually intersect more than one edge. Thus, to avoidplotting such curves twice, it is necessary to compare the calculated terminalpoint of one curve to see if it lies within a distance of dL of any otherinitial point on other edges of the element. For quadratic and cubicelements, it is necessary to test for closed loops not intersecting the edge.This is more difficult. One could check the value of t on lines of r = const.and s = const. that pass through the centroid of the element to determinean internal starting point in local coordinates.

Reference [6J shows a subroutine, LCONTC, for tracing the contourcurve in a single element, it calls subroutine SHAPE to extract the inter-polation functions H, subroutine DERIV to extract the local derivatives,

of H, and a standard matrix multiplication subroutine, MMULT. Figure5.17 shows typical results of the application of subroutine LCONTC tocontour calculation in a quadratic triangle. For comparison, Fig. 5.18 showsa similar problem except that the corrector was not used. Notice that inFig. 5.18 the interior contour line spirals, while in Fig. 5.17 the contourline closes upon itself, graphically demonstrating the difference betweencontour line calculation without and with a correction step normal to thecontour line, respectively.

Figure 5.19 shows typical results obtained from a quadratic quadrilateral.This figure demonstrates the successful calculation of contours when thenodal contour function contains a separatrix. Two continuous curves aredrawn to represent the separatrix. The first starts at the right-hand mid-point node and proceeds to the bottom mid-point node. The second startsat the left-hand mid-point node and proceeds to the top mid-point node.

Page 97: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 5.15 An isoparametric element formulated in local coordinates r and s

Fig. 5.16

S

(a) Global

(b) Local

0

fK

21d5dr

FIg. 5.17 Typical results of the application of subroutine LCONTC to contour calcu-lation in a quadratic triangle

"II'

3

2

0

—1

S

p

dL

-i 0 I 2 3

x — Axis

Page 98: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

'C

FIg. 5.18 As Fig. 17, but without use of corrector

3

—I 0 I 2

x -Axis3

2-

0-

Fig. 5.19 Typical results obtained from a quadratic quadrilateral

6

5

4

3

0

-2 I I I I

-3 -2 -I 0 2 3 4Ax is

Page 99: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

90 5. Isoparametric elements

5.6 Exercises

1. For a two-dimensional problem verify that the inverse Jacobian can bewritten in closed form as

ay

as arax

as iir

where x = x(r, s), and y = y(r, s).2. It is common (when sufficient storage is available) to evaluate the

interpolation functions and their local derivatives only once at eachintegration point. The arrays for each point are stored for later use.That is, the array H becomes H(N,NQP) and the local derivatives, sayDLH, are DLH(NSPACE,N,NQP) where NQP denotes the number ofquadrature points. Write a routine to generate and store H and DLHin this form. Rewrite subroutine ISOPAR to use the arrays in this form.

3. Rewrite subroutine JACOB to allow for the case where the local spacedimension, say LSPACE, is not the same as the global space dimension,NSPACE.

4. For a two-dimensional problem show that at any typical point

= [Hj,rY.s —I

= [H1,rX.s + Hj,5X,rI/IJI

where IJI is the Jacobian determinant.S. Show that the integral is independent of IJI.6. The Jacobian definition used here is common to the finite element

literature. Verify that it is not the same as the standard mathematicaldefinition. Indicate changes in the previous routines that would benecessary to agree with the classical notation.

Page 100: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6

Element integration andinterpolation

6.1 Introduction

Recall that the finite element analysis techniques are always based onan integral formulation. Therefore the accuracy of the integration of theelement matrices is quite important. In many cases it is impossible orimpractical to integrate the expression in closed form and numerical inte-gration must therefore be utilized. If one is using sophisticated elements,it is almost always necessary to use numerical integration. Similarly, if theapplication is complicated, e.g. the solution of a non-linear ordinary dif-ferential equation, then even simple one-dimensional elements can requirenumerical integration. Many analysts have found that the use of numericalintegration simplifies the programming of the element matrices. This resultsfrom the fact that lengthy algebraic expressions are avoided and thus thechance of algebraic and/or programming errors is reduced. There are manynumerical integration methods available. Only those methods commonlyused in finite element applications will be considered here.

6.2 Exact integrals for triangular and quadrilateral geometries

Most simple finite element matrices for two-dimensional problems arebased on the use of linear triangular or quadrilateral elements. Since aquadrilateral can be divided into two or more triangles (see Fig. 4.8), onlyexact integrals over arbitrary triangles will be considered here. Integralsover triangular elements commonly involve integrands of the form

1= (6.1)

91

Page 101: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

92 6. Element integration and interpolation

where A is the area of a typical triangle shown in Fig. 6.1. When

0 (m + n) 2, the above integral can easily be expressed in closed formin terms of the spatial coordinates of the three corner points. For aright-handed coordinate system, the corners must be numbered incounter-clockwise order. In this case, the above integral becomes

(a) m =O,n =O,A =JJdA +x2(y3—y1) +x3(yi—y2)1,

(b)m=0,n=1,I=JjydA =A9,

(c)

m 2, n = 0,! = JJx2dA = + + + (6.2)

where

I = + X2 + X3),

The integrals (6.2) should be recognized as the area, and first and secondmoments of the area. If one had a volume of revolution that had a triangularcross-section in the (p, z)-plane, then one should recall that

= JJJV pf(p, z) dpdzdO = pf(p, z) dpdz

so that similar expressions could be used to evaluate the volume integrals.The above closed form integrals are included in subroutine TRGEOM,which is shown in Fig. 6.2. One enters this routine with the values of theintegers M and N, the corner coordinates, and returns with the desiredarea (or volume) integral. Similar operations for quadrilaterals are per-formed by splitting the quadrilateral into two triangles and making twocalls to TRGEOM to evaluate the integral.

Page 102: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.1 A typical triangular element

y

(x2 ,y2)2

x

Fig. 6.2 Subroutine TAG EOM

SUBRCUTINã TRuEOMCC EXACT GEOMETRIC PROPERTIES OF AN ARbITRARY TRIANGLECCDP IMPLICIT REAL*8(A—H,O—Z)

CIMENSION CCURO(3,2)COP ABS(Z) = LJABS(ZJC VAILh = INTEGRAL OF (X**M)*(Y**NJ*DA (0<=M,N<=2)C BY NCODE; 1—AREA, 2—VOL REV AbOUT X,C 3—VCL REV ABOUT Y, 4—FIRST MOMENT X,C 5—FIRST MOMENT ABOUT Y, 6—SEC ABOUT X,C 7—SEC MOMINT WRT X—Y AXES, 8—SEC frCMENT ABCUT V

P1 =XI COUkL)(1,1XJ LCiLThD(2,1XK = COORI)(3,1VI = LOORO(i,2YJ = &,C0RU(2,2YK = CüORD(3,ZAREA = O.5*(X1*(YJ—YK)+XJ*(YK—YI)+XK*(YJ—YJ))XB = (XI+XJ+XK)/3.DOYB = (YI+YJ+YKJ/3.DO

TO ,C fr=O, N=O, AREA

10 VALL.E = AREARETURN

C M=0, N=u, VCLLME OF REVOLUTiON ABCUT X—AXIS20 VALLI =

I

1 WRITE5000 ('UINVALIO DATA FOR VOLUME OF REVGLUICN. ')

RETURNC fr=O, N=J, VCLUME OF REVOLUTION ABCLT V—AXIS

30 VALUtIF I+ABS(XJ)+ABS(XKI) .NE. ABS(XI+XJ+XK) )

1 (o,5uu.,)RET I.. RN

C M=0, N=1, FIRST MOMENT ABOUT X—AXIS40 VALLE = MREA*VB

RETC =1, N=0, FIRST MOMENT ABOUT V—AXIS

50 VALLE =RETURN

C M=O, N=2, SECCND MOMENT ABOUT X—AXIS60 VALLE = AREA*(YI*Yj+yJ*yJ+YK*YK+9.OO*yb*yb)/12.DO

RETURNC fr=1, N=1, SECCND MOMENT W.R.T. X—Y AXES

70 AREA*( XI*YI+XJ*YJ+XK*yK+c.Oo*xB*Y6),12.ooRETURN

C fr=2, N=U, SECOND MOMENT ABOUT V—AXIS80 VALUE =

RET L RNEND

,y1)

Page 103: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

94 6. Element integration and interpolation

6.3 Gaussian quadratures

Since the finite element method requires a large amount of integration,it is imperative that one obtain the greatest possible accuracy with theminimum cost (computer time). The most accurate numerical method inordinary use is the Gauss quadrature formula. Consider the definite integral

bi=f f(x)dx,

which is to be computed numerically from a given number, n, of valuesof f(x). Gauss considered the problem of determining which values of xshould be chosen in order to get the greatest possible accuracy. In otherwords, how shall the interval (a, b) be subdivided so as to give the bestpossible results? Gauss found that the "n" points in the interval should notbe equally spaced but should be symmetrically placed with respect to themid-point of the interval. Some results of Gauss's work are outlined below.Let y denote f(x) in the integral to be computed. Define a change ofvariable

x(r) = 4(b — a)r + 4(b + a) (6.3)

so that the non-dimensionalized limits of integration of r become —1 and+ 1. The new value of y(r) is

y= f(x) +a)] (6.4)

Noting from Eqn. (6.3) that dx — a)dr, the original integral becomes

(6.5)

Gauss showed that the integral in Eqn. (6.5) is given by

L dr=

W1çb(r1), (6.6)

where W, and r represent tabulated values of the weight Junctions andabscissae associated with the n points in the non-dimensional interval(—1, 1). Thus the final result is

I = — a) (6.7)

Gauss showed further that this equation will exactly integrate a polynomial

Page 104: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.3 Gaussian quadratures 95

of degree (2n — 1), e.g. For a higher number of space dimensions(which range from —1 to +1) one obtains a multiple summation. Forexample, consider a typical integration in three dimensions

—1 —I —I

or

I SI,i=1 j=1 k=1

which could also be written as a single summation over n3 points. That is,

=W,Ø(r1, s1, ti), (6.8)

where

1i+(j—1)n+(k—1)n2,=

=

(I =

WI = W•WJWk,

and where the W's and a's are the tabulated one-dimensional Gausscoefficients. Since the time required, and thus the cost, is a function of

it is desirable to keep n as small as possible. Of course, it is notalways necessary to use the same number of points in each space dimension.

Most texts on numerical analysis contain tabulated data on the weightsand abscissae required for integration by Gaussian quadratures, e.g. Ref.[14]. Table 6.1 contains a set of typical one-dimensional data. In a specialpurpose program, these data would probably be stored in a BLOCK DATAor COMMON statement. In the present building block system, these dataare stored in a subroutine called GAUSCO. One enters this routine, whichis shown in Fig. 6.3, with the order of the integration, n, and returns withthe n values of the one-dimensional weights and abscissae. Data for higherorder dimensional spaces are obtained from the above one-dimensionaldata by utilizing Eqn. (6.8). These quadrature data for two- and three-dimensional data are presented in Tables 6.2 and 6.3, respectively. Thesetwo-dimensional data were generated by subroutine GAUS2D as shownin Fig. 6.4.

Page 105: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

96 6. Element integration and interpolation

As an example of Gaussian quadratures, consider the following one-dimensional integral:

(2r2 2x 1 (2

1=1 I IdxI [F(x)]dx.L2x (1 + 2x2)i

If two Gauss points are selected, then the tabulated values give W1 =W2 = 1; and A1 = 0.57735 = —A2. The change of variable gives x(r)(r + 3)72, so that x(Ai) = 1.788675 and x(A2) = 1.211325. Therefore fromEqn. (6.7)

I = — 1){W1[F(x(Ai))] + W2[F(x(A2))]}

r r2 2(1.788675)i r2 2(1.21l325)ilI + (1)1 I

Lsym. 1 + 2(1.788675)2] [sym. I + 2(1.211325)2iJ

or

r2.00000 3.00000 t

1=1 I,L3.00000 5.666667i

which is easily shown to be in good agreement with the exact solution.Similarly, evaluating the two-dimensional integral

I= J

J (r2 + s)drds

by using the data in Table 6.2 for two Gauss points in each dimensionresults in

I = + + + 52) + + 53) + + 54)

or

I = 1L(+0.5773)2 + (+0.5773)1 + 1[(+0.5773)2 + (—0.5773)]

+ + (+0.5773)] + 1[(_0.5773)2 + (—0.5773)]

so that I = 1.33333. This agrees well with the exact value of I = 4/3.The above Gaussian data are well suited to line elements, quadrilateral

elements and hexahedral elements. However, if numerical integration overa triangular or wedge-shaped element is required then other techniquesare usually utilized. Some of these methods are presented in the nextsection.

Page 106: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.3 Subroutine GAUSCOSUBRCUTINt GAUSCO

C **C QUADRATURE ABSCISSAE AND CCEFFSCCOP IMPLICIT REAL*8(A—H,D--Z.)

DIMENSION A(N)I W(N)CATA NMAX/4/

C N = NO. OF GAUSS POINTS IN ONE DD4ENSIONC A = ABSCISSAE, w = WEIGHTS OF GAUSS POINTSC NMAX MAX. NO. OF POINTS TABULATED hEREIN

NLESI = N — 1C-C IC 410,20,30,40), NLES1

C N= 210 = 0.57735026918962600

Mfl = —AU)w(1) = 1.00w(2) = 1.00RET LRN

C20 A(1) = 0.77459666924148300

A(2) = 0.00A(3) = —All)

= 0.55555555555555600W(2) = 0.88888888888888900

= W(1)RE IL RN

C30 A(1) = u.861136311594053D0

A(2) = 0.33c98104358485600A(3) = —A(21A(4) = —A(1)Wit) = 0.347854845137454001(2) = 0.o5214515486254600W(3) = W121

= W(1)RET LRN

40 WRITE (6,5000) NMAX5000 FO4MAT ('ON >',13,' COEFFICIENTS NOT TA8ULATEC'I

RETURNEND

FIg. 6.4 Subroutine GAUS2D

SUBROUTI NL GAUS2D (NQP,GPT ,GwT ,NIP, PT,CC USE 1—0 uAUSS1AN DATA TO GENERATEC DATA FOR A QUADRILATERALCCDP IMPLICIT REAL*8 (A—H 0—ZI

DIMENSION GPTLNQPI, P1(2,1),C DIM PT(2,NIP), WT(NIP)C NQP = NO. TABULATED 1—0 POINTS, NIP =C OPT, GnT = TABULATED 1—0 QUADRATURE RULESC PT, = CALCULATED COORDS ANL) wEiGHTS IN

CALl. GAUSCO (NQP,GPT,GWT)NIP = NWP*NQp

DO 2C I = l,NQPDC 10 J = 1,NQPK Ic+ I

=PT(1,si = GPT(J)

10 = GPT(Ii20 CONTINUE

RET LRNEND

Page 107: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

0.57735 02691 89626

0.77459 66692 414830.00000 00000 00000

0.8611363115940530.33998 10435 84856

0.9061798459386640.53846 93101 056830.00000 00000 00000

0.93246 95142 031520.66120 93864 662650.23861 91860 83197

0.94910 79123427590.741 53 11855993940.4058451513773970.00000 00000 00000

0.96028 98564 975360.79666 64774 136270.52553 24099 163290.18343 46424 95650

n=21.000000000000000

n=30.55555 55555 555560.88888 88888 88889

n=40.3478548451 374540.65214 51548 62546

n=50.23692 68850 561890.47862 86704 993660.56888 88888 88889

n=60,17132 44923 791700.36076 15730481390.4679 1 39345 72691

n=70.1294849661 688700.27970 53914 892770.38183 00505 051190.41795 9183673469

n=80.10122 85362 003760.2223810344533740.31370 66458 778870.36268 37833 78362

Table 6.1 Abscissae and Weight Coefficients of theGaussian Quadrature Formula

jf(x) dx=

W1f(r1)

±r1 WI

Page 108: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Table 6.2 Weights and Abscissae for IntegrationOver a Quadrilateral by Gaussian Quadrature

Order Point r s Weight

2 1 +A1 +A1 W1

2 +A1 -A1 W1

3 -A1 -t-A1 W1

4 -A1 -A, W1

3 1 +A2 +A2 W2

2 +A2 0 W3

3 +A2 -A2 W2

4 0 +A2 W3

5 0 0 W4

6 0 —A2 W37 -A2 +A2 W2

8 -A2 0 W3

9 -A2 -A2 W2

4 1 +A3 +A3 W5

2 +A3 +A4 W63 -A4 W6

4 +A3 —A35 +A3 W6

6 +A4 +A4 W7

7 +A4 —A4 W7

8 +A4 -A3 W6

9 -A4 -i-A3 W610 —A4 +A4 W7

11 -A4 -A4 W7

12 -A4 -A3 W6

13 —A3 +A3 W5

14 -A3 +A4 W6

15 -A3 -A4 W6¶6 —A3 —A3 W5

A1 = 0.577350269189626 Wi = 1.0A2 = 0.774596669241483 W2 = 0.3086419753086425A3 = 0.861136311594053 W3 = 0.4938271604938276

= 0.339981043584856 W4 = 0.7901234567901236W5 = 0.1210029932856021W6 = 0.226851851851 8519

W7 = 0.4252933030106941

Page 109: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Table 6.3 Gaussian Quadrature Weights and Abscissaefor Integration Over a Cube

Order Point r s t Weight

2 1 ÷A1 +A, +A, W1

2 +A1 +A, —A, W,

3 +A, —A, +A, W1

4 +A, -A1 -A1 W,

5 —A1 +A, +A, W1

6 -A1 +A1 -A, W1

7 -A, -A, +A1 W,

8 -A, -A, -A, W,

3 1 +A2 +A2 +A2 W2

2 +A2 +A2 0 W3

3 +A2 +A2 —A2 W2

4 +A2 0 +A2 W3

5 +A2 0 0 W4

6 +A2 0 —A2 W37 +A2 —A2 +A2 W28 +A2 —A2 0 W39 +A2 —A2 —A2

10 0 +A2 W311 0 +A2 0 W4

12 0 +A2 —A2 W313 0 0 +A2 W414 0 0 0 W5

15 0 0 —A2 W416 0 —A2 +A2 W317 0 —A2 0 W4

18 0 —A2 —A2 W319 —A2 +A2 -1-A2 W220 —A2 +A2 0 W3

21 —A2 +A2 —A2 W222 —A2 0 +A2 W323 —A2 0 0 W424 —A2 0 —A2 W325 —A2 —A2 +A2 W226 —A2 —A2 0

27 —A2 —A2 —A2 W2

A, = 0.577350269189626 W, = 1.0 W8 = 0.042091477490532'42 = 0.774596669241483 W2 = 0.171467764060357 W7 = 0.078911515795071A3 = 0.861136311594053 W3 = 0.274348422496571 W8 = 0.147940336056781

= 0.339981043584856 W4 = 0.438957475994513 W9 0.277352966953913

= 0.702331961591221

Page 110: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.4 Numerical integration over triangles 101

6.4 Numerical integration over triangles

As noted earlier, the use of standard Gaussian quadrature data overtriangular domains is uncommon. integration over triangles usually requiresa special coordinate system. Many finite element texts present triangularelements in terms of area or natural coordinates. However, the authorfeels it is simpler to introduce the local coordinate system for the unittriangle shown in Fig. 5.12. If the element has sides defined by the threecorner points, then it is easily shown that

x(r, s) = x1 + (x2 — x1)r + (x3 — x1)s, (6.9)

y(r, s) = Yi + (y2 — y1)r + — y1)s,

where the x and y, denote the global coordinates of the corners. TheJacobian (see Section 5.2) for the unit triangle transformation then becomes

1(x2—x1) (y2—yl)1(6.10)

L(x3 —xj) (y3—yi)J

which is constant, so that its determinant

= 2A (x2—xI)(y3—yl) — (x3—x1)(y2—y1)

is also constant. As before, one approximates an integral of f(x, y) F(r, s)over a triangle by

I f f(x, y) dxdy s1)

For triangular regions the weights, W1, and abscissae (r,, s,), are less wellknown so several different rules on the unit triangle are tabulated in Figs.6.5 and 6.6. Figure 6.5 presents rules that yield points that are symmetricwith respect to all corners of the triangle. Figure 6.6 presents rules thatyield points that are symmetric with respect to the line r = s. They areknown as Radau rules.

As a simple example of integration over a triangle, consider the integral

= Jf ydxdy

over a triangle with its three vertices at (0, 0), (3, 0) and (0, 6), respectively,in (x,y) coordinates. Then A = 9 and IJI = 18 and for a three point quad-rature rule the integral is thus given by

I=

Page 111: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

102

where

6. Element integration and interpolation

= y, + (y2 — y,)r, + — y1)s1 = 6sf.

Substituting from the three point rule in Fig. 6.5(b), and factoring out theconstant

I = 18[(1/6)(6)(O) + (1/6)(6)(1/2) + (1/6)(6)(1/2)J = 18,

which is the exact solution. The above data can be related to the so-calledarea coordinates (A1, A2, A3), see [87], by noting that r = A2, s A3, and1 =A1 + A2 + A3. It is also useful to be aware of the numerical check thatthe sum of the weights must equal one half.

Fig. 6.5 Symmetric quadrature rules for the unit triangle

(b)n=3,1

23

2345

67

(d)n=7,1

23

45

67

A1 = 0.05971587A2 = 0.10128651

W,1/2 0 1/61/2 1/2 1/60 1/2 1/6

TI S1 W1

o 0 1/401/2 0 1/15

1 0 1/401/2 1/2 1/150 1 1/400 1/2 1/15

1/3 1/3 9/40

s, W,A2 A2 W,A3 A, W2A4 A2 W,A3 A3 W2A2 A4 W,A, A3 W21/3 1/3 W3

A3 = 0.47014206A, = 0.79742699W3 = 0.1125

1 2 3

Wi = 0.06296959W2 = 0.06619708

(a) n = 1, i r, W,1 1/3 1/3 1/2

(c) n = 7,

S

S

3

S

5

S

6\ 4

I.

Page 112: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

I

234

r, S,

A3 A1

A4 A2 W2

A3

'42 A4 W2

A1 = 0.0750311102A2 = 0.1785587283

A3 = 0.2800199155A4 = 0.6663902460

Wi = 0.0909793091= 0. 1590206909

A1 = 0.02393113229A2 = 0.06655406786A3 = 0.10271765483

i r, S1 W,1 A5 W12 A8 '42 W43 A9 A3 W34 A4 A4 W25 '46 A6 w66 A7 W57 A1 A5 W,8 A2 A8 W49 A3 A9

A4 = 0.10617026910A5 = 0.188409405913A6 = 0.29526656780

A7 = 0.45570602025A8 = 0.52397906774A9 = 0.80869438567

Fig. 6.6 (a) Gauss—Radau quadrature rules for the unit triangLe

S

(a) n = 4,

p

(b) n = 9,

$

p

W1 = 0.01939638330414/2 = 0.031034213285

W4 0.063678085097W5 = 0.089303072783

W3 = 0.055814420490

Page 113: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.6 (b) Gauss—Radau quadrature rules

SI

A1A2'44A5A3A8A9A11

A6A10

A11

'414A7A12

WI

WIW3

W5

W4

w2W6

W8

WiW,W6

W8

WiWIW3

W5

W4

= 0.00970378512A2 = 0.02891208422A3 = 0.04612207989

= 0.05021012321A5 = 0.06546699455A6 = 0.09363778441A7 = 0.13005607918'48 = 0.13741910412W1 = 0.005423225910W2 = 0.010167259561W3 = 0.022584049287W4 = 0.023568368199

A0 = 0.23864865974'410 = 0.27899046348

= 0.31116455224A12 = 0.38749748338'413 = 0.48450832666A14 = 0.63173125166A15 = 0.67294686319A16 = 0.87742880935W5 = 0.035388067900W6 = 0.042339724518W7 = 0.044185088522W8 = 0.066344216093

(c) n16, TI

1 '472 A12

3 A15

4 A16

5 A66 A11

789 '43

10 A811 A91213 Ai14 '4215 A416

St

S16

'15 12.

11,

.148,

10.S

,136

24.5

I_I

r

Page 114: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.5 Minimal, optimal, reduced and selected integration 105

6.5 Minimal, optimal, reduced and selected integration

Since the numerical integration of the element square matrix can rep-resent a large part of the total cost it is desirable to use low order integrationrules. Care must be taken when selecting the minimal order of integration.Usually the integrand will contain global derivatives so that in the limit,as the element size h approaches zero, the integrand can be assumed tobe constant, and then only the integral I = fdv = remains to beintegrated exactly. Such a rule could be considered the minimal order.However, the order is often too low to be practical since it may lead to arank deficient element (and system) square matrix, if the rule does notexactly integrate the equations. Typical integrands involve terms such asthe strain energy density: BTDB/2 (see Chapter 10).

Let NQP denote the number of element integration points while NIrepresents the number of independent relations at each integration point;then the rank of the element is NQP*NI. Generally, NI corresponds to thenumber of rows in B in the usual symbolic integrand BTDB. For a typicalelement we want NELFRE, where NC represents thenumber of element constraints, if any. For a non-singular system matrixa similar expression is NDFREE-NR, where NRdenotes the number of nodal parameter restraints (NR 1). These relationscan be used as guides in selecting a minimal value of NQP.

Consider a problem involving a governing integral statement withorder derivatives. If the interpolation (trial) functions are complete poly-nomials of order p then to maintain the theoretical convergence rate NQPshould be selected [83] to give accuracy of order - m) + That is, tointegrate polynomial terms of order 2(p — m) exactly.

It has long been known that a finite element model gives a stiffness whichis too high. Using reduced integration so as to underestimate the elementstiffness has been accepted as one way to improve the results. Theseprocedures have been investigated by several authors including Zienkiewicz[87], Zienkiewicz and Hinton [85], Hughes, Cohen and Haroun [44] andMalkus and Hughes [50]. Reduced integration has been especially usefulin problems with constraints, such as material incompressibility.

A danger of low order integration rules is that zero energy modes mayarise in an element. That is, DeTSeDe = 0 for 0. Usually these zeroenergy modes, are incompatible with the same modes in an adjacentelement. Thus the assembly of elements may have no zero energy modes(except for the standard rigid modes). Cook [25] illustrates that aneigen-analysis of the element can be used as a check since zero eigenvaluescorrespond to zero energy modes.

Page 115: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

106 6. Element integration and interpolation

The integrand usually involves derivatives of the function of interest.Many solutions require the post-solution calculation of these derivativesfor auxilary calculations. Thus a related question is which points give themost accurate estimates for those derivatives. These points are often calledoptimal points or Barlow points. Their locations have been derived byBarlow (12] arid Moan [55]. The optimal points usually are the commonquadrature points. For low order elements the optimal points usuallycorrespond to the minimal integration points. This is indeed fortunate.

As discussed in Chapter 1, it is possible in some cases to obtain exactderivative estimates from the optimal points. Barlow considered line ele-ments, quadrilaterals and hexahedra while Moan considered the triangularelements. The points were found by assuming that the order polynomialsolution, in a small element, is approximately equal to the (p + 1) orderexact polynomial solution. The derivatives of the two forms were equatedand the coordinates of points where the identity is satisfied were deter-mined. For triangles the optimal rules are the symmetric rules involving1, 4, 7, and 13 points. For machines with small word lengths the 4 and 13point rules may require higher precision due to the negative centroidweights.

Generally, all interior point quadrature rules can be used to give accuratederivative estimates. The derivatives of the interpolation functions are leastaccurate at the nodes. Hinton and Campbell [40] have presented relationsfor extrapolating the optimal values to the nodal points.

For element formulations involving element constraints, or penalties, itis now considered best to employ selective integration rules [44, 50]. Forpenalty formulations it is common to have equations of the form

(S1 +

where the constant in the case where the penalty constraint is exactlysatisfied.

In the limit as the system degenerates to S2 D = 0, where thesolution approaches the trivial result, D = 0. To obtain a non-trivial solutionin this limit it is necessary for S2 to be singular. Therefore, the twocontributing element parts and are selectively integrated. That is,is under integrated so as to be rank deficient (singular) whileS? is integratedwith a rule which renders S1 non-singular. Typical applications of selectiveintegration were cited above and include problems such as plate bendingwhere the bending contributions are in SI while the shear contributionsare in

Page 116: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.6 Typical interpolation functions 107

6.6 Typical interpolation functions

The practical application of the finite element method depends on theuse of various interpolation functions and their derivatives. Most of theinterpolation functions for C° and C' continuity elements are now wellknown. The C° functions are continuous across an inter-element boundarywhile the C' functions also have their first derivatives continuous acrossthe boundary. Some of these functions have already been introduced. Forexample, the bilinear isoparametric quadrilateral (Q4), its interpolationfunctions and their local derivatives were presented in Figs. 5.2 and 5.4,respectively.

The one-dimensional nth order Lagrange interpolation polynomial is theratio of two products. For an element with (n + 1) nodes, r,, i =1,2,. .. , (n +1), the interpolation function is

nfl n'-l

LZ(r) = I (r — r)/fl (rk — r,) (6.11)

This is a complete ne" order polynomial in one dimension. It has theproperty that Lk(rI) =

For local coordinates given on the domain [—1, 1J a typical term forequally spaced nodes is

(r—(—1))(r—1)

(0— (—1))(0 — 1)

Similarly =r(r — 1)12 and =r(r + 1)12 and =1. Nowconsider the two-dimensional extension. The first member of the quadri-lateral family has already been introduced in Chapter 5. It is recognizedas a product of the linear Lagrange interpolation polynomial in eachdirection. The four node quadrilateral is commonly called the bilinearquadrilateral. When using m points in each spatial dimension the standardLagrangian quadrilateral will have m2 nodes.

Another popular group of quadrilaterals are the Serendipity elements.The best known eight node, Q8, element has interpolation functions, forthe element in Fig. 6.7,

H(r,s) =(1 —1)14,1 (6.12)

at the corners, while at the mid-sides

H(r, s) = r r)12 + s?(1 — (1 + s 1s)12, 5 i 8. (6.13)

Page 117: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

108 6. Element integration and interpolation

The interpolation functions for the eight node Serendipity element aregiven in subroutine SHP8Q and the local derivatives are in DER8Q, seeFig. 6.8. By adding a central node this element can be extended to becomea Lagrangian biquadratic element (Q9). It is also possible to add the samecentre function to convert the Q4 element to a 05 element. These internalnodes are usually omitted but they can become useful for problems involvingelement constraints such as an incompressibility condition.

The interpolation functions for the bilinear quadrilateral are easily gen-eralized to a trilinear hexadral solid. In local coordinates (r, s, t) theinterpolation functions for this eight node element, H8, are

H,(r,s,t) = (1 + rr)(1 +t1t)/8 (6.14)

where

i r, S, t i r S2 t,

1 1 1 1 5 —1 1 1

2 1 —1 1 6 —1 —1 1

3 1 —1 —1 7 —1 —1 —1

4 1 1 —1 8' —1 1 —1

are the local coordinates of the nodes. Figures 6.9 and 6.10 give thesubroutines for evaluating these functions and their local derivatives,respectively.

The performance of an element depends on the polynomial termsincluded in the interpolation functions. Complete polynomials are the mostdesirable. However, they are exactly included only in the simplex elementsand their generalizations. Figure 6.11 illustrates typical polynomial termsin two-dimensional elements. The Pascal triangle of complete polynomialsis included for comparison. Note that the selected terms are symmetricrelative to the centre of the Pascal triangle. The figure shows that the termx2y2 is included in the 09 element but omitted from the 08 given in Fig.6.8.

The Serendipity elements have been defined on the intervals [—1, 1J inr, s and, t. The use of unit coordinates [0, 1] was presented in Section 5.4for the simplex elements. The interpolation functions for some of thesimplex elements were given there also. These included the two node lineelement (L2) and the common three node triangle (T3). The interpolationfunctions and local derivatives for the latter element are given in Fig. 6.12.The extension of the interpolation functions to the complete quadratictriangle, T6, are given in Fig. 6.13 along with the corresponding derivatives.Figure 6.14 shows a procedure that can be employed to derive the elementinterpolation functions for the six node triangle. It is not uncommon to

Page 118: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.6 Typical interpolation functions 109

define the family of complete triangular elements formulated in the so-called natural or area coordinates. However, those procedures are not usedhere.

We want to generate an interpolation function, H, that vanishes at thejth node when i j. Such a function can be obtained by taking the productsof the equations of selected curves through the nodes on the element. Forexample, let Hi(r, s) = c1r1r'2 where the F1 are shown in Fig. 6.14, andwhere C1 is a constant chosen so that H1(r1,s,) = 1. This yields H1 =(1 —3r — 3s + 2r2 + 4rs + 2s2). Similarily, letting c4r'1r3 gives C4 =4 and H4 = 4r(1 — r — s). This type of procedure is usually quite straight-forward. However, there are times when there is not a unique choice ofproducts, and then care must be employed to select the proper products.The results should always be checked against Eqn. (5.4).

It is common for finite element codes to have an element library thatselects the desired element according to some set procedure. Such asubroutine, SHAPE, is shown in Fig. 6.15. It was referenced by ISOPARin Section 5.3. This particular subroutine uses two integer keys to selectthe desired element. The first key is the dimension of the space, NSPACE,while the second is the number of nodes per element, N. A similarprocedure is used in DERIV to establish the local derivatives of theinterpolation functions.

It may be better to use a single element type number as a key for theelement library. This makes it easier to select both C' and C' elements andavoids confusion when the choice is not unique when using two keys (asin selecting 09 and T9 for two-dimensional problems). For simplicity, C'elements will be only briefly considered in Section 10.5.

FIg. 6.7 Quadratic quadrilateral element

(—1,—I)

(b) Local

r

(1,1)

(a) Global 5 2

Page 119: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 6.8 (a) Subroutine SHP8Q, and (bI subroutine DER8Q

SU8PIJUTINE SHP8Q (S,T,H)** ** ** * ** * ** * * * * * * **SHAPE FUNCTIONS OF 8 NODE IS0PARAIIETRIC** ** ** * *** ** *** * * * **IMPLICIT REAL*8

H(8)NODAL ORDER SHOWN TO RIGHT.S,T = LOCAL COORDINATES CF POINTH = SHAPE FUNCTION ARRAYNODE I AT (—1,—liNODE 3 AT (1,1)SP = 1. + SSM = 1. — STP = I.. + TTM = 1. — I11(1) = O.25*SM*TM*(H(2) = O.25*SP*TM*(

= O.25*SP*TP*(h(4) =H(5) O.5*TM*( 1. —11(6) = O.5*SP*( 1. —H(7) = O.5*TP*( 1. —11(8) = U.5*SM*L I. —RETLRNEND

SUBROUTINE DER8Q (S,T,DH}* * ** * * * * * * ** * * * * * * * * * * * * **FIND LOCAL DERIVATIVES OF SHAPE FUt'sCTICNS FOR AN

NODE ISOPARAMETRIC QUADRILATERAL ELEMENT* * ** * * * * * * ** * * * * * * * * * * * * **IMPLICIT REAL*8 (A—H,O—Z)DIMENSION DH(2,81S,T = LOCAL COORDINATES OF POINTOH LOCAL DERIVATIVES OF SHAPE H01-1(1 JI = DH(J)/DS, DH(2,J) =H = SHAPE FUNCTION ARRAYSP = 1. + SSM = 1. — STP = 1. + TTM = 1. — T011(1,11 —O.25*IM*( SM + SM + TN — 3. 1DH(2,11 = —O.25*SN*( TM + SM + TM — 3. IDH(1,2) = O.25*T14*( SP + SP TM — 3. 1DH(2,21 —O.25*$P*( TM + SP TM — 3.DH(1,3) = O.25*Tp*( SP • SP ÷ TP — 3.DH(2,3) = O.25*5P*( TP + SP + TP — 3. 1DH(1,41 = —O.25*TP*( SM + SM + TP — 3. 1DH(2,4) = O.25*SM*( TP + SM + TP — 3. 1DH(1,51 =DH(2,51 —O.5*(DH(l,6j =DH(2,6I = —7*SP011(1,71 = —S*TPDH(2,71 =DH(1,8) = —0.5*4DH(2.8) = —T*SMRETEND

(b)

QUADRILATERAL* * ** **—7—3

I—

CCCCOP

CCCCC

CCCCC DP

CCCC

— 3. 1

— 3. 1

— 3. 1

— 3. 1

SM + TMSP + TMSP + TPSM + TP

S*S IT*T IS*S IT*T

(a)

1. — S*S I1. — T*T I

1. — S*S I1. — T*T I

Page 120: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.9 Subroutine SHP8H

SUBROUTINE SHP8H CR S I H)CC SHAPE FUNCTIONS OF 6 NODEC

C R,S,T = LOCAL COORDS OF PT j TC H = ELEM SHAPE FUNCTIONSC NODES ORDERED BY RHR / / I

C ABOUT THE R—AXIS 2/—--/1 /1——SC LOCAL COORO:l=(1,I,1J 1 I / 8C 4=(1,1,—1J 7=(—I,—1,—1) R 31——J/ 4

PP = 1. + RPM = 1. — RSP = 1. + SSM = 1. — STP = 1. + ITM = 1. — II-i(lJ =H(2) = O.125*RP*SM*TPH(3) = O.125*RP*SM*TMH(4) = O.125*RP*SP*TMI-(5) = O.125*RM*SP*TPI-(6) = O.L25*RM*SM*TPHUT) = O.125*RM*SM*TMH(8) = O.125*RM*SP*TMRET UPNEND

Ag. 6.10 Subroutine DER8H

SUBROUTINE DER8H CR S T,DH)CC LOCAL DERIVATIVES FOR EIGHT NUDEC ** ************** **** **CDP IMPLICIT REAL*8 (A—H,O—Z1

DIMENSION DH(3,8)C R,S,T = LOCAL COORDINATES OF THE POINTC DH( I KJ=DH/OR, DH(2,K)=DH/DS, DH(3,K)=OH/O1C H = kEMENT SHAPE FUNCTIONS

Pp 1. + RPM = 1. — RSP = 1. + SSM = 1. — STP = 1. + TTM = 1. — IDHC1,1) = O.125*SP*TPDH(2,1) O.125*RP*TPDH(3,IJ = O.125*RP*SPDH(l,21 O.125*SM*TPDH(2,2) = —O.125*RP*TPDH(3,2) = O.125*RP*SMDHII,3) = O.125*SM*TMOH(2,31 —O.125*RP*TMDH(3,3) —O.125*RP*SMOH(l,4) = O.L25*SP*TMDH(2,41 =DH(3,4) = —O.125*RP*SPDH(l,5) —O.125*SP*TPDH(2,5J = O.125*RM*IPDH(3,5) = O.125*RM*SPDH(1,6) = —O.125*SM*TPDH(2,63 = —O.125*RM*TPDH(3,6) O.125*RM*SMDH(1,7) = —O.125*SM*TMDH(2,7) = -O.125*RM*TMOH(3.71 = —O.125*RM*SMOH(1,81 = —O.125*SP*TMDH(2,81 = O.125*RM*IMDHC3,8) = —O.125*RM*SPPET (. RNEND

Page 121: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.11 Typical two-dimensional polynominal terms

x y

x2y//

/ \/n—i

A y———

y

-VA,,

c ) Serendipity quadrilaterals

/(d) Lagrangian quadrilaterals

Fig. 6.12 (a) Subroutine SHP3T, and (b) subroutine DER3T

SUBRCUTINE SHP3T (S,T H)** ** ** * ** * * * * * * * *SHAPE FUNGI ICNS FOR A THREE NUDE UNIT** ** * * * * * * ** * ** * * * *IMPLICIT REAL*8 (A—H,O—Zj

H(3)S,T = LOCAL COORDINATES CF THE PCINT 3 TH = SHAPE FUNCTIONSNODAL COOKOS l—(O,O) 2—(1,Q) 3—40,1) 1..2 ...SI-U) = 1. — 5 — 1-

H(2) = S1-1(3) = IPETEND

(a)

A-V y2

xy2 y3,\\

n—Ixy y

(o ) Pascal triangle (b) Complete polynomial triangles

CCCC DP

CCC

IANGLE

Page 122: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.12—continued

SUBROUTINE DER3T (S,T,DH)CC LOCAL UERIVATI YES OF A THREh NODE UNIT TRIANGLECCDP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSiON 011(2,3)C S,T = LOCAL CCCRDINATES CF THE POiNTC 011(1,1(1 = DH(K)/DS, OH(2 Ki=DH(K1/CTC NODAL COCaRDS ARE : 1—(O,0 2—(1,Cj 3—(O,l)

DH(1,1) = —1.011(1,2) = I.DH(1,3) = 0.0DH(2,1) = —1.011(2,21 = 0.0011(2,3) = 1.RET t RNEND

(b)

Fig. 6.13 (a) Subroutine SHP6T, and (b) subroutine DER6T

SUBRLUTINt SHP6T (S,T,H)CC LOCAL SHAPE FUNCTIONS FOR A SIX NCOE UNIT TRIANGLECCOP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION 11(6)C S,T = LOCAL COORDiNATES 3C OF A POiNT IN THE UNIT TRIANGLEC H = SIX SHAPE FUNCTIONS FOR A QUACRATIC 1 6 5C tLEMENT WITH SIX NODESC THE NODAL ORDER IS SHOWN TO THE RIGHT .—S 1 4 2C NODAL COORDS l—(O,O) 2—Cl 0) 3—(O,11C 4—(0.5,0J 5—(6.5,C.51 6—(C,C.5)= 1. — 3.*S — 3.*T + 2.*S*S i 4.*S*T 4 2.*T*TH(2) = 2.15*5 — S

11(3) = 2.11*1 — Ip.4(4) = 4.*(5 — S*S — S*T)11(5) = 4.15*1H(6) = 4.1(1 — 5*1 — T*T)RETURNEND

(a)

DER6T (S T,OHICC LOCAL DERIVATiVES FOR A SIX NODE LNIT TRIANGLECCDP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION DH(2,6)C S,T LOCAL COORDINATESC OH = LOCAL DERIVATIVES OF SHAPE FUNCTIONSC 011(1,1(1 = 011(K)/OS, DH(2,K)=0H(K)/DTC NODAL COORDS : 1—(O,O) 2—(1,O) 3—(O,l)C 4—(O.5,0) 5—(Q.5,C.5) 6—(O,O.51

011(1,1) = —3. + 4.*S + 4.11011(1,2) —1. + 4.*S011(1,3) = 0.0011(1,4) = 4. — 8.*S — 4.110(1(1,5) z 4.*T011(1,61 = —4,*T011(2,1) = —3. + 4.*S + 4.*TDH(2.2) = 0.00(1(2,3) = —1. + 4.*T011(2,43 = —4.*S011(2,51 = 4.1$011(2,6) = 4. — 8.*TRETURNEND

(b)

Page 123: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.14 Boundary curves through element nodes

= 1—r—s

r2 :1—2y-2sr

r4=s

r3:o

FIg. 6.15 Subroutine SHAPE

SUBFCJTINE SHAPE (QPT H N NSPACEICC EVALUATE Co ELEMENT INTERPOLATION FUNCTICNSCCOP IMPLICIT REAL*8 (A—H,o—Z)

DIMENSION H(N1, QPT(NSPACE)C N = NUMBER CF NODES PER ELEMENTC NSPACE = NO OF SPATIAL DIMENSIONSC = ELEMENT INTERPOLATION FUNCTICt'US AT UPTC = LOCAL COORD OF A POINTC BRANCH CN SPACE, THEN NO OF NODES

GO TC (100,200,300,1), NSPACEC-—> 1—0 ELEMENT Sioo Go ic. (1 102 103 11, N1.02 CALL

RETIRN103 CALL SIIP3L

RETIRNC——> 2—D ELEMENTS200 GO IC

1 1,1,1,212 1) N203 CALl SHP3T (QPT(i),6PT(2),H3

RETURN204 CALL SHP4Q (QPT(1),QPT(21,H)

RE I

UCALL SHP8Q (QPT(1),QPT(23,H)RETURN

212 CALL SHP4I2 LQPT(11,QPT(2),i-i)RETURN

C———> 3—D300 GO TO (1,1,1,1,1.I,l,308,1), N

308 CALL SHP8H (QPT(1),QPT(21,QPL(3),h)

C UNSIPPORTED OPTION1 WRITE (&,1000J1000 (' INVALID DATA IN SUDR SHAPE'J

RETURNEND

5

r1ro

Page 124: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.7 Interpolation enhancement for C° transition elements 115

6.7 Interpolation enhancement for C° transition elements

The procedures in the previous sections were designed for elementshaving the same order of interpolation on each edge or face. if one wishesto go from one order of interpolation to another then it is necessary tosupply transition elements between the two groups of elements or to definegeneralized constraint equations on the boundaries between the two dif-ferent groups. The former method is not difficult to implement and willbe illustrated here.

Several special transition elements have been developed by variousauthors using trial and error methods. Special elements can be generatedby enhancing low order elements, usually linear, or by degrading highorder elements. Here a typical enhancement procedure will be utilized.Assume that the element to be enriched satisfies the usual conditions

u(r, s)=

(6.15)

where

s) = 1, s1) =

Here the H, are the original unenhanced interpolation functions, the u, arenodal values, is the Kronecker delta, and n is the original number ofnodes. Let the enriching functions, say M1(r, s), be defined at m additionalpoints. These satisfy the similar conditions that

M.(r1,s1) = i > n, 1 Ej (m + n). (6.16)

Thus the enriched elements have values defined by(m+n)

u(r,s) = Hj(r,s)u1, (6.17)

where the enriched interpolation functions, H,, are given by

H,(r,s) ÷—H,(r,s) — i (6.18)

H,(r,s) *—M1(r,s), i >n.

where "f—" reads "is replaced by". These functions satisfy analogue rela-tions to the second and third of Eqn. (6.15).

Page 125: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

116 6. Element integration and interpolation

That can be seen by summing the enriched function so thatm+n 11 pn+n m+n

H, +— H — H,(r1, s')M1 + Mi=I i=1j=1—fl j=1+n

1— M1(r,s) (i —j=1+n 1=1

= 1—0= 1

as required. Similarly if i > n

H(rk, Sk) ÷—M,-(rk, Sk) =

from Eqns. (6.16) and (6.18) while if i n

m + n

H,(rk, Sk) H,(rk, Sk) — s1)MJ(rk, Sk)j1+n

= H(rk, Sk) — s1) ôjkj=1-n

if k>nif

thus, as required,

H(rk, 5k) = 6ik•

As the simplest example of enhancement, consider a line element to whicha centre node is to be added, Fig. 6.16. First, assume that the enrichingfunction is to be quadratic. Then from Eqn. (5.15) the interpolationfunctions are

Hi(r) = 1 —

H2(r) = r, (6.19)

M3(r) 4r — 4r2.

Then the enriched interpolation function for node 1 is

Hi(r) = H1(r) — Hj(r3)M3(r)

= [1 — r] — (1/2) [4r — 4r1 (6.20)

= 1 — 3r + 2r2.

This, of course, is the standard function for a full quadratic line element.

Page 126: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.7 Interpolation enhancement for C° transition elements 117

The value of M2 is obtained in a similar manner.Figure 6.16(b) shows a standard bilinear quadrilateral to which a fifth

node is to be added. Again only interpolation functions for nodes 1 and2 need be enriched. These functions are

H1(r,s)=l—r—s+rs (6.21)

H2(r, s) = r — rs.

If the enriching function is quadratic then it is

M5(r,s) =4r(1 —r)(1 —s),

so that

H1(r, s) = H1(r, s) — H1(r5, ss)M5(r, s)

= (1— r)(1 —s) — —r)(1 —s)] (6.22)

= (1 — 2r)(1 — r)(1 — s).

This corresponds to the linear—quadratic transition quadrilateral given byBathe and Wilson [14].

One may also wish to have a linear—linear transition element for gridrefinement. Then we may take

M5(r,s) 2r(1 —s), (6.23)

=2(1—r)(1—s),

and the corresponding modified interpolation functions are

H1 = (1— r)(1 —s) —

—s) — r)(1 —s)],r

which reduce to

H1 =(1 —2r)(1 —s), (6.24)

=0These correspond to the functions given by Whiteman [78] for a linear—linear transition quadrilateral. The same functions were later developedby Gupta [37]. The above elements, and corresponding triangles, are shownin Fig. 6.17.

The enrichment of higher elements proceeds in a similar manner. Alinear to cubic enrichment is summarized in Fig. 6.18. The results for aseries of quadrilateral elements are shown in Fig. 6.20. The figure presentsthe interpolation functions for an element which can be linear, quadratic

Page 127: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

118 6. Element integration and interpolation

or cubic on any of its four sides. It is generated by enhancing the bilinearprocedure. These operations can be programmed in different ways.Figure 6.19 illustrates only one way of generating such an element. Sub-routine SHP412 could easily be extended to include one or four interiornodes so as to generate Lagrangian elements. A similar procedure can beused to generate a 3 to 10 node enhanced triangle. Of course, it is alsoeasily extended to three-dimensional elements.

Since such elements allow for local node numbers to be zero it is necessaryto avoid zero or negative subscripts. This is easily done with a few IFstatements. For example, during assembly if a local node is zero there areno corresponding terms in the element matrices so the zero (or negative)subscript is skipped during assembly. (See subroutine STORCL Fig. 7.2.)

Fig. 6.16 Simple element enhancement

(1,1)

FIg. 6.17 Typical transaction elements

(0,0) 5

U

S

(a) Linear—quadraticquadrila tera Is

f fi I(b) Linear—linear quadrilaterals

(c) Linear—quadratic (d) Linear—linear trianglestriangles

p

p

3

3 2

(0) 1—D

4

'I

2 r

(b) 2-D

Page 128: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.18 Enrichment to a cubic element 0 1/3 2/3p

H1 = 1 — r, H2 rM3 = 9r(1 — r)(2 — 3r)/2M4 = 9r(1 — r)(3r — 1)/2n=2 m=2

H1 = H1 — H1(r1)M,, I 2.

H1(r) = [1 — r] — (2/3)j9r(1 — r)(2 — 3r)/2} — (113)[9r(1 — r)(3r — 1)/21Hj(r) = (1 — r)(2 — 3r)(1 — 3r)12

FIg. 6.19 A 4 to 12 node enhanced quadrilateral; subroutine SHP412

SUBRCUTLNE SIiP4I2 (R,S,H,LNQDE)C ** ********** **** ******** **C SHAPE FUNCI 1CN$ OF 4 TO 12 NODE QUADRILATERALCCOP IMPLICIT REAL*8 (A—H 0—LI

DIMENSiON LP(41, JP(4) NEXT(41DATA IP,JP,NEXT /1,O,—1,O, 0,1,0,—i, 2,L4,1/

C R,S = LOCAL COORDS OF PT 4——11———7———3C H = ELEM SHAPE FUNCTIONS I IC LNOCE = ELEM INCIDENCES LIST 8 S 10C SKETCH 10 RIGHT I .R I

C LOCAL CUCaRD OF NODES: 12 6C 1—( —1,—I) 3—(+J,+l I I I

C SIDES OF ORDER 1, 2, OR 3 1———5———9———2C——> FOUR NODE QUAD

CALL SHP4Q (R,S,H)C——> LOOP OVER SIDES

DO 10 I = 1,4H(1+41 = 0.0H(I+81 = 0.0

C IS SIDE LINEARIF ( LNODE(I+4)..EQ.0 I GO TO 10K = NEXT(II

C FiND PT RELATIVE TO SIDEP = R*IP(i) + S*JP(IIQ =—fi*jp(JJ + S*IP(I)1EMF = (1. — QJ*O.5

C——> IS SIDE CUBICIF ( LNOOE(I+81.EQ.O I GO TO 20H(I+&J = TEMP*(l. — — P*P 3.*P*P*P)*9./16.H(I+41 TEMP*(l. + 3.*P — — 3.*p*p*pj*9./16.

C CORPECT CORNER POINTS FOR CUBICH(I) = 1-1(11 — H(1+41*2./3. — HIi+8)/3.H(K) = H(KJ — H(I+8)*2./3. — 1-1(1+4)13.GO 12 10

C——> QUACRATIC SIDE20 H(1441 = TEMP*(1. — P*PJ

C CORRECT CORNER POINTS FOR QUAORAIICH(I) = H(IJ — H(I+4)*0.5H(KI H(KI — H(I+41*0.5

10 CCNTINUE

END

3 4

3M21— ÷ Al3

Page 129: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.20 Cubic to linear transaction quadrilateral

± ± 1/3

(1=6.8,10,12)+ s = ± 1

1 1

Linear 1/2 1/2Quadratic rr1 1/2 — 1/2Cubic (9r2 — 5)/8 (9s2 — 5)/8

SIIi 7

4

8

12

3

10

(5) 3

p

4

6

1 5 92

8

2

2

r)

x

Cubic side:

JI,(r,s) =(1 —s2)(1

I

H1(r, s) = (1 — r2)(1 + 9rra)(1

Quadratic side:

H1(r, s) = (1 + — s2)/2, = ± 1, s, 0

(i = 6,8)

H(r, s) = (1 + ss1)(1 — r2)/2, r1 = 0, s. = ± 1

(1=5,7)H1=O,j=i+4

Linear side

HJ=Hk=0,j=i+4,k=j+8,(j= 1,2,3,4)

Corners:

H1(r,s) = C,(1 + rr1)(1 r1 ± l,s, = ± 1, (i = 1,2,3,4)Corner corrections:

C, = Pr + P5, (i = 1,2,3,4)

Page 130: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 6.21 Distorted elements for singularities; (a) point singularity at P. and (b) linesingularity on F /

S—Standard

D — Distorted

Fig. 6.22 Global node locations x1 = for inerpolations of order pim

(a) Mapping for Jacobian Manipulation

Standard node f

2 0 1 0 1 1

1

2

3 0 1/2 1 0 1/2 1

o 1/4 1

4 0 1/3 2/3 1 0 1/3 2/3 1 1

o 1/9 4/9 1 2o 1/27 8/27 1 3

(b) Exact mapping to physical space (integer m)

(a)

(b)

XI

0

01 r

Number ofnodes n > m 1

Mapped node

mr?'I m

Page 131: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

122 6. Element integration and interpolation

FIg. 6.23 Subroutine S1NGLR

SUBROUTIPsE SINGtR

CCCOP IMPLICIT IA—H,O—l)

HIN), DH(NSPACE,N) CRIVATIVFS flF HC HZSHAPE ARRAY, OI4tCCALC CF Si-!PE FUNCTIONS, NSPACE=OIMENSICN OFC REQUIRES SLM CF H(1) 1, CONST JACI'BIAN

IF I P.EC.C 0 ) RETUPNw = 1.0 — ill)S =00 20 I = 1,NSPACE00 IC J

10 DH(I,J) = CH(f,JI/R I P*OHU,l)*H(J)/R/WOH(I,L) 11.0 — p)*T)H(I,1)/R

20 CONTINUEJ= 230 =

RETURNEND

6.8 Special elements

Current applications of the finite element method of analysis show atrend towards the enhancement of solution accuracy through the utilizationof elements with special interpolation functions. A survey of this type ofspecial element, developed with the aid of physical insight, is presented.This class includes point and line singularity elements, semi-infinite ele-ments, and elements with upwind weighting. The relative advantages anddisadvantages of these special elements are also discussed.

6.8.1 Singularity elements

There are numerous analysis problems that involve the presence ofsingular derivatives at known points in the solution domain. The mostcommon singularity application involves a fracture mechanics analysis ofthe stresses near a crack tip or crack edge. In two dimensions let p denotethe radial distance from the singular point. In a linear fracture mechanicsanalysis the displacements and stresses are 0(p"2) and O(p112), respectively.Originally these problems were approached by a direct solution thatemployed standard elements and an extensive grid refinement near thesingularity. Engineers expected that if they employed their physical insightand used special elements around the singularity, they would obtain moreaccurate results. Thus they attempted to modify standard interpolationfunctions to include the displacement behaviour near the crack tip.Many special two-dimensional elements have been proposed for this typeof application.

Page 132: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.8 Special elements 123

There are numerous other problems that involve point singularities. Forexample, in the solution of the Poisson equation in a domain with a re-entrant corner there is a singularity at the corner point. If b denotes theinterior obtuse corner angle, the solution near the corner has leading termO(pirib). Since jr< b 2ir one can encounter a wide range of singularitystrengths. For L-shaped regions b = so that the solution is O(pV3) and

its derivatives are singular with order O(p113). Only if the region containsa slit, b 2.ir, does one encounter the stronger singularity for which manyspecial elements have been proposed by the fracture mechanics' research-ers. The above variable singularity could be encountered in such contextsas heat conduction, potential flow, and transverse electromagnetic lines.

Before considering the common special elements we will review therelationship between global and local derivatives. Recall Eq. (5.8)

OgU

J yej

where

= ÔeHUC.

From the first equation we note that a global derivative singularity in thephysical coordinate can be introduced by way of the local derivatives ofthe interpolation functions or the inverse of the Jacobian.

An easy way of affecting the Jacobian in the second equation is to varythe global coordinates of the nodes, i.e. to distort the element. Henshelland Shaw [38] were among the first to note that the point at which theJacobian goes singular can be controlled through the use of distortedelements. Generally the order of the geometric interpolation functions isquadratic or higher [39]. One can control the location of the singular pointby moving nodes in the global coordinates. The singular point usually liesoutside the element and one must force it to occur on an element boundaryor node. To illustrate this concept consider a one-dimensional quadraticelement, 0 x h, of length h, see Fig. 6.16(a). The coordinate trans-formation of the standard unit element, 0 p 1, with an interior nodeat ah is

x(p) = h(4a — l)p + 2h(1 — 2a)p2 (6.25)

and the Jacobian is

I = = h(4a — 1) + 4h(1 — 2a)p. (6.26)

Thus if one wants a singularity to occur at p 0, i.e. node 1, one must set

Page 133: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

124 6. Element integration and interpolation

a = 1/4. That means that the global coordinates of node 3 must be specified

so that X3 = h14. Then one has x = hp2 so that p (x/h)"2 and the inverseJacobian becomes

i—i2

which has a singularity of order 0(x 1/2) at x = 0. The derivative singularitycan also be seen by noting that for quadratic interpolation on the unitinterval

u(r) = a1 + a'2p +

becomes, in physical space,

u(x) = a'1 = f32x112 +

Although the above one-dimensional example is simple, the algebrainvolved in this type of procedure can be rather involved in higher-dimen-sional elements. Jn two and three dimensions, respectively, the point orline of singularity is surrounded with the special distorted elements asshown in Fig. 6.21. The locations of nodes on the element sides are usuallythe same as for the one-dimensional case. Any interior nodes usually lieon lines connecting the shifted side nodes. The above procedure is easilygeneralized (80. 39] and typical nodal locations for function interpolationsof order are shown in Fig. 6.22.

The second alternative, in Eqn. (5.8), of introducing the singularitythrough the local derivative requires special element interpolation func-tions. A number of special elements of this type have been developed forthe form u = 0(p"2) by Blackburn [20]. However, most such elementscannot be generalized to other singularities. The first conforming elementhaving a general form of u = 0(pl_a) for 0 <a < I was given by Akin [2].This procedure is valid for, and compatible with, an element that satisfiesthe condition (5.4) that XN1 = I. This easily programmed procedure isoutlined here. If the singularity occurs at node K in an element one definesa function

W(p,q) = 1 —Hk(r,s)

which is zero at node k and equal to unity at all other nodes. To obtainthe power singularity form one can divide by a function R = W3. If Ndenote the standard functions, then the modified singular functions,are defined as

H1 = [1 — 1/RJökt + NIR.

Page 134: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.8 Special elements 125

These also satisfy Eqn. (5.4) and near node K give a solution of the formcb(pI_a) so that the first derivative is O(p_a). Thus since a > 0 thefirst derivative is singular. This procedure has been extended to line sin-gularities by Akin [7]. The programming of these operations for pointsingularities is given in subroutine SINGLR in Fig. 6.23.

The examples of Section 6.7 illustrated how elements can be enrichedto give higher order functions on edges and grid refinement on edges. Themethod can also be utilized to incorporate known singularities. For exam-ple, consider the line element again as in Eqn. (6.19) and let the centrenode have a more general enrichment of the form:

M3(r) =

K = 1/[1/2)U — (i/2)bj. This can yield the standard quadratic function,a = 1 and b = 2, or a singularity function. For example, if one desires tohave terms or order 0(r"2) enriched into the previous linear element onecould set a 1 and b = 1/2. Then

M3 = 2K(r — K 11(1 —

and the modified functions are

Hi(r) = 1 — (1 + K)r + Kr"2

H2(r) = (1 + K)r — Kr"2.

If standard interpolation is utilized for the geometry then this elementgives derivative singularities at node 1 of order 0(p"2) where p is thedistance from the node. The above special case was used by Stern [67] todefine a five node singularity triangle for functions of He alsointroduced an additional M nodes, on the non-singular side, to model thetransverse behaviour as an (M + 1) polynomial.

6.8.2 Semi-infinite elements

A number of practical applications involve infinite or semi-infinitedomains. They include soil mechanics, external flows, and electromagneticfields. The most common method of solution has been to extend thestandard elements out as far as one can afford and thereto approximate theboundary conditions at infinity. Recently, special spatial coordinate inter-polation functions have been suggested to map standard elements into asemi-infinite domain. Thus in a typical problem one would surround theregion of interest with standard elements. The outer layer of the elementswould then be mapped to infinity and the corresponding boundary con-ditions applied at the points at infinity.

Page 135: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

126 6. Element integration and interpolation

In a standard element one defines the global coordinates in terms of thelocal coordinates by the standard mapping; for example, for a one-dimen-sional quadratic element x(r) = H1(r)x1 + H2(r)x2 + H3(r)x3. Thusxi x(r) x3 and the element is a finite domain. To generate a semi-infinite domain one could replace the standard interpolation functions,H1(r), with a special set, say that lead to the proper physical behaviouras x — (i.e. 1). Recently, two approaches to this problem have beensuggested. Gartling and Becker [36] proposed the use of rational functionsfor the N while Bettess 1181 suggested a combined exponential and Lagran-gian interpolation for the N1. Both approaches lead to functions involvinga characteristic length, say L, that is related to the input coordinates. Theresults obtained from their analyses can vary significantly with L.

As an example, consider the mapping which takes the local coordinates,r = 0, r = 1/2, and r = 1, into the semi-infinite domain x1, x2, The lowerlimit, x1, is necessary to maintain compatibility with the standard elementmesh. One possible mapping is x(r) = x1 + Lr/(1 — r) where L = (x2 — x1).

That is, where Ni(r) = I — r/(1 — r), N2(r) = r/(1 — r) and N3 = 0.

Using the standard local interpolation of the dependent variable,u(r) = Hi(r)u1 + H2(r)u2 + H3(r)u3, together with the spatial mapping, thegradient in the semi-infinite element is 9u/*9x = (ar/ax) (au/ar) = ((I — r)(1 — r)/L)au/ap. Thus as 1, X—3 u—p u3, and 0. The valueof L affects the 2nd and 4th of the limits. To find the optimum L onewould have to use physical insight. If one arbitrarily selects L but knowsa physical condition such as au/ax —* 11x2 as x cc then the above formimplies a multi-point constraint between u1 and 142. The generation ofsemi-infinite elements and procedures for finding optimum parameters,such as L, still merits attention.

An alternative procedure for treating semi-infinite domains was suggestedby Silvester et a!. [66]. It does not introduce arbitrary constants as mostmappings do and is computationally efficient. Consider a finite region Rcontaining a standard finite element mesh. The region has been selectedsuch that there exists at least one point, P, which can see all points on theboundary, IT. Assume that this region needs to be extended to infinity tosatisfy a boundary condition. Define a mapping of I' onto a series oftemporary interface boundaries, Yk, such that for each pair of points onYk and yk+1:

rk+I = Krk

where r is the position vector from P, K> I is a constant and Yo F. Thusat the exterior boundary, say

= K"r0.

Page 136: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

6.8 Special elements 127

Between two interfaces, say Yk and Yk+1, an angular segment defines anelement The volumes of the extended elements ek+1 and ek will havea ratio of KNSPACE and the elements are geometrically similar.

Assume the exterior domain (E ek) satisfies a homogeneous dif-

ferential equation and that the material properties are constant. Then ifthe square matrix involves an inner product of the first global derivativesthe element matrices in ek and ek+1 are given by

=

where A = K_NSPACE. This observation allows a recursion relation to be

developed so that only contributions to nodes on T and need be retained.Since the function of interest on Yn, say is usually zero it may only benecessary to consider the net contributions to nodes of r. Full details (andminor errors) are given in [661.

6.8.3 Upwind E'ements

The use of physical insight to generate an upwind difference procedurefor the finite difference analysis of flows is known to be very useful. Thusit is logical to develop a similar procedure for finite elements. Zienkiewiczet a!. have proposed such a special element [86], and evaluated a typicalapplication [22]. For one-dimensional applications the special elementsseem quite promising. However, the programming difficulties associatedwith the extension to higher-dimensional problems may limit the usefulnessof the procedure. The upwind procedure recommended by Hughes [45Jseems more practical from the computational point of view.

6.9 Exercises

1. Utilize Eqn. (6.9) to verify Eqn. (6.10).2. Write a subroutine, say SYMTRI, to tabulate the symmetric triangle

quadrature rules in Fig. 6.6.3. Locate and tabulate the symmetric four point rule for triangles that

has a negative weight at the centroid. (Some data have typographicalerrors.)

4. Using Fig. 6.14 as a guide, complete the derivation of the remainingfour interpolation functions for the quadratic triangle.

5. Make random checks of the shape functions and local derivativespresented in Section 6.5 using SCHECK and DCHECK fromSection 5.2.

6. Write a subroutine for C° Lagrangian interpolation on a line element.

Page 137: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

128 6. Element integration and interpolation

7. Write a subroutine to generate Lagrangian quadrilaterals from thetensor product of the one-dimensional Lagrangian interpolations ineach local direction.

8. Make the changes in SHAPE to include a two node line element anda twenty node hexahedron.

9. Referring to SHAPE, in Fig. 6.15, write a similar routine, DERIV, todetermine the local derivatives.

10. Repeat the triangular integration example of Section 6.4 using analternate three point rule having the same weights. The coordinatesof the quadrature points are (1/6, 1/6), (2/3, 1/6) and (1/6, 2/3). Whichof these two rules do you think would be best for axisymmetric problemsand why?

11. Develop a table, similar to Fig. 6.19, for a three to six node triangle.12. Write a subroutine, DER412, to find the local derivatives of the func-

tions in Fig. 6.20.13. Develop the interpolation functions for an eight to twenty node

hexahedron.14. Evaluate the element in Eqn. (6.25) when a = 1 and b = 2.15. Verify that the elements in Fig. 6.22(b) retain the linear interpolation

ability.16. The bilinear quadrilateral elements of Section 5.2 can be degenerated

to a triangle. Requiring that x3 = x4, etc. suggests a modified set ofinterpolation functions where H3 = H3 + H4 (and N4 =0). Sketch theelement in the global space and show the local axes. Determine theJacobian on line 3—4 in the local space. Is this element identical to thethree node simplex element?

17. Write a routine that will take the outputs of SHP4Q and DER4Q andmodify them to generate the corresponding data for the degeneratetriangle.

Page 138: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7

Assembly of elementequations into systemequations

7.1 introduction

An important but often misunderstood topic is the procedure for assem-blying the system equations from the element equations. Here assemblyingis defined as the operation of adding the coefficients of the element equa-tions into the proper locations in the system equations. There are variousmethods for accomplishing this but, as will be illustrated later, most arenumerically inefficient. The numerically efficient direct assembly techniquewill be described here in some detail. First, it is desirable to review thesimple but important relationship between a set of local (nodal point, orelement) degree of freedom numbers and the corresponding system degreeof freedom numbers. These simple calculations were described earlier inthe discussions of INDXPT INDXEL (Figs. 3.10 and 3.11,respectively).

Once the system degree of freedom numbers for the element have beenstored in a vector, say INDEX, then the subscripts of a coefficient in theelement equation can be directly converted to the subscripts of the cor-responding system coefficient to which it is to be added. This correspond-ence between local and system subscripts is illustrated in Fig. 7.1. Theexpressions are generally of the form

C,=Cj+C?

SI.) = +

where i and j are the local subscripts of a coefficient in the element squarematrix and I, J are the corresponding subscripts of the system equationcoefficient to which the element contribution is to be added. The direct

129

Page 139: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

130 7. Assembly of element equations into system equations

conversions are I = INDEX(i), J = INDEX(j), where the INDEX arrayfor element, e, is generated from Eqn. (1.1) by subroutine INDXEL.

FIg. 7.1 Correspondence of a typical element,S° D° = ce

Columns

System Index (1) Index (1) Index (I) Index (N'NG)

Local 1 1 ... jSii

4

7.2 Assembly programs

Local System

I Index (1)

I Index (I)

I

N*NG

Index (1)

Index

Utilizing the vector containing the system degree of freedom numbers forthe element, the coefficients of the element column matrix are easily addedto the coefficients of the system column matrix. This simple operation isperformed by subroutine STORCL, which is illustrated in Fig. 7.2.

The addition of the NELFRE*NELFRE square element matrix to the"square" matrix of the system is accomplished by using the system degreeof freedom number array, INDEX, to convert both the element subscriptsto system subscripts. This is known as the direct method of assemblying thesystem equations. A simple FORTRAN routine, STRFUL, to accomplishthis direct assembly is illustrated in Fig. 7.3. Although this type of routinecan be used on small problems, most practical problems have a largenumber of unknowns and are not economical if the full system equationsare retained and solved. Figure 7.4 gives a graphical example of fullassembly. The more practical procedure for storing the element equationsin the upper half-bandwidths of the system equations is illustrated insubroutine STORSQ, Fig. 7.5.

The procedure utilized in STORSQ is slightly more involved since, dueto the banded symmetric nature of the equations, the complete squaresystem matrix is not stored in the computer. As mentioned before, theupper half-bandwidth (including the diagonal) of the system equations isstored as a rectangular array. If the element coefficient corresponds to asystem coefficient that is below the main diagonal then it is ignored, but

57.NNG

CT

q

Page 140: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7.2 Assembly programs 131

if it corresponds to a coefficient in the upper half-bandwidth then it isstored in the rectangular array.

As illustrated in Fig. 1.6, the main diagonal of the square array becomesthe first column of the rectangular array. In general, a row in the squarearray becomes a row in the rectangular array. A column in the upperhalf-bandwidth of the square array becomes a diagonal in the rectangulararray. Thus, if a coefficient belongs in the P" row and jth column of thesquare array (J I) then that coefficient is stored in the row and theJt column of the rectangular array where

Jj—J—I+1 (7.1)

The program defines NELFRE*NELFRE storage locations for the ele-ment matrix, NDFREE*MAXBAN locations for the coefficient of thesystem upper half-bandwidth, and NELFRE storage locations for thesystem degree of freedom numbers associated with the element.

Again referring to Fig. 1.6, one should note for the future referencethat, due to symmetry, the coefficients of the lower half-bandwidth portionof the jth column are also contained in the upper half-bandwidth portionof the ph row.

As shown in Fig. 2.4, the generation and assembly of the elementmatrices often takes place in a single element ioop. A typical subroutine,ASYMBL, for controlling these operations is shown in Fig. 7.6. It employsGENELM, given in Fig. 4.9, to generate the element data. SubroutineSTORCL is used to assembly the force vector, C, and STORSQ is usedto assembly S in a banded storage mode.

Of course, an alternative storage mode like the skyline procedure couldhave been used to assembly S as shown in Fig. 3.17. Both options requirethe use of a few extra calculations. If the skyline method is used thenSTORSQ would be replaced by a procedure such as SKYSTR in Fig. 7.7.The goal in both cases is the same. It is to take a coefficient that is to beadded to the term Sj,j in the full matrix and to determine where it mustactually be placed when the sparse matrix storage method is considered.In the skyline mode, Fig. 7.8, the vector position, IDIAG(J), of thediagonal term, S11, is found and then steps are taken backwards (up thecolumn) to locate where S11 is stored. In the bandwidth mode, Fig. 7.9,the diagonal term is found in the first column of row I of the rectangularstorage array. Then Eqn. (7.1) is employed to count over the correctnumber of columns to the location of S,j. In both cases symmetry isassumed. In a non-symmetric problem both the upper and lower bandsegments are needed. Then the same pointers could be used with twoarrays (upper and lower parts of S). Then only the diagonal is duplicatedin storage and the same routines are still valid.

Page 141: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.2 Subroutine STORCL

SUBROUTINE STOR.CL (NDFREE,NELFRE,INCEX,C,CCJCC STORE ELEMENT COLUMN MATRIX IN SYSTEM COLUMN MATRIXCCOP IMPLICiT REAL*8tA—H,O—Z)

DIMENSION C(NELFREI, CC(NDFREE). INCEX(NELFRE)C INDEX = SYSTEM DOF NOS OF THE ELEMENT DOFC C = ELEMENT COLUMN MATRIXC CC = SYSTEM COLUMN MATRIXC NOFREE = NO DEGREES OF FREEDOM IN THE SYSTEMC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENT

Dfl 10 1 = I NELFRE= INDEX(IiIF ( J.LT.I I GO TO 10CC(JJ = CC(JI + C(Ii

10 CCNTINUERET LRNEND

Fig. 7.4 Graphical assembly for a line element with two parameters per node

(I) (2) (3)

3

2

3

4

5

6

7

8

4

Local 1234

1U52 63 74 8

5678

Global

2

Local 12 34I I

2 2

3 54 6

1 2 5 6 Global

2

34

Global

12345678 Global

Istf}4x4

4x4

4x4

8x8

Global

Locol

7

8

34

7834

(e)

421 Local

M

NG 2

NE = 3N =2nIB

Page 142: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 7.3 Subroutine STRFUL

SUBRCUTLNE STRFUL (NDFREE,NELFRE,S.SS, INDEXJCC STORE ELEMENT MATRIX IN FLILL SYSTEM SQ MATRIXC ** ********** **** **** ******COP IMPLICIT REAA.*8 (A—H,O—Zi

DIMENSION S(NELFRE,NELFREI, SS(NCFREE,NCFREE),1 INDEX(NELFREi

C NELFRE = NO DEGREES OF FREEDUM PER ELEMENTC NOFREE = TOTAL NO OF SYSTEM DEGREES CF FREEDCMC SS = FULL SYSTEM SQUARE MATRIXC S = FULL ELEMENT SQUARE MATRIXC INDEX SYSTEM DOF NOS OF ELEMENT PARAMETERS

CD 20 1 = 1 NELFREII = INDEX( iiIF I II.LT.1 I GO TO 2000 10 J = 1,NELFREJJ = INOEX(J)IF I .i.J.LT.1 I GO TO 10SSI lI,JJ) = SS(II,JJ) + S(I,JI

10 CCNT1NUE20 CCNTINUE

RET L RNEND

Fig. 7.5 Subroutine STORSO

SUBROUTINE STORSQ (NOFREE,IBW,NELFRE,INDEX,S,SS)CC ADD ELEMENT SQUARE MATRIX TO UPPER HALFC OF THE SYMMETRIC SYSTEM SQUARECCOP P4PLICIT REAL*8(A—H,O--Z)

DIMENSION S(NELFRE,NELFRE), SS(NCFREE,IBW),1 INDEX(NELFRE)

C INDEX = SYSTEM DOF NOS OF THE ELEMENT DOFC S = SQUARE ELEMENT MATRIXC 55 SQUARE SYSTEM MATRIXC NDFREE = DEGREES OF FREEDOM IN THE SYSTEMC IBW = HALF BAND WIDTH INCLUDING THE CIAGCNALC NELFRE = NUMBER OF PARAMETERS (DCFI PER ELEMENTC I ANC J ARE THE ROW AND COLUMN POSITIONS IN THEC LNPACKED SYSTEM MATRIXC JJ = COLUMN POSiTION IN PACKED SYSTEM MATRIX

DO 20 1 = 1 NELFREI = INDEX(LJIF ( I.LT.1 I GO TO 20DO 10 K = I NEIFREJ = INOEX(dIF ( 1.11.1 .OR. I.GT.J ) Go TO 10

= J — I +SS(I,JjI = SS(i,JJ) + S(L,K)10 CONTINUE20 CONTINUE

RETEND

Page 143: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.6 Subroutine ASVMBL

SUBROUTINE ASY?4BL (M N,NE,NG,NSPACEtNELFRE1MAXBAN,I NDFREE,NIfER,LPTtEST,LhOMCil.iNPFLU1IPI,2 1P3,1P4,1P5,JP2 KP1 KP2,NTAPEI,NODES.3 LNODE INDEX LPFIX LtRCP,X,FLTNP,FLTEL,45 PRTLPT,KP3, N(JLCOL ,NTAPE2,NTAPE3,NTAPE4,6 NHCMOI

CC ASSEMBLE SYSTEM EQUATIONS AND STCRE POSTC ELEMENT DATACC GENERATE ELEMENT EQUATIONS L POST SIJLUTICN MATRICESCDP IMPLICIT REAL*8 (A—I-i,O—Z)

DIMENSION S(NELFRE NELFRE) C(NELFREJ, CC(NCFREE),I LNCDE(N),2 INDEX(NELFRE)

C JUST PASSiNG THROUGHXU) COORD(1) FLTNP(11 FLTEL(1)

I ELPRâPU), PRTLPT(l),2 FLTMISII), LPFIXUI, LPROP(11

C NC = NO. OF PARAMETERS PER NODEC N = NUMBER OF NODES PER ELEMENTC NE NUMBER OF ELEMENTS IN SYSTEMC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NOFREE = TOTAL NUMBER OF SYSTEM DEGREES CF FREEDOMC NODES = NODAL INCIDENCES OF ALL ELEMENTSC LNODE = THE N NODAL INCIDENCES OF THE ELEMENTC INDEX = SYSTEM DOF NUMBERS ASSOCIATED WITH ELEMENTC LPFIX = SYSTEM ARRAY OF FIXED PT PRCPC SS = SYS EQ SQ MATRIX, CC = SYS EQ CCL MATRIXC $ = ELEMENT SQ MATRIX, C= ELEMENT COLUM MATRIXC MAXBAN = MAX HALF BANDWIDTH OF SQ MATRIXC IF NULCOL.NE.O ELEMENT COLUMN MATRIX 15 ALWAYS ZEROC

00 10 IE = 1,NEC—-> EXTRACT ELEMENT NODE NUMBERS

CALL LNOOES (IE,NE,N,NOOES,LNUDEJC——> CALCULATE DEGREE CF FREEDOM NUMBERS

CALL INDXEL (N NELFRE NC LNODE INDEX)C——> GENERATE ELEMENt MATRICES

CALL GENEIM (IE,M,N,NSPACE,NELFRE,1 NDFREE,NITER,LPTEST,LHOMOzNNPFLLJ,JP1,2 1P3,IP4,1P5,JP2,KPI,KP2,NiAPE1.,3 L.NODE INDEX LPFIX LPROP,X,FLTNP,FLTEL,4 S C D CCCLD,NHOMtJ,5 PRTLPI KP3 fflAPE3 NTAPE4)

C—> STORE THE

I CALL STORCL (NDFREE,NELFRE,INDEX,1 C,(.CJ

10 CONTINUEC ASSEMBLY COMPLETED

RET L RN

Fig. 7.7 Store element square matrix in skyline

SUBROUTINE SKYSTR (NOCOEF NOFREE,NELFRE,INDEX,1

C ** ****************** ******C STORE ELEMENT SQUARE MATRIX TO SYSTEM SQUAREC MATRIX STIRED IN SYMMETRIC SKYLINE V4C0ECCDP IMPLICIT REAL*8 (A—H 0—fl

DIMENSICN SS(NCCOEFJ, S(NELFRE NELfRE),1 INDEXINELFRE), 1D1AGZNCFREEI

C NOCCEF = NO COEFF IN SYS SQ MATRIX = ICIAG(NOFREE)C NDFREE = TOTAL NO OF DOF IN SYSTEMC MELFRE = NUMBER OF ELEMENT DEGREES OF FREECCMC IMDEX(IJ SYS DOF NO OF ELEMENT CGF IC 10146(1) LOCATION OF DIAGONAL OF I—TN EQC S = ELEMENT MATRIXC SS = SYS SQUARE MATRIX IN SKYLINE VECTOR MCOEC

Page 144: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.7—continued

C LCOP OVER ELEMENT COEFFICIENTSDO 20 J = 1 NELFRENDXJ = INDEXLJJIF I NDXJ.LT.1 I GO TO 20

= 101 AG(NCXJI — NDXJ00 10 1 = 1 NELFRENDXI = INDEXLI)IF I NOXI.GI.NDXJ .OR. NDXI.LT.1 GC Ic 10

C FIND SYSTEM COEFF IN VECTOR SNDXV = JTEMP + NOXI

C NDXV = IOIAG(AMAXO(NDXI,NDXJJI — IABS(NDXJ—NDXIJSS(NOXVJ = SS(NDXV) + S(1,JI

10 CCNTINUE20 CONTINUE

RETURNEND

Fig. 7.8 (a) Subroutine SKYSUB, and (b) location of coefficients in a symmetric skylinearray

SUBROUTiNE SKYSUB INDFREE IDIAG,I,J,IJVJCC CONVERT (1 J) FULL SYMMETRIC MATRIX SUBSCRIPTSC TO 1.iV OF VECTOR SKYLINE STORAGE MCDECC ASSUMING SYMM EQS, COLS STORED FRCM TOP DOWN

IDIAG(NDFREE)C NDFREE = TOTAL NO OF SYSTEM LQUATIONSC IOIAG(I) = LOCATION OF DIAG OF I—TI-

ID = MAXO (1 JIIJV = IOIAG(IDI — IABS(I—J)RET I. RNEND

(a)

1 2 — 6 — — —347

5 8 — 12 —— 1=39 10 16

11 14 17

5 18

sym. IDIAG(6 19

[S,1] {SK} K = IDIAG(MAXO(I, 3)) — 1 — JI1=4,J= 6—3K= IDIAG(6)— 4— 61

K = 15 — 2 = 13

(b)

Page 145: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.9 (top) Subroutine BANSUB, and (bottom) location of typical coefficients in asymmetric band array

SUBRCUTINE BANSUB (I,J,K,L1CC CONVERT SUBSCRiPTS (i,JJ OF MATRIXC TO SUBSCRIPTS (K,L) IN UPPER HALF BANDwIDTHC

ITESI = I —IF ( ITEST 1 10,20,30

10 K= IL = I — ITESTRET L RN

20 K= IL=1RETLRN

30 K JL = 1 + ITESTRET U RNEND

II .1?

Page 146: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Z3 Example 137

7.3 Example

Consider a two-dimensional problem (NSPACE = 2) involving 4000nodal points (M = 4000) and 3500 elements (NE = 3500). Assume twoparameters per node (NG = 2) and let these parameters represent thehorizontal and vertical components of some vector. In a stress analysisproblem, the vector could represent the displacement vector of the node,whereas in a fluid flow problem it could represent the velocity vector atthe nodal point.

Assume the elements to be triangular with three corner nodes (N 3).The local numbers of these nodes will be defined in some consistentmanner; e.g., by numbering counter-clockwise from one corner. This meshis illustrated in Fig. 7.10. For simplicity assume that two floating pointmaterial properties are associated with each element, and that the elementsare homogeneous throughout the domain. (As discussed in Section 2.2,this implies that NLPFLO = 2, LHOMO = 1, NNPFIX = NNPFLO =NLPFIX = MISCFX = MISCFL = NHOMO 0.) In addition, assumethat the nodal parameter boundary conditions specify the followingconditions:

(1) both parameters are zero at nodal point 1;(2) at nodal point 500 the first parameter equals zero; and(3) at nodal point 4000 the two parameters are related by the equation

— P2 denote the first and second par-ameters, respectively (at that node).

Define the two material properties of the elements to have the values of30 x 106 and 0.25, respectively. Assume that in the y-direction at node 270there is a known initial contribution to the load vector (system columnmatrix). Let this coefficient be associated with the second nodal parameterat the node and have a value of —1000. Finally, assume that there arespecified flux components in the y-direction along the two element segments(NSEG 2 and LBN = 2) between nodes 2 and 3, and 3 and 4. Let themagnitudes of the fluxes be —100, —150, and —25 at nodes 2, 3 and 4,respectively.

The input data to, and the arrays stored by the building block codes forthis example, are shown in Tables 7.1 to 7.6. In these tables the inputdata are enclosed in dashed lines and the resulting arrays stored by theprogram are enclosed in solid lines.

By utilizing the above control parameters, it is easy to determine thetotal number of degrees of freedom in the system, ND FREE, and associated

Page 147: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

138 7. Assembly of element equations into system equations

with a typical element, LEMFRE:

NDFREE ==M*NG =4000*2 =8000

LEMFRE =N*NG =3*2 =6.

In addition to the total number of degrees of freedom in the system, it isimportant to be able to identify the system degree of freedom number thatis associated with any parameter in the system. Equation (1.1), or sub-routine DEGPAR, provides this information. This relation has manypractical uses. For example, when one specifies that the first parameter(J = 1) at node 500 (1 = 500) has some given value what one is indirectlysaying is that system degree of freedom number NDF = 2 * (500 —

1) + 1 = 999 has a given value.In a similar manner we often need to identify the system degree of

freedom numbers that correspond to the ELMFRE local degrees of freedomof the element. In order to utilize Eqn. (1.1) to do this, one must be ableto identify the N node numbers associated with the element of interest.This is relatively easy to accomplish since these data are part of the inputdata (element incidences). For example, for element number 421 we findthe 3 element incidences (by extracting row 421 from array NODES) tobe

Nodelocal

1

SystemLocal

[261 270 3101 2 3

Therefore, by applying Eqn. (1.1), wefreedom numbers (for element 421):

Parameternumber

J

1

2

1

21

2

2

3

E—Array LNODE(1 *N)

find the following degree of

Degree of freedomSystem localNDFS NDFL

Numbersystem

I

261

270

310

LNODE

522j539540

J619

INDEX

1

2

3

4

5

6

The element array INDEX has many programming uses. Its most important

Page 148: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7.3 Example 139

application is to aid in the assembly of the element equations to form thegoverning system equations.

Recall from Fig. 7.1 that the element equations are expressed in termsof local degree of freedom numbers. In order to add these element coef-ficients into the system equations one must identify the relation betweenthe local degree of freedom numbers and the corresponding system degreeof freedom numbers. Array INDEX provides this information for a specificelement.

In practice, the assembly procedure is as follows. First the system matricesare set equal to zero. Then a loop over all the elements is performed. Foreach element, the element matrices are generated in terms of the localdegrees of freedom. The coefficients of the clement matrices are added tothe corresponding coefficients in the system matrices. Before the additionis carried out, the element array INDEX is used to convert the localsubscripts of the coefficient to the system subscripts of the term in thesystem equations to which the coefficient is to be added. That is,

se + Ci,j'* (7.2)

where = INDEX (EL) and = INDEX (IL) are the corresponding rowand column numbers in the system equations, Ii are the subscripts ofthe coefficients in terms of the local degrees of freedom, and readsadded to". Considering the coefficients in the element matrices for element421 in the previous example, one finds

5521,521 C521

S522,539 C522

S549,540 C539

-i S540,619 C540

S619,620

S521620 C620.

Let Lmjn and Lmax denote, respectively, the maximum and minimumsystem degree of freedom numbers associated with a particular element.Then one can make the general observation that the coefficients of thesquare element matrix will be included in a square subregion of the systemmatrix. As illustrated in Fig. 3.4, the limits of this square region are definedby Lmjn and Lmax. From this figure, one can also note that the half-bandwidth

Page 149: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

140 7. Assembly of element equations into system equations

associated with a typical element (including the diagonal) is given by

HBW Lmax — Lmin + 1 (7.3)

For example, for element 421, the HBW421 = 620 — 521 + I = 100.

The equation for the half-bandwidth (including the diagonal) may beexpressed in a much more useful form. Note that from Eqn. (1.1)

Lmax = NG *('max 1) + Jmax (7.4)

Lmtn NO * (Imin — 1) + Jmin

where Jmin = I and Jmax = NO and where 'max and 'mm denote the largestand smallest system node numbers associated with the element, respec-tively. Substituting these two relations into the above expression for thehalf-bandwidth yields:

HBW = [NG *('max 1) + NO] — [NO *

— 1) + 1] + :1

or simply (7.5)

HBW NG * ('max — 'mm + 1)

which was stated earlier in Eqn. (1.1). As a check, we can return to element421 of the example to determine that HBW421 = 2*(310 — 261 + 1) = 100

which agrees with the previous calculations.After the equations have been completely assembled, it is necessary to

apply the boundary conditions. The types of allowed constraints and thedata array IBC were introduced in Chapter 2. Searching array IBC, onedetermines that there are three Type I boundary indicators and two Type2 indicators, thus there are three Type 1 constraint equations and one(2/2) Type 2 constraint equation. Again Eqn. (1.1) is applied to determinethe system degree of freedom that must be modified to include theseconstraint equations. The programming concepts associated with applyingthe boundary conditions will be discussed in Section 8.2.

Page 150: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4000

500

//

3979

Fig. 7.10 An example mesh

/I

I

310

\

I

/

Idy—boo

/

/I

II

//

//

//

/

y

x

1 2

Page 151: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Table 7.1 Nodal Point Data for Input

N dBoundary Spatial

o e condition code coordinates

1 0.00 0.00

200 0.25 0.00

3 00 0.50 0.)

261 00 2.25 1.50

270 00 2.75 1.50—Array IBC —Array X

310 00 2,60 1.90

500 10 0.00 3.40

[ 4000 22 9.80 5.60

Table 7.2 Element Connectivity Data for Input

Element Element incidences

11 1 2 21

J2 2 3 22 I

3 3 4 23—Array NODES

421 261 270 310

3500 3979 3980 4000

Table 7.4 Problem Properties Data forINPROP

Element propertiesElement no. Properties

I

Array

Page 152: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

cS' I°.j0I

I

I''cw'

C

I

I

Io

oo 1

o

1C

0

I

C

C

0

E C

Cu

00 I

I I

I

cu

II

I I I

I

I I

cu I I

I

I II

I

I

Cu

I

CIcu

0 0z

Page 153: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

144 7. Assembly of element equations into system equations

Table 7.5 Initialization Data for INVECT

Node no. Parameter no. Value

J= 2(270 — 1) + 2 = 540

FCC(540) = plus 7999 zero terms

Table 7.6 Flux Data for INFLUX

Segment 1

Nodes ItFlux components —100 0.0 —150]I

Segment 2

Nodes 4Flux components 10.0 —100 0.0 —2511

7.4 Symbolic element assembly for quadratic forms

Many finite element problems can be expressed symbolically in termsof a scalar quantity, I, such as

I(s) = + (7.6)

where is a vector containing the unknown nodal parameters associatedwith the problem, and K and P are matrices defined in terms of the elementproperties and geometry. The above quantity is known as a quadratic form.If one uses a variational formulation or a least squares weighted residualformulation then the solution of the finite element problem is usuallyrequired to satisfy the following system equations:

ai(7.7)

In the finite element analysis one assumes that the (scalar) value of I isgiven by the sum of the element contributions. That is, one assumes

= (7.8)

Page 154: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7.4 Symbolic element assembly for quadratic forms 145

where j, is the contribution of element number 'i', and NE represents thetotal number of elements in the system. Usually one can (but does not inpractice) define in terms of such that

+ (79)

Therefore, Eqn. (7.8) can be expressed as

K1) + (7.10)

and comparing this with Eqn. (7.6) one can identify the relationsNE

(7.11)

P =

If NDFREE represents the total number of unknowns in the system, thenthe size of these matrices are NDFREE*NDFREE and NDFREE*1,respectively.

As a result of Eqn. (7.11) one often sees the statement, "the systemmatrices are simply the sum of the corresponding element matrices." Thisis true, and indeed the symbolic operations depicted in Eqn. (7.11) aresimple but one should ask (while preparing for the ensuing handwaving),"in practice, how are the element matrices obtained and how does onecarry out the summations?"

Before attempting to answer this question, it will be useful to backtracka little. First, recall that it has been assumed that an element's behaviour,and thus its contribution to the problem, depends only on those nodalparameters that are associated with the element. In practice, the numberof parameters associated with a single element lies between a minimum oftwo and a maximum of sixty (or ninety-six); with the most common rangebeing from three to eight. By way of comparison, NDFREE can easilyreach a value of several thousand. Consider an example of a system whereNDFREE = 5000. Let this system consist of one-dimensional elementswith two parameters per element. A typical matrix P1 will contain 5000terms and all but two of these terms will be identically zero since onlythose two terms of 5000 * 1, associated with element 'i' are of anysignificance to element 'i'. In a similar manner one concludes that, for thepresent example, only four of the 25,000 terms of K1 would not be identicallyzero. Therefore, it becomes obvious that the symbolic procedure introducedhere is not numerically efficient and would not be used in practice.

Page 155: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

146 7. Assembly of element equations into system equations

There are some educational uses of the symbolic procedure that justifypursuing it a little further. Recalling that it is assumed that the elementbehaviour depends only on those parameters, say &j, that are associatedwith element 'i', it is logical to assume that

= + (7.12)

If NELFRE represents the number of degrees of freedom associated withthe element then and p1 are NELFRE*1 in size and the size of k1 isNELFRE*NELFRE. Note that in practice NELFRE is much less thanNDFREE.

The matrices k1 and are commonly known as the element matrices.For the one-dimensional element discussed in the previous example k1 and

would be 2*2 and 2*1 in size, respectively, and would represent the onlycoefficients in and P1 that are not identically zero.

All that remains is to relate k to K1 and p, to P1. Obviously Eqns. (7.9)and (7.12) are equal and are the key to the desired relations. In order toutilize these equations, it is necessary to relate the degrees of freedom ofthe element. to the degrees of freedom of the total system, A. This isdone symbolically by introducing a NELFRE*NDFREE matrix, B1 (to bediscussed later), such that the following identity is satisfied:

(7.13)

Substituting this identity, Eqn. (7.12) becomes

j1(A) = A'B[k1B4 + ATBTp1. (7.14)

Comparing this relation with Eqn. (7.9), one can establish the symbolicrelationships

(7.15)

B1p1

andNE

K Bfk1B1,(7.16)

NE

Equations (7.16) can be considered as the symbolic definitions of theassembly procedures relating the element matrices, k1 and p, to the totalsystem matrices, K and P. Note that these relations involve the element

Page 156: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7.4 Symbolic element assembly for quadratic forms 147

connectivity (topology), B,, as well as the element behaviour, k1 and p.Although some programs do use this procedure, it is very inefficient and

thus very expensive.For the sake of completeness the B1 matrix will be briefly considered.

To simplify the discussion, it will be assumed that each nodal point hasonly a single unknown scalar nodal parameter (degree of freedom). Definea mesh consisting of four triangular elements. Figure 7.11 shows both thesystem and element degree of freedom numbers. The system degrees offreedom are defined as

— [AIA2A3A4A5A6] (7.17)

and the degrees of freedom of element 'i' are

61= [ô1&ô3], (7.18)

For element number four (i = 4), these quantities are related by

1A5

which can be expressed asA1

(t5fl rO 0 1 0 0 O-i2

0 0 0 0

0 1 oiA5

A6

Defining 64 B4A yields

10 0 1 0 0

0 0 0 0 (7.20)L0 0 0 1

The matrices B1, B2, and B3 can be defined in a similar manner.Since the matrix B contains only ones and zeros, it is called the element

Boolean or binary matrix. Note that there is a single unity term in eachrow and all other coefficients are zero. Therefore, this NELFRE*NDFREEarray will contain only NELFRE non-zero (unity) terms, and sinceNELFRE NDFREE, the matrix multiplications of Eqn. (7.16) arenumerically very inefficient.

Page 157: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

148 7. Assembly of element equations into system equations

Although these symbolic relations have certain educational uses theirgross inefficiency for practical computer calculations led to the developmentof the equivalent programming procedure of the "direct method" of assem-bly that was discussed earlier.

It is useful at times to note that the identity (7.13) leads to the relation

= (7.21)

where ( ), is some quantity associated with element 'i'.

Fig. 7.11 Relationship between system and element degrees of freedom

(a) System

7.5 Frontal assembly and solution procedures

In addition to banded and skyline or profile methods of storage andsolution many finite element codes utilize frontal methods. Usually anelement by element frontal assembly and elimination procedure isemployed. Such a procedure can utilize a relatively small memory. Unlikethe procedures considered to this point, the efficiency of frontal methodsis independent of node numbers and is dependent on the element processingorder.

A very detailed description of the frontal method, along with the sup-porting software, was given in the text by Hinton and Owen [42]. Hereonly a limited insight into the frontal assembly procedure will be presented.This involves the definition between the element degree of freedom num-bers and the current system dof number destination number in memory.

The frontal method stores only equations that are currently active.Equations that have received all of their element (and constraint) contri-butions are eliminated to provide storage for equations that may become

- A4

2

(b) Local

Page 158: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

7.6 Frontal assembly and solution procedures 149

active with the next element. To illustrate these points consider a meshwith eight nodes, fourteen line elements, two nodes per element and onedegree of freedom per node (M = 8, NE 14. N 2, NO = 1,

NDFREE = 8). If assembled in full form before elimination takes place,storage must be provided for the total NDFREE = 8 equations. The frontalmethod generally requires less storage. This is illustrated in Fig. 7.12 whichshows .the mesh and the storage location (or destination) of each systemequation as the elements are read. Note that after the first four elementsare read, node 3 (destination 2) has made its last contribution. Thusequation 3 can be eliminated and its storage locations freed for the nextnew equation. When the next element, 5, is read, node 6 makes its firstappearance and can be stored where equation 3 used to be located. Notethat proceeding in this manner requires storage for 7 equations instead of8. Note that equations 5 and 7 are the last two to be eliminated.

Figure 7.13 shows that if the elements are input in a different order onlya maximum of 4 equations must be stored instead of 8. The maximumnumber of equations required in memory is usually called the front sizeor wavefront. Algorithms for reordering elements to yield reduced frontshave been given by Akin and Pardue [5].

Page 159: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.12 Frontal storage example

2

8

Destination number1 2 3 4 5 6 7

Element Node number1 1 3 — — — —

2 1 3 2 — — —

3 1 3 2 4 — — —

4 1 3 2 4 5 — —

5 1 6 2 4 5 —

6 1 6 2 4 5 7 —

7 1 6 2 4 5 7 —

8 1 6 2 4 5 7 —

9 1 6 2 4 5 7 810 1 6 2 4 5 7 811 1 6 2 4 5 7 —

12 1 — 2 4 5 7 —

13 — — 2 — 5 7 —

14 — — — — 5 7 —

[N] Element number

NrNode number

3

1 [5] 6 [9]

Page 160: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 7.13 Reduced frontal storage

2

(N) E'ement number

N Node number[6]

.7

[10]

6 [91 8

Revisedelementorder9—+ 1

10—4 25—* 38—4 4

11—÷ 5

12—+ 61—3 7

83—3 9

14-+ 106—÷ 11

4—* 1213—* 13

14

1

6666

6

333

3

3

33

3

Destination number2 3

Node number

8 —

8 71 71 71 71 71 7— 7

— 75 75 75 —

5 —

4

44444

22

22

Page 161: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

152 7. Assembly of element equations into system equations

7.6 Exercises

1. Draw the upper half triangle of the system square matrix for the meshin Fig. 7.12. Use an x to represent a non-zero contribution from anelement. Draw the skyline and maximum band limit. How many storagelocations are required for the (a) skyline storage, and (b) band storage(remember the triangle of zeros at the end)?

2. Repeat the above problem using a different node numbering of yourchoice.

3. Reproduce Fig. 7.13 where the destination numbers are based on anelement input order of your choice.

4. The cost of eliminating the equations is proportional to the root meansquare, RMS, of the element front sizes. In Fig. 7.13 the RMS = 3.128;what is it in Fig. 7.12?

5. Redraw Fig. 7.4 if there are three dof per node.6. Redraw Fig. 3.16 for two dof per node.7. Assume constant element matrices of

r3 4i ulse=I I,L4 3i 12

and assemble the system equations for the mesh in Fig. 3.19.

Page 162: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

8

Application of nodalparameter boundaryconstraints

8.1 Introduction

After the system equations have been fully assembled in the form ofEqn. (1.2), it is necessary to apply the boundary conditions before theequations can be solved for the unknown nodal parameters. There are atleast two different formal procedures for applying these boundary con-straints. In this section, three types of nodal parameter boundary constraintswill be defined. The most common boundary conditions (Type 1) are ofthe form

(8.1)where represents system degree of freedom number, j, and b is thespecified value assigned to that degree of freedom. Obviously, this boundarycondition has many practical applications. For example, in a heat transferproblem this can be used to assign a specific temperature to a particularnodal parameter. Also, this type of condition occurs very frequently instructural analysis problems.

The next boundary constraint (Type 2) to be considered is of the form

AD1 + BDk C, (8.2)

where D1 and Dk represent two system degrees of freedom, and A, B, andC are arbitrary constants (A 0). This restraint contains the first conditionas a special case. The second type of constraint also has various practicalapplications. For example, in a two-dimensional inviscid fluid flow problem,this can be used to require that the two velocity components at a node betangential to a solid boundary at that node. The third and final boundaryconstraint (Type 3) to be considered is of the form

ADJ+BDk+CDe E. (8.3)

153

Page 163: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

154 8. Application of nodal parameter boundary constraints

This type of constraint can occur in several three-dimensional problems.For example, in a structural analysis problem one could have a nodeconstrained to displace tangential to an arbitrary plane in space (generalroller support). Such a support condition can be described by Eqn. (8.3).

The analyst should observe that if there are m Type 2 constraint equations(and corresponding input data) then there are 2m nodal parameters thatwill have Type 2 boundary code indicators. Similarly, if there are m Type3 constraint equations then there are 3m nodal parameters with Type 3indicator codes, etc.

These three constraints are probably the most commonly used (nodalparameter) boundary conditions found in practical finite element problems.As mentioned earlier, there are two common methods used to apply theboundary conditions. The first method is to modify the assembled equationsto reflect the boundary constraints and then to solve the complete set ofequations. The second method is to eliminate the restrained parametersand then to solve the reduced set of equations. The first method has theadvantage that it can more easily handle general forms of restraint. How-ever, it requires all the nodal parameters to be calculated; even those withspecified values. The second method is often used in structural analysisprograms and has the advantage that only the unrestrained parametershave to be calculated. Its major disadvantage is that it is difficult to programfor constraints other than those of the first type.

8.2 Matrix manipulations

The first method will be illustrated by outlining the modifications necess-ary to incorporate a Type 2 constraint. To simplify the procedure, Eqn.(8.2) will be rewritten as D1 + aDk b where a = B/A and b = C/A. Sincethe procedure is not restricted to banded matrices, the assumption of abanded matrix will temporarily be lifted. The assumption of symmetry isretained. Figure 8.1 shows the original form of the system equations.Recalling that D = b — aDk one can replace D1 times the jth column by(b — aDk) times the 1h column. This substitution results in the two modi-fications shown in Fig. 8.2. Note that these changes destroy the symmetryof the equations and result in a determinant of zero. To restore thesymmetry subtract 'a' times the row from the kth row and then multiplythe jth row by zero. This second modification is illustrated in Fig. 8.3. Theseoperations restore the symmetry of the problem but the equations are stillsingular since the dependence on D has been removed. Either the equations

Page 164: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

8.2 Matrix manipulations 155

must be reduced in size by one or modified still further. To be consistent,the latter approach will be used.

Recall that the identities D1 + aDk = b and aD1 — aD, = 0 can beexpressed in a symmetric matrix form as

[1 a i{D;} = {b}.

(8.4)La a2] Dk ab

Combining these relations with the last modification results in the finalform necessary to include the second type of constraint. This final form isillustrated in Fig. 8.4. The solution of this complete set of symmetricequations will exactly satisfy the given constraint equation. It should benoted that the modification necessary to incorporate the first type ofboundary constraint is obtained as a special case (a = 0) of the aboveprocedure. The final modification for this type of constraint is shown inFig. 8.5.

Note that if the original matrix is banded then the modification forconstraint Types 2 and 3 may increase the bandwidth size. The Type 1constraint, which is most common in practice, does not increase the band-width. In practice, the increase in bandwidth for Types 2 and 3 will besmall since the constrained parameters are usually at the same node. Theincrease in bandwidth can be minimized by making programming changes(see REVISE and CONVRT) that will partition, during assembly, thesystem equations so that the parameters are separated according to theirconstraint type number.

Figure 8.6 illustrates a simple FORTRAN subroutine, MODFUL, forapplying a Type I boundary constraint to a system (or element) squarematrix. Again it should be noted that this type of routine would only bepractical for problems involving a small number of unknowns.

It was pointed out above that, except for Type 1 constraint equations(which fortunately are the most common), the modification of the systemequations may result in an increase in the size of the half-bandwidth of theequations. The increased bandwidth results from the addition of twocolumns (or rows) that takes place during the modification procedure andthe size of the new bandwidth depends on the original size of the bandwidth,due to the element topology, and the difference in the column (or row)numbers that are being added. Once the constraint equation data and thesystem list of element incidences have been input, it is possible to calculatethe increase (if any) in the bandwidth. First, the original half-bandwidthis determined (by subroutine SYSBAN). Next the degree of freedomnumbers of the parameters in the constraint equations are determined (bysubroutine INDXPT). The differences in these (column and row) numbersare combined with the original bandwidth to determine the new bandwidth.

Page 165: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

156 8. Application of nodal parameter boundary constraints

These calculations (executed by subroutine MODBAN) take place earlyin the solution process so that adequate storage space can be set aside forthe upper half-bandwidth of the system equations. The increased bandwidth(if any) results in many additional zero coefficients being introduced intothe equations to be solved. This is serious since the initial zeros becomenon-zeros during the factorization of the system square matrix. Thus, theexact modifications are undesirable for banded modes with other than Type1 nodal constraints. The banded storage mode modifications are executedby MODFYI, MODFY2 and MODFY3. Figure 8.7 shows subroutineMODFYI. These modifications would usually be under the control of aroutine (such as APLYBC) which recovers the input constraint equationdegree of freedom numbers and coefficients. Its flow chart was given inChapter 2 while the actual details used in MODEL are given in theAppendix.

The second method for applying Type 1 boundary conditions will beoutlined at this point. This procedure has been described in detail in severaltexts. Note that the system equations could be arranged in the followingpartitioned form

Ffi4 — fca

L S,ipj lDpJ [Cs

where Da represents the unknown nodal parameters, and D,3 representsthe boundary values of the prescribed Type 1 nodal parameters. Thesubmatrices and are square, whereas and are rectangular,in general. It has been assumed that the equations have been assembledin a manner that places the prescribed Type 1 parameters at the end of thesystem equations. The above matrix relations can be rewritten as

+ = Ca (8.5)+ = C5

so that the unknown nodal parameters are obtained by inverting the matrixSaa, that is

Da — Sa5D5). (8.6)

Also, if desired, the value of C5 is determined from

C5 = — — S55)D5. (8.7)

The extension of these matrix operations to multiple constraints will notbe discussed here.

Page 166: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 8.1 Original system equations

I ...

I Slk ... Sip

Sjp

... ... Skk

) Spi Spj Spp

*arbitrary integers 1 k

D1 C1

C,

— Ck

cp

CJ-bSJJ

=—;

bSk1

FIg. 8.2 First modification

1...j... kI 511 ... 0 ... (Sik ...

j S,1 ... 0 ... H as,,)

Ski 0 ... (5*4 •.. S'cp

P Spi 0 ...

FIg. 8.3 Second modification

1 ...j... k pSi1 0 ... (Sik

TaSj,) ...

9 9

(Ski — aS1i) ... 0 ... (Skk — + ... —

L ... 0 ... (Spk ...

D1 C1—bS1,

0

Ck — aC1 — b541 +

Page 167: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

E :-U-

o'-4

+

+-,

U I UU

—o 00

w

a—

C04-C.)

4-

0E

CU-

Iz

Page 168: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 8.6 Subroutine MOOFUL

SUBROUTINE MODFUI. (NTOTAL,N,VALUE,S,C1CC APPLY TYPE 1 MODIFICATION TO FULL S'YMM bQS

* * O(NJ VALUE* * * * * * * * *

COP IMPLICIT REAL*8 (A—H,O—Z)DIMENSiON 5(NTOIAL,NTOTAL), CINTCTALI

C NIOTAL = TOTAL NUMBER OF EQUATiONSC = DOF NUMBER CF CONSTRAiNED PARAMETERC VALUE = GIVEN VALUE CF DOF NUMBER N

C S = FULL SQUARE MATRIX, C = FULL COLUMN MATRIXDO IC I = l,NTtJTALCU) = CU) — VALUE*SII,N)S(I,N) = O.DO

10 S(N,I) = 0.DOSIN N) = I.D0

= VALUERETEND

Fig. 8.7 Subroutine MODFYI

SUBROUTINE MOOFYI (NDFREE,MBW,Ll,C1,SS,CC)CC APPLY TYPE 1 CCNSTRAINT EQUATION MODiFICATIONSC IN UPPER HALF BANDWIDTH MODEC SS*DD = CC, DD(L1I = ClC ** ************************CDP IMPLiCIT REAL*8(A—H,O—ZJ

DIMENSICN 5S(NDFREE,MBWJ, CC(NDFREE)C SS = RECT MATRIX WITH UPPER HALF BANDVd1UTH OFC SYMMETRIC SYSTEM EQUATIONSC CC = SYSTEM CCLUMN MATRIXC Li = SPECIFIED SYSTEM DEGREE OF FREEDOM NUMBERC Ci • SPEL.IFIED CONSTRAINT CCEFFICIENTC MBW = MAX. HALF BANDWIDTH OF SYSTEMC NDFREE = TOTAL DEGREES OF FREEDOM OF SYSTEM

ZERO 0.DOMl = MINO (L1,MBW) — 1IF I MI.LT.1 GO TO 20DC 10 1 = 1,M1

II + 1

IF ( Ci.EQ. ZERO GO 10 10CC(IROW) = CC(IROW) — C1*SS(IROW,ICtL)

10 SS(IROW,ICQLI = ZERO20 Mi = MIND ( (NDFREE + 1 — L1),MBW I

DC 30 1 = 1 MlI

II I GO TO 30

CC(IHOWI = CC(IROW) — C1*SS(Li,ICCL)30 SS(LI,ICOL) = ZERO

SS(LL 1) = 1.00CC(L1I = CiRETURNEND

Page 169: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

160 8. Application of nodal parameter boundary constraints

8.3 Constraints applied at the element level

The previous sections on the application of boundary nodal constraintshave assumed that the constraints would be applied at the system levelafter the equations have been fully assembled. This is generally the mostefficient way of applying the nodal constraints. However, there are situ-ations where it is necessary or useful to apply the nodal constraints at theelement level. The above procedures for introducing the nodal constraintscan also be applied to the element matrices, Sc, and Ce. This is true so longas all the degrees of freedom given in the linear constraint equation occurat a common node. For example, consider a problem with one parameterper node and assume that the value at a particular node is defined to beV, i.e. a Type 1 constraint. Further, assume that there are g elementsconnected to that node. Then the matrices of each of the g elements wouldbe modified such that the corresponding square matrix diagonal term andcolumn matrix terms are one and V respectively. When the g elements areassembled, the system matrix has a corresponding diagonal term of g andthe column matrix term has a value of g* V. Thus the final result gives thesame as would be obtained if the modifications were carried out at thesystem level. Since the element matrices usually are stored in their fullform, instead of in upper half-bandwidth form, one would need a subroutinesuch as MODFUL (Fig. 8.6) to apply the Type 1 modification at theelement level.

8.4 Penalty modifications for nodal constraints

Nodal parameter constraints can also be accomplished by the use of anartifice such as the following. Let 'i' denote the degree of freedom to beassigned a given value, say V. This trick consists of modifying two termsof the system matrix and column vector, i.e. S1,, and C,. These terms areredefined to be

= (8.8)=

where is a very large number. This yields the system equation

S,1D1 +... + +... + =

which is a good approximation of the boundary condition D = V, if fi is

Page 170: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

8.4 Penalty modifications for nodal constraints 161

sufficiently large. This artifice is the fastest method for introducing Type1 constraints but it can lead to numerical ill-conditioning. There is also aproblem of how large a value should be assigned to /3. Commonly usedvalues range from 1012 to 1028.

The higher order constraints could be introduced in a similar manner.For example, a Type 2 constraint such as the one in Eqn. (8.4) could bealso added to the system equations after being multiplied by some penaltyweight. Such a procedure has the advantage that it adds very little toskyline or frontal storage procedures.

However, there are numerical difficulties. The multiplication by theweighting factor introduces large numbers into off-diagonal terms and maycause ill-conditioning of the equations. There is also a problem of how toselect the penalty weight. If a very large penalty is used, as in the Type1 case, the system tends to lock-up, i.e. yield a zero solution, and theconstraints approach a set of Type 1 constraints. To prevent this one mustretain some information about element contributions to the correspondingequations. One way of doing this is to find the average value of the originaldiagonal terms to be modified by the constraint and then the constraintequation penalty could be selected to be 100 or 1000 times larger. Thisgives reasonable accuracy but the exact matrix manipulation procedure isbetter.

The symmetric constraints in Eqn. (8.4) can be generalized to anynumber of terms. Recall that the normalized coefficients, CEO, and thedegree of freedom numbers, NDXC, are stored for each constraint of Typen, where

I + CEQ(1) . DNDXC(2) +... + CEQ(i). 0NDXC(+ 1)

+ CEQ(n — 1) . = CEQ(n) (8.9)

Thus a least squares procedure can be used to form the penalty square andcolumn matrices, SP, and CP. Form a temporary vector, V(n + 1), suchthat V(1) = 1 and V(i +1) = CEQ(i) for 1 i n. Calculate the productVTV and delete the last row. Then the last column contains CP while theremainder of the expression is SP. Several other types of penalty constraintshave been given by Campbell [21].

The matrix manipulation procedure was originally used in MODEL (seeChapter 2) but the penalty constraints are now employed for simplicity.If a skyline solution procedure is utilized then the exact manipulationprocedure could be used with little additional cost if high accuracy inmulti-point constraints required. Of course there are other procedures,such as transformation methods [25J, that can be employed to enforceconstraints. In problems with a high percentage of constrained degrees of

Page 171: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

62 8. Application of nodal parameter boundary Constraints

freedom one should also consider reducing the rank of the system matricesas an additional cost-saving procedure.

The subroutines for generating and applying the penalty constraints aregiven in Figs. 8.8 and 8.9. The constraint matrices are generated byPENLTY. The data are extracted by PENMOD which also selects thepenalty weight and the additions to the system equations.

The contributions of the constraint equations to the system bandwidthare determined by subroutine CEQBAN illustrated in Fig. 8.10. If a skylinestorage mode were utilized it would be necessary to carry out similarcalculations to see if the constraints change the system column heights.

Fig. 8.8 Subroutine PENLTY

PENLTY (NPFRE,CEQ,CP,SP,%dTjCC DEFINE CONSTRAINT PENALTY SQ AND CCL MATRICESCCOP IMPLICIT REAL*8 (A—H 0—fl

DIMENSION CEQ(NPFREJ, SP(NPFRE,NPFRE)C NO DOF iN CONSTRAINT EQUATIONC CEQ(fl = CONSTR EQ COEFFICIENT 1+1C CP = CONSTRAINT COLUMN MATRIXC SP = CONSTRAINT SQUARE MATRIXC = PENALTY WEIGHT FACTORC INITIAL CALCULATIONS

CP(1) 1.DOTEMI = CEQ(NPFRE)iF ( I GO TO 200010

C CALCtjLATE LEAST SQ CONSTRAINT FORMS

DO 30 J = 1,NPFRE30 SP(J,l) = WT*CP(I)*CP(J)40 CCNTINUE

DO 50 I = 1 NPFRE50 CP( I) CP( il*TEMP*WT

RETURNEND

Fig. 8.9 Subroutine PENMOD

SUBROUTiNE PCNMOO CEO,1

CCCCOP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION SS(NDFREE,MAXBAN), CC(NCFREEJ, CP(MAXACT)I SP(MAXACT,MAXACTI,

C MAXACTC NOC TYPEC NOC EQCCC SQ MATRIXC

PENALTY WEIGHT FACTORlEO = 0IF ( ) GO TO 40

C——> TYPE 1 CCNSTRAINTCC 5 J = 1,NREQ(1)lEO = IEQ + 1

Page 172: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 8.9—continued

5 CALL MODFYI (NOFREE2 CEQU,IEQ),SS,CCJ

40 IF ( MAXACT.EQ.1 3 RETURNC——> OTHER TYPES

FACTOR = 1.00300 30 IC = 2 MAXACTNTEST =

I GO TO 30C LOOP OVER NC EQS

CC 20 J = 1,NTESTlEO = lEO + 1

C SELECT AVERAGE WEIGHT= 0.0

00 10 K = 1 IC10 = WI +

= WT*FACTOR/ICC EXTRACT COEFF AND FORM LEAST SQ MATRICES

CALL PENLTY (IC,CEQ(1,IEQIC EXTRACT DCiF NOS AND ADD PENALTY TC SYS tCS

CALL SIORCL (NDFREE,IC,NDXC(1,IEQJ,CP,CC)CALL STORSQ (NDFREE,MAXBAN,LC,NDXC(1,IEQ),SP,SS)

20 CONTINUE30 CCNTINUE

RETEND

Fig. 8.10 Penalty bandwidth calculation; subroutine CEQBAN

SUBRCUTINE CEQBAN (JBW1

CC FIND MAXIMUM HALF BANDWIDTH REQUIRED BYC CCNSTRAINT EQUATION MODIFICATIONC

C JBW = MAX HALF BANDWIDTH THAT WILL RESULT FRCMC CCNSTRA1NT EQUATIONS MODIFICATIONSC MAXACT = NO ACTIVE CONSIR TYPESC NUMCE = TOTAL NO CONSTR EQSC NDXC(I,J) = CCNSTR DOF NO I OF EQ JC NOFREE = TOTAL NO OF SYSTEM DEGREES CF FREEOCM

JBW = 1lEO = 0

C—-> LOOP OVER NON DIAGONAL CONSTRAINTSDO 30 IC = 2.MAXACTNTEST = NREQ(ICIIF I NTESI.EQ.0 I GO TO 30

C—-) OVER TYPE IC EQUATIONSDO 20 J = 1,NTESTlEO = lEO + 1IMIN NDXC(1,IEQIIMAX = IMIN

C——> FIND EQUATION BANDWIDTH00 10 1 = I1ICINDEX = NDXC(I IEQ)IF ( INDEX.LT.IMIN I IMIN = INDEX

10 IF ( INDEX.GT.IMAX I IMAX = INDEXIBM = IMAX — IMIN + 1

C UPDATE MAXIMUMIF I LBW.GT.JBW I JBW = 18W

20 CONTINUE30 CONTINUE

RETIRNEND

Page 173: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

164 8. Application of nodal parameter boundary constraints

8.5 Exercises

1. Modify the matrix in Fig. 4.11(a) to include the constraint that D2 =3. Use both the manipulations of Fig. 8.5 and the penalty method.

2. Write an algorithm to apply the modifications of Fig. 8.4 if the squarematrix is stored in a skyline node (see [26]).

3. Discuss the effects of renumbering the equations so that Type 1 con-straints are considered on the right-hand side but are not retained in thesystem equations. How does it effect the storage, output of variables,etc.?

4. Consider a system where D4 = 0 and D1 — 0.5 D2 = 0.5. Use the methodin Fig. 8.4 to show that the solution is DT = [1 3 0.5 0] if CT[5 6.5 9 10] and

1 1 221.5 2 2

24(sym) 1

Page 174: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9

Solution and result output

9.1 Economical solution techniques for the system equations

9.1.1 Introduction

Modern computer methods of finite element analysis present us with theproblem of having to solve large systems of simultaneous algebraic equa-tions. If the analysis is to be performed economically, it is critical that wegive careful consideration to the equation solving process. Present experi-ence indicates that from one-third to one-half of the computer time involvedin a linear analysis is associated with solving simultaneous equations. Innonlinear and dynamic analysis, as much as 80% of the computer time isassociated with solving the system equations.

Certain properties of the square system matrix in the finite elementmethod allow us to employ a number of techniques that reduce not onlythe solution time, but the amount of computer storage required to performthe analysis. As mentioned before, the system equations are symmetric,positive definite, sparse, and are often banded. Symmetry allows us toeconomize on computer storage since only the elements on the maindiagonal and those above (or below) the diagonal need be stored. Becausethe matrix is positive definite, the process of pivoting is never required inorder to ensure a stable solution. This allows us to save on computationalsteps. Banding, however, depends directly on the way the node numbersare assigned and the analyst's ability to prepare an efficient numberingscheme. Banding provides us with the capability to further save on computerstorage and computational steps in that only those elements within theband will be stored and involved in the operations. Figure 1.6 is illustrativeof a banded, symmetric matrix.

Since the solution time varies approximately as the square of the band-width, the nodal numbering producing the minimum bandwidth results inthe most economical solution. By way of comparison it should be mentioned

165

Page 175: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

166 9. Solution and result output

here that the solution time for equation solvers which operate on allelements in a square array varies cubically with the number of equations.

9.1.2 Efficient node numbering

The previous section has again highlighted the importance of the half-bandwidth on the storage requirements and the solution time. There aremore advanced programming techniques that can be utilized to reduce thesignificance of the half-bandwidth but these methods will not be consideredhere. Since the solution procedures described here are banded techniques,the effects of the nodal numbering scheme will be briefly reviewed in thehope that the user will exercise the proper care when numbering nodes.Recall that the half-bandwidth caused by a typical element is given by Eqn.(7.5):

HBW = NG*(Imax — 'mjn + 1)

and is illustrated graphically in Fig. 7.5. Note that the analyst assigns thenode numbers. Thus he has control over largest and smallest node numbers('max and 'mm, respectively) that are assigned to any element. He thereforehas direct controi over the maximum half-bandwidth that occurs in thesystem of elements. Usually the analyst can number the nodes so that theminimum half-bandwidth is achieved by inspection. However, for three-dimensional problems and multiple connected regions, one may find itnecessary to rely on algorithms that automatically renumber the nodes soas to reduce (but not necessarily minimize) the bandwidth.

9.1.3 Equation solving techniques

Before discussing specific equation solving algorithms, it is necessary todiscuss briefly those capabilities that are essential for efficient and econ-omical solutions of the system equations. The equation solver should beable to take advantage of the sparse, symmetric, banded nature of theequations. It should also be capable of handling multiple solution vectorseconomically. In addition, solution algorithms should be compared on thebasis of calculation and data handling efficiencies.

There are three principle direct solution algorithms in wide use today.These are (1) Gauss elimination, (2) Choleski factorization, and (3) modi-fied Gauss—Choleski factonzation. From the standpoint of calculationefficiency, it has been proven that no algorithm for equation solving caninvolve fewer calculations than Gauss elimination. The original Choleskialgorithm requires only iON (where N is the number of equations) morecalculations than Gauss elimination. This results from the square-root

Page 176: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9.1 Economical solution techniques for the system equations 167

operation in the original Choleski algorithm. It has been shown that thereis much less error associated with the Gauss process than the originalCholeski procedure. This is attributed to the fact that the repeatedsquare-root operation severely degrades the accuracy of the process onsome computers. This is the fault of the computer and not the algorithm.Despite the disadvantages of the original Choleski process, it has importantdata storage advantages. It is possible to retain the best features of boththe Gauss and Choleski algorithms within a modified Gauss—Choleskialgorithm.

For simplicity we consider first full matrices. Basically the Gauss elim-ination procedure consists of two parts: a factorization procedure; and aback-substitution process. The effect of the factorization procedure on afull matrix is illustrated in Fig. 9.1. The coefficients below the diagonal arereduced to zero (i.e. eliminated) by performing a sequence of row oper-ations. For example, to eliminate the terms below the diagonal in columni, one multiplies row i by and adds the result to row j. where(i+

After the factorization is completed as shown in Fig. 9.1, the last rowcontains one equation with one unknown. At this point the back-substi-tution process may be started. That is, the last equation, is

solved for the value of Once is known, it is substituted into thenext to the last equation, which is then solved for - 1. The back-substi-tution continues in a similar manner until all the D are known. Algorithmsfor the Gaussian elimination technique can be found in many texts onnumerical analysis. However, most finite element codes do not use thismethod since other methods, such as the Choleski method, result in moreefficient storage utilization and simpler handling of multiple solution vec-tors, C.

The (original) Choleski factorization method factors the system squarematrix S into the product of a lower triangular matrix (i.e. coefficientsabove the diagonal are zero), L, and the transpose of this lower triangularmatrix. That is,

SD=C (9.1)

is factored into

LLTD=C. (9.2)

Then defining

(9.3)

the previous equation can be written as

LG=C. (9.4)

Page 177: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

168 9. Solution and result output

Since L and C are known and L is a triangular matrix (with one equationand one unknown in the first row), the intermediate vector, G, can bedetermined by a forward-substitution process. AfterG has been determinedfrom Eqn. (9.4), the unknown nodal parameters, D, can be obtained bya back-substitution into Eqn. (9.3).

The attractive features of the Choleski algorithm should now be moreapparent. First, note that it is only necessary to store L or LT, whicheveris more convenient. Secondly, once the system square matrix, S, has beenfactored the unknown nodal parameters, D, can be evaluated by a simpleforward- and backward-substitution utilizing the given solution vector(s),C (and the intermediate vector, 6). In most problems the equations onlyneed be solved for one value of C. However, in dynamic or transientproblems and in structural problems with several load conditions one mayrequire the solutions involving many different values of C. With the Cho-leski scheme the time-consuming operations of assembling and factoringS are only performed once in linear problems. For every given C only therelatively fast forward- and back-substitutions need be repeated. The dif-ficulty with the original Choleski algorithm was that the calculation of thediagonal terms of L required a square-root operation. This operationrequired an undesirable amount of time and also led to relatively inaccurateresults. Thus a modified Gauss—Choleski algorithm was developed.

A modified Gauss—Choleski algorithm retains the better features of bothtechniques and at the same time eliminates the undesirable square-rootoperations in the factorization. The algorithm is outlined below in symbolicform. The system equations

SD=C

are factored into

(LdLT)D = C (9.5)

in which L is a lower triangular matrix with ones on the diagonal matrix,see Fig. 9.2. It is the introduction of the diagonal matrix that eliminatesthe square-root operations. Proceeding as before, let

(9.6)

then

LG=C. (9.7)

Given the value of C one obtains G by a forward-substitution into Eqn.(9.7) and then G is back-substituted into Eqn. (9.6) to yield the nodalparameters, D. The last operation can be divided into two operations; first,

Page 178: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9.1 Economical solution techniques for the system equations 169

a scaling calculation, using the diagonal matrix d

LTD =d'G

H the

the

the the solution the system equationsis to identify the algorithm for calculating the arrays L and d. To illustratethese operations consider a system with only four equations. Carrying outthe products in Fig. 9.2 and equating the lower (or upper) triangle givesthe identities of Fig. 9.3(a). As shown in Fig. 9.3(b) the identities can besolved to define the necessary terms in L and d. The above operations canbe generalized for any number of equations by the expressions:

d11 =

i>1,

= 1 (9.8)

L11 = — >1.

i<jOf course, one only calculates the L9 terms when 1 >1. The L,1 terms arestored in the original locations of the Si,. The are stored on the diagonalin place of the L11 = I terms.

Since the above factorization operations can represent a significant partof the total computational costs every effort is usually made to programEqns. (9.8) as efficiently as possible. Thus it is often difficult to comparethe software with Eqns. (9.8). This is in part due to the fact that largefinite element matrices are not stored in their full mode as was assumedin Eqns. (9.8). If they are banded the summations must be restricted tothe bandwidth. Conversely, if a skyline storage is used the summations arecarried out only with the stored columns.

Since both L and C are known, the identity of Eqn. (9.7) gives theforward-substitution algorithm for the determination of G. The procedureis shown in Fig. 9.4. The general expression is

= C, — GkLIk. (9.9)

Page 179: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

170 9. So/ut/on and result output

Note that G could be stored in either the old C locations or the, as yetunneeded, D locations. Here we use the latter. The backward-substitutionis defined by Eqn. (9.6). The operations are illustrated (in reverse order)in Fig. 9.5 and the resulting expressions are

=—

(9.10)

for n equations. Again note that D could be stored in G, that is in the oldC. Many codes utilize this storage efficiency. In the actual subroutines inuse here, D and C are given as different arrays. Of course they could beassigned the same storage pointer for added storage efficiency. A samplesolution is shown in Fig. 9.6.

The actual subroutines used for solutions, FACTOR and SOLVE, aregiven in Figs 9.7 and 9.8, respectively; for linear problems FACTOR needbe called only once while SOLVE would be called once for each loadingcondition. For a skyline storage mode the programming becomes moreinvolved. Typical programs have been given by Taylor [69] and Bathe andWilson [14]. Programs SKYFAC and SKYSOL, shown in Figs. 9.9 and9.10, respectively, illustrate one approach. They employ a function pro-gram, DOT, to evaluate the dot (or scalor) product of two vectors. Theyare compatible with the previously discussed skyline subroutines.

FIg. 9.1 Result of Gauss factorization

S11 S12 .. . S11 . . . IC1S21 S22

(a) Original equationsii. 1C,

SI1 Sf2. . . Sj,, D1Si,. D2

Equations after factorization (b) =.D1zero c

Page 180: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.2 A modified Choleski factorization

Is11

I

d11 zero 1 L21 L31 •

L21 1 d22 1 L32

L31 L32 ....

zero zero ...,

S = LdLT

Fig. 9.3 A factorization of four equations

S11 == d11L21

Sn +S31 = d11L31

S32 = + d22L32

S33 = d11L31L31 + + d33

S41 =S42 = d11L41L21 + d22L42

S43 = + d22L42L32 + d33L43

= + d22L42L42 + d33L43L43 +

(a) The S = LdLT identity

d11 = S11

L21 = S21/d11

= — d11L21L21

= S31/d11

L32 = (S32 —

d33 = S33 — d11L31L31 —

L41 =L42 = (S42 — d11L41L21)/d22

L43 = (S43 — d11L41L31 — d22L42L32)/d33= — d11L41L41 — d22L42L42 — d33L43L43

(b) Solution for coefficients of L and d

L42

Page 181: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.4 Forward substitution for equations

G=C1L21G1 + G2 — C2L31G1 + L32G2 + G3 = C3L41G1 + L42G2 + L43G3 = C4

(a) The L G = C identity

G1 = C1G2 = C2 — L21G1

-L32G2G4 = C4 — — L42G2 — L43G1

(b) Solution for G

Fig. 9.5 Back-substitution for four equations

G4 =G1 = d33(D3 + L43D4)G2 = d22(D2 + L32D3 + L42D4)G1 + L21D2 + + L41D4)

(a) The (reverse) G = dLTD identity

D4 =D3 Gild33 — L43D4

= G2/d22 — L32D3 — L42D4= — L21D2 — L31D3 — L41D4

(b) Solution for the coefficients of D

FIg. 9.6 Sample factorization and solution

1 21 D1) 12)(a) Original system, SD = c,

[=

sym 7

11 —1 1 2] 11

(b) Factorization, S = LdLT, LT

=

1 —1/2d

=00 0

(c) Forward-substitution, LG = C, GT = [2 —2 1 —1]

(d) Scaling, dil = G, Hr = (2 —1/2 1 —1]

(e) Back-substitution, L'D = H, Dr = [4 0 0 —11

Page 182: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.7 Subroutine FACTOR

SUBRCUTINE FACTOR (NDFREE,IBW,SJCC IDLT FACTOR Of BANDED SYMMETRIC SQUARE MATRIXCCOP IMPLICIT REAL*8(A—H,O—Z1

CIMENSICN S(NDFREE law)C NDFREE MAX. OF FREEL)OM OF SYSTEMC IBW = MAXIMUM HALF BANDWIDTH Of SYSTEM EQSC S = RECT MATRIX WITH UPPER HALF BANO CF SYS EQS

TEMP 1.DO/S(I,1)00 10 J = 2,IBW

10 S(1,J) = S(1,J1*TEMPDO 70 1 = 2,NDFREEIL = I — 1NN = NOFREE — LL

20 IF .GT. MN = IBW00 60 J = 1,NNI = law — JSUM = O.DOIF( I .EQ. 0 7 GO TO 50IF( LL .11. 1 1 L = LI

30 00 40I1 K

= K40 SUM = SUM + S(K1,K2)*S(K1,K3)*S(K1,1150 S(I,J) = S(I,Ji — SUM

LF( J 1 J GO TO 60Sti ,JI = St I,J3 / StI,Ii

60 CONTINUE70 CONTINUE

RETURNEND

Fig. 9.8 Subroutine SOLVE

SUBROUTINE SOLVE (NOEREE, P,DiCC ANt) BACK SUBSTITUTION Of SYSTEM ECUATIONSC PART TWO OF CHOLESKY—GAUSSIAN SOL&JT]CNCCOP IMPLICIT REAL*8(A—H,O—Zi

CIMENSION P(NDFREEI, D(NCFREEIC NOFREE = MAX. DEGREtS OF FREEDOM IN SYSTEMC law = MAXiMUM HALF BANDWIDTH OF THE SYSTEMC S = FACTORED SYS SQ MATRIX FROM SUBR FACTORC D = SYSTEM DEGREES OF FREEDOM TO BE DETERMINEDC P = SYSTEM COLUMN MATRIX (KNOwN)

0(1) = P(1i / 5(1 1)C——> FOWARD SUBSTITUTII3N

00 20 1 = 2,NDFREEII = I + j.1 = II — 16WIF(II .LE. IBW I J = 1

1K = I — 1SUM = 0.D0DO 10 K = .1,1KKK = II — K

10 SUM = SUM + S(K,KKI*S(K,1)*D(K720 0(I) = ( P(II — SUM ) / S(I,Ii

C——> BACK SUBSTITUTIONCO 40 MN = 2,NDFREEI = NOFREt + I. — MNLI = I — 1J = LL + lawIF ( J.GT.NCFREE I .1 = NDFREE1=1+1SUM = 0.00DO 30K = L,.JKK = K — LI

30 SUM = SUM + Stl,KK)*D(KI40 0(1) = DII) — SUM

RET U RNEND

Page 183: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.9 Subroutine SKYFAC

SUBROUTINE SKYFAC (NDFREE,NDCOEF,ZDIAG,SjCC L*D*LT FACTORIZATION OF MATRIX SC STORED IN SYMMETRiC SKYLINE VECTOR MCDEC ** ************** ******** **COP IMPLICIT REAL*8 (A—H,O—ZJ

DIMENSION S(NOCOEF), IDIAG(NDFREEIC NOFREE = TOTAL NUMBER OF SYSTEM DCFC NOCCEF = IDIAG(NOFREEJ NO OF CUEFFS IN SC IDIAG(fl = LOCATION OF DIAGONAL OF EC 1C S = SYSTEM SQUARE MATRIX

ZERC = 0.00C OFF DIAGONAL TERMS

00 300 J = 2,NDFREEJOFF = IDIAG(J) — LDIAGtJ—1) — 1JTUP = J — JOFFISTART JTOP + Irsrap = IJO IOIAG( ISTOP) — JTOP + 1IF C ISTART.GT.ISTOP I GO TO 11000 100 1 = ISTART ISTOPLUFF = IOIAGtZI — IDIAGCI—1) — 1ITOP = I — 10FFNUM MAXO (ITUP,JTOP)NENO = I — MUMLiv JD + IIL = IDIAG( 1—11 ÷ NUM — hOP + IJG = JO + MUM

— OOT(NEND,S(IL),S(JG)j110 ISTART = .JTOP

IF ( ISTART.GT.ISTOP I GO TO 300SUM = ZERODC 200 1 = ISTART ISTOPIF ( S(IDIAG(j)).LLZERO I GO TO 20Co = SCI÷JDj/S(IDLAG(IJJSUM SUM + S(I+JD)*DSCI+JD) 0

200 CONTINUE

300= S(IOIAG(JIJ — SUM

RETURNEND

FUNCTION DOT IN A 81CC DOT PRODUCT OF VECTORS A(N)*BIN)C ** **** ****** ******** **** **COP IMPLICIT REAL*8 CA—H,O—Z)

DIMENSION AIM), 8(N)DOT 0.0000 10 1 = l,N

10 DOT = DOT + AtI3*B(I)RETURNEND

Fig. 9.tO Subroutine SKYSOL

SUBROUTiNE SKYSOL (NDFREE,NOCOEF,IDIAG,5,C,D)C ** ************************C FOWARO AND BACK SUBSTITUTION OF L*D*LTC FACTORIZATION OF SYSTEM EQS S*D=CCC S IN SYMMERIC SKYLINE STORAGE VECTCRCOP IMPLICIT REAL*8 (A—H,O—fl

DIMENSION S (NOCOEF) C(NDFREEI, O(NLiFREEI,1 IOLAG(NDFREE)

C NDFREE = TOTAL NUMBER OF SYSTEM DOFC NOCOEF = IDIAG(NDFREE) = NO OF COEFFS IN MATRIX SC IDIAGIJI LOCATION OF DIAGONAL CF EC IC S = FACTOR OF SYS SQ MATRIX, FROM SKYFACC C = SYSTEM COLUMN MATRIXC 0 = SYSTEM DEGREES OF FREEDOM (RETURNED)C DOT DOT PROD OF 2 VECTORS, FUNCTICN PRCG

ZERC = 0.00

Page 184: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9.2 Output of results 175

Fig. 9.10—continued

C SUBSTITUTION0(1) = CII)DO 100 I = 2,NDFREE10FF = IOIAG(1J — IOZAGCI—11 — 1

IF ( IOFF.LT.1 ) GO TO 100ITOP 1 — 10FFIS = IDIAG( I—i) + 1

CIII = CU) — DDT(IOFF,S(IS),0(ITCPfl100 CINTINUE

C BACK SUBSTITUTION

I U(I)=O(l)/S(IOIAGU))200 CCNTINUE

NDFM1 = NUFREE — 1.

00 300 K. = J.,NDFM1I = — K + 110FF = IOIAGUJ — IDIAG(I—1J — 1

ITOP = I — 10FFJSTART = ITOPJSTCP = 1 — 1IF I JSTART.GT.JSTDP I GD TO 300JO = Ii)IAGIL—1) — ITOP + 1CL = 0(11IF ( 0I.EQ.ZERD I GO TO 250DO 250 J = JSTART,JSTOP0(J) = D(JJ — DI*S(J+JD)

250 CONTINUE300 CONTINUE

RETE NO

9.2 Output of results

Once the nodal parameters of the system have been calculated it isnecessary to output these quantities in a practical form. The number ofnodal parameters (degrees of freedom) can be quite large. Common prob-lems often involve 2000 parameters but some special problems haverequired as many as 50,000 (or more) parameters. Also the reader shouldrecall that these nodal parameters are often utilized to calculate an equallylarge set of secondary quantities. Obviously, a simple printed list of thesenodal parameters is not the optimum form of output for the analyst. Datapresented in a graphical form are probably the most practical. Severalcomputer graphics programs have been developed for use with certainspecialized finite element codes. However, these graphics packages areoften expensive and usually highly hardware-dependent. Thus it is notfeasible here to delve into the subject of computer graphics as a mode ofdata presentation, instead the following four sections will discuss theutilization of printed output.

The most straightforward way to list the calculated nodal parameters isto list each of the M nodal points in the system and the values of the NGparameters that correspond to each of these nodal points, it is commonpractice to also list the NSPACE spatial coordinates of the nodal pointsso as to save the analyst the inconvenience of referring back to the input

Page 185: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

176 9. Solution and result output

data to determine the location of the point. The above format for printingthe calculated nodal parameters is utilized by subroutine WRTPT. Itdetermines the system degree of freedom to be printed by substituting thesystem node number (I) of the point and the local parameter (J) into Eqn.(1.1). Subroutine WRTPT is shown in Fig. 9.11.

It is desirable at times to know the values of the calculated parametersthat are associated with some particular element. This can be accomplishedby listing the data of interest associated with each of the NE elements inthe system. These data usually include a list of all nodal points (elementincidences) associated with the element, and a corresponding list of theNO nodal parameters that occur at each of these nodes. When using thisapproach it is obvious that several of the nodal parameters will be listedmore than once since most of the nodal points are shared by more thanone element. The element incidences are available as input data and thuscan be used with Eqn. (1.1) to identify which system degrees of freedomshould be printed with a particular element. These elementary operationsare executed by subroutine WRTELM, which is shown in Fig. 9.12.Once the nodal parameters, D, have been calculated, the analyst maydesire to know the extreme values of each of the NG nodal parametersand the node numbers where each extreme value occurred. These simpleoperations are performed by subroutine MAXMIN, which is shown in Fig.9.13. This returns two arrays, RANGE and NRANGE. Both arrays areNG* 2 in size. The first column of RANGE contains the NO maximumvalues of D and the second column contains the corresponding minimumvalues. Array NRANGE contains the node numbers where the corre-sponding extreme values in RANGE were encountered.

It is desirable to also have information on the contours of the nodal dof.One would prefer to have the computer plot the contour lines illustratingthe spatial variation of each of the NG types of nodal parameters. Lackingthis ability one would like the computer to supply data that would makeplotting by hand as simple as possible. As discussed in the previous section,the extreme values of any particular type of parameter (there are NG) arereadily determined. The procedure utilized here for each parameter typeis to print the spatial coordinates of points lying on specified Contour curves.The analyst specifies the number of contours (>2) to range from fivepercent above the minimum value to five percent below the maximumvalue for each parameter. The contour curves can be generated in severalways. One simple procedure (not the most efficient) is as follows. Examine,in order, each element in the system to ascertain if the contour passesthrough that element. That is, determine if the specified contour value isbounded by the nodal parameters associated with that element. If so,assume that the contour passes through the element only once and calculate

Page 186: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9.2 Output of results 177

the spatial coordinates of the points where it pierces the boundary of theelement. For simplicity, the present program, subroutine CONTUR, util-izes linear interpolation in these calculations. This subroutine is shown inFig. 9.14.

Once the intersection points have been located their NSPACE spatialcoordinates are printed along with an identifying integer point number.For printed output this procedure is inefficient since for NSPACE> 1 mostpoints will be listed (and numbered) twice. (This repetition could bereduced by calculating, printing, and numbering only the first piercingpoint.) Nevertheless, this procedure is much more efficient than doing thecalculations by hand. If the analyst has access to a plotter, the aboveprocedure is easily modified to yield plotted contours (for NSPACE 2).Once the two intersection points for an clement have been identified, onesimply makes the plotter draw a straight line through the two points. Ofcourse, it would be desirable to have a number or symbol plotted thatwould clearly identify the contour curve to which the segment belongs.After all the elements have been surveyed, the completed contour, con-sisting of many straight line segments, will have been plotted.

Subroutines MAXMIN and CONTUR have other possible applications.For example, if properties have been defined at each nodal point (in arrayFLTNP) then these properties values could also be contoured, ifNNPFLO NG. This would clearly identify regions of different materialsas a visual data check. However, since array FLTNP is doubly subscriptedand array D in CONTUR has only a single subscript, a few minor changeswould be required in subroutine CONTUR.

FIg. 9.11 Subroutine WRTPT

SUBPGUTINE WRTPT ( M,NG,NDF,NSPACE,X,00,INDEX)CC OUTPUT, BY NODES, OF CALCULATED CEGREES CF FREEDOMCCDP IMPLICIT REAL*8(A—H O—Z)

CIMENSION DD(NUF), INDEX(NG)C M = NUIIBER CF NODES iN SYSTEMC NO = NUMBER OF PARAMETERS (DOE) PER NODEC t'.DF = NUMBER OF DOF IN THE SYSTEMC NSPACE = DIMENSION OF SPACEC X SYSTEM COORDiNATES OF ALL NODESC DO = CALCULATED NODAL PARAMETERSC INDEX = SYSTEM DOF NOS OF PARAMETERS UN A NOCEWRITE (6,5000) NSPACE, NG5000 FORMAT('l*** OUTPUT OF RESULTS ***',/,

1 ' ',I2,' COORDINATES, ',12,' PARAMETERS.')DO 1C I = 1,MCALL INDXPT (i,NG, INDEX)WRITE (6,5010) I,(X(1,L),L=1 NSPACE)

1

5010 FORP'AT ( 15, (7(3X,E15.8))10 CONTINUE

RETURNEND

Page 187: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.12 Subroutine WRTELM

SUBROUTINE WRTELM (NE,N,NG NDFREE,NELFRE,00,1

CC OUTPUT, BY ELEMS, OF CALCULATED DEGREES OF FREEDOMCCOP IMPLICIT REAL*8(A—H,0—ZI

DIMENSION CD(NDFREE), INDEX(NELFREI, NOCES(NE,N),1 LNODE(N)

C NE = NO OF ELEMENTS IN SYSTEMC N = NO NODES PER ELEMENTC NG = ND OF PARAMETERS (DOFI PER NLCEC NDFREE = NO DEGREES OF FREEDOM TNC NELFRE = NO DEGREES OF FREEDOM PER ELEMENTC DD = CALCULATED NODAL PARAMETERS LOCHC NODES = NODAL INCIDENCES OF ALL ELEMENTSC INODE = NODAL INCIDENCES OF AN ELEMENTC INDEX = SYSTEM DOF NOS FOR ELEMENT PARAMETERS

WRITE (6,50001 NG5000 FORMAT ('l*** OUTPUT OF RESULTS ***' /

1, ELEMENT NO.. NODE NO.,'13,'00 20 IE = 1 NECALL LNODES dE,NE,N,NODES,LNOOEIDO 10 K 1 NNODE = LNOOE(KJIF ( NODE.LT.1 GO TO 10CALL INL)XPT (NOOE,NG INDEX)WRITE (6,50101 IE, NI3DE, (DD(INDEX(Lfl,L=1,NG)

5010 (15,I8,(6(3X,E15.81) J

10 CCNTINUE20 CONTINUE

RET L RNEND

Fig. 9.13 Subroutine MAXMIN

SUBROUTINE MAXHLN (M,NG,NDFREE IPRINT,RANGE,00,1

CC FIND EXTREME RANGE OF VALUES OF THE NG NODAL DCFCCDP IMPLICIT REAL*8(A-H,O—Z)

DIMENSION ODLNDFREE), RANGE(NG,2i,1 NRANGE(NG 2)

C H = NUMBER OF NODES IN SYSTEMC NG NUMBER OF PARAMETERS (DiJF) PER NOCtC NDFREE = TOTAL NUMBER OF SYSTEM DEGREES CF FREEDCMC IF IPRINT.NE.0 PRINT RANGE OF VALUESC RANGE: 1—MAXIMUM VALUE, 2—MINIMUM VALUEC 00 = ARRAY OF SYSTEM DEGREES OF FREEDOMC INDEX = LIST OF SYSTEM DOE NOS FOR DCF AT NODEC NRANGE = ARRAY OF NODE NQS OF EXTREME VALUE PCINTS

DO 10 ,J 1,NGNRANGE(J,11 = 0NRANGE(J,2) = 0RANGE(J,1) = DD(JI

10 RANGE(J,2) 00(J)CD 40 1 1,MCALL IMDXPT (I,NG,INDEXIDO 30 J = 1 NGDDTEST = DD(INDEX(J))IF ( DDTEST.LT.RANGE(J,1I I GO TC 2CRANGE(J,1) = DOTESTNRANGE(J,1) I

20 IF ( DDTEST.GT.RANGE(J,2) ) GO TC 3CRANGE(J,23 = UDTEST

= I30 CONTINUE40 CONTINUE

IF ( IPRINT.EQ.0 I RETURNC PRINT RANGE CF VALUES

WRITE (6,500015000 FORMAT ('I*** EXTREME VALUES OF ThE NODAL ',

IPARAMETERS ***.,//,2' PARAMETER NO. MAX. VALUE,NCDE3'MIN. VALUE,NODE')DO 50 J = 1,NG

50 WRITE (6,50101 J,RANGE(J,1),NRANGE(J,1j,RANGE(J,2),1 NRANGE(J,2)

5010 FORMAT (11O,2X,E15.8,' • ',I5,2X,E15.8,' , ',15)

END

Page 188: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 9.14 Subroutine CONTUR

SUBROUTINE CLNTUR (M1 ,X,COORC,XPT,00, C, RANGE,2 NODES,LNODE,INDEXJ

CC LIST COORDINATES OF POINTS ON CONTOURS THEC 5TH AND 95TH PERCENTILE CURVES** ************************CDP IMPLICIT REAL*8(A—H 0—fl

CIM€NSIQN COQRD(N,NSPACEJ, CO(NCFREEI,1 D(NELFRE), RANGE(NG,2), XPItNSPACEI2 NODES(NE,N). LNODE(N), 1NDEX(NELFRE

C M NUMBER OF SYSTEM NODESC NG NUMBER OF PARAMETERS PER NODEC NOFREE = TOTAL NO. OF SYSTEM DEGREES OF FREECOMC = NO. OF ELEMENT DEGREES OF FREEDCMC N = NUMBER CF NODES PER ELEMENTC NE = NUMBER OF ELEMENTS IN SYSTEMC NSPACE = DIMENSION OF SPACEC X = COORDINATES OF SYSTEM NODESC COORD = COORDINATES OF ELEMENT NODESC XPT = SPATIAL COORDINATES OF A CONTOUR POINTC 00 = SYSTEM LIST OF NODAL PARAMETERSC 0 = NODAL PARAMETERS ASSOCIATED WITH ELEMENTC RANGE 1—MAX VALUE 2—MIN VALUE OF NODAL DCFC NODES = SYSTEM ARRAY OF ELEMENT INCIDENCESC INODE = ELEMENT INCIDENCES ARRAY CF THE ELEMENTC INDEX = SYS. DOF NOS FOR (N*NG) ELEMENT DOF

WRITE (6,5000)5000 ('l*** CALCULATION OF CONTCLI CURVES ***',/)

IF C NCURVE.L1.2 ) NCURVE 2C——> LOOP OVER PARAMETERS

DO 100 IPAR = 1 NG01FF = — RANGE(IPAR,2)VI = 0.05*DIFF + RANGEUPAR,Z1VNCLR = 0.95*DIFF + RANGE(IPAR,2)WRITE (6,50103 IPAR, VI, VNCUR

5010 FORMAT (5OPARAMETER NUMBER =5,13,1,1 • 5TH PERCENTiLE VALUE = ',E15.8,/2 S 95TH PERCENTILE VALUE = ',E15.8,/J

CLI = NC&JRVE — I00 90 ICUR = l,NCURVERATIO = ICUR — 1RAT IC = RATIO/CitVALUE = Vi + RATIO*(VNCUR — VI)WRITE (6,5020) ICUR, VALUE, NSPAC€

5020 FORtIAT ('OCONTOUR NUMBER = ',IS,/,1 VALUE OF CONTOUR = ',E15.8,/,2 ' PCINT NO.,,13,' COORDINATES')KPOINT = 0

C——> LOOP OVER ELEMENTS00 80 IE = i,NEKALL = 0

C EXTRACT LIST OF NODES ON THE ELEMENTCALL LNODES (IE,NE,N,NODES,LNODE)

C DETERMiNE CORRESPONDING SYSTEM DCF NLMBERSCALL INOXEL (N NELFRE,NG LNODE,INDEXICALL ELFRE 0,00 INDEX3

C FINC SPATIAL COORDINATES NODESC CALL ELCORD (M,N,NSPACE,X,CQQRD,(NIJCE)C——> TEST SIDES OF ELEMENT

DO 70 IPI = 1,NIFIRST = IPTILAST = IPT + 1IF C ZPT.LT.N i GO TO 10IF ( N.EQ.2 ) GO TO 80ILAS! = 1

10 KPARI = NG*(IFIRST—1) 4- IPARKPAR2 = NG*(ILAST—i) + IPAR

=

C——)1) (TEST2 I CC TO 70

KPOINT = KPCINT + 1RAT IC = — TEST1IF ( RATIO 20,30 20

C CALCULATE COORDINATES OF THE CONTCLR PCLI\T20 RATIO = C VALUE—TESTI 3/RATIO30 IF C KALL 1 50,40,5040 CALL ELCORD (M,N,NSPACE,X,COORD,LNOOEI

Page 189: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

180 9. Solution and result output

Fig. 9.14—continued

50 CD 6U = 1,NSPACECl = COORDIIFIRST,ISPACE)C2 = CDORD(ILAST,ISPACE)01FF = C2 — Cl

60 XPT(ISPACEJ = Cl + RATIO*DLFFWRITE

5030 FORI'AT 1 18, (5E1.8.8,/I I

70 CONTINUE80 CCN1INUE90 CCNTD4UE100 CONTINUE

RETURNEND

9.3 Post-solution calculations within the elements

As stated earlier in Section 4.3, if NTAPEI is greater than zero thisimplies that problem-dependent calculations are to be performed in eachelement after the nodal parameters have been calculated. These post-solution calculations are under the control of subroutine POST, which isshown in Fig. 9.15. Its argument includes the following quantities:

NTAPEI = unit on which ELPOST stored the post solutionelement data;

NE = total number of elements;N = number of nodes per element;NELFRE = number of element degrees of freedom;NDFREE = total number of system degrees of freedom;NODES(NE, N) = element incidences lists for all elements;DD(NDFREE) = calculated array of nodal parameters; andNTAPE2—4 = optical scratch units (if > 0).

For every element in the system, subroutine POST extracts the list ofnodes on that element, and the nodal parameters, D, associated with theelement. It then calls the problem-dependent subroutine POSTEL. Thelatter routine is furnished the element number, NTAPEI, NELFRE andthe nodal parameters, D(NELFRE), associated with the element. Sub-routine POSTEL reads the necessary problem-dependent data (generatedby ELPOST) from NTAPE1, combines these with the nodal parameters,D and calculates additional quantities of interest within the element. Theseproblem-dependent quantities are usually printed along with the identifyingelement number, IE.

Page 190: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

9.4 Exercises 181

Fig. 9.15 Subroutine POST

SLJBRC.UT INE POST tNTAPEI1 NODEStLNODE,LNDEX,DU,D,LPRGP,2

CC ELEMENT LOOP FOR POST SOLUTICI\ CALCULATICNSCCOP R€AL*8 (A—H,O—Z)

DIMENSION Dtj(NDFREEJ, Nt,OcSINE N),1 LNODE(N1, IN0EX(NELFREI LPRCP(IJ

C NTAPEI uNIT FOR POST SOL MATRICk SICRAGEC NE = NUMbER OF ELEMENTS IN SYSTEMC N = NUMBER CF NODES PER ELEMENTC = NUM8ERS PARAMETERS PER NODEC NEIFRE = NUMbER OF DEGREES OF FREEDOM PtR ELEMENTC NOFREE = TOTAL NUMBER OF SYSTEM DEGREES CF FREEDCMC NODES = ELEMENT INCLOENCES OF ALL E1EMEF'41SC LNOOE = THE N ELEMENT INCIDENCES CF THE ELEMENTC INDEX = SYSTEM DOF NOS ASSOCiATED hITt-4 ELEMENTC DD = ARRAY OF SYSTEM DEGREES OF FREEDOMC C = OF ELEMENT DEGREES OF FREECCMC NTAPEZ,3,4 CPTIONAL UNITS FOR USER (WHEN > 0)C IT = CUPtRENT ITERATiON NUMBER, NLTER = MAX ITC N = TOTAL NUMBER OF NODES

REWIND NTAPEIC——> LOOP ELEMENTS

00 10 IE 1,NEC EXTRACT ELEMENT'S NODES

CALL LNOOES (LE NE,N NODES LNOOE)C EXTRACT NODAL PARAMEfERS THE ELEMENT

CALL INUXEL (N,NELFRE,NG,LNOOE,INCEX)CALL ELFRE (NDFkEE,NELfRE,O,OD,INOEXI

C——> PERFGRM PROBLEM DEPENDENT CALCULATIONS AND OUTPUTCALL POsTEL (NTAPEI,NELFRE,u,IE,NTAPE2,NTAPE3,

1 NTAPE4, IT,NITER,NE,10 CONTINUE

PET UEND

9.4 Exercises

1. Modify the storage array pointers so the system unknowns, D, are storedin the old forcing function locations, C.

2. Use Fig. 9.2 to verify the indentities of Figs. 9.3(a), 9.4(a), and 9.5(a).3. Program Eqns. (9.8), (9.9), and (9.10) for a matrix stored in standard

full symmetric form.4. Solve the equations in Fig. 9.6(a) by Gauss elimination.5. Resolve the system in Fig. 9.6 if CT = [1 0 4 3].

Page 191: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 192: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10

One-dimensionalapplications

10.1 Introduction

The simplest applications of the finite element method involve problemswhich are independent of time. The general programming considerationsof this class of problems were presented in detail in the first four chapters.At this point one is ready to consider the programming of the problemdependent subroutines associated with the application of interest. Thefollowing sections will present several representative examples of theapplication of the finite element method to steady state problems.

Generally an element which can be defined by a single spatial variablein the local coordinates is relatively simple to implement. Thus, the typicalillustrative applications begin with this class of element. This, of course,does not mean that the global coordinates must also be one-dimensional.For example, a set of one-dimensional truss elements can be utilized toconstruct a three-dimensional structure.

10.2 Conductive and convective heat transfer

The text by Myers [56] presents a detailed study of heat transfer analysisfrom both the analytic and numerical points of view. Several examples aresolved by finite difference and finite element methods as well as by analytictechniques. All three methods were applied to the problem to be illustratedin this section. Consider the heat transfer in a slender rod, illustrated inFig. 10.1, that is insulated at x = L, has a specified temperature, t0, atx 0, and is surrounded by a medium with a temperature of 0, The

183

Page 193: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

1 10. One-dimensional applications

temperature, t(x), in this one-dimensional problem is governed by thedifferential equation

d2t(10.1)

and the boundary conditions

t(0) =

dxwhere

A = cross-sectional area of rod,h = convective transfer coefficient,K = thermal conductivity,L = length of rod,P = perimeter of cross-section,

t = temperature, andx = spatial coordinate.

The exact solution for this problem is t(x) = cosh[m(L — x)]/cosh(mL)where m2 = hP/KA. Myers shows that an integral formulation can beobtained by rendering stationary the functional

= JJL [(&)2+ hPt2] dx, (10.2)

subject to the boundary condition t(0) = t0. The boundary conditionimposed at x = 0 is an essential boundary condition. The second boundarycondition is automatically satisfied, and is known as a natural boundarycondition. Of course, if a second temperature had been specified at xL, it would have taken precedence over the natural boundary conditionat that end. The reader may wish to verify that applying the weightedresidual method of Galerkin and integrating the first term by parts yieldsan identical formulation. Assuming a linear element, as shown in Fig. 10.2,in any element the interpolation functions are known to be

tc(X) M(x)

whereM(x) = [1 x},

1 rx• —x.I I

iL—i 1

T1]

Page 194: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.2 Conductive and convective heat transfer 185

and / = (x1 — x,) denotes the length of the element. That is, f(x) is afunction of an assumed spatial variation, M(x), the element geometry,and the element's nodal temperatures, This can be expressed in asimpler form (see Fig. 1.4) here as

te(x) = He(x) Te, (10.3)

whereHe(x) = M(x) = [(x — x)/l (x — x)/1J

is called the element interpolation matrix. Myers shows that the elementsquare matrix for this element, Se, can be defined as

se= (IA + hePeHeTHe) dx (10.4)

lix lix

which reduces tose =

where

= —

Lsym. — +

if the properties are assumed to be constant within the element. In thisproblem there is no element column matrix. The above expressions couldeasily be programmed to generate Sc. However, physical intuition suggeststhat the conduction terms involving K should be inversely proportional to1 and the convective part directly proportional to 1. For this simple problemthe above product can be evaluated in closed form and it reduces to

+ ACKC/1) — ACKdII)1Sc = I (10.5)

Lsym. +

which is the form that is utilized in subroutine ELSQ which is shown inFig. 10.3. This simple expression is all that is required to generate theequations necessary to solve for the nodal temperatures.

Generally, one is also interested in other quantities that can be evaluatedonce the nodal temperatures have been calculated. For example, one mayneed to perform a post-solution calculation of the heat lost through con-vection along the length of the bar. Myers shows that the convective heatloss, dq, from a segment of length dx is dq = HPt dx. Thus, the loss froma typical element (with constant properties) is

(XI (XI

= jdq =

ite dx

Xi JXi

Page 195: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

186 10. One-dimensional applications

or simply= QceTe (10.6)

whereQce = 1].

The simple matrix, QCe, can be generated at the same time as se and storedon auxiliary storage for use after the nodal temperatures, are known.The matrix is generated and stored by subroutine ELPOST. It isretrieved and multiplied by TC in subroutine POSTEL which calculates andprints for each element. The latter two problem-dependent routinesare shown in Figs. 10.4 and 10.5, respectively.

The above equations were derived by assuming constant propertieswithin each element. In some practical applications, one or more of theproperties might vary along the length of the bar. The above element couldstill be utilized to obtain a good approximation by assuming averageproperties over the element. This could be accomplished by defining thevariable properties at each node and inputting them as nodal properties.For each element the program would then automatically extract the proper-ties associated with the element's nodal points (array PRTLPT) and passthose data to subroutine ELSQ. One could then use the average of thetwo nodal properties, e.g. instead of A = ELPROP(1) set A =0.5(PRTLPT(1,1) + PRTLPT(2,1)).

A more accurate approach would be to integrate Eqn. (10.2) numericallywith due consideration for the variable properties. The variation of theproperties could be approximated by assuming, for example, thatVALUES(x) = He(x) PRTLPT, where VALUES denotes the four propertiesof interest within the element. Recall that the latter operation is carriedout by subroutine CALPRT, which was presented in Section 5.3.

As a numerical example consider a problem where A = 0.01389 ft2,h = 2.0 BTU/h ft2 °F, K = 120 BTU/h ft °F, L = 4 ft, P = 0.5 ft and t0 =10°F. Select a mesh with eight nodes (M = 8), seven elements (NE = 7),one temperature per node (NG = 1), two nodes per element (N = 2), andfour floating point properties per element (NLPFLO = 4). This one-dimen-sional problem, shown in Fig. 10.6, involves homogeneous element proper-ties and a null element column matrix (NSPACE = 1, LHOMO = 1,

NULCOL = 1). Since data are to be stored by subroutine ELPOST onNTAPE1, assign unit eight for that purpose (NTAPE1 = 8). The abovefour properties could also have been stored as miscellaneous system proper-ties. Since node 1 is at x = 0, it is necessary to define the first (and only)parameter at node ito have a value of 10.0. The input data for this problemlisted in Fig. 10.7 should be compared with the formats given in the

Page 196: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.2 Conductive and convective heat transfer 187

Appendix. The output data from the MODEL code are shown in Fig. 10.8.The calculated and exact values are compared in Fig. 10.6. Table 10.1 liststhe configuration options of the MODEL code used in the present problem.

FIg. 10.1 Heat transfer is a slender rod

I 2 i

1*— Si

(0) typical linear element

,,x)ix

(b) Element interpolation functions

A

f:

Fig. 10.2 A linear element model

insulated

L

I Mx

x

Page 197: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 10.3 Subroutine ELSQ

SUBRCUTINE ELSQ1

2 APEI,NTAPE2,NTAPE3,NIAPE4)** ********** **** **t* **l'***C GENERATE ELEMENT SQUARE MATRiXCCOP IMPLICIT REAL*8(A—H,C—Z)

CIMENSION COORD(N,NSPACE), DINELFRE), ELPRCP(KP2),1. LPROP(JP2),2 PRTLPT(1P5,KP1), FLTMIS(KP3I

C N NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 NUMBER OF ROWS IN ARRAY PRILPTC JP2 NUMBER OF COLUMNS IN ARRAYS LPFIX AND IPROPC KP1 = NUMBER COLUMNS IN FL1NP 6 PRTLPT 6 PTPROPC KP2 = NUMBER OF COLUMNS IN ARRA'YS FuEL AND ELPRCPC KP3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORD = SPATIAL COORDINATES OF ELEMENT'SC D = NODAL PARAMETERS ASSOCiATED WITH AN ELEMENTC ELPRCP = ELEMENT ARRAY OF FLOATING PT PRCPERTIESC IPROP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NODESC FITMLS = SYSTEM STORAGE OF FLOATING FT MISC PROPC S = ELEMENT SQUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 0)

CC ELSQ PROBLEM DEPENDENT STATEMENTS FOLLCW ***CC APPLICATION: (ME—DIM. STEADY STATE HEAT TRANSFERC REFER: MYERS, ANAL. METH. IN CONO. HEAT TRANSFERC NSPACE=I, N=2, NG=1, NELFRE=2

/ELARG/ XIJ, TOTAL,C ELPROP(11 CROSS—StCTIONAL AREA, ELPROPL2)= PERIMETERC ELPRCP(31 THERMAL CONDUCTIVITYC €LPROP(4) = CONVECTIVE LOSS COEFFiCIENT

AK ELPROP(L)*ELPROP(3kPH = ELPROP(21*ELPRQP(41XIJ = COORDt2,fl — COORD(1,l1S(l,I) = AK/XIJ + PH*X!J/3.S(1,2) = —AKJXIJ + PH*XIJ/6.S(2,I) = 5(1,2)S(2,2) S( 1,11RET U RNEND

Fig. 10.4 Subroutine ELPOST

SUBRCUTINE ELPOST (NTAPEI,NTAPE2,NTAFE3,NTAPE4)CC GENERATE DATA FOR POST SOLUIICN CALCULATICNSC ** ************************CDP IMPLICIT REAL*8(A—H,O—Z)C NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 0)

C . •... •ee..C *** ELPOSI PROBLEMC . •t.See.eC——> GENERATE CONVECTIVE HEATC APPLICATION: ONE—DIM. STEADY STATE HEAT TRANSFERC REFER: MYERS, ANAL. METH. IN CONC. HEAT TRANSFER

COMMCN /ELARG/ PH, XIJ, TOTAL, C(1,2), CC(1)Q(1.11 = O.5*PH*XIJQU,2) = 0.5*Pè-l*XIJWRITE (NTAPE1) QRE Tt. RNEND

Page 198: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 10.5 Subroutine POSTEL

SUBRCUTINE POSTEL (NTAPEI,NELFRE,D,IE,NTAPE2,1 NTAPE3,NTAPE4,IT,NITER,NE,M)

C ** ************** **********C ELEMENT LEVEL POST SOLUTION CALCULATICNSC

** ************* *** *** * ** **C NTAPEI = UNIT FOR POST SOLUTION MATRICES SICRAGEC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC C = NODAL PARAMETERS ASSOCIATED WITH THE ELEMENTC IE = ELEMENT NUMBERC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USEO W)-EN ) 0)C IT = CURRENT ITERATION NUMBERC NITER = MAXIMUM NUMBER OF ITERATICNSC NE = TOTAL NUMBER OF ELEMENTSC = TOTAL NUMBER OF NODESCOP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION D(NELFRE)

C .. S... •••C *** POSTEL PROBLEM DEPENDENT STATEMENTS FOLLOW ***C ... . .e .C APPLICATION: ONE—DIM. STEADY STATE HEAT TRANSFERC CALCULATE CONVECTIVE HEAT LOSS BY ELEMENTC REFER: MYERS, ANAL. METH. IN CONC. HEAT TRANSFER

COMMCN /ELARG/ PH, XIJ, TOTAL, QC(1)CATA KALL /1/IF ( KALL 1 10,20,10

C——> SET CCNST, PRINT TITLES ON FIRST CALL10 WRITE (6,5000)5000 FORMAT I'O** CCNVECTIVE HEAT LOSS**',//,

1' ELEMENT LOSS TOTAL')KALI = 0TOTAL = 0.0

20 CCNTINUEC——> FIND ELEMENT LOSS

REAC CCALL MMULTTOTAL = TOTAL + QC(1JWRITt (6,50101 IE

5010 FORfrAT ( 17, 2E16TOTAL

RETIRNEND

Page 199: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.6 Results for the slender rod; (a) temperature distribution, and (b) convectiveheat loss

I—

8

6

O Finite element— Exoct

4

2

(0)

0

0

Element •Node 1 2 3 4

0 1 2 3 4

x, ft

5 6

©7 8

14

12

10

8

4

6

(b)

O element

— Exact

00 1 2 3 4

x ft

Page 200: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.7 Input data, one-dimensional heat transfer in a &ender rod

HEAT TRANSFER IN A SLENDER PCI) SPACES),8,7, 1,2,1,0,0,0,0,0,0,0,0,0,4,0,0,0,1 ,0,O,8,0,0,0

2 0 0.253 0 0.54 0 1.05 0 1.56 0 2.07 0 3.08 0 4.0

1 1 22 23 3 44 45 5 66 6 77 7 81 1 10.0

,1 0.01389 0.5, 120., 2.0

FIg. 10.8 Output data, one-dimensional heat transfer in a slender rod***** PROBLEM PARAMETERS *****NUMBFP OF NODAL POINTS IN SYSTEM =... . 8NUMBER OF ELEMENTS IN SYSTEM — . 7NUMBER OF NODES PER ELEMENT .. .. 2NUMBER CF PEP NOOF = .......

OF SPACE ••••OF W1114 0

NUMBER OF NODES ON BOUNDARYNUMBER OF FIXEC PT PROP PER 'IO1)E =.NUMBFR OF PT PROD PER =....... 0NUMBFR JF FIXED PT PROP FLEMrNT = . 0

OF PT PROD =.... 4NUMBER OF FIXED PT MISC PR(1P = .... 0OF FLOATING PT MISC =........... 0

ELEMENT PRUPEPTIFS ARE HOMOGENEOUS.OPTIONAL UNIT NUMBERS (UTIII7rD IF > 0)

MTAPE2=0 NTAPE3=0MODAL PARAMFIERS TO BE LISTEO BY NOOEcNODAL PARAMETERS TO BE LISTEr' BY

NODAL PC!NT 0474 ***MODE, CONSTRAINT INDICATOR, CCORD!NATES

1 1 0.010C8

4 0 1.0000c o i.cooo

0 2.00008

*** DATA setELEMFNT NO., 2

1 1 22 2 11 3 44 4 55 5 6A 6 7T 7 8

*S* NODAl. PARAMETER CONSTRA'NT *5*CONSTRAINT NUMBER CF

TYPE EQUATIONSt 12 03 0

*** CONSIPAINT EOUATIDN DATA *5*

Page 201: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.8—continued

CONSTRAINT TYPE ONEEQ. NO. NOOF1 PARt Al

1 1 1

*** FLFMENT PRCPERTIFS ***ELEMENT Nfl. PROPERTY NO. VALUE

1 1 ').1389000OF—O11 21 31 4

END OF FLOATING PT PROPERTIES OF ELEMENTS

EQUATION HALF BANOW!OTH =... 2AND OCCURS IN ELEMENT NUTMBE° 1.CONSTRAINT HALF BANOW!DTH=.. .MAXIMUM HALF BANDWIDTH OF SYSTEM = .TOTAL NUMBER CF SYSTEM EOJATIi1NS — 8NUMBER OF ELEMENT DEGREES OF VRFcIWM ... 2

**t OUTPUT OF RESULTS ***NODE, 1 COORDINATES, 1

l O.00000000E+OO2 O.25000000E+OO3 O.50000000E#OC)4 0.I0000000E+Ol6 O.L5000COOE+Ot

O.20000000E.OL7 O.3000C000E+O1 O.11321q30c.O1R O.40000000E+Ol O.849!6429E+OO

*** OUTPUT OF RESULTS ***ELEMENT NO., NODE NO., 1. PAPAMFTrRS

I I Q.I0000000F+O?1 2 O.82384766E+O12 2 o.82384766F+Ol2 3 O.67878143r+O13 1 O.67878141F+'It1 44 44 5 O.31496384F+0I6 5 O.31496384E+O15 6 O.21699524F+O16 6 O.21699524F.O16 7 O.1L321939EeOI7 7 O.1132193QE+CU7 8 O.84916429E+OO

** HEAT LOSS**ELEMFNT LOSS TOTAL

I O.22798C96E+O1 O.22798096E+O1O.18182864E+O1 O.41580°60E+O

3 O.28504147E#O1 O.70085106E#O4 Q.19408707E+O16 O.13298617E+O1 O.10279279E+026 O.1651e732E.Ot O.11930157E+027 O.99067911E+O0 O.12921031E+02

NORMAL ENDING OF MODEL PROSRAM.

Page 202: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.3 Plane truss structures 193

Table 10.1 Parameter Definitions for One-dimensional Heat Transfer

CONTROL:NSPACE=1 NLPFLO=4N=2 NULCOL=1NG=1 NTAPE1=8

DEPENDENT VARIABLES:1 = temperature, t

PROPERTIES:Element level:

Floating point:1 = cross-sectional area, A2 = perimeter of cross-section, P3 = thermal conductivity, K4 = convection coefficient 0), h

CONSTRAINTS:Type 1: specified nodal temperatures

POST-SOLUTION CALCULATIONS:1 = element convective heat loss, q

10.3 Plane truss structures

A truss structure is an assemblage of bar members connected at theirend points by smooth pins. Most texts on structural analysis present adetailed analysis of the simple truss element. The element equations pre-sented here were taken from the first finite element text by Zienkiewicz[82] and will be checked against a simple example presented in the text byMeek [52]. The truss element is a one-dimensional element that can beutilized in a one-dimensional global space to solve problems involvingcollinear force systems. However, this is of little practical interest and oneis usually more interested in two- and three-dimensional structures.

Consider a two-dimensional truss constructed from the one-dimensionalbar elements. Let the bar go from point ito point j and thus have directionangles from the x- and y-axes of and respectively. Let the bar, oflength L, have a cross-sectional area, A, with a moment of intertia, I, anda depth of 2d. The bar has a modulus of elasticity, E, and a coefficient ofthermal expansion, a'. The displacement at each node has x- and y-com-ponents of u and v, respectively so that the element has four degrees offreedom.

if one orders the four element degrees of freedom as =

Page 203: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

194 10. One-dimensional applications

Zienkiewicz [82] shows that the element square matrix (or stiffness matrix)is

cxx cxy —cxx —cxy

(10.7)L —cxx —cxy cxx cxy

—cxy —C)))' cxy cyy

where cxx =cos2 cxy = cos and cyy = cos2 The elementcolumn matrix (or load vector) can have several contributions. If theelement is restrained and undergoes a temperature rise T then

— cx

— cyCe=EAtthT , (10.8)cx

cy

where cx = cos and cy = cos Similarly, if there is a uniformly appliedline load, p, acting to the right as one moves from point ito point j, thenthe statically equivalent nodal loads are

cy

. (10.9)2 cy

— cx

Loads externally applied at the node points would be considered as initialcontributions to the system column matrix. If only external loads are ineffect, then the element column matrix is null. In summary, the problemunder consideration is two-dimensional (NSPACE 2) and involves anelement with two nodes (N = 2), two displacements per node (NG = 2)and seven (A, E, r, p, I, d) possible element properties(NLPFLO = 7). A typical truss element is shown in Fig. 10.9.

After the displacements, &e, have been calculated, the post-solutionstress calculations can be performed. The stresses at the mid-section onthe right (a1) and left (a2) sides (going from i to j) are

E — CX — Cy—cx cy pL2d 1 1

t— }_EcthT{

},(10.10)

a2 L cx cycxcy 81 1 1

where a negative stress denotes compression. A word of caution should

Page 204: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.3 Plane truss structures 195

be mentioned in the presentation of this element. A derivation of the trusselement considers only the axial effects of applied loads. The effects of thetransverse line load, p. are handled in a special way. First, the force effectsare simply lumped at the nodes by inspection. Secondly, the calculatedbending stresses are obtained from elementary beam theory and not fromfinite element theory. These bending effects are available in finite elementmodels which utilize six degree of freedom frame elements (see Section10.6).

As a specific example, consider the problem in Fig. 10.10 which wassolved by Meek (521. It has six nodes (M = 6), eleven elements (NE = ii)with homogeneous element properties (LHOMO = 1), and no elementloads due to pressures or temperature changes (NULCOL = 1). At node1 both displacements are zero and at node 6 the y-displacement is zero.There is a negative externally applied y-load of 10 kips at node 3 (thusINSOLV = 1). The properties are assumed to be A = 1 in2, E = 30,000ksi, = AT = p = 0.0, 1 = in4 and d = 0.5 in. The problem dependentsubroutines are shown in Figs. 10.11 to 10.14. The input data are shownin Fig. 10.15 and the MODEL output in Fig. 10.16. The calculated dis-placements and stresses are much more accurate than the solution givenby Meek.

If one wanted to check joint force equilibrium and determine thesupport reactions, one would have to multiply the original system stiffnessmatrix by the calculated nodal displacements. To accomplish this, it wouldbe necessary to store the original system square matrix on auxiliary storageand recall it after the displacements are known. A subroutine, BANMLT,for executing the multiplication to find the resultant joint forces is shownin Fig. 10.17. One could easily obtain the member forces in subroutinePOSTEL by multiplying the area by the stress resulting from the thermaleffects and deformation of the member. Referring to Table 10.2, one findsthe list of options used for this element.

As a second simple example, consider a single element with the sameproperties except that p = 0.005 kip/in. As shown in Fig. 10.18, the bar ispinned at the left end (i.e. u1 = = 0) and has an inclined roller at theright end. The latter condition represents a Type 2 constraint of the form3u2 — 4v2 0, which requires the right end to move tangentially to theinclined plane of support. The data and output are shown in Fig. 10.19and 10.20. The calculated stresses agree with the results from elementarybeam theory and the displacements at node 2 satisfy the specified constraint.In this case, element loads are present (NULCOL = 0) and no externalnodal loads are specified (ISOLV = 0).

The Type 2 constraints could have been handled differently. Since bothparameters occurred at a common node, the constraint could have been

Page 205: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

196 10. One-dimensional applications

applied at the element level by subroutine MOD2FL. However, pro gram-ming changes would have been required; for example, one could haveassigned an integer property to each node that would indicate when aconstraint, that can be applied at the element level, occurs at that node.

Fig. 10.9 A typical truss element

y

b

FIg. 10.10 Sample truss problem; (a) mesh and (b) calculated member forces

2.735

(a)

2.735 2.735

3.204 3.204

4.531

(b)

4.5313.867

f3.867

2.265 < — 2.265

10.0

Page 206: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.11 Subroutine ELSO

SUBROUTINE ELSQ (N1 KP3 COOAO,D,LLPROP LFRtP1PRTLPT,FITMIS,2 S,NfAPE1,NTAPE2,NTAPE3,NTAPE4)

CC GENERATE ELEMENT SQUARE MATRIX** ********** ******** **** **CUP iMPLICIT REAL*8(A—H 0—fl

DIMENSION D(NELFRE), ELPRCP(KP2),I LPRCP(JP2), S(NELFHE,NELFRE),2 PRTLPT(1P5,KPfl, FLTMIS(KPiI

8F DEGREES OF FREEDOM PERC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFLX AND LPRCPC KP1 NUMBER OF COLUMNS IN FLTNP PRILPT £ PTPRCPC KP2 = NUMBER OF COLUMNS IN ARRAYS FL1EL AND ELPRCPC KP3 = NUMBER OF COLUMNS IN AkRAYC COORD = SPATIAL COORDINATES OF ELEMENT'S NCOESC 0 = NODAL PARAMETERS ASSOCIATED wITH AN ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PT PRCPERTIESC LPRCP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP FOR NCDESC FLTMIS = SYSTEM STORAGE CF FLOATING PT MISC PRCPC S = ELEMENT SQUARE MATRIXC NTAPEI UNIT FOR POST SOLUTION MATRiCES STORAGEC NTAPt2,3,4 = OPTIONAL UNITS FÜR USER (USED > DIC *** ELSQ PROBLEM DEPENDENT STATEMENTS FGLLCM ***C ..C APPLICATION: ANALYSIS OF A TWO—DIMENSIONAL TRUSSC ZIEM(IEWICZ, F.E.M. IN STRUCTURAL £ CONTIMJUM MECH.C NG = 2 N = 2, NSPACE = 2, NLPFLC 7C ELPPtJP(Ii = AREA, ELPROP(21 = OF ELASTICITYC ELPROP(31 = TEMP RISE, ELPROP(q) = CCE(- EXPC ELPPCP(51 = LINE LOAD, ELPROP(6) = MCMENT CF INERTIAC ELPROP(71 = HALF DEPTH OF BAR

CGMMCN /ELARG/CDP SQRT(Z) = DSQRT(Z)

= COORD( 1,1)XJ = COORO(2,1)VI = COORO(1,21VJ = COORD(2,21A = ELPROP( 11E = ELPROP(2)T = ELPROP(31AL = ELPROP(41P = ELPROP(51B! = ELPROP(61if ( BI.LE.O..O I BI = 1.0BD = ELPROP(7)IF I BD.LE.O.O ) BD = 1.0

C——> FIND BAR LENGTH AND DIRECTION COSiNESDX = XJ—XiDV = YJ—YIBARL SQRT( DX*DX + DV*OYCX = DX/BARLCV = DY/BARL

C——> FINC 1—0 STIFFNESS, KE*A/LSTIF = E*A/BARL.

C——> TRANSFORM TO 2—0 STIFFNESSCXX = CX*CXCXV = CX*CYCYY = CY*CYS(1,1) = STIF*CXXS(1,2j = STIF*CXYS(1,31 = —STIF*CXXS(1,41 = —STIF*CXYS(2,lI = STIF*CXYS(2,21 = STIF*CYYS(2,3) = —STIF*CXYS(2,41 = —STIF*CYYS(3,1I —STIF*CXXS(3,21 = —STIF*CXYS(3,3) = STIF*CXXS(3,41 = STIF*CXY5(4,1) = —STIF*CXVS14,21 —STIF*CYYS(4,3) = STIF*CXYS(4,43 = STIF*CYYRET RNEND

Page 207: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.12 Subroutine ELCOL

SUBROUTINE ELCOL (N,NELFRE.NSPACE.1P51JP2,KPI,KP2,1 KP3 CBORD,D,ELPROP,LPRCP,PKTLPT,FLTMIS,2 C,NIAPE 1,NTAPE2,NTAPE3,NTAPE4)

CC GENERATE ELEMENT COLUMN MATRIXCCDP IMPLICIT REAL*8(A-r+4 0—i)

DIMENSION COORD(N D(NELE-REI, ELPRCP(KP2),1 C(NkFRE,J, PR1LPT(1P5,KPI)2 FLTMIS(KP3)

C N = NUMBER NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLP1C JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPC KPI = NUMBER OF COLUMNS IN FLTNP PRTLPT PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL ANC ELPROPC KP3 NUMBER OF COLUMNS IN ARRAY FLI?41SC COORD = SPATIAL COORDINATES OF ELEMENT'S NODESC 0 = NODAL PARAMETERS ASSOCIATED WITH A ELEMENTC ELPRCP = ELEMENT ARRAY OF FLOATING PCINT PROPERTIESC LPROP = ARRAY CF FIXED POINT ELEMENT PROPERTIESC PRTLPJ = FLOATING POINT PROP OF ELEMENT'S NODESC FLTMJS = SYSTEM STORAGE OF FLOATING PCJNT MISC. PROPC C = ELEMENT COLUMN MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USEC > 0)C 4• .C *** ELCOL PROBLEM DEPENDENT STATEMENTS FCLLOW ***C .. •4• S •S.••*I*S.•S.•C APPLICATION: ANALYSIS OF A TWO—DIMENSIONAL TRUSSC ZIENKI[WICZ, F.E.M. IN STRUCTURAL C CONTINLUM MECH.C NG = 2 N = 2 NSPACE = 2, NLPFLC = 7C ELPRCPLII AREA, ELPROP(2) MOD&,LUS CF ELASTICITYC ELPROP(3) = TEMP RISE, ELPROP(4) (CEF THERMAL EXPC ELPROP(51 = LINE LOAD, ELPROP(6) = ?4CMENT CF INERTIAC ELPROP(7) = HALF DEPTH OF BAR

CCMMCN /ELARG/ CX,CY,A,E,T,AL,P,DI ,BD, EARLDO 10 1 = 1,4

10 C(I) = 0.0C CHECK FOR P=O AND DTO (NO ELEMENT LOADS)

IF ( .ANO. ) RETURNC——> INITIAL STRAIN EFFECTS F = E*A*ALPHA*DT

IF ( T.EQ.0.O I GO TO 20F = E*A*AL*TCU) = —CX*FC(21 = —CY*FC(3) = CX*FC(4) = CY*F

20 CONTINUEC——> LINE LOAO EFFECTS F = O.5*p*L LPCS TO R , I TO .J

IF ( P.EQ.O.O I RETURNF = O.5*P*BARLC(1) = C(li + CY*FC(2) = C(2) — CX*FC(3) = C(31 + CY*FC(41 = C(41 — CX*FRETURNEND

FIg. 10.13 Subroutine ELPOST

SUBROUTINE ELPOST (NTAPEI,NTAPE2.NTAPE3,NTApE4)CC GENERATE DATA FOR POST SOLUTICN CALCULATICNSCCOP IMPLICIT REAL*8(A—H,O—Z)C NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN ) 01C S...... •..C *** ELPOST PROBLEM DEPENDENT FCLLCW **S

C APPLiCATION: ANALYSIS OFATWO IAC ZIENKIEWICZ, F.E.M. IN STRUCTURAL £ CONTINUUM MECH.C NG = 2, N = 2. NSPAC€ = 2, NLPFLC 7

Page 208: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.13—continued

C ELPRCP(1) = AREA, ELPROP(2) = MODULUS OF ELASTICITYC = TEMP RISE, ELPROP(4) = COEF THERMAL EXP

C ELPROP(5) = LINE LOAD, = MCNENT CF INERTIAC ELPFCP(7) = HALF DEPTH OF BAR

COMMON /ELARG/ ,aD,EARLCCMMCN /ELARG2/ SIGD(2,4),SIGPI2J,SIGTL2),SIG(2)

C—--> FORM STRESS—DISPLACEMENT MATRIXEDI = E/BARLSIGDU,1i = —EDL*CXSICC(1,21 = —EUL*CYSIGC(1,31 EDL*CXSIGC(1,41 = EDL*CYSIGD(2,li = —EDL*CXSIGC(2,2J = —ED1*CYSIGC(2,3) EDL*CXSIGO(2,41 = EOL*CY

C——> BENCING EFFECTS = P*L*L*D/B*ISIGP(1) = O.125*P*BARL*BARL*BD/BISIGP(21 = —SIGP(11

C——> FORM THERMAL EFFECT = —E*ALPHA*DTSIGT(1J = —E*AL*TSIGH2J = SIGTUJ

C——> STORE DATA CN NTAPEI FOR USE PCSTELWRITE (NTAPEII STGD,SIGP,SIGTRET IEND

FIg. 10.14 Subroutine POSTEL

SUBROUTINE PCSTEL (NTAPEI,NELFRE,O,l E1NTAPE2,1

CC ELEMENT LEVEL POST SOLUTION CALCULATICNSCC NTAPE]. = UNIT FOR POST SOLUTION MATRICES STCRAGEC NELFRE = NUMBER OF DEGREES CF FREEDOM PER ELEMENTC 0 NODAL PARAMETERS ASSOCIATED WITH THE ELEMENTC IE = ELEMENT NUMBERC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WhEN > 0)C IT = CURRENT ITERATION NUMBERC NITER = MAXIMUM NUMBER OF ITERATICNSC NE = TOTAL NUMBER OF ELEMENTSC = TOTAL NUMBER OF NODESCOP IMPLICIT REAL*8 (A—H,O—Z)

DIMEI\SIGN D(NELFREIC .. . ........ . .. .C *** POSTEL PROBLEM DEPENDENT STAIEHENIS FCILCW ***C . .. .C APPLiCATION: ANALYSIS OF A TRUSSC ZIENKIEWICZ, F.E.M. IN STRUCTURAL 1. CONTINUUM MECH.C NO = 2, N = 2, NSPACE = 2, NLPFLG = 1C ELPROP(1I = AREA, ELPROP(21 = MODULUS OF ELASTICITYC ELPROP(3) = TEMP RISE, ELPROP(4) = COEF THERMAL EXPC ELPRCP(51 = LINE LOAD, ELPROP(6) = MCMENT CF INERTIAC ELPPGP(7) = HALF DEPTH OF BAR

COMMCN /ELARG/ CX CV A,E,T,AL,P,B1,BD,OARLCCMMON /ELARG2/CATA KODE/1/IF ( KODE.EC.O J GO TO 10KODE = 0

C——> WRITE STRESS HEADINGSWRITE (6,10001

1000 FORMAT (IHI,8X,'E L E M E N T S I R E S S E S',//,A' ELEMENT $10 SECTION STRESS AT:',/,B' NUMBER RIGHT LEFI',/1

10 CONTINUEC——> READ STRESS DATA OFF NTAPEI FROM ELPCST

READ (NTAPEI) SIGD,SIGP,SIGTC———> CALCULATE STRESS, STRESS=SIGD*D

CALL MMULT (SIGD,D,STRESS 2,4,1)C ADD THERMAL AND PRESSURE EFFECTS

STRESS(11 = STRESS(1) + SIGT(11 + SIGPLI)STRESS(2) = STRESS(2) + SI&T(21 + STGP(2)WRITE (6,10101 IE,STRESS

1010 FORMAT i15,7X,2E20.7)RETURNEND

Page 209: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.15 Input data, truss analysis problem

TRUSS ANALYSIS PROBLEM (,=4 SPACES),6 11,2,2,2,0,0,0,0, 1,0,O,0,o,7,0,0,0,t,0,C,8,0,0,0

o.o2 00 0.0 10.0'3 00 10.0 0.04 00 10.0 10.0S CC 20.0 10.06 01 20.0 0.0

1 1 32 3 61 j 24 2 35 1 4

6 1 47 4 68 3 5

5 610 2 411 4 5

1 1 0.C1 2 0.C6 2 0.C

.1 1.0, 30000., 0.,,0.,,0.0, 0.061133 0.51 2 —Ic.6 2 0.0

FIg. 10.16 Output data, truss analysis problem

***** PROBLEM ****tNUMRFR OF NODAL POINTS IN SYSTFWNUMBER CF ELEMENTS IN SYSTEM -NUMBFR CF NCDFS PER ELEMFNT . 2NUMBER OF PARAMETERS PER NODE = . 2OIMENSIDNOFSPACE= 2NUMBER CF BO(ThDARIES WITH GIVEN FLUX- 0NUMBFR OF NODES ON BOUNDAPY SEGM(-NT 0INITIAL FORCING VECTOR TO BE INPUTNUMBER OF FIXED PT PROP PER NODE - . 0NUMBER OF FLOATING PT OFP — 0NUMBFR OF FIXED PT PER CLEMENT 0NUMRFR OF FLOATING PT PRflP PER FLFMFNT .... 7NUMBER OF FIXED PT MISC PRrP — 0NUMBER OF FLOATING PT MISC PROP — 0

ELEMENT PROPERTIES ARE HCMOr,FNECUS.OPTIONAL UNIT NUMBERS (UTILIZED > 0)£ITAPFI=8 NTAPE?=0 NTAPEI=O NTAPF4=ONCOAL PARAMETERS TO BE IISTFD BY NODESNODAL PAPAMETFRS TO BF BY

*** NODAL DATA ***NODE, CPNSTRAIP'1 INDICATOR, 2 COORDINATES

1 ii 0.0000 0.00007 0 0.0000 10.00003 0 10.0000 0.00004 0 10.0000 10.00005 0 20.0000 10.00006 1 20.0000 0.0000

*** DATA ***ELEMENT NO., NODAL INC IDENCES.

1 I .

2 3 63 1 24 2 .

5 1 45 3 47 4 68 3 59 5 6

10 2 4Ii 4 5

*** NOCAL PAPAMETEP CONSTRAINT LIST ***CONSTRAINT NUMBER OF

TYPE EQUATIONS1 32 03 0

Page 210: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.16—continued

*** CONSTRAINI EQUATION DATA **$CCNSTRAJNT TYPE ONE

NC. NCDE1 PAR1 Al1 1 1 .0000C000E#0O2 L 2 .00000000F+O03 6 2 .0000C000FE+CO

*** PRCPFPTIESELEMENT NO. PROPERTY MD. VALUE

1 1 0.I0000000E+Ol1 7 0.300C0000E+051 3 0.°00000000+OO1 4 O.00000000F+O01 5 O.00000000E+OO1 61 1 0.500C0000E+OO

rF PT PROPERTIES CF FIEMENTSEQUATION HALF BANDWIDTH BAND IN NUMBFP 7.

HALF BANDWIDTH=.. 1MAXIMUM HALF SYSTEM = PTCTAI NUMBER CF SYSTEM EQUATIONS = .. 12NUMBER OF ELEMENT DEGREES OF FPFFDDM =... 4

*** INITIAL FCRCING VECTOR DATA ***NODE PAPAMFIEP VALUE DOF

3 2 —O.I0000000E+02 66 2 O.00000000E400 I?

*** OF RFSUITS ***NCOF, 2 COORDINATES, 2 PARAMETERS.

I O.OOF+OO O.0000F400 —O.1231E—142 O.OOE+CO O.IOE+02 0.16666—02 —O.9115E—033 O.IOE+02 O.OOE+OO C.7551E—01 —O.4401E—0?4 O.1OE+C2 O.IOE+02 —0.2890E—025 C.1OE+02 —O.1563E—03 —C).9115E—036 O.20F+02 C.COE+OC 0.1510E—C? —O.1231F—14

*** OUTPUT OF RESULTSNO., NCCF NO., 2 PARAMFTCPS

1 1 C.00000000F+OC —O.12313269E—141 3 O.75513640r—03 —0.44012575F—O22 3 C.75513640E—O1 —O.44012575E—027 6 O.151027?BF—O? —O.12313769E—141 1 C.COC00000F+OC) —0.1?313269E—141 2 —0.Q1151028E—O34 2 —O.91153028E—034 3 O.75513640F—03 —O.44012515E—025 1 0.00000000FI-0O —0.121L3269E—145 4 —O.2R909841E—026 1 0.755136401—01 —D.44012575F—02

4 C.75513642E—C3 —O.2R909847E—027 47 6 C.1510?728C_O? —C.123132690—148 3 C.75513640E—03 —O.4401257'5E—078 5 —0.91153029C—039 5 —C.15639386F—03 -0.91153029E—039 6 0.15102728F—O' —D.1?113'69F—14

2 C.16666667r—02 —O.91153028E—0310 4 0.755 136420— 03 —0. 28909847E—02II 4 —0.2B909847F—0211 5 —C.15639386E—03 —0.911530290—03

ELEMENT MID SECTION STRFSS AT:NUM8EP L'FT

1 O.22654C50+01 C.?265409F+0t2 O.22654C9E+OI3 _O.2734591C+O1 —O.?134591E+O145 —0.32037720+01 —0. 1203772E#Oj6 O.453CRIBE+O1 O.4510P180+O17 —0.3203fl2E4C1

O.3E672950+01 O.'867'95E+0I9 —O.2734591E+OI

10 —O.2734591F+O1 —O.7734591F+0IU —0.21345910401 —O.?134591E+0l

NORMAL ENDING OF MODEL

Page 211: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.17 Subroutine BANMLT

CCCCCCDP

CC

SUBPCUTINE BANMLT (NDFREE,MAXBAN,SS,QD,CC,ICPT)* * ** * * * * * * * * * * * * * * * * * * * * **MULTIPLY PACKED SQUARE MATRIX, SS, MATRIX DD

IF IQPT = 0 STORE RESULT ZN MATRIX CC.CIHERWISE ADD RESULT TO MATRIX CC

* * ** * * * * * * * * * * * * * * * * * * * * **IMPLICIT REAL*8 (A—H,O—Z)DIMENSION SS(NOFREE,MAXBAN), CC(NOFREE)NOFREE = TOTAL NUMBEPS OF SYSTEM DEGREES CF FREEDCMMAXBAN = SYSTEM HALF BANDWIDTHMBM1 = MAXBAN — 100 70 1 =SUM 0.00Ji = I — MBMIJ2 = I + MBM1Ji = MAXO (JI UJ2 =

DO 50 J J1,J2IF ( J — j 10,20,30

10 JJ = I—J+1II = JGO 10 40

20 JJ = 1II = IGO 10 40

30 .JJ = J—I+1II = I

40 SUM SUM + SS(II,JJ)*DD(Jj50 CCNTINUE

IF IOPT.EQ.0 I GO TO 60CC(IJ = Cci!) + SUMGO 10 70

60 CCUI = SUM70 CONTINUE

RETURNEND

Fig. 10.18 Bar element on an inclined plane

(b) Final position

L :10"

3/4

(a) Originol state

£12

Page 212: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.19 Bar with uniform pressure and included roller; test problem data

BAR WITH PRESSURE E INCLINED RCLLER L,=4 SPACES),2,t,2,2,?,C.O,O,O,O,O,Q,O,O,7,O,O,O,1,O,O,8,O,O,O

1 11 0.0 0.02 22 10.0 0.0

1 1 2

1 1 C.C1 2 C.O2 1 2 2 3. —4. 0.

,1 1.0, 3000C., O.,,O.,,O.O1, 0.08333,0.5

Fig. 10.20 Bar with uniform pressure and inclined roller support; output data

***** PROBLEM PARAMETERSNUMBER OF NOOAL POINTS IN SYSTFM 2MUMBFR OF ELEMENTS IN SYSTEM = . 1

NUMBER OF NODES PER ELEMENT . 2NUMBER OF PARAMETERS PEP NODE 2DIMENSION OF SPACE =..........•• 2NUMBER OF BOUNDARIES WITH GIVEN 0NUMBER OF NODES ON BOUNDARY 0NUMBER OF FIXED PT PROP PER NODE . 0NUMBER OF FLOATING PT PROD PER kPflE =....... 0NUMBER OF FIXED PT PROP PER ELEPrNT =.. 0NUMBER OF FLOATING PT PROP PER ELEMENT =.... 7NLJMBEP OF FIXED PT MISC PROP =.. 0NUMBFP OF FLOATING PT MISC 0

ELEMENT PROPERTIES ARE tOW)GENEOUS.OPTIONAL UNIT NUMBERS (UTILI?FD IF ) 0)

B NTAPE2= 0 NTAPE3= C NTAPE4 0NODAL PARAMETERS TO BE BY

*** NODAL POINT DATA ***NODF, CONSTRAINT 2 COORO1NATES

1 11 0.0000 D.00002 22 10.0000 0.0000

*** CONNECTIVITY DATE ***ELEMENT NO., 7 NOOAL

1 1 2

*** NOOAL PARAMETFP CONSTRAINT LIST ***CONSTRAINT NUMBER OF

TYPE EQUATIONS1 22 13 0

*** CONSTRAINT EQUATION DATA ***CONSTRAINT TYPE ONEEQ. NO. NODE1 PARt Al

1 1 1 .0000C000E#OO2 1 2 .00000000F+C0

CONSTRAINT TYPE TWOEQ,NODl,PAR1,NOD2,PAR2, Al, A2, Al

3 2 1 7 2 .300E+Ol —.400E+O1 .000E+0D

*** ELEMENT PROPERTIES ***ELEMFNT NC). PROPERTY NO. VAUIE

1 1

1

1

1

111 7

END OF FLOATING PT PROPERTIES OF ELEMENTS

Page 213: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.20—continued

EQUATION HALF BANDWIDTH 4AND OCCURS IN ELEMENT 1.CONSTRAINT HALF BANDWIDTH — ........ 2MAXIMUM HALF OF SYSTEM 4TCT4L NUMBER CF SYSTEM EQUATIONS — . 4NUMBFS flF ELEMENT DEGREES OF FREEDOM =... 4

*** OUTPUT OF RESULTS •**ELEMENT Nfs., NUDE NO., 2 PARAMETERS

1 1 O.00000F+OO2 —O.62500F—05 —O.4d5875E—05

ELEMENT STRESSFSELEMENT MID SECTION STRESSES AT:

PIGHT LEFT1 O.731253E+OO

NORMAL ENDING OF MODEL PROGRAM.

Table 10.2 Parameter Definitions for A Plane Truss

CONTROL:NSPACE = 2 NLPFLO = 7N = 2 ISOLVT = 0*, or

1 =2 = of displacement, v

PROPERTIES:Element level:

Floating point:1 cross-sectional area, A2 modulus of elasticity, E3 temperature rise from unstressed state,4 coefficient of thermal expansion,5 uniform line load (to the right when moving from node 1 to node

2 of the element)6 moment of inertia, I7 = half depth of the bar, d

CONSTRAINTS:Type 1: specified nodal displacement componentsType 2: inclined roller supports, rigid members, etc.

INITIAL VALUES OF COLUMN VECTOR:Specified external nodal forces**

POST-SOLUTION CALCULATIONS:1 = principal element stresses

* Default value** Optional

Page 214: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.4 Slider bearing lubrication 205

10.4 Slider bearing lubrication

Several references are available on the application of the method tolubrication problems. These include the early work of Reddi [63], a detailedanalysis and computer program for the three node triangle by Allan [9],and a presentation of higher order elements by Wada and Hayashi [73].The most extensive discussion is probably found in the text by Huebner[43]. These formulations are based on the Reynolds equation of lubrication.For simplicity a one-dimensional formulation will be presented here.

Consider the slider bearing shown in Fig. 10.21 which is assumed toextend to infinity out of the plane of the figure. it consists of a rigid bearingand a slider moving relative to the bearing with a velocity of U. Theextremely thin gap between the bearing and the slider is filled with anincompressible lubricant having a viscosity of v. For the one-dimensionalcase the governing Reynolds equation reduces to

(10.11)

where P(x) denotes the pressure and h(x) denotes the thickness of the gap.The boundary conditions are that P must equal the known external pres-sures (usually zero) at the two ends of the bearing. It can be shown thatthe variational equivalent of the one-dimensional Reynolds equationrequires the minimization of the functional

L h3 dP2 dPi= f + hU dx. (10.12)

As a word of warning, it should be noted that, while the pressure P iscontinuous, the film thickness h is often discontinuous at one or morepoints on the bearing. Another related quantity of interest is the loadcapacity of the bearing. From statics one finds the resultant normal forceper unit length in the z-direction, is P dx. This is a quantitywhich would be included in a typical set of post-solution calculations.

As a specific example of a finite element formulation, consider a linearelement with two nodes (N = 2) and one pressure per node (NG = 1).Thus P(x) = W(x) PC where as before PeT = [P, P1] and the interpolationfunctions are HC = [(x1 — x) (x — where I = (x1 — is the length ofthe element. Minimizing the above functional defines the element squareand column matrices as

se = 1fXi

dx,6i'

Page 215: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

206 10. One-dimensional applications

and

= —

For the element under consideration is linear in x so that its firstderivative will be constant. That is, = [— 1 1]!! so that the elementmatrices simplify to

1 1 1 —ii (XiI I h3dx,

6v1 L— 1 iiand (10.13)

UI 11 Cx,

H hdx.I 1J

Thus, it is clear that the assumed thickness variation within the elementhas an important effect on the complexity of the element matrices. Itshould also be clear that the nodal points of the mesh must be located suchthat any discontinuity in h occurs at a node. The simplest assumption isthat h is constant over the length of the element. In this case the latter twointegrals reduce to h31 and hi, respectively. One may wish to utilize thiselement to approximate a varying distribution of h by a series of constantsteps. In this case, one could use an average thickness of h = +where h and h1 denote the thickness at the nodal points of the element.Subroutines ELSQ and ELCOL for this element are shown in Figs. 10.22and 10.23. Note that these subroutines allow for two methods of definingthe film thickness, h, in each element. In the default option(NLPFLO = 1, NNPFLO = 0) the value of h is input as a floating pointelement property, i.e. H ELPROP(1). In the second option(NLPFLO = 0, NNPFLO = 1) the thickness is specific at each node as afloating point property. Note that for the latter option NLPFLO = 0, whichalways causes ELPROP(1) = 0.0 and thus h = 0. The program checks forthis occurrence and then skips to the second definition of h.

The programs for performing the post-solution calculations, ELPOSTand POSTEL, are shown in Figs. 10.24 and 10.25. These two routinesevaluate the force, F, carried by each element. The load on a typicalelement is = where QC = [1/2 1/2]. Subroutine ELPOST generatesand stores for each element. Subroutine POSTEL carries out themultiplication once the nodal pressures, PC, are known. In addition, it sumsthe force on each element to obtain the total load capacity of the bearing.It prints the element number and its load and the total load on the bearing.With the addition of a few extra post-solution calculations, one could also

Page 216: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.4 Slider bearing lubrication 207

output the location of the resultant bearing force. In closing, recall thatboth U and v are constant along the entire length of the bearing. Thus,they are simply defined as floating point miscellaneous system properties(MISCFL = 2).

As a numerical example consider the step bearing shown in Fig. 10.26which has two constants gaps of different thicknesses but equal lengths.Select a mesh with three nodes (M = 3) and two elements (NE = 2). Let

= 12 = 0.125 ft. U 20 ft/s, v = 0.002 lb sift2, h1 = 0.025 ft, and h2 =0.036 ft. The two boundary conditions are P1 = P3 = 0 and we desire tocalculate the pressure, P2, at the step. The calculated pressure is P2 =5.299psf, which is the exact value, and the total force on the bearing is

= 0.66 ppf. The accuracy is not surprising since the exact solution forthis problem gives a linear pressure variation over each of the two segmentsof the bearing. Indeed if one solves the above two element problem inclosed form one obtains the exact algebraic expression for P2. The inputdata are shown in Fig. 10.27 and typical output data are shown in Fig.10.28. Table 10.3 summarizes this element.

FIg. 10.21 Infinite slider bearing

-> K

SUBROUTINE ELSQ (N,NELFRE,NSPACE 1P5,JP2,KP1,KP2,I KP3,CQORD,D,ELPROP,LFAtJP,PRTLPT,FLTMIS,2

C ** ********** ******** * *****C GENERATE ELEMENT SQUARE MATRIXC **COP IMPLICIT REAL*8(A—H20—Z)

D(NELFRE), ELPRCP(KP2),1 LPROP(JP2), S(NELfRE,NELFREj,2 PRTLPT(1P5,KP1J, FLTMIS(KP31

C N = NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDVM PtR ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX IPROPC (P1 = NUMBER OF COLUMNS IN FLTNP PRTLPT PTPROPC (P2 = NUMBER OF COLUMNS IN ARRAYS FITEL AND ELPROPC (P3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORO = SPATIAL COORDINATES OF NCDESC C = NODAL PARAMETERS ASSOCIATED WiTH AN ELEMENT

Fig. 10.22 Subroutine ELSQ

Page 217: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.22—continued

C ELPROP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPRUP = ARRAY OF FIXED POINT ELEP'€NI PROPEftTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE OF FLOATING PT MISC PROPC S = ELEMENT SQUARE MATRI)(C NTAPE1 = UNiT FOR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 01

CC APPLICATION: LINEAR SLIDER BEARiNGC NSPACE = 1, N 2 NG = 1 NELFRE 2, MISCFL = 2C FLTMISU) = FLTMIS(2) = VELOCITYC ELPRCP(1) OR PRTLPT(K 1) = FILM IIiICKNESS

CCMMCN /ELARG/DATA KALL /1/IF ( KALL.EQ.O ) GO TO 10

C—--> UN FIRST CALL GENERATE CONSTANT MATRICESKALL = 0VIS = FLTMIS(UVEL = FLTMLS(21Vol = 1./(6.*VISIsP(1,1I = VolSP(2,2) = V61SP(1,2) = —V615P12 Ii = —VolcP(1J =CP(2) = —VEL

10 CONTINUEC——> DEFINE ELEMENT PROPERTIES

DL = COORD(2,11 — COCRO(1,1)H = ELPROP(11

C CHECK FOR ALTERNATE DEFINiTIONIF ( H.EQ.O.O I H = 0.5*(PRTLPT(1,1) + PRILPT(2,1IJIF ( H.EQ.O.O I H = 1.0I-3L = H*H*H/DL

C——> CENERATt ELEMENT SQUARE MATRIXS(1,1I = H3L*SP(1,1JS(1,21 = H3L*SP(1,2)S(2,21 = H3L*SP(2,21S(2,J.) = H3L*SP(2,1}RETURNEND

Fig. 10.23 Subroutine ELCOL

SUBRCUTINE ELCOL IN NELFRE NSPACE,1P5,JP2 KPI KP2,1 KP3 LPROP PRTLPI,FLFMIS,2 C,NhPEI,NTAPE2,NTAPE3,NIAPE4)

CC GENERATE ELEMENT COLUMN MATRIXCCOP IMPLICIT REAL*8(A—H,O—ZJ

DIMENSION COORD(N NSPACE) D(NELFREI, ELPRCP(KP2),1 C(NkFRE), PRTLPT(1P5,KP1),2 FLTMIS(KP3I

C N = NUMBER CF NODES PER ELEMENTC NELFRE = NJMBER OF DEGREES OF PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMbER OF COLUMNS IN AKRAYS LPFIX ANC LPROPC KP1 = NUMBER OF COLUMNS IN FLTNP £ PRTLPT £ PTPRCPC KP2 = NUMBER CF COLUMNS IN ARRAYS FLTEL AND ELPRUPC KP3 = NUMBER OF COLUMNS IN ARRAY FLTMISC COORD = SPATIAL COORDINATES OF ELEMENT'S NODESC 0 = NODAL PARAMETERS ASSOCIATED WITH A ELEMENTC ELPRCP = ELEMENT ARRAY OF FLOATING PROPERTIESC LPRCP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP OF ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE OF FLOATING POINT MISC. PROPC C = ELEMENT COLUMN MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER ((ISEC hi-EN > 01

Page 218: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.23—continued

C NSPACE = A, N = 2 NO = 1 NELFRE = 2, MISCFL = 2C = FLfMIS(2) = VELOCITYC ELPROP(1) OR PRTLPT(K,1.3 = FILM ThICKNESS

CCMMCN /ELARG/ SP(2,2),CP(21,VIS,VEL,DL,Q(2),I-$C—-> FORM ELEMENT COLUMN MATRIX

Cli) = H*CP(i)C(2) = H*CP(2)RETURNEND

FIg. 10.24 Subroutine ELPOST

SUBROUTINE ELPOST (NTAPEA,NTAPE2,NJAPE3,NTAPE4)CC GENERATE DATA FUR POST SOLUTICN CALCULATICNSCCDP IMPLICIT REAL*8(A—H O—Z)C NTAPEJ. = UNIT FOR SOLUTION MATRiCES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WI-EN > 0)C . . ..C *** ELPOST PROBLEM DEPENDENT STATEMENTS FOLLOW ***C ........... . .. ..C APPLICATION: LINEAR SLIDER BEARiNGC NSPACE = 1, N = 2 NO = 1, NELFRE = 2, MISCFL = 2

CCMMCN /ELARG/C——> GENERATE DATA FOR LOAD CALCULATICt%S AND STCRE

0(1) = O.5*DL= O.5*DL

WRITI (NTAPEIJ 0RETURNEND

Fig. 10.25 Subroutine POSTEL

SUBRCUTINE POSTEL (NTAPEI,NE(FRE,C,i€,NTAPE2,1 NTAPE3,NTAPE4,IT,NITtR,NE,M)

CC ELEMENT LEVEL POST SOLUTiON CALCULATICNSCC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NELFRE = NUMBER OF DEGREES OF FREEDW' PER ELEMENTC C = NODAL PARAMETERS ASSOCIATED WITH THE ELEMENTC IE = ELEMENT NUMBERC NTAPE2,3,4 = OPTIONAL UNITS FOR uSER (USED WI-EN > 0)C IT = CURRENT ITERATION NUMBERC NITER = MAXIMUM NUMBER OF ITtRATICNSC NE = TOTAL NUMBER OF ELEMENTSC = TOTAL NUMBER OF NODESCOP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION D(NELFRE)C .. . .... .C *** POSTEL PROBLEM DEPENDENT STATEMENTS FCLLCW ***

C APPLICATION: LINEAR SLIDER BEARINGC NSPACE = 1, N = 2, NO = 1, NELFRE = MISCFL = 2

CCMMCN /ELARG/ SP(2,21,CP(2),TDT,VEL,DL,Q(2),HDATA KALL/1/IF ( KALL.EC.O I GO TO 10

C——> PRINT TITLES ON THE FIRST CALLKALL = 0WRITE (6,5000)

5000 FORPAT ('l*** E I. E M E N T L 0 A C S ***',I/,I ELEMENT LOAD TOTAL')

TOT = 0.0010 CONTINUE

C——> CALCULATE LOADS ON THE ELEMENTS,REAC (NTAPEIJ 0CALL MMULT (Q,D,F,i,2,i)TOT TOT + FWRITE (6 50101 IE, F TOT

5010 FORfrAT (15,E16.5,3X,E16.5)RET L. RNEND

Page 219: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 10.26 Linear slider bearing

Fig. 10.27 Input data, linear slider bearing

,1,2, 1,2,1,0.0,0,0,0,0.0,0,0,1,9 ,2.C .0 ,C,

0 0:1253 1 0.250

1 1 2

2 2 3I I 0.03 1 3.0

0.0020 20.0

FIg. 10.28 Output data, linear slider bearing

•**** PROBLEM PARAMETERSNUMBER OF NODAL POINTS IN SYSTEM 3NUMBER OF ELEMENTS IN SYSTFM 2NUMBER CF NODES PER ELEMENT 2NUMBER OF PARAMETERS PER NODE 1

DiMENSION OF SPACE .. 1

NUMBER OF BOUNDARIES WITH GIVEN FLUX=....... 0NUMBER OF NODES ON BOUNDARY SEGMENT=........ 0NUMBFR OF FIXEC PT PROP PER =.......... 0NUMBER OF FLOATING PT PROP PER NODE =. 0MUMBFR OF FIXFO PT PROP PER ELFMFNT =....... C)

NUMBER OF FLOATING PT PROP PCR .... 1NUMBEP OF FiXED PT MISC PROP =.............. 0NUMBER OF FLOATING PT P4!SC PROP =........... 2

ELEMENT PROPERTIES ARE HOMOGFNFULJS.OPTIONAL UNIT NUMBERS (UTILIZED IF > 0)

NTAPE3xO MTAPF4=ONODAL PARAMETERS TO BE LISTED BY WOOFS

*** NODAL POINT CATA ***WOOF, CONSTRAINT INDICATOR, 1 COORD1NATFS

1 1 0.00002 0 0.12503 0 0.2500

*** ELEMENT CONNECTIVITY DATA ***ELEMFNT NO., 2 NODAL INC!DENCES.

1 1 22 2 3

*** CONSTRAINT EQUATION DATA ***CONSTRATNI TYPE ONEEQ. NO. NODE! PAR! Al

1 1 1 .00000000F+0O2 1 1 .00000000E+O0t** ELEMENT PROPERTIES ***

ELEMENT NO. PPCPERTY NO. VALUE

I

END OF FLOATING PT PROPERTICS CF ELEMENTS

V

U:2Ofps

x

Page 220: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.28—continued

*** MISCFLLAPECUS SYSTEM PRIPFRTIFS ***PROPFRTY NO. VALUE

1 O.20000000E-O'2

END !F FLOATING PT PROPERTIES OF SYSTEM

EQUATICNHALF BANDWIDTH— 2AN° OCCURS IN ELEMENT NUMBFR I.CONSTRAINT HALF BANDWIDTH =.... ..MAXIMUM HALF BANDWIDTH OF SYSTEM =. 2TOTAL NUMBER CF SYSTEM FCUATTONS BNUMBER OF ELEMENT DEGREES OF FRFFOCM 2

*** OUTPUT OF RESULTS •**1 CUORCINATES, I PARAMETERS.

1

2 O.I2S000COE+OOO.25000000€+OO O.5?9R566?F—I1

*** ELEMENT LOADS ***ELEMENT LCAD TOTAL

1 O.33116E+OO fl.33116E+OO2 0.f,6212F+OO

NORMAL ENDING CF MODFL

Table 10.3 Parameter Definitions for a Slider Bearing

CONTROL:NSPACE = 1 NNPFLO = 0*, or 1N=2 NLPFLO=1*,or0NG=1 MISCFL=2

DEPENDENT VARIABLES:1 = pressure, p

PROPERTIES:Nodal point level:

Floating point:1 = none,* or film thickness at the node, h

Element level:Floating point:

1 = film thickness of the element,* h, or none

MISCELLANEOUS:Floating point:

1 = viscosity, ii2 = velocity, U

CONSTRAINTS:Type 1: specified nodal pressures

POST-SOLUTION CALCULATIONS:1 = resultant force on the element

* Default option

Page 221: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

212 10. One-dimensional applications

10.5 Ordinary differential equations

10.5.1 Linear example

There are several weighted residual methods available for formulatingfinite element solutions of differential equations. As an example, considerthe ordinary differential equation y' + ay b, which can be written sym-bolically in operator form as L(y) = Q(x). Akin Lii and Lynn and Arya[48] have presented a least squares finite element solution of such problems.Let the value of y within an element he y = He(x) yC, where H is theelement interpolation functions matrix, and ye is the array of nodal valuesfor the element. These authors show that the corresponding elementmatrices are

se = I Ge(X)TGe(X) dx,Jte

and (10.14)ce

= JGe(x)TQ(x) dx,

'C

where GC is the matrix obtained from the differential operator acting onthe element interpolation functions. That is, = L(Hc). For the equationgiven above L = (dldx) + a and 0 = b. Since the operator is of first orderthe above integral definitions of the element matrices will only require C3continuity of the approximate finite element solution. Thus, one can utilizea linear element with a node at each end. As stated earlier, the interpolationfunctions for such an element are

HC = [(x1 — x) (x — x,)]/1,

where I (x1 — x,) is the length of the element. Substituting yields

= [(a(x1 —x) —1) (a(x —x1) + 1)]!!

so that the resulting element matrices are

b ía! — 2ce —

2 Ia! 2and (10.15)

=— 3a1 + a2!2) (a2!2 — 6)12

31 Lsym. (3 + 3a1 + a2!2)

Figures 10.29 and 10.30 show the problem-dependent subroutines forcalculating the above element matrices. Note that since a and b are constantover the whole solution domain they are treated as miscellaneous system

Page 222: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.5 Ordinary differential equations 213

properties (MISCFL = 2). As a specific example consider the solution ofthe problem y' + 2y + 10, where y(O) 0. Let the domain of interest,0 x 0.5, be divided into five elements of equal length (NE = 5, M =6, NSPACE = 1, N = 2, NG = 1). The input data are shown in Fig. 10.31and the exact solution, y(x) = 5(1 — is compared with the MODELresults in Fig. 10.32. The program output is summarized in Fig. 10.33.Table 10.4 gives the problem summary.

Fig. 10.29 Subroutine ELSQ

SUBROUTINE ELSQ (N NELFRE,NSPACE,1P5,jP2,KPI,KP2,1

2 $1NTAPE1,NTAPE2,NTAPE3 ,NTAPE4)CC GENERATE ELEMENT SQUARE MATRIXC ** t***********************CDP IMPLICIT REAL*8(A—H,O—Z)

CIMENSION CCORD(N,NSPACEI, D(NELFREI, ELPRCP(KP2),1 LPRGP(JP2),2 PRTLPI(1P5,KPL), FLTMIS(KP3)

C N = WMBER CF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF PEP ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX ANC LPROPC <P1 = NUMBER OF COLUMNS IN FLTNP C PRTLPT C PTPRGPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL ANC ELPRCPC KP3 = NUMBER OF COLUMNS IN ARRAY FLTMISC COORD = SPATIAL COORDINATES Of tLEMENT'S NCDESC 0 = NODAL PARAMETERS ASSOCIATED AN ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPROP ARRAY OF FIXED POINT tLtMENT PROPERTIESC PRTLPT = FLOATiNG POINT PROP FOR ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE OF FLOATING PT MISC PROPC S = ELEMENT SQUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION STORAGEC NTAFE2,3,4 = OPTIONAL UNITS FOR USER (USED WI-EN > 0)

C .

C *** ELSQ PROBLEM DEPENDENT STATEMENTS FCLLCW ***C . . ..C APPLICATION: LEAST SQUARES SOLUTION OF Y'+A*Y=BC NSPACE = 1, N 2, NC = IC CL = LENGTH OF ELEMENTC ARRAY FLTMIS CONTAINS PROBLEM CGtFFICIENTS A AND B

CCMMCN /ELARG/ A,B DLDL = COORD(2 11 — C6CRDU,1)A = FLTMIS( iiB = FLTMIS(2)S(l,1) (3.—3.*A*DL+A*A*DL*DL)/3./DLS(2,2i = (3.+3.*A*DL+A*A*DL*DL)/3./DLS(1,2) = (A*A*DL*DL—6.)/6./DLS(2,I) = S(1,2)PElt.END

Page 223: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 10.30 Subroutine ELCOL

SUBROUTINE ELCOL (N NELI-RE,NSPAC€ 1P5,.JP2 KP1 KP2,I KP3

CCCCDP IMPLICIT REAL*8(A—H,O—fl

DIMENSION COCiRD(N,NSPACE.), D(NELFRE), ELFRCP(KP2),1 LPROPLJP2I CINELFREJ,2

C N = NUMBER OF NODES PER ELEMENTC NELFRE NUMBER OF DEGREES OF FREEDOM PER ELEMENTC SPACE

OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND IPROPC KPI = NUMBER OF COLUMNS IN FLTNP C PRTLPT C PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND EIPROPC KP3 = NUMBER OF COLUMNS IN ARRAYC COORD = SPATIAL COORDINATES OF ELEMENT'S NCDESC 0 = NODAL PARAMETERS ASSOCIATED WITH A ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PCINT PROPERTIESC LPRCP ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT FLOATING POINT PROP OF ELEMENT'S NCDESC FLTMIS = SYSTEPI STORAGE OF FLOATING POINT MISC. PROPC C = ELEMENT COLUMIg MATRIXC NTAPE1 = UNiT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN ) 0)

C *** ELCOL PROBLEM DEPENDENT STATE?IENTS FOLLCW ***C •4•I•••C APPLICATION: LEAST SQUARES SOLUTION OF Y'+A*Y.=BC NSPACE = I, N = 2, NG = 1

COMMON /EL.ARG/ A,B,DLC(1) = 0.5*B*(A*DL—2.)C(2) = O.5*B*(A*DL+2.)RE 1 RNEND

FIg. 10.31 Least squares solution of + 2y 10, y(0) = 0

LEAST SQUARES SOLUTION OF Y'+2Y=1O t,=4 SPACES),6,5, 1,2,1 ,O,C,C,O,O,O0,0,0,0,0,2,0,0,0, 1,0,0,0,0

1 1 0.02 0 0.13 0 0.24 0 0.3S 0 0.4

0 0.51 1 22 2 33 3 44 4 55 5 61 1 0.0

2.0 10.0

Page 224: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

*S*** PAPAMETERS *****NUMBER flF NODAL POINTS IN =...NUMBER OF IN sysTrM =...NUMaER NODES PER ELEMENT =.....NUMBFR OF PARAMETERS PER =0 IMFNSION OF SPACE =........NUMBER OF BOUNCARIES GIVEN FLUX=

CF NODES CN BOUNDARY SFGMrMT-OF FIXED PT PROP PFR NODE

NUMBE:R (IF FLOATING PT PROP PFR =.......NUMBER OF FIXEC PT PROP PER ELEMENT =.......NUMBER OF FLOATING PT PROP PER =....NUMBFR OF FIXED PT MISC PROP =.NUMBER OF FLOATING PT MISC PROP =

NODAL PARAMETERS TO BE LISTEI) BY

*$* NODAL POINT DATA ***NOOF, CONSTRAINT INDICATOR, 1

I I

2 0 0.10003 0 O.200C4 0

0 O.400fl0

CCPPDINATFS

Fig. 10.32 Mesh and results for a weighted residual procedure

Ecernent

4 5 6

Node

4

3'

y' + C)' 'ba

2o Finite element

— Exact

x0.5

Fig. 10.33 Least squares solution of + 2y = 10, y(0) = 0

5

)0000

02

Page 225: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.33—continued

*** ELEMENT CONNECTIVITY DATA ***ELEMFNT NO., 2 NCOAL INCIUFNCFS.

1 1 22 2 33 3 44 4 65 5 6

*** NODAL PARAWETER CONSTRAiNT LISTCONSTRAINT NUMBER CF

TVPF ECUATIONS1 1

2 03 0

*** CONSTRAINT EQUATION DATA ***CONSTRAINT TYPE ONEEQ. NO. PAR1 At

1 .ooo00000r+oo

*** MISCELLANEOUS SYSTEM PROPERTIES ***PROPFRTY NO. VALUE

I

2 O.I0000000E+02END OF FLOATRG PT PROPERTIES OF SYSTEM

EQUATION HALF BANDWIDTH a.... 2AND OCCURS IN ELEMENT NUMBFR 1.CONSTRAINT HALF BANDWIDTH =.....MAXIMUM HALF OF SYSTEM =••••••• 2TOTAL NUMBER OF SYSTEM EOUATIJNS =....... 6NUMBER OF DEGREES OF 2

$** OUTPUT OF RESULTS *t*NOOF, 1 1

1 O.00000000E+OO O.177C9900E—142 O.I0000000C.OO3 0.200C0000E+O0 O.16501816E+014 O.30000000E+0O 0.2257q8c,9F.o15 0.400C0000E+OO 0.27553633E+O1

0.50000000E+0O O.11623579E401NORMAL ENDING CF MODEL PROGRAM.

Table 10.4 ParameterDefinitionsfor Least Squares Solution of y' + ay = b

CONTROL:NSPACE = 1N=2NG = 1

DEPENDENT VARIABLES:1 =y

PROPERTIES:MISCELLANEOUS:

1 = coefficient a2 = coefficient b

CONSTRAINTS:Type 1: specified y-value

Page 226: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.5 Ordinary differential equations 217

10.5.2 Nonlinear example

The above procedure can be extended to solve nonlinear operators aswell. Akin [1] has shown that if one utilizes an iterative solution of adifferential operator of the form L(y) + N(y) Q(x), where L and Ndenote linear and nonlinear differential operators, then the element mat-rices for iteration n become

= J+ + + ds,

= Jo(x)(EeT+ (10.16)

where E and F denote the matrices resulting from the element interpolationfunctions being acted upon by the operators L and N, respectively. As anexample, Akin presents the solution of 2yy" — (y')2 + 4y2 = 0 subject tothe two boundary conditions of = 1/4 and = 1. Since thisoperator is of the second order, the above least square integral definitionswill require a finite element model with C continuity; that is, both y andy' must be continuous between elements. Thus, select the one-dimensionalelement shown in Fig. 10.34 which has two nodes (N = 2) and utilizes bothy as nodal parameters (NG = 2). It has been shown that the elementinterpolation functions for this cubic element are the first order Hermitepolynomials. That is,

y(s) =where (10.17)

yer=[),.y1

and

H(s)e = [(1 — 3132 + 1(13 — 2(32 + /33) (3132—

1(f33 —

and where (3 = s/i, 1 = — x1, and s = x — x,. These are programmed in Fig.10.35.

The above definitions of se and ce are clearly too complicated to beintegrated in closed form so the calculations in subroutine ELSQ, shownin Fig. 10.36, are based on a four point Gaussian quadrature. The initialestimates of y(x) and y'(x) for the first iteration are calculated by theproblem-dependent subroutine START which is shown in Fig. 10.37. Thesestarting values simply represent a linear interpolation between the twoboundary conditions. Select a mesh with eleven equally spaced nodes(M = 11), and ten elements (NE = 10). In Fig. 10.38 the results of a threeiteration solution (NITER = 3) are compared with an exact solution ofy(x) = sin2(x). Note that the iterative approach rapidly approaches the

Page 227: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

218 10. One-dimensional applications

exact values when given a reasonably good starting estimate. The elementsummary is given in Table 10.5. The example input and output data aregiven in Figs. 10.39 and 10.40, respectively. The MODEL program usesroutines CHANGE and CORECT, Fig. 10.41, to control the over-relax-ation iteration procedure. Clearly, other procedures such as theNewton—Raphson method are better suited to the solution of nonlinearproblems.

Pig. 10.34 A one-dimensional cubic element

Yi}xi x Jyi

Yi

—l

y(x) He(x) ye

yHt(x) [(1 — 3/32 + l((3 — 2132 + /33) (3132_ 2/32) i(f33 — ,32)]

H' = [(6,32 — 6/3)/i (1 — 4,3 + 3,32) (6/3 — 6/32)/i (3,32 — 2,3)J

H" = [(12,3 — 6i/12) (6/3 — 4)/I (6 — 12,3)/12/ (6/3 — 2)/I]

f3=sII, s=x—x1, and 1x,—x,

Fig. 10.35 Cubic element routines

SUBRUUTINE SHPCU (B,A,HJC ** ********** **** **********C SHAPE FUNCTIONS FOR AC

C A ELEMENTC BC H = SHAPE FUNCTiONS ARRAY

H(1) = 1.—3.*b*B + 2.*B*8*BH(2) = (B — 2.*B*B + B*B*B)*AH(31 = 3.*B*B — 2.*8*B*B11(4) = (B*B*B — B*BI*ARET (2 RNENDSUBROUTINL DERCU (B A,DH)

C ** **** ******C FIRST DERIVATIVES OF SHAPE FUNCTIONS FOR 1—0C CUBIC ELEMENT (A Cl ELEMENTIC ** ********** **** ** *** *****COP IMPLICIT REAL*8 (A—H,O--Z)

DIMENSION 011(4)C A = LENGTH OF ELEMENT (SEE SUBR S(IPCUJC B = COORDINATE OF POINTC OH = FIRST DERIVATIVES OF H

011(11 = 6.*(8*8 — 81/ADH(21 = 1. — + 3.*B*B011(3) = 6.*(B — 8*8)/AOH(41 = 3.*B*B — 2.*8RET U RNEND

Page 228: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.35—continued

SUBRCUTINE DER2CU (B,A,D2H1CC SECCNO DERIVATIVES OF SHAPE FUNCTIONS FOR 1—CC CUBIC ELEMENT (A Cl ELEMENTICCDP IMPLiCIT REAL*8 (A—H,O—Z)

C A = LENGTH OF ELEMENT (SEE SUBR StiPCUIC B = COORDINATE OF POINTC C2H = SECOND DERIVATIVES OF H

D2H(1I = (12.*B — 6.)/A/A02H(2) = (6.*B — 4.)/A02H(3i = (6. — 12.*BJ/A/A02N(4) = (6.*B — 2.)/ARET I. RNE ND

Fig. 10.36 Subroutine ELSO

SUBRCUTINE (N NEIFRE NSPACE 1P5,JP2,KPI,KP2,I KP3 LPAUP PRTLPT,FLTMIS,2 5,NiAPEI,NTAPE2,NTAPE3, FJAPE4)** ************** ** ** ******

C GENERATE ELEMENT SQUARE MATRIX** **** ********************COP IMPLICIT REAL*8(A—H,O—Z)

DIMENSION COORD(N,NSPACE), O(NELFREI, ELPRCP(KP2),1 LPROP(JP2), S(NELFRE,NELFREJ,2 PRTLPT(1P5,KPLI, FLTMIS(KP3)

C N = NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPIC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPC KP1 = NUMBER OF COLUMNS IN FLTNP £ PRTLPT PTPRCPC ((P2 NUMBER Cf COLUMNS IN ARRAYS FLTEL AND ELPROPC ((P3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORO = SPATiAL COORDINATES OF NCDESC 0 = NODAL PARAMETERS ASSOCIATED WITH AN ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PT PRCPERTIESC LPRCP ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTIPT = FLCATING POINT PROP FOR ELEMENT'S NODESC FLTMZS = SYSTEM STORAGE CF PT MISC PRCPC S = ELEMENT SQUARE MATRIXC NTAPEI UNIT F-OR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WI-EN )

C ... .. .... . .. ...C *** ELSU PROBLEM DEPENDENT STATEMEt.TS FOLLOW ***C . . ..... S

C APPLICATIONS LEAST SQ. SOL. OF 2YY''—Y'Y'+4YY=OCCMMGN /ELARGJ

1 NQP,LSQCATA ((ALL/li

C——> EXTRACT QUADRATURE DATA ON THE FIRST CALLIF ( KALL.EQ.O I GO TO 10((ALL = 0NQP = 4CALL GAUSCU (NQP,GP,GWT)LSQ NELFRE*NELFRE

10 XI = COORD(1,1IXJ = COORD(2,1)DL = XJ — XI

C——> ZERO ELEMENT SQUARE MATRIXCALL ZERDA (LSQ,SI

C NUMERICAL INTEGI(ATION LOOP00 50 IP = 1 NQP

C—> FIND LOCAL COoRDINATES OF PCINTBETA = Q.5*(1.+GP(IP))

C——> EVALLATE SHAPE FUNCTIONS AND DERPwATIVESCALL SHPCU (BETA,DL,H)CALL DERCU (BETA,DL,DH)CALL DER2CU (BETA,DL,02H)

C——> FORM NONLINEAR MATRIX F USING DCALL MMULT (H,D,YOLD,1,4,U

Page 229: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.36—continued

CALL MMULT LDH,D,DYOLD,1,4,1)

20 — DYOLO*DHtI) 4.*YCLD*H(I)C * D'J = 2.*L*DU

=DO 40 1 1,4CO 30 J 1,4

30 S(I ,J) = St I,J) + WT*F(40 CONTINUE50 CONTINUE

C INTEGRATION COMPLETEDRET U RNEND

Fig. 10.37 Function START

FUNCTION START (IG,NSPACE,CUORD)CC DEFINE STARTING VALUE OF PARAMETER IC IN TERMS OFC COORDINATES OF THE NODE (FOR ITERATiVE SCLUTICNS)CC A PROBIEM DEPENDENT ROUTINECOP IMPLICIT REAI*8(A—H,O—ZJ

DIMENSION CODRC(1,NSPACEJC UIMENSICN OF SPACEC COORD = SPATIAL COORDINATE CFCC

C APPLICATION: LEAST SQ. SOL. OF 2YY'-Y'Y'+4YY=0C——> STRAIGHI LINE FIT THROUGH TWO BOuNDARY VALUES

X COORD(1,liSTART = 0.716200*X —IF ( IG.EQ.2 I START = 0.716200RETIRNEND

FIg. 10.39 Input data, least squates solution of 2W' — y'y' + 4yy = 0, y(r/6) = 1/4,= 1

11 IO,2,2,1,O,C,3,O,O,0,0 ,0,0 0,0 ,0 ,0 ,0 .0, 1,0 .0,0,0

1 1 0.52362 C 0.6283

0 0.73304 C 0.83785 06 C 1.047?7 08 0 1.25669 0 1.3614

10 0 1.466111 1 1.5708

1 1 22 2 33 3 44 4 55 56 6 17 7 E

8 89 9 iC

10 10 11I I 0.25

Li I 1.C

Page 230: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

0

0

D

0

c..J

0Pd

c'J

U,

0

0

0

0

0

04ILl

Jo ci 0

0

0 U 0— - 0 0 0 d

In0

0

0

0

0

c'J

k

+

('J

E10*4,

t04,C

C0C

('I

0I-

0

0

U,

q

It)d

004

0 0

('J. ID- - 0 d d 0

Page 231: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.40 Output data, least squares solution of 2yj/' — y'y' + 4yy = 0, y(jr/6) = 1/4,y(jr/2) = 1

***** PROBLEM PARAMETERS *****NUMBER OF NODAL POINTS iN SYSTEM =..........NUMBER OF ELEMENTS IN SYSTEM =............,.NUMBER OF NUDES PER ELEMENT =...............NUMBER OF PARAMETERS PER NODE

TfANUMBER OF NODES CN BOUNDARY SEGMFNT ... 0NUMBFR OF ITERAT1ONS TO BE RUN= ............ 3NUMBER OF FIXED PT PROP PER s.... 0

OF FLOATING PT PROP PER NODE 0NUMBFR OF FIXED PT PROP PER FLEMFNT 0NUMBER CF FLOATING PT PROP PER ELEMENT =.... 0NUMBER OF FIXED PT MISC PROP — ...... 0NUMBER OF FLOATING PT MISC PROP =........... 0

NODAL PAPAMFTEPS TO BE LISTED BY NODES

*** NODAL POINT DATA **$NODE, CONSTRAINT INDICATOR, 1 COORDINATES

1 1 0.5236? 0 0.62833 0 0.73304 0 0.83785 0 0.94256 07 0 1.15198 0 1.25669 0 1.3614

10 0 1.466111 1 1.5708

*** ELEMENT CONNECTIVITY DATA **$NO., 2 NODAL INCIDFNCFS.

1 1 22 2 33 3 44 4 55 5 66 6 17 7 88 8 99 9 IC

10 10 11

*** NODAL PARAMETER CONSTRAINT LIST ***CONSTRAINT NUMBER OF

TYPE EQUATIONS1 22 03 0

*** CONSTRAINT EQUATION DATA *$*CONSTRAINT TYPE ONEEQ. NO. MODEl PARt Al

1 1 1 .25000000E+OO2 11 1 .I0000000E+01

EQUATION HALF BANDWIDTH 4AND OCCURS IN ELEMENT NUMBER I.CONSTRAINT HALF BANDWIDTHz. ...... 1MAXIMUM HALF BAM)W1DTH OF SYSTFM - 4TOTAL NUMBER OF SYSTEM EQUATIONS ;....... 22NUP4BFR OF DEGREES OF FRrFOOM =... 4

Page 232: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.40—continued* STARTING VALUES FOR ITERATIVE SOLUTION *

NODE PAR. NO. VALUE1 1 0. 25000232E+O01 2 O.71620000E+0O2 1 O.32498846E+0O2 2 O.716'OOOOE+OO3 1 0.39997460E+00

2 0.716'OOOOE+OO4 1 0.4750323SE+0O4 2 0.71620000E+O05 1 0.55001850E+005 2 0.71620000E4006 1 O.62500453E+0O6 2 O.71620000F+007 1

7 2 O.71620000F+0O$ 1 0.77497692E+OO8 2 0.71620000E+0O9 1 O.85003468E+009 2 0.71670000E+D0

10 1 O.92502083F+0O10 2 0.71620000E+OOIt I 0.10000070E+Ol11 2 O.71620000E+O0

*** OUTPUT OF RESULTS ***MODE, 1 COORDINATES, 2 PARAMETERS.

I O.52360E+0O O.?5000000F+OO 0.92922297E+OO2 0.62830E+OO O.35101636E+OO O.99277624E+OO3 O.13300E+OO 0.45636595E+00 0.10126992E+0I4 O.83750E+QQ O.56177522E+QQ 0.99248312F+O5 0.94250€+OO 0.66299362F+OO 0.935049'.7E+O6 0.10472E+C1 0.75637733E+OO fl.84331742E+007 0.11519E+C1 O.83850601E+0O 0.72063925E#008 0.12566E+01 O.90632776E+00 O.57070988E+0O9 t).13614E#O1 O.95124897E+O0 O.39761322F+00

10 0.14661E+Ol 0.98900533F#OO O.20636936E40011 O.15708E+O1 O.10000000E+O1 O.18909482E—02

ITERATION NUMBER = 1NODAL DOF DATA FOR ITERATIONS ***

ROOT MEAN SQ CF DIFFERENCES . . = 0.11661E+O1ROOT MEAN SQ CF PREVIOUS VALUES O.32493E+O1RATIO OF ABOVE QUANTITIES . . . = O.155?BE+0O*** OUTPUT OF RESULTS *S*NODE, 1 COORDINATES, 2 PARAMETERS.

1. O.52360E+OO 0.25000000E+0O 0.84732959E+0O2 O.62830E+OO O.34428931E+0O O.94596480E+OO3 0.44642277F+0O O.9970??12E.4 ').83780E+OO 0.55149881E+OO5 O.94250E+CO 0.65437908E+OO 0.95737617E+OO6 O.10472E+0j 0.75045903F+O0 O.R710?845E+OO7 O.11519E+01 O.83542564E+00 0.74596089E+008 O.12566E+O1 O.90551379E+O0 0.58797231(+OO9 O.13614E+C1 O.40418970E+00

10 O.14661E+O1 O.98960788E+OO O.20336319E+0O11 O.157C8E+O1 O.10000000E+01 —0.53468031E—02

ITERATION NUMBER 2*** NODAL DOE DATA FOR ITERATIONS ***

ROOT MEAN SQ CF DIFFERENCES . . = O.32932E+OOROOT MEAN SQ OF PREVIOUS VALUES = O.36833E+O1RATIO OF ABOVE QUANTITIES . . . =

*** OUTPUT OF RESULTS ***MODE, I COORDINATES, 2 PARAMETERS.1 O.25000000E+00 O.87112817E1-002 O.3456667[F.OO O.95050485E+O03 0.44171570E+0O 0.99212629E+OO4 O.83780E+0O 0.55206010F+O0 O.99205408F+OO5 O.94260E+CO 0.65405827E+OO O.94927157E+OO6 O.10472E+01 O.74939343E+OO O.86519349E+007 O.11519E+CI O.83390693E+OO O.74329105E+008 O.12566E+01 0.90389954E+OO O.58882204E+OO9 0.13614E+OI. O.R5634352E+OO O.40833761F+0O

10 O.14661EiO1 O.98883598E+OO11 O.15708E+O1 0.I0000000E+O1 O.23847056E—0

ITERATION NUMBER = 3*** NODAL DOE CATA FOR ITFRAT IONS ***

ROUT MEAN SQ CF DIFFERENCES . . O.87376E—01ROOT MEAN SQ OF PREVIOUS VALUES = O.14989E+OlRATIO OF ABOVE QUANTITIES . . . = O.24972E—0INORMAL ENDING OF MODEL PROGRAM.

Page 233: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.41 (a) Subroutine CHANGE, and (b) subroutine CORECT

SUBROUTINE CHANGE (NDFREE,DD,000LC,TCTAL,DIFF,I RATIO,IPRINT)

CC CALCULATE TME MEAN CHANGE IN NODAL PARAMETERS FROMC LAST ITERATIONCCOP IMPLICIT REAL*8 (A—H 0—ZI

DIMENSION 000LDINOFREE)C * CHANGE SHOULD BE CALLED BEFORE CORECT *C RAT IC = 01FF/TOTALC 01FF = SQRT(SUM OF (DD(I)—000LDLIfl**21C TOTAL = SQRT(SUM OF 000LD(1)**2)C ODOLD = NODAL PARAMETER LIST FROM LAST ITERATICNC DO = NODAL PARAMETERS FROM CURRENT ITERATIONC = TOTAL NO OF DEGREES OF FREEDOM IN SYSC IF IPRINT.NE.O PRINT 01FF, TOTAL, AND RATIOCOP SQRT(Z) = DSQRT(Z)

01FF = 0.0TOTAL = O.LE—1O00 10 1 = 1,NUFREETOTAL = TOTAL + DDOLD(I)*000LD(I)

10 01FF = 01FF + (DO(1)—DDOLD(Ii)**2TOTAL = SQRT(TCTALI01FF = SQRT (01FF)RAT 10 = 01FF/TOTALIF ( LPRINT.EQ.O I RETURNWR1It (o,50001 01FF, TOTAL, RATiO

5000 FOR CURRENT ',1 'AND PREVIOUS iTERATIONS ***',//,2' ROOT MEAN OF DIFFERENCES . . . . . ',E16.5,/,3' ROUT MEAN SQ CF PREVIOUS VALUES . . . ',E16.5 /,4' RATiO OF ABOVE QUANTITIES . . . . . ',El6.5

RETURNEND

(a)

SUBRCUTINE CORECT (NOFREE,OL),000LC)CC CALCULATE NEW STARTING VALUES FOR NEXT ITERATIONC ** #***********************C OVER RELAXATION METHODCOP IMPLICIT REAL*B(A—H 0—fl

DIMENSION

DOC DOF iTERATIONC NDFREL TOTAL NO OF SYS DEGREES CF FREEDOM

DO it) I = 1 NDFREE10 00010(1) = 01)010(1) + OMEGA*(DDU1—DCDLD(I))

END

(b)

Table 10.5 Parameter Definitions for Least Square Solution of1(y) + N(y) = 0(x)

CONTROL:NSPACE = 1N=2NG = 2

DEPENDENT VARIABLES:1=y2= V = dy/dx

CONSTRAINTS:Type 1: specified values of y and/or V

Page 234: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

10.6 Plane frame structures 225

10.6 Plane frame structures

Weaver [74] has considered the detailed programming aspects of severalone-dimensional structural elements. Among them is the plane frameelement which has two displacements and one rotation per node. A typicalelement is shown in Fig. 10.42 where XM, YM are the member axes andx, y are the global axes. A frame element with an area of A, having amoment of inertia I, a length L, and made of a material having a modulusof E has an element square matrix (stiffness matrix) of

A 0 0 —A 0 0

12/3/L 6/3 0 — 12/3'L 6/3

41 0 —6/3 21(10.18)

A 0 0

12/3/L —6/3

sym. 41

where /3 = IlL and where the element displacements have been orderedas = [u1 v1 u2 V2 021. Weaver shows that to convert this expression toone valid in the global (x, y) coordinates one must consider how the nodaldegrees of freedom transform from the element axes to the global axes.This relation is shown to be

(10.19)

where the transformation matrix isrR: 0

T=I[0 R

and

i cx cy 01

R=I—cy cxL 0 0

where cx = cos and cy = cos are the member direction cosines. If oneis only interested in the deflections resulting from joint forces and momentsthese are the only equations that must be programmed. They are presentedin subroutine ELSQ in Fig. 10.43. As an example application considerexample structure three presented by Weaver. The structure and its loadsare shown in Fig. 10.44. The homogeneous element properties are E =10,000 ksi, A = 10 in2, and I = 1,000 in4. Nodes 2 and 3 are completely

Page 235: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

226 10. One-dimensional applications

restrained from translating or rotating. The displacements and rotation atnode 1 given by Weaver are — 0.0202608 in, — 0.0993600 in, and—0.00179756 radians, which are in good agreement with the MODELresults.

This problem involves three nodes (M = 3) with three degrees of freedomper node (NG 3), two elements (NE 2) with two nodes per element(N 2), and three (A, I, E) homogeneous properties per element(NLPFLO = 3, LHOMO = 1). There are no element column matrix con-tributions (NULCOL = 1) and the applied loads at point 1 must he con-sidered as initial contributions to the system matrix (ISOLVT = 1). Theinput data are shown in Fig. 10.45 and the MODEL output is in Fig. 10.46.The element is summarized in Table 10.6.

Fig. 10.42 A plane frame element

Fig. 10.43 Subroutine ELSQ

U2

XM

SUBROUTINE ELSQ (N NELFRE NSPACE 1P51 KP3,COOI!(D,D,ELiROP,LPAOP,ISRTLPT,FLTMIS,2

CC GENERATE ELEMENT SQUARE MATRIXCCOP IMPLICIT REAL*8(A—H,O—fl

DIMENSION COORD(N.NSPACEJ, D(NELERE), ELPROP(KP2),1 5(NELFRE,NflFRE),2 PRTLPT(1P5,KPjj, FLTMIS(KP3J

C N = NUMBER Of NODES PER ELEMENT

'i'M

U1

y

6,,

Page 236: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.43—continued

C NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 NUMBER Of COLUMNS IN ARRAYS LPFLX ANC LPROPC KP1 = NUMBER OF COLUMNS IN FLTNP & PRTLPT PTPRCPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLIEL AND ELPRCPC KP3 = NUMBER OF COLUMNS IN ARRAY FLTMISC COORD = SPATIAL COORDINATES OF ELEMENT'S NCDESC 0 = NODAL PARAMETERS ASSOCIATED WITH AN ELEMENTC FIPROP = ELEMENT ARRAY OF FLOATING PT PRCPERTIESC LPRCP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PRCP FOR ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE OF FLOATiNG PT MISC PROPC S ELEMENT SQUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 01

C *** ELSQ PROBLEM DEPENDENT STATEMENTS FCLLCWC ... .... .......C APPLICATION: PLANE FRAME ANALYSISC NSPACE = 2, N = 2, NG = 3 NLPFLG = 3 NELFRE = 6C ELPRCP(11 = AREA, ELPROP(h = MOMENT INERTIAC ELPROP(3) = MODULUS OF ELASTICITY

DIMENSION SM(6,6), 1(6,61, DUM14Y(6,61C INITIALIZE ZERO TERMS IN SM AND I

DATA SM,T/36*0.O,36*O.0/COP SQRT(Z) = DSQRT(Z)C DEFINE ELEMENT PROPERTIES

A = ELPROPU)ZI = ELPROP(2)E = ELPROP(3)

C FIND MEMBER LENGTH AND DIRECTION COSINESDX = COORD(2,11 — COORD(1,1)DY = COORD(2,2) — COORDU,2JFL = SQRT (DX*DX + DY*DV)CX = DX/FLCV = DY/FL

C DEFINE NON—ZERO TERMS IN MEMbER STIFFNESS MATRIXEDL E/FLBETA = ZL/FLSM(1,1) = ASEOLSM(2,2) 12.*EDL*BETA/FLSM(2,31 = 6.*EDL*BETASM(3,21 = SM(2,3)SM(3,3) = 4.*EDL*ZISM(1,4) = —A*EDLSM(4,Ij = SM(1,4)SM(4,4) = A*EDLSM(2,51 = —SM(2,2)

= SN(2 5)SM(3,5) = 3)SM(5,31 =SM(5,5) SM(2,2)SM(2,61 = SM(2,3)SM(6,2) = SM(2 6)SM(3,61 = 2.*E&*ZISMI6,31 = SM(3 6)SM(5,6J = 31SM(6,5) = 514(5

= 4.*EbL*ZjC DEFINE NON—ZERO TERMS IN THE TRANSFORMATION MATRIX

1(2:2) CX1(3,3) = 1.T(4,43 = CX1(5,5) = CX1(6,6) = 1.1(1,2) = CV1(2,1) = —CVT(4,5) = CVT(5,4) —CV

C TRANSFORM STIFFNESS MATRIX TO GLCBAL CCORDINATESCALL MMULT (SM,T,DkJMMY,6,6,ô)

RETIRN(T,DIJMMY,$,6,6,6)

END

Page 237: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

.3,2,3,2,2,0,O,O,3,O ,0,0,j .0,1,0,0,0,0,11 CCC 100.

Ill 2o8.1 2 1

2 1 2

2 1 0.02 2 O.C2 3 D.C3 1 C.O3 2 Q.C

3 0.C1 10. ICOO.

2 -323

., 3 0.0

ELEMENT PROPERTIES ARE HOMOGENECtJs.NODAL PARAMETERS TO BE LISTED BY PJOOES*** NODAL POINT tATA ***NnDr, CCNSTRAINT INDICATOR, 2

3 111 200:0000

FIg. 10.44 Plane frame structure

2

in K

©

100"

75"

Fig. 10.45 Plane frame analysis, test problem data

I000C.

Fig. 10.48 Plane frame analysis (see Weavers example structure three), test problemoutput

PRC6LEP PARAMETERS *****NUMBER flF NCDAL PCINTS IN SYSTEM =.......... 3

MJt4RFR OF PARAMETERS PER NODE 3DIMENSION CF SPACE =.. ... .......... 2NUMBER OF BCUNDARIES WfTH 0NUMBER CF NODES CN BOUNDARY SEGMENT=........ 0INITIAL FORCING VECTOR TO BE INPUTNUMBER OF FIXED PT PROP PER NODE =.... 0NUMBFR OF FLOATINC PT PROP =. 0NUMBER OF FIXED PT PROP PER ELEMENT =....... 0NUMPER CF FLOATING PT PROP PER ELFNFNT =.... 3NUMBER OF FIXED PT MISC PROP 0NUMBER OF FLOATING PT MISC PROP =........... 0

CCnPOINATFS

0.OOCO

Page 238: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 10.46—continued

*** FLEP"ENT DATA **S2 NOCAL INCIDENCES.

1 2 1

2 1 3

*** CCNSTRAINI EQUATION DATA ***

CONSTRAINT TYPE CNECO. NC. NCDFJ PARI Al

1 2 1 .00000000E+OO2 2 2 .00000000E+OO3 2 3 .00000000E+OO

i .0000C000E+CO'5 3 2

3 3 .30000000E+OO***

ELEMFNT NO. PRCPEPTY NO. VALUEt I 0.IOOC0000E+021 2 O.10000000E+041 3 O.100C0000E+C5

END OF PT PROPFPTIFS CF ELEMENTS

*** INITIAL FCRCING VECTOR DATA **tNODE VALUE DPF

1 2 —O.32000000E+C2 21 3 —O.10500000E+C4 33 3 O.00000000E+CO 9

$*S OUTPUT OF RESULTS ***NODE, 2 COORCINAIES, 3 PAPAMETFRS.I 1.00E2 1.5F1 —2.03E—0? -9.c4E—02 —L.80E--032 O.OOFO 7.5E1 —2.03E-14 —9.4RE—15 -5.92E—163 2.00E2 C.OEO 3.79E—14 —9.43E—I4 2.OOF—T'5NORMAL ENDING CF MODEL PROGRAM.

Table 10.6 Parameter Definitions for a Plane Frame

CONTROL:NSPACE = 2 NLPFLO = 3N=2 NULCOL=1NG=3 ISOLUT=1

DEPENDENT VARIABLES:1 = x-component of displacement, u2 = y-component of displacement, v3 = z-rotation, 0

PROPERTIES:Element level:

1 = cross-sectional area, A2 = moment of inertia, I3 = modulus of elasticity, E

CONSTRAINTS:Type 1: specified nodal displacements and/or rotationsType 2: inclined rollers, or rigid members, etc.

INITIAL VALUES OF COLUMN VECTOR:Specified external nodal forces or moments

Page 239: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 240: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11

Two-dimensionalapplications

11.1 Introduction

From the very beginning finite element methods have been applied totwo-dimensional problems. The three node (linear) triangle has been util-ized in the derivation of the element matrices for several engineeringapplications. Most of the current texts present the results for such appli-cations as stress analysis, heat conduction and ground water seepage. Thefour node rectangular (bilinear) element has also been presented in somedetail but it is not often used due to the difficulty of fitting complexengineering shapes with rectangles. Meek [53] made a useful contributionin presenting the closed form element matrices for a six node (quadratic)triangle applied to the Poisson equation. The equations given by Meek arequite useful and should be of interest to a beginner. However, one soonlearns that it is easier to program such elements when numerical integrationis utilized.

A significant feature of this section is the detailed formulation of iso-parametric elements (see Section 11.3). This section, combined with Section5.3, should supply the reader with the ability to master this very usefulconcept. The extensions of the isoparametric element to a three-dimen-sional application will be considered in Section 12.2 to illustrate how easyit is to change from one element type to another.

This chapter will also begin to introduce the reader to some of the usefulcapabilities of the MODEL program that may not be immediately apparent.For example, it will be shown how one can reduce the data requirementsfor non-homogeneous problems by assigning to each element a materialnumber and a corresponding array of floating point properties.

231

Page 241: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

232 11. Two-dimensional applications

11.2 Plane stress analysis

The application of the finite element method to the plane stress analysisof solids has been considered in detail in several texts[14, 25, 29, 34J. Theelement matrices for the three node linear displacement (constant strain)triangle have been presented by Ural [7], Gallagher [34], and others. Thenodal parameters are u and v, the nodal displacement components in thex- and y-directions, respectively. If one orders the element degrees offreedom as = [u1 u2 v2 u3 v3] it has been shown that the element loadvector due to distributed body forces per unit volume are

xY

x(11.1)

xV

where A is the area of the triangle and where X and Y denote thecomponents of the distributed body force. The element square matrix (Orstiffness matrix) for an element of constant thickness, t, is

= BeTDeBetA

where

0 b1 0 bm 0

0 C1 0 Cm (11.2)

b1 Cj b Cm bm

denotes the strain-displacement matrix (i.e. Ee = Beôe), and where thematerial constitutive matrix for an isotropic material is

$ vpol$ 0 (11.3)

sym. G]

with f3 E/(1 — and G = E/2(1 + v). In the latter equation, F equalsthe modulus of elasticity, i' is Poisson's ratio, and G is the shear modulus.Although G, in theory, is not an independent variable, one often encountersapplications where it is desirable to treat G as a third material property.

Page 242: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.2 Plane stress analysis 233

Thus, the MODEL code requires the user to define E, v, and G in theinput data.

The constants in the B matrix are defined in terms of the spatialcoordinates of the element's nodes. For example, b, = y, — Ym and c1 =Xm — and the other terms are obtained by a cyclic permutation of thesubscripts. The strains and stresses under consideration are =

y',] and c try] where = DeEe. If one has appliedsurface traction components on an element boundary segment then thecontributions to the boundary column matrix are as shown in Fig. 4.1.

Thus far, the problem under consideration is two-dimensional(NSPACE = 2), involves triangular elements (N = 3), with six [E, ii, G,t, X, Y) floating point properties (NLPFLO = 6), and two nodes per typicalboundary segments (LBN = 2). In addition, each node has two nodalparameters (NG = 2) so that the element has a total of six degrees offreedom. The above discussion provides enough data to calculate the nodaldisplacements of the mesh. Generally, the post-solution calculation ofstresses and strains is important to the analyst. Since these quantities areconstant in this type of element, they are usually listed as occurring at thecentroidal coordinates of the element. The constant stress—displacementand strain—displacement matrices are generated by subroutine ELSQ, Fig.11.1. These quantities are passed through the named common ELARG tosubroutine ELPOST along with the global coordinates of the elementcentroid. If NTAPE1 > 0, subroutine ELPOST simply writes these dataon unit NTAPEI for later use by subroutine POSTEL. Similarly, ifNTAPE1 > 0, subroutine POSTEL is called after the nodal displacementshave been calculated. It reads the above data, extracts the element's nodaldisplacements and multiplies them by the strain—displacement andstress-displacement matrices to obtain the element strains and stresses,respectively. Then the element's number, centroidal coordinates, stressesand strains are printed. After the post-solution calculations have beencompleted, one may elect to request the calculation of the displacementcontours. This element is summarized in Table 11.1.

The problem-dependent portions of the element subroutines are shownin Figs. 11.1 to 11.4. As a numerical example consider the problem pre-sented in detail by Ural [72]. As shown in Fig. 11.5, the problem has twoelements (NE = 2) and four nodes (M = 4). The two nodes (1 and 2) onthe left are completely fixed and at node 3 there is a 25 k = 25,000 lb loadin the positive x-direction. No other loads are present (X = V = 0) and thematerial has properties of E = 30,000 ksi and v = 0.25 so that G =12,000 ksi. The properties are homogeneous (LHOMO = 1) and eachelement has a thickness oft = 2 in. The input data are shown in Fig. 11.6and the output is presented in Fig. 11.7. The results agree with these given

Page 243: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

234 11. Two-dimensional applications

by Ural but the present solution is more accurate since only slide-ruleaccuracy was utilized in the former solution.

Many stress analysis problems involve non-homogeneous properties. Itmight prove inconvenient to specify all these properties for each element.Thus, several finite clement codes allow a user to assign a single materialnumber code to each element. This code is utilized along with a table ofmaterial properties to define the properties of each element. This sameconcept is easily implemented in the MODEL code. Subroutine MATPRT,shown in Fig. 11.8, can be used for this purpose. The list of materialproperties for each material number is stored in order of material numberin the miscellaneous floating point system array FLTMIS. That is, if thereis a maximum of NMAX materials each having NLPFLT floating pointproperties then array FLTMIS contains NMAX sub-arrays each havingNLPFLT floating point numbers (MISCFL = NMAX * NLPFLT). Giventhe material number, NUM, this subroutine extracts the appropriateproperties list from FLTMIS and stores it in a material array calledPRTMAT. Of course, the latter array must be dimensioned in one of theproblem-dependent subroutines. The integer material number of eachelement is input by the user in array LPFIX (i.e. NLPFIX 1) and it existsat the element level in LPROP(1). Recall that array LPFIX is initiallyzeroed; thus, one only has to input element material numbers that aregreater than 1 if one defines LPROP(1) = 0 or =1 to both imply a materialnumber of unity in the problem-dependent subroutines that call MATPRT.The typical changes in the previous program to utilize this concept areshown in later applications.

To illustrate the effects of a surface traction load, consider the problemshown in Fig. 11.9. The problem dependent subroutine BFLUX for thisloading condition is shown in Fig. 11.10. This problem was worked out ingreat detail, with slide-rule accuracy, by Ural in Example 5.2 of his secondtext [721. The problem involves five nodes (M = 5), and four elements(NE = 4,N = 3,NG = 2).Theplatehasathicknessoft 1.5in.,aYoung'smodulus of E 29,000 ksi, and a Poisson's ratio of ii = 0.3. There are nobody force loads (X = Y = 0) and no externally applied nodal loads(ISOLVT = 0).

Nodes 1 and 2 are completely fixed and a surface traction is applied toedge 5—4 (NSEG = 1, LBN = 2). The traction consists of constant x- andy-components of 1/3 k/in 0.333 k/in, T),4 = 0.0). The cal-culated displacements and stresses agree with the results of Ural asexpected. The input and output data for this example are in Figs. 11.11and 11.12, respectively.

In general one would want to define the surface tractions in normal andtangential components. The additional computations in this approach

Page 244: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.2 Plane stress analysis 235

involve finding the direction cosines of the boundary segment and usingthese data to calculate the corresponding resultant x- and y-components.

Note that the stiffness matrix involved a product of the form B'DB wherethe matrix D is symmetric. This form will occur in most of the linear finiteelement problems. Thus it is desirable to calculate this product in anefficient manner. Subroutine BTDB, shown in Fig. 11.13(a), is designedfor that purpose. since D is often a diagonal matrix, a special version,BTDIAB, is given in Fig. 11.13(b).

Fig. 11.1 Subroutine ELSO

SUBROUTINE ELSQ LN,NELFRE,NSPACE,1P5,JP2,KPI,KP211 KP3,COORD,D,ELPROP,LPROP,PRTLPT,FLTMIS,2 S,NTAPEI,NTAPE2,NTAPE3,NJAPE4)

CC GENERATE ELEMENT SQUARE MATRIXCCDP IMPLICIT REAL*8(A—H,O—Z)

DIMENSION COORD(N,NSPACEJ, O(NELFRE), ELPRCP(KP2I,1 LPROP(JP2), S(NELFRE,NELFREI,2 PRTLPTUP5,KPII, FLTMTS(KP3J

C N NUMBER CF NODES PER ELEMENTC NELFRE NUMBER OF DEGREES OF PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRILPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFJX AND LPROPC KPI = NUMBER OF COLUMNS IN FLTNP E PRTLPT PTPRDPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND ELPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORO = SPATIAL COORDINATES UF ELEMEI\T'S NCDESC 0 = NODAL PARAMETERS ASSOCIATED WITH AN ELEMENTC ELPRCP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPROP = ARRAY OF FIXED POINT PROPERTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NCDESC FLTNJS = SYSTEM STORAGE OF FT MISC PRCPC S = ELEMENT SUUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED > 0)CC *** ELSQ PROBLEM DEPENDENT STAIEMEt7S FCLLCW ***CC APPLICATION: PLANE STRESS. ISOTROPIC MATERIAL, CSTC NSPACE = 2, N= 3, NG = 2, NELFRE = 6 NLPFLC = 4C ELPRGPLI) = ELASTIC MODULUS ELPROP(21 POISSON RATIOC ELPRCP(33 = SHEAR MODULUS EIPROP(41 = THiCKNESSC ELPRCP(51 = X—BODY FORCE ELPRCP(6J = V—BODY FORCEC B = ELEMENT STRAIN—DISPLACEMENT MATRIXC ON = MATERIAL CONSTITUTIVE MATRIXC STRESS = ELEMENT STRESS—DISPLACEMENT MATRIX

CCMMUN /ELARG/ X8,YB1E,V,G,T,FX,FY,B(3,6),1 STRESs(3,6),DM(3,3),AREA

CATA KALL/1/C—-> DEFINE NODAL COORDINATES

XI = COORD(I,1XJ = COORD(2,1XX = CDORD(3,1)Yl = COORD(1,2iYJ COORD(2,2)YK = COORD(3,21

C——> DEFINE PROPERTIESE = ELPROP(1)V = ELPROP(2)C = ELPROP(3)T = ELPROP(4)FX = ELPROP(51FY ELPROPI6)

C DEFINE CENTROID COORDINATESXB = (XI + XJ + XKI/3.YB = (YI + YJ + YK)/3.

Page 245: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.1—continued

C——> DEFINE GEOMETRIC PARAMETERSAl = XJ*YK—XK*YJAJ = XK*YI—XI*YKAK = XI*YJ—XJ*YIBI = YJ—YKBJ = YK—YlBK = YI—YJCl = XK—XJCJ = X1—XKCK = XJ—XI

C CALCULATE ELEMENT AREATWOA = Al + AJ + AKAREA =TA = T*AREA

C——> (N 1I-E FIRST CALL DEFINE ZEROI

KALL = 0DM11.31 0.0DM(3,11 = 0.0DM12.31 = 0.0DM13.2) = 0.0611,21 = 0.08(1,4) = 0.0E(1,6J = 0.0B(2,1) = 0.06(2,3) 0.06(2,51 = 0.0

C—--> DEFINE VARIABLE TERMS IN DM AND 610 DMII,1) E/(1.—V*V1

DM12.21 = E/(1.—V*V)01413,3) = GDM11.21 = V*E/(1.—v*V)DM12.11 = V*E/(1.—V*V)6(1,1) = 8I/T&iOA8(1,31 =6(1,51 = &K/TWCA

=B(2,4) =

= &.K/TkOA6(3,11 =6(3,31 = CJ/TWCA6(3,51 = CK/TWOA8(3,2) =6(3,4) = BJ/ThOA8(3,61 = BK/TkOA

C FORM STRESS—DISPLACEMENT MATRIXCALL MMULT (DM,B,STRESS,3,3,6)

C——> COMPLETE STIFFNESS MATRIX K= 61*014*8CALL tUMULT (B STRESSCALL MSMULT (Tl,S,6,61RETURNEND

Page 246: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.2 Subroutine ELCOL

SUBROUTINE ELCOL (N,NELFRE,NSPACE,1P5,JP21KP1 KP2,1 KP3,COURD,D, PRTLP u,FIJMIS,2 C,NTAPEI,NTAPE2,NTAPE3,NIAPE4)

CC GENERATE ELEMENT COLUMN MATRIXC ** ********** **** ***** *** **CDP IMPLICIT REAL*8(A—H,O—ZI

DIMENSION COORD(N,NSPACEI, D(NELFRE), ELPRCP(KP2I,1 LPRCjP(JP2), C(NELFREI, PRTLPT(1P5,KPI),2 FLTMISIKP3I

C = NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = UIMENSION CF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMbER OF COLUMNS IN ARRAYS LPF1X AND LPROPC KP1 = NUMBER OF COLUMNS IN FLTNF E FRTLPT PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FuEL AND ELPROPC I(P3 = NUMBER OF COLUMNS IN ARRAY FLTMISC COORO = SPATIAL COORDINATES OF ELEMENT'S NCDESC 0 = NODAL PARAMETERS ASSOCIATED WiTH A ELEMENTC ELPRCP = EL€DIENT ARRAY OF FLOATING POINT PROPERTIESC LPROP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP OF ELEMENT'S NODESC FLTMIS SYSTEM STORAGE OF FLOATING POINT MISC. PROPC C = ELEMENT COLUMN MATRIXC NTAPE1 = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED Wt-EN > 01

C •... •• •.... .••• ..C ELCOL PROBLEM DEPENDENT STATEMENTS FCLLCW ***C ... .C APPLICATION: PLANE STRESS, ISOTROPK. MATERIAL, CSTC NSPACE = 2, N= 3, NG = 2, NELFRE = 6, NLPFLC = 4C EIPRL)P(l) = ELASTIC MODULUS ELPROP(2) = POISSON RATIOC ELPROP(31 = SHEAR MODULUS ELPRGP(41 = THICKNESSC ELPRCP(51 = X—BODY FORCE ELPRCP(6I = Y—BGDY FORCE

COMMON /ELARG/ XB YB2E,V,G,T,FX,FY,8(3,o),1

TA = T*AREACX = TA*FX/3.CV = TA*FY/3.

C———> BODY FORCE LOADSC(11 = CX0(21 = CYC(3) = CXC(41 = CYC(5) = CXC(6) = CYRET L. RNEND

FIg. 11.3 Subroutine ELPOST

SUBROUTiNE ELPCST (NTAPEI,NTAPE2,NTAPE3,NTAPE4)CC GENERATE DATA FOR POST SOLUTICN CALCULATICNSCCDP IMPLICIT REAL*8(A—H 0—flC NTAPEI = UNIT FOR SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WI-EN > 0)C .

C *** ELPOST PROBLEM DEPENDENT STATEMENTS FOLLOW ***CC APPLICATION: PLANE STRESS, ISOTROPIC MATERIAL, CSTC——> STORE DATA FOR STRESS AND STRAIN CALCULATIONSC B = ELEMENT STRAIN—DISPLACEMENT MATRIXC STRESS = ELEMENT STRESS—DISPLACEMENT MATRIX

/ELARG/ XB,YB,E,V,G,T,FX,FY,B(3,6),1 STRESS(3,61,DM(3,31,AREAWRITE (NTAPEL) XB,YB,B,STRESSRETIRNEND

Page 247: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.4 Subroutine POSTEL

SUBPGUTINE POSTEL (NTAPE1,NELi-RE,C iF NJAPE2,I NTAPE3,NTAPE4,II,NITER,NE,t'l

CC ELtMENT POST SOLUTIONCC NTAPEL = UNIT FUR POST SOLUTION MATRICES SICRAGEC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC C NODAL PARAMETERS ASSOCIATED WITH THE ELEMENTC IF = ELEMENT NUMBERC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 0)C IT = CURRENT ITERATICN NUMBERC NITER = MAX IMUI4 NUMBER OF ITERATICNSC NE = TOTAL NUMBER OF ELEMENTSC N = TOTAL NUMBER OF NODESCOP IMPLICIT REAL*8 (A—H,Q—Z)

DIMENSION D(NELFRE)

C ...... .C *** PQSTEL PROBLEM DEPENDENT STAIEMENTS FOLLCW 4**C ....... .C APPLICATION: PLANE STRESS, ISOTROPIC MATERiAL, CSTC NSPACE = 2, N= 3 NG = 2, NELFRE = 6 NLPFLC = 4C——> CALCULATE STRESSES AND STRAINS Al CENTROLO

/ELARG/1

C E ELEMENT CENTROIDAL STRAINSC SIC = ELEMENT CENTRUIDAL STRESSES

DATA KODE/1/C——> PRINT HEADINGS CM FIRST CALL

IF ( KODE.EQ.O I GO TO 10WRITE (6,50U0)

5000 FORNAT ('1* * * ELEMENT STRESSES * * *',/,1' ELEMENT',SX,'X' .1,

10 REAC ( NTAPE1) XB,YB,B,STRESSC——) CALCULATE STRAiNS

CALL MMULT 48,D,E,3,6,1)C——> CALCULATE STRESSES

CALL MMULT (STRESS,D,SIG,3,6,i)C PRINT RESULTS

WRITE (6,5010) IE,XB,YB,(E(K),K=L,3),(SIG(L),L=1,3)5010 FORMAT (15,2F10.2,6E11.3)

PETEND

FIg. 11.5 Plane stress problem with nodal forces

25k

Page 248: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.6 Plane stress analysis (Ural's example); test problem data

PLANE STRESS ANALYSIS SPACES)2, 2, 3,2, 0, 2,0 ,3, 1,00, 0,6, 0,0, 0, 1,0, 1,8 ,o, 0,0

1 11 0.0 0.02 II 0.0 12.03 00 18.0 12.04 00 18.0 0.0

1 1 3 22 1 4 31 1 0.C1 2 0.02 1 0.02 2 0.C

,1 30000.,0.25, 12000.,2.0. C.0, 0.03 1 25.04 2 0.0

FIg. 11.7 Plane stress analysis (Ural's example); test problem output

***SS PARAMETERS *****NUMBER OF NODAL POINTS IN SYSTEM = 4

OF (N SYSTEM — 2NUMBER OF NODES PER ELEMENT = 3NUMBER OF PARAMETERS PFP Nfl"F — ..... 2DIMFNSIONOF SPACE = ...... 2NUMBFQ CF BCUNCARIES WITH GIVEN FIUX= 0NUMBER OF NODES CN BOUNDARY SEGMFNT=........ 2NUMBER OF CCNTCUR CURVES

5TH C 9BTH PERCENTILE OF EACH PARAMETER =INITIAL FORCING VECTOR TO RE INPUT

OF FIXED PT PROP PER NODE =. ... 0NUMBER OF FLOATING PT PROP PER NODE 0NUMBER flF FIXED PT PROP PFR ELEMENT =....... 0NUMBER OF FLOATING PT PROP PER ELEMENT .... 6NUMBER OF FIXED PT MISC PROP = 0NUMBER OF FLOATING PT MISC PROP =.... ()

PROPEPTIFS ARE HPMOGFNFCUS.OPTIONAL UNIT NUMRERS (UTILIZED IF > 0)NTAPEI=8 NTAPF2=O NTAPE3=r) NTAPE4=ONODAL TO BE 1ISTFD BY WOOFS*** NODAL PCUST DATA *S*NODE, INDICATOR, 2 COORDINATES

1 11 0.0000 0.00002 11 0.0000 12.00003 0 18.0000 12.00004 0 18.0000 0.3000

*** ELEMENT CONNECTIVITY DATA ***ELEMENT NO., 3 NODAL INC!CFNCFS.

1 1 3 22 1 4 3

*** CONSTRAIN1 EQUATION DATA ***OCONSTRAINT TYPF ONEEQ. NO. NOOFI PAR1 Al

1 1 1 .0000CF#O02 1 2 .00000F+003 2 1 .0000CEiOO4 2 2 .00000F+00

*** ELEMENT PROPERTIES ***NC. PRCPERTY NP.

1 1 0.30000E+Os1 2 O.25000E+001 3 O.12000E+051 4 0.20000E+0Ij S 0.00000F+o01 6 0.00000E+0O

END OF FLOATING PT PROPERTIES OF ELEMENTS

Page 249: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.7—continued

*** INITIAL FCRCING VECTOR DATA ***NODE PARAMETER VALUE DOE

3 1 O.25000000E+02 54 2 O.00000000E+CO 8

*** DUTPUT OF RESULTS ***NODE, 2 COORCINATES, 2 PAQAMETERS.I O.O0F+0O O.COF+0O —0.1654E—?3 O.1q69F—152 O.OOE+O0 C.12EG02 —O.1969E—153 0.IBE+02 C.12E+02 O.9061E—03 —O.4723E—034 0. 18E+02 C.COE+O0 O.2619F—03 —O.S090E—03

* * * ELEMENT STRESSES * * *ELEM X Y STRAIN: XX, VY, XYELEM STPESS: XX, VY, XV

1 6.0 8.0 O.503E—04 —O.328F—16 —0.262E—041 O.161F+O1 O.403F+OO —0.315F+O02 12.0 4.0 O.262E—042 O.472F+OO O.?tCr.OO O.315E+0O

*** EXTREME VALUES OF THE NODAL PARAMETERS ***PARAMETER NC. MAX. VALUE,NODE MIM. VALUE,NODE

I o.9O61B5e7E—03 , 3 , I2 0.l9693l73F—15 , I —O.50907353F—03 , 4

NORMAL ENDING OF MODEL PROGRAM.

Fig. 11.8 (a) Subroutine MATPRT, and (b) subroutine MATWRT

SUBROUTINE MATPRT (NUM NLPFLO,MISCFL FLTMIS,PRTMATICC EXTRACT FLOATiNG PT MATERIAL PROPERTiES CF MATERIALC MUM FROM MISCELLANEOUS FLOATING PT SYSTEM PROPERTIESCCOP iMPLICIT REAL*8 (A—H 0—fl

DIMENSION PRTMAT(NLPFLG)C MUM = MATERIAL NUMBERC = MAXIMUM ALLOWABLE MATERiAL NUMBERC NUMBER OF FLOATING POINT ELEMENT PRCPERTLESC MISCFL = NO OF MISC FLOATING POINT SYSTEM PRCPERTIESC FITMIS = SYSTEM STORAGE FOR MISC FLOATING POINT PROPC PROPERTIES ARE STORED IN FLTMIS tROER OF MAT NOC PRTMAT = FLOATING POINT PROP. ARRAY FOR MAIERIAL MUM

= MISCFL/NLPFLCIF ( NUM.GT.NMAX I WRITE (6,50001

5000 FORMAT (' DIMENSIONS EXCEEDED IN SUBROUTINE MATPRT')ISTART = NLPFLO*(NUM — 1)00 10 I = I NLPFLO

10 PRTMATIL) = kTMLS(LSTARIPIIRET RNEND

(a)

SUBROUTINE MATWRT (NLPFLO,MISCFL,FLTMIS PRIMAT)CC LIST FLOATING POINT PROPERTIES BY MATERIAL MJMBERC *t********** **************COP IMPLICIT REAL*8 (A—H 0—ZI

DIMENSION FLTMIS(MILCFL), PRTMAT(NLPFLG)C = NUMBER OF FLOATING POINT ELEMENT PROPC MISCFL = NUMBER OF MISC FLOATING SYSTEM PRCPC FLTMIS SYSTEM STORAGE OF MISC FLOATING PCLNT PROPC PRIMAl = FLOATING POINT PROP ARRAY FCR MATERIAL NUMC M4AX = MAXIMUM ALLOWABLE MATERIAL MJMBER

= MISCFL/NLPFLOWRITE (6,5000) NLPFLC

5000 FORMAT ('I *** LiST OF FLOATING PCINT ',I'MATERIAL PROPERTIES ***',//,2' MATERIAL NUMBER,',18,' FLOATING PCINT PRCPERTI ES')00 10 I 1,NMAXCALL MATPRT (I NLPFLOWRITE (6,5010) l,(PRTMAT(J),J=1,NLPFLOJ

5010 FORMAT (I1O,(10E12.5)I10 CONTINUE

RET L. RNEND

(b)

Page 250: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.9 Plane stress with surface traction0.333 k/in

Fig. 11.10 Subroutine BFLUX

SUBROUTINE BFLUX (FLUX,COORD LBN,NSPACE,NFLLX,1 NG,C,S,ICPh

CC PROBLEM DEPENDENT BOUNDARY FLUX CONTRIBUTIONSCCDP IMPLICIT REAL*8 (A—H,O—ZI

OIMENSICN COCRD(LBN,NSPACEI, C(NFLLX),1 S(NFLL,X,NFLUX)

C FLUX = SPECIFIED BOUNDARY FLUX COMPONENTSC COORD SPATIAL COORDINATES OF NCDESC LBN = NO. OF NODES ON AN ELEMENT OOUNDAR'% SEGMENTC = DIMENSION OF SOLUTION SPACEC NFLUX = LBN*NG = MAXIMUM NUMBER OF TLUXC CCC =C MATRIXC C

SC = C

PROBLEMCC 2 COMPONENTS (N LINECOP = DSQRT(Z)

1OPT = IDX COORD(2,13 — COORO(1,1)DY = COORD(2,2) — COORD(1,2)CL = SQRT (DX*DX + DY*DYI

= DL/6.C ODD = X FORCE, EVEN = Y FORCE

CU) DLD6*( 2.*FLUX(1,l1 + &LUX(Z,11 I

C(2) = DLD6*( 2.*FLUX(l,21 + j

C(3) = FLUX(1,1) + 2.*FLUX(2,1) I

C(4) = ULD6*( FLUX(l,2) + 2.*FLU)U2,21 )

RET U RNEND

Page 251: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.11 Plate with surface fraction (Ural's example 5.2); test problem data

5 4 2 3 2 1 2 0 0 0 0

0 0 0 6 0 0 0 1 0 1 8 0

1 11 0.0 0.02 11 0.0 60.03 00 36. 30.4 00 72. 60.5 00 72. 0.01 3 2

2 2 3 43 1 5 34 3 5 4

1 0.02 0.0

2 1 0.02 2 0.01 29000. 0.3 11154. 1.5 0.0 0.05 4

0.3333333 0.0 0.3333333 0.0

Fig. 11.12 Plate with surface traction (Ural's example 5.2); test problem output

***** PROBLEM PARAMETERS *****NUMBER OF NODAL IN SYSTFU — •• 5NUMBER Of EIEMFNTS IN SYSTFM .............. 4NUMBFR OF NODES PER ELEMENT — .... INUMBER OF PARAMETERS PER NtV)F =............. ?DIMENSION OF SPACE =. 2NUMBER ('F BOUNDARIES WITH GIVFN FLUX= I

NUMBER OF NODES ON BOUNDARY SEGMENT=........ 2NUMBER OF CONTOUR CURVES BETWFFN

5TH C 95TH PERCENTILE OF EACH PARAMFTFP = 0INITIAL FORCING VECTOR TO RE INPUTNUMGFR OF FIXED PT PROP NODE = .... 0

OF FLOATING PT PROP PER NODE —NUMBER OF FIXED PT PROP PER . 0NUMBER OF FLOATING PT PROP PFR EIEMFNT .... 6NUMBER OF FIXED PT MISC PROP = ..... 0NUMBEP OF FLOATING PT MISC PROP - .... 0

ELEMFNT PROPERTIES ARE HOMOGENEOUS.OPTIONAL UNIT NUMBERS (UTILIZFD IF > 0)NTAPEIB NTAPE2=0 NTAPEI=O NTAPE4=ONODAL PARAMETERS TO BF LISTED BY NCDES

*** NODAL POINT DATA ***NCOE, CONSTRAINT INDICATOR, ? COOPDINATFS

1 11 0.0000 0.00002 11 0.0000 60.00003 0 36.000° 30.00004 0 72.0000 60.00005 0 72.0000 0.0000

*** ELEMENT CONNECTIVITY DATA ***ELFMPNT Nfl., 3 NODAL INCIflFNCFS.

1 1 3 22 2 3 43 1 5 36 3 5 4

*** CONSTRAINT EQUATION DATA ***CONSTRAINT TYPE ONEEQ. NO. NOOFI PARI Al

1 1 1 .00000000E+002 1 2 .00000000E÷O03 2 1 .00000000E+O04 2 2 .00000000E#O0

Page 252: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.12—continued

*** ELEMENT PROPERTIES ***ELEMFNT NO. PPCPERTY NO. VALUE

1 1

1 21 3 O.11154000E+051 4 O.15000000E+01I S O.000C0000E+001 6

END OF FLOATING PT PROPERTIES OF ELEMENTS

*** ELEMENT BOUNCAPY FIUXFS ***SEGMENT 2 Nr3rWS,/,

2 FLUX COMPONFNTS PER NODE1 5 40.3333 0.00.3333 0.0

t** OUTPUT OF RESULTS ***2 2 PARAMFTFPS.

I 0.OOE+OO 0.COE+00 0.00000E+OO2 0.OOF+O0 O.OOE+0O 0.00000E+O03 O.36E+02 C.60E+02 O.24387E—03 0.30493F—194 O.72E402 O.60E400 O.534c5E—03 —0.90230E—045 0.12F+02 O.COE+O0 0.53455F—03 O.90230E—04

* * * ELEMENT STRESSES * * *ELFM X V STRAIN: XX, YY, XYELEM SIPESS: XX, YY, XV1 12.0 30.0 C.677E—05 O.000F+O0 O.847E—21I 0.21',E#OO 0.945E—172 36.0 50.0 O.142E—05 —O.150F—05 —O.473F—062 O.222E+OO O.231F—01 —0.528E—023 36.0 10.0 O.74?E—05 0.473E-063 O.22?E+O0 0.231E—O1 O.528E—024 60.0 30.0 0.807E—05 —0.301E—05 —O.212E—214 0.229E+0O —0.187F--01 O.260E—17NORMAL ENDING (iF MODEL PPO5PAM

Ag. 11.13 (a) Subroutine BTDB, and (b) subroutine BTDIAB

SUBROUTINE BlOB (O,B,C,M,N,IOPT,SICC SPECIAL MATRIX MULTIPLICATiON OPERATIONC IF IOPT=0, C =C. IF IGPTL, C = (BIT*D*B*S + CCCOP IMPLICIT kEAL*8 IA—H 0—fl

DIMENSILN M) GIN N)C C(M,MI = SQUARE MATAIXC B(M,Ni = RECTANGLUAR ARRAYC CIN,N3 = RETURNED SYMMETRIC MATRIXC S = SCALAR COEFFICIENT

50 L = 1,NCO 40 K = 1,LSUM = 0.00DO 20 1 = I,MCBIK 0.00DO 10 J I,H

C LSE SYMMETRY OF 010 OBIK = OBIK + O(J !I*B(J,K)

SUM = SUM + BIi..LI*DBIK20 CONTINUE

IF I IOPT.EQ.O I GO TO 30C(L,KI = C(L,KI + SUM*SGO 10 40

30 C(L,K) SUM40 CIX LI = C(L,KJ50 CONtINUE

RETURNEND

(a)

Page 253: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.13—continued

SUBRGUTINE BTOIAB (D,B,C,M,N, LOPT,S)CC SPECIAL MATRIX MULTIPLICATION OPERATIONC IF WPT=0, C = (B)T*D*BC IF IOPT=1, C = (B)T*D*B*S + CC ** ********** ******** ******COP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION 0(141. B(M NI C(N,N)C D(M,M) = DIAGCNAL MATRIXC B(M,N) = RECTANGLUAR ARRAYC C(N,NI = RETURNED SYMMETRIC SQ MATRIXC S = SCALAR COEFFICIENT

DO 50 L = 1,NDO 'iO K = 1,LSUM = 0.00DO 20 I = 1 M

20 SUM = SUM + Li*O(II*BU,1(IIF ( IOPT.EQ.0 I GO TO 30CtL,K) = CLL,K) + SUM*SGO TC 40

30 C(L,KJ = SUM40 C(K,LJ = C(L,KJ50 CONTINUE

END

(b)

Table 11.1 Parameter Definitions for Plane Stress

CONTROL:NSPACE=2 NLPFLO=6N=3 ISOLVT=0*,orl**NG=2 NTAPE1=8

LBN = 0*, or 2**

DEPENDENT VARIABLES:1 = x-component of displacement, u2= v-component of displacement, v

BOUNDARY FLUX COMPONENTS AT NODES**:1 = x-component of surface traction,2 = y-component of surface traction,

PROPERTIES:Element level:

Floating point:1 = modulus of elasticity, E2 = Poisson's ratio, ii3 = shear modulus, G4 = element thickness, t5 = x-body force component, X6 = y-body force component, Y

CONSTRAINTS:Type 1: specified nodal displacementsType 2: inclined roller supports

Page 254: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.3 Heat conduction 245

Table 11.1—continued

INITIAL VALUES OF COLUMN VECTOR**:Specified external nodal forces

POST-SOLUTION CALCULATIONS:1 centroidal coordinates2 centroidal strains3 centroidal stresses

* default value** Optional

11.3 Heat conduction

Several authors including Zienkiewicz [871, Desai and Abel [29] andHuebner [43] have considered two-dimensional heat conduction. The prob-lem is governed by the two-dimensional Poisson equation

(11.4)äx\ ax! &y\ 'äy,where T(x,y) denotes the temperature, and are the material con-ductivities in the x- and y-directions, respectively, and g(x, y) is the heatgeneration per unit area. Usually one encounters boundary conditions onT on some segment of the boundary and specifies heat fluxes, on theremaining segments. The latter quantity is positive in the direction of theoutward normal vector. It has been shown [43] that the equivalent functionalto be minimized is

(11.5)

where the last boundary integral is evaluated over the boundary segmentson which qn is specified. Other types of boundary conditions, such asconvective heat losses, can be accounted for in the functional. The firstterm in the functional leads to the definition of the element square matrix,the second contributes to the element column matrix, and the third con-tributes to a boundary segment column matrix.

A four node bilinear isoparametric element is used and r and s are takento be the local element coordinates. The element square matrix and column

Page 255: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

246 11. Two-dimensional applications

matrix are

= J j + drdc

and (11.6)

= f'f'gcHeTIJeldrds

where Hc(r, s) is the element interpolation matrix, and and denotethe global derivatives of that is, a/ax etc., as defined in Chapter5. The column matrix associated with a specified flux on an exteriorboundary segment of an element is

= JdF. (11.7)

So far, we have defined a two-dimensional element (NSPACE = 2), withfour nodes (N = 4), one parameter, t, per node (NG = 1), and threefloating point properties, g, and per element (NLPFLO = 3). Inaddition, a typical element boundary segment has two nodes (LBN 2).These three matrices are evaluated in subroutines ELSQ, ELCOL, andBFLUX, respectively. These subroutines arc shown in Fig. 11.14 to 11.16.The first two matrices are evaluated by Gaussian quadratures and the lastis evaluated by using the closed form expression shown in Fig. 4.1. It wouldbe more economical to form both se and CC in the same integration loopbut since this is not a production code the alternative approach has beenselected for clarity. Since distorted (non-rectangular) elements may requirehigher order integration rules the user is required to input the desiredintegration order for each element; that is, there is one fixed point propertyper element (NLPFIX = 1). If one wishes to utilize the default value (2)of the integration order then one simply sets NLPFIX = 0 which alwayscauses LPROP(1) = 0. Subroutine ELSQ tests for this option. Note fromFig. 11.14 that subroutine ELSQ calls subroutines GAUS2D, SHP4Q,DER4Q, JACOB, 12BY2, and GDER1V. All of these subroutines havebeen presented in the previous chapters.

In this case no specific post-solution calculations are required(NTAPE1 0). However, if one desired to calculate the x- and y-thermalgradients at each integration point within the element it could be easilyaccomplished. Since the global derivative matrices and must be gen-erated at each integration point they could be written on NTAPEI fromsubroutine ELSQ for later use in subroutine POSTEL. Similarly, since

must be evaluated at each integration point in ELCOL, it is simpleto find the global coordinates of the integration points. i.e. x:y = HCOORD, and write them on NTAPEI for later use by subroutine POSTEL.

Page 256: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.3 Heat conduction 247

The non-zero value of NTAPEI would cause subroutine ELPOST to becalled, but it would consist of only a single RETURN statement. Once thenodal temperatures had been calculated, subroutine POSTEL would becalled for each element and then three operations would be performed foreach integration point in the element. First, and would be read fromNTAPE1 and multiplied by the nodal temperatures to obtain the thermalgradients at the point, e.g. 8t10x = Next the global coordinates of thepoint would be read from NTAPEI. Finally, the element number, inte-gration point number, point coordinates, and thermal gradients would heprinted by subroutine POSTEL.

It would be desirable to obtain contours of constant temperatures. Thus,we request five contours (NCURVE = 5) between the minimum and max-imum temperatures calculated by the program. In closing, note that thisformulaton is summarized in Table 11.2.

As the first example of two-dimensional heat conduction, consider theproblem of uniform heat generation in a unit square plate. In non-dimen-sional form, let the governing equation be + + 8 = 0, i.e.

= 1 and g = 8, and let T 0 around the perimeter of the square. Myers[56] presents the closed form solution (see problem 3.39) and shows thatthe steady state temperature at the centre is 0.5894. The problem is shownin Fig. 11.17 along with the finite element mesh. Since the problem hassymmetric geometry, properties, and boundary conditions only one quarterof the region was utilized (although one-eighth could have been used).Along the two lines of symmetry one has a new boundary condition thatthe heat flux, qn, must be zero. Since this leads to null contributions onthose boundary lines, these conditions require no special consideration.The problem under consideration is two-dimensional (NSPACE = 2),involves twenty-five nodes (M 25) with one temperature per node(NG = 1). There are sixteen quadrilateral elements (NE = 16) with fournodes each (N = 4) and three floating point properties that are homo-geneous throughout the mesh (NLPFLO = 3, LHOMO = 1). The internalheat generation will define a non-zero element column matrix(NULCOL = 0). There are no boundary segments with a specified non-zero normal heat flux (NSEG = 0).

The input data for this problem are shown in Fig. 11.18 and the outputof the model code is shown in Fig. 11.19. Note that the centre temperatureat node 1 differs by only li% from the exact value stated by Myers. Thecalculated contour data points from subroutine CONTUR are illustratedin Fig. 11.17. The contour curves exhibit the required symmetry along thediagonal line.

Before leaving this application it is desirable to consider the programmingchanges necessary to utilize a higher order element. For example, assume

Page 257: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

248 11. Two-dimensional applications

that one wishes to utilize an eight node quadratic element instead of thepresent linear element. Then it would be necessary to set N = 8, andreplace the calls to shape function and local derivative subroutines, SHP4Qand DER4Q, with an equivalent set of subroutines, say SHP8Q andDER8Q, for the quadratic element. With a higher order element onewould usually need to use a higher order quadrature rule in integrating theelement matrices. The simplicity of introducing higher elements is a majorpractical advantage of programming with numerical integration.

The changes necessary to convert to a three-dimensional analysis arealmost as simple. If one is utilizing an eight node hexahedron (or brickelement) one would again supply shape function and local derivativeroutines, say SHP8H and DER8H. Since NSPACE = 3, the Jacobian wouldbe a 3 x 3 matrix and to obtain its inverse we would replace the call toI2BY2 with a similar subroutine, say 13BY3, to invert the matrix. Finallythe local coordinate definition of the quadrature points would be obtainedby an alternative routine, say GAUS3D. The three-dimensional formu-lation will he illustrated in a later section.

Fig. 11.14 Subroutine ELSQ

SUBROUTINE (N,NELFRE,NSPACE1IP5,JP2,KPI,KP2,1 KP3,COORD,D,ELPRCP,LPKOP,PRTLPT,FLTMIS,2 S,NTAPE1,NTAPE2.NTAP€3,NTAPE4)

CC GENERATE ELEMENT SQUARE MATRIXCCOP IMPLiCIT REAL*8(A—H 0—fl

DIMENSION D(NELFREI, ELFRCP(KP2),1 LPRCP(JP2), S(NELFRE,NELFREJ,2 PRTLPT(1P5,KP1}, FLTMIS(KP3)

C N NUMBER CF NODES PER ELEMENTC NELFKE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC IP5 = NUMBER OF ROWS IN ARRAY PRTLP1C JP2 = NUMBER OF COLUMNS IN ARRAYS LPFLX ANC LPROPC KPI = NUMBER OF COLUMNS IN FLTNP £ PRTLPT & PTPROPC KP2 = NUMBER CF COLUMNS IN ARRAYS FLIEL AND ELPRCPC KP3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORO = SPATIAL COORDINATES OF NCDESC D NODAL PARAMETERS ASSOCIATED AN ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPRCP = ARRAY CF FIXED POINT ELEMENI PROPERTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NCDESC = SYSTEM STORAGE OF FLOATiNG PT MISC PROPC S = ELEMENT SQUARE MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 OPTIONAL UNITS FOR USER (USED WI-EN ) OJ

CC *** ELSQ PROBLEM DEPENDENT STATEMENTS FOLLCWC . .. . ...C SOLUTION OF POISSON EQUATION IN TWtJC ISING A FOUR NODE ISOPARAMETRIC CtJADRILATERIAL ELEMENTC NSP.ACE 2, N = 4 NG = 1 NELFRE = 4C ELPRCP(U =C IN Y—OIRECTICNC ELPRCP(31 = HEAT GENERATiON PER UNFI AREAC LPRCP(11 = GAUSSIAN INTEGRATiON IN EACH OINEN

CGMMCN /ELARG/ NIP/ELARG2/ XK, YK, G,

1 AJINV(2,2) GLOBAL(2,41, 11(4), LSQ/ELARG3/ COL(41, QE14I, TOTAL

DATA NQPOLD /0/C——> DEFINE PROPERTIES

XK = ELPROP(1)YI( = ELPROP(21G = ELPRDP(31NCP LPROP(1I

Page 258: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.14—continued

C DEFAILT NUP = 2 SINCE LPROPU) = C IF NLPFIX = 0

IF C NQP.LT.2 I NQP = 2IF ( NQP.GT.4 I NQP 4

C——> CALCuLATE QUADRATURE DATA ( IF RECUIREDIF ( NQPOLD.EQ.NQP ) GO TO 30NCPCLL) = NQPCALL GAUS2D (NQP GPT,GWT,NIP,PT,WT)LSQ =

30 CONTINUEC——> ZERO CALCULATED ARRAYS OF ELEMENT

CALL ZEROA (LSC,S)CALL ZEROA (NELFRE,COL)CALL ZERDA (NELFRE,QE)

C——> NUMERICAL INTEGRATION LOOPDO IP = 1,NIP

C FORM INTERPOLATION FUNCTIONSCALL SHP4U (PT11,IP),PT(2,IP).H)

C FORM LOCAL DERIVATIVESCALL DER4Q (PT(1,IP),PT(2, IPI,DELTA)

C FORM JACOBIAN MATRIXCALL JACOB

C FORM DETERMINATE AND INVERSt OF JACOBIANCALL 12bY2 (AJ,AJINV,DET)DETWI = DET*WT(IP)

C FORM GLOBAL DERIVATIVESCALL GOERIV (NSPACE,N,AJINV,OELTA,GLCBALI

C EVALUATE PRODUCTSDO 5C J = 1,NtLFRE

C COLUMN MATRIXCOL(J1 = COL(JJ + DETWT*G*H(J)

C AREA INTEGRALCE(Ji = QE(J) + DETWT*H(J)

C SQUARE MATRIX00 40 1 = 1,N€LFRE

40 S(I ,J) = S(I,J1 + DETWT*( XK*GLUBAL(1,l1*GLCBAL(1,J11 + YK*GLCBAL(2111*GLCEAI(2,J) I

50 CCNIINUE60 CCNTINUE

C NUMERICAL INTEGRATION COMPLETEDRETLFNEND

Fig. 11.15 Subroutine ELCOL

ELCCL (N,NELFRE,NSPACE,1P5,JP2 ,KPI,KP2,1 KP3 COORD,D,ELPROP,LPRCP,PRTLPT,FLTMIS,2 C,NIAPEI ,NTAPE2,NTAPE3,NTAPE4)

CC GENERATE ELEMENT COLUMN MATRIXCCDP IMPLiCIT REAL*8(A—H,O—Z)

DIMENSION COORD(N,NSPACE}, D(NELFRE), ELPRCP(KP2),1 LPROP(JP2), C(NELFREI, FRTLPT(IPS,KP1),2 FLTMIS(KP31

C N = NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 NUMBER OF ROWS IN ARRAY PRTLPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPC KPI = NUMbER CF COLUMNS IN FLTNP C PRTLPT C PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS ELTEL ANC ELPROPC KP3 = NUMBER OF COLUMNS IN AkRAY FLTMISC COORD = SPATIAL COORDINATES OF ELEMENT'S NCDESC 0 = NODAL PARAMETERS ASSOCiATED WITH A ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PCINT PROPERTIESC IPPOP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLFT = FLOATING POINT PROP OF ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE CF FLOATING FCINT MISC. PROPC C = ELEMENT COLUMN MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED > 01

C .. 0

C *** ELCOL PROBLEM DEPENDENT STATEMENTS FCLLCW ***CC SOLUTION OF POISSON EQUATION IN TWO CIMENSIONSC LSING A FOUR NODE ISOPARAMETRIC CUADRILATEPIAL ELEMENTC NSPACE = 2, N = 4, NG = 1, NEIFRE = 4

COMMON /ELARG3/ CCL(41, QEI4), TOTALC——> RECCVER COLUMN MATRIX

00 10 I = 1,NELFRE10 C(I) = COL(I1

END

Page 259: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 11.16 Subroutine BFLUX

SUBROUTINE BFLUX (FLUX,COORD,LBN,NSPACE,NFLUX, -

I NG,C,S,IOPT)CC PROBLEM DEPENDENT BOUNDARY FL4JX CCNTRIBUTIONSCCOP IMPLICIT REAL*8 (A—H,Q—ZJ

COCRD(LBN,NSPACE}, FLUX(LBN,NG), CINFLUXI,1 S(NFLUX,NFLUX)

C FLUX = SPECIFIED BOUNDARY FLUXC COORD = SPATIAL COORDINATES OF SEGMENT NODESC LBN = NO. OF NODES ON AN ELEMENT BCtThOARY SEGMENTC NSPACE = DIMENSION OF SOLUTION SPACEC FLUX CONTRIBUTIONSC C = BOUNDARY FLUX COLUMN MATRIX CCNTRIBUTICNSC S = BOUNDARY FLUX SQUARE MATRIXC NO = NUMBER OF PARAMETERS PER NDDE PCINTC IOPT = PRLiBLEM MATRIX REQUIREMENTSC = 1, CALCULATE C ONLYC = 2, CALCULATE S ONLYC = 3, CALC.ULATE BOTH C AND S

C ....e. S

C ** BELUX PROBLEM DEPENDENT STATEMENTS FOLLCW **C S *C SOLUTION OF POISSON EQUATION IN IhOC USING A FOUR NODE ISOPARAMETRIC QUADRILATERIAL ELEMENTC LINEAR NORMAL FLUX VARIATION ALONGC LBN = 2, NSPACE = 2, NG = 1, NFLUX = 2C fLUX(K,l) OUTWARD NORMAL HEAT FLUX AT NOCE KC BI = bOUNDARY SEGMENT LENGTHCOP SQRI(ZI = DSQRT(Z)

IOPT = 1DX = COORDt2,1) — COORD(I,IIDY = COORD(2,2) — COORD(1,2)BL = + OY*OYIC(1) = BL*(FLUX(1,1)*2. + FLUX(2,lfl/6.C(2) = BL*(FLUX(1,I) 4 FLUXt2,j)*2.)/4.END

Fig. 11.17 Isothermal curves

(1/t4)

0 Contour points— — — Estimated contours

(1,1)

Tmo,

Page 260: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.18 Conduction in a square with uniform source (Myers 3.39); test problemdata

CONDUCTION IN 4 SO. WITH UNIFORM SOURCE (,4 SPACFS)25 16,1,4,2,0,0,0,5,0,0

0,0, 1,0, 1, 8,0, 0,0,O,0,t,3,O,C 0.5 0.5

2 0 0.625 0.53 0 0.75 0.54 0 0.875 0.55 1 1.0 0.56 0 0.5 0.6257 0 0.625 0.6258 0 0.75 0.6259 0 0.875 0.625

10 1 1.0 0.62511 0 0.5 0.7512 C 0.625 0.75t3 0 0.75 0.7514 0 0.875 0.7515 1 1.0 0.7516 0 0.5 0.87517 0 0.625 0.87518 C 0.75 0.87519 0 0.875 0.87520 1 1.0 0.87521 1 0.5 1.022 1 0.625 1.023 1 0.75 1.024 1 0.875 1.025 1 1.0 1.0

1 1 2 7 62 2 3 8 73 3 4 9 84 4 5 10 95 6 7 12 116 7 8 13 127 8 9 14 138 9 10 15 149 11 12 17 16

to 12 12 18 1711 13 14 19 1812 14 15 20 1°13 16 17 22 2114 17 18 23 2215 18 19 24 2316 19 20 25 24

5 1 0.010 1 0.015 1 0.020 1 0.C21 1 D.C22 1 0.023 1 0.C24 1 0.C25 1 D.C

1 31 1.0 1.0 8.0

Fig. 11.19 Conduction in a square with uniform source (Myers 3.39); test problemoutput

PARAMETERS *****NUMBER CF NODAl. POINTS IN SYSTEM =.......... 25NUMBER CF ELEMEI,TS IN SYSTEM 16NUMBER CF NODES PER ELEMENT 4NUMBER CF PAPAMETERS PER NODEDIMENSION OF SPACE =........................ 2NUMBER CF t$OUNCARIES WITh GIVEN FLUX=....... CNUMBER CF NODES CN BOUNCAPY 0NUMBER CF CONTOUR CURVES BETWEEN

5TH CF FACH PARAMETFR = 5N'JtIBEF CF FIXED PT PROP PER NODE .......... 0MJMBEP CF FLOATING PT PPCP PER NCDE =......, CCF FIXED PT PRUP PEP ELEMENT =......,CF FLOATING PT PRCP PEç =..,, 3NUMBER. UI- PT MISC 0NiMBEP CF MISC P81W =.........,, 0

Page 261: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.19—continued

ELEMENT PRI)PEP IFS ARE I-CMCGENECUS,(UTILILFU IF > 0)NT4PEI=8 NTAPE '=0 rJTAPE3=oNODAL TJ NOflES

*** PJINT **tNODE, CCNSTP.AIu\T INDICATCF, 2

1 0 0.5000 0.50002 0 0.6250 0.50003 ii C.75C0 0.50004 0

0U00

U 00

0

00001

1

11

11 1.0000 1.0000

*** ELEMENT CONP.ECTIVITY DATA ***ELE'ICNT Nh, '- NODAL

1 1 2 1 62 2 3 8 73 3 9 P4 4 5 10 95 6 7 12 ii6 1 8 13 '27 8 14 12

9 10 15 149 11 12 17 1.

10 1? 19 1711 13 14 19 1812 14 15 20 1913 16 11 22 2116 17 2315 18 10 24 2316 19 20 25 24

*** NOCAL PARAMETEk LIST ***CONSTRAINT CF

TYPE1 92 C3 0

**s CCNSPAINT CATA ***CONSTRA!NT TYPE

Nr. PAR1 Al1 5 12 10 1 .CCOOCOO)E.0O

15 1 .OOCC0000E+0o4 20 1 .CCCCC000E.oo5 21 1 .CC00000.)E.0O6 22 1 .CCCOCCOJE+007 23 1

24 1 .CCCOCOO)E+Q09 25 1 .CCCOCCOOE+oo

Page 262: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.19—continued

***NI.

1 1

1 1 C.ICCCC000C+o11 2 C.ICOCC000E+011 3

END PT CF

CLTPJT QF ***2 CUUPDINATES, 1

1 0 .5uDE+0O 0.2 O.6?5E+00 O.500E+Ot)

0.SOOE.004 0.875E+0O 0.500E+0O 0.28274026E+O0

0.500E+006 O.500t+0O 0.62ciE+0O7 O.625c+00 0.625E+C0 C.5350320RE+008 0.750E+O0 O.625E.GO 0.4L1247P3E+UC9 0.815&+00 0.625F+00 C.27C0111?E+OC

10 0.lUuE+U1 O.625E+0O U.2.235019E—1211 0.500tE+00 0.750E+CO

C. 750E+00 0. 441247B?E+OC13 0.750E+00 0.750E+00 0.367620'éE.OO14 C.875F+'JO 0.T5OE+00 C.2291!.274E+0015 0.2CS19344E—1215 0.28274025E+OC17 C.875E.C0 C.27C01716E+OC.8 00 0.875F+00 0.22914275E+OC19 C.BlSciUU C.1.5011323E+0O20 0.875E+C021 0.[0')E4012? 0.toOE.01 0.24235019E—1223 0.100EGO124 C.875Ef0o 0.100E+01 o.141688q95—1225 0.lioE+')1 O.1V)E.C1

1 J.8d135!398E—022345

o.bc7323a4E—0278 0.1949S458E—02

10 0.51094872E—02U12 0.14M14&87E—02131'15 0.14814667E—C216 0.58&537981F—03

TrTAI =

VALUES TI-E NCCAL PARAMETERS ***PARAMETER NI. MIN.VALIJE,NCDE

1 0.59oTdo4LE+00 , 1 o.121c316zE—12 , 25

CALCULATICN CF CCNTCUR CURVES ***= I

5TH VALUE = o.25839320E—olqc'rH PEPCNTIt. S VALuE = 0.

Page 263: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.19—continued

C.C.

00C.C.C.

C. 18641C.75152',6E+O00.8

0.5COGCOJOF+0Oo • 625 COt) JOE + 00C.625C0000E+C0C. ?60000)OE+OOC. F+ CO0. 87 5C00 00 F+ 00C.

000.C.0.

= IOF = o. 2c P.3s

PuNT NC., 2

2 o.Ydola64lE+o04

&7

9 C.101! 0.81530C00E+OJ12 0.75J'JuCO(Th+OO

1'i 0.37500C00E+0f)= 2

3F 0. tt-26E.C0NC., t-G&JPi).PIATES

12

4 O.'?1047U.9c40)5 Q.q75')OC&,OE+Jo6

0.12L3j4

N JMi3EP = 3V4LLIE (]F CONT')U& 0.

21

2

0.6 0.50fl0000E+0O7

89

it)CCNTO'JR NV4LIJE flF 0.43267015E.COPhINT NC., 2 CCt)RUINATES

I

U.7562&181E+oO0.75u)0000E.00

A

60.62500000E+of)

89

10 0.6250J000E+O0= 5

VALUE CF O.566947C5E+C0POIN' NC., 2 CCURO[NATES

1

0. !50000000E+00ENJING OF MOI)EL

C.o • '5000)0 E + 00C. 625 CC 0C. 15cCCO')OF.Oo0. 85428558E'OOC. 864 228f,7E+00C. 61248 9490. 654 285 58 E+C0C.

00C. 5C 00

C.

0.

C.0.

C. 5CC C OOJOE +00

PP CC AM.

Page 264: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.4 Viscous flow in straight ducts 255

Table 11.2 Parameter Definitions for Two-dimensional Heat Conduction

CONTROL:NSPACE = 2 NLPFIX = 1

N=4 NLPFLO=3NG=1 LBN=O*,or2**

DEPENDENT VARIABLES:I = temperature, T

BOUNDARY FLUX COMPONENTS AT NODES**:1 = specified normal outward heat flux per unit length, qn

PROPERTIES:Element level:

Fixed point:1 = Gaussian quadrature order in each dimension, (2*)

Floating point:1 thermal conductivity in the x-direction,2 = thermal conductivity in the y-direction,3 = heat generation per unit area, g

CONSTRAINTS:Type 1: specified nodal temperatures

* Default value** Optional

114 Viscous flow in straight ducts

Consider the flow of a viscous fluid in a straight duct with an arbitrarycross-section. The transverse velocity component, w, is of course zero onthe perimeter of the cross-section. The distribution of the velocity w(x, y)over the area has been investigated by Schechter [65J. He shows that thedistribution of the transverse velocity is governed by the equation

a2w ci2w aP(11.8)

where /2 denotes the viscosity of the fluid, and is the pressure gradientin the direction of flow (z-direction). This is another example of theapplication of the Poisson equation. The previous section presented theisoparametric element matrices for the general Poisson equation

ai 3w\ at +G=O.ax\ ax! äy\ ayj

Page 265: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

256 11. Two-dimensional applications

Clearly, the flow problem is a special case of the above equation where= = = constant and G —aP/az. For the three node triangle,

Zienkiewicz [821 shows that the element column matrix is

(11.9)

where is the area of the triangle. Similarly, the element square matrixis

[b,b1 bbm C,C1 1SC =

(

b1b1 bjbm + - c,c1 (11.10)

Lsym. sym. cmcrnj

where i, j, and m denote the three nodes of the triangle and where theconstants b, and c, are defined in terms of the coordinates of the nodesas

c,=xm—xj

cj=xj—xm

b,, = — ypn X1 — X1.

In this particular application one might be interested in a post-solutioncalculation of the flow rate, Q, which is defined as Q = fw do. In thisapproximation, w is defined within a typical element by the interpolationfunctions, i.e. w(x, y) =He(x, y) we. Thus, the contribution of a typicalflow rate is

L. we da =(J

HeTda) we = qewe (11.11)

whereqe = + + c,y)(a1 + + cjY)(am + + (11.12)

x = (x1 + X1 + Xm)13

9=(yj+yj+ym)13

= XjYm —

a1 = — XYm

a,,, = xy, — x1y,

= a + a1 + am

Page 266: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.4 Viscous flow in straight ducts 257

The equation for qC could be calculated by subroutine ELPOST and storedfor later use. After the nodal velocities have been calculated subroutinePOSTEL could read qe from NTAPE1, calculate QC = qeWe, print theelement number and QC, and end with a summary total of the total flowrate.

Rather than change element types at this point the previous isoparametricelement will be used. Only the post-solution calculations need to be added.That is, we need to generate, store and recover, The calculation ofhas already been included in Fig. 11.14. Thus it could be stored there orin ELPOST. The latter option is used here. After the nodal values havebeen calculated POSTEL recovers QC, carries out the multiplication inEqn. (11.11) and prints the results for each element. These two additionalsubroutines are illustrated in Fig. 11.20. The previous mesh was used toconsider flow in a square duct. Figure 11.21 shows the comparison withthe results of Schechter. The element area integrals are included in Fig.11.22.

Fig. 11.20 (a) Subroutine ELPOST, and (b) subroutine POSTEL

(a)

SUBROUTINE ELPOST (NTAPEI,NTAPE2,NTAPE3,NTAPE4)CC DATA FOR POST SOLUTICNC

C NTAPEI = UNIT FOR POST SOLUTION MATRiCES STORAGEC NTAFE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN >C . .C *** ELPOST PROBLEM DEPENDENT STATEMENTS FCLLCW ***C . .. . .C QE = AREA INTEGRAL OF ELEMENT SHAPE FUNCTICNS

COMMCN /ELARG3/ COL(4), QE(41, TOTAL(NTAPEIJ QE

RET I..

END

(b)SUBRCUTINE POSTEL (NTAPEI,NELFRE,C TE NTAPE2,

1 NTAPE3,NTAPE4,II,NITER,NE,N)C ** ** ******** *** * ******** **C ELEMENT LEVEL POST SOLUTION CAICULATICNSCC NTAPEI = UNIT FOR POST SOLUTION MATRICES STCRAGEC NEIFRE = NUMBER OF DEGREES OF FREEDIJM PER ELEMENTC C = PARAMETERS ASSOCIATED WITH THE ELEMENTC IE = ELEMENT NUMBERC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN ) 0)C IT = CURRENT ITERATION NUMBERC NIT ER = MAXIMUM NUMBER OF ITERATIONSC NE = TOTAL NUMBER OF ELEMENTSC N = TOTAL NUMBER OF NODESCDP IMPLICIT REAL*8 (A—H,O-Z)

DIMENSION D(NELFRE)C .. •...•.. . .... •...e.C *** POSTEL PROBLEM DEPENDENT STATEMENTS FOLLCW ***C——> EVALLATE AREA INTEGRAL OF DEPENDENT VARIABLEC QE = AREA INTEGRAL OF ELEMENT SHAPE FUNCTICNS

CCMMCN /ELARG3/ COL(4), QE(4i, TOTALCATA KALL/1/IF I KALL.EQ.O J GO TO 10

C PRINT TITLES CN THE FIRST CALLKALL = 0TOTAL = 0.0

Page 267: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.10—continued1000 FOQ.MAT (IAREA INTEGRAL CF DEPENDENT VARIAELE',//,

1 ' ELEMENT INTEGRAL')10 REAC (NTAPLI) QE

C——> CALCULATE ELEMENT CONTRIBUTIONCALL MMULT (QE,D,VALUE,1,NELFRE,I1TOTAL = TOTAL + VALUEWRITE (b,j0101 IE, VALUE

1010 FORMAT (Ib,E20.8)IF ( I WRITE TOTAL

1020 FORMAT ('OTOTAL AREA INTEGRAL ',E16.81RET U RNEND

Fig. 11.21 Velocity estimates in duct

2

0

Fig. 11.22 Element flow rates

1AREA INTEGRAL OF

ELEMENT1

2 O.78338342E—023456789 3.569ád622E—02

1011 ).3d12574bE—021213

1516 O.586379B1E—03

OT,.JTAL ARcA 0.68667202E—oj

1.00.5

x

Page 268: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.5 Potential flow 259

11.5 Potential flow

11.5.1 Introduction

Another common class of problem which can be formulated in terms ofthe Poisson equation is that of potential flow of ideal fluids. The diffusioncoefficients, and become unity and the source term, G, is usuallyzero so that the problem reduces to a solution of Laplace's equation.Potential flow can be formulated in terms of the velocity potential, orthe stream function, The latter sometimes yields simpler boundaryconditions but will be utilized here since it can be extended to threedimensions. Thus, the governing equation is

(11.13)&x2

In this section it is desirable to consider potential flow applications,which involve curved boundaries. This provides the opportunity of illus-trating how the previous program developed for the straight sided isopara-metric elements can be easily extended to curved elements. Select the eightsided quadratic quadrilateral element shown in Fig. 6.8. It has been shownthat its interpolation functions are

HE(r,s) + rr1)(1 —1), 1

i

H(r,s) i =ôand8.

These shape functions are implemented in subroutine SHP8Q and the localderivatives of these relations are presented in subroutine DER8Q. Thesetwo subroutines are illustrated in Fig. 6.8. To modify the previous set ofisoparametric subroutines to utilize this element one simply replaces theoriginal references to SHP4Q and DER4Q with calls to SHP8Q andDER8Q, respectively.

Recall that the potential flow problem is formulated in terms of eitherthe stream function, i/i, or the velocity potential, These quantities areusually of secondary interest and the analyst generally requires informationon the velocity components. They are defined by the global derivatives of

and For example, having formulated the problem in terms of onehas

(11.15)

where u and v denote the x- and y-components of the velocity vector.

Page 269: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

260 11. Two-dimensional applications

Thus, although the program will yield the nodal values of 4) one must alsocalculate the above global derivatives. This can be done economically sincethese derivative quantities must be generated at each quadrature pointduring construction of the element square matrix, S. Hence, one can simplystore this derivative information, i.e. matrix GLOBAL, and retrieve it laterfor calculating the global derivatives of 4) or

The new element square matrix subroutine and the new post-solutionroutine POSTEL are shown in Figs. 11.23 and 11.24. There are some newfeatures in each of these routines. They include the option to store, withinELSO, the global derivatives at each integration point as well as the globalcoordinates of the point. Thus ELPOST is a dummy routine in this case.The square matrix calculations also utilize ISOPAR. Subroutine ELSQalso recovers installation-dependent plotting data through the miscella-neous properties.

Subroutine POSTEL also executes some CALCOMP plots of the velocityvectors at the integration points. This is done only if the user has madeunit NTAPE2 available for storing the data to be plotted. The plots arebegun only after the gradients have been evaluated in all elements. Thusit was necessary to utilize the value of the total number of elements, NE,to flag the call on which the plots are generated. Of course, the velocityvectors are also printed by POSTEL.

Fig. 11.23 (a) Subroutine ELSO and (b) subroutine LAPL8Q

(a)SUBROUTINE ELSQ (N,NELFRE,NSPACE 1F5,JP2,KPI,KP2

1 KP3 COORD,D,ELPROP LPAOP2 S,NiAPEI

CC GENERATE ELEMENT SQUARE MATRIXC ** ************************CDP IMPLICIT REAL*8(A—H,C--Z)

DIMENSION CGORD(N.NSPACE), O(NELFRE), ELFRCP(KP2),1 LPROP(JP2), S(NELFRE,NELFR.EJ,2 PRTLPT(1P5,KPIJ,

C N = NUMBER OF NODES PER ELEMENTC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC NSPACE = I)IMENSION OF SPACEC IP5 = NUMBER CF ROWS IN ARRAY PRTLPTC JP2 = NUMÔER OF COLUMNS IN ARRAYS LPFIX ANC LPROPC KPI = NUMBER OF COLUMNS IN FLTNP PRTLPI t PTPROPC KP2 = NUMbER OF COLUMNS IN ARRAYS FuEL AND ELPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORD = SPATIAL COORDINATES OF ELEMENT'S NODESC D = NODAL PARAMETERS ASSOCIATED WiTH AN ELEMEIcIC ELPPCP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPROP = ARRAY OF FIXED POINT PROPERTIESC PRTLPT = FLOATING POINT PROP FOR ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE OF FLOATiNG PT MISC PROPC S = ELtMENT MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED > 0)C .C **t ELSu PROBLEM DEPENDENT STATEMENTS FOLLOW ***

C SOLUTION OF LAPLACE EQUATION IN TWO CIMENSIONSC 8 NODE ISOPARAMETRIC QUADRILATERIAL ELEMENTC NSPACE 2, N = 8, NG = 1, NELFRE = 8

/ELARG/ GPT(41,GWT(41 PT(2 Ibi WT(I6i,NIPCOMMON /ELARG2/ 21 AJINV(2,2),

1 OELTA(2,81 8)

Page 270: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.23—continued

COMMCN /ELARG3/ XK, YI(EXTERNAL LAPL8Q

C = SUBR IC FORM PROS INIEGRANC NIP TOTAL NUMBER OF INTEGRATION PtINTSC PT, WT = 2—0 INTEGRATiON POINTS ANCC XY = GLOBAL COORDINATES OF QUADRATURE PCINTC H(I) = INTERPOLATION FUNCTION FOR NODE I 1.LE.I.LE.NC GRAD = GLOBAL COMPONENTS OF GRADIENT VECTORC AJ = JACOBIAN MATRIX, INVERSE AJINVC DELTA(J,I) = J TH LOCAL DERIVATIVE OF H(I)C GLOBALIJ,I) = J TH GLOBAL. DERIVATIVE CF HI)C ELPRCPU) = CCNOUCTIVITY IN X—DIRECTJCN = XKC EIPROP(21 = C&NDUCTIVITY IN Y—DIRECTION =

C LPRCFILJ = GAUSSIAN INTEGRATION ORDER IN EACI-CATA lULL, /1, 0/IF ( KALL.EC.O I GO TO 10

C——> CN FIRST CALL EXTRACT CALCOMP PLO1 DATA (IF ANY)KALL = 0IF C NTAPE2.GT.O I CALL PLTSLT IFLTMLS)

C—--> DEFINE PROPERTIES10 XK = ELPRUP(11

YK ELPROP 121LPROP(1J

C DEFAL.LT NQP = 2 SINCE LPROP(1) U IF NLPFIX = 0IF C NQP.LT.2 I NQP = 2IF 1 NQP.GT.4 I NQP = 4IF ( NQPOLD.EQ.NQP I GO TO 20

C—-> CALCULATE QUADRATURE DATA 1 IF= NQP

CALL GAUS2D (NQP GPT,GWT NIP,PT,èil)C STORE NUMBER OF PaINTS FDA GRADIENT CALCULATICNS20 IF C NTAPEI.GT.O I WRITE (NTAPEII NIPC——> NUMERiCAL INTEGRATION LOOP

CALL ISOPAR (N,NSPACE,NELFRE,NIP,S,CCL,pT,wj H,1 DELTA*GLOBAL,COORD,XYIAJ,AJINV,NTAPEI,LAPI8Q)

RETURNEND

(b)

SUBRCUTINE LAPLBQ (WT,DET,H,DGH,APT,N1NSPACE,1 NELFRE,COL,SQ,NTAPIII

CC PROBLEM DEPENDENT INTEGRANO INC AN ISOPARAMETRIC ELEMENTC ** ** ******** * ***COP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSION COL(NELFRE) SQ(NELFRE,NELFR€1&I MINI, XPT(NSPACtI

C N = NUMBER OF NODES PER ELEMENTC NSPACE = NUMBER OF SPATIAL DIMENSIONSC NELFRE = NO OF ELEMENT DEGREES OF FREEDiJMC H = ELEMENT INTERPOLATION FUNCTICNSC DGH = GLOBAL DERIVATIVES OF HC XPT = GLOBAL COORDS OF THE POINTC QUADRATURE WEIGHT AT POINTC DEl JACOBIAN DETERMINATE AT POINTC COL = PROB DEP COLUMN MATRIX INTEGRANDC SQ = PROB DEP SQUARE MATRIX INTEGRANCC NTAPEI = STORAGE UNIT FOR POST SCLVIICN DATAC . .C *** LAPL8Q PROBLEM DEPENDENT STATEMENTS ***C

CDMMCN /ELARG3/ XK, YKC STORE COORDINATES AND DERIVATIVE

I NTAPEI.GI.0 I WRITE (NIAPEII XPI, DGHC EVALUATE PRODUCTS

DETtIIT = OET*WTDC 40 J =DO I = 11JSQ(I,JI = SQ I,J) DETWT*( XK*DGI-(1,L)*DGHI JI

I + I30 SQl.) I) = SQ(I.J)40 CONTINUE

RETURNEND

Page 271: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.24 Subroutine POSTEL

SUBRUUTINE POSTEL (NTAPE1,NELFRE,CIIE!NTAPE2,1 NTAPE3,NTAPE4,II,NITcR,NE,M)

CC ELEMENT LEVEL POST SOLUTION CALCULATICNSCC NTAPEI = UNIT FOR POST SOLUTION MATRiCES SICRAGEC NELFRE = NUMBER OF DEGREES OF FREEDOM PER ELEMENTC 0 = NODAL PARAMETERS ASSOCIATED WITH THE ELEMENT

C NTA;E2,3,4= UNITS FOR USER (USED Wi-EN ) 01C IT = CURRENT ITERATION NUMBERC NITER = MAX IMUM NUMBER OF ITERATICNSC NE = TOTAL NUMBER OF ELEMENTSC = TOTAL NUMBER OF NODESCOP IMPLICIT (A—H,O—Z)

DIMENSION D(NELFREICC *** POSTEL PROBLEM DEPENDENT STATEMENTS FCLLCW ***C . ..C——> GRADIENT CALCULATION AND PLCTS FCRC SOLUTION OF LAPLACE EQUATiON IN TWO CIMENSIONSC LSING 8 NUDE ISOPARAMETRIC QUADRILATERIAL ELEMENT

CCMMUN /ELARG2/ XY(2) H(81,GRAO(21 AJ(2 21 AJINV(2,21,1

C CCNNECT TO PLOTTER CCMMONSCOMMCN /PLTDIM/ XLIMIT, IBUF(64)COMMCN /PLTKAL/ XLEN, YLEN, FIRST)(, FIRSTY, CELIAX,

1 DELTAY, XLAST, YLAS1C NE = TOTAL NUMBER OF ELEMENTSC XY = GLOBAL COORDINATES OF QUADRATURE PCINTC GRAC = GLOBAL COMPONENTS OF GRADIENT VECTCRC H(I1 INTERPOLATION FUNCTiON FOR Nt.jLt I I<=1<=NC GIOBAL(J,t) = U TH GLOBAL DERIVATIVE CF H(I)

CATA KALL SIZE DERMAX /1, 0.07, 0.0/CDP ABS(Z1 =

IF ( KALL.EQ.O J GO TO 10C——> PRINT TITLES ON THE FIRST CALL

KALL = 0WRITE (6,5000)

5000 FORMAT ('1 *** GLOBAL DERIVATIVES AT INTEGRATICN'1 ' POINTS ***',/,l POINT X2 ' OP/OX DP/D'Y',/)

10 CCNTINUEC——> BEGIN ELEMENT POST SOLUTION ANALYSIS

WRITE (6 5010) IE5010 FORMAT NUMBER ',IiI

C. READ NUMBER OF POINTS TO BE CALCuLATEDREAD (NTAPE1I NIP

C STORE FOR PLOT LSEIF ( NTAPE2.GT.O I WRITE (NTAPE2) NIPDO 20 U 1,NIP

C——) READ 000ROS. AND DERIVATIVE MATRIXREAD (NTAPEII XY, GLOBAL

C CALCULATE DERIVATIVES, GRAD=GLOBAL*CCALL MMULT (GLOBAL,O,GRAD 2,NELFRE,1)

C——> PRINT COORDINATES AND GRADIENT AT THE POINTWRITE (6,50201 U, XY GRAD

5020 FORMAT ( I7,2E12.4,2E15.51C——> STOIE RESULTS TO BE PLOTED LATER

IF ( NTAPE2.EQ.0 3 GO TO 20WRITE (NTAPE2) XY GRADIF ( I UERMAX = ABS(GRAD(1)1IF ABS(GRAD(211.GT.DERMAx I DERMAX = ABS(GRAD(21)

20 CCNIINUEC——> ARE GRADIENT CALCULATIONS COMPLETE FCR ALL ELEMENTS

IF ( IE.LT.NE 1 RETURNC——> PRODUCE GRADIENT VECTOR PLOTS (if DESIRED)

IF I NTAPE2.LT.1 I RETURNWRITE (6,5030)

5030 FORMAT I' BEGIN PLOT')C START NEW PLOT PAGE

CALL PAGNEWC READ AND DRAW GRADIENT VECTORS

CALL VECTZD (NTAPE2,XLEN,YLEN,FJ RSTX,FIRSTY,DELTAX,DELJAY,1

WRITE (6,504015040 FORMAT ( END PLOTI

RET L RNEND

Page 272: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.5 Potential flow 263

11.5.2 Patch test

Originally based on engineering judgement, the patch test has beenproven to be a mathematically valid convergence test [47]. Consider apatch (or sub-assembly) of finite elements containing at least one internalnode. An internal node is one completely surrounded by elements. Letthe problem be formulated by an integral statement containing derivativesof order 'n'. Assume an arbitrary function, P(x), whose order derivativesare constant. Use this function to prescribe the dependent variable on allexternal nodes of the patch (i.e. Oe P(Xe)). Solve for the internal nodalvalues of the dependent variable, and its order derivatives in eachelement. To be a convergent formulation:

1. The internal nodal values must agree with the assumed functionevaluated at the internal points (i.e. = P(xi)?); and

2. The calculated nth order derivatives must agree with the assumedconstant values.

It has been found that some non-conforming elements will yield convergentsolutions for only one particular mesh pattern. Thus the patch mesh shouldbe completely arbitrary for a valid numerical test. The patch test is veryimportant from the engineering point of view since it can be executednumerically. Thus one obtains a numerical check of the entire programused to formulate the patch test. The patch of elements shown in Fig. 11.25was utilized. It was assumed that

(11.16)

such that the derivatives

are constant everywhere. All sixteen points on the exterior boundary wereassigned values by substituting their coordinates into Eqn. (11.16). Thatis, the boundary conditions that etc., were applied on theexterior boundary. Then the problem was solved numerically to determinethe value of at the interior points (7, 10, 11, 12, 15) and the values ofits global derivatives at each integration point. The input data and outputresults of this patch test are shown in Figs. 11.26 and 11.27. The outputshows clearly that the global derivatives at all integration points have theassumed values. It is also easily verified that all the interior nodal valuesof 4 are consistent with the assumed form. Thus, the patch test is satisfiedand the subroutines pass a necessary numerical test.

Page 273: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.25 Patch test mesh

1 + 3x —4y

21, 4, 1, R,2,C ,C ,0,0, 0,0

2 I 0.0345 1 0.06 1 1.07 C 1.08 1 1.09 1 2.0

10 0 2.011 C 2.012 C 2.013 1 2.014 1 3.015 016 1 LO17 1 4.018 1 4.019 1 4.020 1 4.021 1 4.0

19 it21 13

0.01.0

4.00.04.00.01.07.03.04.00.07.4.0.0i.eP.')3.04.0

67

14 1870

Fig. 11.26 Quadratic quadrilateral patch test (Laplace equation); test problem data

15 1016 12

34

456A

1314161718192021

II

1117

1. C—1.—7.

—1 1.C—'S.c

4. C—12.0

1.C—9. C10.0—6. C

9.CS.C1.C

—3. C.3

1

1.0 1.0 0.0

Page 274: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.27 Quadratic quadrilateral patch test (Laplace equation); test problem output***** PARAMETERS *****NJMBEP CF NJOAL POINTS IN SYSTEM =..........21NUMBEF CF IN SYSTEM =............,. 4NUMBtR CF NODES PtP ELEMENT =...,.....,..... 8NUMBEP CF PARAMETERS PEP NCOE =............. IO IMtNSICN Of SPACE 2

CF WITh GIVEN FLUX=....... 0OF CN bOUNDARY 0NUMBEP CF FIXED PT PROP PEP NODE =.......... 0

NJMMEP CF FLOATING PPCP PER NCDE =....... 0CF FIXED PT PROP PER ELEMENT 1NUMBER OF FLOATING PT PRCP PER ELEIENT =.... 3NUMBER CFIIXEDPTMISC PRCP=..............o

NUMBER CF FLOATING PT MISC PROP =........... 0ELEMENT PRuPERTIES APE FCMCGENECLS.OPTICNAL UtjIT NUMPERS (UTILIZED IF > 0)NTAPEL=8 NTAPE3=O NTAPE4=t)

TO LISTED bY NODESNCDAL POINT ***

NODE, CCNSTRAINT INOICAFOk, 2 CCCR)TNATES1 1 0.0000 0.013002 1 0.OCCO 1.0000

1 0.0000 2.00004 1. 0.0000 3.00005 1 C.OCCC 4.OCOO6 1 1.00CC 0.00007 0 1.00CC 2.00008 1 4.OCOO

1 2.00CC 0.000010 0 2.UCCC 1.000011 U 2.00CC 2.000012 0 2.0000 3.000013 1 2.00CC 4.OCOO14 1 3.0000 0.OCOO15 0 3.00CC 2.000016 1 3.00CC 4.000017 1 4.0000 0.000018 1 4.OCCO 1.000019 1 4.00CC 2.000020 1 4.0000 3.000021 1 4.OCGC 4.0000

*** CONNECTIVITY OATA ***ELEMENT NO., B NODAL INCIDENCES.

1 1 9 11 3 6 10 7 22 3 ii 13 5 7 12 8 43 17 19 11 14 18 15 IC4 ii 19 21 13 t5 20 12

EQUATIoN DATA **$CONSTRAINT TYPEEQ. NC. NJOEI PARt Al

1 1 .ICCCCCOOE+O12 2 1 —.30000000E,oI3 3 1 —.7CCC0000E+014 4 1 —.IIC00000EI025 5 1 —.I5OCCCO)E+02A 6 1 .4CCCC000E+0j7 8 —.12CCCCOOE+028 9 1 .7CCCC000F,Oi

110 14 1 .ICCCC000E'02LI

1

1

111 —.3CCCCCOOE+oI

*** PROPERTIEs ***ELEMENT NO. PROPERTy NC. VALUE

1 1END OF FIXED POINT PR1PERTIES CF ELEMENTS

1 1 0.ICCCC000F.O11 2 C.100CC030E+oj1 3 C.CCOC0000E+OQ

END OF FLOATING PT PP.OPERTIES OF ELEMENTS

Page 275: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.27—continued

*** rLTPUT Of RESULTS ***NODE, 2 1 PARAMETERS

I 0.OOCCE+CC' 0.OJ3OE+O0 O.1OCCE+013 C.)i00V400 0.2000E+01.4 C.J000E+0O O.3OCCEfOI

0.(JDOUC'OO 0.400()E+016 C.L000E+Ot 0.GOCCE'-OC' 0.2OCCE+018 0.4000E+O!.9 O.2000E+tJL O.OOCCE+CO

if) 0.1OCQEsOI11 0.2JUOE+OI O.2000E+0112 O.23C)OE+Ol C.3OCCE+C113 0.200UE.0l 0.4OCCE+O1[4 C.3000E+Ol

5 0.3000E+01 0.200CE+0l16 0.400CE+0117 O.4000E+O1 0.GOCCE+0018 0.4000EGOl O.IOCCE+O1

C.4000C+Ul C.2OCCE+O120 0.300CE+0121 C.4000E+01 C.4OCCE+01

** G1'UAL AT 1NTEGRATflNPOINT X V OP/ox

ELEMENTI 0.I7BF+O1 O.LTOE+U1 0.300E+OL2 C.178E+C1 C.300E+0L

J.22SEtJU C.178t+0lO.178E+O1 O.IOOE+01 0.300E+01

5 o.lcoE+ot o.i'o:+o: C.300E+0t6 0.300E+017 0.178E+01 C.225E+CC C.300E+01

0.225E+00 C.300E+019 0.225E+u0 0.225E+C0 C.300E+OL

NUMBER 2I O.378Et01 C.300E+U12 0.IOOE+O1 C.378E+C1 C.300E+0t3 0.225E+O0 C.378E+01 C.3COE+014 0.I7BE+0t 0.300E+01 C.300E+015 0.1COE+o[ C.300E+C1 C.300E+016 C.300E+017 0.178E+OL 0.223E+01S C.3COE+0[g O.225E+U0 0.223E+01 C.300F+01

ELEMENT NUMBER 3I 0.178E*01 0.300E4012 0.3COE+DI O.I7SE+O1 C.300E+013 0.223E.Oi. C.178E+C1 C.300c+01

J.378E+O1 C.300E+OL5 0.3COE+Ul C.IOOE+01 C.3OCE+Jt6 0.100E+C1 C.300E+O17 O.318E+U1 C.225E+00 C.300E+018 0.3COE+O1 C.225E+OC C.300E+0J.9 O.223E+01 O.225E+00 0.3C0C,01

ELEMENT NUMBER 41 0.378E+01 C.378E+C1 C.3C0EG012 0.300E+01 0.378E+0I 0.300E+013 0.223E+U1 C.378E+C1 C.300E+014 0.318L+01 Q.300E+0i 0.300E4015 0.300E.01 0.300E+01 0.300E+0L6 0.223E+01 C.300E+C1 C.300E+O17 0.223E+0l C.300€+Ol8 0.3COE+01 C.223E+01 C.3COE+0I9 0.223E+01 0.223E+01 C.300E+O1

NORMAL EN')ING CF MODEL PPOGFAM.

0. 1000E+01C. 300CE+O1

—0. 700CE+01—0.1 IOCE+02—C. 15OCE+0?

0. 4000 E +01

C.

—C.

C. I000E+02C. 200CE+01

—0 • 60 DOE +01C. I3CCE+02C. 90 00€ 10. 5 000€ +010. 100CE+01

—0. 3000E+0I

PQfNTS **OP/DY

—0. 400€ +0 1—0. 4CCE +01—0.4COE+01—0.400E+01—0. 4 C CE +01—0.400E+01—0.400E+01—C. 4C CE +0 1—0. 4 00€ +0 1

—C. 4 CCE+0 I—0.400E+01—O.4COE+01—0. 400 E+O1—0.400E+01—0. 40 0€ +0 1—0.400E+0l0.400E+O1

—0. 4 DOE +01

—O.4CCE+01—0.4COE+01-C.4CCE+01—0.4COE+01—0.400E+01— C. 4 00€ +0 1—0.400E+01—C. 4C GE +01—0.4C0E+01

—0.400E+01—0. 400E+0 3.—0. 400€ +01—0. 4C GE +01—0.400E+01—C. 4 CUE +01—O.400E+01—0.400E+O1—0. 40 OF +01

Page 276: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.5 Potential flow 267

11.5.3 Example—Flow Around a Cylinder

Martin and Carey [51] were among the first to publish a numericalexample of a finite element potential flow analysis. This same example isalso discussed by others [23, 291. The problem considers the flow arounda cylinder in a finite rectangular channel with a uniform inlet flow. Thegeometry is shown in Fig. 11.28. The present mesh is compared with thatof Martin and Carey in Fig. 11.29 (p. 269). By using centreline symmetryand midstream antisymmetry it is possible to employ only one fourth ofthe flow field. The stream function boundary conditions are discussed byMartin and Carey [51] and Chung [23]. For the velocity potential one hasfour sets of Neumann (boundary flux) conditions and one set of Dirichlet(nodal parameter) conditions. The first involve zero normal flow, =

0, along the centreline ab and the solid surfaces bc and de, and auniform unit inflow, qn = —1, along ad. At the mid-section, Ce, antisym-metry requires that v = 0. Thus 4'., = 0 so that 4' = 4'(x), but in this specialcase x is constant along that line so we can set 4' to any desired constant,say zero, along Ce.

The input data and output results are illustrated in Figs. 11.30 and 11 .31.The velocity vector plots are shown in Fig. 11.32. By changing only thespecified inlet flux conditions other problems can he considered. If onekeeps the same total flow but introduces a parabolic boundary flow oneobtains the vector plots shown in Fig. 11.33.

As before, the presence of a boundary flux. makes it necessary toevaluate the flux column matrix

(11.17)

The variation of qn along the boundary segment is assumed to be definedby the nodal (input) values and the segment interpolation equations, i.e.

qn(s) =

Therefore the segment column matrix (for a straight segment) becomes

Cb= [2 16 2] (11.18)

These calculations are executed in subroutine B FLUX of Fig. 11.34.Since the second set of post-solution calculations involved vector plots

using standard CALCOMP, the routines for this purpose are shown forcompleteness in Figs. 11.35 and 11.36. Labelled element COMMON

Page 277: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

268 11. Two-dimensional applications

beginning with PLT are used to transmit CALCOMP plot data. Theparameter definitions used in the previous examples are given in Table11.3. The values of the centre velocity estimates for the flow around thecylinder are shown in Fig. 11.37. With two elements across the sectionthere was about a 10% error in the maximum velocity. Since 0 in eachelement is quadratic the corresponding clement velocity estimates arelinear, as illustrated by the dashed lines.

Fig. 11.28 Flow around cylinder between parallel walls

I

I\\\\\\\\\\\\\\\\\

Fig. 11.30 Potential flow around cylinder in a rectangular channel; test problem data

50 11, 1,8,2,2,?,O,13,0,0,0,0,t,3,Q,7,0,1,fl,1,8,g,o,o1 C 0.0 0.02 0 0.0 1.03 C 0.0 2.04 C 0.0 3.05 0 0.0 4.06 0 1.0 0.0

$*$

44 0 7.0 4.045 1 8.0 2.046 1 8.0 2.547 1 R.fl 348 I LO 3.

II 1 S Ii 3 6 IC 7 2

II fl U 2846 147 1 0.048 1 o.c50 1 C.C

I1 1.0 0.08. , ,4. , ,u. , ,0. , , 1 • , p1. , 12.

1 2 3—1.0 —1.0 —1.0

3 4 C

—1.0 —1.0 —1.0

Page 278: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.29 Finite element idealization of cylinder flow problem

21 25 28 33 36 41 44 49

31 381019

6

8

18

34

29

27

(a) Present mesh

FIg. 11.31 Potential flow around cylinder in a rectangular channel; test problem output

*49*4 PROBLEM PARAMETERS 8*44*NUMBER OF NODAL PCINTS IN SYSTEM =..........5ONUMBER CF ELEMENTS IN SYSTEMNUMBER CF NODES PER ELEMENT =............... 8

CF PARAMETERS PER NODE 1OF SPACE=......................;. 2NUMBEP CF BOUNDARIES WITH GIVEN FLUXZ....... 2NUMBER CF NODES CN BOUNCARY SEGMENT=........ 3NUMBER CF FIXED PT PROP PER NODE 0NUMBER CF FLOATING PT PROP PER =.....,. 0NUMBER CF FIXED PT PROP PER ELEMENT z....... 1

NUMBER CF FLOATING PT PROP PER =.... 3NUMBER CF FIXED PT MISC PRCP 0NUMBER CF FLOATING PT MISC PROP 7

ELEMENT PROPERTiES AREOPTIONAL JNIT NUMBERS (UTILIZED IF ) 01

NTAPE29 NTAPE3ONODAL PARAMEtERS TO BE LISTED B'f NODESNODE, CCNSTRAINT INDICATOR, 2 CCCRDINAYES

8 13 16

12 4

4.00

3.20 -4

2.40

1.60 -

20.80

0.00

w-J

>-

2032

4011

39 432

3 7

48

47

48

45

10 3

9I

0.00 0.80 1.60 2.40 3.20 4.00 4.80 5.60 - 6.40

X VALUES

7.20 8.00

(b) Mesh of Martin and Carey

Page 279: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.31—continued

POINT CATA ***1 0 0.0000 0.00002 0 0.0000 1.00003 0 0.0000 2.00004 0 0.0000 3.00005 0 C.0000 4.00006 0 1.00CC 0.00007 0 1.0000 2.00008 0 1.00CC 4.00009 0 2.0000 0.0000

10 0 2.0000 1.000011 0 2.0000 2.000012 0 2.0000 3.000013 0 2.0000 4.000014 0 3.0C00 0.000015 0 3.0000 2.000016 0 3.0000 4.000017 0 4.0000 0.000018 0 4.0000 1.000019 0 4.OCCC 2.000020 0 4.0000 3.000021 0 4.0000 4.000022 0 5.00CC 0.000023 0 5.1340 1.500024 0 5.OOCO 3.250025 0 4.50Q0 4.000026 0 6.0000 0.000027 0 6.1340 0.500028 0 5.0000 4.000029 0 6.268C 1.000030 0 6.1340 1.750031 0 6.0000 2.500032 0 6.0000 3.250033 0 5.5000 4.000034 0 6.5858 1.414235 0 6.5000 2.150036 0 6.0000 4.000037 0 7.0000 1.732038 0 7.0000 2.366039 0 7.0000 3.000040 0 7.0000 3.500041 0 6.5000 4.000042 0 1.4842 1.931943 0 7.50C0 3.000044 0 7.00CC 4.000045 1 8.00CC 2.000046 1 8.0000 2.500047 1 8.0000 3.000048 1 8.0000 3.500049 0 7.5000 4.000050 1 8.00CC 4.0000

*** ELEMENT CONNECTIVITY CATA ***ELEMENT N')., 8 NODAL INCIOEt.CES.

1 1 9 11 3 6 10 7 22 3 11 13 5 7 12 8 43 9 17 19 11 14 18 15 104 11 19 21 13 15 20 16 125 17 26 29 19 22 27 23 186 19 29 31 2! 23 30 24 207 21 31 36 28 24 32 33 258 29 37 39 31 34 38 35 309 31 39 44 36 35 40 41 32

10 37 45 47 39 42 46 43 38ii 39 47 50 44 43 48 49 40

*** CONSTRAINT EQUATION CATA ***CCNSTRAINT TYPE ONE

NC. NODEI PARL Al1 45 1 .00000000E*002 46 1 .CCC00000E+003 47 1 .CCCCC000EIOO4 48 1 .00000000E*005 50 1 .CCCCC000E+0O

*4* ELEMENT PPOPERTIES *4*ELEMENT NO. PRCPERTY NC. VALUE

1 1 3OF FIXED POINT PROPERTIES CF ELEMENTS

1 1 0.ICCC0000E+01. 2 0.ICOC0000E+01 3

END OF FLOATING PT PROPERTIES OF ELEMENTS

Page 280: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.31—continued

MISCELLANECUS PPOPERTIES **$PROPERTY NO. VALUE

1. O.80000000E+O12 O.40000000E+013 0.00000000E+O04 0.00000000E+OO5 0.I0000000E+016 0.10000000E+O17 0.12000000E+02

END OF FLOATING PT PROPERTIES OF SYSTEM

FLUXES ***SEGMENT 3

PER NODE1 1 2 3—1.0000—1.0000—1.0000

2 3 4 5—1.0000

—1.0000

*** CUTPUT OF RESULTS ***NUDE, 2 COOPOINATES, 1 PARAMETERS.

1 0.OC000E+U0 0.00000E+OC —O.99T93769E+O12 0.00000E+0O O.I0000E+O1 —C.99743004E+O13 0.00000E+00 0.20000E+O1 —O.99642311E.O14 0.OC000E+00 O.30000E+O15 0.00000E+00 0.40000E+O1 —O.99492269E+O6 O.1C000E.O1 0.00000E+Oo —O.89830562E+07 O.I0000E+01 0.20000E+OL —C.89648184E+09 O.10000E+01 O.40000E+01 —0.89468280E+O9 0.2C000E+01 O.00000EGOC —C.80016869E+O1

10 0.20000E+01 0.I0000E.O1 —O.79889559E+O11 O.20000E+01 O.20000E+O1 —O.79651409E.O12 0.2C000E.0l 0.30000E.O113 0.200JOEGOI O.40000E+O1 —O.7930001IE.C114 O.30000E+O1 0.00000E+OC —O.70358853E.0115 O.3C000EfOL 0.20000E'Ol —C.69620699E+Ol16 O.300JOE+01 O.4000UE+O1 —0.68889508E+O117 O.4COOJE+01 0.0000CE+C0 —C.61443051E+O119 0.40000E+O1 0.10000E+O119 0.2000CE'Ol —O.59539673E+O1

O.40000E+O1 O.30000E+O1 —C.59568555E+C21 0.40000E+01 0.40000E+01 —C.57917362E+022 O.50000E+01 O.00000E4-OC —C.53645467E+0123 O.51340E*01 0.15000E+01 —O.49517944E+O124 0.50000E+01 0.32500E+01 —O.46820984E+O125 O.40000E.O1 —C.523A0845E+G126 0.60000E+01 O.00000E+00 —O.49,c8156E,o127 0.61340E+01 O.5000CE+OO —O.4?837601E.O128 0.50000E+01 O.40000E+C1 —O.46229193E#O129 O.62680E+O1 0.L)000E+01 —O.43496357E+O130 0.61340E*0I O.17500E+O1

32 0.6C000E+01 0.32500E+OI —O.33&79454E+C133 0.55000E+0! 0.40000E+O1 —C.399!3956E*C134 O.65858E+01 0.14142E+0i —C.35853996E+O35 Q.65000E+01 0.27500E+O1 —0.27438956E.C36 U.60000E+0l 0.40000E+O1 —C.32987312EG0137 0.70000E'Ol 0.17320E+O1 —O.25711218E+0138 0.70000E.01 0.23660E+O1 —C.20747071E+O39 0.70000E+0l 0.30000E+01 —O.18557452E+O40 O.70000E+oI 0.350C0E+O1 —C.17658045E+041 0.65000E+0I 0.40000E+O1 —O.25443422E+042 O.74842E+0I 0.19319E+01 —O.13367652E+O43 0.75000E+O1 0.3000CE.O1 —C.95113970E+Q44 0.70000E+01 0.40000E+O1 —O.11446758E+045 0.BC000E+01 O.20000E+C1 —O.33411568E—146 U.80030E+0l O.25000E+O1 —0.62366505E—1247 C.80000E+O1 0.30000E+O1 —C.27132199E—1248 O.8C000E+01 O.3500CE+O1 —O.52458473E—1249 0.75000E+01 0.40000E+O1 —C.88477812E+OO50 C.80000E+01 O.400CCE+C1 —O.25556061E—12

Page 281: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.31—continued* 6L0841 OF.RIVATIVES AT INTEGRATION POINTS •POINT X Y OP/CX OP/DY

ELEMENT hUMBER I1 1.775 [.775 0.99661EG00 O.23599E—0l2 1.000 1.775 C.95773E+0O O.15345E—O13 1,775 C.99885E+00 0.11656E—Ol4 1.775 1.000 O.15545E—0L5 1.000 1.000 0.99267E•CC c.qlIegE—o26 0.225 1.000 O.99836E+OO O.72572E—027 1.775 0.225 O.SlSl9E+CC O.74919E—028 1.000 0.225 O.98944E+OO 0.28926E—02

0.225 C.225 a.99c7CF+CC O.28585E—02ELEMENT 2

1. 1.775 3.775 o.101c8E'ol 0.36130E—022 1.000 3.775 o.looc8E.ol 0.16280E—023 0.225 3.775 O.99S85E+C0 O.38903E—024 1.775 3.000 0.10136E+OI O.15017E—O15 1.000 3.000 C.10075E+C1 C.89952E—026 0.225 2.000 O.10023E+C1 0.72207E—027 1.775 2.225 C.10035E401 O.26421E—018 1.000 2.225 C.IOO2CE+C1 O.16362E—019 0.225 2.225 0.10006E+O1 O.10551E—O1

ELEMENT MJMBEP 31 3.775 1.775 O.99032E+CO2 3.000 1.775 O.99264E+OO O.64052E—013 2.225 1.775 c.994c1E.cc O.32132E—O14 3.715 1.000 O.93275E+CC O.79377E015 3.000 1.000 C.95645E+CC O.38908E—016 2.225 1.000 0.98015E+C0 O.19814E—O17 3.775 0.225 O.88801E+OC O.414C6E—018 3.000 0.225 C.533C8E+CC O.13763E—Ot9 2.225 0.225 0.97816E+OO O.74962E—02

* * * ** * * $* * * *

ELEMENT NUMBER 91 6.887 3.881 O.164C0E+O1 0.16317E—O12 6.500 3.859 0.15505E+01 O.44829E—013 6.113 3.837 O.L4617E+Q1 0.60230E—O14 6.88; 3.472 O.1668?E*O1 0.12511E+OO5 6.500 3.375 O.J.5622E+O1 C.15964E+0O6 6.113 3.278 0.14615E+01 C.179A5E+0O7 6.887 3.063 O.16798E+O1 0.233S0E+OO8 6.500 2.891 O.15581E+OI 0.27446E+0O9 6.113 2.719 0.144!7E+01 O.29867E+00

ELEMENT NUMBER 101 7.887 2.887 0.19511E+C1 0.309C2E—012 1.498 2.880 0.18769E+01 O.13206E+O03 7.112 2.863 O.17578E+0t O.20899E+0O4 7.894 2.498 O.21353E+C1 C.180C4E—015 7.492 2.466 0.20304E+O1 0.33100E+OO6 7.110 2.394 C.18818E+O1 O.52337E+OO7 7.882 2.109 O.24696E+O1 O.12416E+0O8 7.486 2.052 0.23C54E+OI O.52809E+0O9 7.107 1.925 G.20231E+O1 C.83146E+0O

ELEMENT NuMBER 111. 7.887 3.887 0.17858E+C1 C.48338E—022 7.500 3.887 O.13060E—013 7.113 3.887 0.17011E+01 C.82928E-024 7.887 3.500 O.18211E+O1 C.16948E—O15 7.500 3.500 O.17658E401 O.66362E—O16 7.113 3.500 O.171C5E+01 O.10288E+0O7 7.887 3.113 O.18918E+O18 7.500 3.113 0.18295€+O1 0.11966E+OO9 7.113 3.113 O.17612E+Ot C.19747E+OO

BEGIN PLOTEND PLOTNORMAL ENDING OF MODEL PROGRAM.

Page 282: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.32 Velocities for uniform inflow

4.00 — ——--——.

3.00 — —. —. - —. — —.—.

___

2.00 — — . —

1.00 - —. —. — —. —. ____.

— —0.00 I l___• I__•

0.00 1.00 2.00 3.00 4.00 5.00

X— 000RDS

for parabolic inflow

—. — - -.

-.—. -. —. —.

0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00

X —COORDS

Fig. 11.34 Subroutine BFLUX

S(JBPCUTINE BFLUX (FLUX,COORD1 NG,C,S,IOPf)

CC PROBLEM DEPENDENT SCUNDARY FLUX CIJNIRIBLTIONSCCOP IMPLICIT REAL*8 (A—H,O—Zi

DIMENSION COORD(LBN NSPACE), FLUX(LBN,NG),

C FLUX SPECIFIEC FLUX COMPONENTSC COORO = SPATIAL COORDINATES OF SEGMENT NCDESC LBN = NO. OF NODES ON AN ELEMENT BCUNDARV SEGMENTC NSPACE = DIMENSION OF SOLUTION SPACEC NFLLA = LBN*NG = MAXIMUM NUMbER OF FLUX CONTRIBUTIONSC C = BOUNDARY FLUX COLUMN MATRiX CCNTRIBUT1CNSC S = BOUNDARY FLUX SQUARE MATRIXC NO = NUMBER OF PARAMETERS PER NODE PCLNTC IOPT = PROBLEM MATRIX REQUIREMENTSC = 1., CALCULATE C ONLYC 2, CALCULATE S ONLYC = 3, CALCULATE BOTH C AND S

6.00 7.00 8.00

Fig. 11.33 Velocities

4.00 — — ——.

3.00 —

2.00 -0 —.

1.00-

_.0.00 I

Page 283: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.34—continued

C QUADRATIC NORMAL FLUX ON QUADRATIC BCUNDARY SEGMENTC = 3 NSPACE = 2, NG = 1, NFLLX = 2C FLUXIK = SPECIFIED OUTWARD NORMAL FLUX AT NCDE KC TANGEPdIAL FLUX NOT USED 1....2....3 ————> sC BL = BOUNDARY SEGMENT LENGTH

I

C ( BE STRAIGHT I N SEGMENT SKETChCDP SQRT(Zj =

IOPT = IC FINC DISIANCE FIRST AND POINTS

DX = COORD(3,j.) — COORO(l,1)DY = COORD(3,21 — COORD(1,21BL SQRT(DX*DX+DY*DV)

C CALCULATE SEGMENT COLUMN MATRIXC(1) = BL*(FLUX(l,1I*4.+FLUX(2,j,I*2._FLUX(3,lfl/30.C(21 = ,3L*( FLUX(1,1)*2.+FLUX(2,1)*16.÷FLLX(3,1)*2.I/,O.C(3) = BL*(—FLUX( 1, 1)FFLUXt2, 1)*4.J /30.PET U P NNO

Fig. 11.35 Subroutine PLTSET

SUBROUTINECC EXTRACT CALCOMP PARAMETERS FROM MISC. DATA STORAGEC *** ****st*************t*******s*a********************C REFER TO STANDARD CALCOMP MANUALSCOP IMPLICIT REAL*8 IA—H,O—Zj

DIMENSION FLTMIS(7)COMMON /PLEKAL/ XLEN, EIR$TX, FIRsTY, tJELTAX,

I DELTAY, XLASI, YLASTCOMMON /PLTDIM/ XLIMLT, IBUFF(644)

KALPLT IllC XLEN, YLEN = PLOT LENGTH IN INCHESC FIRSIX, FIRSIV = GLOBAL COORDS. OF PLOT ORGINC DELTAX, DELTAY = GLOBAL COORU. PER INCH OF PLOTC XLIMIT = MAXIMUM LENGTH OF PAPERC IBLJF = SCRATCH ARRAY ( INSTALLATION DEPENDENT

XLEN = FLTMIS(I)YLEN FLTMISL2)FIRSIX =FIRSTY = FLTMIS(4DEITAX = FLTMISt5IDELTAY = FLTMISL6IXLI MIT = FLTMIS(73IF I XLIMIT.LE.O.O XLIMIT = XLEN + 4.XLAST = FIRSTX + XLEN*DELIAXYLASI FU(STY + YLENsOELTAYWRITE (6,50001 XLEN, YLEN, FIRSIX, F IRSIY, DELTAX,

I DELTAY5000 Ft1RMAT SUPPLIEO PLOT PARAMETERS:',!,

I'X—LENGTH.. .',E15.6, ' V—LENGTH... ',E15.o,/,2'FIRSI—X... .',E15.6,' FIRST—Y....',E15.6,/3'OELTA—X....',E15.6,' DELTA-Y....',E[5.6,/IF I RETURN

C—-> CM THE FIRST CALL OPEN THE PLOT FILEKALPLT 0

C INSTALLATION DEPENDENT STATEMENTS

RETURNIIBUF,664,XLIMIT,'AKINH','REMOTE#')

END

Page 284: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Ag. 11.36 Subroutine VECT2D

S(JRROUT 1NE VECT2O 1 NTAPE2, XLEN YLLN, FIR$IX ,FLRSTY,DELTAX,1

C ******************************** **************** *** ***s***C CCNSTRUT 2—i) CALCOMP VEcToRS CN NTAPE2CCOP IMPLICIT REAL*8 (A—H,O—Z)COP ATAN2IZI,Z2) = DATAN2(Z1,Z2iCOP SQRT(ZI = DSQRT(Z)C XLEN YLEN = PLOT LENGTH IN INCHESC FIRSfX, FIRSTY = GLOBAL C3ORO. OF PLOT ORGINC DELTAX, DELTAY = GLOBAL COORD. PER IMH CF PLOTC NE ZND. ELEMENTS, NIP = ND. PLOT POINIS IN ELEMENTC SIZE = SIZE OF SYMBOLS, INCHES

REWIND NTAPE2CALL AXIS (0. ,O.,8HX—COORDS,—8,XLEN,O.O,FIR$TX,DELJAX)CALL AXI S 1 0., 0. ,8HY—COOR)S, d ,YLEN,90. , AY)

C LOOP OVER ELEMENTS00 20 J = t,NEREAC NIP

C LOOP OVER VECTOR POINTS00 10 K = 1,NIPREAC (NTAPE2) X Y,DX DY

C IS POINT IN REGION INTRESIIF I X.LT.FIRSTX .OR. X.GT.XLAST I GO TO 10IF I Y.LT.FIRSTY .OR. Y.GT.YLAST I GO TO 10

C MOVE PEN TO POINT (CONVERT GLOBAL COCRO. TOX = (X—FIRSTX)/DELTAXY (Y—FIRSTVI/DELTAYCALL PLOT (X,Y,31

C SCALE MAX. COMPONENT TO I INCh FINCDX OX/SCALITDY = DY/SCALITAND = ATAN2(DY,OX)*57.3 — 90.X = X + DXY 'V + DYVECTOR = SQRT(OX*DX+DY*DY)

C DRAW LINE AND ARROWCALL SYMBOL (X,Y,SIZE,6,ANG,—fl

10 CONTINUE20 CONTINUE

RETURNEND

Fig. 11.37 Velocity estimates

Ut-

ti

— Exact

2 2.5

Page 285: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Table 11.3 Parameter Definitions for Quadratic Quadrilateral Potential Flow

CONTROL:NSPACE = 2 NLPFIX = 1 NSEG = 0*N=8 NLPFLO=2 LBN=0*,or3**NG = 1 MISCFX = 0*, or 7** NTAPE2 = 0*, or 9**NTAPE1 = 0*, or 8**

DEPENDENT VARIABLES:1 = velocity potential,

PRO PERTIES:Element level:

Fixed point:1 = Gaussian quadrature order in each dimension, (2*)

Floating point:1 = conductivity in x-direction,2 = conductivity in y-direction,

Miscellaneous (NTAPE2 * 0, Plot Data):**Floating point:

1 = length of plot in x-direction2 = length of plot in y-direction3 = x-coordinate of plot origin4 = y-coordinate of plot origin5 = change in x-coordinate per inch of plot6 = change in y-coordinate per inch of plot7 = maximum length of plot

BOUNDARY FLUX DATA (when NSEG * 0):Fixed point:

Three nodal points (domain on left)Floating point:

Three nodal outward flux values

CONSTRAINTS:Type 1: Specified potential values

POST-SOLUTION CALCULATIONS (when NTAPE1 0):1. Global coordinates and velocities at each quadrature point2. (NTAPE2 0) Velocity vector plots**

* Default** Optional

Page 286: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.6 Electromagnetic Waveguides 277

11.6 Electromagnetic Waveguides

The calculation of electrical and magnetic fields for practical geometriesoften leads to problems which contain known boundary singularities of thetype discussed in Section 6.8. For example, waveguides often contain re-entrant corners that introduce point singularities that affect the calculationof the cut-off frequency and mode shapes. Similarly, the transverse elec-tromagnetic line (T.E.M.) analysis of microstrips or coaxial lines oftenhave re-entrant corners. For a uniform mesh it has been shown analyticallyand experimentally that the error due to the singularity predominates thestandard mesh errors.

The analysis of T.E.M. line again involves the use of Laplace's equationfor the potential, Thus, again one could employ the formulation pre-sented in Section 11.5. However, it is necessary to change the program tocorrect for the known point singularity. If the solution domain contains are-entrant corner with an internal angle < a' 27r then near the corner

is of order O(p'°), where a = pr/a' and p is the distance from the corner.Its derivatives are O(p_a) and it is this loss of regularity of the derivativesthat causes the singularity error to predominate.

The minor changes required in the programming are illustrated in Fig.11.38. The modifications of the shape functions and their local derivativesare made by the routine SINGLR given in Fig. 6.23. It is also necessaryto flag the presence of the singularity. One way of doing this is to let theorder, a, be an element property. If it is zero then the element is notadjacent to a singular point and no changes are required. Of course itwould also be necessary to input the incidences of the singularity elementsso that the singular node is listed first.

As an example application consider a microstrip consisting of a centrestrip within a rectangular case. Let the boundary conditions be 0 = 0 onthe outer case and 0 = 1 on the inner strip. At the edge of the inner stripone has = 0(p"2) and = 0(p"2). Thus, there is a strong singularityat such a point. This problem has been analyzed by several authors includingDaly [27] and Akin [4]. It was modelled using quarter symmetry, assumingan isotropic, homogeneous dielectric as shown in Fig. 11.39.In addition to the capacitance per unit length, c, where

= if + da, (11.19)

was obtained from the post-solution calculations. Here and K denote thefree-space and dielectric permittivity, respectively. The exact value of c isknown and was compared with values calculated on a uniform grid. The

Page 287: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

278 11. Two-dimensional applications

accuracy of standard higher order elements and singularity elements arecompared in Fig. 11.39.

To illustrate a milder r113 singularity, and compare local grid refinementwith singularity modifications, consider an L-shaped region as did White-man and Akin [80] and Akin [4], as in Fig. 11.40. Both used bilinearquadrilaterals in a finite element solution of the Laplace equation. Thestandard finite element results were compared against singularity modifi-cations, using Eqn. (5.28), and local grid refinement near the corner. Thelatter employed five node bilinear transition quadrilaterals developed byWhiteman. Full details are given in the references. Here, only the solutionsnear the singularity will be considered. They are compared in Fig. 11.40with an analytic solution obtained by numerical conformed mapping.

As expected, both singularity modifications and local grid refinementgive significant improvements in the accuracy of the finite element solutions.In this case, the modification procedure is more cost-effective. In generalit would probably be best to have limited local grid refinement, say twoor three levels, combined with a singularity modification.

FIg. 11.38 Typical modifications for point singularities

C SET SINGULARITY ORDER (NONE 1F0)ORDER = ELPROP(4)

C—--> MJMERLCAL INTEGRATION00 60 IP 1,NIP

C FORM LOCAL DERIV, JACOBIAN, INVERSECALL OER4Q (ULIP),V(IPJ,DELTAICALL JACOB (N,NSPACE,DELTA,COORO,AJICALL 12BY2 (AJ,AJINV,DETI

C TEST DET, SET WEIGHTIF 4 DET.LE.O.0 ) WRITE (6,1000)

1000 FORMAT (' ERROR NEGATIVE JACOBIAN.')DET*WT(IP)

C *** MODIFY FOR POINT SINGULARITY ***IF I ORDER..EQ..O.0 I GO TO 35CALL SHP4U (U(IP),V(IP),H)CALL SINGLR IORDER,H,DELTA,N,NSPACEI*** MODIFICATION COMPLETE ***

35 CONTINUEC FORM GLOBAL DERIV, LIEN MATRICES

CALL GDERIV INSPACE,N,AJINV,DELTA,GLCBAL)

Page 288: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 11.39 A comparison of singularity effects

Percent error in capacitance

Cornernodes

Number ofsingularityelements

Types of element

LT QT CT BQ

3x5 0 — 4.02 — —3x5 4 — 0.76 — —5 x 9 0 7.00 4.01 — 3.735x9 2 — — — 3.037 x 13 0 4.57 2.66 2.01 —8x15 0 — — — 2.158x15 2 — — — 1.759x 17 0 3.39 1.29 — —

Uniform grid8= 2H= 2WLI = Linear TriangleQT = Quadratic TriangleCT = Cubic TriangleBQ = Bilinear Quadrilateral

B

Page 289: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

4-0

004-o

I-4-C

z

II II II II II

z

tiIII

I

II

I I

14

In

I'04-0

Co

C)C

Co

Coa,C

C0Co

I-0E

(0

a)CU)

CCo

Ca,Ea)C

a)

COU0U)4-ICa)

EC,

4)

I-(0

-CCCO4-(6)

4-0C0U)I-Co

0.

00

oU.

C')\D

re)

NO'(-r1

ocr-0000

in Q\ in0000

SN

00

'.000oc

ocC') C') In

o'.N Nin N

'C In'.o

'.0 'C

Ninin'.0ininN N

000' C')Cfl If'.00'.0 '.0

0'l0N\000N N

0 '.000 N5 Ntn in

C')C')NNNN'.0.0

N 0'. 000 inin0000

o mC')00000000

C') C'.in —C'. '-INOC

00C') inin in0000

'.0 ©in ininNN

000 -IC') C')0000

cf'. N —N00Nh

0000'.0'. 00NN

00 N'C 00N N'.O'.0

C')N S'C '.0NN

inC') (')5000000

0 incf'.in

0000

'n 0'. C'.C'. C')-l

0000

in'C 0'.0000N N

00 Nin N'.0 '0N N

Page 290: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.7 Ax/symmetric plasma equilibria 281

11.7 Axisymmetric plasma equilibria

Nuclear fusion is being developed as a future source of energy. The heartof the fusion reactors will be a device for confining the reacting plasmaand heating it to thermonuclear temperatures. This confinement problemcan be solved through the use of magnetic fields of the proper geometrywhich generate a so-called 'magnetic bottle'. The tokamak containmentconcept employs three magnetic field components to confine the plasma.An externally applied toroidal magnetic field, BT, is obtained from coilsthrough which the torus passes. A second field component is the polodialmagnetic field, which is produced by a large current flowing in theplasma itself. This current is induced in the plasma by transformer actionand assists in heating the plasma. Finally a vertical (axial) field, is alsoapplied. These typical fields are illustrated in Fig. 11.41. For many purposesa very good picture of the plasma behaviour can be obtained by treatingit as an ideal magnetohydrodynamic (MHD) media. The equations gov-erning the steady state flow of an ideal MHD plasma are:

grad B = 0

VP=JxB (11.20)

curl B

where P is the pressure, B the magnetic flux density vector, J the currentdensity vector, and a constant that depends on the system of Units beingemployed. Consider an axisynimetric equilibria defined in cylindricalcoordinates(p, z, O)so that = 0. Equation (11.20) implies the existenceof a vector potential, A, such that curl A = B. Assuming that A A(p, z)and A9 ip/p, where is a stream function, we obtain

Bp =

= (11.21)

B9 = — — B1

Therefore Eqn. (11.18) simplifies to

latp a24,(11.22)

The above is the governing equation for the steady equilibrium flow of aplasma. For certain simple choices of P and B9, Eqn. (11.22) will be linearbut in general it is nonlinear. The essential boundary condition on the

Page 291: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

282 ii. Two-dimensional applications

limiting surface, F1, is

4'=K+4r'Bv onF1

where K is a constant and is a superimposed direct current vertical (z)field. On planes of symmetry one also has vanishing normal gradients of'qi, i.e.

OonF2.an

The right-hand side of Eqn. (11.22) can often be written as

(11.23)

where, for the above special cases, g = g(p, z) and h = h(p. z) but wherein general h is a nonlinear function of 4', i.e. h h(p. z, ip). Equations(11.22) and (11.23) are those for which we wish to establish the finiteelement model.

A finite element formulation of this problem has been presented by Akinand Wooten [8]. They recast Eqn. (11.22) in seif-adjoint form, applied theGalerkin criterion, and integrated by parts. This defines the governingvariational statement

j= if + + g4'2} + h4'] !dp dz (11.24)

which, for the linear problem, yields Eqn. (11.22) as the Euler equationwhen I is stationary, i.e. 0. When g = h = 0, Eqn. (11.24) also rep-resents the case of axisymmetric inviscid fluid flow. Flow problems of thistype were considered by Chung E231 using a similar procedure.

For a typical element with N nodes the element contributions for Eqn.(11.23) are

Sc= J

+ HTZH.Z + g(p, z)HTH] dp dz,(11.25)

ce= f h(p,Z)HT!dpdz,

p

where the N element interpolation functions, H, define the value of 4'within an element by interpolating from its nodal values, i/f. Severalapplications of this model to plasma equilibria are given in [81. The majoradvantage of the finite element formulation over other methods such asfinite differences is that it allows the plasma physicist to study arbitrarygeometries. Some feel that the fabrication of the toroidal field coils mayrequire the use of a circular plasma, while others recommend the use of

Page 292: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

11.7 Axisymmetric plasma equilibria 283

dee-shaped plasmas. The current model has been applied to both of thesegeometries.

Figure 11.42 illustrates typical results for a dee-shape toruns cross-sectionwhere the bilinear isoparametric quadrilateral was employed. Biquadraticor bicubic elements would be required for some formulations which requirepost-solution calculations using the first and second derivatives of Figure11.43 shows the integral calculations (called by ISOPAR).

Fig. 11.41 Schematic of tokamak fields

Fig. 11.42 Results for a dee-shaped toruns

BT>>BP

Induced plosmo Current

External toroidol field

Conducting shell

field

z z

o 0.2 0.4 0.6

(a) Mesh for a typicol dee

R0.8

R

b) Magnetic surfaces of a dee

Page 293: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

284 11. Two-dimensional applications

Fig. 11.43 Plasma equilibria calculationSUBROUTINE PLASMA

ICC PRCB(.tM INTEGRANC INC AN (NGRAND)CCOP I*'PLICIT REAL*8 (A—H,C—Z)

CUL(NELFRE), SQUELFRE,NELFRE),I Ii(NI, OGH(NSPACE,N), )(PT(NSPACE)

C N OF PER ELtMENTC NSPACE NUMBER SPATIALC NEIFRE = NC ELEMENT DEGREES CF FREECOMC H = ELEMENTC DERIVATIVES CF HC XPT = CUORDS CF THE PCINTC WT = QUADRATURE WFIGHT AT PCINTC DEl = JACC8IAN AT PCINTC CCL PROB OLP COLUMN MATRIXC SC = PROB DEP SQUARE MATRIX INTFGRANCC = SICRAGE UMT FCR FCST SCIUT!CN DATAC .. .. ... .. . .. S.. S S •• •• • •••• ••••• •5•eS•• •.... .5..C *** PROBLEMC .. .. ... . . . .. . .. .. . •.. . .. . ..... . .... •.......

GCCNST,HCCNSIC SICRE COOROS ANU GLCBAL DERIVATIVES AT PT

IF ( NT&Pf1.GT.O WRITE XPT, UGHC EvALUATE

R=XPT( I)IF f.G1.O.0 P GCTO 10F 0.00001WFITE (&,2C)

20 FORMAT ( .4H WARNING QUACRATURE POINT NEAR R=O10 WJOP =

C UPCATF S.JUARE AND CCLUPN MATRICESDC 40 J1,N

30 I1,Jscti,jp = SQ(I,J) • WJDP*( CGH(t,I)*CGH(1,J)I + O(,sl(2,it*Ocjti(2,J1 ÷ 1

30 SQ(J,I) = SQ(I,J)40 CO1(J) = CCIIJ) +

P TURNENC

11.8 Exercises

1. Show that Eqn. (11.6) could be written as

S0

where D is a diagonal matrix and B contains the global derivatives ofthe interpolation functions (i.e., B = d).

2. Rewrite the element calculations in Fig. 11.14 using subroutine ISOPAR.Use the argument list for NGRAND to define the problem dependentintegrands in a routine called HEAT2D. Remember to set HEAT2Das an 'external' variable and include it in the call to ISOPAR.

3. Rewrite the square matrix integrand calculations in Fig. 11.14 by usinga call to BTD!AB.

4. Write the element routines to evaluate Eqns. (11.8) to (11.11) for thelinear triangle viscous flow problem.

5. Use numerical integration to evaluate of Eqn. (11.18) when the sideis not straight.

6. Use the exact integrals of Section 6.2 to verify Eqn. (11.18).7. Prepare a table of parameters for the viscous duct flow four node

isoparametric quadrilateral.

Page 294: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

12

Three-dimensionalapplications

12.1 Introduction

Another advantage of the finite element procedure is the relative easeof extension to three-dimensional applications. Several three-dimensionalsolutions have been presented in the literature. The earliest applicationsinvolved the four node linear tetrahedral element. The simplicity of theinterpolation functions for this element make it possible to derive theelement matrices in closed form. For example, Zienkiewicz [82] presentedthe expressions for three-dimensional stress analysis using that element.

The disadvantage of the tetrahedral elements is the great burden of datapreparation that it places on the user. One can generally obtain a moreaccurate solution with less data preparation by utilizing a hexahedralelement. The simplest element in this family is the eight node linearhexahedron. This element will be illustrated in the following section onheat conduction so as to reduce the number of new concepts to beconsidered.

12.2 Heat conduction

The isoparametric formulation of the two-dimensional Poisson equationwas presented in section 11.3. The governing differential equation in threedimensions becomes

+ + +g =0 (12.1)

and the element matrices are

=+ + KZHTZH.Z] dv, (12.2)

285

Page 295: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

286 12. Three-dimensional applications

and

Ce JgHTdv. (12.3)

Of course, if there are convective or normal heat flux boundary conditionson the surface of the domain then the element matrices will containadditional terms. Comparing these equations with the correspondingtwo-dimensional equations one notes some important differences. First,the integrals are three-dimensional, which makes the relative numericalintegration costs go from n2 to n3 where n is the number of quadraturepoints in each dimension. For this element one can utilize a value of n =2 unless the element has a greatly distorted shape. The element squarematrix contains an additional set of matrix products. Also, the size of thatmatrix has gone from 4 X 4 to 8 x 8 which also represents a significantincrease in the number of terms to be calculated and assembled into thesystem equations.

The problem-dependent subroutines for his element are shown in Fig.12.1 and 12.2. Although the extensions of the isoparametric elements tothree-dimensional applications was outlined at the end of Section 11.3, theabove routines do contain some new concepts. For example, the floatingpoint properties for this element are identified by the use of a materialnumber code. The integer material code number is contained in the fixedpoint data array LPROP. Once the material number is identified subroutineMATPRT is called to extract the four floating point properties from thearray FLTMIS. The array LPROP also contains the desired integrationorder for the element. This element is summarized in Table 12.1.

As a simple test problem consider the temperature distribution in aninfinite cylinder. Figure 12.3 shows the mesh which is a one degree wedgesegment divided into four elements. The inner radius has a specifiedtemperature of 100°F and the outer surface has a temperature of 0°F. Dueto symmetry, the normal heat flux on the other four surfaces is zero. Thisis a natural boundary condition that is automatically satisfied. For a homo-geneous material the exact solution for this problem is shown by Myers[561 to be t(r) — (t1 — t0) (ln(r/r1))/ln(r0/r1) where the subscripts i and odenote inner and outer surfaces, respectively. Figure 12.4 shows the com-parison with this solution. The maximum error is 0.6%. The effect ofnon-homogeneous properties is also shown in that figure. The input datafor the latter problem, where the inner and outer elements have conduc-tivities that are ten times as large as the other two, are shown in Fig. 12.5and a typical output is shown in Fig. 12.6.

Before leaving this section, it may be useful to comment on three-dimensional problems that involve surface integrals. Recall that if one has

Page 296: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

12.2 Heat conduction 287

a specified normal heat flux on a surface F then the element column matrixwill contain a term

Cq = JqnllTda. (12.4)

Evaluation of da on the three-dimensional surface in terms of the two localcoordinates, say requires the use of differential geometry. It canbe shown that da where A is the determinate of the firstfundamental magnitudes of the surface. The numerical integration of theabove equation gives

NQP

Cq=

(12.5)

To evaluate the A1 term at an integration point one could utilize subroutineFMONE. In other applications one would also need the unit normal vectorat the point to determine the global components of a given traction vector.The latter operation is performed by subroutine SNORMV. These tworoutines are shown in Figs. 12.7 and 12.8, respectively.

Fig. 12.1 Subroutine ELSQ

SUBRCUTINE (N NELFRE12 S,Nu APEI,NTAPE2,NTAPE3,NIAPE4)

CC GEAIERATE ELEMENT SQUARE MATRIXCCOP IMPLICIT REAL*8(A—H 0—fl

DIMENSION COORD(N O(NELFRE),1 S(NkFRE,NELFREI,2 PRTLPT(1P5,KPLI, FLTMIS(NP3i

C N NUMBER OF NODES PER ELEMENTC NuMBtR OF DEGREES Oá- ELEMENTC NSPACE = DiMENSiON OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRILPTC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPC KP1 = NUMBER OF COLUMNS IN FLTNP PRTLPT PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND EIPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FLTNISC COORD = SPATIAL COORDINATES OF ELEMENT'S NCDESC 0 NODAL. PARAMETERS ASSOCIATED WITH AN ELEMENTC ELPRCP = ELEMENT ARRAY OF FLOATING PT PROPERTIESC LPRCP ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT FLOATINt POINT PROP FOR ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE FLOATING PT MISC PROPC S = ELEMENT SQUARE MATRIXC NTAPE1 UNIT FOR POST SOLUTION MATRICES STORAGEC NTAPE2,3,4 = OPTIONAL UNITS FOR USER (USED WHEN > 0)

C *** ELSQ PROBLEM DEPENDENT STATEMENTS FOLLCW **SC ..... . .....C SOLUTION OF POISSON EQ IN THREE DIMEI\.S1GNSC USING AN 8 NODE ISOPARAMETRIC HEXAHEDRON ELEMENTC NSPACE = 3, N 8, NG = 1 NELFRE = 8C PRTMATUJ = CONDUCTIVITY IN X—D1RECTICNC PRTMAT(21 = CONDUCTIVITY IN Y—DIRECIIONC PRTMAT(33 = CONDUCTIVITY IN Z—OIRECTIUNC PRTI4AT(41 = SOURCE PER UNIT VOLUMEC LPRCP(1I = GAUSSIAN INTEGRATiON CROER IN EACH DiMC LPROP(21 = ELEMENT MATERIAL NUMBER

CCMMON /ELARG/

Page 297: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12.1—continuedCOMMON /ELARG2/

1COMMON /ELARG3/ PRTMAT(4),MATNODATA NQPOLD /0/

EXTERNAL SUBR FUR IN1EGRAN DLFINITICNC——> DEFINE INTEGRATION ORDER

C SiNCE LPROP(11 = 0IF ( NQP.LT.2 NQP = 2IF ( NQP.GI.4 I NQP = 4

C——> CALCULATE QUADRATURE DATA ( IF REQUIREDIF I NQPOLD.EQ.NQP ) GO TO 40

GPT,GWT,NIP,PT,WTJC——> DEFINE

C40

DEFALLT SINCE LPROP(21 = INiTIALLYIF ( MATNO.LT.1 I MATNO = 1

CALL MATPRT (MATNO,4,KP3,FLTMIS,PRTMAIJC-—> hUMERICAL INTEGRATION

CALL ISOPAR (N,NSPACE,NELFRE,NIP,S,CCL,PT,WT ,h,I DELTA,GLCBAL,COORD,XYL,AJ,AJINV,NTAPEI,LAPL8H)

RETEND

Fig. 12.2 (a) Subroutine LAPL8H, and (b) subroutine ELCOL

SUBROUTINE LAPL8H (WI, DEl, H,00H,XPT,N,NSPACE,I

CC PROBLEM DEPENDENT I'1TEGRANO INC AN ISQPARAMETRIC ELEMENTCCDP IMPLICIT REAL*8 (A—H,0—ZJ

DIMENSION COL(NELFREI,1 11(N), DGH(NSPACE,N),

C N NUMBER OF NODES PER ELEMENTC NSPACE NUMBER OF SPATIAL DIMENSIONSC NEIFRE NO OF ELEMENT DEGREES (if FREtUCMC H = ELEMENT INTERPOLATIONCC OFCCC CCI = PROB DEP COLUMN MATRIX INTEGRANOC SQ = PROB DEP SQUARE MATRIX INTEGRANCC NTAPEI STORAGE UNIT FOR POST SOLUTION DATACC *** LAPL8H PROBLEM DEPENDENT ***C .. .

CCMMCN /ELARG3/ PRTMAT(4),MATNOC DEFINE

XK = PRTMAT(IiYK = PRTMAT(21ZK = PRTMAT(3)O = PRTMAT(4)

C EVALUATE PRODUCTSDETWI = DET*WT00 20 1 = 1,NDO IC J = 1,!SQ(T,J) = + DETwT*( Xtc*DGH(1 1)*DGli(1 J)

1 + YK*DGH(2,Il*DGH(2,J2 + ZK*DGH(3,I)*DGH(3,JI

10 SQ(J,l) = SQ(L,J}IF ( G.EQ.O.O I GO TO 20COL(IJ CDLIII + OEIWT*G*H(l)

20 CCNTINUERETURNEND

(a)

Page 298: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12,2—continued

SUBROUTINE ELCOL (N,NELFRE,NSPACE, 1P5 ,JP2 ,KP1,KP2,1 KP3 COORO,D,ELPRQP IPROP PRTLPT,FLTMIS,2 C,NtAPEI,NTAPE2,NTAPE3,NIAPE4I

CC GENERATE ELEMENT COLUMN MATRIXCCOP IMPLiCIT REAL*8(A—H.G—ZI

CIMENSLON COORD(N NSPACEI D(NELFRE),1 PRTLPT(1P5,KP1),2 FLTMIS(KP3J

C = NUMBER OF NODES PER ELEMENTC NEIFRE = NUMBER OF DEGREES OF FREEDtM PER ELEMENTC NSPACE = DIMENSION OF SPACEC 1P5 = NUMBER OF ROWS IN ARRAY PRTLPIC JP2 = NUMBER CF COLUMNS IN ARRAYS LPFIX AND LPROPC KPI = NUMBER CF COLUMNS IN FLTNP 6 6 PTPROPC KP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND ELPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FLIMISC COORO = SPATIAL COORDINATES OF ELEMENT'S NODESC 0 = NODAL PARAMETERS ASSOCIATED WiTH A ELEMENTC ELPROP = ELEMENT ARRAY OF FLOATING PCINT PROPERTIESC LPRCP = ARRAY OF FIXED POINT ELEMENT PROPERTIESC PRTLPT = FLOATING POINT PROP OF ELEMENT'S NODESC FLTMIS = SYSTEM STORAGE CF FLOATING POINT MISC. PROPC C = ELEMENT COLUMN MATRIXC NTAPEI = UNIT FOR POST SOLUTION MATRiCES STORAGEC NTAPE2,3,4 OPTIONAL UNITS FOR USER (USED WHEN >

C *** ELCOL PROBLEM DEPENDENT STATEMENTS FOLLOW ***C . . •... • •. •... SC RECOVER COLUMN MATRIX FROM ELSQ

COMMCN XVZ(3) AJ(3,3i1

00 10 I = 1 NELFRE10 C(I) = CGL4II

RETURNEND

(b)

FIg. 12.3 Mesh of one degree wedge segment divided into four elements

z

20

16

4

2

19

13

Page 299: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12.4 Comparison of exact and finite element solutions

0

I—

40

20

20, 4, 1,9, 3,0 , 4, C,3, 0, 0,0,0,0,2,0,O,8,0,0,0,0,u,O,O,0

I I 1.C2 1.03 1** *

18 1

19 1

20 1

1 1 72 5 C) 113 9 13 154 13 11 191 1 100.6 1 100.

20 1 0.01 2

2 23 24

120., 120., 12C.,

Homogeneous

80

60

— Exact0 Finite element

Non - homogeneous

• Finite element

02 3 4

r (in)

Fig. 12.5 Conduction through adata

1-deg segment of an infinite cylinder; test problem

C.O 0.0c.0 c.1C.01745 C.C

5.0 C.0 0.14.9q924 C.08726 0.04.99924 0.1

P 2 6 8 47 6 10 12 8

11 10 14 16 12

1

20.,,12CC., 1200., 1200., 0.

Page 300: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12.6 Conduction through a 1-deg segment of an infinite cylinder; test problemoutput

$$**$ PRObLEM PARAMETERS *****CF NODAL POINTS IN SYSTEM =........20CF ELEMENTS IN SYSTEM 4

NUMBER CF NODES PER ELEMENT =......... 8NUMBER CF PARAMETERS PER NCDE 10 IMENSICN OF SPACE =...........,............ 3NUMBER CF HIJUNDMcIES WITh GIVEN FLUX....... 0NUMBER CF NUDES CN BOUNCARY SEGPENT=........ 4NUMBER OF CONTOUR CURVES BEThEEN

5TH C PEPCENTILE CF EACh PARAMETER 3NUIBER CF FIXED PT PROP PEP NOCE =.......... 0N(JMBER CF FLOATING PT PRCP PER NCDE aNUMBER CF FIXED PT PROP PEP ELEMENT .. 2NUMBER CF FLOATING PT PREP PER ELEMENT =.... 0NUMBEP

CF PT MISC PROP =.... , 8NOt)AL PAPAiIETERS TO BE LESTEC BY NODESNODAL PARAMETERS TO BE LISTEC BY ELEMENTSALL ELEMENT MATRICES ARE ZERO.

*S* NCCAL. POINT DATA **$NODE, CCNSTRAINT £NDICATCR, 3 CCCRD(.FATES

I I 1.0000 0.00CC 0.00002 1 1.0000 C.CCCC 0.10003 1 0.9998 0.0174 0.00CC4 1 0.9998 0.0174 0.10005 0 1.5000 C.CCCC 0.00CC

0 1.5000 C.0000 0.10007 0 1.4998 C.0262 0.00008 0 1.'.998 C.0262 0.1000S 0 2.0000 0.0000 0.0000

10 0 2.000C C.OCCO 0.100011 0 1.9997 0.000012 0 1.9997 0.0349 0.100013 0 3.0000 C.CCCC 0.00CCjL 0 0.00CC 0.10CC15 0 2.9995 0.0524 0.000016 0 2.99°5 0.052', 0.100017 1 5.0000 C.OCCC 0.00001. 1 5.0000 C.0CCO 0.1000ic 1 4.9992 0.0873 0.000020 1 4.9992 0.0873 0.1000

*** ELEMENT CONNECTIVITY GAlA $**ELEMENT NO., 8 NCDAL INCICENCES.

1 1. 5 7 3 2 6 8 42 5 9 11 7 6 10 12 83 9 13 15 11 10 14 16 124 13 17 19 15 14 18 20 16

*** CCNSTRAINT E(JUATICN EATA **4CONSTRAINT TYPE ONEEQ. NC. NODEL PAR1 Al

1 1 1 .[CCC0000E+032 2 1 .ICOCCCOOE.033 3 1 .ICOOC000E+034 4 1 .ICCCCCOOE+035 17 1 .CCCCCCOOE4006 18 1 .CCCCC000E.007 19 1 .(CCCCCOOE+008 20 1 .CCCCC000E.0O

*** ELEMENT PROPERTIES ***ELEMENT NC. PROPERTY NC.

1 1 22 1 23 1 24 1 31 2 22 2 13 2 14 2 2

END OF FIXED POINT PROPERTIES OF ELEMENTS

Page 301: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12.6—continued

*** MISCE(LANECLS SYSTEM PRCPEFT!ES •**PROPERTY 4U. VALUE

1. O.12000000E+032 0.1200000CE+033 O.12000th)OE+034 O.00000000E+OO5 O.12000000EG04s O.12000000E+047 O.L2000000E+04

O.C0000000E+O0

$** EXTREME VALLES OF NCCAL PARAMETERS ***PARAMETER NO. M4X.VALUE,NCDE NIN.VALUE,NCDEI O.L0300000E+O3 , 4 O.CC000COOE400 , 20

*** CALCULATION OF CONTCUR CURVES •*'PARAMETER NUMRER 1

5TH PERCENTILE VALUE = C.5CCOE+CI95TH PERCENTILE VALUE

CONTOUR NUMBER IVALUE CF CONTOUR = O.E000EsOIPOINT NC., 3 CCORDINATES

1 0.3449E+01 0.OOCOE+C02 O.3648E+O1 O.6019E—Ol3 0.3449E+C1 O.0000E+C14 0.3445E+OL O.oolcE—cl

CCNTOUR 2VALUE CF CONTOUR = O.5CCCEGC2PCINI NC., 3 CCOFcDINATES

1 C.2155E+C1 O.000CE+002 O.2155E+OI O.3762E—C13 O.2155E+O1 O.0000E+C04 O.2155E+C1 O.3762E—C1

CCNTCUP NUMt3ER * 3VALUE CF CONTOUR = O.9500E402POINT NO., 3 CCOROINAIES

1 O.1485E+C1 0.0000E+OO 0.0000E+0O2 C.1485E+C1 O.2591E—C1 C.0000E+O03 O.1485E+O1 O.0000E+0O 0.I000E*004 0.1485E+O1 O.2591E—01 O.1000E+0O

NORMAL OF MODEL PROGRAM.

*** CUIPUT OF RESULTS ***NOOE 3

I !.OCOflE+O 0.0000E+0 0.0000E+O O.1000E+032 t.CCOOE+O C.0000E+0 I.COCCE—L 0.L000E+033 9.5S85E'-l 1.7450E—2 0.COCCE+O O.IOCOE+034 9.cce5E—l 1.7450F—2 1.000CE—I 0.1000E+035 L.5000E.O O.0000E+C C.COCCE.0 0.94e4E.025 O.0000F+0 1.000CE—1 0.9484E+027 1.4cSRE.o 2.6L80E—2 C.COCCE+O 0.9484E+028 1.4999E+O 2.6180E—2 t.000CE—L O.9484E+029 U.0000E+O 0.0000E+O 0.5801E+02

10 2.0000E.O 0.0000E+0 t.C000E—1 O.S8C1E+0211 1.9997E+O 3.4910E—2 O.0000E+O 0.58C1E+0212 L,cc57E.o 3.4910E—2 1.CCCCE—1 O.5801E+0213 3.0000E+0 O.0000E+O C.COCCE+0 0.6446E+0l

3.CCOOE+O C.0000E+O L.000CE—115 2.9S95E+O 5.2360E—2 C.CCOCE+O 0.6446E+0116 2.9595E+0 5.2360E—2 1.C000E—1 0.6446E+0117 0.0000E+O C.COCCE+O 0.0000E+0018 5.OCOOE+O C.0000F+0 1.COOCE-t 0.COCCE+OC19 4.9992E.0 8.72o0E—2 C.000CE.D 0.0000E+OC20 4.cqS2E+0 8.?260E—2 1.CCOCE—l 0.OOCCE+O0

C • Coo a E+ 00O.C000E+00C. LOGO E+OOC. 1000 E+ 00

0.0000E+OOC.C000E4000.1000E400C. I000E+0O

Page 302: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 12.7 Subroutine FMOSNE

SUBROUTINE FMCNECC FIND 1ST FUNDAMENTAL MAGNITUDES 0t. A 3—U SURFACECCDP IMPLICIT REAL*8 (A—H,O—Z)

DIMENSJCjN A(2,2), RJ(2,3), DtLTA(2,N}, COCRC(N,3)C = NJMBER OF NODES DEFINING THE SURFACEC DELTA = LOCAL DERIVATIVES OF THE SIIAFEC COO RD = THREE SPATIAL COORDINATES Cf THE NCDESC RJ = REDUCED JACOBIAN MATRIXC A = 1ST FUND. MAG. (METRIC TENSORJ, FFM = DET(A)C INDEX NOTATiON: 1=1,2,3, R,S=1,2, /=SUBSCRIPTSC A/RS = X/I,R * X/I,5 RJ/R1 = X/I,RC FORM REDUCED JACOBIAN

ZERC = 0.00DO 30 1 = 1,2DO 20 J = 1,3SUM = ZERODO IU K = I N

10 SUM = SUM +

C FORM METRIC TENSORA(1,1i = RJ(J,1J*RJ(1,11 + RJ(1,2)*RJ(J,211 + RJ(1,3J*RJ(1,3)A(L,2) = RJ(1,Ii*RJ(2,1) + RJ(l,21*RJ(2,2)

1 + RJ(1,31*RJ(2,3)= + RJ(2,21*RJ(2,2)

FFM = A(1,1I*A(2,2) — A(1,21*A(1ç SURFACE AREA DA =c ANGLE R—S COS (ANG) = A1l*A22C LENGTHS DLI

ZERUT0L2 =

C DETERMINATE CF A IS NOT POSITIVE CEFINITE5300 FORMAT (I FATAL DATA ERROR IN SUBR FMGNE'J

ENDN

F(g. 12.8 Subroutine SNORMV

SUBRCIUTINE (RJCC FIND UNIT NORMAL VECTOR TO A 3—U SURFACt AT A POINTCCOP IMPLICIT REAL*8 (A—H,O—Z)

CIMENSIGN RJ(2,3), VECTOR(3)C VECTOR = GLOBAL COMPONENTS OF UNIT NGRMAL VECTORC THE FOLLOWING QUANTITIES ARE OBTAINEC IN SL'BR FMCNEC RJ = REDUCED JACOBIAN MATRIXC A = 1ST FUND MALNITUDES(METRIC TENSIJR), FFM = CET(A)CDP SQRT(Z) = USQRT(ZJ

ROOT =VECTOR(1) = (RJ(l,2)*RJ(2,31 — RJ(1,31*R,J(2,2)J/ROOTVECIGR(2) = (RJ(1,3)*RJ(2,1) — RJ(l,fl*RJ(2,31)/ROOTVEC1OR(3) = (RJ(1,1)*RJ(2,2) —RETURNEND

Page 303: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Table 12.1 Parameter Definitions for Three-dimensional HeatConduction

CONTROLNSPACE=3 NLPFIX=2N=8 MISFIX=8

LBN=O*,or4**NCURVE = 3

DEPENDENT VARIABLES:1 = temperature, T

BOUNDARY FLUX COMPONENTS AT NODES**:1 = specified normal outward heat flux per unit area, qn

PROPERTIES:Element level:

Fixed point:1 = Gaussian quadrature order in each dimension, (2*)2 = Element material number

Miscellaneous Level:K + 1 = thermal conductivity in x-direction,K + 2 = thermal conductivity in y-direction,K + 3 = thermal conductivity in z-direction,K + 4 = heat generation per unit volume

where for material number I, K — 4*(( — 1)

CONSTRAINTS:Type 1: specified nodal temperatures

* Default value** Optional

Page 304: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

13

Automatic mesh generation

13.1 Introduction

As we have seen the practical application of the finite element methodrequires extensive amounts of input data. Analysts quickly learned thatspecial mesh generation programs could help reduce this burden. Todaythe most powerful commercial codes, like PAFEC [39], offer extensivemesh generation and data supplementation options. Most such codes usea mapping, or transformation, method to generate the mesh data.

Mesh generation by mapping is a technique where the elementconnectivity (topology) is simplified to a square or triangular grid systemwhich is then mapped into the actual shape of the domain of interest. Onlythe coordinates of the perimeter points must be known in advance sincethey are used to execute the mapping process. The spatial coordinates ofall internal nodal points are automatically computed. The node numbersand element incidence data are also automatically generated. The two mostcommon mapping methods are isoparametric mapping and the 1—f mapping.Both of these methods impose certain restrictions on the layout of thenodal points but the reduction in the effort required to effect the solutionof a given problem more than compensates for these restrictions. Sinceisoparametric elements were discussed earlier, the latter method will beconsidered here.

A typical two-dimensional mapping program locates and numbers thenodal points, numbers the elements and determines the element incidences.In addition, it usually allows for assignment of codes to each node andeach element. Thus, it also has limited capability to generate boundarycondition codes and element material codes.

To layout a nodal point system for the body to be analyzed, the regionof the (x, y)-plane intersecting the body is covered, insofar as any curvedboundaries will permit, with an array of quadrilaterals (see Fig. 13.1).

295

Page 305: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

296 13. Automatic mesh generation

Each vertex of a quadrilateral is taken to be a nodal point. In the mappingprogram each nodal point is identified by a pair of positive integers, denotedby (I, J). Nodes with common values of J are said to lie in the same row.This implies that they will be on a common curve in the (x, y)-plane.

The scheme for mesh generation may be thought of as representing amapping of points from the (I, 1)-plane into the (x, y)-plane. As illustratedin Fig. 13.2, each quadrilateral in the (x, y)-plane is a square in the (1,1)-plane and may be identified by the (I, J) coordinates of its bottomleft-hand corner in the (I, J)-plane. An integer nodal point number isassigned to each (1, J) point, and an integer element number is assignedto each (1, J) point that corresponds to the bottom left-hand corner of thesquares in the (I, J)-plane. Another typical mapping is illustrated in Fig.13.3. In this figure, the body to be analyzed is shown in part (a), the pointsin the (I, 1)-plane are in (b), and their mapped locations in the (x, y)-planeare shown in (c).

The mesh generation is accomplished in the following manner. Datacontaining (among other things) the values of 1, 1 and the x- andy-coordinates are input for each node whose coordinates are to be specified.Such nodes must include at least all nodes on the boundary of the regionof interest, as well as on any interfaces between regions with differentelement properties. As many other interior nodal points as the user maydesire may have their coordinates specified, but no others are required.As the data cards are read, a list is compiled of the minimum and maximumvalues of I for each J, and each node for which coordinates have beeninput is identified and the coordinates are stored. After all the desirednodal points cards have been input, the coordinates for all unspecifiednodes which have 1 in the interval IMIN I IMAX for the proper J, arecalculated for all 1(1 I JMAX). The calculation, or mapping, of theunspecified coordinates can be accomplished several ways. Four optionsare outlined here.

Page 306: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 307: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.3 Typical mapping

[1 I I I I I I I I LLLI I I I I I I I I I I I I I I I I

I III(b)

Page 308: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

13.2. Mapping functions 299

13.2 Mapping functions

The first method is an iterative one that generates a mesh by approxi-mately solving Laplace's equation using the given perimeter (and interior)points as boundary conditions. For example, the x-coordinates are obtainedfrom an approximate solution of

aJ2 jjj2

where x is specified on the perimeter of the (I, J) domain. First the x-coordinates of the boundary points are used as boundary values of theunknown harmonic function, and the values obtained on the interior points,and x(1, J) are taken as the x-coordinates of the corresponding points inthe (x, y)-plane. A similar procedure yields the y-coordinates of the unspeci-fied interior nodes. It should he noted that, in general, this method tendsto yield nodal points with uniform curvilinear spacing. If this is not deemeddesirable, some nodal points interior to the region may have theircoordinates specified to control the distribution of the remaining points.This last point is illustrated by comparing Fig. 13.4 with Fig. 13.3. In Fig.13.4 some interior nodes have been specified to make desired changes inthe mapped mesh. The interior nodes which have been specified are shownwith the blocked-in symbols.

The Laplace mapping method takes the largest amount of computer timebut it is still quite fast and usually the preferred method. The other threemethods to be discussed (see Fig. 13.5) are direct interpolation techniques,and therefore require little computer time. The two point linear inter-polation method is the fastest but it can easily lead to overlapping meshlines. It utilizes an interpolation between two (given) bounding points onthe I line. A four point interpolation is also used at times. This optiondetermines the two closest (given) bounding points in the I direction andthe two in the I direction. The coordinates of point (I, J) are then calculatedby a quadratic interpolation between the coordinates of these four points(see Fig. 13.6).

An eight point interpolation is also commonly used, hut this routine hassome minor restrictions on the shape of the mesh in the (I, J)-plane. If themesh is not a rectangle then it must consist of sub-areas, defined by interiorpoints, that are all rectangular (see Fig. 13.7). The two closest boundingpoints in both the 1 and I directions are determined. These four points areused to define the four corner points of the rectangular sub-area. Then thecoordinates of point (1, I) are calculated by nonlinear interpolation betweenthe given coordinates of the above eight points. The eight node interpolation

Page 309: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

300 13. Automatic mesh generation

uses a set of blending functions that also leads to smooth variations innodal locations. In addition, it tends to make the calculated lines orthogonalto the four boundary curves used in the interpolation.

Usually the program calculates the location of each point and assigns anodal number to each point (except those that are interior to a hole). Afterthis, the program forms quadrilateral or pairs of triangular elements (exceptthose interior to a hole) by assigning the proper nodal point numbers tothe corners of the elements. After the elements (and any element codes)have been generated, they are checked for possible errors involving negativeareas. The output of the mesh generation program is designed so that itmay be fed, as input data, directly to the finite element analysis programMODEL, or similar codes.

The user should note that the bandwidth of the equations in the finiteelement codes will be directly proportional to the maximum difference inI coordinates in the mesh. The maximum bandwidth generated by themapping is usually calculated and output for the user's information.

All of these mapping methods work well for convex domains. However,for concave domains the nodes may become too crowded and it is usuallybest to divide concave domains into nearly convex by specifying variousinterior lines.

It is possible to extend all of the above techniques to surface generationproblems that might be required in the analysis of general shell structures.They may also be generalized to three-dimensional solids but the isopar-ametric method appears to be the simplest for such problems.

FIg. 13.4 Effect of two interior lines

Page 310: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

a = 12 —1

b =12 — J

c=I —11d=J —J1

Lop ac ion

Direct interpolation

Two points

Four points

Eight points

(1,J2)

(11,J).— '(12,1)

(1, J1)

abcd f X(12,J) + X(I,J2) ÷X(I1,J) + X(1,J1)1X(I,J)=+ bdla(a +c) b(b +d) c(a +c) d(b +d)

FIg. 13.5 Common mapping options

Iterative

Fig. 13.6 A four point interpolation

Page 311: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

302 13. Automatic mesh generation

Fig. 13.7 An eight point interpolation

fo(z) 10z3 — 15z4 + 6z5 (11, J2)J1. f2)(/2, J2)

J)— 1—Il 'U—1211

I I

f—ilI

4(/1,J1) (1,J1) (12,J1)

X(I,J) = f1(u)X(11,J) + fo(u)X(12,J) + f1(v)X(1,J1)

+ fo(v)X(J. J2) — fi(u)fi(v)X(Il , J1)

— f1(u)fi(v)X(12. Jl) — fj(u)fo(v)X(I1. J2) — J2)

13.3 Higher order elements

For the higher order elements there are additional considerations. Oneis that for the 8, 9, and 12 node elements some internal nodes are omitted.The simple procedure is to map all points in the usual manner but omitthem in the output state while they are being numbered. The secondproblem is that of identifying the element incidences. As usual, the elementsare identified by the (1, J) values of their bottom left-hand corner. Forhigher order elements the element spans more than one row and column.It is necessary to store the (1, J) values of all nodes of a typical elementtype. This is accomplished by building two lists which contain numbers tobe added to (I, J) to identify each of the nodes.

For example, for the simple four node quadrilateral one could defineIQ = [0, 1, 1, 0J and JQ = [0,0, 1, 1] to identify the four relative positions(I + IQ, J + JQ), i.e. (1,J), (1 + 1,J)(I + 1,J + 1), and (1, J + 1). Similararrays exist for each type but they range from zero to LINC, the numberof increments between corner nodes. Of course, for the triangles it isnecessary to have two sets to allow for the different diagonal directionswhich can be selected.

Once these relative positions are known one simply loops over each 1,J pair and extracts the corresponding node numbers. Figure 13.8 showsthe typical relative node positions and the omitted internal nodes. Itillustrates only half of the triangular options.

Each element has an assigned code (material number) for use in the

Page 312: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

13.3. Higher order elements 303

output. Consider an element associated with point (1, J). The element'snodes not lying on I + LINC or J + LINC are assigned the same code as(I, J). It is important in non-homogeneous problems to verify that one hascorrectly input the various element codes. As an aid the example programprints a sketch of the input element codes. The codes are initialized tounity, and negative values imply elements in a hole to be omitted fromboth the point and element output.

It is also possible to use a mesh generator to also generate constraint orflux data. However, this tends to become rather specialized. It is relativelyeasy to do since after the mesh generation is complete one has the coordinatearrays, boundary codes, and node numbers for all (I, J) points in themapped space. Thus it is just a matter of combining these data in aparticular form. For example, to generate flux data one could input two(I, J) points and their corresponding flux components, and then all nodesalong the line could be recovered and the flux obtained by linearinterpolation.

The previously outlined procedures have been implemented in a pro-gram, MESH2D, which is discussed here. The program allows the user theoption of selecting elements that are linear, quadratic, or cubic. Eitherquadrilaterals or triangles can be generated. The triangles are obtained bydividing the quadrilaterals across their shortest diagonal. Points being usedto define the physical shape can be input in either cartesian or polarcoordinates.

The minimum data consist of a title, control card, the nodal definitioncards, and any material code changes (default value is unity). These dataare explained in the table of input formats. Some of the parameters havetheir meanings illustrated in Figs. 13.9 to 13.12. The nodal point definitioncards can generate points in either Cartesian (default) or polar coordinates.The number of points generated by such a card depends on the parameterKDELTA. Lines or arcs are generated by linear interpolation between thetwo limiting values defined on the card.

The location of points in the integer space are defined by the (1, J)coordinates of the first point, the number of additional points, KDELTA,and direction of motion flag, INTEST. Data can be for a single point(INTEST = 0) but are generally for motion parallel to the I-axis, i-axis,I = —J diagonal, or I = J diagonal. If the end point (R, Z) coordinates arebeing input the respective flags are 1, 2, 3, and 4. However, if the previouslydefined (R, Z) coordinates are to be used to generate a straight line thenthe flags are 5, 6, 7, and 8 and one must only supply the integer definitions(I, J, KDELTA). The generation must be in the direction of positive I(or positive J when I is constant).

Holes in the mesh and any changes in element codes are defined by the

Page 313: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

304 13. Automatic mesh generation

element code generation cards. These assign element codes for rectangularregions as illustrated in Figs. 13.11 and 13.12. Negative codes are inter-preted to denote holes which are omitted from the point and elementoutput phases. In practical problems one must usually carefully define anyinterior lines that divide material regions.

The output of the code usually consists of print, punch, and plot files.For punched data the MODEL code formats are default but a provisionhas been made for a user supplied set of formats. The plotting logic isquite simple. First any existing f-lines are plotted, then the I-lines areplotted and if the elements are triangles then one must insert the requireddiagonals on each i-row of elements. The print file echoes the given dataand lists data generated by the point and element definition cards. As adebugging aid it also prints a list of given integer points and the elementcodes. The controlling program is given in Fig. 13.13 while the inputroutines for the points and material codes are given in Figs. 13.14 and13.15, respectively.

A typical four point mapping routine for the nodes is shown in Fig.13.16. After the coordinates have been found subroutine OMITP, Fig.13.17, identifies any points that will be omitted from the higher orderelements. Then the nodal points are numbered and output by PCOUNTwhich is given in Fig. 13.18.

The element incidences, material number, etc., are established by sub-routine LCOUNT. As shown in Fig. 13.19 it calls IJQUAD or IJTRI toobtain the list of relative (1, J) coordinates of the element nodes. Thesetwo routines supply the data illustrated in Fig. 13.8. Subroutine LCOUNTalso outputs the element data.

Now that the points and elements are completely defined in the (1, J)database they can be plotted using PLOTIJ which is given in Fig. 13.20.Hardware-dependent calls have been hidden in the calls to dummy routines.These include WINDO, MOVETO, LINETO, STARTP and FINSHP.

Figure 13.21 shows a set of data chosen to illustrate all of the inputoptions. The generated (I, J) and (R, Z) plots are shown in Fig. 13.22.The data formats are given in the Appendix.

Page 314: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

I 5 2 1 4 2

(C)

4 II 7 3

8

12

1 5 9

(e)

FIg. 13.9 Interpolation of physical coordinates

(a) Polar

(b) Polar>Q

Fig. 13.8 Location of nodes relative to defining point (I,J)

LINC

4 7

(H

Page 315: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 13.10 Meaning of point input generators

1,5

It,J1'—

KDELTA additional points

Increment directions

INTEST < 5 use specified coordinates

INTEST > 4 look up old coordinates

FIg. 13.11 Identifying holes

Holes that must be identified— by element codes

4,8

0

377

I

Page 316: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.12 A block of elements with material code MM

_______

— ——-12,J2

— LMM

n.M I

Fig. 13.13 Controlling program

FIXED PT ARRAY S;ORAGEC NINNPr. MINEL STARTING NODE AND ELEMENT NUMBERS

DATA (FIX /1800,2000/

CALL EXITSTOPENDSUBROUTINE MESH2D (KFLT,KFIX,AD,ID,t'INNPT,MINEL)

CC FEM MESH GENERATION FOR TRIANGLES AND QUADRILATERALSCCC TITLE IS THE NAME OF THE PROBLEM. ETC.C NPTCD NUMBER OF NODAL POINT INPUT CARDSC NAXR = MAX. VALUE OF 4 IN INPUT DATAC MAXC = MAX. VALUE OF I IN INPUT DATAC FORMATS FOR PUNCHED OUTPUTC IOPT 0, AKIN'S MODEL CODEC -. 0, USER SUPPLIED FORMATSC OUTPT AND QUTEL GOVERN THE METHOD OF OUTPUT FORC THE POINIS AND ELEMENTS. THE CPTICNS ARE:C = 0, PRINTC 1, PRINT AND PUNCHC = 2. PUNCH CNLYC 3, NO OUTPUTC LTYPE = ELEMENT TYPE SELECTIONC = 3. 3 NODE TRIANGLEC 4, 4NODE QUADC 6, 6 NODE TRIANGLEC = 8, 8 NODE QUADC 9 9 NODE TRiANGLEC = 12 NUDE QUADC THE UNSPECIFIED POINTS ARE DETERMINED BY:C MAP = 0 • MAPPING USING LAPLACE'S EQUATION LIIERATIVEIC = 1 , TWO POINT LINEA. INTERPOLATION BETWEENC SOUNDING POINTS ON THE 4 LINEC = 2 , FOUR POINT INTERPOLATION BETWEEN GIVENC POiNTS ON THE I AN) JC = 3 • EIGHT POINT INTERPOLATION BETWEEN GIVENC POINTS ON THE I AND J LINES PLUS FOURC 'CORNER' POINTSC NMTCD = NUMBER OF ELEMENT CODE INPUT CARDSC IF ECHO = 0 THEN INPUT DATA ARE LISTEDC LPLOT = PLOTTING OPTIONSC = 0, NO PLOTSC = 1, PLOT R,Z MESHC = 2, PLOT 1,4 MESHC = S, PLOT BOTH R,Z AND 1,4 MESHESC NEOCO = NO. CARDS FOR EDGE FLUX CALCULAI IONS = 0C — ———————

C LOGICAL UNITS USED BY MESH2D:C 5 = CARD READER, 6 * LINE PRINTERç 7 CARD PUNCH, WHEN DUTPT OR GUTEL I OR 2

Page 317: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.13—continued

INTEGER OUTPT, OUTEL, ECHODIMENSION TITLELI9), ALHKFLfl,CATA IJFLAG /981654/

C *** PRINT AUTHOR CREDIT ***CALL TOOT

C--> *** READ,PR IN!, AND CHECK INPUT DATA ***READ (5,5000) TITLEREAD (5,5010) MAXR, MAXC, NPTCD, NMICU, LTYPE, LPLOT,

1 MAP, OUTPT, OUTEL, lOP!, ECHO, NEDCOIF I LTYPE.LT.3 ) LTYPE = 3WRITE (6,5020) TITLEWRITE 16,50301 NPTCU, NMTCD, NEOCU, MAXC, MAXR, OUTPT,

I MAP, OUTEL, LPLOT, lOP!, ECHO, LTYPEC DETERMLNI I,J INCREMENTS FOR hYPE

LINC I

IF I LTYPE.EQ.b .OR. LTYPE.EQ.a ) LINC = 2IF ( .OR. LTYPE.EQ.12 I LINC 3

CC ARRAYS ARE DEFINED AT FIRST USEC FIXED PT ARRAY STORAGE LI: 1—INNER 2—MAT 3—IMAXC 4—IMIN 5—LIMIN 6—uMAX 7—IGIVEN 8=1—NPTNUMC FLOATiNG PT ARRAY STORAGE MI: I—K 2—i 3—CODE 4—ALINECC—-> *** CALCULATE ARRAY POINTERS •**

CALL PTER (Ll,L2,L3,L4,L5,L6,L7,L8,LICTAL,I M1,N21M3 M4,MTOTAL,MAXR,MAXC)

C *** VO:NT&RS COMPLETED ***WRITE (6,50401 KFLT,MIOTAL,KFIX,LTOIALIF (KFLT.GE.MTOTAL .ANO. KFIA.Gt.LTUIALI GO TO 10WRITE (6,50501CALL EXIT

10 CONTINUEC *** INITIALIZE ARRAYS ***

CALL INITAL (KFLT,KFLX,AD,LD,MAXR1MAXC,12,L3,L4,L6)C—-> *** READ NODAL POINT DEFIt'uiTICNS ***

CALL INPTS (MAXC,MAXR,AD(MLI,At)(N2) ,A0(M3J,ID(L1),1

C *** PRINT MAP OF DEFINIU POINTS ***IF CALL IJMESH (MAXC,MAAH,AD(M4),

1 IDILI),I0(L.31,I[flL4)1C——> *** REAU CHANGES IN ELEMENT CODES ***

IF (NMTCD.GT.O) CALL INEL (MAXC,MAXR,IO(L2141D(L51,1IF CALL IJMAT

1 ID(L6),lD(L2),ID(Ll)1C——> *** MAP POINTS ***

IF ILPLOT.EQ.2 .ANO. OUTPI.EQ.31 GO 10 15IF ($AP.EQ.0) CALL LAPLAC (MAAC,MAXK,AU(M1),AD(M2),

I IOtLII,It)(L4J,IO(L3),LD(L7),N1)IF (MAP.EQ.1) CALL TWOPT (MAXC,MAXR,ADINI),AOIM2),

1 I0(L1J,ID(L41,IO(L3),Nl)(F (MAP.EQ.21 CALL FOURPT (MAXC,NAXR,AL)(ML),AO(M2),

I IO(L1),ID(L4),ID(L31,I0(17),N1)IF (MAP.EQ.3) CALL EIGHTP (MAXC,MAAR,AJIM1J

1 I0(L4),ID(133,LD(L?j,Nd1't'IF (OUTPT.LT.2J WRITE (6,5060) Ni

C——> *** NUMBER POINTS ***15 IF (LTYPE.GT.61 CALL OMITP (MAXR,MAXC,ID(L21,LTYPE,

I LINC,IJFLAG,AD(M11,AC(M2))CALL PCOUNT (MAXC,NAXR,ADIMI),AO(Mfl,AO(M3),I0112)

I 101L8),ID(L4),ID(L3),IJFLAG,IOPT,UUTPT,MINNPdC——> *** GENERATE ELEMENTS ***

IF (OUTEL.LT.41 CALL LCOUNT (MAXR,MAXC,AC(ML},AO(M21,1 IU(L6),ID(L5),IO(L2)110(L81,LTYPL,LINC,MLNEL,OLjTEL,IC

C *** PLOT RE SUL iS ***IF (LPLOr.E 0.01 GO TO 20

C INITIALIZE PLOT FILE AND SET FIRST ORIGiNCALL STARTP

C PLOT R—Z MESH(F (LPLOT.EQ.1 .OR. LPLOT.EQ.3) CALL PLOTIJ (MAXC,MAXR,

1 ADIMI),AD(M2),LO(L8),lj)(L21,ltJ(L3),iD(L4),IU(15),2 ID(L63,LINC LTYPE,LPLOT)IF (LPLOT.LT.21 GO 20

C REPLACE R,Z BY I,J VALUES AND PLOTCALL IJTORZ LMAXC,MAXR,AD(M1I ,AOLN2JICALL PLOTIJ IMAXC,MAXR,AD(M11,AD(M21,101L8) ,ID(L2)

1 10114),lD(L51,IDtL61,LINC,LTYPE,LPLOd'

Page 318: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.13—continued

20 CONTINUEC CLOSE PLOT FILE

IF (LPLOI.GT.OI CALL FINSHP

FORMAT 420A4i

5030 FORMAT 4' **** M E S H 2 D ****',//,1' NLMBER OF INPUT CARDS FOR:',/,2' NODAL POINTS3' CODES '.15,1,4' CONDITIONS '.15,/Il,5' MAXIMUM INPUT VALUESI i =1,13,I, J =',13,///,6' CCNTROL PARAMETERS:',I,7' OUIPI ',13,IOX,'MAP8' OUTLL ',13,LOX,'LPLUT '.13,/p9' IOPT ',13,LOX,'cCHD '.13,1,1' ELTYPE '.13,//)

5040 FORMAT ('1 ARRAY STORAGE :',/,' AVAILAI3LELED' I ' FLOATING POINI',IIU,LX 110 / • FIXED POINT '.110,

5050 4' DIMENSION STATEMENT ENDING.')5060 FORMAT 4'OCOOKDINATES CALCULATED AFTER '.13,' ITERATIONS')5070 FORMAT 4' ENDING OF MESH2D')

RE I RNEND

Fig. 13.14 Subroutine INPTS

SUBROUTINE INPTS ,R,Z,CODE • INNER, IMIN,IMAX,1 LIMIN,L1'4AX,ECHO,NPTCD,MAP)

C . . . . . S • • • • • . .C INPUT COORDINATES AND NODAL POiNT CODESC . . . . . . . . . . . . . . S

INTEGER ECHO, POL.ARDIMENSiON R(K1,a(21,Z(Kl,K2).CQDE(Kj,1c21.INNER(K1,K2),

1 IMIN(K2),LIMIN(K2),LIMAXIK2I,IMAX(K2)C R(I,J),ZI1,J) COOROS. OF PT. CORRESPONDING TO (I,J)C CODE(L,JI = PT. BOUNDARY CODE ASSIGNED IC (I,J)C INNER(I,JJ > 0 IMPLIES PT (1,41 INPUTC IMIP.(J1 IMAX(J) * HIM MAX I FOR ANY PT IN ROW JC LIMIN(JJ,LIMAX(4J MIN, MAX I OF PT IN ELEN IN ROW J

10 IF I ECHO.EQ.0 I WRITE 46,5000)5000 FORMAT 4IiiI,23X,'$ODAL POINT INPUT DATA'/3X,IHI,3X,

1 IHJ,bX,bHR(I,JJ,6X,6HZ(t,Jj,3x, IQHANGLt(1,J3,6X,2 5HRCENT.6X,5HZCEMT,2X,9HCODEII,J1 I

C POLAR — 0 INDICATES INPUT IS IN CARTESIAN COCRDS.C *** THEN R= RADIUS, AND ZAXIALC POLAR NOT 0 INDICATES INPUT IN PCLAR COCROS.C RELATIVE TO A CIRCLE WHOSE CENTER IS (RC,ZC)C IHEN R=RADIUS OF CIRCLE, Z=ANGLE LDEGI FROM R—AXISC 2,6 4 / 4,8 MEANING OF INTEST IS TO LEFT.C J I DIRECTION 15 FRCM POINT.C 4 I IF > 4 FIND COCRDS OF END PTS ANDC 0 J/I1IIII 1,5 USE OLD CODES. 1—4 INCREMENTS:C • 1,5 = P05 1, 4,8 = PCS I 4C • 2,6 = PUS 4, 3,7 = POS I NEG 4C • 3,7 0 = SINGLE PUNT MODEC KOELTA = NO. ADDITIONAL POINTS BEYOND 1,JC R1,Z1 — (.OOKD (IF (1,4), R2,Z2 = CCORU (IF FINAL PT

DO 160 N 1,NPTCDREAD (5,5010) INTEST,I, J,KDELTA,PQLAR,CC,RI,z1,

I R2,Z2,RC ZC5010 FORMAT 1 513 F5.0, 6F10.0 I

C SET 1—4 LINuS AND INCREMENTSIP — 1IF (INTEST.E(1.0.OR.INTEST.EQ.2.OR.INIEST.EQ.6) IP = CJP — 1

IF 4 INTEST.LT.2 •OR. INTEST.EQ.5 I JP = 0iF 4 INTEST.EQ.3 .0k. INTESI.EQ.7 I JP = —IKOELTA IABS($DELTA)LOOP KOELTA + IIF 4 J.LT.1 .OR. J.GI.K2 I WRITE (6,50401 I ,JiF I I.LT.1 •UR. 1.GT.K1 I (6,5040) 1,4

Page 319: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.14—continued

5040 FORMAT I' INVALID L)ATA FOR I =',13, Si

IL I41 412 = 1 + KDELTA*IP42 Si + WDELTA*JPIF I WOELIA.LT.1I KDELTA = IIF INTEST.LT.5 ) GO 10 5

C USE PREVIOUSLY DEFINED COORDINATESRI = R(Il.J1IZl = Z(Ik.J1)R2 = R(12,J2)12 = 1(12,421

5 OR = 1R2 — R1)/KDELTADR.NE.Q.O .4110. DL.NE.0.O I

1 WRITE (6,5070)5010 FORMAT I' WARNING,BOTH RADIUS ANGLE ARE VARYING')

I = II — IPSi .11 — Sip

C LOOF OVER GENERATED POINTS00 110 1 1,LOOPI = 1 + LI'

4 2 4 +IF ( I.LT.IMINIJ) ) IMIN(J) I

IF I I.GT.LMAX(J) I IMAX(J) I

IIF I INTEST.GT.4 I CC = CODE(i,J)CODEII,J) CCIF I POLAR.EQ.O I GO TO 20IF I ECHO.hQ.O I WRITE 16.5080) I,J,R1,Zl,RC,ZC,CC

5080 FORMAT (214, IPEI2.4, 12X, 3E12.4, OPFIO.0R(I,JI R1*CQS(l1/57.295?81 • RC.

4) 2 R1*SIN(Z1/51.29578) + ZCGO to 25

20 IF I ECHO.EQ.0 I WRITE (6,5090) 1, 4, Ri, Z1, CC5090 FORMAT (214, LPEL2.4, E12.4, 36X, F10.O)

RU,.)) Ri1(1,41 = LI

25 RI. Ri • (JRzi zi + Dz

110 CONTINUEIF I ECHO.EQ.0 3 WRITE (6,51001

5100 FORMAT (IHO,1545H————+),2H——J160 CCNTINUE

C FIND BEGINNING C END OF P15 C ELEMS FCR EACH JIF I k2.LE.2 I GO 10 17542 K2 — IDO 110 J 1,42LIMINIJI — MAXO I JMIN(J), ININ(J+1) I

ITO LIMAXIJI MINO I IMAXIJ), £MAX(J+11 I

175 LIMIN(K21 ZMINIK2)LINAX(K21 IMAX(K21

C DETERMINE (4AXIMUM NODAL CONNECTIVITYMAX 0DO 180 4 1,42INTEST IMAX(J) — IMINIJIIF ( INTESI.GT.MAX 3 MAX ItIIEST

180 CONTINUEMAX — MAX + 2IF I ECHU.EQ.0 I WRITE 16,5120) MAX

5120 FORMAT 'ONODA*. POINT CQNNE(.TIVITY: • /I ' MAXiMUM DIFFERENCE IN NODE NO =',13,/,

RETUPNHALF BANDWIDTH INO+1)*(DOF PER NODE)',//)

END

Page 320: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.15 Subroutine INEL

SUBROUTINE INEL 1IU,K2,MAT,LIMIN,LIMAX,ECHcJ,NMTCD)

INPUT CHANGES IN ELEMENT CODES

INTEGER ECHOCIMENSION MAT(KI.K21, LIMIN(K21, LIMAX(K2J

C $AT(l.J) CODE OF QUAD ELEM WITH BLC AT 1,JC IF MAT 0 ELEMENT IS PART OF A HOLE

IF I I WRITE (6.5000)5300 FORMAT (1HI, ' CHANGES IN aLuCKS OF ELEMENT CCDLS',/,

1 ' 8LUCK MAT.NO. LIMiTS: 11 JI 12 J2',/)C ..........( 12,J2 MM IS ASSiGNED TO ELEMENTC . . CODES FOR ELEMENTS THEIRC • 111.12 • BOTTOM LHC WITHIN THE bLOCKC •......... MAT(I,J)zMM

00 80 N = 1,tiMTCDREAD (5,53101 11, JI, 12, J2, MM

5010 FORMAT 513IF I ECHO.EQ.O I WRITE 16,53201 N, MM, U, Ji, 12, J2

5020 FORMAT (15, 18 IIX 415)IF I J1.LT.i. .IJR. JLGT.K2 I WRITE (6

5040 FORMAT ('OWARNING, DATA INCLUDES NONEXISTANT ELEMENT')IF I 12.GT. ii 1 12 = 12 — 1IF I J2.GT.J1 I J2 J2 — IDO 70 .1 .11,42IF (11.LT.LIMJN(J) •OR. 12.GE.LIMAX(Jl) WRITE (6,504U)00 60 1 a 11,12MAT(I,JJ — MN

60 CONTINUE70 CONTINUE80 CONTINUE

RET UEND

FIg. 13.16 Subroutine FOURPT

SUBROUIJNE FOURPT (K1,K2,R,Z,INNER,IMIN,I?4AX,1 IGIVEN,NI)

C . • . • . . • . . . . • • .C FOUR POINT NONLINEAR INTERPOLATIONC

1 IMAXLK2J, IGIVENIKI)JLESS K2 — INI a IIF I JLESS.LE.1 I RETURNDO 80 Ja2,JLES$

C COUNT GIVEN POINTS IN ROWND 011 a IMINIJI12 IMAX(j)00 10 j a 11,12IF I INNER(I,J).NE.1 I GO 10 10HG a ND + IIGIVENING) I

10 CONTINUEC SKIP TO NEXT ROW IF ALL POINTS ARE GIVEN

IF ( NG.EQ.(12—11+1) I GO TO 80NGLESS = ND — 100 10 I,NGLESSIGPLUS = 16 + 1

C FIND LIMiTING I POINTSIF I IIGIVEN(IGPLUS)—IGIVEN(IG)J.EQ.1 I GO 16 10lB LGIVEN(IG1IF IGIVEN(IGPLUS)U a LB • I12 IF — I00 60 = 11,12

C FIND LIMITING .1 POINTS41 a J + j00 20 JJ = 41,1(2IF I INNER(I,JJ).EQ.L I GO 10 33

20 CONTINUE30 JT a JJ

42 4 — 100 '.0 JJ a J2JJJ = 4 — JJ

Page 321: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.16—continued

C CAICLLATE COORDINATESIF I INNERII,JJJ).EQ.1 ) GO 10 50

40 CCNIINUE50 JB = JJJ

A = IF — IB JT — JC I — 180 = J — J8E = A*B*C*O

C CALCULATE R COORDINATES OF POINT !,JRU JI = C RLIF J)/IA*(A+C)) + RI! JT)/(8*(B+D))

1 • +C CAICULAfE I COORDINATE OF POINT I,J

Z(f,J) C Z(IF,J1/IA*(A+C)I I 1(1 JTI/tB*(B+D)I1 + ZLIB,Jj/LC*(C+A)I •

60 CONTINUE70 CONTINUE80 CONTINUE

RETURNEND

Fig. 13.17 Subroutine OMITP

SIJSRCUTINE GMITP (MAXR,MAXC,MAT,LIYPE,LINC, IJFLAG,1 R,ZI

C .

C FLAG NODES TO 8E OMITTED IN HiGH ORDERC . . . . . . . . . . . .

DIMENSION R(MAXC,MAXR), MATCMAXC,MAXR)IF C LIYPE.L1.8 ) RETURN12 MAXC — LINCJ2 MAXR — LINC00 10 1 1,12,LINCIL = I + LINCCO 20 J = 1 J2 LINCIF I MATIL,JI.&.}.O 1 GO TO 20JL = J • LINCIF MATII+I,J,1) = 1JFLAGIF I LTYPE.LT.12 I GO TO 25MAT(1+2,J+2) IJFLAG

= IJFLAG= IJFLAG

25 IF C LTYPE.NE. 91 GO TO 20OI3SQ =

02450 024SQ*1.2IF I 02450.LT.UA3SQ I GO ) 5MATIL+2,J+I) = IJFLAGMAT(I+L,J+2) IJFLAGGO TO 20

5 MAT(I+A,J+1) IJFLAGNAT(I.2 J+21 = IJFLAG

2010 CCNTLNUE

RETLRNEND

Fig. 13.18 Subroutine PCOUNT

SUBROUTINE PCOUNT IKL,K2,R.l,000E,MAT,NPTPO,IMI N,IMAX,IJFLAG, IOPT ,OUTPI ,MINNPT)

C NUMBER AND OUTPUT NODAL COORDINATES AND POINI CODESC . . . . . . . . . . . . . . .

INTEGER OUTPTDIMENSION R(KL,K2),Z(K1,K2).CODE(KL,1ç21,MAJCK1,K21

NPTNO(Kl,K21,IMLNLK2I,IMAX(1c21NODE * MINNPT — 1K = OUTPT + 100 70 J 1,K211 IMIN(J I12 = IMAXIJI00 60 1 11,12

C CHECK FOR OMiTTED POINTS IN HIGH ORDER ELEMENTSIF I I4AT(I,J1.EQ.IJFLAG I GO TO 60

Page 322: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.18—continued

C DO NOT NUMBER THE POINT IF INTERIOR TO A HOLE.IF I PIAT(I,J).GE.0 .OR. I.EQ.1l .CR. I.EQ.12 3 GO TO IU

,J—1).LT.O)I Ge TO 60

10 NODE NODE • II1PTNOII,JI NUDE

C

60 CONTINUE70 CONTINUE

RET 1.1 RN

END

FIg. 13.19 Subroutine LCOUNT

SUBROUTINE LCOUNT (MAXR,MAXC,R,Z,LIMAX,LIMIN,MATt1 NPTNO,LTYPE,LINC,MINEL,OUTEL, ICPTI

C COUNT AND OUTPUT GENERATEDC

INTEGER OUT ELDIMENSION R(MAXC,MAXR) Z(MAXC,MAXR3, LIMAXLMAXR),

1 LIP4IN(MAXR), MAhMAXC,MAXRJ, NPTNO(MAXC,MAXR)2 ,IQ( 123, JOt 12), 113(18), J13(18)3 J24(16), NOOESI.18)EQUIVALENCE (113(1) ,IQ(1)) ,

L = NINEL — 1N = LIYPE + 1

C EXTRACT 1.J VALUES OF NODESIF ( LTYPE.EQ.3 .UR. LTYPE.EQ.6 .OR. LIYPL.EQ.9 3

1 CALL IJTRI (LTYPE,113,J13,124,J24)IF t .OR. LTYPE.E.).8 .CR. 3

I CALL IJQUAO LLTYPE,IQ,JQ)JIESS MAAR — LINCDO 50 J = 1 JLESS,LINC11 LIMIN(JJ12 LIMAX(J) — LINCDO 40 1 11,12,LINC

C DO NOT NUMBER ELEMENIS IN A HULLIF I MAT(I,JJ.LT.0 ) GO TO 40NIJ MAIl! ,J3Lz L+ 1

C CHECK AREASIL 1 LINCJL = J + LINCA123= R(I,J)*IZIIL,J)—Z(IL,JLIJ • R(IL,J)*(Z(IL,JL)

1 —ZLI,Jè3 +*134 = R(1,J)*(Z(IL,JLI—LI1,JLJJ • RLIL,JL)tIZ(I,JLI

1 —Zt1,JI) + R(1,JL)*(ZII,JI—Z(IL,JL)3IF ( A123.LE.O.0 .OR. A134.LE.U.U 3 WRITE (6,IUOU) L

1000 FORMAT ('OPOSSIULE NEGATIVE AREA NEAR ELEMENT ',I53IF CC TO

C QUADRILATERALSCALL LNODES (1 J,NPTNO MAXR NODES)CALL LOUTGO TO 40

C TRIANGLES60 OI3SQ

0245G IR(i,JL)—R(IL,J))**2+(Z(1,JL)—ZLIL,J33**2= 024SQ*I.2

IF I 024SQ.LT.DI3SQ ) GD TO 70CALL lI,J,NPTNO,MAXR,MAXC,LTYPt,113,J13,NODE$)CALL LOUT

1

1

CALL

LNODESCALL LOUT

LNODES

LOUT40 CONTINUE50 CONTINUE

RETURNEND

Page 323: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.20 Subroutine PLOTIJ

SUBROUTINE PLOTIJj LIMLN,LIMaX,LIN...,LTYPE,IPLGT)

C . . . . . . e • • • • 0 • • 0 • • • 0 • • 0 • S • • 0

C PLOT A GRID OF POINTS DEFINED BY I,J COORDINATESC

DIMENSION NPINÔIKI,KI. LIMIN(K21,LIMAX(K2iDIMENSION RtKA ,K2), 21 KI,K21DATA KOUNI /01

C lIMO LiMITS OF COORDINATES ALONE EDGES OF MESHCALL RLSIZE IKL,K2,R,Z,IMIN.IMAX,NPTNO,RMIN,RMAX,

1

C ADD A BORDER IC REGIONRDIFF RMAX — RMIN101FF LMAX — ZMINBOROER = AMAXL(ROIFF,ZDIFFIILOO.BORDER = ABSIBORDER)RMIN RMIN — 8CROERZNIN = LNIN — BORDERRMAX = I4MAX + BORDERZMAX = ZMAX •

C ADVANCE FRAME AND SET WINDOW LIMITSCALL WINDO (RMIN,RMAX,ZMIN,ZMAXj

C PLOT THE ROW LINES00 10 J 1,K2,LINC11 = IMINIJ )

12 LMAX(JI — IJIL J — LINCDO 20 1 11.12IF INPTNO(I,JI.EQ.O.OR.NPTNOLI.1,J).EQ.o) GO TO 20ILL I — LINC

C POSSIBLE LINE. MOVE TO POINT, PEN UPCALL MOVETO (R(j,J),Z(1,J))

C IS AN ELEMENT ON EITHER SIDEIF ( NATLI,Ji.GE.O i GO TO 5IF ( J.GT.1 .AND. MAT(I,JLL).t.T.0 I GO TO 20

C LIN_E EXUTS, MOVE TO NEXT POINT. PEN DOWN5 LINEID IRUtI,JJ,Z(l+I,Ji)

20 CONTINUE10 CONTINUE

C PLOT THE COLUMN LINESJLESS K2 — 1DC 40 I I,K1,LINCILL = 1 — LINCDO 50 J I,JLESSiF ( I GO TO 50

C POSSIBLE LINE. MOVE TO POINT, PEN UPCALL MOVETO 4R(L,JI,ZU,J)I

C IS AN ELEMENT ON EITHER SIDEIF ( MAT(I.J).GE.0 ) GO TO 35IF I I.GT.1 .ANQ. MAT(ILL,JI.LT.0 I GO 10 50

C LINE EXISTS, MOVE TO NEXT POINT, PEN DOWN35 CALL LINETO (R(I,J+1I,lII,J+lfl50 CONTINUE40 CONTINUE

IF I IPLOT.EQ.2 I RETURN= KOUNT + 1

IF I IPLOT.EQ.3 .AND. KOUNI.EU.2 I RETURNC CHECK FOR TRiANGLES

IF I LIYPE.EQ.4.OR.LTYPE.EQ.8.OR.LTYPE.EQ.12 ) RETURNC LOOP OVER QUAORILATERALS AND ADO CLAGONAL LINES

JIESS = K.2 — LINCDO 60 J = 1.JLESS,LINCIt LIMINIJI12 LIMAX(JI — LINC.JL = J + LINCDO 80 1 I1,12,LINCIF ( MAT(I,J).LT.O I GO TO 80IL = 1 LINC

C ELEMENT EXISTS, FIND SHORTEST OIAGCNAL0135Q= (RI1,JI—RIIL,JL)I**2*(Z(L,J)_L(IL,JLH**2

(RII,JLI—R(IL,Jfl.*2+(1(I,JL)_Z(IL,J))**2IF I DI3SQ.GT.U245Q I GO TO 6

C MOVE TO CORNER 1, PEN UPCALL MOVETO (RII,JI,Z(I,J})

Page 324: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.20—continued

C MOVE UP DIAGONAL, PEN DOWNCALL LINETO (R(I+1 J+1I,Z(I+J. J+jIJIF I LINC.GT.l J CALL LINETOIF I LINC.EQ.3 I CALL LINETO (R(1s3,J+3),Z(j,3,J+3))GO TO 80

C MOVE TO CORNER 2, PEN UP65 CAlL (RIIL,J),Z(IL,JIJ

C MOVE UP L)IAGONAL, PEN DOWNCALL J+LflIF I LINC.GT.1 CALL LINETO

I LINC.EQ.3 I CALL LINETO LRLI,J+3),L(j,J+3)j80 CONTINUE60 CONIINUE

RET I. RNEND

Ag. 13.21 Mesh grading example data

00009000100001300001 00004000000000000000000000000000000000001 1 1 9 1 11 2.236 120. 2.236 60. 1, —2.2 1 1 2 0 00 0. 0. 0. 0.82 10 1 2 0 00 2. 0. 2. 0.82 4 6 3 0 000. 2. 0. 4.2 7 6 3 0 002. 2. 2. 3.3 7 $ 2 0 00 2. 1.6 2. 1,4 2 3 2 0 00 0. 1. 0. 1.6549354636663776381330 4 6 0 0 100, 2.46792

J IMIN INAX GIVEN I—J POINTS

9 4 78 4 77 4 76 4 75 3 84 2 93 1 102 1 101 1 10

CHANGES IN BLOCKS OF ELEMENT CODESBLOCK MAT.NO. LIMITS: 11 JI 12 J2

1 2 4 6 7 9J IMIN IMAX GIVEN CODE

9 4 78 4 7 222—7 4 7 222—6 4 7 222—5 4 7 111—4 3 8 11111—3 2 9 1111111—2 1 10 111111111—1 1 10 111111111—

Page 325: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 13.22 A typical mesh grading

H

Page 326: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14

Initial value problems

14.1 Introduction

Many problems require the solution of time-dependent equations. inthis context, there are numerous theoretical topics that an analyst shouldinvestigate before selecting a computational algorithm. These include thestability limits, amplitude error, phase error, etc. A large number of implicitand explicit procedures have been proposed. Several of these have beendescribed in the texts by Bathe and Wilson [14], Chung [23], and Zien-kiewicz [871. It is even possible to combine these procedures as suggestedby Hughes and Liu [46]. A recent review of the stability considerationswas given by Park [62).

The purpose here is to cite typical additional computational proceduresthat arise in the time integration problems. Both simple explicit and implicitalgorithms will be illustrated. Applications involving second order spatialderivatives and first order time derivatives will be referred to as parabolicor transient, while those with second order time derivatives will be referredto as hyperbolic or dynamic. For these classes of problems it is commonto select various temporal operators to approximate the time derivatives.Common difference operators for this purpose include the forwarddifference,

(R(t + — R(t))f&,

the backward difference,

(R(t) — R(t —

and the central difference

(R(t + — R(r —

317

Page 327: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

318 14. Initial value problems

where denotes a small time difference. Similar expressions can bedeveloped to estimate the second derivative, R. The actual time integrationalgorithm is determined by the choices of the difference operators and theways that they are combined.

14.2 Parabolic equations

The governing system equations for a transient application are generallyordinary differential equations of the form

+ BR(t) = P(t) (14.1)

where () = d( )/dt denotes the derivative with respect to time. Generally,one or more of the coefficients in R, say R,, will be defined in a boundarycondition as a function of time, i.e. R1 = g(t). Also, the initial values, R(O),must be known to start the transient solution.

Note that the governing equations now involve two square matrices, Aand B, at the system level. Thus in general it will be necessary to apply thepreviously discussed square matrix assembly procedure twice. This is,

NE

e=1 (14.2)NE

e=1

where and BC are generated from the Boolean assembly matrices andthe corresponding element contributions, say ac and be. In a nonlinearproblem the system matrices usually depend on the values of R(t) and aniterative solution is required. For example, a heat transfer problem mayinvolve material conductivities which are temperature-dependent. For thesake of simplicity such nonlinear applications will not be considered at thispoint.

Only the direct step-by-step time integration of Eqn. (14.1) will beconsidered. There are many such procedures published in the literature.When selecting a computational procedure from the many available algo-rithms one must consider the relative importance of storage requirements,stable step size, input—output operations, etc. The text by Myers [56]examines in detail many of the aspects of simple time integration proceduresfor linear transient applications. He utilizes both finite difference and finiteelement spatial approximations and illustrates how their transient solutionsdiffer.

Page 328: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.2 Parabolic equations 319

14.2.1 Simple approximations

The accuracy, stability, and relative computational cost of a transientintegration scheme depend on how one approximates the 'velocity', k,during the time step. For example, one could assume that the velocityduring the time step is (a) constant, (b) equal to the average value at thebeginning and end of the step, (c) varies linearly during the step, etc.

To illustrate cases (a) and (c) consider a time interval of k = At andassume a Taylor series for R(t) in terms of the value at the previous timestep, R(t— k):

R(t) = R(t — k) + kR(t — k) + k212 R(t — k) +... (14.3)

Then, as illustrated in Fig. 14.1, the first assumption gives R = 0 and theabove equation yields R(t). The standard Euler integration procedure isobtained by multiplying by A:

AR(t) AR(t — k) + — k) (14.4)

and substituting Eqn. (14.1) at (t — k)

— k) = P(t — k) — BR(t — k)

to obtain the final result that

AR(t) = kP(t — k) + {A — kB}R(t — k). (14.5)

One can make the general observation that the governing ordinarydifferential equations have been reduced to a new set of algebraic equationsof the form

SR(t) = F(t) (14.6)

which must be solved at each time step. In the present case of the Eulermethod one has system matrices

S=Aand (14.7)

F(t) = kP(t — k) + (A — kB)R(t — k).

As shown in Table 14.1, all integrations can be reduced to the form ofEqn. (14.6). When the problem is linear and the time step, k, is heldconstant, the system square matrix does not change with time. Thus it needbe assembled and 'inverted' only once. Then at each time step it is onlynecessary to evaluate F(t) and solve for R(t).

Before considering the practical significance of the alternate forms of

Page 329: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

320 14. Initial value problems

Eqn. (14.7), let us return to the assumption that R is linear during the timestep. From Fig. 14.1 one notes that

= R(t — k) + kR(t k). (14.8)

Solving Eqn. (14.3) for R and substituting into the above equation leadsto

R(t) = 2[R(t) — R(t — k)]/k — R(t — k). (14.9)

Substituting into Eqn. (14.1) at time t yields the system equations

SR(t) F(t),

where nowS = B + 2AIk

(14.10)F(t) = P(t) + A(2R(t — k)/k + R(r — k)).

This is referred to as the linear velocity algorithm. A comparison of Eqns.(14.7) and (14.10) is useful. The Euler method is known as an explicitmethod since R(t) is obtained explicitly from R(t — k). The linear velocityformulation involves an implicit dependence on R(t —k) and is one ofmany implicit algorithms. Note that the Euler form requires no additionalstorage while the linear velocity algorithm must store the array R(t —k),and perform the calculations necessary to update its value at each timestep. The necessary recurrence relation which utilizes the above calculatedvalues for R(t) is obtained from Eqn. (14.9). Also note that the implicitprocedure requires one to have initial starting values for R(0). These canbe obtained from Eqn. (14.1) as

R(0) = — BR(0)). (14.11)

However, this is a practical approach only so long as A is a diagonal matrix.The system matrices [84] resulting from Crank—Nicolson, Galerkin, andleast-squares approximations in the time interval are summarized in Table14.1. A typical subroutine, EULER, for executing the simple Euler inte-gration algorithm is given in Fig. 14.2. Typical numerical results will beconsidered later.

Page 330: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 14.1 Typical integration assumptions

f (t+k) I (f+k)

(a) Constoni velocity (b) Linear velocity

FIg. 14.2 An explicit Euler integration

SUBRCUTINE EULER (NDFREE,LBW,A18,P,R,D1,NSTEPS,1 IPRINT,NBC,IbC)

C ** ***************s**#*****C STcP BY STEP INTEGRATION OF MATRIX EQLATICNSC A*OR(TIIDT + B*R(T1 P111C BY THE EULER METHODCCDP IMPLICiT REAL*8 (A—H 0—fl

DIMENSION A(NDFREE B(NDFREE,IBW), P(NDFREEI,1 R(NDFREE, IBC(1)

C INITIAL VALUES OF R ARE PASSED THRU ARGUMENT LISTC NBC= NO. D.O.F. WITH SPECIFIED VALUES OF ZEROC IBC = ARRAY CCNTAINING NBC DOF NUMBERS WITH ZERO BCC DIM IBCLNBC)C NOFREE = TOTAL NUMBER OF SYSTEM DCFC IBW = MAX HALF BANDWIDTH INCLUDING DIAGCNALC NSTEPS = NO. OF INTEGRATION STEPSC IPRINT = NO. CF INTEGRATION STEPS BET,iEEN FRINTINGC t** INITIAL CALCULATIONS ***

ZERC = 0.DOWRITE (6,5004)1

5000 FORMAT ('ISTEP BY STEP INTEGRATION BY THE EULERI 'METHOD' /1

IF I IPRINf.LT.1 I IPRINT =NSTEPS = (NSTEPS/IPRINT)*IPRINTIF I NSTEPS.EQ.O I NSTEPS = IPRINTIF ( NBC.GT.O I GO TO 10WRITE (6,5010)

5010 FORMAT (' WARNING, NO CONSTRAINTS IN SUBR. EULER')10 DO 30 .i = I1IBW

DO 20 1 = l,NDFREE20 0(1 Ji = —DT*8(I,.J) + A(I,J)30 CCNIINUE

ICOUNT = IPRINT — 1C PRINT INITIAL VALUES OF R

ISTEP = 0I ZEROWRITE (6,5020) ISTEP T

5020 FORMAT (I,' STEP = ',lS,SX,' TIME = ',E14.8,/I ' I RU)')WRITE (o,50301 (K,R(K),K=1,NDFREE)

Page 331: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 14.2—continued

5030 FORMAT LLI0,2X E14.8)C *** APPLY CONDITIONS TO A ***

DO 'iO I = l,NBCCALL MODFYI (NDFREE,IBW,IBC( I),ZERO,B,P)

40 CALL MODFYI (NDFREE,IBW,IBC(I1,ZERC,A,P)C *** TRIANGULARIZE A ***

CALL FACTOR (NDFREE,!BW,A)IBWLI = 16W — 1

C *** END INITIALC t** CALCULATE SOLUTION AT TIME

DO 80 ISTEP = 1,NSTEPSICOINT = ICOUNT + 1I = T*DTTLESS = T — DIIF ( ICOUNT.EQ.IPRINT I WRITE (6,5020) ISTEP,T

C FORCER DEFINES THE FORCING FUNCTION PU)C FORM MUOIFIED FORCING FUNCTION

00 60 1 = l,NDFREESUM = ZERO

C ONLY MATRIX BANDJi = I — IBWL1J2 = 1 + IBWLIJi = MAAt) (l,Jl1J2 = MINO (J2,NDFREE)00 50 J J1,J2

C CCNVERT SUBSCRIPTS FOR COMPRESSED STORAGECALL BANSUB (1,J,IB,JB)BIJ = 8(18 J81IF ( I GO TO 50SUM = SUM + BIJ*R(J)

50 CONTINUEP(fl = P(I)*DT + SUM

60 CONTiNUEC *** APPLY BOUNDARY CONDITIONS IC P ***

DO 70 1 = 1,NBCIN = IbCII)

70 = ZEROC SOLVE FOR R AT TIME I

CALL SOLVE (NDFREE,IBW,A,P,RIC OUTPUT RESULTS FOR TIME T

IF (ICOUNT.NE.IPRINT) GO TO 80WRITE (6,50301 (K,R(K),K=1,NLiFREtJIC 0 U NT = 0

80 CCNT1NUERETURNEND

Page 332: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.2 Parabolic equations 323

Table 14.1 System Matrices for Linear Transients

1. Euler (forward difference), k=S = A/kF=P(t— k)+(AIk— B)R(t— k)

2. Crank—Nicolson (mid-difference), h =S = *1k + B/2F = P(t — h) + (A/k — B/2)R(t — k)

3. Linear velocityS = 2*1k + BF = P(t) + A(2R(t — k)/k — R(t — k)) andA(t) = 2(R(t) — RU— k))/k+ AU—k)

4. GalerkinS=AJk+2B/3

k

F = (A/k— B/3)R(t— k) + 2JP(rhdrfk20

5. Least-squares

S =

F =(ATA/k + (BTA — ATB)/2 — BTBk/6)R(t— k)

+

14.2.2. Diagonal Matrices for Transient Solutions

When one uses a finite difference spatial formulation, the system matrixA is a diagonal matrix. However, if one utilizes a consistent finite elementformulation it is not a diagonal matrix. Thus, the consistent finite elementform introduces an implied coupling of some of the coefficients in the timederivative matrix, R. As shown by Myers [56J, this tends to result in a lessstable time integration algorithm. The mathematical implications of thiscoupling are unclear, but experience shows it to be undesirable.

Clearly, converting A to a diagonal matrix would also save storage andmake the evaluation of equations such as (14.11) much more economical.Some engineering approaches for modifying A have been shown to besuccessful. To illustrate these, consider the form of a typical elementcontribution, say ae. The consistent definition for constant properties is

q HCTHe dv, (14.12)

Page 333: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

324 14. Initial value problems

where q is some constant property per unit volume and H denotes theelement interpolation functions. This generally can be written as

= QM, (14.13)

where Q = and M is a symmetric full matrix. In some cases it ispossible to obtain a diagonal form by using a nodal quadrature rule [33].Since that procedure often leads to negative terms other procedures willbe considered here. Let the sum of the coefficients of the matrix M be T,that is

(14.14)

In most cases Twill be unity but this is not true for axisymmetric integrals.Another quantity of interest is the sum of the diagonal terms of M, i.e.

(14.15)

The most common engineering solution to defining a diagonal matrix is tolump, or sum, all the terms in a given row onto the diagonal of the rowand then set the off-diagonal terms to zero. That is, the lumped matrix MLis defined such that

ML11=O if (14.16)= M•1.

Note that doing this does not alter the value of T. Another diagonal matrix,MD, with the same value of T can be obtained by simply extracting thediagonal of M and scaling it by a factor of Tid. That is,

MD1=O if(14.17)

MD will be called the diagonalized matrix and ML the lumpedmatrix. The corresponding matrices AD and AL are referred to as 'con-densed' matrices. For linear simplex elements in two and three dimensionsboth procedures yield identical diagonal matrices. However, for axisym-metric problems and higher order elements they yield different results andthe diagonalized matrix appears to be best in general. This is because forhigher order elements the lumped form can introduce zeros or negativenumbers on the diagonal. The matrices M, ML, and MD are illustrated fora quadratic triangle in Fig. 14.3 and for an axisymmetric line element inFig. 14.4. The effects of the condensed matrices on transient calculationswill be considered in the next section.

Page 334: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

62

4

FIg. 14.3 Consistent and diagonal matrices for a quadratic triangle

3

y

x

M=-1--180

ML= ffl

MD=—1--114

—I —1 0

6—I 0

6 —4

32

sym.

0

0

0

60

60

zero

6

6

6

32

32

zero

—4 0

0 —4

0016 16

32 16

32

zero

60

zero

32

(a) Consistent

(b) Lumped

(c) Diagonalized

Page 335: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

326 14. Initial value problems

FIg. 14.4 Consistent and diagonal matrices for an axisymmetric line element

t 2

(ri+r2)—

[sym. (ri + 3r2)

(a) Consistent

0

6 t 0 (ri+2r2)

(b) Lumped

0

8 L 0 (ri+3r2)

(c) Diagonalized

14.2.3 Examples

The one-dimensional problem presented by Myers [56] will serve as auseful example application of subroutine EULER and the effects of con-densed matrices. Myers presents finite difference, finite element, and exactanalytic solutions for the following transient problem. Consider a rodhaving a uniform initial temperature of unity. Suddenly both ends of therod have their temperature reduced to zero. The object is to determinethe time history of the temperature at interior points.

By utilizing half symmetry one can apply a simpler finite element modeland use the natural boundary of zero thermal gradient at the centre. Theanalytic solution is illustrated in Fig. 14.5. Myers considered finite elementsolutions involving 1, 2, 3, and 4 elements. The 1, 2, and 3 element modelsyielded consistent matrices which could be integrated analytically and theseresults are also in reference [56]. The latter two solutions gave small timesolutions that had the centre-line temperature higher than its initial value.This is a clear violation of the basic laws of thermodynamics that was notpresent in the finite difference solutions. This response is due to the off-diagonal terms in the A matrix. Myers also presented the A and B matrices

Page 336: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.2 Parabolic equations 327

for a four element solution. The matrices are

210004100

A= 41041

sym. 2

and (14.18)1 —1 0 0 0

2 —1 0 0

2 —1 0

2 —1

sym. 1

where in this problem 6k/(pcl2) =96, and the forcing function is zero, i.e.P(t) = 0. These equations were stored in upper half-bandwidth form andintegrated by subroutine EULER.

The results at the centre point from t = 0 to t = 1 for the consistent andcondensed A matrices for a step size of k = 1/100 are shown in Fig. 14.6.To the scale shown they are in agreement with each other and the exactsolution. However, Myers shows that other integration algorithms can givegood results with k = 1/16. Thus it is useful to observe what happens tothe Euler procedure when k is increased. The consistent formulation wasfound to be unstable for k = 1/75. The condensed form was stable atk = 1/75 and k = 1/50 but was unstable at k = 1/30. A comparison of theseresults at selected small and large times is presented in Table 14.2. SinceP was zero the problem-dependent forcing function, subroutine FORCER,simply set P to zero on each call. The version of EULER shown in Fig.14.2 is written for zero boundary values for one or more parameters. Onlyminor changes are required for time-dependent boundary values.

In the above example the lumped and diagonalized matrices were ident-ical. As an example of a problem where the results are different thefollowing equations were obtained for a two degree of freedom axisym-metric conduction problem.

119 5A=—I

12L5 24

(14.19)

1 9B=I

L5 12

Page 337: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

328 14. Initial value problems

Both condensed forms yielded the exact steady state results but as shownin Fig. 14.7 the small time results were different. The consistent EULERwas unstable for the same step size.

Fig. 14.5 Typical linear transient problem

(a) Original problem

c ) Exact solution forstep change

u(x,8)

x

1 2 3 4 5

(b) Four element model

1.0

0.8

0.6

0.4

0.2

0

U

0 0.2 0.4

x/L

Page 338: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 14.6 Transient response of centre point

0

aE

U)

CU,U

0

Table 14.2 Stable Solution Comparisons at Various Steps

0 = 0.04 0 = 0.96

100C 100D 75D 500 100C 100D 75D SOD

U2 0.550 0.594 0.585 0.565 0.042 0.045 0.045 0,044

u3 0.878 0.903 0.902 0.898 0.078 0.083 0.082 0.081

u4 1.016 0.988 0.990 1.000 0.102 0.109 0.108 0.106

U5 1.004 1.000 1.000 1.000 0.111 0.118 0.117 0.114

C = ConsistentD= Diagonalized

0= Time

— Exacto Euler,

(Even steps)

09, Time

Page 339: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

a,

0.Ex4-Ca,Ea,a,a,

C91)

I-0C0

0

a,

LU

I-

to 0 to- dU)

0

N)a

N0

6

0

a,0

6

0

0

tA- 0C02U 0

IC,

U)

Page 340: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.3 Hyperbolic equations 331

14.3 Hyperbolic equations

Many solid mechanics problems and wave problems involve the solutionof dynamic equations. The text by Bathe and Wilson [14] presents detaileddiscussions of both linear and nonlinear dynamic problems. They presentboth direct integration and modal (eigen) algorithms. In this section atypical direct integration procedure will be illustrated.

The governing system equations for dynamic applications are generallyordinary differential equations of the form

AR + BR + CR = P(t) (14.20)

where A, B, and C are square banded matrices, P(t) is a time-dependentforcing function, and R is the vector of unknown nodal parameters. Thesystem square matrices are again assembled from corresponding elementmatrices. Generally the initial values of R, and R are known at time t =0 and it is necessary to solve for the initial values of R from Eqn. (14.20).That is,

R(0) A'(P(O) — BR(0) — CR(0)). (14.21)

If A is a diagonal matrix this is easily evaluated. Otherwise, it may not becomputationally efficient to exactly calculate the values of R(0). In thealgorithm to be presented the initial values of R(0) will be approximatedby a simple technique.

Assume that R(t), R(t), and R(t) are the known values of the abovequantities at some time t. We desire to obtain the solution of Eqn. (14.20)at time (t + h) where h represents the size of the time increments to beused. There are numerous procedures for accomplishing this goal. Theprocedure to be presented herein has been successfully applied to manyproblems. It can be programmed so as to reduce the storage requirementsand solution time.

14.3.1 Simple approximations

The basic assumption of the algorithm is that within a time increment,0 t k = alz, the second time derivative (acceleration) varies withThat is,

R(t) f1(t) R(0) + [R(k) — (14.22)

Page 341: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

332 14. Initial value problems

The first time derivative is obtained by integrating with respect to time:

R(t) f2(t) = R(O)+

f f1(t) cit

or (14.23)

R(t) = R(O) + R(O)t + [R(k) — +

In a similar manner the value of R(t) is obtained from:

=R(O) + Jf2(t)dt

= R(O) + R(O)t + R(O)t2/2 + [R(k)— + 1)(n + (18.24)

It is useful to note that if one evaluates Eqns. (14.23) and (14.24) at timet = k one obtains:

R(k) = R(O) + (1 — y)kR(O) + ykR(k) (14.25)

and

R(k) = R(O) + kR(0) + — f3)k2R(0) + f3k2R(k) (14.26)

where the constants y and 13 have been defined as1

(n + 1)

1 —

+2)

These equations represent the basic equations of the algorithm and theywill be briefly discussed before proceeding with the details of the algorithm.Of course Eqns. (14.25) and (14.26) could be taken as a starting point withfi and y being arbitrary constants [57].

Note that Eqns. (14.22) and (14.23) imply that the values of R, andR are known at time t = 0 and that R is known at time t = k. As a pointof fact, the latter quantity is not known and must be estimated. Of course,iteration could be used to improve the accuracy of the estimate if necessary.The choice of n in Eqn. (14.22) determines the relative weight that isassigned to the two quantities R(O) and R(k). If n = 1 they are assignedequal weights; if n < 1 then R(k) is more important; and if n> 1 then R(O)is more important. This is clearly illustrated by the limiting cases (n = 0and n = ce). The most commonly used values are n = I and n = 0.

Newmark [57] has considered the application of Eqns. (14.25) and (14.26)to the solution of Eqn. (14.20) in some detail. Starting with these equations

Page 342: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.3 Hyperbolic equations 333

he assumed that the parameters yand f3were independent. That assumptiondoes not apply in the present analysis; nevertheless, portions of his analysiscan be utilized here. By considering the known difference solution for thesimple harmonic motion of a single degree of freedom system, Newmarkconcluded that to avoid the introduction of erroneous damping in thesolution one must set y = 1/2. For the present assumptions this resultrequires that n = 1 which in turn implies that the second derivative is linearduring the time interval, k. Of course, if n 1 then f3 = 1/6. For /3 = 1/6

and k = h = 1), Newmark shows that for the above problem the solutionwill theoretically be stable and converge if 0.389 where Trepresentsthe smallest period of the system. For multi degree of freedom systemssubjected to forced motion a much smaller ratio must be used in practice.The actual algorithm will be developed usingn = 1. Forn = I Eqns. (14.25)and (14.26) can be generalized to

R(t + k) = R(t) + [R(r + k) + R(t)Jk/2 (14.27)

R(t + k) = R(t) + kR(t) + + k) + 2R(t)]/6. (14.28)

For t = h (r = 1) the above equations correspond to the standard "linearacceleration" method. This technique, which requires iterations withineach time step to establish R(t + h), has been outlined in detail (includinga flow chart) by Fenves [311. A similar study, with examples, has beengiven by Biggs [19].

To avoid these iterations, and at the same time maintain numericalstability, modified integration schemes are usually preferred. A typicalmodified linear acceleration integration scheme will now be considered[14J. This extrapolation algorithm utilizes Eqns. (14.27) and (14.28). Theseequations can be arranged to make any one of the quantities R(t + k),R(t +k), or R(t + k) the independent unknown. The best choice of thethree is not yet known; however, the "displacement", R(t + k), formulationis the most common.

Since the eventual objective is to solve for R(t + k) in terms of R(t),R(t), and R(t), it is desirable to solve Eqns. (14.27) and (14.28) simulta-neously for R(t +k) and R(i + k). That is, (for n = 1),

R(t + k) = 6[R(t + k) — R(t)J/k2 — 61t(t)k — 2R(t) (14.29)and

R(t + k) = 3[R(t + k) — R(t)]/k — kR(r)/2. (14.30)

To establish the relations for R(t + k) we return to Eqn. (14.20). Evaluating

Page 343: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

334 14. Initial value problems

that equation at time t + k yields

AR(t + k) + BR(t + k) + CR(t + k) = P(t + k) (14.31)

Substituting Eqns. (14.29) and (14.30) into Eqn. (14.31) and collecting liketerms gives

[6A/k2 + 3B/k + CJR(t + k) = P(t + k) + [6A/k2 + 3B/k]R(t)

+ [6A/k + 2B]R(t) + [2A + kB/2]R(t) (14.32)

where the only unknown is R(t + k). Experience indicates that if k is tobe held constant throughout the integration then the computational effi-ciency can be increased by defining a square matrix

D = 2A/k + B

and rewriting Eqn. (14.32) as

[3D/k + C]R(t + k) = (P(t + k) + D(3R(t)/k

+ 3R(t) + kR(t)) — B(R(t) + kR(t)/2)) (14.33)

One notes that the right hand side of Eqn. (14.33) is a column matrix sothat the final result is analogous to Eqn. (14.6), i.e.

S(t + k)R = F(t + k) (14.34)

where S is the resultant square matrix and F is the resultant forcing function.In the following programs, D is stored in the original location of A whileS is stored in the original location of C. If C is zero, and/or A is diagonal,then one would use alternative storage schemes. The above equationswould yield the values of R at time I + k but we desire the values at asmaller time t + h where k = øh, 0 1. Once the above equation has beensolved the required parameters are obtained by interpolation from the oldt and new t + k values. This is accomplished by utilizing Eqns. (14.22),(14.23), and (14.24) evaluated at the intermediate time. That is,

R(t + h) = R(t) + [R(t + k) — R(t)]/0

R(t + h) = R(t) + hR(t) + h[R(t + k) — R(t)]/(20) (14.35)

R(t + h) = R(t) + hR(t) = + + k) — R(t)]/(60),

where R(t + k) and R(t +k) are given by Eqns. (14.29) and (14.30),respectively.

These concepts are illustrated in Fig. 14.8. The linear acceleration algo-rithm is implemented in subroutine DIRECT and is shown in Fig. 14.9.

Page 344: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

SUBRCLJTINE DiRECT (NDFREE.MBw,A,B,t1DRP,R,OR,02R,P,I * * * * * * * * * * * * * * * * * * * * * * * * **

STEP BY STEP INTEGRATION OF MATRiXA*D2RiTI/D12 + 5*DR(fl/DT + = PU)** ** * * * * * * * * * ** * * * * * * * * * **

IMPLICiT REAL*8(A—H,O—Z1DIMENSION A(NOFREE,MBW), B(NDFREE,MBWI, IBC(1),

1 R(NDFREEI, DR(NDFREE), D2RtNUFREE), P(NDFREE),2 DRPLNDFREE), C(NDFREE,MBWI

14.3 Hyperbolic equations 335

Since the forcing function P(t) is problem-dependent in general, it mustbe supplied to subroutine DIRECT by the function program FORCER.Subroutine DIRECT assumes that A is not a diagonal matrix; thus Eqn.(14.21) is not utilized to initialize R(O). Instead, this routine starts thesolution at t = —h using R( — h) R(O), =R(O), and R( — h) = 0.It solves the standard equations and interpolates for the value of R(O). Atthis point the entire integration solution is begun. The above approximationgives the exact value of R(O) for many forcing functions, P(r).

Fig. 14.8 The linear acceleration procedure

R

R

R

FIg. 14.9 Subroutine DIRECT

CCCCC DP

Page 345: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 14.9—continued

C INITIAL VALUES OF R AND DR ARE PASSEC THRU ARGUMENTSC N8C= NO. O.O.F. WiTH SPECIFIED VALUES CF ZEROC IBC = ARRAY CONTAINING TI-1E NBC DCF NCS nITH ZERO BCC R DR,02R = 0 1,2 ORDER DERIV. OF R 'ii.R.I. I AT TIME=TC = VALUE oF DR AT TIME = T + DELIC NSTEPS = NO. OF INTEGRATION STEPSC IPRINT = NO. OF INTEGRATION STEPS BETWEEN PRINTIt%GC SUGGEST OMEGA = 1.25C ** INITIAL CALCULAJIONS **

ZERC = 0.00WRITE (a.50001

5U00 FORMAT ( 'ISTEP BY STEP INTEGRATICN',//IIF ( 1PRINT.LT.1 I IPRINT = 1NSTEPS = (NSTEPS/IPRINT)*IPRINTIF ( NSTEPS.EQ.O 3 NSTEPS = IPRINTDELT = (OMEGA—1.)*DITAU = OMEGA*OTMBWLI = M6W — IIF ( NBC.GT.O I GO TO 10WRITE (6,50101

5010 FORMAT (' NO CONSTRAINTS IN OIRECT <<<'110 CONTINUE

00 30 1 = 1,NDFREEPU) = ZERODRPUI = ZEROD2R(1I = ZERODO 20 J = 1,MBn

20 = b(I,J1 + 2.*A(I,J1/TAU + TAU*C(I,J)/3.30 CONTINUE

ICOLNT = IPRINI — IC ** APPLY BOUNDARY CONDITIONS ( TO B I **

00 I = I NBC40 CALL MODFYI b4DFREE,MBW,IBC(I1,ZERQ,6,PJ

C ** TRIANGULARIZE B **CALL FACTOR (NDFREE,MBW,B)

C APPROXIMATE INITIAL VALUE OF D2RTPLLS = ZERIJISTEP = 0

C ( THE FOLLOWING IS AN EXTRA L[C•A1 IGO IC 60

C ** END OF INITIAL CALCULATICNS *4C *4 CALCULATE SOLUTiON AT TIME I 4*50 00 120 ISTEP = 1,NSTEPS

I =I +

II

C 1/,' STEP NUMBER = ',I5,5X,'TIME = ',E14.8,/,1 • I R(I1 DR/OT2 'D2R/DT2',/)

C FORCER IS A SUBR TO DEFINE THE FUNCTION PCI)60 CALL FORCER C IPLUS P NDFREEI

C FORM MODIFIED iUNCTION Al I + DtLTDO 90 1 = 1,NDFREESUM = 0.Ji = I — MBWLIJ2 = I + MBWLIJi = MAXO t1.J1)J2 = MINO (J2,NDFREE)00 80 J = .J1,J2CALL BANSUB (1,J,I8,JBJAU A(IB,JBJIF C AIJ.EQ.ZERO I GO TO 70SUM = SUM + AIJ*C 2.*DR(J)/TAU+D2R(JI

70 CU = CC 18, JBIIF C CIJ.EQ.ZERO I GO TO 80SUM = SUM — CIJ*( R(JJ +

1 + TAU*TAU*02R(JI/6. I80 CONTINUE

PU) = PCI) + SUM90 CCNIINUE

C ** APPLY BOUNDARY CONDITIONS C TO p **00 100 1 = 1,NBCIN = IBCCI)

100 PUN) = ZERO

Page 346: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

14.3 Hyperbolic equations 337

Fig. 14.9—continuedC SOLVE FOR DRP AT TiME T÷DELT

CALL SOLVE (NOFREE,MBW B,P,DRP)C DATA AT 1—01 AND f+DELT CALCULATE VALUES AT r

00 110 1 = 1,NDFREEDROT = (1.—1./ONEGAJ*DR(1) + DRPLIJ/CMEGAD2RCT2 = DZR(fl*(1.—2.IOMEGA)+2.*(DRCT—DR( Ifl/OMEGA/DT

C THE INITIAL VALUE OF 02kIF ( ISTEP.LT.2 I GO TO 110RU) = R(i) + DT*(2.*DR(1)+DROT)/3. • DT*DT*02R( 1)16.DR(I) = OROT

110 C2R(I1 D2RDT2IF I ISTEP.EQ.0 I GO TO 50

C OUTPUT RESULTS FOR TIME I

IF ( ICOUNT.NE.IPRINT I GO TO 120WRITE (6,50301 (K R(K) DR(KI,02R(K)

5030 FORt'AT ( I1O,2X,E14.8jX,E14.8,2X,E14.8ICOLNT = 0

120 CONTiNUERET UEND

14.3.2 Lumped mass forced vibration example

To illustrate the step by step integration procedure consider the forcedvibration of the lumped mass system given in Fig. 14.10. The exact solutionof this problem is given by Biggs [19]. The loads are linearly decreasingramp functions. The function FORCER for these loads is shown in Fig.14.11. The calculated displacements, velocities, and accelerations of nodethree are compared with the exact values in Figs. 14.12 to 14.14, respec-tively. Figure 14.15 shows the effect of increased time step size.

FIg. 14,10 Test problem for direct integration

= 60001b/in m2= 2lbsec2lin

k2=40001b/in m3= llbsec2/in'it

k3 2000 lb/in m4 = 1 lb sec2/in

F2 3000f(t)lb t0 = 0.1 sec

F3=4000f(z)lb

u1 =ã1=ü1=0

1.0

m2

m3

Page 347: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

FIg. 14.11 Subroutine FORCER

SUBROUTINE 8IGGSC TEST OF DIRECT INTEGRATION PROGRAMS

IMPLICIT REAL*8 (A-14,O-Z)DIMENSION AK(4,2 ),AM(4,2) ,U(4),F(4), VEL(4),ACC(4),IBC(1)DIMENSION AC(4,2),UP(4)DATA AC/8*0./

C TRANSIENT TEST PROBLEM BIGG'S P. 123NBW:2ND FREE :4NBC:1ISC( 1 ):1

KPRINT 1

DI 0.002500NSTEPS = 12000 20 J :1,13,4

C TEST OF EFFECT OF OMEGAOMEGA = JOMEGA (OMEGA42O.)*0.05WRITE (6,5000) OMEGA

5000 FORMAT ('0 OMEGA ',E15.8)AK(1,1)6000.AK ( 1 , 2 ) : -6000.AK ( 2 , 1 ) 10000.AKt2,2 )—4000.AK( 3,1 ):6000.

AK( 3,2 ):—2000.AK 1 4,1): 2000

AK(4,2 ):0.AM(1,1 ):100.AM ( 1 , 2 ) =0.Al1(2,1):2.AM(2,2)0.AM(3,1)1.AM(3,2)0.AN(4,1):1.AM(4,2 ):O.

Do io I 1,NDFREEU(I) 0.

10 VEL(I) = 0.CALL DIRECT (NDFREE,PIBW,AM,AC,AK,UP,U,VEL,Acc,F,OMEGA,

DT,NSTEPS,KPPIt4T,NBC,IBC)20 CONTINUE

RETURNEND

Page 348: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Fig. 14.11—continued

SUBROUTINE FORCER (T,P,NDFREE)C

C DEFINE FORCING FUNCTION FOR STEP BY STEP INTEGRATIONC

CDP IMPLICIT REAL*8(A-H,O-Z)DIMENSION P(NOFREE)

C TRANSIENT TEST PROBLEM BIGG'S P. 123TONE = 0.1FOFT 0.0F2 3000.F3 4000.F4 —2000.

C LINEAR RAMP (DECREASING)IF ( 1—TONE ) 10,20,20

10 FOFT 1.—I/TONE20 P(1) 0.

P(2) F2*FOFTP(3)P(4) F4*FOFTP ETURNEND

Page 349: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

V0C

04)U)C0aU)4)

CC,

EC)U

a.In

I-

(UI) 4uawo3oldsuo

0CU

Ow

d

0

d

00

20

0

0d

U0)In

2 iio

I0

— U0w

CU0d

a- 0 d CU0d I

Page 350: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

r

0NU)

C)E

I—

C)

C)

0C

0C)ci)C0a.(I)C)6.

2'C)0C)>

UI)U)

It) IS) 0

0

0 0 0 0 0N '0

Page 351: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

(\J u

4)E

'a4,U)

,g,

oo W

d

a,a)I-

a)

0

0a)U)C0U)

C0ItI-a)

C)C)

0 0 00 0 0

I- 0 0N) C'.)

I-

0 0 08 0 02 2 0

C')

000 0N)

Page 352: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

a,NU)

aU)

a,U)

a,C)C

0 0

0

(0

d

0

0

0•-u

q ii u ii

o

001C\J0d

I')I-I-

0— 0 0 0

(UI)

Page 353: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

344 14. Initial value problems

14.4 Exercises

1. Modify subroutine EULER to estimate the initial velocity by using thesca'ed diagonal of the system equations.

2. Modify subroutine DIRECT to establish the initial acceleration by usingthe scaled diagonal of the system equations.

3. Modify subroutine EULER for the case where A is a diagonal matrix.4. Discuss the changes necessary to include time-dependent boundary

conditions on the nodal parameters.5. Modify subroutine DIRECT where A is diagonal and B is zero.6. Modify subroutine DIRECT where A is diagonal and B = ciA + fiC

where ci and f3 are known constants.

Page 354: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

References and bibliography

1. Akin, J. E., A Least Squares Finite Element Solution of Nonlinear Equations,in The Mathematics of Finite Elements and Applications, J. R. Whiteman (Ed.),Academic Press, London, 153—62, 1973.

2. Akin, J. E., The Generation of Elements with Singularities, mt. J. Num. Meth.Eng, 10, 1249—59, 1976.

3. Akin, J. E. and Gray, W. H., Finite Element Stress Analysis of High Field

Solenoids, Sixth Symp. Eng. Prob. Fusion Research, IEEE, 240—2, 1976.

4. Akin, J. E., Finite Element Analysis of Fields with Boundary Singularities,mt. Conf. Num. Meth. in Electric and Magnetic Field Problems, May 1976.

5. Akin, J. E. and Pardue, R. M., Element Resequencing for Frontal Solutions,in The Mathematics of Finite Elements and Applications, Vol. 11.3. R. Whiteman(Ed.), Academic Press, 535—41, 1976.

6. Akin, J. E. and Gray, W. H., Contouring on Isoparametric Surface, Irn. J.Num. Meth. Eng., Dec. 1977.

7. Akin, J. E., Elements for the Analysis of Line Singularities, in The Mathematicsof Finite Elements and Applications, Vol. III, J. R. Whiteman (Ed.), AcademicPress, 1978.

8. Akin, J. E. and Wooten, J. W., Tokamak Plasma Equilibria by Finite Elements,R. H. Gallagher (Ed.), Finite Elements in Fluids III, John Wiley, New York,Chapter 21, 1978.

9. Allan, T., The Application of Finite Element Analysis to Hydrodynamic andExternally Pressurized Pocket Bearings, Wear, 19, 169—206, 1972.

10. Aziz, A. K., The Mathematical Foundations of the Finite Element Method withApplications to Partial Differential Equations, Academic Press, New York,1972.

11. Barnhill, R. E. and Whiteman, I. R., Error Analysis of Finite Element Methodswith Triangles for Elliptic Boundary Value Problems, in The Mathematics ofFinite Elements and Applications, J. R. Whiteman (Ed.), Academic Press,London, 1973.

12. Barlow, .1., Optimal Stress Locations in Finite Element Models, In!. 1. Num.Meth. Eng., 10, 243—51, 1976.

13. Barsoum, R. S., On the Use of Isoparametric Finite Elements in Linear FractureMechanics, mt. I. Num. Meth. Eng., 10, 25—37, 1976.

14. Bathe, K. H. and Wilson, E. L., Numerical Methods for Finite Element Analysis,Prentice-Hall, 1976.

15. Belytischko, T., Chiapetta, R. L. and Bartel, H. D., Efficient Large ScaleNon-Linear Transient Analysis by Finite Elements, int, J. Num. Meth. Eng.,10, 579—96, 1976.

16. Benziey, S. E., Representation of Singularities with Isoparametric Finite Ele-ments, litt. I. Num. Meth. Eng., 8, 537—45, 1974.

345

Page 355: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

346 References and bibliography

17. Berztiss, A. T., Data Structures, Theory and Practice, 2nd ed, Academic ['ress,New York, 1975.

18. Bettess, P., Infinite Elements, mt. J. Num. Meth. Eng., 11, 53—64, 1977.

19. Biggs, J. M., Introduction to Structural Dynamics, McGraw-Hill, 1964.20. Blackburn, W. S., Calculation of Stress Intensity Factors at Crack Tips Using

Special Finite Elements, in The Mathematics of Finite Elements and Applica-tions, J. R. Whiteman (Ed.), Academic Press, London, 327—36, 1973.

21. Campbell, J. S., A Penalty Function Approach to the Minimization of QuadraticFunctionals in Finite Element Analysis, Finite Element Methods in Engineering,Univ. of NSW, Australia, 33—54, 1977.

22. Christie, I., Griffiths, D. F., Mitchell, A. R. and Zienkiewicz, 0. C., FiniteElement Methods for Second Order Equations with Significant First Deriva-tives, mt. J. Num. Meth. Eng., 10 1389—96, 1976.

23. Chung, T. J., Finite Element Analysis in Fluid Dynamics, McGraw-Hill, NewYork, 1978.

24. Connor, J. C. and Brebbia C. A., Finite Element Techniques for Fluid Flow,Butterworth, 1976.

25. Cook, R. D., Concepts and Applications of Finite Element Analysis, JohnWiley, New York, 1974.

26. Curiskis, J. I. and Valliappan, S., Solution Algorithm for Linear ConstraintEquations in Finite Element Analysis, Computers and Structures, 8, 117—24,1978.

27. Daly, P., Singularities in Transmission Lines, in The Mathematics of FiniteElements and Applications, J. R. Whiteman (Ed.), Academic Press, London,337—50, 1973.

28. DeBoor, C. (Ed.), Mathematical Aspects of Finite Elements in Partial Differ-ential Equations, Academic Press, 1974.

29. Desai, C. S. and Abel, J. F., Introduction to the Finite Element Method, VanNostrand—Reinhold Co., New York, 1972.

30. Fenner, R. T., Finite Element Methods for Engineers, Macmillan Ltd., London,1975.

31. Fenves, S. J., Computer Methods in Civil Engineering, Prentice-Hall, 1967.32. Fried, I., Finite Element Analysis of Incompressible Materials by Residual

Energy Balancing, mt. J. Solids Struct., 10, 993—1002, 1974.33. Fried, I. and Melkus, D. S., Finite Element Mass Matrix Lumping by Numerical

Integration with the Convergence Rate Loss, mt. J. Solids Struct., 11, 461—65,1975.

34. Gallagher, R. H., Finite Element Analysis Fundamentals, Prentice-Hall, Engle-wood Cliffs, 1975.

35. Gallagher R. H., et al. (Eds.), Finite Elements in Fluids, John Wiley, NewYork, Vol. 1, 1973, Vol. 2, 1975; Vol. 3, 1978.

36. Gartling, D. and Becker, E. 13., Computationally Efficient Finite ElementAnalysis of Viscous Flow Problems, Computational Methods in NonlinearMechanics, J. T. Oden et al. (Eds.), T.I.C.O.M., Austin, Texas, 1974.

37. Gupta, A. K., A Finite Element for Transition from a Fine to a Course Grid,mt. I. Num. Met/i. Eng., 12, 35—46, 1978.

38. Henshell, R. D. and Shaw, K. 0., Crack Tip Elements are Unnecessary, mt.Num. Met/i. Eng., 9, 495—509, 1975.

39. Henshell, R. D., PA FEC 75 Theory, Results, PAFEC Ltd., Nottingham. 1975.40. Hinton, E. and Campbell, J., Local and Global Smoothing of Discontinuous

Page 356: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

References and bibliography 347

Finite Element Functions Using a Least Square Method, mt. J. Num. Meth.

Eng., 8, 461—80, 1974.41. Hinton, E., Scott, F. C. and Ricketts, R. E., Local Least Squares Stress

Smoothing for Parabolic Isoparametric Elements, ml. I. Num. Meth. Eng., 9,235—8, 1975.

42. Hinton, E. and Owen, D. R. J., Finite Element Programming, Academic Press,London, 1977.

43. Huebner, K. H., Finite Element Method for Engineers, John Wiley, New York,1974.

44. Hughes, T. J. R., Cohen, M. and Haroun, M., Reduced and Selective Inte-gration Techniques in the Finite Element Analysis of Plates, Nuclear Eng.Design, 46, 1, 203—22, 1978.

45. Hughes, T. J. R., A Simple Scheme for Developing 'Upwind' Finite Elements,mt. I. Num. Meth. Eng., 12, 1359—67, 1978.

46. Hughes, T. J. R. and Liu, W. K., Implicit—Explicit Finite Elements in TransientAnalysis: Implementations and Numerical Examples, J. App!. Mech., 45, 2,375—8, 1978.

47. Irons, B. M. and Razzaque, A., Experience with the Patch Test, in MathematicalFoundations of the Finite Element Method, A. R. Aziz (Ed.), Academic Press,New York, 1972.

48. Lynn, P. P. and Arya, S. K., Use of Least Square Criterion in Finite ElementFormulation, mt. J. Num. Meth. Eng., 6, 75—88, 1973.

49. Lynn, P. P. and Arya, S. K., Finite Elements Formulation by the WeightedDiscrete Least Squares Method, ml. J. Nwn. Met/i. Eng., 8, 71—90, 1974.

50. Malkus, D. S. and Hughes, T. J. R., Mixed Finite Element Methods—Reducedand Selective Integration Techniques, Comp. Meth. App!. Mech. Eng., 15, 1,63—81, 1978.

51. Martin, H. C. and Carey, G. F., Introduction to Finite Element Analysis,McGraw-Hill, New York, 1974.

52. Meek, J. L., Matrix Structural Analysis, McGraw-Hill, New York, 1972.53. Meek, J. L., Field Problems Solutions by Finite Element Methods, Civil Eng.

Trans., Inst. Eng. Aust., 173—80, Oct. 1968.54. Mitchell, A. R. and Wait, R., The Finite Element Method in Partial Differential

Equations, John Wiley, London, 1977.55. Moan, T., Orthogonal Polynomials and Best Numercial Integration Formulas

on a Triangle, Zamm, 54, 501—8, 1974.56. Myers, G. E., Analytical Methods in Conduction Heat Transfer, McGraw-Hill,

New York, 1971.57. Newmark, N. M., A Method of Computation for Structural Dynamics, I. Eng.

Mech. Div., ASCE, 85, EM3, 67—94, July 1959.58. Norrie, D. H. and DeVries, 0., Finite Element Method: Fundamentals and

Applications, Academic Press, New York, 1973.59. Norrie, D. H. and DeVries, 0., Finite Element Bibliography, Plenum Press,

New York, 1976.60. Oden, J. T., Finite Elements of Nonlinear Continua, McGraw-Hill, New York,

1972.61. Oden, J. T. and Reddy, J. N., An Introduction to the Mathematical Theory of

Finite Elements, John Wiley, 1976.62. Park, K. C., Practical Aspects of Numerical Time Integration, Computers and

Structures, 7, 2, 343—54, 1977.

Page 357: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

348 References and bibliography

63. Reddi, M. M., Finite Element Solution of the Incompressible LubricationProblem, I. Lubrication Technology, 534—43, July 1969.

64. Rockey, K. C., et a!., Finite Element Method—A Basic Introduction, HalstedPress, 1975.

65. Schechter, R. S., The Variational Method in Engineering, McGraw-Hill, NewYork, 1967.

66. Silvester, P. P., Lowther, D. A., Carpenter, C. J. and Wyatt, E. A., ExteriorFinite Elements for 2-Dimensional Field Problems with Open Boundaries,Proc. lEE, 124, 12, 1267—70, 1977.

67. Stern, M., Families of Consistent Conforming Elements with Singular Deriva-tive Fields, mt. J. Num. Meth. Eng., 14, 409—21, 1979.

68. Strang, W. 0. and Fix, G. J., An Analysis of the Finite Element Method,Prentice-HaIl, 1973.

69. Taylor, R. L., Computer Procedures for Finite Element Analysis, in The FiniteElement Method, 0. C. Zienkiewicz (Ed.), McGraw-Hill, London, 1977.

70. Tracey, D. M. and Cook, T. S., Analysis of Power Type Singularities UsingFinite Elements, mt. i. Num. Meth. Eng., 11, 1225—34, 1977.

71. Ural, 0., Matrix Operations and Use of Computers in Structural Engineering,International Textbook Co., 1971.

72. Ural, 0., Finite Element Method: Basic Concepts and Application, Intext,1973.

73. Wada, S. and Hayashi, H., Application of Finite Element Method to Hydro-dynamic Lubrication Problems, Bulletin of Japanese Soc. Mech. Eng., 14, 77,1222—44, 1971.

74. Weaver, W. F., Computer Programs for Structural Analysis, Van NostrandCo., Pnnceton, 1967.

75. Whiteman, J. R. (Ed.), The Mathematics of Finite Elements and Applications,Academic Press, London, 1973.

76. Whiteman, J. R., A Bibliography of Finite Elements, Academic Press, London,1975.

77. Whiteman, J. R., Numerical Solution of Steady State Diffusion ProblemsContaining Singularities, Finite Elements in Fluids if, R. H. Gallagher (Ed.),101—20, John Wiley, 1975.

78. Whiteman, J. R., Some Aspects of the Mathematics of Finite Elements, in TheMathematics of Finite Elements and Applications, Vol. II, J. R. Whiteman(Ed.), 25—42, Academic Press, London, 1976.

79. Whiteman, J. R., (Ed.), The Mathematics of Finite Elements and Applications,Vol. III, Academic Press, London, 1978.

80. Whiteman, J. R. and Akin, J. E., Finite Elements, Singularities and Fracture,in The Mathematics of Finite Elements and Applications, Vol. III, J. R. White-man (Ed.), Academic Press, London, 1978.

81. Yamada, Y. and Gallagher, R. H., Theory and Practice in Finite ElementStructural Analysis, University of Tokyo Press, 1973.

82. Zienkiewicz, 0. C., The Finite Element Method in Structural and ContinuumMechanics, McGraw-Hill, New York, 1967.

83. Zienkiewicz, 0. C., The Finite Element Method in Engineering Science,McGraw-Hill, New York, 1971.

84. Zienkiewicz, 0. C. and Lewis, R, W., An Analysis of Various Time-SteppingSchemes for Initial Value Problems, Earthquake Engineering and StructuralDynamics, 1, 407—8, 1973.

Page 358: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

References and bibliography 349

85. Zienkiewicz, 0. C. and Hinton, E., Reduced Integration smoothing andNon-Conformity, I. Franklin Inst., 302, 6, 443—61, 1976.

86. Zienkiewicz, 0. C., Heinrich, J. C., Huyakorn, P. S. and Mitchell, A. R., AnUpwind Finite Element Scheme for Two-Dimensional Convective Transport,fat. J. Num. Meth. Eng., 11, 131—44, 1977.

87. Zienkiewicz, 0. C., The Finite Element Method, McGraw-Hill, London, 1977.

Page 359: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all
Page 360: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

AppendixA Summary of Input Formats and Supporting Programs

1Input Data Requirements for the Model Program

A typical problem Wi]rl require: 1. a dummy matn codeto the maximum dimensions, 2. the problemelement subroutines, 3. the problem data.

This file contains information Sections on:1. Input data formats2. Dui.y main program

•4++ •+++ 4+4+ SETION 1 ++++ ++++ 4+4+**** INPUT DATA ****

——>> CARD TYPE 1 (Subroutine MODEL)

TITLE, A general description of the problem.

——>> CARD TYPE 2 (Subroutine NODEL)Control parameters. (1615)

N Number of npdal jn the system.NE = Number elements in the system.NO = Number of per node.N = Number of per element.NSPACE = of solution spaceNSEG = No. ot boundary vith given flux.ISBN = Number ot nodes on an elem. segment.NITER = of iterations to be run (If any.)IMRBS = Initial system column matrix fiaq.

= 0, Not to be input. (Default)> 0, Will be input by CAPD TYP! 16.

ISAY = Number of user re.ark cards to be read andprinted. See CAPO TYPE

—->> CARD TYPE 3 (Subroutina MODEL)Control parameters. (1615)

WNP!IX = Number of fixed pt. properties per node.NNPFLO = Number of floating pt. properties per node.NLP?II = Number of fixed pt. proterties per elea.

= Number of floatiog pt. prope-ties per eleip.MISCFX = Number ot a;scel4aneous pt. propertiesMISC!!. 2 Number or •iscellineous floating pt. properties!SHONO Nodal properties flag.

> 0, Prpperttes hc.ogeneQus. Qplyvalues ror the first node vii).. be inpu'.

= Q, properties. (Default)LROMO 2 Element properties flag.

> 3, Properties are homogeneous. Onlyvalues for the first elemert will be input.

= 3 Ron—homogeneous properties. (Defau).t)NPTWR1' Noãal parameter print flag.

0, calculated values by nodes. (Default)Otherwise omit nodal list.

LENWET Nodal parameter print flag.= 0, node *pd calculated values foreaca element. Otherwise Omit list.

Page 361: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

MTAPEI = I/O Unit for post solution calculatton da4a.= 0, No post solution calculations. (Default)> 3, anit to be

NTAPE2 = Extra scratch unit when > 0.NTAPE3 = Extra scratch unit when > 0.NTAPE'I = Extra scratch unit when ) 0. (Note: 'he above

units are for the analyst's problem dependentdat a.)

NULCOL = Element column matrix flag.= 0, Problem the matrix. (Default)> The matrix is always a null vector.

——>> ARD TYPE 4 IREMPIOUser comments. Utilizes only when ISA? > 0 or.

CARD TYPE 2. (2014)

REMARK = Additional informa'ion to he printed withproblem output. Used to describe meaningof nodal prameters, properties, etc.

*** N3TE *** There will he ISA? TYPE 4 cards.

——>> CARD TYPE 5 (Subroutine INPUT)Nodal point data. (2t10,(F,F10.0))

3 = System node numberIBC(J) Parameters constraint indicatsrs at

node .J. (Riaht justified) Digit K equalsconetFaint fyee of parameter K.

1(3,K) = Spatial coorainates (K=1 ,NSPACE) of node 3*** N3TE *** There will. one TYPE 5 card for eachnodal point in the system.

12213 and = lO33Qimpties 3 ype 1, 1 Type z, 1 Type i.

ass available toMeshcares.suppiy T

-—>> CARD TYPE 6 (Subroutine INPUT)Lisment Connectivity Data (15, (1515))

3 Element number.NODES(J,K) Nodal incidences (K=1,N) of elem. J

NDTE *** There is one TYPE card for each elemMash aeneration Drograss are available tosupply T'fPE 5 and 6 cards.

——>> CARD TYPE 7 (SubroutineInPut data for a Type 1 nodal constraint, if any.(2t5,F 10.0)NODE 1 = system point number.IPAR1 = narameter number, 1<=I1'ARI<=NC.Al = Value to the

NOTES These constraints are of fo:mD(J) = Al, where is the system &?qrea offreedom corresponding to parameter IPAR1 at nodeNODE1, That 3 =

be TtPE card for each Tyoc 1constraint flagged IRC(NODE1). See CAPD 5.

——>> CARD TYPE 8 (Subroutinetnnut data for a Type 2 nodal constrain4, if any.(4t5 ,3P10.3)

NODE1 = First system node number.IPAR1 Constrained parameter number at NODEl.NODE2 = System node number of second node.IPAR2 Constrained parameter number NODE2.Al Coefficient of first Darameter.12 Coeffj.cjent of13 = Coefficient of right side.

Page 362: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

*** NOTES S** These of the formAl *D 131) +A2 *D (32) =A3.

will be one TYPE 8 card for each Type 2consttaint equation.

-—>> CARD TYPE 9 (Subroutine INCEQ)Input data for a Type 3 nodal constraint, if a'iy.(615, I4F 10.0)NODE1 First node point number.IPAP1 = First parameter number.NODE2 = Second nodal point.IPAR2 = constrained parame+er number.NODE3 = Third nodal number.IPAP3 = Third parameter.Al = Coefficient of first parameter.A2 = of second parameter.P3 = Coeffieient thirdAU = Constant on tight hand side.

*** NOTES *** These constraints are of 'he formA1*D(Jl) +A2*D (32) +A3*D(J3)=A4.

There will be one TTPE 9 for each Type 3nodal parameter constraint equation.The program is easily extended up to Type 9constraints.

——>> CARD TYPE 10 (Subroutine INPP.DP)Fixed point nodal properties. Utilized only whenNNPFIX > 0 on CARD TYPE 3. (15, (7110))

3 = Nodal point number.= Fixed point properties. K=1,NNPPIX

*** NOTE CCC Reading 'erminated when .J=M, unlessNEONO > 0 • Then or4ly 3=1 is read.

Omitted values default to zero when NROMO=0.

——>> CARD TTPE ¶1 (Subroutine TNPROP)point nodal properties. Utilized only when

NNPFL3 0 on CARD TYPE 3. (15, (7F10.O))

3 = Nodal point number.FLTNP(J,N) = Floating point properties. K=1,NNPFLO

CCC NOTE CCC Reading terminated when 3=N, unlessNHONO > 0 Then only 3=1 is read.values default to zero when NffOM)=O.

——>> CARD TYPE 12 (Subtutine INPROP)Fixed point elem properties. Utilizied only whenNLPFIX > 0 on CARD TYPE 3. (15, (7110))

3 = ElementLPFII(J,K) = Fixed point proper'ies. K=1,NLPFIXCCC NOTE CCC Reading terminated when J=NE, unlessLHOMO ) 0 Then on'y 3=1 is read.

values default to zero when

-—>> CARD 13 (Subroutine INPROP)point element properties. Utilized only

when NLPFL3 > 0 on CARD TYPE 1. (1S,7(F1O.O))

3 = Element number.= Floating point properties. K=l,NLPFLO

C** NOTE CCC Reading terminated when 3=NE, unlessLHONO > 0. Then only 3=1 is read.

values default to zero when LHOMO=O.—->> CARD TYPE 14 (Subroutine INPROP)Fixei point miscellaneous system properties. Utilizedonly if ?IISCFX > 0 on CARD !TPE 3. (8110.0)

Page 363: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

MISFIX(K) = Misc, fixed point. properties.K1,MISCFX

——>> cARD TYPE 15 ISubroutifle YNPROP)paint miscellaneous system utilized

only when MISCPL ) 0 on CARD TYPE 3.

?LTMIS(K) = Misc. floafing point properties.K1,MISCFL

—->> CARD TYPE 16 (Subroutine INVECT)Specified initial valties of the system column•atriz. Utilized only if INRHS > on CARD TYPE 2.

10.0)NODE = System number of the point.IPARM = Parameter number with ihe value,VALUE = Specified value to be added to column matrix.*** *** Addition is of the form ofC(J) C(J) • VALUE where J=NG* (NODE-i) +IPARM.

Re3ding is when NODE=N and IPAPM=NG.Omitted values default to zero.—->> CARD SET 17Specified boundary flux or surface trac ions.Utilized only when NSE' ) 0 and LBN > 0 on CARD TYPE 2.

TYPE 17k (1715)LNODF(K) = List of nodes or. the segment. K=1,LBN.TYPE 17B (8F10.4)(FLUX(K,L),L=1 MG) = The NG componentsof flux at of the above nodes. K1,LBN.

**S NOTES *** These data are related to problemdependent calculations. Thus the user assigr.smeanings to the nodal order and component order.

There will be NSEG type 17 CAFU SETs.***** END OF INPUT INSTRUCTIONS •*•••++++ ++++ ++++ SECTION 2 +4+. ++++ +44+

**** MAIN PROGRAM ****

MAIN , a dummy driver to set array sizes.The main program should have the following form. Itsets various control parameters and callsThe user sets the numbers, #1 and #., as desiredfor the computer in use.

DIMENSION AD(#1I ID(#2)DATA KFIkED / #1 *2/DATA

CC STORES ALL POINT ARRAYSC KFLOAT = DIMENSION 0? ADC KF!XED = DIMENSION OF IDC MAXTIN = MAX. NO. CALLS TO CPU CLOCKC CUTOFF = MAX. RESIDUAL FOP ITERATIVE SOLUTIONS

CALL MODEL (KFLOAT,K?IXED,!IAXTIM,AD,ID,CTJTOFF)STOPEND

The MAIN should be follwed at this point with anyrequired problem dependent subroutines or functions.That is, ELSQ, ELCOL, ELPOST, POSTEL, !rC.

END OP INPUT DATA SUMMARY

Page 364: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

2Supporting Programs Listings

SUBROUTINE MODEL (KFLOAT,KFIXFD,NAXPIN,AD.ID,CUTOFF)C ****** S 500050***00000000************** 5*0*5*0*5*5*0*5*C * *c * —M—O—D—E—L— *C * MODULAR PROGRAMS FOB FINITE ELEMENT ANALYSES *

* *CCDP IMPLICIT P.EAL*8 (A—H,O—Z)

DIMENSION TITLE (20), TIME(7), AD(KFLOAT), ID(KFIXED)C PRINT AUTHOR CREDITS

CALL TOOTC ZERO STORAGE ARRAYS

CALL ZEROA (KFLOAT,ADCALL ZERO! (KFIXED,IDI? ( ) CA L ZEROA (MAXTIN,TTME)

C INITIALIZE TIME CALLSIF I ) CALL CPUT!H (TZERO)

READ AND PRINT TITLE AND CON'rROL DATA *0READ (5 5000) TITLEWRITE 5010) TITLEREAD M NE NC N, NSPACE, NSEG, LBN, NITEB,

1 ISAYWRITE 16,5030) P1 NE, N NC, NSPACEWRITE (6,50(40) LBfIIF LBN.GT.N ) dRITE (6,5050)IF NITEB.GT.1 ) WRITE (6 5060) MITERIF NITER.LT.1

) MITER = ¶IF NCURVE.GT.0) WRITE (6,5150) NCIJRVE

IF INRHS.NE.0 ) WRITE (6,5160)READ (5,5070) NNPFIX, NNPFLO, NLPFIX NLPFLO MISC?X,

1 MISCFL, NR0MO LHOMO LEMWRT2 N?APE1, NULC6LWRITE (6,5080) NNPFIX, NNPFLO, NLPFIX, NLPFLO,

1 NISCFX MTSCFLIF I WHOMO.EQ.1 ) WRfTE (6,5090I? C LHOMO.E3.1 ) WRITE (6 5100

= NTAPE1 + NTAPE2 + •IF

( NSUM.G?.0 ) WRITE (6,5180) NTAPE1, NTAPE2,I NTAPEI4IF NPTWPT.EQ.0 WRITE 16,5190IF LENWRT.EQ.0 WRITE (6 5200IF NTAPE1.G?.0 REWINDI? REWIND NTAP!2IF NTAPE3.GT.O REWIND NTAPE3IF REWIND NTAPEUIF NULCOL.NE.0 WRITE (6 5210)IF I ISAT.GT.0 ) CALL (ISAY)

C SET INITIAL ARRAY DIMENSIONS AND CONSTANTSCALL SET (RNPFIX,NNPFLO,NLPFIX NLPFLO MISCFX MISCFL,

1 IPTEST,LPTEST,IP12 JP2 3P3 KP1 KP2 LHCMO N N,N!3 PATIO NEIFRE

C—-> *0* CALCULATE ARRAY POI!IrERSCC FIXED POINT ARRAY POINTERS (NI)C P1—IBC 2—NODES 3—LNODE 4-NODES 5—NPFO 6-P4DFXC 8—NOYC 17-NPFII 18—LPFIX 19—PIISFIX 20-LPROPC 21—NPROP 22—NRANGECC FLOATING POINT ARRAY POINTERS (NI):C P11—I 1A—CP 1B—SP 2—CEO 11—FLTNP 12—FLTEL 13—FLTMTSC 114—ELPPOP 15—PrPROp 16—COOED 17—S 18—C 19-S5 20-CCC 21—DD 22-fl 23—DUOLD 25—XPT 26-PRTLPT 27—FLUXC BEGIN POINTERS

CALL PT1 (N N NE MG NELFPE.NDFREF N1,N2 N3N'OTAL =

Page 365: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

NTOTALN8.OR. NTOTAL.GT.KFIXED) G3 TO

C—-> *** READ MESH DATACALL INPUT (N N NE NG NSPACE &0(M1),ID(N1) IDIN2))

C—-) *** COUNT NÔDAL CONSTRAINTS ***CALL CCOUNT (N NC ID(N5) ID(N1) ID(N14),

1 NUMCfC CON?111uE POfNTEPS

CALL PT2 (II NC NSPACE,NELFBE NAXACT NUNCE,2U !cp3,N17,N18,N19,N20,N21.N22,N23,5 I1l1,N12,N13,M1U,M156 M16,M17,M1 8,M1 9,N8,k2)NTOTAL 1119NTOTAL—N23

OR. NTOTAL GT.KFIXED) GD TO 10C——> *** READ NODAL PARAMETER CONSThAINT EQUATIONS

CALL INCEQ (NG,MAXACT,NUMCE,ID(N5),AD(M2),ID(NA),M)C—-> *** READ PROPERTIES ***

IF ( XPTEST.GT.0 ) CALL INPROP (M,NE NNPFIX,

3

U AD(M13) ID(M17) ID(N16),ID(N19))C DEFERMINE

1

CALL1 ,NDFREF)1IAXBAN = MAfl ( JBW,IBWWRITE (6,5110) 18W LID, 313W, MAIBAN, NDFREE, NELFRLNOCOB? =

C COMPLETE POINTERSCALL PT3 INOCOEF,NDFRFE NELFR! NITEP,NG NSPACE IRS

1

NN!1T = N23MN!XT = 1128

C *** COMPLETED ***1ITOTAL = MNEXT

10 MTO?AL FFLOAT NTOI'ALC CHECK DATA AGAI4ST

IF .AND. NTOTAL.LE.KFT!ED) GD TO 20WRITE (6,5130)

20 CONTINUEC-—) ** INPUT INITIAL FORCING VECTOR **IF ( I CALL INVECT (NOFREE NC AD(1120) N)C——> ** READ FLUX BOUNDARY COND. AND 1'o **

IF ( NSEG.GT.0 ) CALL INFLUX (NSEG,LBN 1011(3) AD(N27) ,1 N

AD (niB), Ab(1120) ,NbFREE,A5 (1117) ,AD (1119),3 NFLtIX)

IF ( MAXTIM.GT.O CALL CPUTIM (TIME(lflC INITIALIZE SYSTEM DOF FOR ITENATIVE S')LUTION

IF ( NITER.GT.1 ) CALL OSTART (1 11 NC NSPACE NDFREE,I 1DLN6) AD(P11I

C *** BEGIN LOOPDO 30 IT = 1 NITER

C——) *** AND ASSEMBLE ELEMENT MATRICES ***C--> *** GENERA!! POST SOLUTION MATRICES & STORE ***

CALL &S!NBL (N N NE NC NSPACE NELFRE MAIBAN NDFREE,1 LH0!IO NNPFLO IP1,tP3,2 IPU if's 3P2 kPl TD(N2)3 ID Il) ID AD (Ml)U AD Nil5 AD 1117 ,AD(1118 ,ADIN19) AR(1120) AD(1122)6 AD P123 ,AD(M267 NTAPE3 NTAPE4 NHONO)IF

( MAXTIM.GT.0 ) &ALL C!'UTIM (TIME(2))C *** ASSEMBLY COMPLETEDC—-> ** APPLY BOUNDARY CONSTRAINTS TO NODAL PARAMETERS **

CALL PENIIOD (NAXAT,NUMCE 10(1(5) 10(1(8) AD(112),ADIPIiA),1

Page 366: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

IF ( MAXTIM.GT.O ) CALL CPUTIM (TIM!(3))C—-> *** SOLVE FOR UNKNOWN NODAL PARAMETERS ***

CALL FACTORCALL SOLVE AD(N20),AD(M21)1IF ( NAXTIII.GT.O )

CALL CPUTIM (TfMF(U))C--> *** SOLUTION COMPLETE ***C *** PRINT RESULTS ***

IF ( NPTWRT.EQ.0 ) CALL WP.TPT ( N NG,NDFREE,1 ID(N6)lIF ( LEMWRT.EQ.0 )

CALL WPTELñ1 AD(N21) ID(N3IF ( NAITIN.GT.0 ) CALL

C--> *** POST SOLUTION CALCULATIONS ***IF ( NTAPE1.GT.0 CALL POST (NTAPE1 NE.N NG NELEFF,

1 kDFREE,ID(w2),rD(N3),fo(N6f,Ab(M21),AD (N20) ,NTAPE2,NTAPE3,NTAPF4,IT ,N

IF V MAXTIM.GT.O )CALL (TIME(6))

IF NITEP.LT.2 ) GO DO 30UPDATE VALUES FOR NEXT ITERATION (IF ANY) ***

WRITE (6,5140) ITCALL

1

RATIOIFk )

GO TO 35CALL CORECT (NDFREE AD(N21),AD(M23))CALL ZERDA IHOCO?F,hfNl9l)CALL ZEROA tNDFREE

C PRINT SEGMENT CPU TfMESI? ( MAXTIN.GT.O ) CALL TYNLOc, (TIME,MP.XTIM)

30 CONTINUE35 CONTINUE

IF I NCURVE.EQ.O)

GO TO*4 CALCULATE CONTOUR CURVES FOR NODAL PARAMETERS **

CAL!, M&XMIN (M NG NDFBEE, 1,AD(M2L4)1

CALL CONTUP (N,!)!, N, NS PACE, NDFP ER, NELFPF, NCURVE,1 ADIN1).AD(116),AD(M25) AD(N21),AD(M22),2 ID(N2) 4tD(N6))IF NAXTIN.OT.O ) LLLL

40*** PROBLEM COMPLETED ***

IF ( MAXTIPI.GT.O .AND. NCURVE.EQ.O )I CALL TYNLOG (TINE,NAXTIN)WRITE (6

FO PM AT S5000 FORMAT (

2OALI5010 FORMAT (lifi 15(4H****),/,IX,20AL4,/,1X,15(4H****),//)5020 FORMAT I 16f55030 PROBLEM

1 ' NUMBER OF NODAL POINTS IN SYSTEM = 1,15,/,2' NUMREROPELEMENTSINSYSTEN=3 ' NUMBER CF NODES PEP ELEMENT =4 ' NUMBER OP PARAMETERS PER NODE =S ' DIMENSION OF SPACE =..... '.15,1)

5040 FORMAT (I NUMBER OF BOUNDARIES WITH GIVEN'1 I FLUI=.......' 15,/,' NUMBER OF NCDES ONE,2' BOUNDARY

5050 FORMAT (' INONSIS1'ANT VALUES OF LBN AND N.')5060 FORMAT (' NUMBER OF ITERATIONS TO BE RUN',

1 •=...5070 FORMAT ' 16155080 FORMAT OF FIXED PT $

A 'PROP PER NOD!1 ' NUMBER OP FLOATING PT =2 ' NUMBER OF FIXED PT PROP PER ELEMENT =3 ' NUMBER OF FLOATING PT PROP PER ELEMENT =....',IS,/,4 ' NUMBER OF FIXED PT MISC PROP =5 ' NUMBER OP FLOATING PT MISC PROP = . ',IS I)

5090 FORMAT ('ONODAL POINT PROPERTIES APE HOMOGENEOUS.')5100 FORMAT 1' ELEMENT PROPERTIES ARE HOMOGENEOUS.')

Page 367: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

5110 FORMAT ('lEQIJATTON [fAt? BANDWIDTH =1 ' AND OCCURS IN ELEMENT NUMBER',IS,'.',/,) ' CONSTRAINT HALF BANDWIDTH =.. .1,15,/,

MAXIMUM HALF BANDWIDTH OF SYSTEM =4 ' TOTAL NEJMBER OP SYSTEM EQUATIONS ..S ' NUMBER OF ELEMENT DEGREES OF FREEDOM =...',XS,//)

5120 FORMAT ('O*** ARRAY STORAGE ***',/,1 I TYPE REQUIRED AVAILABLE',/,2 ' FLOATING POINT',6X,15,9X,T5,/,3 ' FIXED POINT' 91,15 9X 15,1/)

5130 FORMAT P0 STORAGE ABNORMAL PROGRAM END')5140 FORMAT ('OITERATION NUMBER = 15)5150 FORMAT NUMBER OF CONTOUR CTJhES BETWEEN',/,

1 ' 5Th & 95TH PERCENTILE OF EACH PARAMETER =5160 FORMAT (' INITIAL FORCING VECTOR TO BE INPUT'5180 FORMAT 0PrI0NAL UNIT NUMBERS (UTILIZED IF > 0)',/,

1 ' NPAPE1 = ',r2,' NTAPE2 = ',12,' NTAPE32 ' NTAPEZ4 = ' 12)

5190 FORMAT ' PARAMETERS TO BE LISTED BY NODES')5200 FORMAT ' NODAL PARAMETERS TO BE LISTED BY ELEMENTS')5210 FORMAT ' ALL ELEMENT COLUMN MATRICES ARE5220 FORMAT ' NORMAL ENDING OP MODEL PROGRAM.')

RETURNEND

SUBROUTINE SET (NNPFIX NNPFLO NLPFIX,NLP?LO NTSCFX,1 MISCEL TP1 1P2 1P4,2 IPS,JP3 JP2 ciHOMo,LHONO,

H N4 NG,LBN)

CC SET DIMENSIONS OF PROPERTIES ARRAYSCC IF LPTEST.G?.O ELEMENT PROPERTIES APE DEFINEDC IF IPTEST.GT.0 SOME PROPERTIES ARE DEFINEDC IP1 = NUMBER OF ROWS IN ARRAY FLTNPC 1P2 = NUMBER OP BOWS IN ARRAY NPPIXC IPI = NUMBER OF ROWS IN ARRAY FLTELC 1P14 = NUMBER OF ROWS IN ARRAY LPFIXC = NUMBER OP ROWS TN ARRAY PRTLPTC JP1 = NUMBER OF COLUMNS IN ARRAYS NPFIX AND NPROPC JP2 = NUMBER OF COLUMNS IN ARRAYS LPFTX AND LPROPC JPI = NUMBER OF COLUMNS IN ARRAY MISFIXC MP1 = NUMBER OF COLUMNS TN FLTNP & PRTLPT & PTPROPC MP2 = NUMBER OF COLUMNS IN ARRAYS FLTEL AND ELPROPC KP3 = NUMBER OF COLUMNS IN ARRAY FLTMTSC NLPFIX = NUMBER OP FIXED PT ELEMENT PROPC NLPPLO = NUMBER OF FLOATING PT ELEMENT PROPC NNPFIX = NUMBER OF FIXED PT NTJNREP PROPC MNPFLO NUMBER OF FLOATING PT NUMBER PROPC MISC?L = NUMBER OF MISC FLOATING PT SYSTEM PROPC MISCPX = NUMBER OF MISC FIXED PT SYSTEM PROPC IF LHOMO=1 ELEMENT PROPERTIES AR! HOMOGENEOUSC IF NHOMO=1 NODAL PROPERTIES ARE HCMOGFNEOUSC MAXTYP = MAX ALLOWED CONSTRAINT TYPFC RATIO = CONSTANT FOR ITEP CONTPOL,5?E MODEL

RATIO = 1.DDNAXTYP = 5NELFRF N*NGNDFREE = MSNGNFL(JX = LBN*NGIF ( NFLUX.LT.1

) NELUX = I1IPTEST + + NLPFIX + NLPFLO

LPTEST = NLPFIX + NLPFLOIP1 = 1

IP(NNPFLO.GT.O .AND. NHONO.EQ.0)

IP1 N

IF (NNPFIX.GT.O .AND. NUONO. EQ.0) 1P2 = hiIP3 = 1

IF ( NLPFLO.GT.0 .AND. LHOMO.EQ.O) IP) = NE

Page 368: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

rPll = 1

IF ( NLPFIX.GT.O .AND. LHOrIO.EQ.O ) 1P4 NEtPS = 1

IF (N

JP1 = NAXO (NNPFIX,1JP2 = NAXO (NLPFIX,1JP3 = MAXO NISCFI,iKP1 = 1IAXO NNPFLO,1

= MAXO NLPPLO,1KPI = MAXO PIISCFL,iRETURNE ND

SUBROUTINE PT1 (P1 N,NE,NG,NELFRE NDFREE Ni N2 N3,1 N4 PI1A

cC INITIAL CALCULATIONS OP POINTERS POP APFA1( STORAGECC M NO. OF SYSTEM NODESC Ni TO NNEXT POINTERS FOR FLOATING POINT ARRAYSC MAXTYP = MAX NO OP CONSTRAINT TYPESC N = NUMBER OF NODE PER ELEMENTC NDFR?E = TOTAL NUMBER OF SYSTEM DEGREES OP FREEDOMC NE = NUMBER OP ELEMENTS IN SYSTEMC NELFRF = NUMBER OP DEGREES OF FREEDOM PEP ELEMENTC NG = NUMBER OF NODAL PARAMETERS PER NODE POINTC NSPACF = DIMENSION OF SPACEC Ni TO NNEXT POINTERS FOR FIXED POINT A9RAYS

Ni = 1

C TBC(MlN2 = + N

CN3 $2 + NE*N

C LNODE(N)= N3 + N

C KODES(NG)P45 = P44 + MG

C NR?Q(MAXTYP)P46 = P45 + MAXTYP

C INDEX(NELFPE)= $6 + NELFRE

CIii = 1

C X(M,NSPACE)N1A = Mi + (N+2)*NSPACE

CMAXTYP

CP12 = M1B + MAXTYP*NAXTYPRETURNEND

SUBROUTINE PT2 (N NG NSPACE,NELPRE,PIAXACT NUMCF.,1

2 KP3,N17,N18,N19,N20,N21.N22,N23,M113 N 12,M13,M14,P115,M16,M17,M18,M19,N8

CC CONTINUE CALULATIONS OP POINTERS FOP APRAY STORAGECC IP1 = NUMBER OF ROWS IN ARRAY PLTNPC 1P2 = NUMBER OF ROWS IN ARRAY NPFIXC 1P3 = NUMBER OF ROWS IN ARRAY FLTFLC IP(4 = NUMBER OF ROWS IN ARRAY LPFXXC JPI = NUMBER OF COLUMNS IN ARRAYS NPF!XC 3P2 = NUMBER OF COLUMNS IN ARRAYS LPFIX AND LPROPC JP3 = NUMBER OF COLUMNS IN ARRAY MISFIXC KP1 = NO OP COtS TN ARRAYS FLTNP & PRTLPT & PIPROPC KP2 = NUMBER OFCOLUMNS IN ARRAYS PLTEL AND EtPPOP

Page 369: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

C KP1 = NUMBER OF COLUMNS IN ARRAY FLTNISC N = NUMBER OF NODS PER ELEMENTC NELFRE NUMBER OF DEGREES OF FRFEDCM ELEMENC NG = NUMBER OF NODAL PARAMETERS PER NODE POINTC NSPACE = DIMENSION OF SPACEC NI TO NMEXT = POINrERS FOR POINT ARRAYSC Mi TO MNEXT = POINTERS FOR FLOATING POINT ARRAYSC MAXACT = NO ACTIVE CONSTRAINT TYPESC NUMC! = NUMBER OF CONSTRAINT EQUATTCNSC

P117 = + + 1

C NPFIX(1P2,JP1)LP118 = Ni 4

C LPFIX(IPL$,JP2IP119 = P118 +

C MISCFX(3P3)P120 = N19 + 3p3

C LPROP(JP2)P121 = P120 + JP2

C NPROP(JP1)P122 = P121 + JP1

CN 3 = 22 + NG*2

CC M2—CEQJNAXACT NUNCE)

Nil = r,2 + MAiACT*NUMCE + 1

C

C FLTEL(1P3,KP2)P113 = P112 +

C

CMiS = 4 KP2

CP116 =

RD(M NSPAC!)= • (N+2)*NSPACE

C S4NELFRE4NELrRELP1 8 P1 i 4 RELFRE*NELFRE

CP119 = NiB 4 NELFRERETURNEND

SUBROUTINE PT3 (NBANCO,NDFREE NELFPEP120 P122 M2i,

2 P124CC COMPLETE CALCULATION OF POINTERS FOR ARRAY STORAGECC NBANCO NDFREE*MAXBANC NUPRE? = TOTAL NUMBER OF SYSTEM DEGREES FREEDOMC NELFR? = NUMBER OP DEGREES OP FREEDCM PER ELEMENTC NO. OF ITERATIONS TO BE RUNC HG = NUMBER OF NODAL PARAMETERS PER NCDE POINTC IRS = NUNBEP OF BOWS IN ARRAY PQTLPr

NP1 NO OP COLS IN ARRAYS PLTNP & PRTLPT & PTPROPC LEN = NO OF NODES ON AN ELEMENT BOUNDARY SEGMENTC Ml TO MNEXT = POINTERS FOR FLOATING POINT ARRAYSC Ni TO NNEXT = POINTEPS FOP FIXED POINT ARRAYSC

MAX BANECNBANi.O

C CCfNDFREE)P12, = P120 + NDPRRE

C DDINDFPEE)= P121 + NDFPEE • 2

CP1 3 = 112i + NELFRE + 2

Page 370: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

CP1214 = P123 + 1

IF ( NITER.GT.1 ) P1214 P123 + NDFR!E + 2C RAN6E(NG 2)

P125 P124 + (NG+2)*2C XPT(NSPACE)

P126 = P125 + NSPACEC PRTLPTUP5,KP1)

P127 ñ26 +

C

IF (LBN.GT.0 )P128 P127 +

RETURNEND

SUBROUTINE INPUT (N N NE,t4G NSPACE.X,IBC,NODFS)CC READ BASIC PROBLEM DATACCDP IMPLICIT REAL*8 (A-H O—Z)

DIMENSION I(N TBC(N), NODES(NE,N)C N = NUMBER OP IN SYSTEMC N = NUMBER OF NODES PER ELEMENTC NE = NUMBER OF ELEMENTS IN SYSTEMC NG = NUMBER DE PARAMETERS (DO?) PEP NODEC NSPACE = DIMENSION OF SOLUTION SPACEC I = SYSTEM COORDINATES OF ALL NODESC IBC = PACKED NODAL CONSTRAINT INDICATORC NODES = SYSTEM ARRAY OF ELEMENT YNCIDENCESC--> READ NODAL POINT DATA

WRITE (6 5000) NSPACE5000 FORMAT ('l*** NODAL POINT DATA ***' /

1 ' NODE CONSTRAINT INDICATOR,,12,1DO 10 f = 1,NREAD (5,5010) J,IBC(J , (X(J,K)

5010 (2110 (6F10.4)WRITE(6 5010f J IBC(J ,(I (J,K) ,K= 1, NSPACE)I? ( J.tT.M ) WAITE (6,5020)

5020 FORMAT (' INVALID NODE NUNBEP IN SUBROUTINE INPUT.')10

s—-> READ ELEMENT DATAWRITE (6 5030) N

5030 FORMAT (I*** ELEMENT CONNECTIVITY ***',/,12 ,' NODAL TNCIDENCES.',/

READ (5,5056) J, (NODES(J,K),K=1,NWRITE(6 5050) J, (NODEStJ K) K=1,NIF ( J.6T.NE ) WRITE

50140 FORNAT (' INVALID ELENrNT IN SUBR INPUT. ')20 CONTINUE5050 FORMAT ( IS, (1515)

R ETU RNEND

SUBROUTINE PTCODE (JPT NG,KODE,KODES)C

* * * *DIMENSION NODES(NG)

C JPT=NODE NO. NGNO. PARAMETERS PEP NODEC KODE=(NG) DI6IT INTEGER CONTAINING BC INDICATORSC NODES=VECTOR CONTAINING MG INTEGER CODES (0 OP I)C 0 IMPLIES NO B. C.C I IMPLIES A B. C. OP TYPE I

NGPLUS MG 4 1

IOLD = NODEISUM 0DO 10 I = 1,MGIT = NGPLUS - IINEW = IOLD/tOIN = TOLD — INEW*10

Page 371: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

ISUM = ISUN + IK*1O**(I-l)IOLD = INEW

10 KODES(II) = 1KC

,I5)RETURNEND

SUBROUTINE COUNT (N NRES IBC,KODES1 NLJk! tlAxTyPç

-' *C CALCULATE NO OF CONSTRAINT FLAGS OF EACH TYPEC

DIMENSION IBC (N) KODES (NG)C N = TOTAL NUMBER oF SYSTEM NODESC NC = NO. OF PARAMETERS (DO?) PER NODEC rRC = NODAL POINT BOUNDARY RESTRAINT INDICATORC KODES = LIST OF RESTRAINT INDICATORS AT A NOD!C NRES = LIST OF NUMBER OF FLAGS OF EACH TYPEC = NO OF COWSTR EQS ON EXITC )IAXTYP MAX NC) OF DIFFERENT CONSTR TYPESC MAXACT = ACTIVE NO OF TYPESC = TOTAL NO OF CONSTR EQUATIONSC INITIALIZATION

DO 10 I = 1,MAXTYP10 = 0

DC) 30 I = 1 NC DOES NODE I hAVE A NODAL CONSTP?tINT

ITEST = IABS( TBC(I) )IF ( ITEST.EQ.O )GO TO 30

C EXTRACT PARAMETER CODESCALL PTCODE (I,NG,ITEST,KODES)DO 20 3 = 1,NGK = KODES(J)IF ( K.EQ.0 )

GO TO 20C UPDATE CONSTRAINT COUNTERS

NR!S(K) = NRES(K) 1

20 CONTINUE30 CONTINUE

C CONVERT TO EQUATION COUNTERSNUNCE = 0MAXACT 1

WRITE (6 5000)5000 FORMAT ('1*** NODAL PARAMETER CONSTRAINT LIST',

1 ' ***f,/,I CONSTRAINT NuMBER OF',/,)

K NRES(I)I? ( 0 ) MAXACT = IIF ( ((K/1)*I).LT.K ) WRITE (6,5010)

5010 (' FOR TYP!',Il)

5020NRES(t)

'iO NUNCE = + NRES(I)RETURNEND

SUBROUTINE INCEQ (NG MAXACT,NtJMCE,NREQ,CEQ,1 NPiC N)

CC READ NODAL PARAMETER CONSTRAINT EOU&TION DATACCDP IMPLICIT REAL*8

DINENS ION CEQ (MAXACT NuINC?) , NDXC(MAXACT,NUMCE)1

C NC = NO. PER NODE

Page 372: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

C NREQ(I) = NUMBER OF CONSTR OF TYPE IC CEO(T J) = CONSTR COEFF I OF EQ JC = DO? NO I OF EQ 3

WRITE (6 5000)5000 FORMAT (hl*** CONSTRAINT EQUATION DATA ***I,/)

IEQ = 000 130 IN = 1,MAXACTNTEST = NREQtIN)IF ( ) GO TO 130GO TO (10,30,50,70) , IN

C--) TYPE 1 D(L1) Al10 WRITE (65010 FORMAT TYPE O'4E',/,

1' EQ. NO. NODE1 PAR1 Al')DO 20 NEQ = 1,NTESTI!Q = lEO + 1

READ (5,5020) NODE1 IPAR1, Al5020 FORMAT ( 215 P10.0 c

WRITE (6,5036) IEQ NODE1, Al5030 FORMAT ( 318 2x, E16.8I? ( NODE1.Gf.M .OR. IPART.GT.NG ) WRITE (f,50140)50140 (' DATA ERPOR IN TNCEQ.')

lEO) = NG*(NODEI — 1) 4 IPAP120 CEQ(1,!EQy = Al

GO TO 130C—-> TYPE 2 A1*D(L1)+A2*D(L2)=Al30 WRITE (6 5050)5050 FORMAT TYPE TWO' I,

1' EQ. NO. NODEI PAR1 PAP2',2' Al A2 Al')DO '40 NEQ = 1,NTESTIEQ = IEQ + 1

5060 FORMAT (1415 3F10.O

BEAD (5 50601 NODE1, IPAPI NODE2, IPAR2 Al A2 AlWRITE SOlD)

5070 FORMAT 3 (2X,E14.8HI? .OR. NODE2.GT.M .CR. IrPAR1.GT.NG .OP.

1 IPAR2.GT.NG ) WRITE (6,50140)NDXC (1 ,IE0) (NODE 1 — 1) + IPAP 1

NDICI2 = NG*INODE2 - 1) + TPAR2CEO(i,tEQ) =

40 CEQ(2,IEO) = Al/AlGO TO 130

C TYPE 350 WRITE (6,5080)5080 FORMAT ('OCONSTRAINT TYPE THPEE',/,

1' EQ. NO. NODE1 PAR1 NODF2 PA°2 NODE3',2' PAR3 Al A. A3',1'DO 60 NEQ = 1,NTESTlEO = lED + 1

READ (5,5090) NODE1,IPAP1,NODE2,IPAP2,NODE3,IPAR3,1 Al A2 A3,A14

5090 FORMAT ( 615 4FfO.6WRITE (6.5106) IEQ NbDE1 IPAR1 NODE2,IPAR2,NODE3,

1 Al,5100 FORMAT ( 717 '4(2X E14.8))

I? ( NODE1.C!.M .Ofl. N0DR2.GT.N .OR. NODE3.GT.M .OP.1 IPAR1.GT.NG .OR. IPAR2.GT.?IG .OR.2 WRITE (6,50140)

NDYC(l,IEQ) ft(*(NODEI - 1) + IPAPINDXC(2,IEQ) NG*(NODF2 - 1) + IPAR2NDXC(3 lEO) NG*(NODE3 — 1) + IPAP3C!Q(1,tEQ} = A2/ATCEQ(2,IEO) = A3/A1

60 CEQ(3,IEO) = A14/A1GO TO 130

C OTHER TYPES NOT TREATED70 CONTINUE130 CONTINUE

Page 373: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

SUBROUTINE INPROP IN NE1NNPFIX NNPFLOLNLPFIXINLPFLC'L1

2 KP2 KP3 FLTNP,FLT!L,FLTNIS,PIPFIX,3 L.PFfX,MfSFIk)

C INPUT NODAL POINT, ELEMENT, AND MISCELLANEOUSC SYSTEM PROPERTIESCCDP IMPLICIT REAL*8 (A-Fl O-Z)

DIMENSION1 NPFIXiIP2,JP1) ,LPFIX(1P4 3P2) MISFIX

C M = NO. SYSTEM NODES, NE = NO. FLEMhITSC FLTNP FLTEL FLTMIS FLOATING POINT PROP. OF SYST!MC NOfES AND MISC.C NPFIX, MISFiX FIXED POINT PROP. SYSTEMC NODES, AND MISC.C NNPFLO = NO,, FLOATING POIN" NODAL PROPERTIES

MtIPFIX = NO. FIXED POINT NObAL PROPERTIESC NLPFTX = NO. FIXED POINT ELEMENTC MISCFL = NO. MISC. FLOATING POINT SYSTEM PROPERTIESC M!SCFX = NO. MISC. FIXED POINT SYSTEM PROPERTIES

IP1 = NUMBER OP ROWS IN ADRAY ?LTNPC 1P2 = NUMBER OF ROWS IN ARRAY NPYIXC 1P3 = NUMBER OF ROWS TN ARRAY FLTELC IPL& = NUMBER OF ROWS IN ARRAY LPFIXC IPS = NUMBER OF ROWS IN ARRAY PRTLPTC JP1 = NUMBER OF COLUMNS IN ARRAYS NPFIX AND MPROPC JP2 = NUMBER OF COLUMNS TN ARRAYS LPFIX AND LPPOPC JP3 = NUMBER OF COLUMNS TN ARRAY MYSPIXC KP1 NUMBER OF' COLUMNS IN PLTNP & PRTLPT & P1'PROPC KP2 = NUMBER OF COLUMNS TN ARRAYS FLTEL AND ELPPOPC KP3 = NUMBER OF COLUMNS TN ARRAY FLTMIS

IF I NNPFIX.LT.1 .AND. NNPFLO.LT.1 ) GO TO 60C—-> NODAL POINT PROPERTIES

WRITE (6 5000)5000 FORMAT NODAL POINT PROPEPTIES ***,/,

1 ' NODE NO. PROPERTY NO. VALUE',/)IF I NNPFIX.LT.1 ) TO 30DO b t = 1,tP2READ '5,5010) J

5010 1 15,I ) GO rb

1020 WRITE (6 5030'i ((J K,NPFIX(J,K),J=1,1P2),K=1,MNPFIX)5030 FORMAT '1:8 I'13, hO)

WRITE 5640)5040 FORMAT END OF FIXED POINT PBOP'RTIES OF NODES')30 IF I

) TO 60 -DO I = 1 IP1READ (5,5050r J,(FLTNP(J,K),K=1,NNPFLO)

5050 FoRMAT V 15,IF I

)GO TO 0

(I050 WRIT? (6,50505060 FORMAT ,oef (,), 1, 1), 1, tJPFLO)

WRITE (5070 FORMAT ( FLOATING POINT PROPERTIES OF NODES')60 IF ( I4LPFI!.LT.1 .AND. NLP?tO.LT.1 ) GO TO 120

C——> READ ELEMENT PROPERTIESWRITE (6 5080

5080 FORMAT ELEMENT PROPERTIES ***1,/,1 * ELEMENT NO. PPOPERDY NO. VALUE',/I? I NLPFIX LT.1

)GO TO 90

IP 4J,(LPFIX(J,K),.K=1,NLPFIX)IF I J.EQ.$E ) GO TO 60

70 CONtINUE80 VR!TE

( (J,K,LPFIX(J,r) ,J=1,1P4) ,K=1•NLPFIXWRITE (6 5100

5100 FORMAT END OF FIXED POINT PROPERTIES OF ELEMENTS')90 I? I

) GO TO 120DO 100 I 1,1P3READ (5,5050) J.(FLrFL(J,K),JC=1,NLPPL0)

Page 374: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

IF ( J.EQ.NE )GO TO 110

110 WRITE100

((J,K,FLTEL(J,K),J=1,1P3),K1,NLPFLO

WRITE5110 FORMAT END OP PLOATIW PT OF ELEMENTS')120 IF I MISCFX.LT.1 .AND. MISCFL.LT.1 ) GO TO 140

C——> R!AO MISC. SYSTEM PROPERTIESWRITE (6 5120)

5120 FORMAT (%1*** MISCELLANEOUS SYSTEM PROPERI'IFS',1 ' / • PROPERTY MO. VALUE',!)IF ( ) GO TO 130READ (5,5130)

5130 FORMAT ( 18110)WRITE ,K=1,NISCFX)

51140 FORMAT 1 1125150 FORMAT EN6 OF POINT PROPERTIES OF SYSTEM')

WRITE (5 5150130 IF I I GO TO 140

15,51601 (FLTNIS(K),K=1,MISCFL)5160 FORMAt I VSF10.14)

WRITE (K)) ,K=1 ,NISCFL)5170 FORMAT

WRITE (5180 FORMAt (I FLOATING PT PROPERTIES OF SYSTEM')1140 CONTINUE

RETURNEND

SU'IROUTINE INVECT (NDFREE,NG,CC,M)C INPUT SPECIFIED VALUES IN FORCING VECTOD, CCCCDP IMPLICIT REAL*8(A—H

DIMENSION CC NOFREE = TOTAL NUMBER OF SYSTEM DFGREES OF FREEDOMC NO = NUMBER OF PARAMETERS PER NODEC CC = SYSTEM EQUATIONS COLUMN MATRIX

WRITE (6 5000)5000 FORMAT *** INITIAL FORCING DA1'A ***t,/,

1' NODE PARAMETER VALUE DOF',//)DO 10 I = 1,NDFREEREAD (5,50101 NODE, IPARN, VALUE

5010 FORMAT (FIND CORRESPONDING DEGPE' OF NUMBERCALL DEGPAR (NODE,IPARNNG,3)CCIJ) = VALUE

C INPUT DATAWRITE (6,50201 NODE IPARM, VALUE, J

5020 FORMAT I

I NDdE.GT.M .OR. I WRITE5030 ?ORAAT I' DATA ERROR IN S(YBROUTINF INVECT.'

IF I J.EQ.NDFBEE ) GO ro 2010 CONTINUE20 CONTINUE

RETURNEND

SUBROUTINE DEGPAE (IPT,JPARM,NG,INtEX)CC THE DEGREE OF FREEDOM NUMBERC OF NODAL PARAMETER JPARM AT NODE POINT IPTCC MG = NUMBER OF PARAMETERS PER NODE

INDEX = NG*(IPT—1) + JPARMRETURNEND

Page 375: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

SUBROUTINE INFLUX (NSEG,LBN,LNODE ELUX,PIG,COORD,1 NSPACE I N INCh C,CC,NDFREE,2 S,SS

CC READ FLUX BOUNDARY COND. AND APPLY TO SYSTEM EQSCCDP YMPLICIT R!TtL*8 (A-H,O-Z)

DIMENSION uN NSPACE) COORD(LBN NSPACE)1 FLU*(LBN MGI CC(NDFP!h C(NFLTJX),2 S(NFLUX3 INE,EX(NFLUX

C C = BOUNDARY SEGMENT COLUMN MATRIC CC = COLUMN MATRIX OF SYSTEM EQUATIONSC COORD = SPATIAL COORDINATES OP SEGMENT NODESC INDEX = SYSTEM DEGREE OF FREEDOM NUMBERS ARRAYC N = NO. OF SYSTEM NODES MG = NO. OF DO? DEE NODEC NDFPEE = TOTAL NUMBER 0* SYSTEM DEGREES OF FREEDOMC NSPACE = DIMENSION OP SPACEC I = COORDINATES OF SYSTEM NODESC NSEG = NO. OF ELEMENT BOUNDARY SEGMENTS IN SYSTEMC LBN = NO. 0? NODES ON AN ELEMENT POUNDAR! SEGMENTC LNODE = INCIDENCES OF SEGEMPNT ISEGC FLUX = SPECIFIED COMPONENTS OF FLUX AT NODESC WFLUX = LBW*NG NO OF SEGMENT DOEC S = BOUNDARY SEGMENT SQ MATRIXC SS = SYSTEM SQUARE MATRIX UPPER BANDC NAXBAN = SYSTEM BANDWIDTRC IOPT = PROBLEM MATRIX REOUIREMENT FLAG (EFTURNED)C = 1, BFLUX CALCULATES C ONLYC = 2, BFLUX CALCULATES S ONLYC = 3, RFLUX GIVES BOTH C AND S

YOPT = 0

5000 BOUNDARY FLUXES ***I,/,2' SEGMENT ',13,' NODES / ' /3' ' 13 ' FLUX NODE'DO 30 ISEG = 1

C--> READ BOUNDARY N6DESREAD (LNODE(L),L=1,LBN)

5010 FORMAT (

C——> READ BOUNDARY !LUXREAD (5,5020) ((FLUX(K,IS) •IS=1,NG) ,K=1,LRN)

5020 FORMAT I 18F10.4)WRITE

5030 FORMAT ((1218fD05IF

( LN3DE(L) .LT.1 .OR, LNODE(L) .GT.N)

GOTO5 WRITE (6,5040) (PLIJX(L,IS),IS=1,NG)

FORMAT ( (6F15.4)C EXTRACT COORDINA'TF

CALL ELCORD (N LUN NSPACE I COORDC—-) CALCULATE BOUNDARY D!PENDENT)

CALL BFLUX (FLUX COORD LBN,NSPACE,NFLUX,1

IF ( IOPT.EQ.0 ) TO 30C INSERT BOUNDARY FLUX MATRICES INTO SYSTEM EQ

CALL INDXEL ILBN NPLUX LNODE,INDEX)IF ( IOPT.EQ.1 IOPf.EO.3

1 CALL STOPCL (NDFREE,NPLUX, INDEX, C,CC)IF ( IOPT.EQ.2 .ON. IOPT.!Q.3

1 CALL STORSQ (NDFREF,NAXBAN,NFLUX,INfl!X,S,sS)30 CONTINUE

C CLEAR ARRAY C AND S FOR LATER USECALL ZEROA (NFLUX C)ISEG = NFLUX*NFLU*CALL ZFPOA (ISEG,S)RETURN

40 WRITE (6 50)50 FORMAT (f INVALID NODE NUMBER IN INFLUX')

STOPNW D

Page 376: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Subject and Author Index

Abel, J. F., 232, 245, 267Abscissas, 94, 98, 102Akin, J. E., 84, 124, 125, 148, 212,

217, 276, 277, 281Allan, T., 205

Area coordinates, 102, 109Arya, S. K., 212Assembly of equations, 7, 8, 15, 22,

27, 129—149Axisymmetric integrals, 81, 281, 326Aziz, A. K., 2

Bandwidth, 8, 9, 39, 49, 163

Barlow, J. 106Bathe, K. H., 46, 95, 117, 170, 232,

317, 331Becker, E. B., 126

Berztiss, A. T., 21Bettess, P., 126Bibliography, 345Blackburn, W. S., 124Briggs, J. M., 333, 337Bookkeeping, 5, 15, 131, 135, 136Boolean assembly, 15, 144—148Body forces, 232Boundary conditions, 8, 153—164, 184Boundary codes, 6, 11, 32, 35, 142,

191Boundary flux, 54, 55, 246, 250, 267,

273, 287Boundary matrices, 54, 267, 272, 287

Campbell, J., 106, 161Carey, G. F., 267, 269Carpenter, C. J., 126Choleski factonzation, 166Christie, 1., 127Chung, T. J., 267, 281, 317Cohen, M., 105Column height, 46, 48, 49

Condensation (Static), 59—61Conduction, 183, 245—255Connectivity, 6, 38Constitutive matrix, 232Constraint equations, 30, 33, 153—164Contours, 84—89, 177, 179, 247Convection, 183Convective coefficient, 184Convergence criteria, 4Cook, R. D., 105, 161, 232Coordinate transformation, 225Crank-nicolson, 323Cubic element, 119, 218, 305Curiskis, J. 1., 164Current density, 280

Daly, P., 276Data generation, 10, 295—315Data requirements, 32, 33, 34Data storage, 21De Boor, C. E., 2Deflection, 201Degree of freedom number, 5, 43, 129Derivative

local, 67global, 70, 73nodal parameters 218, 226

Desai, C. S., 232, 245, 267De Vries, G., 1Diagonalized matrices, 323—326, 330Differential equation, 212—224Direct assembly, 129—144Direction cosines, 194, 225Displacements, 5, 204Dynamic applications, 331—344Dynamic storage, 21

Eigenvalues, 105Element degree, 18Element incidences, 6, 38, 142

367.

Page 377: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

368 Subject and Author Index

Element matrices, 28, 29, 51. 58. 185.194, 206. 212

Element properties, 33, 41Element thickness, 232Essential condition, 184Euler integration, 320. 323Exact integrals, 78, 83, 84, 92. 93, 225

Factorial function, 78. 83Fenves. S. J., 333Film thickness, 205, 211Flow chart. 25—31Flow, viscous, 255—258, 284Flux components, 54, 255, 275Forces, 204, 206. 229, 245Frame, 225—229Frontal method, 148—151Functional, 2. 14

Galerkin criterion, 3Gallagher, R. H., 232Gamma function, 78Gartling, D., 126Gauss factorization, 166, 167Gauss-Choleski factorization, 166, 167Gaussian quadrature, 94—100, 246, 275Global derivatives, 70, 73Gray, W. H., 84Griffiths, D. F., 346Gupta, A. K., 117

Half-bandwidth, 8, 39, 140, 155, 165Haroun, M., 105Hayashi, H., 205Heat conduction, 184, 245, 328Heat convection, 34, 184Heat generation, 245, 286Heat loss, 186, 190Henshell, R. D., 22, 123Hexahedra, 111, 248, 285Hinton, E., 1, 105, 106Huebner, K. H., 205Hughes, T. J. R., 105, 127Hyperbolic equations, 331—344

Inclined roller, 154, 202Initial Strain, 194Internal nodes, 60Internal quantities, 59Interpolate, 16

Interpolation functions, 4, 7, 15. 71,107—127, 301, 302

Inviscid flow, 281Irons, B. M., 262Isoparametric elements, 65—90, 249,

261, 282, 295

Jacobian, 69, 72, 79, 90, 101, 123

Lagrange interpolation, 107, 112Laplace equation, 259, 264, 299Least squares, 4, 212, 217Lewis, R. W., 320Linear acceleration, 333Linear elements

hexahedra, 111,288line, 15, 184, 206, 212quadrilateral, 66, 245, 277triangle, 11, 232. 256

Linear velocity, 321Liu, W. K., 317Load capacity, 206, 211Load vector, 7, 53Local coordinates, 65, 82, 110, 111,

113Local derivatives, 67, 110, 111, 113Lowther, D. A., 126Lubrication. 205—211Lumped matrices, 324Lynn. P. P., 212

Magnetic flux density, 280, 281Malkus, D. S., 105Mass matrix, 325, 337Martin, H. C., 267. 269Material number, 231, 240Meek, J. L., 193, 195, 231Mesh generation, 10, 295—316M.H.D. Plasma, 280—283Minimal integration, 105Mitchell, A. R., 127Moan, T., 106Modulus of elasticity, 204, 225Moment, 228Myers, 0. E., 56, 251, 286, 318, 323,

326

Natural boundary conditions, 3, 14,184

Page 378: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Subject and Author Index 369

Newmark. N. M., 332Nodal

boundary condition code. 6. 11, 32,142, 191

constraints, 6, 16, 33. 153—164coordinates. 6. 32, 191, 260displacements. 193, 232forces. 204, 229, 245moment, 226, 229pressure. 205, 255properties, 33rotations, 226temperature, 184, 245, 285thickness, 205, 211velocity, 205, 211. 255

Norrie, D. H., 1Numerical integration, 63, 75, 95—106,

249, 288

Oden, J. T., 2Optimal points, 16Output, 175Owen, D. R. J., 22, 295

PAFEC, 22, 295Parabolic equations, 318Pardue, R. M., 149Park, K. C., 317Pascal triangle, 18, 112Patch test, 26 1—266Penalty, 160—162Plane frame, 225—229Plane stress, 232—245Plane truss, 193—204Plasma, 280—283Poisson equation, 231. 245, 285Poisson's ratio, 232Post-solution calculations, 9, 31, 180,

181, 256, 262Potential flow, 259, 275Pressure, 5, 205, 255

Quadratic elementsline, 116triangle, 113, 305quadrilateral, 107, 259, 305

Quadratic functional 14, 144Quadrilaterial element, 66, 107, 110.

117, 128, 245, 259, 282, 305

Radau quadratures, 101—104

Rank, 105, 106

Razzague, A., 261

Reactions, 156

Reddi, M. M., 205

Reddy, J. N., 2

Reduced integration, 105

Schechter, R. S., 255

Selective integration, 105, 106

Serendipity elements, 107, 112Shaw, K. G., 123

Shear modulus, 232

Silvester, P. P., 126Simplex elements, 77—84Singularity element, 122, 276—279Skyline, 46—49Slider bearing, 205—211Solution techniques, 9, 165—175Stiffness matrix, 7, 51, 232Storage, 21Strain-displacement, 232Stream, 259, 280Stress, 194Stress—strain law, 232Structural analysis, 193, 225, 232Surface tractions, 234System equations, 7, 13, 15, 129—149.

165—175

Taylor, R. L., 22, 46, 170

Temperature, 184, 190, 245. 286

Thermal conductivity, 184, 245, 285Thermal expansion, 194, 204Thermal strain. 194Thickness, 205. 234, 244Topology, 6Transient applications, 317—344Transition elements, 115, 119, 128Triangular elements, 78, 101, 113, 305Truss, 193—203

Unit triangle, 82, 102—104Ural, 0, 232, 233, 239

Valliappan, S., 164Variational form, 2, 14, 281Variable properties, 41, 43Vector potential, 280Velocity, 5, 205, 255, 259

Page 379: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

370 Subject and Author Index

Velocity potential, 259—275Viscosity, 205, 255

Wada, S.. 205Waveguide, 276—279Weaver, W., 225Weighted residual, 3, 7, 212, 217Weights, 94, 101

Whiteman, J. R., 1, 117, 277Wilson, E. L., 46, 95, 117, 170, 232,

317, 331, 333

Wooten, J. W., 281

Wyatt, E. A., 126

Zienkiewicz, 0. C., 22, 102, 105, 127,193, 194, 245, 256, 285, 317

Page 380: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

Subroutine Index

APLYBC, 23, 26, 30, 156, A-356ASYMBL. 23, 26, 131. 134

BANMLT, 195, 202BANSUB, 136BFLUX, 34. 54, 241, 250. 272BTDB, 243BTDIAB, 244

CALPRT, 74, 186CCOUNT, 32, A-362CEQBAN, 30, 163CHANGE, 224CONDSE, 60CONTUR, 177, 179, 247CONVRT, 135CORECT, 26

DCHECK, 68, 72, 127DEGPAR, 34, A-365DERCU, 218DERIV, 29, 76, 87, 128DER2CU, 219DER3T, 113DER4Q, 68, 70, 71, 128, 246DER412, 128DER6T, 113DER8H, 111DER8Q, 108, 110, 259DIRECT, 335, 344

ELBAND, 37, 39, 46ELCOL, 28, 52, 198, 208, 214, 237,

249, 289ELCORD, 28, 38, 41ELFRE, 28, 31,44ELHIGH, 47ELPOST, 28, 53, 186, 188, 198. 209,

237, 257ELPRTY, 28, 41, 43

ELSQ, 28, 52, 186, 188, 197, 207,

213, 219, 227, 235, 248, 260, 287

EULER, 320, 321, 326, 327, 344

FACTOR, 23, 26. 170, 173

FMONE, 287, 292FORCER, 327, 337FOURPT, 311

GAUSCO, 95, 97GAUS2D, 95, 97, 247GDERIV, 29, 70, 73, 75, 246GENELM, 23, 27, 54, 58, 131

IJQUAD, 304IJTRI, 304INCEQ, 26, 32, 35, A-362INDXEL, 27, 31, 44, 49, 129LNDXPT, 43, 49, 129, 155

INEL, 311INFLUX, 26, 34, A-366INPROP, 26, A-363INPTS, 309INPUT, 26, 35, A-361INVDET, 29, 72, 76INVECT, 26, 34, 35, A-365ISOPAR, 76, 282, 28412BY2, 73, 75, 24613BY3, 73

JACOB, 29, 69, 70, 72, 75. 246

LAPL8H, 288LAPL8Q, 261LCONTC, 87LCOUNT, 304, 313LNODES, 27, 31,37,38LPTPRT. 28, 41, 43

MATPRT, 234, 240, 286

371

Page 381: .j1::1 · Finite element concepts 1.1 Introduction The finite element method has become an important and practical numerical analysis tool. It has found application in almost all

372 Subroutine Index

MATWRT, 240MAXMEN, 176, 178MESH2D, 303, 307MMULT, 87, 199, 209, 219, 227, 236,

238, 258MODBAN, 156MODEL, 22, 26, A-355MODFUL, 30, 155, 159MODFY1, 30, 156, 159MODFY2, 156MODFY3, 156MOD2FL, 196MSMULT, 236MTMULT, 227, 236

NGRAND, 29, 76, 284

OMITP, 304, 312

PCOUNT, 304, 312PENLTY, 30, 162PENMOD, 30, 162PLASMA, 282PLOTIJ, 304, 314PLTSET, 273POST, 23, 180, 181POSTEL, 31, 53, 180, 186, 189, 195,

199, 209, 238, 257, 262PTCODE, 32, 38, A-361PTCORD, 41FF1, 26, A-359PT2, 26, A-359PT3, 26, A-360

REVISE, 155

SCHECK, 67. 71, 127SET, 26, A-358SHAPE, 29, 76, 87, 114, 128SHPCU. 218SHP3T, 112SHP4Q, 67, 71, 74, 128, 246SHP4I2, 118, 119SHP6T, 113S1-1P8!-I, 111SHP8Q, 108, 110, 259SINGLR, 122, 125, 276SKYDIA, 46, 48SKYFAC, 170, 174SKYHI, 47SKYSOL, 170, 174SKYSTR, 131, 134SKYSUB, 135SNORMV, 287, 292SOLVE, 23, 26, 170, 173START, 220STORCL, 27, 118, 130. 132STORSQ, 27, 130, 132STRFUL, 130, 133SYSBAN, 26, 37, 46, 155SYMTRI, 127

TRGEOM, 92

VECT2D, 274

WRTELM, 23, 26, 176, 178WRTPT, 23, 26, 176. 177

ZEROA, 26, 29ZERO!, 26