ALADDIN A COMPUTATIONAL

TOOLKIT FOR INTERACTIVE

ENGINEERING AND FINITE

ELEMENT ANALYSIS

Mark Austin Xiaoguang Chen

and WaneJang Lin

Institute for Systems Research

and

Department of Civil Engineering

University of Maryland

College Park MD

Novemb er

Abstract

This rep ort describ es Version of ALADDIN an interactive computational

to olkit for the matrix and nite element analysis of engineering systems The ALADDIN

package is designed around a language sp ecication that includes quantities with physical

units branching constructs and lo oping constructs The basic language functionality is

enhanced with external libraries of matrix and nite element functions

ALADDINs problem solving capabilities are demonstrated via the solution to a

series of matrix and numerical analysis problems ALADDIN is employed in the nite

element analysis of two building structures and two highway bridge structures

Contents

I INTRODUCTION TO ALADDIN

Intro duction to ALADDIN

Problem Statement

ALADDIN Comp onents

Scop e of this Rep ort

II MATRIX LIBRARY

Command Language for Quantity and Matrix Op erations

How to Start and Stop ALADDIN

Format of General Command Language

Physical Quantities

Denition and Printing of Quantities

Formatting of Quantity Output

Quantity Arithmetic

Making a Quantity Dimensionless

Switching Units On and O

Setting Units Typ e to US or SI

Control of Program Flow

Logical Op erations

Conditional Branching

Lo oping and Stopping Commands

Denition and Printing of Matrices

Denition of Small Matrices

Builtin Functions for Allo cation of Matrices

Denition of Matrices with Units

Printing Matrices with Desired Units

MatrixtoQuantity Conversion

Basic Matrix Op erations

Retrieving the Dimensions of a Matrix

Matrix Copy and Matrix Transp ose

Matrix Addition Subtraction and Multiplication

Scaling a Matrix by a Quantity

Euclidean Norm of RowColumn Vectors

Minimum and Maximum Matrix Elements

SubstitutionExtraction of Submatrices

Solution of Linear Matrix Equations

Solving A fxg fbg

Matrix Inverse

Matrix Eigenvalues and Eigenvectors

Solving K M

Numerical Example Buckling of Ro d

Numerical Example Vibration of Cantilever Beam

Construction of Numerical Algorithms

Intro duction

Ro ots of Nonlinear Equations

NewtonRaphson and Secant Algorithms

BroydenFletcherGoldfarbShanno BFGS Algorithm

HanPowell Algorithm for Optimization

Quadratic Programming QP

Armijo Line Search Rule

The BFGS up date and HanPowell metho d

Computational Metho ds for Dynamic Analysis of Structures

Intro duction

Metho d of Newmark Integration

Metho d of Mo dal Analysis

III FINITE ELEMENT LIBRARY

Finite Element Analysis Language

Intro duction

Structure of Finite Element Input Files

Problem Sp ecication Parameters

Adding No des and Finite Elements

Material and Section Prop erties

Boundary Conditions

External No dal Loads

Stiness Mass and External Loading Matrices

Internal Loads

Retrieving Information from ALADDIN

Library of Finite Elements

Input Files for Finite Element Analysis Problems

Linear Static Analyses

Analysis of Five Story Moment Resistant Frame

Working Stress Design WSD of Simplied Bridge

ThreeDimensional Analysis of Highway Bridge

TimeHistory Analyses

Mo dal Analysis of Five Story Steel Frame

IV ARCHITECTURE AND DESIGN

Data Typ es Physical Quantity and Matrix Data Structures

Intro duction

Physical Quantities

Relationship b etween Quantity and Units

US and SI Units Conversion

Matrices

Skyline Matrix Storage

Units Buers for

Units Buers for Inverse Matrix

Architecture and Design of ALADDIN

Intro duction

Program Mo dules and Key Data Structures

Design and Implementation of Stack Machine

Example of Machine Stack Execution

Language Design and Implementation

V CONCLUSIONS AND FUTURE WORK

Conclusions and Future Work

Conclusions

Future Work

Part I

INTRODUCTION TO ALADDIN

Chapter

Intro duction to ALADDIN

Problem Statement

This rep ort describ es the development and capabilities of ALADDIN Version

an interactive computational to olkit for the matrix and nite element analysis

of engineering systems The current target application area for ALADDIN is design

and analysis of traditional Civil Engineering structures such as highway bridges and

earthquakeresistant buildings With literally hundreds of engineering analysis and opti

mization computer programs having b een written in the past years see references

for some examples a reader might rightfully ask who needs

to write another engineering analysis package

We resp ond to this challenge and motivate the short and longterm goals of this

work by rst noting that during the past two decades computers have b een providing

approximately more p ower p er dollar p er year Advances in computer hardware and

software have allowed for the exploration of many new ideas and have b een a key catalyst

in what has led to the maturing of computing as a discipline In the s computers

were viewed primarly as machines for research engineers and scientists compared to to

days standards computer memory was very exp ensive and central pro cessing units were

slow Early versions of structural analysis and nite element computer programs such

as ABAQUS ANSR and FEAP were written in the FORTRAN computer

language and were develop ed with the goal of optimizing numerical andor instructional

considerations alone These programs oered a restricted but well implemented set

of numerical pro cedures for static structural analyses and linearnonlinear timehistory

resp onse calculations And even though these early computer programs were not partic

ularly easy to use practising engineers gradually adopted them b ecause they allowed for

the analysis of new structural systems in a ways that were previously intractable

During the past twenty years the use of computers in engineering has matured to

the p oint where imp ortance is now placed on ease of use and a widearray of services b e

ing made available to the engineering profession as a whole Computer programs written

for engineering computations are exp ected to b e fast and accurate exible reliable and

of course easy to use Whereas an engineer in the s might have b een satised by a

computer program that provided numerical solutions to a very sp ecic engineering prob

lem the same engineer to day might require the engineering analysis plus computational

supp ort for design co de checking optimization interactive computer graphics network

connectivity and so forth Many of the latter features are not a b ottleneck for getting

the job done Rather features such as interactive computer graphics simply make the job

of describing a problem and interpreting results easier the pathway from easeofuse to

pro ductivity gains is well dened It is also well worth noting that computers once viewed

as a to ol for computation alone are now seen as an indisp ensable to ol for computation

and communications In fact the merging of computation and communications is mak

ing fundamental changes to the way an engineer conducts hisher daytoday business

activities Consider for example an engineer who has access to a high sp eed p ersonal

computer with multimedia interfaces and global network connectivity and who happ ens

to b e part of a geographically disp ersed development team The team memb ers can use

the InternetEmail for daytoday communications to conduct engineering analyses at

remote sites and to share designanalysis results among the team memb ers Clear com

munication of engineering information among the team memb ers may b e of paramount

imp ortance in determining the smo oth development of a pro ject

The diculty in followingup on the ab ovementioned hardware advances with

appropriate software developments is clearly reected in the economic costs of pro ject

development In the early s software consumed approximately of total costs

and hardware of total costs for development of data intensive systems Nowadays

development and maintenance of software typically consumes more than of the total

pro ject costs This change in economics is the combined result of falling hardware costs

and increased software development budgets needed to implement systems that are much

more complex than they used to b e Whereas one or two programmers might have writ

ten a complete program twenty years ago to days problems are so complex that teams

of programmers are needed to understand a problem and llin the details of required

development

When a computer program has a p o orly designed architecture its integration

with another package can b e very dicult with the result often falling short of users

exp ectations Lets supp ose for example that we wanted to interface the nite element

package FEAP with the interactive optimizationbased design environment called

DELIGHT Since FEAP was not written with interfaces to external envi

ronments as a design criterion a programmers faced with this task would rst need to

gure out how FEAP and DELIGHT work not an easy task and then devise a map

ping from DELIGHTs external interface routines to FEAPs subroutines In the rst

writers opinion such a mapping is likely to exist but only after several subroutines have

b een added to FEAP The programmers would need the computer skills and tenacity

to stickwith the lengthy p erio d of co de development that would ensue And what ab out

the result In our exp erience the integrated DELIGHTFEAP to ol would most

likely do a very go o d job of solving a narrow range of problems and as such have a

short life cycle These barriers to integration are frustrating b ecause nite element and

optimization pro cedures are essentially sp ecialized matrix computations the disciplines

should t together in almost a seamless way In our opinion the main barrier to software

integration is an adho c approach to software to ol development in the rst place

Rather than simply rep eat the scenario pro cedure for yet another set of pack

ages this research pro ject attempts to understand the structure matrix nite element

and optimization packages should take so that they can b e integrated in a natural way

Pro ject ALADDIN b egins with the design and implementation of a system sp ecication

that includes

A Model The mo del will include data structures for the information to b e stored

and a stack machine for the execution of the matrix and nite element algorithms

A Language The language will b e a means for describing the matrices and nite

element mesh it will act as the user interface to the underlying mo del

In traditional approaches to problem solving engineers write the details of a problem

and its solution pro cedure on pap er They use physical units to add clarity to the

problem description and may sp ecify stepbystep details for a numerical solution

to the problem We would like the ALADDIN language to b e textually descriptive

and strike a balance b etween simplicity and extensibility It should use a small

numb er of data typ es and control structures incorp orate physical units and yet b e

descriptive enough so that the pencil and paper and ALADDIN problem description

les are almost the same

Defined Steps and Ordering of the Steps The steps will dene the transfor

mations eg nearly all engineering pro cesses will require iteration and branching

that can b e carried out on system comp onents

Guidance for Applying the Specification Guidance includes factors such as

descriptive problem description les and do cumentation

Our research direction is inspired in part by the systems integration metho ds develop ed

for the Europ ean ESPRIT Pro ject and by the success of C Although the C program

ming language has only keywords and a handful of control structures its judicious

combination with external libraries has resulted in the language b eing used in a very wide

range of applications

ALADDIN Comp onents

Figure is a schematic of the ALADDIN Version architecture and shows

its three main parts the kernel libraries of matrix and nite element functions

and the input les

Sp ecic engineering problems are dened in ALADDIN problem description les

and solved using comp onents of ALADDIN that are part interpreterbased and part ALADDIN'S KERNEL

[ STACK MACHINE ] MATRIX LIBRARY

INPUT FILE

FINITE ELEMENT LIBRARY Block of Input Statements

Block of Input Statements

LIBRARIES OF BUILTIN C FUNCTIONS Block of Input Statements

ALADDIN KERNEL AND INPUT FILES

Figure High Level Comp onents in ALADDIN Version

compiled C co de It is imp ortant to keep in mind that as the sp eed of CPU pro cessors

increases the time needed to prepare a problem description increases relative to the

total time needed to work through an engineering analysis Hence clarity of an input

les contents is of paramount imp ortance In the design of the ALADDIN language we

attempt to achieve these goals with lib eral use of comment statements as with the

C programming language comments are inserted b etween consistent

use of function names and function arguments use of physical units in the problem

description and consistent use of variables matrices and structures to control the

ow of program logic

ALADDIN problem descriptions and their solution algorithms are a comp osition

of three elements data control and functions

Data ALADDIN supp orts three data typ es character string for variable names

physical quantities and matrices of physical quantities for engineering data For example

the script of co de

xCoord m

xVelociy m sec

denes two physical quantities xCoord as meters and xVelocity as meters p er

second Floating p oint numb ers are stored with double accuracy and are viewed

as physical quantities without units There are no integer data typ es in ALADDIN

Control Control is the basic mechanisms in a programming language for the sp ec

ication of lo oping constructs and conditional branching S1

TRUE

ENTRY EXIT ENTRY FALSE EXIT EXPR S1 EXPR

FALSE TRUE S2

BRANCHING CONSTRUCTS LOOPING CONSTRUCTS

Figure Branching and Lo oping Constructs in ALADDIN

In Chapter we will see that ALADDIN supp orts the while and for lo oping constructs

and the if and ifthenelse branching constructs The data and control comp onents

of the ALADDIN language are implemented as a nitestate stack machine mo del which

follows in the spirit of work presented by Kernighan and Pike ALADDINs stack

machine reads blo cks of command statements from either a problem description le or the

keyb oard and converts them into an array of machine instructions The stack machine

then executes the statements

Functions The functional comp onents of ALADDIN provide hierarchy to the so

lution of our matrix and nite element pro cesses and are lo cated in libraries of compiled

C co de as shown on the righthand side of Figure Version of ALADDIN has

functional supp ort for basic matrix op erations that includes numerical solutions to linear

equations and the symmetric eigenvalue problem A library of nite element functions is

provided

Input FUNCTION Output

RETURN TYPE = FUNCTION NAME ( Arg 1 , Arg 2 , ...... , Arg N );

Output Input

Figure Schematic of Functions in ALADDIN

Figure shows the general comp onents of a function call its input argument list and

the function return typ e A key ob jective in the language design is to devise families of

library functions that will make ALADDINs problem solving ability as wide as p ossible

Version of ALADDIN do es not supp ort userdened functions in the inputle

or keyb oard command language

The strategy we have followed in ALADDINs development is to keep the numb er

and typ e of arguments employed in library function calls small Whenever p ossible the

functions return typ e and arguments should b e of the same data typ e thereby allowing

the output from one or more functions to act as the input to following function call More

precisely we would like to write input co de that takes the form

returntype Function application area

returntype Function application area

returntype Function returntype returntype application area

or even

returntype Function Function Function

If Function and Function b elong to application area eg matrix analysis and

Function b elongs to application area eg nite element analysis optimization

then this language structure allows application areas and to b e combined in a natural

way In Chapters to we will see that most of the builtin functions accept one or two

matrix arguments and return one matrix argument Occasionally we will see builtin

function that have more than two function arguments and return a quantity instead of

a matrix Collections of quantities are returned from functions by bundling them into a

single matrix the individual quantities are then extracted as elements of the function

return typ e

Factor Interpreted Co de Compiled Co de

User Control High Very Low

Required User Knowledge High Medium

Sp eed of Execution Slow Fast

Table TradeOs Interpreted Co de Versus Compiled Co de

Table contains a summary of tradeos b etween the use of interpreted co de versus

compiled C co de A key advantage of interpreters is exibility problem parameters

and algorithms may b e mo died during the problem solving pro cess and without having

to recompile source co de This feature reduces the time needed to work through an

interation of the problem solving pro cess The well known tradeo is sp eed of execution

Interpreted co de executes much slower approximately ten times slower than compiled

C co de Consequently we exp ect that as ALADDIN evolves new algorithms will b e

develop ed in tested as interpreted co de and once working will b e converted into libraries

of compiled C co de having an interface that tsin with the remaining library functions

Scop e of this Rep ort

This rep ort is divided into four parts In Part II we will see that the ALADDIN

language supp orts variable arithmetic with physical units matrix op erations with units

and lo oping and branching control structures where decisions are made with quantities

having physical units Chapters and demonstrate use of the ALADDIN language via

a suite of problems we compute the ro ots of nonlinear equations demonstrate the Han

Powell metho d of optimization and solve several problems from structural engineering

and structural dynamics

Part III of this rep ort describ es the builtin functions for the generation of nite el

ement meshes external loads and nite element mo deling assumptions We demonstrate

these features by solving a variety two and threedimensional nite element problems

We have written Part IV for ALADDIN develop ers who may need to understand

the data structures and algorithms used to read and store matrices to create and store

nite element meshes and to construct the stack machine Readers of this section are

assumed to have a go o d working knowledge of the C programming language

Part II

MATRIX LIBRARY

Chapter

Command Language for Quantity

and Matrix Op erations

The purp oses of this chapter are to explain execution of the ALADDIN envi

ronment and details of the matrix command language within ALADDIN For ease of

reading and when space p ermits output from ALADDIN is juxtap osed with the input

commands

How to Start and Stop ALADDIN

ALADDINs command line arguments are setup in a very exible way The rst

argument is simply ALADDIN the name of the executable program

Input from Keyb oard

ALADDIN ks

Input from a File

ALADDIN sf filename

Command options have the following meaning

f Indicate input from a le it must b e accompanied by a lename

k Indicates input from the keyb oard When input is generated via the keyb oard a

input history le will b e generated and named as inputlestd In the likely event

of mistyping or a syntax error you can continue typ e in inputlestd

s All input will b e scanned for syntax errors without actually executing the program

The command ALADDIN must b e accompanied by either the f ag or the k ag The

s ag is optional Command line options can b e typ ed in arbitrary sequences

The command to exit from ALADDIN is

quit

Dont forget the semicolon

Format of General Command Language

The ALADDIN command language corresp onds to individual statements and

sequences of statements

statement

statement

statement N

Each statement ends with a semicolon Comment statements as with the C pro

gramming language comments are enclosed b etween as in

Here is a block of N statements

statement the first ALADDIN statement

statement the second ALADDIN statement

statement N the nth ALADDIN statement

Basic output of character strings and physical quantities is handled with the print com

mand For example

print Here is one line of output n

gives

Here is one line of output

Character strings are enclosed within quotes ie The escap e character nn

forces output onto a new line

Physical Quantities

While the imp ortance of the engineering units is well known physical

units are not a standard part of many mainstream nite element software packages

indeed most engineering software packages simply hold the engineer resp onsible for mak

ing sure engineering units are consistent While this practice of implementation may b e

satisfactory for computation of well established algorithms it is almost certain to lead

to incorrect results when engineers are working on the development of new and innova

tive computations ALADDIN deviates from this trend by providing supp ort for basic

arithmetic op erations on quantities and matrices of physical quantities

Denition and Printing of Quantities

Lets b egin with the basics A quantity is a numb er with physical units To assign

the quantity m to variable x just typ e

x m

The semicolon character is required for every command to indicate the end of the

one statement The following script of co de demonstrates denition of quantities

INPUT OUTPUT

print LENGTH UNITS SI SYSTEM n LENGTH UNITS SI SYSTEM

x mm y cm z dm

u m v km

print x x n x mm

print y y n y cm

print z z n z dm

print u u n u m

print v v n v km

print n VOLUME UNITS US n VOLUME UNITS US

x gallon y barrel

print x x n x gallon

print y y n y barrel

print n MASS UNITS SI SYSTEM n MASS UNITS SI SYSTEM

x g y kg z Mg

print x x n x g

print y y n y kg

print z z n z Mg

print TIME UNITS SI SYSTEM n TIME UNITS SI SYSTEM

x sec y ms

z min u hr

print x x n x sec

print y y n y ms

print z z n z min

print u u n u hr

print n TEMPERATURE UNITS SI SYSTEM n TEMPERATURE UNITS SI SYSTEM

x degC

print x x n x degC

print n TEMPERATURE UNITS US SYSTEM n TEMPERATURE UNITS US SYSTEM

x degF

print x x n x degF

print n UNITS OF FREQUENCY SPEED n UNITS OF FREQUENCY SPEED

x Hz

y rpm rev per min

z cps cycle per sec

print x x n x Hz

print y y n y rpm

print z z n z cps

print n FORCE UNITS SI SYSTEM n FORCE UNITS SI SYSTEM

x N y kN z kgf

print x x n x N

print y y n y kN

print z z n z kgf

print n PRESSURE UNITS SI SYSTEM n PRESSURE UNITS SI SYSTEM

x Pa y kPa

z MPa u GPa

print x x n x Pa

print y y n y kPa

print z z n z MPa

print u u n u GPa

print n ENERGY UNITS SI SYSTEM n ENERGY UNITS SI SYSTEM

x Jou y kJ

print x x n x Jou

print y y n y kJ

print n POWER UNITS SI n POWER UNITS SI

x Watt y kW

print x x n x Watt

print y y n y kW

print n UNITS OF PLANE ANGLE UNITS n UNITS OF PLANE ANGLE UNITS

x deg y rad

print x x n x deg

print y y n y rad

These examples fo cus on the SI system of units In the US system units of length are

in inches in feet ft yards yard and miles provided for micro inches micro

mile Similarly US units of mass are provided for p ounds lb grains grain kilo

p ounds klb and tons ton Units of force in the US system are p ounds force lbf

and one thousand p ounds force kips Corresp onding units of pressure in the US system

are p ounds p er square inch psi and thousands of p ounds p er square inch ksi

Restrictions on Quantity Names Like many other programming languages the

ALADDIN command language has keywords and constants which are reserved for sp ecial

purp oses they cannot b e used for arbitrary purp oses such as variable names For

example ALADDIN reserves the characters N and m for engineering units Newton

and metre Similar restrictions apply to all units keywords dening lo oping and control

constructs eg for and while as well as builtin function names

A complete list of keywords and constants is given in Table Table

contains a list of names that are reserved for mathematical functions Reserved names

for matrix allo cation functions and functions to compute matrix op erations are given in

Tables and resp ectively Reserved names also apply to names of functions for

solving linear equations eigenvalues and eigenvectors as well as nite element analysis

These names are listed in Tables and in the text of Chapter

Formatting of Quantity Output

The command option units allows for the printing of a quantity with

a desired units The following script of co de gives some examples

INPUT OUTPUT

print LENGTH UNITS n LENGTH UNITS

v km w mile

print v v n v km

print v v in n v e in

print v v ft n v ft

print v v yard n v yard

print v v mile n v mile

print w w n w mile

print w w mm n w e mm

print w w cm n w e cm

print w w dm n w e dm

print w w m n w m

print w w km n w km

print n VOLUME UNITS n VOLUME UNITS

x gallon

print x x n x gallon

print x x m n x m

print x x ft n x ft

print x x cm n x cm

print x x in n x in

print x x barrel n x barrel

print n TEMPERATURE UNITS ni TEMPERATURE UNITS

x degC U mmDEGC

y degF V inDEGF

print x x n x degC

print x x degF n x degF

print y y n y degF

print y y degC n y degC

print U U n U mmDEGC

print V V n V inDEGF

print n

print U DEGC U DEGC mm n U DEGC mm

print U DEGF U DEGF mm n U DEGF mm

print V DEGC V DEGC in n V DEGC in

print V DEGF V DEGF in n V DEGF in

print TIME UNITS n TIME UNITS

x hr

print x x n x hr

print x x min n x min

print x x sec n x sec

print n UNITS OF FREQUENCY SPEED n UNITS OF FREQUENCY SPEED

y rpm rev per min

print y y n y rpm

print y y Hz n y Hz

print y y cps n y cps

print n PLANE ANGLE UNITS n PLANE ANGLE UNITS

x deg y PI

print x x n x deg

print x x rad n x rad

print y y n y e

print y y deg n y deg

Similar conversion factors exist for units of mass force pressure energy and p ower

Quantity Arithmetic

Physical units may b e manipulated with basic multiply division and p ower op er

ations The following script of co de demonstrates the range of arithmetic op erations that

are p ossible

INPUT OUTPUT

x g y kg z m

print nADDITION SUBTRACTION n ADDITION SUBTRACTION

print x y x y n x y kg

print x y x y n x y kg

print n MULTIPLY n MULTIPLY

print x y x y n x y gkg

print x z x z n x z gm

print n DIVISION n DIVISION

print x y x y n x y e

print x z x z n x z gm

print z z n z m

print z z n z m

print xy xyn xy gkg

print zxy zxyn zxy mgkg

print xyz xyzn xyz gkgm

print n MATH CALCULATIONS n MATH CALCULATIONS

u deg

v PI

w

print sinu sinu n sinu e

print sinv sinv n sinv e

print cosu cosu n cosu e

print cosv cosv n cosv e

print tanPI tanPI n tanPI e

print atan atan n atan e

print abs m abs m n abs m m

print absv absv n absv e

print logE logE n logE e

print logE logEn logE e

print expw expw n expw e

We use the print command and the character string nn containing the newline to

print physical quantities and statements Characters inside the equation marks are

considered statements Arguments to mathematical functions such as log and exp

take dimensionless quantities Trigonometric functions can however take arguments with

the units degree and radian b ecause the latter are nondimensional

Power op erations on quantities do not work in quite the same way as the basic

add subtract multiply and divide op erations on quantities If quantity and quantity

are physical quantities then the op eration

quantity quantity

is dened for dimensionless quantity and quantity and cases where one of the two

op erands but not b oth op erands has units Unlike the basic arithmetic op erations

which are evaluated lefttoright expressions involving p ower op erations are evaluated

from righttoleft Here are some examples

INPUT OUTPUT

print n POWER n POWER

print n

print m m n m m

print m m n m m

print m m n m m

print Nm Nm n Nm e Nm

print Nm Nm n Nm e Nm

print m m n m m

print m m n m m

print m m n m m

print m m n m m

print m m n m m

print m m n m m

x kg z m

print sqrt kg sqrtx n sqrt kg kg

print z z n z m

print z z n z m

print xz xz n xz mkg

print xz xz n xz e mkg

As mentioned ab ove p ower op erations such as

x m sec

are illegal and will cause ALADDIN to terminate its execution

An imp ortant feature of quantity op erations is the check for consistent units

Supp ose for example we try to add a quantity with time units to a second quantity

having units of length ALADDIN provides an appropriate fatal error message

x in y sec

z x y

FATAL ERROR In Add Inconsistent Dimensions

FATAL ERROR Compilation Aborted

followed by the termination of program execution

Making a Quantity Dimensionless

In the development of algorithms to solve engineering problems we will sometimes

need to strip or remove the units from a physical quantity and work with the numer

ical value alone The builtin function QDimenLess removes units from quantities as

demonstrated in the following script of co de

INPUT OUTPUT

print n MAKE A QUANTITY DIMENSIONLESS n MAKE A QUANTITY DIMENSIONLESS

x N y cmsec

z QDimenLessx u QDimenLessy

print x with dimen x n x with dimen N

print y with dimen y n y with dimen msec

print x without dimen z n x without dimen e

print y without dimen u n y without dimen e

Setting Units Typ e to US or SI

The default units typ e is SI The function SetUnitsTypestring where

string equals SI or US sets the units to SI or US resp ectively

You should call SetUnitsType b efore the nite element displacements and

stresses are printed ie using PrintDispl and PrintStress

Switching Units On and O

The command SetUnitsOn turns the checking of units on and the command

SetUnitsOff turns the checking of units o The default units option is SetUnitsOn

Category List of Reserved Names

Constants DEG E GAMMA

and PI

Keywords break else for if print quit read return SetUnitsOn

SetUnitsO then while

SI Units micron mm cm dm m km g kg mg N kN kgf Pa

kPa MPa GPa deg C DEG C Jou kJ Watt kW Hz

rpm cps

US Units in ft yard mile mil micro in lb klb ton grain lbf

kips psi ksi deg F DEG F gallon barrel sec ms min

hr deg rad

Table List of ALADDIN Keywords and Constants

NameArgument Purp ose of Function

cosx Compute cosine of quantity x Default units are radians

sinx Compute sin of quantity x Default units are radians

tanx Compute tangent of quantity x Default units are radians

absx Return absolute value of quantity x

expx Compute exp onential of quantity x

integerx Return integer comp onent of quantity x

logx Compute natural logarithm of quantity x

logx Compute logarithm base of quantity x

p owxn Compute quantity x raised to the p ower n n is a numb er

sqrtx Compute square ro ot of quantity x

Table List of Mathematical Functions

Control of Program Flow

In ALADDIN control of program ow is accomplished with logic op erations on

physical quantities constructs for conditional branching and lo oping constructs

S1

TRUE

ENTRY EXIT ENTRY FALSE EXIT EXPR S1 EXPR

FALSE TRUE S2

BRANCHING CONSTRUCTS LOOPING CONSTRUCTS

Figure Branching and Lo oping Constructs in ALADDIN

Figure is a schematic of branching and lo oping constructs ALADDIN supp orts the

while and for lo oping constructs and if and ifthenelse branching constructs

Logical Op erations

ALADDIN supp orts three logical op erators on quantities means logical and

means logical not and k means logical or Op erators for conditional branching include

means greater than means less than means greater than or equal to means

less thano or equal to means identically equal to Examples of their use are disp ersed

throughout the following scripts of co de

INPUT OUTPUT

X m X m

print n TEST RELATIONAL OPERATIONS n TEST RELATIONAL OPERATIONS

Y X X Y X X

print Y Y FALSE n Y e FALSE

print Y Y TRUE n Y e TRUE

Y X X Y X X

print Y Y FALSE n Y e FALSE

print Y Y TRUE n Y e TRUE

Y X X Y X X

print Y Y FALSE n Y e FALSE

print Y Y TRUE n Y e TRUE

print n TEST LOGICAL ANDOR n TEST LOGICAL ANDOR

Y X m X m

Y X m X m

Y X m X m

Y X m X m

print Y Y FALSE n Y e FALSE

print Y Y FALSE n Y e FALSE

print Y Y TRUE n Y e TRUE

print Y Y FALSE n Y e FALSE

Y X m X m

Y X m X m

Y X m X m

Y X m X m

print Y Y TRUE n Y e TRUE

print Y Y TRUE n Y e TRUE

print Y Y TRUE n Y e TRUE

print Y Y FALSE n Y e FALSE

Conditional Branching

The if and ifthenelse constructs allow for conditional branching of program

ow The command syntax is

ifstatement If the statements is true then execute statements

statements

Skip statements if statement is false

and

ifstatement then If the statement is true then execute statements

statements

else

statements If the statement is false then execute statements

with the braces f and g necessary even if statements consists of a single statement

Here are two examples

INPUT OUTPUT

print n if condition n if condition

x ksi x ksi

if x ksi

print x x n

print n ifelse condition n ifelse condition

x ksi y MPa

if x ksi then

print x x n

else

print y y n y MPa

Lo oping and Stopping Commands

ALADDIN supp orts two lo oping constructs the whilelo op and the forlo op The

whilelo op syntax is

while statement

statments If statement is true execute

statements else stop looping

If statement is true ie evaluates to a constant larger than zero then the b o dy

of the whilelo op ie statements will b e executed Otherwise the program will stop

lo oping and continue onto the next command As we will see in the scripts of co de

b elow statement can b e a single statement condition or multiple conditions connected

through logic op erators

The forlo op syntax is

for initializer condition increment

statements

The initializer condition and increment statements can b e either a series of quan

tity statements separated by comma ie or an empty statment Zero or more state

ments may b e lo cated in the forlo op b o dy

The command for breaking one layer of lo opings is break and it must b e used

inside the lo oping b o dy b ounded by the symb ol f and g The quit statement termi

nates program execution it can b e used anywhere outside the lo ops

While Lo op with One Layer The examples of input commands for onelayer while

lo op with dierent conditions are given b elow

INPUT OUTPUT

print n Single Condition n Single Condition

X m X m

while X m X m

print X X n X m

X X m X m

X m

print n Multiple Conditions n Multiple Conditions

Y in X Y m in

X m X Y m in

while X m Y ft X Y m in

print X Y XYn X Y m in

X X m X Y m in

Y Y in

print n Empty Condition n Empty Condition

X m X m

while X m

ifX m X m

break X m

X m

print X X n

X X m

While Lo ops with Multiple Layers The examples of input commands for multi

layers whilelo op are given b elow

INPUT OUTPUT

print n Multiple Layers n Multiple Layers

X m X Y m in

while X m X Y m in

Y in X Y m in

print n X Y m in

whileY ft X Y m in

print X Y XYn X Y m in

Y Y in

X X m

print n Break inside Multilayer While n Break inside Multilayer While

X m X Y m in

while X m X Y m in

ifX m then X Y m in

else break X Y m in

Y in X Y m in

print n X Y m in

whileY ft X Y m in

ifY in

break

print X Y XYn

Y Y in

X X m

For Lo ops with One Layer The examples of input commands for onelayer forlo op

with dierent conditions are given b elow

INPUT OUTPUT

print n Empty Initializern Empty Initializer

x m x m

for x m x x m x m

print x x n x m

x m

x m

print n Empty Increment n Empty Increment

forx m x m x m

print x x n x m

x x m x m

x m

x m

print n Empty Conditionn Empty Condition

forx m x x m x m

ifx m x m

break x m

x m

print x x n x m

print n Empty Increment and Conditionn Empty Increment and Condition

x m x m

for x m

ifx m x m

break x m

x m

print x x n

x x m

print n Single Condition n Single Condition

forx m x m x x m x m

print x x n x m

x m

x m

x m

print n Multiple Conditions n Multiple Conditions

x m xyz m in yard

y in xyz m in yard

z yard xyz m in yard

xyz m in yard

forx m y in z yard x m xyz m in yard

y ft z mile x x m

y y in z z yard

print xyz x y zn

The lo oping constructs for and while may b e nested examples are lo cated in Chapter

and in the numerical and nite element algorithms develop ed for Part of this rep ort

Denition and Printing of Matrices

The ALADDIN command language supp orts interactive denition of matrices

their allo cation to variable names and matrix op erations Matrix elements may b e dened

with physical units

There are two basic mechanisms for dening a matrix a build the matrix directly

from an input command and b make use of builtin matrix allo cation functions

Denition of Small Matrices

The following input commands demonstrate the interactive denition and printing

of small matrices

X

Y

Z

PrintMatrixX

PrintMatrixYZ

X Y and Z are and matrices resp ectively We use square brackets

ie and to indicate the b eginning and end of a matrix denition Individual

elements of a matrix are separated by commas and may b e lo cated on one or more lines

of input The elements of a matrix are dened rowwise with a semicolon p ositioned

inside the brackets separating matrix rows Each row of the matrix must have the same

numb er of columns

PrintMatrix prints the contents of a matrix to standard output ie the

computer screen With matrix X dened ab ove PrintMatrixX gives

MATRIX X

rowcol

units

e e e

Notice that a blank row and blank column are available for the printing of units we

will describ e this feature in the next subsection PrintMatrix accepts from one to ve

matrix arguments So for example the single command PrintMatrixY Z generates

MATRIX Y

rowcol

units

e

e

e

MATRIX Z

rowcol

units

e e

e e

The same output would b e generated by the command sequence

PrintMatrixY PrintMatrixZ

Builtin Functions for Allo cation of Matrices

The interactive denition of matrices can b e a errorprone pro cess that b ecomes

progressively tedious with increasing matrix size In situations where numerical and

nite element analysis problems generate matrices with hundreds sometimes thousands

of rows and columns the interactive denition of matrices is simply impractical To

Matrix Purp ose of Function

Matrixs t Allo cate s t matrix

PrintMatrixA B Print matrices A B and so on

ColumnUnitsA u Assign column units u to matrix A for complete details

see the text

RowUnitsA u Assign row units u to matrix A for complete details see

the text

Diags n Allo cate s s with n along diagonal

Ones t Allo cate s t matrix full of ones

Ones Allo cate s s matrix full of ones

Zeros Allo cate s s matrix full of zeros

Zeros t Allo cate s t matrix full of zeros

Table Functions for Denition and Printing of Matrices

mitigate these limitations ALADDIN provides a family of functions to generate matrices

commonly used in numerical and nite element analyses

Table contains a summary of functions and their arguments for the denition

of matrices we will describ e the nite element functions in Part of this rep ort The

following script of commented input co de demonstrates and explains use of these functions

START OF INPUT FILE

a Allocate a by matrix

W Matrix

b Allocate a by matrix full of zeros

X Zero

c Allocate a by matrix full of zeros

X Zero

Y Zero

d Allocate a matrix full of zeros the size is same of W

X ZeroDimensionW

e Allocate a by matrix full of ones

Y One

X One

f Allocate a by diagonal matrix with along diagonal

and a by

X Diag

Y Diag

Denition of Matrices with Units

Recall from Chapter that matrix units are stored in row units and column

units buers The denition of matrices with units falls into two classes and we will

demonstrate each by example

Row and Column Vectors Example commands for matrices that are either row or

column vectors are

X kN Pa m

Y kN Pa m

Z lbfft m psiin

where the X Y are x x matrices The elements of X are X kN X

Pa and X m The matrix Y is simply the transp ose of matrix X Matrix

Z is a x matrix that consists of units alone Its elements are Z lbfft

Z m and Z psiin lbf

General Matrices For general matrices units are written to units buer with the

builtin functions ColumnUnits and RowUnits ColumnUnits writes a column

units buer into a matrix RowUnits writes a row units buer ColumnUnits and

RowUnits b oth accept either two or three arguments The rst argument is name of

the matrix that units will b e assigned to The second argument is a n units vector

The third argument is a matrix containing the column numb er or row numb er

units will b e assigned to In summary the syntax is

W ColumnUnitsM unitsvector

W RowUnitsM unitsvector

W ColumnUnitsM unitsvector number

W RowUnitsM unitsvector number

Example of ColumnUnits Let X b e a nondimensional matrix full of ones

p ossibly generated with the command X One The command

X ColumnUnitsX kN

will assign the units kN to every element of the column units buer in X All of the elements

of X will now have units kN Two alternative ways of achieving the same result are

X ColumnUnitsX kN kN kN kN

and

X ColumnUnitsX kN

X ColumnUnitsX kN

X ColumnUnitsX kN

X ColumnUnitsX kN

where the command X ColumnUnitsX kN assigns units kN to the rst ele

ment of the column units buer in X It is imp ortant to note our careful choice of the words

assign when sp ecic row or column numb ers are omitted units assignment takes place

in all of those rows or columns that match the units exp onents Supp ose for example

that we generate X with the following sequence of statements

X One

X ColumnUnitsX ton

X ColumnUnitsX mile

X ColumnUnitsX klb

X ColumnUnitsX ft

Y ColumnUnitsX in lb

The command X One generates a matrix full of ones and assigns the

result to variable X Rep eated use of ColumnUnits assigns to columns of X

units ton mile klb and ft Put another way columns and have units of mass and

columns and units of length Columns and are dimensionless The details of X

are

MATRIX X

rowcol

units ton mile klb

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

rowcol

units ft

e

e

e

e

e

e

In the new matrix Y the ton and klb are replaced with unit lb so are the corresp onding

value of the elements and miles and ft are replaced with in The details of Y are

MATRIX Y

rowcol

units lb in lb

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

rowcol

units in

e

e

e

e

e

e

Printing Matrices with Desired Units

The function PrintMatrixCast prints a single matrix or p erhaps a family of

matrices with desired units The syntax for using PrintMatrixCast is

PrintMatrixCast matrix unitsm

PrintMatrixCast matrix matrix unitsm

m where matrix matrix and so on are names of matrices to b e printed and units

is a vector matrix containing the desired units PrintMatrixCast accepts from one to

four arguments

Example Supp ose that matrices X and Y are generated as follows

X One

Y

X ColumnUnitsX psi

X ColumnUnitsX kN

X ColumnUnitsX km

X RowUnitsX psi N mm

Y ColumnUnitsY psi

Y RowUnitsYin

The details of matrices X and Y are

MATRIX X

rowcol

units psi kN km

psi e e e e

N e e e e

mm e e e e

MATRIX Y

rowcol

units psi psi

in e e

in e e

Supp ose that we now want to print X and Y but with appropriate column units of pressure

and length rescaled to ksi and mm The command PrintMatrixCastX Y ksi mm

generates the output

MATRIX X

rowcol

units ksi kN mm

psi e e e e

N e e e e

mm e e e e

MATRIX Y

rowcol

units ksi ksi

in e e

in e e

Row buer units may also b e rescaled For example the command PrintMatrixCastX

Y ksi mm rescales the pressure and length units in appropriate rows to ksi and

mm and generates the output

MATRIX X

rowcol

units psi kN km

ksi e e e e

N e e e e

mm e e e e

MATRIX Y

rowcol

units psi psi

mm e e

mm e e

MatrixtoQuantity Conversion

Let X b e a matrix and s and t b e p ositive integers The command Y Xst

extracts matrix element Xst from X and assigns the quantity to variable Y An

equivalent command for matrices X is Y QuanCastX We demonstrate use of

QuanCast in the following script of co de

INPUT OUTPUT

a Define x matrix

X kPa

b Print element of X

print Y QuanCastX n Y kPa

print Y X n Y kPa

Basic Matrix Op erations

Retrieving the Dimensions of a Matrix

In the development of many numerical algorithms for engineering computations

there is often a need to extract the dimensions of a particular matrix The numb er of rows

and columns in a matrix may determine for example how many iterations of an algorithm

will b e computed In ALADDIN the function Dimension X extracts the numb er of

rows and columns for matrix X and returns the result in a matrix Elements

and of the matrix returned by Dimension contain the numb er of rows

and columns in X resp ectively

INPUT OUTPUT

a Generate by matrix called Z

Z One

b Extract and print dimensions of Z

size DimensionZ

print nn

print Rows in Z size n Rows in Z e

print Columns in Z size n Columns in Z e

Matrix Copy and Matrix Transp ose

The functions Copy and Transpose compute resp ectively a matrix copy and

the matrix transp ose Both functions accept a single matrix argument Examples of their

use are lo cated in the next subsection

Matrix Addition Subtraction and Multiplication

Op erations for basic matrix arithmetic include assignment addition subtraction

copying a matrix and computing the matrix transp ose and inverse Here are some exam

ples

START OF INPUT FILE

a define matrix A use matrix copy and matrix transpose functions

A kN Pa cm

B CopyA

C TransA

b define and print matrices X and Y with units

X Diag

Y One

X ColumnUnitsX ksi ft N m

Y ColumnUnitsY psi in kNkm

X RowUnitsX psi in kN mm

Y RowUnitsY ksi ft N mm

PrintMatrixX Y

c compute matrix addition and subtraction and print results

Z X Y U X Y

PrintMatrixZ U

Matrices X and Y are

MATRIX X

rowcol

units ksi ft N m

psi e e e e

in e e e e

kN e e e e

mm e e e e

MATRIX Y

NameArgument Purp ose of Function

CopyA Make a copy of matrix A

DimensionA Retrieve the size or dimensions of matrix A the result

is a x matrix

ExtractAXst Extract a submatrix of size A from matrix X starting at

corner st

LNormA Compute L Euclidean norm of row or column vector

2

A

PutXAst Put a p x q matrix A into matrix X starting at corner

st The contents of matrix X b ounded by the row and

column numb ers st and psqt are replaced by

the contents of A

QuanCastA Cast a x matrix into a quantity

TransA Compute transp ose of matrix A

Table Functions for Basic Matrix Op erations

rowcol

units psi in kN km

ksi e e e e

ft e e e e

N e e e e

mm e e e e

Results of the matrix addition and subtraction are

MATRIX Z

rowcol

units ksi ft N m

psi e e e e

in e e e e

kN e e e e

mm e e e e

MATRIX U

rowcol

units ksi ft N m

psi e e e e

in e e e e

kN e e e e

mm e e e e

As p ointed out in Chapter consistent units are required for all matrix op erations in

cluding matrix addition and subtraction and multiplication Sometimes a p ower function

can b e used as a substitute to a series of matrix multiplications Consider the following

script of co de to compute a square matrix X raised to the p ower of

X

Y XXX triple product of matrices X

Z X X raised to the power of

The results are

MATRIX Y

rowcol

units

e e e

e e e

e e e

MATRIX Z

rowcol

units

e e e

e e e

e e e

Notice that the syntax to compute a matrix raised to a p ower is the same as for a quantity

raised to a p ower Power op erations may only b e applied to certain classes of matrices

The matrix must b e a square matrix this requirement is needed b ecause a matrix

is multiplied from b oth left and right

The exp onent is limited to integers larger than or equal to Matrix raised to an

03

exp onent with fractional digits such as X or to a less than p ower such as

3

X are lack of well dened mathematical meaning

The function is only useful for nondimensional matrices For dimensional matrices

two matrices can only multiply to each other when their units are consistent And

a matrix multiply to itself will result in unconsistent units

A matrix raised to the p ower of zero is taken as a nondimensional matrix full of ones

Scaling a Matrix by a Quantity

Let A b e a matrix and q a physical quantity ALADDINs grammar supp orts pre

multiplication of A by a quantity ie qA p ostmultiplication of A by a quantity ie

Aq and division of A by a quantity ie Aq The following script of co de demonstrates

use of these commands The script contains three parts rst we generate a

matrix X with units In Part X is scaled by in via p ostmultiplication and in Part

the elements of X are divided by in

a Define and print matrix X with units

X One

X ColumnUnitsX ksi lbf ksi ft

X RowUnitsX psi in kips lb

PrintMatrixX

b Scale Matrix by constant factor of in

print n Scale Matrix by constant factor of in n

Y X in

PrintMatrixY

c Reduce Matrix Content by a factor of in

print n Reduce Matrix Content by a factor of in n

print X Xn

Y X in

print Y Yn

PrintMatrixY

The generated output is

MATRIX X

rowcol

units ksi lbf ksi ft

psi e e e e

in e e e e

kips e e e e

lb e e e e

Scale Matrix by constant factor of in

MATRIX Y

rowcol

units lbfin lbfin lbfin in

psi e e e e

in e e e e

kips e e e e

lb e e e e

Reduce Matrix Content by a factor of in

X lbfin

Y psi

MATRIX Y

rowcol

units ksiin lbfin ksiin

psi e e e e

in e e e e

kips e e e e

lb e e e e

Notice how the contents of X and Y have units that are the pro duct of

entries in the row and column units vectors

Euclidean Norm of RowColumn Vectors

ALADDIN provides the function LNorm to compute the L norm of either a

2

n row vector or n column vector

v

u

n

X

u

2

t

kxk x

i

2

i=1

Consider the following example

X

U LNormX

PrintMatrixX

print Euclidean Norm of X U n

print Euclidean Norm of Y V n

The generated output is

MATRIX X

rowcol

units

e e e e e

Euclidean Norm of X e

ALADDIN also allows L norms to b e computed for row and column vectors containing

2

consistent sets of units For example

Y m m E km m m

V LNormY

PrintMatrixY

print Euclidean Norm of Y V n

sets up a by row vector X and a by column vector Y Again the generated output

is

MATRIX Y

rowcol

units

m e

m e

km e

m e

m e

Euclidean Norm of Y e

Notice how the units have b een stripp ed from the Euclidean norm

Minimum and Maximum Matrix Elements

The matrix function Min returns the minimum value of an element in a matrix

and the matrix function Max returns the maximum value of an element in a matrix

Each function has one matrix argument and returns a matrix containing the

minmax value For example the script of input

x

MaxValue Maxx

MinValue Minx

PrintMatrixx

print Maxx MaxValue n

print Minx MinValue n

generates the output

MATRIX x

rowcol

units

e e e e

e e e e

Maxx

Minx

In this particular example the matrices returned by Max and Min are converted

to quantities when the assignments to MaxValue and MinValue are made In engineering

design applications the Min and Max functions can simplify the writing of co de where

extreme values of system resp onses must b e identied

SubstitutionExtraction of Submatrices

ALADDIN provides the function Extract to extract a submatrix from a larger

matrix and the function Put to replace a submatrix within a larger sp ecied matrix

Both functions require three matrix arguments for details see Table Supp ose for

example we generate matrices with the sequence of commands

a generate x matrix with units

X One

X ColumnUnitsX psi

X ColumnUnitsX kN

X ColumnUnitsX km

X RowUnitsX psi N mm

b Extract a x matrix from a x matrix starting at corner

A Matrix

A ExtractAX

c Extract the nd column of matrix X

B Matrix

B ExtractBX

d Extract the rd row of matrix X

C Matrix

C ExtractCX

e Put a x submatrix D into X starting at corner

D

Y PutX D

The output from this script of co de including dened matrices X and D and results of

extracted matrices ABC and replaced matrix Y is

MATRIX X

rowcol

units psi kN km

psi e e e e

N e e e e

mm e e e e

MATRIX D

rowcol

units

e e

e e

MATRIX A

rowcol

units psi N

psi e e

N e e

MATRIX B

rowcol

units

psi e

N e

Nm e

MATRIX C

rowcol

units lbfin Nm mm m

e e e e

MATRIX Y

rowcol

units

e e e e

e e e e

e e e e

Solution of Linear Matrix Equations

The purp ose of this section is to describ e the functions ALADDIN supp orts for

the solution of linear equations

A fxg fbg

We assume in equation that A is a n n square matrix and fxg and fbg are

n column vectors Generally sp eaking the computational work required to solve one

or more families of linear equations is aected by a the size and structure of matrix

A b the computational algorithm used to compute the numerical solution and c the

numb er of separate families of equations solutions are required

BACKWARD SUBSTITUTION O ( n^2 ) [ U ] { x } = { b } { x }

FORWARD SUBSTITUTION

O ( n^2 ) [ L ] { x } = { b } { x }

GAUSS ELIMINATION

O ( n^3 ) O ( n^2 ) [ A ] { x } = { b } [ U ] { x } = { b } { x } Row Operations Backward Substitution.

LU DECOMPOSITION O ( n^3 ) O ( n^2 ) [ U } { z_1 } = { b_1 } [ A ] { x } = { b } [ A ] = [ L ] [ U ] [ L ] { x_1 } = { z_1 }

O ( n^2 ) [ U ] { z_2 } = { b_2 } [ L ] { x_2 } = { z_2 }.

O ( n^2 ) [ U ] { z_3 } = { b_3 }

[ L ] { x_3 } = { z_3 }

Forward Substitution followed by Backward Substitution

Figure Strategies for Solving A fxg fbg

Figure summarizes four pathways of computation for the solution of linear equations

A fxg fbg When matrix A is is either lower or upp er triangular form solutions to

L fxg fbg can b e computed with forward substitution and solutions to U fxg fbg

2

via backward substitution Algorithms for forwardbackward substitution require O n

computational work The metho d of Guass Elimination is p erhaps the most widely known

metho d for solving systems of linear equations In the rst stage of Gauss Elimination

NameArgument Purp ose of Function

DetA Compute determinant of matrix A the result is a

quantity

Decomp oseA Compute LU decomp osition for square matrix A

InverseA Compute the inverse of matrix A

SolveAb Compute solution to Afxg fbg

SubstitutionLUb Compute forward and backward substitution LU is a

matrix containing the LU decomp osition of A

Table Functions for Solving Linear Equations



a set of well dened row op erations transforms A fxg fbg into U fxg fb g In

the second stage of Gauss Elimination the solution matrix x is computed via back sub

3 2

stitution The rst and second stages of Gauss Elimination require O n and O n

computational work resp ectively

In many numerical and nite element computations eg structural dynamics with

nite elements families of equations Afxg fbg are solved many times with dierent

righthand side vectors b For example in Figure fb g fb g and fb g represent

1 2 3

three distinct righthand sides to Afxg fbg The optimal solution pro cedure is to rst

3

decomp ose A into a pro duct of lower and upp er triangular matrices O n computational

work and then use forward substitution to solve L fz g fbg followed by backward

2

substitution for U fxg fz g O n computational work While solutions the rst set

3

of equations requires O n computational work solutions to all subsequent families of

2

Afxg fbsg requires only O n computational work

Solving A fxg fbg

ALADDIN provides three functions Decompose Substitution and Solve

for the solution of linear equations Afxg fbg A summary of ALADDINs functions

for solving linear equations is given in Table

Function Decompose computes the LU decomp osition of matrix A A typical

example of its usage is

LU DecomposeA

Decompose will print an error message if matrix A is singular ie the determinant of A

is zero and a unique solution to the equations do es not exist With the LU decomp osi

tion of A complete solutions to linear equations LUfxg fbg can b e computed with

forward and backward substitution This twostep pro cedure is handled by a single call

to Substitution A typical example of its usage is

x SubstitutionLU b

As demonstrated in Chapter solutions to linear equations may also b e computed with

the single command

x SolveA b

Function Solve computes the solution to a single family of equations via the metho d of

LU decomp osition The numerical pro cedure is identical to the twocommand sequence

LU DecomposeA

x SubstitutionLU b

LU decomp osition can b e used to solve a family of equations with dierent righthand

side vectors b For example

LU DecomposeA

x SubstitutionLU b Solve Ax b

x SubstitutionLU b Solve Ax b

x SubstitutionLU b Solve Ax b

Numerical Example Figure shows a schematic and simplied mo del of an elastic

cantilever b eam External loads include an axial force a translational force p erp endicular

to the axis of the b eam and a b ending moment applied at the end p oint of the cantilever

P_2 FULL FIXITY AT SUPPORT PROPERTIES E, A, I

P_1 1 3

M 2 L

GEOMETRY OF BEAM WITH LOADS STRUCTURAL MODEL OF BEAM

Figure Schematic and Mo del of Prismatic Cantilever Beam

The cantilever is mo deled with full xity at its base It has length L meters cross

2 4

section area A m moment of inertia I m and a Youngs mo dulus of

Elasticity E P a The cross section shap e and material prop erties are assumed to

b e constant along the length of the cantilever

If deformations of the b eam are small and the material remains elastic then the

translational displacements and rotation of the cantilever end p oint are given by solutions

to the equation

EA

F x

1

L

12EI 6EI

F y

2 3 2

L L

4EI 6EI

M

2

L L

In the rst phase of our analysis we dene variables for prop erties of the cantilever b eam

allo cate memory for the stiness matrix and two external load matrices and initialize

and print the contents of these matrices These tasks are accomplished by the script of

input le

START OF INPUT FILE

a Setup sectionmaterial properties for Cantilever Beam

E GPa

I m

A m

L m

b Define a x test matrix for Cantilever Beam

stiff Matrix

stiff ColumnUnits stiff Nm Nm N

stiff RowUnits stiff m

stiff EAL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

PrintMatrixstiff

c Define and print two external load matrices

load ColumnUnits Matrix N

load RowUnits load m

load kN

load kN

load kNm

load ColumnUnits Matrix N

load RowUnits load m

load kN

load kN

load kNm

PrintMatrix load load

The contents of matrices stiff load and load are

MATRIX stiff

rowcol

units Nm Nm N

e e e

e e e

m e e e

MATRIX load

rowcol

units

N e

N e

Nm e

MATRIX load

rowcol

units

N e

N e

Nm e

th

Supp ose that a unit displacement is applied to the i degree of freedom in the structure

and displacements are zero at all other degrees of freedom By denition stiness element

k corresp onds the force or moment required at degree of freedom j for equilibrium In

ij

our cantilever structure for example the third row of the stiness matrix corresp onds to

the forces needed pro duced a unit end rotation without also causing lateral or translational

displacements The required set of forcesmoments are

INPUT OUTPUT

print stiff stiff n stiff N

print stiff stiff n stiff e N

print stiff stiff n stiff e Nm

Comp onents stiff to stiff have units of force force and moment re

sp ectively

The linear equations are now solved in two ways First we use Solve to

compute displacements for load cases and Then we use Decompose to compute

the LU decomp osition of stiff followed by two applications of Substitution for

righthand matrices load and load

INPUT FILE CONTINUED

d Use Solve to compute solutions to sets of equations

displacements Solve stiff load

PrintMatrix displacements

displacements Solve stiff load

PrintMatrix displacements

e Use Decompose followed by multiple calls to Substitution

lu Decompose stiff

displacements Substitution lu load

displacements Substitution lu load

PrintMatrix displacements

PrintMatrix displacements

For ease reading displacements and and and are juxtap osed

MATRIX displacements MATRIX displacements

rowcol rowcol

units units

m e m e

m e m e

e e

MATRIX displacements MATRIX displacements

rowcol rowcol

units units

m e m e

m e m e

e e

Before the forward and backward substitution pro ceeds ALADDIN checks that the units

of LU and b are compatible and automatically assigns units to the solution vector For our

cantilever example degrees of freedom one and two corresp ond to axial and translational

displacements of the cantilever end p oint They have units of length Degree of freedom

three is rotation of the cantilever end p oint it is printed as a dimensionless quantity

Finally we check the accuracy of our numerical solution by computing the residual

of solutions

INPUT FILE CONTINUED

e Compute and printk residuals of solution matrices

R stiffdisplacements load

R stiffdisplacements load

R stiffdisplacements load

R stiffdisplacements load

PrintMatrix R R R R

quit

generates the output

MATRIX R MATRIX R

rowcol rowcol

units units

N e N e

N e N e

Nm e Nm e

MATRIX R MATRIX R

rowcol rowcol

units units

N e N e

N e N e

Nm e Nm e

Matrix Inverse

1

The inverse of matrix A is denoted A and for nondimensional matrices is

given by solutions to the matrix equations

1 1

A A A A I

For matrices containing units the left and rightinverses are given by

T

1 1

A A A A I L

and

T

1 1

A A A A I R

In Chapter we will see that numerical values of matrix elements of IR and IL are

symmetric but the left and right identity matrices have units that are transp osed with

resp ect to one another Also when the units are removed from IR and IL IR IL I

An inverse to matrix A will exist if and only if A is nonsingular ie the determi

nant of A is nonzero ALADDIN employs a two step metho d for computing the inverse

of a matrix

Compute the LU decomp osition of A If the pro duct of diagonal terms in either L or

U equals zero then A is singular and an inverse do es not exist

th

Let b corresp ond to the i column of I For each b i to n compute forward

i i

and backward substitution for LU fx g fb g Solution fx g corresp onds to the

i i i

th 1

i column of A

The following script of co de demonstrates two ways of computing the inverse of a matrix

X

START OF INPUT FILE

a Define x matrix X

X

b Compute inverse of X in two ways

Y InverseX

Z X

PrintMatrixX Y Z

c Compute and print left and right identity matrices

IL XY Left identity matrix

IR YX Right identity matrix

PrintMatrixIL IR

Notice how the pro duct of matrices X and Y is computed by simply typing XY The

matrices X Y IR and IL are

MATRIX X

rowcol

units

e e e e

e e e e

e e e e

e e e e

MATRIX Y

rowcol

units

e e e e

e e e e

e e e e

e e e e

MATRIX Z

rowcol

units

e e e e

e e e e

e e e e

e e e e

MATRIX IL

rowcol

units

e e e e

e e e e

e e e e

e e e e

MATRIX IR

rowcol

units

e e e e

e e e e

e e e e

e e e e

1 1

For nondimensional matrices the left and right identity pro ducts X X and X X

are identical except for roundo errors Now lets lo ok at the inverse of square matrices

having units here is one example

START OF INPUT FILE

a Define x matrix X

X

X ColumnUnitsX Nm Nm N

X RowUnitsX m

b Compute inverse of X in two ways

Y X

PrintMatrixX Y

c Compute and print left and right identity matrices

IL XY Left identity matrix

IR YX Right identity matrix

PrintMatrixIL IR

The generated output is

MATRIX X

rowcol

units Nm Nm N

e e e

e e e

m e e e

MATRIX Y

rowcol

units m

mN e e e

mN e e e

N e e e

MATRIX IL

rowcol

units Nm Nm Pa

mN e e e

mN e e e

Pa e e e

MATRIX IR

rowcol

units Nm Nm N

mN e e e

mN e e e

N e e e

Matrix Eigenvalues and Eigenvectors

Let K b e a n n matrix The eigenvector of K is dened as a vector which when

premultiplied by K generates a vector prop ortional to the original vector The constant

of prop ortionality is called the eigenvalue In mathematical notation we write

K

where is the n eigenvector and the eigenvalue We say that equation is an

0

eigenvalue problem when it is solved for the s And it is an eigenvector problem when

0

is solved for the s Equation is an eigenproblem when it is solved for b oth

0 0

the s and s

In this section we describ e the two typ es of eigenproblems ALADDIN can solve

The rst and simpler case is the standard eigenproblem

K

In equation K is a n n p ositive denite symmetric stiness matrix and and

are n n matrices of eigenvalues and eigenvectors resp ectively ie

1 2 n

and diag ALADDIN also supp orts solutions to the generalized eigen

1 2 n

problem

K M

where M is a n n p ositive denite matrix and the remaining symb ols take their

aforementioned denition Generalized eigenproblems play a fundamental role in the

freevibration analysis of structural and mechanical systems studies of instability in en

gineering systems and in the identication of principal moments of inertia in two and

threedimensional solids

In the analysis of many engineering systems only the rst p p n eigenpairs

are needed for analysis The solution for p eigenpairs in the standard eigenproblem cor

resp onds to

K

The denition of is mo died to a n p matrix containing the rst p eigenvectors ie

and diag is a p p diagonal matrix containing

1 2 p 1 2 p

the rst p eigenvalues The counterpart to equation is

K M

NameArgument Purp ose of Function

EigenKMs Compute s eigenvalues and eigenvectors Result of the

function call is assigned to eigen

Eigenvalueeigen Extract eigenvalues from array eigen

Eigenvectoreigen Extract eigenvectors from array eigen

Table Eigenvalue and Eigenvector Functions

In equations and it is imp ortant to notice how the eigenvalues and eigen

vectors have b een carefully p ositioned so that b oth the left and righthand sides evaluate

to a n p matrix

ALADDIN employs a subspace iteration algorithm to solve equations and

A theoretical discussion of the algorithm may b e found in Bathe Details of

the C co de may b e found in Austin and Mazzoni

Solving K M

ALADDIN provides three functions Eigen Eigenvalue and Eigenvector

for the solution of the matrix eigenvalue problems a summary of these functions and

their arguments is given in Table Eigen requires three matrix arguements as

input The rst and second arguments are the stiness and mass matrices and the third

argument a matrix containing the numb er of eigenvalues and eigenvectors the

subspace algorithm should compute Here is skeleton script of co de for the solution of an

eigenproblem

noeigen

eigen Eigen K M noeigen

eigenvalue Eigenvalue eigen

eigenvector Eigenvector eigen

If K and M are n n matrices then eigen is a n n matrix containing a

comp osite of eigenvalues and eigenvectors Functions Eigenvalue and Eigenvector

simply extract the appropriate rows and columns from eigen the same result could b e

achieved with Extract

We now apply these functions to two applications elastic buckling of a pinended

column and vibration analysis of a supp orted cantilever b eam

Numerical Example Figure shows a pinended column acted on by a central axial

compressive force P The column has length L m mo dulus of elasticity E GP a P y

x 1 ( x_i , y_i )

2

3 L = 5 m. 4

5

P -11 -1 1 P = 78.93 N. P = 314.2 N.

GEOMETRY OF ELASTIC ROD BUCKLING MODE 1 BUCKLING MODE 2

Figure Elastic Buckling of PinEnded Column

4

and constant moment of inertia I mm along its length The theoretical buckling

load is given by solutions to

2

d x

P y EI

2

d y

with b oundary conditions y y L Solutions to equation are well known

and may b e found in most undergraduate texts on structural mechanics hence we will

simply state the results here The deformed column will b e in static equilibrium and

satisfy the b oundary conditions when

2 2

n EI

P for n

n

2

L

The mo de shap e Y x corresp onding to critical load P is

n n

n x

Y x Asin

n

L

For our example column rst and second mo de buckling loads and mo dal shap es are

2

EI x

P N Y x sin

1 1

2

L

and

2

EI x

P N Y x sin

2 2

2

L

Numerical estimates of the column buckling loads and shap es of deformation may b e

computed via a nite dierence approximation to equation followed by solution

of the ensuing eigenproblem We will illustrate the numerical metho d by computing

the columns lateral displacements at ve equally spaced no dal p oints x y x y

1 1 2 2

x y x y and x y as shown in the center diagram of Figure

3 3 4 4 5 5

For step one Ghali and Neville have shown that a suitable nite dierence

approximation to equation is

y y

(i1) (i1)

2

h i h i

P

cr

y y

i i

EI

y y

(i+1) (i+1)

where co ordinates y y and y are lateral displacements of the column and is

(i1) (i) (i+1)

the x co ordinate spacing b etween no des ie x x L Global b ehavior of

i

(i+1)

the column is given by the sequential application of equation to each of the ve

internal no des The eigenproblem that results is

2

P

cr

A fy g B fy g where

EI

and A and B are matrices and fy g is a matrix of lateral displacements

along the column The details of A and B are as follows

B A

Details of Input File A fourpart input le is needed for the denition of column ge

ometry material and section prop erties assembly of the nite dierence matrices solution

of the eigenvalue problem and printing of the buckling loads and mo dal shap es

START OF INPUT FILE

a Define sectionmaterial properties Buckling Problem

E GPa

I mm

L m

b Define a x matrices for finite difference approximation

A

B

PrintMatrixAB

c Compute Eigenvalues and Eigenvectors

noeigen

eigen EigenA B noeigen

eigenvalue Eigenvalueeigen

eigenvector Eigenvectoreigen

d Print Eigenvalues Eigenvectors and Buckling Loads

size DimensionA

fori i noeigen i i

print n

print Mode i n

print Eigenvalue eigenvaluei n

print Buckling Load P EIeigenvalueiL n

forj j size j j

ifj then

print n

print Mode Shape eigenvectorji n

else

print eigenvectorji n

print n

Abbreviated Output File We have used the parameter no eigen to control the

numb er of eigenvaluesvectors that are computed by the subspace iteration and printed

START OF ABBREVIATED OUTPUT FILE

MATRIX A

rowcol

units

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

MATRIX B

rowcol

units

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

SUBSPACE ITERATION CONVERGED IN ITERATIONS

Mode

Eigenvalue

Buckling Load P N

Mode Shape

Mode

Eigenvalue

Buckling Load P N

Mode Shape

A summary of numerical results is shown on the righthand side of Figure The

numerical results for b oth the buckling loads and mo dal shap es are in very go o d agreement

with equations and

Numerical Example The purp oses of this numerical example are to demonstrate

use of

Element level stiness and mass matrices as would b e found in nite element analysis

Destination arrays as a means of mapping degrees of freedom in the mass and stiness

nite element matrices onto the global stiness matrix and mass matrix degrees

of freedom

The eigenvalue functions to compute the natural p erio ds and mo dal shap es of vibra

tion

We have delib erately selected a problem with a small numb er of unknowns so that step

bystep details of items and may b e written down and solved using functions from

the matrix library alone

FIXED SUPPORT

2 4

1,2 3,4 5,6 7,8 9 1 3

L = 20 m. L = 4 m.

GEOMETRY OF SUPPORTED CANTILEVER BEAM BEAM FINITE ELEMENT

Figure Single Span Cantilever Beam with Supp orted End Point

Figure shows a uniform cantilever b eam with a supp orted end p oint The cantilever

has length m mo dulus of elasticity E GP a and constant moment of inertia

6 4

I mm along its length We will assume that the cantilever is rigid in its

2

axial direction ie b eam cross section area m and that all other deformations

are small The b oundary conditions are fullxity at the base of the cantilever and zero

translational displacement at the cantilever end

Overall b ehavior of the cantilever will b e mo deled with ve b eam nite elements

and nine global degrees of freedom They are a translation and rotation at each of the

internal no des and a single rotational degree of freedom at the hinged cantilever supp ort

Numb ering for the global degrees of freedom is shown on the lefthand side of Figure

Lateral displacements along each b eam element will b e expressed as the sup erp osition of

four cubic interp olation functions each weighted by a no dal displacement factor The four

no dal displacements are two b eamend lateral displacements and two b eamend rotations

as shown on the righthand side of Figure

Element Stiness and Mass Matrices It is well known that if cubic interp olation

functions are used to describ e displacements along the b eam element then the b eam

element stiness matrix will b e

L L

2 2

EI

L L L L

K

L L

L

2 2

L L L L

where EI is the exural rigidity of the b eam element and L its length We say that a

mass matrix is consistent when the shap e functions used to evaluate the mass matrix

are the same as those for the stiness matrix The consistent mass matrix is

2 2

L L L L

m L

L L

M

2 2

L L L L

L L

where m is average mass p er unit length Notice that in the translational degrees of

freedom ie columns and and rows and of M the co ecients and

sum to thereby giving a total b eam mass mL

Assembly of Global Stiness and Mass Matrices The assembly pro cess for the

global stiness and global mass matrices may b e written

N N

X X

M K and M K

i i

i=1 i=1

where K and M represent the stiness and mass matrices for b eam element i mapp ed

i i

onto the global degrees of freedom and N is the total numb er of elements in the mo del

A straight forward way of assembling these matrices is with the use of destination arrays

The destination array for our cantilever problem is

LD

Element ij of LD contains the global degree of freedom for degree of freedom j of

b eam nite element i A zero entry indicates that the b eam element degree of freedom

will not b e mapp ed to the global stiness matrix So for example degrees of freedom

and of b eam element are not mapp ed to the global stiness matrix this is b ecause

the leftmost section of the cantilever is rmly attached to the wall Degrees of freedom

and of b eam element are mapp ed to degrees of freedom and in the global stiness

and mass matrices Similarly degrees of freedom and of b eam element will b e

mapp ed to global degrees of freedom and Degree of freedom of b eam element is

not mapp ed to the global stiness matrix b ecause lateral displacements of the cantilever

end are prevented by the hinged supp ort

Details of Input File A nite element mo del for the supp orted cantilever is dened

in parts a to f of the following input le The eigenvalue problem is solved in part

g

ABBREVIATED INPUT FILE

a Define sectionmaterial properties

E MPa

I E mm

L m

mbar kgm

b Define x stiffness matrix for beam element

stiff Matrix

stiff ColumnUnits stiff N Nm N Nm

stiff RowUnits stiff m

stiff RowUnits stiff m

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

stiff EIL

PrintMatrixstiff

c Define x consistent mass matrix for beam element

mass Matrix

mass ColumnUnits mass kgm kg kgm kg

mass RowUnits mass m

mass RowUnits mass m

mass mbarLLL

mass mbarLL

mass mbarLL

mass mbarLL

mass mbarLL

mass mbarL

mass mbarLL

mass mbarL

mass mbarLL

mass mbarLL

mass mbarLL

mass mbarLL

mass mbarLL

mass mbarL

mass mbarLL

mass mbarL

PrintMatrixmass

d Destination Array beam element connectivity

LD

e Allocate memory for global mass and stiffness matrices

GMASS Matrix

GMASS ColumnUnits GMASS kgm kg kgm kg kgm kg kgm kg kgm

GMASS RowUnits GMASS m

GMASS RowUnits GMASS m

GMASS RowUnits GMASS m

GMASS RowUnits GMASS m

GMASS RowUnits GMASS m

GSTIFF Matrix

GSTIFF ColumnUnits GSTIFF N Nm N Nm N Nm N Nm N

GSTIFF RowUnits GSTIFF m

GSTIFF RowUnits GSTIFF m

GSTIFF RowUnits GSTIFF m

GSTIFF RowUnits GSTIFF m

GSTIFF RowUnits GSTIFF m

f Assemble Global StiffnessMass Matrices for Two Element Cantilever

noelements

for i i noelements i i

for j j j j

row LD ij

if row

for k k k k

col LD ik

if col

GMASS row col GMASS row col massjk

GSTIFF row col GSTIFF row col stiffjk

g Compute and Print Eigenvalues and Eigenvectors

noeigen

eigen Eigen GSTIFF GMASS noeigen

eigenvalue Eigenvalueeigen

eigenvector Eigenvectoreigen

fori i noeigen i i

print Mode i w eigenvaluei

print T PIsqrteigenvaluei n

PrintMatrixeigenvector

Points to note are

Element level stiness matrices are stored in stiff Rows and of stiff represent

equations of equilibrium when a moment is applied at the b eam end to cause a unit

rotation and rows and equations of equilibrium for unit lateral displacements

of the b eam element We distinguish these cases by applying units of m to rows

and

Element level mass matrices are stored in mass By denition terms in the mass

matrix corresp ond to forces or torques required to cause unit translational or

rotational acceleration A unit acceleration in a translational degree of freedom will

require a force of the typ e force mass accn with mass taking kilogram kg

units A unit rotational acceleration will have the form torque inertia angular

2

accn The units for inertia are kg m

The global mass and global stiness matrices are stored in GMASS and GSTIFF

resp ectively The statements row LDij and col LDij contain the

rowcolumn mapping for the b eam element degrees of freedom onto the global de

grees of freedom

Abbreviated Output File Details of the b eam element stiness and mass matrices

and ensuing eigenvalues and eigenvectors are as follows

START OF ABBREVIATED OUTPUT FILE

MATRIX stiff

rowcol

units N Nm N Nm

m e e e e

e e e e

m e e e e

e e e e

MATRIX mass

rowcol

units kgm kg kgm kg

m e e e e

e e e e

m e e e e

e e e e

SUBSPACE ITERATION CONVERGED IN ITERATIONS

Mode e w radsec T sec

Mode e w radsec T sec

MATRIX eigenvector

rowcol

units

e e

m e e

e e

m e e

e e

m e e

e e

m e e

e e

Points to note are

The eigenvalues of this problem corresp ond to the circular natural frequency squared

of the individual mo des and they take the units radsecsec The natural p erio d

of vibration for the rst and second mo des is seconds and seconds

resp ectively

The rst two eigenvectors are summarized in the script of abbreviated output Per

haps the most surprising result of this analysis is the unit on the eigenvectors for 1 1

-1 -1

MODE 1 : PERIOD = 0.5203 SECONDS MODE 2 : PERIOD = 0.1602 SECONDS

Figure Mo de Shap es and Perio ds of Vibration for Single Span Steel Beam

those degrees of freedom corresp onding to translational displacements the eigen

vector is printed with units of length The remaining degrees of freedom represent

rotations and take the nondimensional units of radians

Figure shows the mo de shap es and natural p erio ds of vibration for the supp orted

cantilever b eam We have drawn the mo de shap es as connected straight lines

actually the mo de shap es will b e cubic splines as dened by the b eam element

shap e functions

Chapter

Construction of Numerical

Algorithms

Intro duction

The purp ose of this chapter is to test the exibility of ALADDINs command

language by constructing basic numerical algorithms for computing the ro ots of nonlinear

equations and the minima of multidimensional functions sub ject to linear and nonlinear

constraints We have selected this problem domain b ecause the numerical algorithms

may b e incorp orated into nite element analyses of linear and nonlinear structures For

details see Chen and Austin

Ro ots of Nonlinear Equations

T

Let x x x x by a co ordinate p oint in ndimensional space and f

1 2 n

T

f f f b e a ndimensional nonlinear vector The ro ots of nonlinear equations

1 2 n

f are given by solutions to

f x

NewtonRaphson and Secant Algorithms

The metho ds of NewtonRaphson and Secant Approximation are among the

most p opular for computing the ro ots of nonlinear equations Let vector x b e an initial

o

guess at the solution to equation The metho d of NewtonRaphson corresp onds to

a sequence of rst order Taylor series expansion ab out x namely

(k )

f x f x rf x x x

(k +1) (k ) (k ) (k +1) (k ) f(x) f ( x_o )

f( x_1 )

f ( x_2 )

f ( x_3 ) f(x) = 0

x_o x__1 x_2 x_3

Figure Secant Approximation of QuasiNewton Metho d

where k n and rf x f x In matrix form the gradient

ij i j

approximation is

f (x) f (x) f (x)

1 1 1

x x x

n

1 2

f (x) f (x) f (x)

2 2 2

x x x

n

1 2

rf x

f (x) f (x) f (x)

n n n

x x x

n

1 2

If rf x has an inverse then the full NewtonRaphson up date is

(k )

h i

1

x x f x rf x

(k +1) (k ) (k ) (k )

The pro cedure is rep eated until convergence criteria are satised While the metho d of

full NewtonRaphson can b e ecient in some sp ecic nonlinear analyses Bathe

rep orts that in general full NewtonRaphson is not a comp etitive computational metho d

for computing the ro ots of a widerange of nonlinear equations A ma jor limitation of full

NewtonRaphson is the need for up dating and factorizing the co ecient matrix rf x

(k )

at each iteration One strategy for avoiding these computationally exp ensive steps is

to replace rf x in equation with rf x thereby eliminating the need to

(k ) (0)

recalculate and factorize rf x at each iteration From a mathematical p oint of view

(k )

this simplication corresp onds to a linearization of the gradient f x For problems with

o

signicant nonlinearities in particular when the system stiens during the resp onse

this linearization can lead to a very slow convergence in the iteration Even worse the

iteration may diverge

The class of quasiNewton metho ds are a second alternative to full Newton Raph

son QuasiNewton metho ds up date the co ecient matrix or its inverse to provide a

secant approximation to the matrix from iteration k to k Figure shows for

example a sequence of secant approximations one might apply during the computation

of ro ots in a onedimension nonlinear equation If a displacement increment is dened

x x

(k +1) (k +1) (k )

an increment in the residuals dened as

f x f x

(k +1) (k ) (k +1)

then the up dated secant stiness matrix K will satisfy the quasiNewton equation

(k +1)

K

(k +1) (k +1) (k +1)

BroydenFletcherGoldfarbShanno BFGS Algorithm

Among QuasiNewton metho ds the BroydenFletcherGoldfarbShanno BFGS

metho d app ears to b e the most eective Within iteration k the BFGS metho d

employs the following pro cedure to evaluate x and K

(k +1) (k +1)

Step Initialization Provide an initial value of vector x x and calculate the

0

corresp onding K matrix at x x

o o

Step Evaluated the x vector increment

h i

1

x f x rf x

(k ) (k )

This vector increment denes a direction for the actual increment

Step Perform a linesearch along direction x to satisfy equilibrium Details of

the linesearch are as follows First set and let the x vector

x x x

(k +1) (k )

where is a scalar multipler The pro duct j x j represents the distance b etween p oints

x and x The value of is changed until the comp onent of the residual in direction

(k ) (k +1)

T

x as dened by the inner pro duct of x f x is approximately zero The latter

(k +1)

condition is satised when

T T

x f x STOL x f x

(k +1) (k )

STOL is a convergence tolerance The distance of the line search is automatically halved

after each failure of equation by halving x is then recalculated with the new

(i)

If after ve or ten line search attempts equation still isnt satised then the

direction given by the x is probablely wrong A new direction calculation is needed

This pro cedure is summarized in foursubsteps

Step Use equation to up date x

Step Begin while loop While equation is not satised work through

Substeps to

Step If the line search numb er is less than or equal to MaxLineSearchCount then

set and use equation to up date x

Step If the line search numb er is greater than MaxLineSearchCount then break

the while lo op Recalculate matrix K at x x Go to Step

(k +1)

Step End while loop Go to Step for BFGS up date

Step Use equations and to calculate and

(k +1) (k +1)

Step Use the BFGS up date to revise the inverse of co ecient matrix K The

up date of K is given by

1 T 1

A A K K

(k +1) (k +1) (k ) (k +1)

where the matrix A is a n n matrix

(k +1)

T

(k +1) (k +1)

A I v w

(k +1)

(k +1) (k +1)

Vectors v and w are given by

T

(k +1) (k +1)

(k +1)

v f x

(k ) (k +1)

T

f x

(k +1) (k )

and

(k +1)

(k +1)

w

T

(k +1) (k +1)

Step To avoid numerically dangerous up dates the conditional numb er

12

T

(k +1) (k +1)

c

(k +1)

T

f x

(k +1) (k )

of the up dating matrix A must b e compared to some predetermined tolerance A

(k +1)

large condition numb er implies that the up dated inverse matrix will b e nearly singular

Numerical up dates are not p erformed if the condition numb er exceeds this tolerance in

5

this pro ject we follow the recommendation of Bathe and set the tolerance at

Step Check convergence of force and energy equilibriums The force convergence

criterion requires that the norm of the outofbalance residual or force to b e within a

preset tolerance of the rst residual

F

kf x k kf x k

2 F

(k +1) (o)

A force criterion is not sucient to ensure convergence Consider the case of function

fx with small or closing to zero gradients the outofbalance residual or force may b e

very small while the variable x or displacement may b e grossly in error Therefore the

(k +1)

energy equilibrium condition is necessary to provide the indication that b oth x

and residual are approaching zeros It requires computation of the work done by the force

residual moving through displacement increment x

x f x x f x

E

(k +1) (k ) (o) (0)

4

where the is a preset energy tolerance In the following examples we will use

E F

5

and

E

Numerical Example We demonstrate use of the BFGS algorithm by solving a two

variable family of nonlinear equations

2

x x

1 2

2

x x

1 2

These equations may also b e written fF g fR g where

2

x x

1 2

fR g fF g

2

x x

1 2

We use the parameter MaxLineSearchCount for the maximum numb er for line search

T

trials and select an initial trial vector fxg

START OF INPUT FILE

Use BFGS Algorithm to Solve Nonlinear Equations

Function

x x

x x

Rt

F x x

F x x

Kij dFidxj Jacobain matrix

Written By XG Chen June

dimen

IMAX Maximum number of iteration

Ef E

Ee E

beta

STOL

EPS E

ii

MaxLineSearchCount

a Initialize and print problem parameters and initial solution

x

R

print initial Guess n

PrintMatrixx

print nGiven R value n

PrintMatrixR

Y x x

K x x

F Yx

Residu RF

Residu RF

Kinver InverseK

b Allocate working matrices

Residuold Residu

I Diagdimen

deltaold Zerodimen

c Main Loop for Iteration

Iterno

for ii ii IMAX ii ii

Iterno Iterno

beta

delta KinverResidu

c Armijo Line Search

xtemp x betadelta

temp QuanCastTransdeltaResidu

Y xtemp xtemp

F Yxtemp

Residu R F

temp QuanCastTransdeltaResidu

counter

whiletemp tempSTOL EPS

counter counter

ifcounter MaxLineSearchCount then

print n n Too many iterations for line search n

break

else

beta beta

xtemp x betadelta

Y xtemp xtemp

F Yxtemp

Residu RF

temp QuanCastTransdeltaResidu

x xtemp

c Restart for failed line search

ifcounter MaxLineSearchCount then

ii

print n Restart at new initial Value n

Y x x

K x x

F Yx

Residu RF

Kinver InverseK

Residuold Residu

deltaold Zerodimen

else

c BFGS Update ie counter MaxLineSearchCount

gamma Residuold Residu

tem QuanCastTransdeltaResiduold

tem tembetabeta

tem QuanCastTransdeltagamma

tem tembeta

ConditionNo sqrttemtem

V ConditionNobetaResiduold gamma

W betadeltatem

A I VTransW

Kinver TransAKinverA

c Check convergence criteria

if ConditionNo E

printConditionNo ConditionNo n

printERROR Condition Number Too Large n

break

c Force and energy criteria

forcecrt LNormResidu

forcecrt LNormResiduEf

energycrt QuanCastTransdeltaResiduold

energycrt absenergycrt

if ii

energycrt QuanCastTransdeltaResidu

energycrt absenergycrtEe

ifforcecrt forcecrt energycrt energycrt

break

Residuold Residu

deltaold delta

d Print results and terminate program execution

print n RESULTS n n

print Iteration Number Iterno n

Y x x

F Yx

PrintMatrixx F

quit

The program output is

initial Guess

MATRIX x

rowcol

units

e

e

Given R value

MATRIX R

rowcol

units

e

e

Too many iterations for line search

Restart at new initial Value

RESULTS

Iteration Number e

MATRIX x

rowcol

units

e

e

MATRIX F

rowcol

units

e

e

HanPowell Algorithm for Optimization

In this section we will demonstrate how ALADDIN can b e used to solve a series

of optimization problems Before we get to the details of the input le we will briey

describ e the HanPowell algorithm for optimization

Let x b e a ndimensional vector fx a ndimensional function and gx a m

dimensional function The purp ose of this section is to solve the mathematical problem

minimiz e f x

subj ect to g x

by constructing a quadratic programming QP metho d combined with an Armijo line

search pro cedure and HanPowells metho d of mo died BFGS up date mathematical

descriptions of these algorithms can b e found in Luenb erger

We b egin by recalling that the Lagrange rstorder necessary conditions for this

problem amounts to solving the system of equations

T

rf x rg x

g x

for x and In terms of Lagrange function ab ove equation can b e written as

rl x

g x

where l x f x g x and is the Lagrange multiplier

Quadratic Programming QP

The quadratic programming metho d is based on two mathematical assumptions

namely

Assume that the ob jective function fx may b e approximated by a quadratic equation

dened by a second order Taylors series expansion ab out x

k

Assume that solutions to the constraint equation gx are approximately given

by a rst order Taylors expansion ab out x

k

Together these assumptions imply

T T

d B d f x f x rf x d

k k +1 k k

T

g x g x rg x d

k +1 k k

The optimization problem describ ed by equation can b e approximated by the fol

lowing quadratic program problem

1

T T

minimiz e rf x d d B d

k k

2

T

subj ect to g x rg x d

k k

where d x x and B is the Hessian of function fx Langranges necessary conditions

k k

are

B d rg x rf x

k k k

T

g x rg x d

k k

and in this particular case comprise an nm dimensional linear system of equations If

B is p ositive denite and rg x has rank of m then the matrix

k

B rg x

k k

T

rg x

k

is nonsingular and equations may b e solved with unique solutions

rf x d B rg x

k k k

T

g x rg x

k k

to d and The ab ovementioned QP solver gives the direction d for the next step We

will use the Armijo line search rule to determine how far an algorithm should move along

this direction

Armijo Line Search Rule

The essential idea is that the rule should rst guarantee that the selected t is not

to o large Let us dene the function

t f x t d

k k

2 3

for xed and t a value of t is considered to b e not to o large if the

corresp onding function value lies b elow the dashed line that is if

0

t t

In this example we chose

The BFGS up date and HanPowell metho d

For the problem with equality constraints describ ed in equation the struc

tured Newton metho d can b e applied We consider the iterative pro cess dened by

1

T

x x B rg x rf x

k +1 k k k k k

T

g x rg x

k k +1 k k

Let

T

x B rg x rf x

k k k

y A C

k k k

T

g x rg x

k k

Notation for equation can b e simplied as

1

y y A C

k +1 k k

k

The top part of system can b e rewritten as

T

B d rf x rg x rl x

k k k k

and equation can b e implemented as a quasiNewton metho d with up dates of

matrix B

T T

B p p B q q

k k k k

k k

B B

k +1 k

T T

q p p B p

k k k

k k

used to approximate the hessian of the lagrangian In equation p x x

k k +1 k

T T

and q rl x rl x The Lagrange multiplier is calculated from

k k +1 k +1 k k +1

solutions to To ensure B remains p ositive denite the standard BFGS up date is

k

slightly altered

The HanPowell Metho d The metho d consists of the following steps

Step Start with an initial p oint x and an initial p ositive denite matrix bf B set

0 0

k

Step Solve the quadratic program describ ed by system If d is a solution

then the current p oint satises the rst order necessary conditions for a solution to the

original problem

Step With d found ab ove p erform a line search in the direction d

Step Up date B according to

k

T T

r r B p p B

k k k k

k k

B B

k +1 k

T T

p B p p r

k k k

k k

p x x

k k +1 k

q rl x rl x

k k +1 k +1 k k

r q B p

k k k k k k

where is the language multiplier vector of and where

k +1

T T

if p q p B p

k k k

k k

k

T

(08)p B p

k k

T T

k

if p q p B p

T T

k k k

k k

p B p p q

k k k

k k

Again detailed discussion on this metho d can b e found in

Numerical Examples Consider the following three problems

Example Minimize a quadratic function with a set of linear constraints

2 2 2 2

minimize f x x x x x x x

1 2 2 3 4 5

sub ject to g x x x

1 1 2

g x x x x

2 3 4 5

g x x x

3 2 5

Example Minimize a nonlinear nonquadratic function with a set of linear constraints

2 2 4

minimize f x x x x x x

1 1 2 2 3

sub ject to g x x x x

1 1 2 3

g x x x

2 1 3

Example Minimize a nonlinear nonquadratic function with nonlinear constraint

2 2 4

minimize f x x x x x x

1 1 2 2 3

2 4

sub ject to g x x x x

1

2 3

It is not dicult to observe that the analytical solution to the ab ove examples are x

x and x

Since the input commands for ab ove examples are basically same except for the

functions we only illustrate one command le for example But we give all the results

for example and

START OF INPUT FILE

Example Problem

minmize fx x x xx x x

Subject to constraints

xx

xxx

x x

Notation f fx G gx Df grad fx Dg grad gx

Written By XG Chen June

SetUnitsOff

a Initialize and print variables and matrices

Epsilon E

beta

alpha

IMAX maximum of iterations

n number of variables

M number of constraints

print n Initial Guess Value n

x not feasible

PrintMatrixx

xold x

lambda ZeroM

lambdaold ZeroM

temp x xx x

temp x x x x

temp x x

temp x x

f temp temp temp temp

A ZeronM nM

C ZeronM

B Zeronn

Df Zeron

DF Zeron

b ZeroM

d Zeron

Df x x

Df x x x x

Df x x

Df x

Df x

B Diagn initialize B as identity matrix

b

b

b

k

TransDg

Dg TransTransDg

G TransDgxb

b Initialize matrices A and C

for i i nM i i

forj j n M j j

if i n then

Ci Dfi

ifj n then

Aij Bij

else

k j n

Aij Dgik

else

k i n

Ci Gk

ifj n

Aij TransDgkj

q Zeron

c Main Loop

for ii ii IMAX ii ii

c Solve QP for direction d

y SolveAC

for i i n i i

di yi

for i n i nM i i

j in

lambdaj yi

ifLNormd Epsilon

break

c Line Search with Armijos Rule

t

x xold td

temp x xx x

temp x x x x

temp x x

temp x x

fnew temp temp temp temp

temp alphaQuanCastTransDfd

counter

while fnew f ttemp t is too large

counter counter

t tbeta

x xold td

temp x xx x

temp x x x x

temp x x

temp x x

fnew temp temp temp temp

ifcounter

print Too much iterations for line search n

print counter counter n

break

c Modified BFGS matrix update

DF x x

DF x x x x

DF x x

DF x

DF x

q DF Dglambda Df Dglambdaold

A QuanCastTransdBdtt

A QuanCastTransdqt

ifA A then

theta

else

theta AAA

r thetaq thetatBd

A QuanCastTransdrt

B B BdTransdBA rTransrA

Df DF

xold x

lambdaold lambda

G TransDgxb

for i i n i i

Ci Dfi

forj j n j j

Aij Bij

for i i M i i

k i n

Ck Gi

d Print results and terminate program execution

print Results n n

print Iteration Number ii nn

PrintMatrixx

quit

If B is initialized with identity matrix then the results are

Example

Initial guess value

MATRIX x

rowcol

e

e

e

e

e

Results

Iteration Number

MATRIX x

rowcol

e

e

e

e

e

Example

Initial guess value

MATRIX x

rowcol

units

e

e

e

Results

Iteration Number e

MATRIX x

rowcol

units

e

e

e

Example The pro cess will not converge after maximum numb er of twenty iterations

And increase maximum numb er can not help the convergence

Initial guess value

MATRIX x

rowcol

e

e

e

Results

Iteration Number e

MATRIX x

rowcol

e

e

e

If B is initialized with B x then the results are

0

Example

Initial guess value

MATRIX x

rowcol

e

e

e

e

e

Results

Iteration Number e

MATRIX x

rowcol

e

e

e

e

e

Example

Initial guess value

MATRIX x

rowcol

units

e

e

e

Results

Iteration Number e

MATRIX x

rowcol

units

e

e

e

Example

Initial guess value

MATRIX x

rowcol

e

e

e

Results

Iteration Number e

MATRIX x

rowcol

e

e

e

In these three examples the hessian of fx is stored in matrix B The hessian is constant

Moreover when the B matrix corresp onds to the exact value only one iteration of opti

mization is required to compute an optimal solution The initial guess p oint for Example

is a feasible p oint While the p oints for Example and are not feasible p oints

Chapter

Computational Metho ds for

Dynamic Analysis of Structures

Intro duction

In this section we demonstrate how ALADDIN may b e used to compute the time

history resp onse of a linear elastic multidegree of freedom system dened by the equation

of equilibrium

MX t CX t KX t Pt

In equation M C and K are n n mass damping and stiness matrices resp ec

tively Pt Xt Xt and X t are n external load displacement velo city and

acceleration vectors at time t

Two numerical pro cedures are describ ed and demonstrated in this chapter We

b egin with the metho d of Newmark Integration to compute the timehistory resp onse of

a four story shear structure Then we rep eat the analysis using the metho d of Mo dal

Analysis In b oth cases the shear structure is acted up on by a sawto othed external force

applied to the ro oflevel degree of freedom

Metho d of Newmark Integration

Newmark integration metho ds approximate the time dep endent resp onse of

linear and nonlinear ndorder equations by insisting that equilibrium b e satised only at

a discrete numb er of p oints or timesteps If t and t t are successive timesteps in

the integration pro cedure the two equations of equilibrium that must b e satised are

MX t CX t KX t Pt

and

MX t t CX t t KX t t Pt t

Now lets assume that solutions to equation are known and needs to b e solved

At each timestep there are n unknowns corresp onding to the displacement velo city

and acceleration of each comp onent of X Since we only have n equations the natural

relationship existing b etween the acceleration and velo city

R

(t+4t)

X t t X t X d

(t)

and velo city and displacement

R

(t+4t)

X t t X t X d

(t)

must b e enforced to reduce the numb er of unknowns to n X is an unknown function for

the acceleration across the timestep The Newmark family of integration metho ds assume

that acceleration within the timestep b ehaves in a prescrib ed manner and the

integral of acceleration across the timestep may b e expressed as a linear combination of

accelerations at the endp oints Discrete counterparts to the continuous up date in velo city

and displacement are

h i

X t t X t t X t X t t

2

h i

t

X t t X t tX t X t X t t

with the parameters and determining the accuracy and stability of the metho d un

der consideration The equations for discrete up date in velo city and displacement are

substituted into equation and rearranged to give

M X t t Pt t

where

2

M M tC t K

and

Pt t Pt t CX t KX t t K X t

h i

4t

t C K Xt

2

It is well known that when and acceleration is constant within the

timestep t t t t and equal to the average of the endp oint accelerations In such

cases approximations to the velo city and displacement will b e linear and parab olic re

sp ectively Moreover this discrete approximation is second order accurate and uncon

ditionally stable It conserves energy exactly for the free resp onse vibration of linear

undamp ed SDOF systems we will check for conservation of energy in the numerical ex

amples that follow

Numerical Example The metho d of Newmark Integration is demonstrated by comput

ing the timehistory resp onse of the four story building structure caused by a timevarying

external load applied to the ro of level Details of the shear building and external loading

are shown in Figures and

MASS = 1500 kg. x_1

800 -800

k_1 = 400 kN/m. k_1 = 400 kN/m. -800 2400 -1600 STIFFNESS = kN/m. MASS = 3000 kg x_2 -1600 4000 -2400

-2400 5600 k_2 = 800 kN/m. k_2 = 800 kN/m.

MASS = 3000 kg x_3

1500

k_3 = 1200 kN/m. k_3 = 1200 kN/m. 3000 MASS = kg MASS = 4500 kg x_4 3000

4500

k_4 = 1600 kN/m. k_4 = 1600 kN/m.

Figure Schematic of Shear Building for Newmark Analysis

A simplied mo del of the building is obtained by assuming that all of the building mass

is lump ed at the o or levels that the o or b eams are rigid and that the columns are

axially rigid Together these assumptions generate mo del that is commonly known as a

sheartyp e building mo del where displacements at each o or level may b e describ ed by

one degreeoffreedom alone Only four degrees of freedom are needed to describ e total

displacements of the structure

Details of the mass and stiness matrices are shown on the righthand side of Fig

ure From a physical p oint of view element ij of the stiness matrix corresp onds

to the no dal force that must b e applied to degree of freedom j in order to pro duce a

unit displacement at degree of freedom i and zero displacements at all other degrees of

freedom

Figure summarizes the mo de shap e circular frequencies and natural p erio d

for each of the mo des in the shear building The shear building has a fundamental p erio d

of seconds

-1 1-1 1 -11 -1 1

T = 0.58 SEC T = 0.26 SEC T = 0.19 SEC T = 0.14 SEC

MODE 1 MODE 2 MODE 3 MODE 4

Figure Mo de Shap es and Natural Perio ds for Shear Building

The dynamic b ehavior of the shear building is generated by the external force shown in

Figure applied to the ro oflevel degree of freedom

10

Force ( kN ). 5

0.2 0.40.6 0.81.0 Time ( seconds ).

-5

-10

Figure Externally Applied Force kN versus Time sec

Notice that we have selected the timescale of the applied force so that it has a p erio d

close to the rst natural p erio d of the structure ie seconds versus seconds

p erio d for the applied load

Input File A sevenpart input le is needed to dene the mass and stiness matrices

external loading and solution pro cedure via the metho d of Newmark Integration The

stepbystep details of our Newmark Algorithm are

Form the stiness matrix K the mass matrix M and the damping matrix C Compute

the eective mass matrix M

Initialize the displacement X and velo city X at time Backsubstitute X

and X into equation and solve for X

Select an integration time step t and Newmark parameters and

Enter Main Lo op of Newmark Integration

Compute the eective load vector Pt t

Solve equation for acceleration Xt t

Compute Xt t and Xt t by backsubstituting Xt t into the equations

for discrete up date in velo city and displacement

Go to Step

Structural damping in the shear building is ignored

Input File The four story shear building external loading and newmark algorithm

are dened in a sevenpart input le

START OF INPUT FILE

a Parameters for Problem SizeNewmark Integration

dt sec

nsteps

gamma

beta

b Form Mass stiffness and load matrices

mass ColumnUnits

kg

stiff ColumnUnits

kNm

PrintMatrixmass stiff

c Generate and print external sawtooth external loading matrix First and

second columns contain time sec and external force kN respectively

myload ColumnUnits Matrix sec

myload ColumnUnits myload kN

fori i i i

myloadi idt

myloadi i kN

fori i i i

myloadi idt

myloadi i kN

fori i i i

myloadi idt

myloadi i kN

PrintMatrixmyload

d Initialize working displacement velocity and accn vectors

displ ColumnUnits Matrix m

vel ColumnUnits Matrix msec

accel ColumnUnits Matrix msecsec

eload ColumnUnits Matrix kN

e Allocate Matrix to store three response parameters Col time sec

Col roof displacement m Col Total energy Nm

response ColumnUnits Matrixnsteps sec

response ColumnUnits response cm

response ColumnUnits response Jou

f Compute and compute LU decomposition effective mass

MASS mass stiffbetadtdt

lu DecomposeCopyMASS

fori i nsteps i i

f Update external load

ifi then

eload myloadi

else

eload kN

R eload stiffdispl veldt acceldtdtbeta

f Compute new acceleration velocity and displacement

accelnew SubstitutionluR

velnew vel dtaccelgamma gammaaccelnew

displnew displ dtvel betaaccel betaaccelnewdtdt

f Update and print new response

accel accelnew

vel velnew

displ displnew

f Compute kinetic potential energy

e Transvelmassvel

e Transdisplstiffdispl

energy e e

f Save components of timehistory response

responsei idt

responsei displ

responsei energy

g Print response matrix and quit

PrintMatrixresponse

quit

Points to note are

In Part a of the input le the variables nstep and dt are initialized for timesteps

of seconds The Newmark parameters and ie input le variables gamma

and beta are set to and resp ectively

Details of the external load versus time are generated for seconds and stored in

an array myload Column one of myload contains time seconds and column

two the externally applied force kN The contents of myload are then transfered

to the external load vector within the main lo op of the Newmark Integration

Rather than print the results of the integration at the end of each timestep we

allo cate memory for response a matrix and store relevant details of

the computed resp onse at the end of each iteration of the Newmark metho d The

rst second and third columns of response contain the time sec displacement

of the ro of cm and total energy of the system Joules

Theoretical considerations indicate see note ab ove that after the external loading

has nished the sum of kinetic energy plus p otential energy will b e constant in the

undamp ed shear structure The total energy Joules is

h i

T T

Total Energy X t MX t X t KX t

Matrix response is printed after the completion of the Newmark integration This

strategy of implementation has several b enets First the resp onse quantities are

easier to interpret if they are bundled together in one array The second b enet

o ccurs when program output is redirected to a le Up on completion of the analysis

it is an easy pro cess to edit the output le and feed response into MATLAB

This is how we created Figures to

Abbreviated Output File The output le contains summaries of the mass and sti

ness matrices for the shear building and abbreviated details of the external loading

myload and the resp onse matrix response

START OF ABBREVIATED OUTPUT FILE

MATRIX mass

rowcol

units kg kg kg kg

e e e e

e e e e

e e e e

e e e e

MATRIX stiff

rowcol

units Nm Nm Nm Nm

e e e e

e e e e

e e e e

e e e e

MATRIX myload

rowcol

units sec kN

e e

e e

e e

details of myload matrix deleted

e e

e e

e e

MATRIX response

rowcol

units sec cm Jou

e e e

e e e

e e e

details of response matrix deleted

e e e

e e e

e e e

Points to note are

Figures and are timehistory plots of the ro of level displacement and total

system energy versus time Given that the duration of external loading is only

seconds see Figure and that we have delib erately ignored structural damping

it is reassuring to see that total energy is conserved exactly b eyond time

seconds You should also observe that the natural p erio d of vibration in Figure

closely approximates seconds the lowest natural p erio d of vibration in the

structure 6

4

2

0 Displacment (cm) −2

−4

−6 0 1 2 3 4 5 6

Time (seconds)

Figure Newmark Integration Lateral Displacement of Ro of cm versus Time sec

700

600

500

400

300 Total Energy (Joules)

200

100

0 0 1 2 3 4 5 6

Time (sec)

Figure Newmark Integration Total Energy Joules versus Time sec

Metho d of Mo dal Analysis

Let b e a n p nonsingular matrix p n and Yt b e a p matrix of

timevarying generalized displacements The ob jective of the metho d of mo dal analysis

is to nd a transformation

X t Y t

that will simplify the direct integration of equations The mo dal equations are

obtained by substituting equations into and then premultiplying by

T

The result is

T T T T

MY t CY t KY t P t

The notation in may b e simplied by dening the generalized mass matrix as

 T  T

M M the generalized damping matrix as C C the generalized stiness

 T  T

matrix as K K and the generalized load matrix as P t Pt Substituting

these denitions into equation gives

   

M Y t C Y t K Y t P t

The transformation is deemed to b e eective if the bandwidth of matrices in

is much smaller than in equations From a theoretical viewp oint there may b e

many transformation matrices which will achieve this ob jective a judicious choice of

will work much b etter than many other transformation matrices

however

To see how the metho d of mo dal analysis works in practice consider the free

vibration resp onse of an undamp ed system

MX t KX t

where M and K are n n mass and stiness matrices We p ostulate that the time

history resp onse of may b e approximated by a linear sum of p harmonic solutions

p p

X X

A sinw t Y t y t X t

i i i i i i

i=1 i=1

where y t is the ith comp onent of Y t and is the ith column of The amplitude

i i

and phase angle for the ith mo de are given by A and resp ectively b oth quantities

i i

may b e determined from the initial conditions of the motion We solve the symmetric

eigenvalue problem

K M

for and is a p p diagonal matrix of eigenvalues

2 2 2

w w diag diag w

1 2 p

p 2 1

It is well known that the eigenvectors of problem will b e orthogonal to b oth the

mass and stiness matrices This means that the generalized mass and stiness matrices

will have zero terms except for diagonal terms The generalized mass matrix takes the

form



m

1



m

2



M



m

p

and the generalized stiness lo oks like

2 

w m

1 1

2 

w m

2 2



K

2 

w m

n p

If the damping matrix C is a linear combination of the mass and stiness matrices then



the generalized damping matrix C will also b e diagonal A format that is very convenient

for computation is



w m

1 1 1



w m

2 2 2



C



w m

n n p

where is the ratio of critical damping for the ith mo de of vibration

i

For the undamp ed vibration of a linear multidegree of freedom system the eigen

 

valuevector transformation is ideal b ecause it reduces the bandwidth of M C and



K to In other words the eigenvaluevectors transform equation from n coupled

equations into p p n uncoupled single degreeoffreedom systems The required com

putation is simplied b ecause the total timehistory resp onse may now b e evaluated in

two relatively simple steps

Computation of the timehistory resp onses for each of the p single degreeoffreedom

systems followed by

Combination of the SDOFs resp onses into the timehistory resp onse of the complete

structure

A numb er of computational metho ds are available to compute the time variation of dis

placements in each of the single degree of freedom systems From a theoretical viewp oint

it can b e shown that the total solution or general solution for a damp ed system is given

by

y t B t sinw t C t cosw t

i i id i id

q

2

where w w is the damp ed circular frequency of vibration for the ith mo de

id i

i

The timevariation in co ecients B t and C t is given by

i i

Z

t

y w y

i

w w t

i i i

P e cos w d B t e

id i



w w m

0

id d

i

Z

t

w t w

i i i i

y and C t e P e sinw d

i id



w m

0

id

i

where y and y are the initial displacement and velo city for the ith mo de

i i

If the details of P are simple enough then analytic solutions to may

b e p ossible For most practical problems eg earthquake ground motions however

numerical solutions to B t and C t must b e relied up on A second approach and the

i i

one that will b e followed here is to use Newmark Integration to compute the displacements

for each of the individual mo des

Numerical Problem We demonstrate the metho d of mo dal analysis by rep eating the

timehistory computation dened in the previous section Details of the shear building

and external loading are shown in Figures and

Input File The input le for mo dal analysis is a little more involved than the input le

needed for Newmark Integration This is due in part to need to transform the equations

of equilibrium to a simplier co ordinate frame b efore the main lo ops of mo dal analysis

b egin

In the input le that follows generalized mass and stiness matrices are

generated by rst computing the transformation matrix corresp onding to the

rst two eigenvectors in the shear building The elements of the generalized mass and

stiness matrices are zero except for diagonal terms In principle each of the decoupled

equations may b e solved as single degreeoffreedom systems in practice however it is

computationally simplier to use the metho d of Newmark integration to solve b oth sets of

decoupled equations together

START OF INPUT FILE

a Parameters for Modal Analysis and embedded Newmark Integration

noeigen

dt sec

nsteps

beta

gamma

b Form Mass and stiffness matrices

mass ColumnUnits

kg

stiff ColumnUnits

kNm

PrintMatrixmass stiff

c First two eigenvalues periods and eigenvectors

eigen Eigenstiff mass noeigen

eigenvalue Eigenvalueeigen

eigenvector Eigenvectoreigen

fori i noeigen i i

print Mode i w eigenvaluei

print T PIsqrteigenvaluei n

PrintMatrixeigenvector

d Generalized mass and stiffness matrices

EigenTrans Transeigenvector

Mstar EigenTransmasseigenvector

Kstar EigenTransstiffeigenvector

PrintMatrix Mstar

PrintMatrix Kstar

e Generate and print external sawtooth external loading matrix First and

second columns contain time sec and external force kN respectively

myload ColumnUnits Matrix sec

myload ColumnUnits myload kN

fori i i i

myloadi idt

myloadi i kN

fori i i i

myloadi idt

myloadi i kN

fori i i i

myloadi idt

myloadi i kN

PrintMatrixmyload

f Initialize system displacement velocity and load vectors

displ ColumnUnits Matrix m

vel ColumnUnits Matrix msec

eload ColumnUnits Matrix kN

g Initialize modal displacement velocity and accn vectors

Mdispl ColumnUnits Matrix noeigen m

Mvel ColumnUnits Matrix noeigen msec

Maccel ColumnUnits Matrix noeigen msecsec

g Allocate Matrix to store five response parameters

Col time sec

Col st mode displacement cm

Col nd mode displacement cm

Col st nd mode displacement cm

Col Total energy Joules

response ColumnUnits Matrixnsteps sec

response ColumnUnits response cm

response ColumnUnits response cm

response ColumnUnits response cm

response ColumnUnits response Jou

h Compute and compute LU decomposition effective mass

MASS Mstar Kstarbetadtdt

lu DecomposeMASS

i ModeDisplacement Solution for Response of Undamped MDOF System

fori i nsteps i i

i Update external load

ifi then

eload myloadi

else

eload kN

Pstar EigenTranseload

R Pstar KstarMdispl Mveldt Macceldtdtbeta

i Compute new acceleration velocity and displacement

Maccelnew SubstitutionluR

Mvelnew Mvel dtMaccelgamma gammaMaccelnew

Mdisplnew Mdispl dtMvel betaMaccel betaMaccelnewdtdt

i Update and print new response

Maccel Maccelnew

Mvel Mvelnew

Mdispl Mdisplnew

i Combine Modes

displ eigenvectorMdispl

vel eigenvectorMvel

i Compute Total System Energy

e Transvelmassvel

e Transdisplstiffdispl

energy e e

i Save components of timehistory response

responsei idt Time

responsei eigenvectorMdispl st mode displacement

responsei eigenvectorMdispl nd mode displacement

responsei displ st nd mode displacement

responsei energy System Energy

j Print response matrix and quit

PrintMatrixresponse

quit

Points to note are

In Part a of the input le the variables nstep and dt are initialized for timesteps

of seconds The Newmark parameters and ie input le variables gamma

and beta are set to and resp ectively

Overall b ehavior of the system is represented by global mass and stiness

matrices A transformation matrix is computed by solving equation

for the rst two eigenvectors As a result we exp ect that the generalized

mass and stiness will b e diagonal matrices

The main lo op of our mo dal analysis employs Newmark integration to compute the

timehistory resp onse for the two decoupled equations

Abbreviated Output File The abbreviated output le contains only the essential

details of output generated by the mo dal analysis These details include the rst two

mo de shap es of the shear building the generalized mass and stiness matrices and heavily

edited versions of matrices myload and response

START OF ABBREVIATED OUTPUT FILE

MATRIX mass

see Newmark output for details of mass

MATRIX stiff

see Newmark output for details of stiff

SUBSPACE ITERATION CONVERGED IN ITERATIONS

Mode e w radsec T sec

Mode e w radsec T sec

MATRIX eigenvector

rowcol

units

e e

e e

e e

e e

MATRIX Mstar

rowcol

units kg kg

e e

e e

MATRIX Kstar

rowcol

units Nm Nm

e e

e e

MATRIX myload

rowcol

units sec kN

e e

e e

details of external load removed

e e

e e

MATRIX response

rowcol

units sec cm cm cm Jou

e e e e e

e e e e e

details of response matrix removed

e e e e e

e e e e e

Points to note are

Figures and show the timehistory resp onse for the rst and second mo des

resp ectively Notice that the amplitude of vibration for the rst mo de is an order

of magnitude larger than for the second mo de You should also observe that after

the external load nishes at time seconds the amplitude of vibration is con

stant within each mo de with the natural p erio ds of vibration closely matching the

eigenvaluesp erio ds shown in Figure

The combined rst second mo dal resp onse versus time is shown in Figure It

timedisplacement curve is virtually identical to that computed with the metho d of

Newmark integration

The time variation in total energy versus time is shown in Figure One b enet

of emb edding Newmark inside the mo dal equations is that energy is conserved for

each if the mo des For the integration b eyond time seconds the total energy

is conserved at Joules This quantity compares to Joules for the complete

Newmark computation 6

4

2

0 Displacement ( cm ) −2

−4

−6 0 1 2 3 4 5 6

Time ( seconds )

Figure Mo dal Analysis First Mo de Displacement of Ro of cm versus Time sec

0.8

0.6

0.4

0.2

0

−0.2 Displacement ( cm )

−0.4

−0.6

−0.8 0 1 2 3 4 5 6

Time ( seconds )

Figure Mo dal Analysis Second Mo de Displacement of Ro of cm versus Time sec 6

4

2

0 Displacement ( cm ) −2

−4

−6 0 1 2 3 4 5 6

Time ( seconds )

Figure Mo dal Analysis First Second Mo de Displacement of Ro of cm versus

Time sec

700

600

500

400

300 Total Energy ( Joules ) 200

100

0 0 1 2 3 4 5 6

Time ( seconds )

Figure Mo dal Analysis Total Energy Joules versus Time sec

Part III

FINITE ELEMENT LIBRARY

Chapter

Finite Element Analysis Language

Intro duction

In this chapter we describ e ALADDINs builtin functions for the solution of nite

element problems Builtin function are provided for a the generation of nite element

meshes b the denition of external loads c the sp ecication of b oundary conditions

d the sp ecication of section and material prop erties and e linking nite element

degrees of freedom

With the nite element mesh in place we can then compute solutions to a partic

ular linearnonlinear nite elment problem using the algorithms describ ed in the previous

chapters To assist the engineer with basic nite element computations builtin functions

are also provided for the assembly of global stiness matrices global mass matrices and

external load vectors An engineer may query the nite element database for informa

tion on the nite element mesh section and material prop erties and on the computed

displacements and stresses Together these facilities provide an engineer with the means

to write ALADDIN input les that will compare the p erformance of a structure against

families of design rules

Structure of Finite Element Input Files

The following diagram is a schematic of the main comp onents in an ALADDIN

input le suitable for the sp ecication and solution of a nite element problem

START OF INPUT FILE

A description of the finite element problem goes here

Part Problem specification parameters

StartMesh

Part Generate finite element mesh Specify section and material

properties external loads and boundary conditions

EndMesh

Part Describe solution procedure for finite element problem

Part If applicable check performance of structure against

design rules

Part If applicable generate arrays of output that are suitable

for plotting with MATLAB

quit

Every ALADDIN input le should b egin with a description of the les purp ose and who

wrote it

The problem sp ecication parameters allow an engineer to state whether a nite

element problem will b e two or three dimensional the maximum numb er of degree of

freedom p er no de and the maximum numb er of no des p er element With this information

in place StartMesh allo cates the working memory for the nite element data structures

ALADDIN statements are written for the nite element mesh generation for the

section and material prop erties the sp ecication of external loads and for the b oundary

conditions in Part of the input le Often the overall size of a nite element mo del can

b e reduced by linking degrees of freedom functions to link no dal degrees of freedom are

also sp ecied in Part Endmesh loads the information provided in Part into the

nite element database

Part usually b egins with the assembly of the global stiness matrix an external

vectors and if applicable assembly of a global mass matrix The algorithms presented

in the previous chapters eg newmark integration mo dal analysis optimization pro

cedures can b e inserted here to solve a sp ecic linearnonlinear staticdynamic nite

element problem

In Parts and ALADDIN statements are written for design rule checking

and for the output of arrays that are suitable for plotting with MATLAB ALADDIN

input le should b e terminated with the command quit

Problem Sp ecication Parameters

ALADDINs sp ecication parameters are

NDimension is short for numb er of dimensions For two and threedimensional

nite element analyses NDimension equals and resp ectively

NDofPerNode is short for Maximum numb er of degrees of freedom p er no dal co or

dinate When NDimension equals NDofPerNode will take the value And when

NDimension equals NDofPerNode will equal

MaxNodesPerElement corresp onds to the maximum numb er of no des p er nite ele

ment

InPlaneIntegPts corresp onds to the numb er of inplane integration p oints for shell

nite elements

ThicknessIntegPts numb er of layers of integration p oints through thickness direc

tion of shell nite elements

These parameter settings are used in the allo cation of memory for the nite element mesh

Short Example In this short example we initialize the problem sp ecication parame

ters for a threedimensional analysis of a structure with an eightno de shell nite element

ABBREVIATED INPUT FILE

a Define Problem Specific Parameters

NDimension

NDofPerNode

MaxNodesPerElement etc

Adding No des and Finite Elements

Two functions AddNode and AddElement are employed for the generation of

nite element no dal co ordinates and the attachment of nite elements to the no des

vector Here nodeno is the no de numb er in the AddNode nodeno coord

vector is nite element mesh For twodimensional nite element problems coord

a matrix containing the x y no dal co ordinates When the nite element

vector is a matrix containing the x problem is threedimensional coord

y z no dal co ordinates

AddElmt elmtno connect vector name of elmt attr Here elmtno is

the element numb er in the nite element mesh connect vector is a n

matrix containing a list of n no des to which the nite element will b e attached

name of elmt attr is the attribute name representing the nite elements mate

rial and section prop erties for details see Section

Short Example Figure shows a twodimensional co ordinate system and a line of

six nite element no des connected by no de b eam nite elements The no des are lo cated

at yco ordinate m and are spaced along the xaxis at m centers b eginning at x

m and nishing at x m

y (m) 1 1 2 3 4 5 1 2 3 4 5 6

1 2 3 4 5 6 x (m)

Figure Line of No dal Co ordinates and Beam Finite Elements

ALADDINs lo oping constructs are ideally suited for sp ecication of the nite ele

ment no des in a compact manner and for the attachment of the twono de nite elements

ABBREVIATED INPUT FILE

print Generate grid of nodes for finite element model nn

nodeno

x m y m

whilex m

nodeno nodeno

AddNodenodeno x y

x x m

print Attach finite elements to nodes nn

elmtno nodeno

whileelmtno

elmtno elmtno nodeno nodeno

AddElmt elmtno nodeno nodeno nameofelmtattr

In the rst half of the script no dal co ordinates are added to ALADDINs database

Notice how in the second blo ck of co de we have used the notation nodeno nodeno

to generate matrices containing the no de numb ers that elmtno will b e attached

to

Material and Section Prop erties

The attributes of element section and material typ es are sp ecied with three

functions ElementAttr SectionAttr and MaterialAttr followed by parameters

inserted b etween braces f g The details of each function are

ElementAttrname of element attr f g Here name of elmt attr is a

character string for the name of the element attribute used in function calls to

AddElmt Three character string arguments should b e sp ecied b etween the

braces

D for two dimensional type is a name for the nite element typ e eg FRAME

frame elements A list of nite element typ es may b e found in Section

Character strings for the section and material attributes may taken from the

section le sectionh and the material le materialh or may b e userdened

with SectionAttr and MaterialAttr

SectionAttrname of section attr f g Here name of section attr is

a character string for the name of the section attribute Table contains a list of

section prop erty names their meaning and the units asso ciated with each prop erty

of material attr f g Here name of material attr MaterialAttrname

is a character string for the name of the material attribute Table contains a

list of material prop erty names their meaning and the units asso ciated with each

prop erty

When the numb er of lo cal degrees of freedom in a nite element no de is fewer than the

numb er of global degrees of freedom at the no de to which it is attached a mapping

must b e provided from the lo cal to global dof The syntax for such a mapping is

map ldof A to gdof B

where A and B are n matrices We will see for example that when plate nite

elements type PLATE are employed in a threedimensional mesh a suitable mapping

is map ldof to gdof This sp ecication is provided as a fourth entry

to ElementAttr

Short Example The following script loads a nite element attribute called o orelmts

into ALADDINs database The o orelmts attribute has three comp onents the nite

D for twodimensional b eam column nite elements The element typ e is set to FRAME

elements section and material prop erties are dened via links to the section attribute

o orsection and the material attribute o ormaterial

ABBREVIATED INPUT FILE

print Define element section and material properties nn

ElementAttrfloorelmts type FRAMED

section mysection

material ELASTIC

SectionAttrfloorsection Ixy m

Iyy m

Ixx m

Izz m

depth m

width m

MaterialAttrfloormaterial E E kNm

density E kgm

poisson

yield psi

You should notice that the section and material prop erties comp onents are supplied as

required by the FRAME D element sp ecications describ ed in Section

Two functions GetSection and GetMaterial are provided for the retrieval of sec

tion and material prop erties GetSectionelmtno takes as its argument a

matrix containing the element no It returns a matrix of section prop erties

Matrix Element Quantity Description

Ixx Moment of inertia about xx axis

Iyy Moment of inertia about yy axis

Izz Moment of inertia about zz axis

Ixz Product of inertia xz

Ixy Product of inertia xy

Iyz Product of inertia yz

weight Section weight

bf Width of flange

tf Thickness of flange

depth Section depth

area Section area

thickness Thickness of plate

torconst Torsional Constant J

rT Section radius of gyration

width Section width

tw Thickness of web

Similarly GetMaterialelmtno takes as its argument a matrix containing the

element no It returns a matrix of material prop erties

Name Description Units M L T

2

area Area of cross section L

depth Depth of section L

thickness Thickness of section L

4

Ixx Moment of inertia ab out xx axis L

4

Iyy Moment of inertia ab out yy axis L

4

Izz Moment of inertia ab out zz axis L

4

Ixy and Iyx Moment of inertia ab out xy axes L

4

Ixz and Izx Moment of inertia ab out xz axes L

4

Iyz and Izy Moment of inertia ab out yz axes L

rT Radius of Gyration L

tw Width of web L

tf Width of ange L

4

J Torsional Constant L

width Width of section L

Table Section Prop erties

Matrix Element Quantity Description

E Youngs modulus

G Shear modulus

Fy Yield stress

ET Tangent Youngs Modulus

nu Poissions ratio

density Material density

Fu Ultimate stress

thermal xdirection coeff of thermal expansion

thermal ydirection coeff of thermal expansion

thermal zdirection coeff of thermal expansion

Note An engineer should b e careful to make sure that a particular material or section

prop erty is used in a way that is consistent with the actual materialsection typ e For

example GetSection will return a thickness comp onent for all element typ es even

though the concept do es not apply to two and threedimensional b eam nite elements

Name Description Units M L T

1 1 2

E Youngs mo dulus of elasticity M L T

1 1 2

Et Tangent mo dulus of elasticity M L T

0 0 0

p oisson Poissons ratio M L T

0 0 0

density Material density M L T

0 0 0

yield Yield Stress F M L T

y

0 0 0

ultimate Ultimate Stress F M L T

u

0 0 0

n Strain Hardening Exp onent M L T

0 0 0

alpha Parameter for Ramb ergOsgo o d relationship M L T

0 0 0

b eta Parameter for strain hardening b eta for kinematic M L T

hardening b eta for isotropic hardening

0 0 0

ialph Rotation constant ialph implies none ialph M L T

implies Hughes rotation constant

0 0 0

p en Penalty constant M L T

Table Material Prop erties

Boundary Conditions

The b oundary condition is controled through FixNode function For each degree

of freedom DOF an index or is used to indicate the xed DOF or free DOF The

syntax for FixNode is

vector Here nodeno is the no de numb er to which the FixNodenodeno bc

b oundary condition will b e applied bc vector bc bc bc is either a

1 2 3

matrix or a matrix bc or i is the ith degree of freedom dof bc

i i

stands for constraint for that dof while bc for no constraint for that dof

i

Short Example This script xes the b oundary conditions of a nite element mesh at

no des through

ABBREVIATED INPUT FILE

a Apply boundary conditions

dx dy dz

rx ry dz

bcond dx dy dz rx ry rz

for iNode iNode iNode iNode

FixNode iNode bcond

We have used the variables dx dy and dz to represent translational displacements in

the x y and z directions resp ectively and the variables rx ry and rz for rotational

displacement ab out the x y and z axes A zero value of the matrix element means that

the degree of freedom remain unrestrained A nonzero value means that fullxity applies

to the degree of freedom Hence no des through are xed in their translational degrees

of freedom and pinned in the three rotational degrees of freedom

External No dal Loads

vector External no dal loads are sp ecied with the function NodeLoadnodeno load

The function NodeLoadnodeno load vector may b e used to apply external

loads to no de numb er nodeno Here load vector F F M for twodimensional

x y xy

problems and load vector F F F M M M for threedimensional prob

x y z xy y z z x

lems

Short Example The following script adds two translational forces and one moment

to no des through in a twodimensional nite element mesh

ABBREVIATED INPUT FILE

FxMax lbf Fy lbf Mz lbin

for iNode iNode iNode iNode

Fx iNodeFxMax

NodeLoad iNode Fx Fy Mz

External no dal loads are applied in the xdirection b eginning at lbf at no de and

increasing linearly to lbf at no de A gravity load Fy lbf is applied

to each of the no des through

Stiness Mass and External Loading Matrices

The next step after the details of the nite element mesh have b een fully sp ecied

is to calculate the nite element prop erties and to assemble them into an equilibrium

system For structural nite element analyses this step involves calculation of the stiness

and mass matrices and an external load vector Three nite element library functions

Stiff Mass and ExternalLoad for these purp oses

Massmassflag where massag is either or Therefore the Mass

command can b e used as mass Mass mass Mass or more explicitly

as Lump ed mass MassLump ed Consist mass MassConsist

Stiff Sti calculate the linear elastic stiness matrix

ExternalLoad ExternalLoad calculate the external no dal loads

Short Example In the following script of co de mass is the global mass matrix stiff

is the global stiness matrix and eload is a vector of external no dal loads applied to the

nite element global degrees of freedom

ABBREVIATED INPUT FILE

a Form Mass matrix stiffness matrix and external load vector

mass Mass

stiff Stiff

eload ExternalLoad

Note The three functions Mass Stiff and ExternalLoad should b e called only

after the function call to EndMesh for details on the exp ected inputle layout see

Section

Internal Loads

In the development of many numericalnite element algorithms we need to know the

distribution of externally applied no dal forces that will pro duce a given displacement

pattern

InternalLoaddisplacement Calculate the internal no dal loads for given dis

placement Where displacement is a matrix vector contains no dal displacement

InternalLoaddisplacement IncrementalDisplacement The two argument ver

sion of InternalLoad computes the internal no dal load increments for a given dis

placement and displacement increment Here displacement and IncrementalDisplacement

are the matrix vectors for the no dal displacement and incremental displacement

This is function is designed for nonlinear analysis

Short Example In Part a of the following script we a call Copy to make a

copy of the global stiness matrix b decomp ose the stiness matrix into a pro duct of

upp er and lower triangular matrices c compute the external load vector d solve the

system of equations via forward and backward substitution and nally e setup a delta

displacement vector with the rst entry equal to and all other entries equal to

zero

ABBREVIATED INPUT FILE

a Compute initial displacement and displacement increment

lu DecomposeCopystiff

eload ExternalLoad

displ Substitutionlu eload

deltadispl Zerosize

deltadispl

b Internal load for initial displacement plus displacement increment

iload InternalLoaddispl deltadispl

In the second half of this script InternalLoad computes the internal no dal loads for

the displacement vector displ plus delta displ

Retrieving Information from ALADDIN

We have written two families of functions that query ALADDINs database for

information on the nite element mesh and b ehavior of a particular nite element mo del

Together these functions may b e used for design rule checking and for the preparation

of matrix output that is compatible with input to MATLAB graphics The latter could

b e a plot of the nite element mesh contours of displacements stresses and so forth

The functions that will retrieve information on the nite element mesh are

GetCoordnodeno takes as its input a matrix containing the no de numb er

For twodimensional nite element problems GetCoord returns a x matrix

m m xy A matrix is returned for threedimensional elements

m m m xyz

GetDofnodeno is short for get degree of freedom Get the matching global de

grees of freedom numb er for a no de It returns a xn matrix n equals to the num

b er of degrees of freedom in the no de For twodimensional b eamcolumn elements

dx dof dy dof rz FOr the three n and m m m dof

dimensional frame element n and mmmmmm

dof dxdof dydof dzdof rxdof rydof rz A negative numb er in the output ma

trix indicates the asso ciated degree of freedom is xed

GetNodeelmtno retrieves a matrix n of no de numb ers connected to nite

element elmtno n equals to the numb er of no des in the element For example n

for D and D b eam element and n for the no de shell element The matrix

will b e in the same order as you input the no des connection in AddElmt

Similarly the functions for retrieving information on the b ehavior of a nite element

mo del are

GetDisplnodeno displ m is short for get displacement and takes as input

a no de numb er and the calculated displacement matrix Get the structural no dal

displacements It returns a xn matrix nequals to the numb er of degrees of

freedom in the no de For twodimensional b eam elements n and m

m m displ xdispl yrot z Similarly for threedimensional frame

elements n and m m m m m m displ x

displ y displ z rot x rot y rot z

matrix accepts as its input ana element GetStresselmtnodisplac eme nt

numb er and the calculated displacement matrix This function gets the no dal forces

for the element

In ALADDIN Version this function only works for D and D b eam elements

It returns a mxn matrix m equals to the numb er of no des in the element n equals

to the numb er of degrees of freedom in a no de For example mxnx for D

b eam element

node Fx Fy Mz

node Fx Fy Mz

mxnx for D beam element

node Fx Fy Fz Mx My Mz

node Fx Fy Fz Mx My Mz

The order of the no des is dened in the no des connection matrix in AddElmt

These functions will b e demonstrated in Chapter

Library of Finite Elements

Currently the following nite elements are available

PLANE STRESSPLANE STRESS Two dimensional no de plane stressplane

strain element

8 6

7 5 L K y x

I J 1 3

2 4

Figure Schematic of Plane Stress Plane Strain Finite Element

May b e used to mo del linear elastic materials

Section Prop erties and Material Prop erties Youngs mo dulus E Poissons ratio

Density for dynamic analyses Element typ e PLANE STRESS or PLANE STRAIN No

section prop erties are needed

Example

ABBREVIATED INPUT FILE

beamlength m

beamwidth m

beamheight m

nodeno elmtno

whileelmtno

elmtno elmtno

AddElmt elmtno nodeno nodeno nodeno nodeno nameofelmtattr

nodeno i

input statements removed

FRAME D Two dimensional no de frame or b eamcolumn element

2 y 5 3 x 6 1 4

I J

Figure Schematic of Two Dimensional Frame Element

Each no de has two translational and one rotational degree of freedom May b e used for

mo deling of linear elastic materials

Section Prop erties and Material Prop erties The section prop erties are Moment of

inertia Izz and crosssection area alternatively the cross section are is computed from

the section width or bf times the depth The material prop erties are Youngs mo dulus

E Poissons ratio and density Note the density may b e omitted when a default

Ib eam section is referenced from the AISC sections header le sectionh Element typ e

D FRAME

Example

ABBREVIATED INPUT FILE

end floorno bayno

end end

AddElmt elmtno end end mybeam

input code removed

ElementAttrfloorbeam type FRAMED

section mysection

material mymaterial

SectionAttrfloorsection Izz in

Iyy in

depth in

width in

area in

MaterialAttrfloormaterial density E lbin

poisson

yield ksi

E ksi

FRAME D Three dimensional no de frame or b eamcolumn element

3 9 4 6 12 10 5 7 1 11 z y 2 I 8 J

x

Figure Schematic of Two Dimensional Frame Element

Each no de has three translational and three rotational degrees of freedom May b e used

for mo deling of linear elastic materials

Section Prop erties and Material Prop erties The section prop erties include mo

ments of inertia Izz and Iyy and the crosssection area The crosssection area may

also b e computed from the section depth times its width or bf The torsional constant

and radius of gyration are dened by parameters J and rT resp ectively The material

prop erites are Youngs mo dulus E Poissons ratio and the density Note the den

sity may b e omitted when a default Ib eam section is referenced from the AISC sections

D header le sectionh The element typ e is FRAME

Example

ABBREVIATED INPUT FILE

elmtno

whileelmtno

elmtno elmtno

AddElmt elmtno elmtno elmtno floorelmt

code deleted

ElementAttrfloorelmt type FRAMED

section mysection

material mymaterial

SectionAttrfloorsection Izz in

Iyy in

area in

depth in

width in

MaterialAttrfloormaterial same as for FRAMED example

GENERAL SHELL Three dimensional and no de ve degree of freedom general

shell elements linearnonlinear elasticplastic materials

15 20 18 12 19 13 16 17 11 L K 14

3 8 4 1 I J z 6 2 7 9 y 5 10

x

Figure Schematic of General Shell Element

The element formulation is describ ed in Chen and Austin

Section Prop erties and Material Prop erties The section attribute is thickness

alone The material prop erties are Youngs mo dulus E Poissons ratio and density

for dynamic analysis The following parameters apply for nonlinear analysis Yield

stress yield stressstrain parameters n alpha and beta and type Ramb ergOsgo o d or

PLASTIC material BiLinear or ELASTIC

The material typ es are ELASTIC ELASTIC PLASTIC and ELASTIC PERFECTLY PLASTIC

The element typ es for the four no de and eight no de shell elements are SHELL N

and SHELL N

Example

ABBREVIATED INPUT FILE

elmtno

nodeconnec

AddElmtelmtno nodeconnec nameofelmtattr

input code removed

ElementAttrnameofelmtattr type SHELLN

section mysection

material ELASTIC

MaterialAttrELASTIC density lbin

poisson

yield

E E psi

SectionAttrmysection thickness in

SHELL WITH DRILLING DEGREE OF FREEDOM A four no de at shell

element with six degrees of freedom p er no de It may b e used for mo deling of linear elastic materials

17 21 23 15 14 24 18 22 20 13 19 L K 16

3 9 6 4 12 1 I J 7 z 2 8 10

y 5 11

x

Figure Schematic of Flat Shell Finite Element

The theoretical formulation of this shell nite element and numerical examples of its

p erformance may b e found in the masters thesis of Lanheng Jin

Section Prop erties and Material Prop erties The section attribute is thickness

alone The material prop erties are Youngs mo dulus E Poissons ratio and Density

for dynamic analyses The element has two mo deling parameters ialpha and pen The

NQ element typ e is SHELL

Example

ABBREVIATED INPUT FILE

AddElmt elmtno a b b a bridgegirder

input code removed

ElementAttrbridgegirder type SHELLNQ

section girderflange

material STEEL

SectionAttr girderflange thickness in

STEEL is a material prop erty predened in materialh and loaded into the ALADDIN

database during the programs startup pro cedure

PLATE Four no de discrete kircho quadrilateral DKQ plate element Each no de has

three degrees of freedom two rotations and a lateral displacement as shown in Figure

10 7

12 9 11 8 K L

1 4

I J 5 z 2 3 6 y

x

Figure Schematic of Plate Finite Element

Section Prop erties and Material Prop erties The section prop erty is plate thickness

The material prop erties include Youngs mo dulus E and Poissons ratio The element

PLATE typ e is DKT

Example

ABBREVIATED INPUT FILE

connect

AddElmt elmtno connect nameofelmtattr

input statements removed

ElementAttrnameofelmtattr type DKTPLATE

section mysection

material ELASTIC

map ldof to gdof

SectionAttrmysection thickness in

MaterialAttrELASTIC density lbft

poisson

yield

E psi

Currently this element do es not have a mass matrix

Chapter

Input Files for Finite Element

Analysis Problems

In this chapter we exercise ALADDINs nite element capabilities by working

through four problem in detail The nite element problems are

A linear static analysis of a ve story moment resistant frame The frame supp orts

gravity loads plus a mo derate lateral load

A linear timehistory earthquake analysis of the ve story frame describ ed in Item

The timehistory resp onse is generated by a El Centro ground motion

An AASHTO working stress design of a comp osite highway bridge girder with rule

checking built into the input le

A linear elastic three dimensional analysis of span highway bridge Again the bridge

is mo deled with the four no de shell element Moment envelop es are computed for a

gravity loads plus a moving truck live load

The analyses in problems and include moving live loads The application of AL

ADDIN to the solution of nonlinear static analyses with an no de shell element is rep orted

in Chen and Austin

Linear Static Analyses

Analysis of Five Story Moment Resistant Frame

Description of Problems We b egin with a linear static analysis of a ve story steel

moment resistant frame A front elevation view of the frame with dimensions and prelim

inary section sizes is shown in Figure We will assume that this frame is one in a row

of frames spaced at ft centers as shown in Figure FLOOR 1 FLOOR 2 FLOOR 3 FLOOR 4 ROOF Figure TRIBUTARY AREA 12 324 23 22 21 4 8 3 12 7 16 2 11 20 6 15 1 10 1 19 5 14 2 9 18 3 13 4 17 5 Figure 0f 5f 20ft 15ft 20 ft FRAME INTERNAL A 1 2 f.BY = 5 t BAY 3 =20ft. BAY2=15ft. BAY 1=20ft. Elev 12 23 26 22 29 25 32 21 28 35 24 31 27 34 30 33 ation Plan View View 6 7 8 9 10 of Fiv of Fiv e Story e Story 11 12 13 14 15 Planar Building Steel F rame 16 17 18 19 20

20 ft 20 ft 10 ft 10 ft 10 ft 10 ft 10 ft

The frame is constructed with two steel section typ es and one material typ e The

4 4

columns are of typ e UC with I in I in and cross section

z z y y

2 4

area in The b eams are of section typ e UB with I in I

z z y y

4 2

in and cross section area in The b eams and columns have Youngs Mo dulus

ksi and yield stress ksi

The frame will b e analyzed for gravity loads plus a mo derate lateral earthquake

load Wind and other loads are omitted for simplicity The sp ecied dead load is

2 2 2

lbfft and the sp ecied live load lbfft for the four o ors and lbfft for

the ro of We will assume that the tributary area for gravity loads is rectangular in shap e

with a uniform load distribution along each girder span of the frame With the frames

spaced ft apart it follows that o or gravity loads are kipsin and

kipsin on the ro of Total gravity loads are lbf

In this rst release of ALADDIN external loads may only b e applied to the no des

Consequently formulae for the xedend moments due to gravity loads must b e explicitly

included in the data le If the loading p er unit length is w and L is the span length

of the frame bay then the xed end shear force is w L and the xed end moment is

2

w L

Mo derate earthquake ground motions are mo deled with a psuedostatic lateral

force equal to of total gravity loads ie lbf The lateral forces are distributed

over the height of the frame as shown in Figure

We will assume full xity for the bases of the columns Each no de of the building

frame will b e mo deled with two translational and one rotational degree of freedom Axial

forces in the b eam elements are removed by lumping the horizontal degrees of freedom

at each o or level Together these assumptions imply displacement and rotational

degrees of freedom p er o or level leading to global stiness matrix

Input File The nite element mo del for the ve story momentresistant building frame

with external loads is dened and solved in the following a to h part input le

START OF INPUT FILE

Analysis of Five Story Steel Moment Resistant Frame

Written By Mark Austin October

a Setup problem specific parameters

NDimension

NDofPerNode

MaxNodesPerElement ROOF 21266.67 lbf

FLOOR 4 17013.33 lbf

FLOOR 3 12760.00 lbf

FLOOR 2 8506.67 lbf

FLOOR 1

4253.33 lbf

Figure Distribution of Lateral Loads for Mo derate Earthquake Ground Motions

StartMesh

b Generate twodimensional grid of nodes

node

for y ft y ft y y ft

for x ft x ft x x ft

b adjust column spacing for central bay

ifx ft

x x ft

b add new node to finite element mesh

node node

AddNodenode x y

c Attach column elements to nodes

elmtno

for colno colno colno colno

for floorno floorno floorno floorno

elmtno elmtno

end floorno colno

end end

AddElmt elmtno end end mycolumn

d Attach beam elements to nodes

for floorno floorno floorno floorno

for bayno bayno bayno bayno

end floorno bayno

end end

elmtno elmtno

AddElmt elmtno end end mybeam

e Define section and material properties

ElementAttrmycolumn type FRAMED

section mysection

material mymaterial

ElementAttrmybeam type FRAMED

section mysection

material mymaterial

SectionAttrmysection Izz in

Iyy in

depth in

width in

area in

SectionAttrmysection Izz in

Iyy in

depth in

width in

area in

MaterialAttrmymaterial density E lbin

poisson

yield ksi

E ksi

f Apply fullfixity to columns at foundation level

fornodeno nodeno nodeno nodeno

FixNode nodeno

LinkNode

LinkNode

LinkNode

LinkNode

LinkNode

g Compute equivalent nodal loads for distributed dead live loads plus

lateral wind loads

deadload lbfft

floorliveload lbfft

roofliveload lbfft

framespacing ft

for floorno floorno floorno floorno

g compute floorlevel and rooflevel uniform loads

liveload floorliveload

if floorno

liveload roofliveload

uniformload deadload liveloadframespacing

for colno colno colno colno

Fx lbf Fy lbf Mz lbin

g compute fixed end shear force for deadlive loads

if colno colno

Fy uniformload ft

if colno colno

Fy uniformload ft

g compute fixed end moments for deadlive loads

if colno

Mz uniformload ft ft

if colno

Mz uniformload ft ft

if colno

Mz uniformload ft ft

if colno

Mz uniformload ft ft

g compute horizontal force due to lateral loads

ifcolno

Fx floorno lbf

nodeno floorno colno

NodeLoad nodeno Fx Fy Mz

h Compile and Print Finite Element Mesh

EndMesh

PrintMesh

i Compute stiffness and external load matrices

eload ExternalLoad

stiff Stiff

displ Solvestiff eload

SetUnitsTypeUS

PrintDispldispl

PrintStressdispl

quit

Points to note are

In part a we sp ecify that this will b e a twodimensional analysis The maximum

numb er of degrees of freedom p er no de will b e three and the maximum numb er

of no des p er element will b e two The parameters NDimension NDofPerNode and

MaxNodesPerElement are used by ALADDIN to assess memory requirements for

the problem storage and solution

We use a nested for lo op and a single if statement to generate the planar layout

of nite element no des Before the b oundary conditions are applied the structure

has degrees of freedom In Section f we apply fullxity to each column at the

foundation level this reduces degrees of freedom from to

Abbreviated Output File The output le contains summaries of the mass and sti

ness matrices for the shear building and abbreviated details of the external loading

myload and the resp onse matrix response

START OF ABBREVIATED OUTPUT FILE

Title DESCRIPTION OF FINITE ELEMENT MESH

ProblemType Static Analysis

Profile of Problem Size

Dimension of Problem

Number Nodes

Degrees of Freedom per node

Max No Nodes Per Element

Number Elements

Number Element Attributes

Number Loaded Nodes

Number Loaded Elements

Node Xcoord Ycoord Tx Ty Rz

e ft E ft

e ft E ft

e ft E ft

e ft E ft

e ft E ft

details of nodal coordinates and modeling dof removed

e ft E ft

e ft E ft

e ft E ft

e ft E ft

e ft E ft

e ft E ft

Element Type node node ElementAttrName

FRAMED mycolumn

FRAMED mycolumn

FRAMED mycolumn

FRAMED mycolumn

details of element connectivity removed

FRAMED mybeam

FRAMED mybeam

FRAMED mybeam

Element Attribute Data

ELEMENTATTR No name mycolumn

section mysection

material mymaterial

type FRAMED

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e lbin

Inertia Izz e in

Area e in

ELEMENTATTR No name mybeam

section mysection

material mymaterial

type FRAMED

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e lbin

Inertia Izz e in

Area e in

EXTERNAL NODAL LOADINGS

Node Fx lbf Fy lbf Mz lbfin

End of Finite Element Mesh Description

Node Displacement

No displx disply rotz

units in in rad

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

details of displacements removed

e e e

e e e

e e e

e e e

MEMBER FORCES

Elmt No

Coords XY in in

exx e curva gamma e

Fx e lbf Fy e lbf Mz e lbfin

Fx e lbf Fy e lbf Mz e lbfin

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Coords XY in in

exx e curva gamma e

Fx e lbf Fy e lbf Mz e lbfin

Fx e lbf Fy e lbf Mz e lbfin

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Coords XY in in

exx e curva gamma e

Fx e lbf Fy e lbf Mz e lbfin

Fx e lbf Fy e lbf Mz e lbfin

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Coords XY in in

exx e curva gamma e

Fx e lbf Fy e lbf Mz e lbfin

Fx e lbf Fy e lbf Mz e lbfin

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Remark We have printed the internal element forces for the columns b etween the

foundation and the rst o or level The accuracy of the analysis can b e checked by making

sure the sum of column actions is balanced by the sum of external loads In the horizontal

direction we have

External Forces Shear Forces in Columns

Roof lbf

Floor lbf Element lbf

Floor lbf Element lbf

Floor lbf Element lbf

Floor lbf Element lbf

Total lbf Total lbf

And in the vertical direction we have

Gravity Loads Axial Forces in Columns

Roof lbf

Floor lbf Element lbf

Floor lbf Element lbf

Floor lbf Element lbf

Floor lbf Element lbf

Total lbf Total lbf

Remark The ve story moment resistant frame may b e mo deled as a shear structure

by xing the no dal rotations and vertical displacements at o ors to and lumping the

horizontal displacements at each o or level These tasks are accomplished by mo difying

Section f of the input le to

f Apply fullfixity to columns at foundation level

fornodeno nodeno nodeno nodeno

FixNode nodeno

fornodeno nodeno nodeno nodeno

FixNode nodeno

LinkNode

LinkNode

LinkNode

LinkNode

LinkNode

Overall displacements in the frame will now b e represented with ve global degrees of

freedom Details of the stiness and load vector are

MATRIX eload

rowcol

units

lbf e

lbf e

lbf e

lbf e

lbf e

SKYLINE MATRIX stiff

rowcol

units Nm Nm Nm Nm Nm

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

A summary of output is

Node Displacement

No displx disply rotz

units in in rad

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

details of displacements removed

e e e

e e e

e e e

e e e

MEMBER FORCES

Elmt No

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Elmt No

Axial Force xdirection e lbf

Shear Force ydirection e lbf

Fixing no dal rotations increases the overall stiness of the structure the result is lateral

displacements in the shear structure which are smaller than for the moment resistant

frame ie e inches versus e inches Again notice that shear forces

across the base of the structure are balanced by the external loads ie times e

lbf e lbf

Working Stress Design WSD of Simplied Bridge

Description of WSD Rule Checking Problem This example illustrates the ap

plication of ALADDIN to AASHTO Working Stress Design WSD co de checking We

will conduct a nite element analysis of a one span simply supp orted comp osite bridge

with cover plate under the girders and then apply the rule checking The analysis will b e

simplied by considering only an internal girder of the bridge system a plan and cross

sectional view of a typical bridge system is shown in Figures and

56.7’ c. to c. Bearing

7 @ 7.63

Figure Plan of Highway Bridge

Extracted Internal Girder 7" slab

3.5’ 7 @ 7.63’ 3.5’

Figure Typical Cross Section

The bridge girders are made of rolled b eam Wx with a steel cover plate

An elevation view of the bridge and the p osition of the steel cover plate is shown in Figure

The material prop erties are F ksi and E ksi The eective cross

y s

sectional prop erties of the comp osite steelconcrete girder with and without the cover

plate are computed with n E E The section prop erties are shown in Figure

s c

W33x130

cover plate 14"x3/4"

10.35’ 10.35’

Figure Elevation of Beam

12*7" = 84" 12*7" = 84"

7 in slab Haunch width = 19.5in N.A. Haunch depth = 1.86in N.A. y1 W33x130 W33x130 y2

cover plate 14"x3/4"

I1 = 17268.4 in 4 I2 = 25700.1 in 4

y1 = 29.40 in y2 = 27.31 in

Figure Section Prop erties n

The bridge is sub jected to dead and live external loadings The design dead load includes

inches concrete slab steel girder and sup erimp osed load The design live load consists

of a kips HS truck which will b e mo deled as a single concentrated load moving load

along the girder no des

Input File The singlespan bridge girder is mo deled with twodimensional b eamcolumn

nite elements

START OF INPUT FILE

Test input file for bridge design rule checking wsing Dbeam

element and static analysis

Written by WaneJang Lin June

print DEFINE PROBLEM SPECIFIC PARAMETERS nn

NDimension

NDofPerNode

MaxNodesPerElement

StartMesh

divno

print GENERATE GRID OF NODES FOR FE MODEL nn

length ft

covdis ft

dL lengthdivno

x ft y ft

for i xlength ii

AddNodei x y

x xdL

print ATTACH ELEMENTS TO GRID OF NODES nn

elmt

x ft

for i idivno ii then

if xcovdis xdLlengthcovdis

AddElmt elmt i i girder

else

AddElmt elmt i i girder

elmt elmt

x xdL

print DEFINE ELEMENT SECTION AND MATERIAL PROPERTIES nn

I in y in area in

I in y in area in

ElementAttrgirder type FRAMED

section nocover

material STEEL

ElementAttrgirder type FRAMED

section cover

material STEEL

SectionAttrnocover Izz I

area area

depth in

width in

SectionAttrcover Izz I

area area

depth in

width in

Setup Boundary Conditions dx dy rz

FixNode

FixNodedivno

Compile and Print Finite Element Mesh

EndMesh

PrintMesh

SetUnitsTypeUS

stiff Stiff

lu Decomposestiff

Add Dead Nodal Loads Fx Fy Mz

weight kipsft kipsft

load weightdL

for i idivno ii

NodeLoad i kips load kipsft

NodeLoad kips load kipsft

NodeLoad divno kips load kipsft

eload ExternalLoad

displ Substitutionlu eload

maxdispldead GetDispldivnodispl

maxmomdead GetStressdivnodispl

maxshdead GetStressdispl

covermomdead GetStressdispl

PrintMatrixmaxdispldeadmaxmomdeadmaxshdeadcovermomdead

Get Moment Diagram

momentdead Zero divno

for i idivno ii

temp GetStressidispl

if i momentdead temp

momentdeadi temp

PrintMatrixmomentdead

Zeroout dead loadings

for i idivno ii

NodeLoad i kips load kipsft

NodeLoad kips load kipsft

NodeLoad divno kips load kipsft

Add Live Truck Load Fx Fy Mz

step divno

influmidmom Zero step

influendsh Zero step

envelopmomlive Zero step

HS kips

momelmt divno

shelmt

for i istep ii

NodeLoad i kips HS kipsft

eload ExternalLoad

displ Substitution lu eload

midmom GetStress momelmt displ

endsh GetStress shelmt displ

if i then

momrang GetStress i displ

else

momrang GetStress i displ

Get moment influence line at the middle of span

influmidmomi midmom

Get Shear Influence line at the end support

influendshi endsh

Create envelope of moment influence line at the middle of span

if i then

envelopmomlive momrang

else

envelopmomlivei momrang

if i momelmt

maxdispllive GetDisplmomelmtdispl

maxmomlive GetStressmomelmtdispl

if i shelmt

maxshlive GetStressshelmtdispl

maxshlive maxshlive HS

influendsh HS

if i

covermomlive GetStressdispl

NodeLoad i kips HS kipsft

PrintMatrixmaxdispllivemaxmomlivemaxshlivecovermomlive

PrintMatrixinflumidmom influendsh envelopmomlive

Results for DL LLImpact

impact

print nimpact factor impactn

maxdispl maxdispldead impactmaxdispllive

maxmom maxmomdead impactmaxmomlive

maxsh maxshdead impactmaxshlive

covermom covermomdead impactcovermomlive

PrintMatrixmaxdisplmaxmommaxshcovermom

WSD Code Checking for Deflections and Stress Requirements

print nnSTART ASD CODE CHECKINGn

Deflection Checking

if impactmaxdispllive length then

print ntWarning LLI deflection exceeds spann

else

print ntOK LLI deflection less than spann

Moment Stress Checking

mymaterial GetMaterial

mysection GetSection

max stress without cover plate

stress covermomyI

max stress with cover plate in the middle of span

stress maxmomyI

if stress mymaterial then

print ntWarning moment stress without cover plate larger than Fyn

else

if stress mymaterial then

print ntWarning moment stress with cover plate larger than Fyn

else

print ntOK moment stress less than Fyn

Shear Stress Checking

shear maxshmysection

if shear mymaterial then

print ntWarning shear stress larger than Fyn

else

print ntOK shear stress less than Fyn

quit

Points to note are

In this example we check the analysis result with AASHTO WSD sp ecication The

impact factor for live load is based on the formula AASHTO Eq

I

L

in which

I impact fraction maximum p ercent

L length in feet of the p ortion of the span

The deection checking is based on AASHTO Art the deection due to service

live load plus impact shall not exceed of the span

The allowable stress is F for tension and compression memb er F for

y y

shear in web

Abbreviated Output File The op ening sections of the following output le contain

details of the no de element mesh The lefthand side of the girder is mo deled as a

pin xed against translation The righthand side of the girder is supp orted on a roller

The latter comp onents of the output le contain summaries of the shear and

moment envelop es together with maximum values of resp onse quantities

START OF ABBREVIATED OUTPUT FILE

Title DESCRIPTION OF FINITE ELEMENT MESH

ProblemType Static Analysis

Profile of Problem Size

Dimension of Problem

Number Nodes

Degrees of Freedom per node

Max No Nodes Per Element

Number Elements

Number Element Attributes

Number Loaded Nodes

Number Loaded Elements

Node Xcoord Ycoord Tx Ty Rz

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

e ft e ft

Element Type node node ElementAttrName

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

FRAMED girder

Element Attribute Data

ELEMENTATTR No name girder

section nocover

material steel

type FRAMED

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e null

Inertia Izz e in

Area e in

ELEMENTATTR No name girder

section cover

material steel

type FRAMED

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e null

Inertia Izz e in

Area e in

End of Finite Element Mesh Description

MATRIX maxdispldead

rowcol

units in in rad

e e e

MATRIX maxmomdead

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX maxshdead

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX covermomdead

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX momentdead

rowcol

units

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

MATRIX maxdispllive

rowcol

units in in rad

e e e

MATRIX maxmomlive

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX maxshlive

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX covermomlive

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX influmidmom

rowcol

units

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

MATRIX influendsh

rowcol

units

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

lbf e

MATRIX envelopmomlive

rowcol

units

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

lbfin e

impact factor

MATRIX maxdispl

rowcol

units in in rad

e e e

MATRIX maxmom

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX maxsh

rowcol

units lbf lbf lbfin

e e e

e e e

MATRIX covermom

rowcol

units lbf lbf lbfin

e e e

e e e

START ASD CODE CHECKING

OK LLI deflection less than span

OK moment stress less than Fy

OK shear stress less than Fy

A summary of the bridge resp onse is contained in Figures to The following

p oints are noted

Since this is a simplesupp orted bridge the maximum displacement and maximum

b ending moment will o ccur at the middle of the span The maximum shear force

will o ccur at the end supp ort

The nal results of moment shear and displacement are calculated according to

AASHTO ASD request Total DL impact LL

The stress due to b ending is given by

M y

Moment stress

I

Because there are two dierent section prop erties we have to calculate not only the

maximum moment stress in the middle of the span stress but also the moment

stress of where the section changed stress

V

Shear stress

tw d

We assume that the shear force is carried by the girder web alone and therefore

we only check for maximum shear at the end supp ort

The inuence line for the b ending moment at the middle of the span details are

shown in Figure is obtained by iteratively p ositioning one truck load at a nite

element no de then solving for the reaction forces A similar pro cedure is employed

to compute the inuence line of shear force at the end supp ort see Figure

Figure shows the distribution of b ending moments due to truck loadings we

note in passing that the b ending momend diagram corresp onds to an envelop e of

the moment inuence lines of the truck load

The follow array elements are used in the generation of program output

maxdispl the maximum displacement of the beam

maxmom the maximum moment

maxsh the maximum shear force

covermom the moment at where the bridge section changed 6 x 10 12

10

8

6 Moment (lbf*in)

4

2 Moment for Dead Load Moment Envelope of Truck Load

0 0 10 20 30 40 50

Bridge Span (ft)

Figure Moment Diagram of Dead Load and Truck Load 6 x 10 12

10

8

6 Moment (lbf*in)

4

2

0 0 10 20 30 40 50

Truck Location (ft)

Figure Inuence Line of Moment at MidSpan

4 x 10 7

6

5

4

Force (lbf) 3

2

1

0 0 10 20 30 40 50

Truck Location (ft)

Figure Inuence Line of Shear at End Supp ort

ThreeDimensional Analysis of Highway Bridge

Description of Bridge Problem In this section we will conduct a twopart analysis

of a threedimensional twospan highway bridge structure 4' 2" 16' 8"

100 ft. 100 ft. 4' 2"

FRAMING PLAN

100 ft. 100 ft.

FRONT ELEVATION

Figure Highway Bridge Plan and Front Elevation of TwoSpan Continuous High

way Bridge

7" CONCRETE SLAB

W36x170 W36x170

4' 2" 8' 4" 4' 2"

CROSS SECTION OF HIGHWAY BRIDGE

Figure Highway Bridge Cross Section of TwoSpan Continuous Highway Bridge

A plan and front elevation view of the highway bridge is shown in Figure The bridge High Figure Figure has view Con concrete structural in has the and in b deections t Node 13 Node 19 tin thic p cf f plot w w 31 51 718 17 16 15 14 13 of kip a o uous y The The kness the The spans ' "2 1 ' "2 1 ' "2 1 ' "2'1" 2'1" 2'1" 2'1" 2'1" 2'1" 2'1" 2' 1" concen slab the The Bridge steel l bf f t bridge 4' 2" High high b oundary bridge inuence High 0@1 t 10 t 10@ft=100ft. 10 @ft=100ft. High Wx f eac of in c trated in 0 has w w 2 the a h w a t w is y f y a The is a F y bridge sho 3 2 1 6 4 bridge y Bridge y conditions 12.03" liv constructed line Bridge Bridge ft steel wn girder 5 e psi long load for in will in due section ksi P the Figure t w oissons mo w b e The Plan to eigh for Cross P mo analyzed v gra from oissons es the width t has ving of vit along is ratio lefthand Section Finite one y the in oe 0 Node399 Node 203 Node 209 8' 4" load loads of for ratio l bf f t one and y steel v the follo t Elemen w alone of of bridge w sidee o wing v and eigh the loading x Finite In E t of t outer prop erties one part The is c Mesh the Elemen and conditions concrete concrete t 01 12 11 10 bridge 19 7 ft bridge w 12.03" o for lbfft E of 8 ksi t inc Tw Wx 9 the are girders Mesh material slab hes oSpan and The First Node 393 bridge a 4' 2" hinged w A unit for eighs concrete W ksi cross w Con t analysis e e Tw d yp e w compute compute supp ort eigh F tin oSpan section or uous pcf slab The

t 16' 8" the a

The righthand side of the bridge is supp orted on a roller The nite element mo del has

no des and shell elements After the b oundary conditions are applied the mo del

has dof The bridge is sub ject to a kip concentrated moving live load

Input File The following input le denes the bridge geometry b oundary conditions

nite element section and material typ es and the external loads due to the dead weight

of the bridge

START OF INPUT FILE

Analysis of Two Span Continuous Composite Beam ft assuming

neutral axis of concrete deck coincide with top girder flange

Written By WaneJang Lin December

a Setup problem specific parameters

print DEFINE PROBLEM SPECIFIC PARAMETERS nn

NDimension

NDofPerNode

MaxNodesPerElement

StartMesh

print GENERATE GRID OF NODES FOR FE MODEL nn

girder

span ft

spacing ft in

slab in

height in in

flange in

divL

divS

deltaL spandivL

deltaS spacingdivS

deltaf flange

deltah height

sectionno divL

nodespergirder

nodespersection nodespergirdergirder divS girder

node

x in

fori isectionno ii

x deltaLi

for j jgirder jj

y spacing spacingj

AddNode node x ydeltaf deltah

AddNode node x y deltah

AddNode node x ydeltaf deltah

AddNode node x ydeltaf deltah

AddNode node x y deltah

AddNode node x ydeltaf deltah

node node nodespergirder

yy spacing

for j jdivS jj

y spacing deltaSj

if yyy yyy

node node

AddNode node x y deltah

print ATTACH ELEMENTS TO GRID OF NODES nn

elmtno

a

b nodespersection

for i isectionno ii

for j jgirder jj

AddElmt elmtno a b b a girderflangeattr

AddElmt elmtno a b b a girderflangeattr

AddElmt elmtno a b b a girderwebattr

AddElmt elmtno a b b a girderflangeattr

AddElmt elmtno a b b a girderflangeattr

elmtno elmtno nodespergirder

a a nodespergirder

b b nodespergirder

a a

b b

for j jgirder jj

AddElmt elmtno a b b a deckattr

c b girderjnodespergirder j

d a girderjnodespergirder j

AddElmt elmtno a b c d deckattr

a d

b c

AddElmt elmtno a b b a deckattr

AddElmt elmtno a b b a deckattr

a a

b b

c c girderjnodespergirder j

d d girderjnodespergirder j

AddElmt elmtno a b c d deckattr

AddElmt elmtno d c c d deckattr

elmtno elmtno

a d

b c

print DEFINE ELEMENT SECTION AND MATERIAL PROPERTIES nn

ElementAttrgirderflangeattr type SHELLNQ

section girderflange

material STEEL

ElementAttrgirderwebattr type SHELLNQ

section girderweb

material STEEL

ElementAttrdeckattr type SHELLNQ

section deck

material concrete

SectionAttrgirderflange thickness in

SectionAttrgirderweb thickness in

SectionAttrdeck thickness in

MaterialAttrconcrete poisson

yield psi

E ksi

print SET UP BOUNDARY CONDITIONS nn

bchs hinged support

bcrs roller support

for i igirder ii

node nodespergirderi

FixNodenode bchs

node node divLnodespersection

FixNodenode bcrs

node node divLnodespersection

FixNodenode bcrs

b Apply Point Nodal Loads

print SET UP LOADS nn

slabload lbfftslab

girderweight lbfft

Fx lbf Fy lbf

Mx lbfin My lbfin Mz lbfin

b load for corner nodes of deck

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node nodespergirdergirder

NodeLoadnode nodalload

node node nodespersectionsectionno

NodeLoadnode nodalload

node node divS girder

NodeLoadnode nodalload

node node nodespersectionsectionno

NodeLoadnode nodalload

b load for edge nodes along xdirection

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node nodespersection nodespergirdergirder

for i isectionno ii

NodeLoadnode nodalload

NodeLoadnodedivSgirder nodalload

node node nodespersection

b load for edge nodes along ydirection

node

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node nodespergirdergirder divS

NodeLoadnode nodalload

node node nodespersectionsectionno

NodeLoadnode nodalload

node

Fz slabloaddeltaLdeltaSdeltaf

nodalload Fx Fy Fz Mx My Mz

node nodespergirdergirder

for i i ii

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

node node nodespersectionsectionno

node

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node

for i i ii

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

node node nodespersectionsectionno

node

Fz slabloaddeltaLdeltaf

nodalload Fx Fy Fz Mx My Mz

node

for i i ii

NodeLoadnode nodalload

NodeLoadnode nodalload

node node nodespersectionsectionno

b load for middle nodes

node

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node nodespergirdergirder divS

for i isectionno ii

node node nodespersection

NodeLoadnode nodalload

node

Fz slabloaddeltaLdeltaSdeltaf

nodalload Fx Fy Fz Mx My Mz

node nodespergirdergirder

for i isectionno ii

node node nodespersection

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

node

Fz slabloaddeltaLdeltaS

nodalload Fx Fy Fz Mx My Mz

node

for i isectionno ii

node node nodespersection

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

NodeLoadnode nodalload

node

Fz slabloaddeltaLdeltaf

nodalload Fx Fy Fz Mx My Mz

node

for i isectionno ii

node node nodespersection

NodeLoadnode nodalload

NodeLoadnode nodalload

b load for girder weight

end node

Fz girderweightdeltaL

nodalload Fx Fy Fz Mx My Mz

node

for i i ii

NodeLoadnode nodalload

NodeLoadnode nodalload

node node nodespersectionsectionno

middle node

Fz girderweightdeltaL

nodalload Fx Fy Fz Mx My Mz

node

for i isectionno ii

node node nodespersection

NodeLoadnode nodalload

NodeLoadnode nodalload

c Compile and Print Finite Element Mesh

EndMesh

PrintMesh

d Compute Stiffness Matrix and External Load Vector

print n

print COMPUTE AND PRINT STIFFNESS AND EXTERNAL LOAD MATRICES nn

SetUnitsTypeUS

eload ExternalLoad

stiff Stiff

e Compute and print static displacements

print n STATIC ANALYSIS PROBLEM nn

displ Solve stiff eload

PrintDispldispl

PrintStressdispl

quit

Abbreviated Output File Several thousand lines of output are generated by AL

ADDIN and the ab ovementioned input le dened Hence we present an abbreviated

summary of the output together with contour and threedimensional views of the bridge

deck deections

START OF ABBREVIATED OUTPUT FILE

Title DESCRIPTION OF FINITE ELEMENT MESH

ProblemType Static Analysis

Profile of Problem Size

Dimension of Problem

Number Nodes

Degrees of Freedom per node

Max No Nodes Per Element

Number Elements

Number Element Attributes

Number Loaded Nodes

Number Loaded Elements

Node Xcoord Ycoord Zcoord Dx Dy Dz Rx Ry Rz

e ft e ft e in

e ft e ft e in

e ft e ft e in

e ft e ft e in

details of nodal coordinates deleted

e ft e ft e in

e ft e ft e in

Element Type node node node node ElementAttrName

SHELLNQ girderflangeattr

SHELLNQ girderflangeattr

SHELLNQ girderwebattr

SHELLNQ girderflangeattr

details of shell finite elements removed

SHELLNQ deckattr

SHELLNQ deckattr

SHELLNQ deckattr

SHELLNQ deckattr

Element Attribute Data

ELEMENTATTR No name girderflangeattr

section girderflange

material STEEL

type SHELLNQ

dofmapping gdof gdof gdof

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e null

Inertia Izz e null

Area e null

ELEMENTATTR No name girderwebattr

section girderflange

material STEEL

type SHELLNQ

dofmapping gdof gdof gdof

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e ksi

Poissons ratio nu e

Density e null

Inertia Izz e null

Area e null

ELEMENTATTR No name deckattr

section deck

material concrete

type SHELLNQ

dofmapping gdof gdof gdof

gdof gdof gdof

Youngs Modulus E e ksi

Yielding Stress fy e psi

Poissons ratio nu e

Density e null

Inertia Izz e null

Area e null

EXTERNAL NODAL LOADINGS

Node Fx lbf Fy lbf Fz lbf Mx lbfin My lbfin Mz lbfin

details of nodal loads removed

End of Finite Element Mesh Description

COMPUTE AND PRINT STIFFNESS AND EXTERNAL LOAD MATRICES

STATIC ANALYSIS PROBLEM

Node Displacement

No displx disply displz rotx

units in in in rad

e e e e

e e e e

e e e e

e e e e

e e e e

e e e e

details of nodal displacements removed

e e e e

e e e e

e e e e

e e e e

e e e e

Figures and are contour and threedimensional views of the bridge deck de

ections resp ectively the vertical axis of the deection of Figure has the units of

inches The bridge deections are due to dead loads alone and since the bridge geome

try and section prop erties are symmetric we exp ect that the deections will also exhibit

symmetry They do 20

18

16

14

12

10

8

6

4

2

1 2 3 4 5 6 7 8 9

Figure Highway Bridge Contour Plot of Bridge Deck Deections

Bridge Deck Displacements

0.5

0

−0.5

−1

−1.5 25 20 10 15 8 10 6 4 5 2

0 0

Figure ThreeDimensional Mesh of Bridge Deck Deections

Moving Point Load Input File In Part of our analysis the latter sections of the

input le are extended so that resp onse evelop es are computed for a p oint load moving

along the bridge

LOAD DIRECTION 4' 2" 16' 8"

10 LOAD INCREMENTS @ 10 FT 10 LOAD INCREMENTS @ 10 FT 4' 2"

FRAMING PLAN LOAD DIRECTION

100 ft. 100 ft.

FRONT ELEVATION

Figure Plan and Front Elevation of TwoSpan Continuous Highway Bridge with

Moving Live Load

Figure shows plan and elevation views of the bridge and moving p oint load A

cross sectional view of the bridge and the moving p oint load is shown in Figure

Abbreviated details of the input le are as follows

START OF INPUT FILE

Analysis of Two Span Continuous Composite Beam ft analysis

assuming neutral axis of concrete deck coincide with top girder flange

Moving load along one girder

Written By WaneJang Lin December

a Setup problem specific parameters 1000 KIPS [ MOVING LOAD ]

W36x170 W36x170

4' 2" 8' 4" 4' 2"

CROSS SECTION OF HIGHWAY BRIDGE WITH MOVING LIVE LOAD

Figure Cross Section of TwoSpan Continuous Highway Bridge with Moving Live

Load

NDimension

NDofPerNode

MaxNodesPerElement

StartMesh

print GENERATE GRID OF NODES FOR FE MODEL nn

details are the same as in static analysis datafile

print ATTACH ELEMENTS TO GRID OF NODES nn

details are the same as in static analysis datafile

print DEFINE ELEMENT SECTION AND MATERIAL PROPERTIES nn

details are the same as in static analysis datafile

print SET UP BOUNDARY CONDITIONS nn

details are the same as in static analysis datafile

b Compile and Print Finite Element Mesh

EndMesh

PrintMesh

c Compute Stiffness Matrix

SetUnitsTypeUS

stiff Stiff

d Compute Influence Lines for Moving Live Loads

print n STATIC ANALYSIS PROBLEM nn

Fx lbf Fy lbf Fz kips

Mx lbfin My lbfin Mz lbfin

nodeno

nodeno

step divL

print node no nodenon

print node no nodenon

print Fz Fzn

print step stepn

influline Zero step array for influence line

influline Zero step array for influence line

loadnode

lu Decompose stiff

for i istep ii

NodeLoad loadnode FxFyFzMxMyMz

eload ExternalLoad

displ LUDecomposition stiff eload

nodedispl GetDispl nodeno displ

nodedispl GetDispl nodeno displ

influlinei nodedispl

influlinei nodedispl

NodeLoad loadnode FxFyFzMxMyMz

loadnode loadnode nodespersection

PrintMatrixinfluline

PrintMatrixinfluline

quit

Figure shows the inuence line of vertical displacement in the middle of one span

ie at no de no for the rst girder sub jected to kips moving live load Similarly

Figure shows the inuence line of displacement in the middle of one span ie no de

no due to the kips moving live load

The moving load analysis is one situation where a family of linear equations is

solved with multiple righthand sides With this in mind notice how we have called

the function Decompose once to decomp ose stiff into a pro duct of upp er and lower

triangular matrices and then called LUDecomposition to compute the forward and

backward substitution for each analysis This strategy of equation solving reduces the

overall solution time by approximately 10

5

0

−5

−10

−15 Vertical deflection (in)

−20

−25

−30 0 20 40 60 80 100 120 140 160 180 200

First girder coordinate (ft)

Figure Inuence line of displacement in the middle of one span for the rst girder

sub jected to kips moving live load

6

4

2

0

−2

−4

Vertical deflection (in) −6

−8

−10

−12 0 20 40 60 80 100 120 140 160 180 200

Middle girder coordinate (ft)

Figure Inuence line of displacement in the middle of one span for the second girder

TimeHistory Analyses

Mo dal Analysis of Five Story Steel Frame

Description of Problems In this section we compute the linear timehistory resp onse

of the steel frame structure describ ed in Section to dead and live gravity loads plus

a El Centro Earthquake ground motion scaled to mo derate intensity

55 ft

ROOF 5

FLOOR 4 4

FLOOR 3 3 50 ft FLOOR 2 2

FLOOR 1 1

Full Fixity

Xg ( t ) Xg ( t )

ELEVATION VIEW OF STEEL FRAME SIMPLIFIED MODEL

Figure Elevation View and Simplied Mo del of Moment Resistant Frame sub ject to

Scaled El Centro Earthquake

The lefthand side of Figure is a simplied elevation view of the frame also shown in

Figure Unlike the analysis conducted in Section we will assume that all no dal

rotations and vertical deections of the frame are fully restrained and that the horizontal

deections across each o or may b e lump ed into a single degree of freedom Together these

assumptions imply that each o or will move as a rigid b o dy in the horizontal direction

and that the global frame b ehavior may b e describ ed with only ve degrees of freedom

The righthand side of Figure shows the simplied mo del that will b e used in the

earthquake timehistory analysis the shaded lled b oxes represent the lump ed masses

at each o or level and the global degrees of freedom b egin at the rst o or level and

increase to the ro of

Figure shows details of a segment accelerograph extracted from the El

Centro Earthquake ground motion The p eak ground acceleration is cmsecsec

The ground motion will b e scaled so that the p eak ground acceleration is g

Input File The following input le is based on the input le presented in Section 0.8

0.6

0.4

0.2

0

−0.2

−0.4 Ground Acceleration (m/sec/sec) −0.6

−0.8

−1 0 1 2 3 4 5 6 7 8 9 10

Time ( seconds )

Figure Ground Acceleration for El Centro Earthquake

with appropriate extensions for the earthquake analysis and generation of timehistory

resp onse quantities for p ostanalysis plotting

START OF INPUT FILE

Modal Analysis of Five Story Steel Moment Frame subject to

El Centro ground motion

Written By Mark Austin July

a Setup problem specific parameters

NDimension

NDofPerNode

MaxNodesPerElement

StartMesh

b Generate twodimensional grid of nodes

same as for five story building

c Attach column elements to nodes

same as for five story building

d Attach beam elements to nodes

same as for five story building

e Define section and material properties

ElementAttrmrfelement type FRAMED

section mrfsection

material mrfmaterial

SectionAttrmrfsection Izz in

Iyy in

depth in

width in

area in

MaterialAttrmrfmaterial density kgm

poisson

yield MPa

E MPa

f Apply fullfixity to columns at foundation level

fornodeno nodeno nodeno nodeno

FixNode nodeno

fornodeno nodeno nodeno nodeno

FixNode nodeno

LinkNode

LinkNode

LinkNode

LinkNode

LinkNode

g Compile and Print Finite Element Mesh

EndMesh

PrintMesh

h Compute stiffness matrix manually assemble mass matrices

stiff Stiff

PrintMatrixstiff

mass Zero

mass ColumnUnits mass Nm

mass RowUnits mass sec

i Manually assemble mass matrix assume dead live loads

deadload lbfft

floorliveload lbfft

roofliveload lbfft

framespacing ft

floorlength ft

tributaryarea framespacing floorlength

fori i i i

ifi then

floorload tributaryarea deadload floorliveload

else

floorload tributaryarea deadload roofliveload

mass ii massii floorload ftsec

PrintMatrixmass

j Compute and print eigenvalues and eigenvectors

noeigen

eigen Eigenstiff mass noeigen

eigenvalue Eigenvalueeigen

eigenvector Eigenvectoreigen

fori i noeigen i i

print Mode i w eigenvaluei

print T PIsqrteigenvaluei n

PrintMatrixeigenvector

k Generalized mass and stiffness matrices

EigenTrans Transeigenvector

Mstar EigenTransmasseigenvector

Kstar EigenTransstiffeigenvector

PrintMatrix Mstar

PrintMatrix Kstar

m Setup Rayleigh Damping for Frame Structure

rdamping

W sqrt eigenvalue

W sqrt eigenvalue

A rdampingWWW W

A rdampingW W

print A A A A n

Cstar AMstar AKstar

PrintMatrix Cstar

n Define earthquake loadings

Elcentro ColumnUnits

details of earthquake removed

cmsecsec

groundmotionscalefactor

PrintMatrix Elcentro

o Initialize system displacement velocity and load vectors

displ ColumnUnits Matrix m

vel ColumnUnits Matrix msec

eload ColumnUnits Matrix kN

r One

p Initialize modal displacement velocity and accn vectors

Mdispl ColumnUnits Matrix noeigen m

Mvel ColumnUnits Matrix noeigen msec

Maccel ColumnUnits Matrix noeigen msecsec

q Allocate Matrix to store five response parameters

Col time sec

Col st mode displacement cm

Col nd mode displacement cm

Col st nd mode displacement cm

Col Total energy Joules

dt sec

nsteps

beta

gamma

response ColumnUnits Matrixnsteps sec

response ColumnUnits response cm

response ColumnUnits response cm

response ColumnUnits response cm

response ColumnUnits response Jou

r Compute and compute LU decomposition effective mass

MASS Mstar rdampingdtCstar Kstarbetadtdt

lu DecomposeCopyMASS

s ModeDisplacement Solution for Response of Undamped MDOF System

MassTemp massr

fori i nsteps i i

print Start Step in

ifi

SetUnitsOff

s Update external load

ifi then

eload MassTempElcentroigroundmotionscalefactor

else

eload MassTempgroundmotionscalefactor

Pstar EigenTranseload

R Pstar KstarMdispl Mveldt Macceldtdtbeta

CstarMvel Macceldtgamma

s Compute new acceleration velocity and displacement

Maccelnew SubstitutionluR

Mvelnew Mvel dtMaccelgamma gammaMaccelnew

Mdisplnew Mdispl dtMvel betaMaccel

betaMaccelnewdtdt

s Update and print new response

Maccel Maccelnew

Mvel Mvelnew

Mdispl Mdisplnew

s Combine Modes

displ eigenvectorMdispl

vel eigenvectorMvel

s Compute Total System Energy

a Transvel

a Transdispl

e amassvel

e astiffdispl

energy e e

s Save components of timehistory response

responsei idt Time

responsei eigenvectorMdispl st mode displacement

responsei eigenvectorMdispl nd mode displacement

responsei displ st nd mode displacement

responsei energy System Energy

t Print response matrix and quit

SetUnitsOn

PrintMatrixresponse

quit

Points to note are

Notice that we have used the nite element routines to compute the stiness matrix

but have manually assembled the mass matrix It is assumed that when the earth

quake o ccurs the frame loads will equal the dead loading plus the full live loading

The tributary area equals the frame spacing ft times the frame width ft

The global mass and stiness matrices are matrices The timehistory analysis

is simplied by computing the Newmark integration on the rst and second mo des

of the frame alone The generalized mass and stiness matrices are as describ ed in

Section

The damping matrix is taken as a linear combination of the generalized mass and

stiness matrices namely

  

C a M a K

o 1

Let w and b e the circular natural frequency and ratio of critical damping in

m m

the mo de m and w and b e the circular natural frequency and ratio of critical

n n

damping in the mo de n It can b e shown that the co ecients a and a are given

1 2

by

w w

w w a

m n

n m m 1

2 2

w w a

w w

n m n 2

n m

For this analysis we will let m and n and assume that the critical ratio of

damping is the same in b oth mo des The input le variable rdamping represents the

ratio of critical damping in the rst and second mo des Analyses will b e conducted

for rdamping and rdamping

The timehistory analysis is based on the Newmark equations given in Section

and the mo dal analysis equations sp ecied in Section At each step the analysis

we compute solutions to the equation of equilibrium

T T T T T

MY t CY t KY t P t MrX t

g

Here M C and K are as previously dened r is a that describ es the

movement in each of the frame degrees of freedom due to a unit ground displacement

in this case r vector of ones X t is the ground acceleration at time t

g

The resp onse is computed for steps of timestep seconds ie seconds

The rst lo op of analysis is conducted with the units checking turned on thereafter

the units are switched o Constant acceleration across each timestep is achieved

by setting the Newmark parameters and see Section for a

detailed discussion on the Newmark metho d

At the end of each timestep we compute the sum of kinetic plus p otential energy for

the frames rst two mo des Theoretical considerations indicate that when

and the total energy of the undamp ed system will b e conserved after the

earthquake motion has stopp ed ie the last seconds of the computed resp onse

We have allo cated a by resp onse matrix to stored selected comp onents of the

timehistory resp onse See the input le for a description of the contents in each

column

Abbreviated Output File The following output le is a summary of the output

generated for the simulation case rdamping

START OF ABBREVIATED OUTPUT FILE

Title DESCRIPTION OF FINITE ELEMENT MESH

Profile of Problem Size

Dimension of Problem

Number Nodes

Degrees of Freedom per node

Max No Nodes Per Element

Number Elements

Number Element Attributes

Number Loaded Nodes

Number Loaded Elements

Node Xcoord Ycoord Tx Ty Rz

e ft e ft

e ft e ft

e ft e ft

e ft e ft

details of nodal coordinates removed

e ft e ft

Element Type node node ElementAttrName

FRAMED mrfelement

FRAMED mrfelement

details of frame elements removed

FRAMED mrfelement

FRAMED mrfelement

Element Attribute Data

ELEMENTATTR No name mrfelement

section mrfsection

material mrfmaterial

type FRAMED

gdof gdof gdof

Youngs Modulus E e MPa

Yielding Stress fy e MPa

Poissons ratio nu e

Density e kgm

Inertia Izz e in

Area e in

End of Finite Element Mesh Description

SKYLINE MATRIX stiff

rowcol

units Nm Nm Nm Nm Nm

e e e e e

e e e e e

e e e e e

e e e e e

e e e e e

MATRIX mass

rowcol

units Nm Nm Nm Nm Nm

sec e e e e e

sec e e e e e

sec e e e e e

sec e e e e e

sec e e e e e

SUBSPACE ITERATION CONVERGED IN ITERATIONS

Mode w sec T sec

Mode w sec T sec

MATRIX eigenvector

rowcol

units

e e

e e

e e

e e

e e

MATRIX Mstar

rowcol

units Nm Nm

sec e e

sec e e

MATRIX Kstar

rowcol

units Nm Nm

e e

e e

A sec A sec

MATRIX Cstar

rowcol

units kgsec kgsec

sec e e

sec e e

MATRIX response

rowcol

units sec cm cm cm Jou

e e e e e

e e e e e

details of response matrix removed for details see the figures

e e e e e

e e e e e

Matrices Mstar and Kstar in the program output corresp ond to the generalized mass

and stiness matrices resp ectively We exp ect that the computed eigenvectors will b e

orthogonal with resp ect to the mass and stiness matrices and hence the generalized

mass and stiness matrices will b e nearly diagonal we see that in practice some

roundo errors o ccur

The rst and second mo des of vibration have natural p erio ds sec and

sec resp ectively When the frame is undamp ed co ecients a and a evaluate to

o 1

zero as exp ected

Figures to summarize the timehistory resp onse of the undamp ed mo

ment resistant frame Figure is the time history resp onse for mo de Figure the

time history resp onse for mo de and Figure the time history resp onse for mo des

and combined Figure plots the kinetic plus p otential energy of the frame you

should notice that once the ground motion has ceased at t seconds the Newmark

metho d conserves energy

Figures and plot the total timehistory resp onse and energy when the

frame has damping After the ground motion has ceased the ro of displacement

decreases steadily to zero You can easily observe that b etween t seconds and t

seconds the ro of oscillates through approximately cycles This implies an approximate

natural frequency of seconds 0.6

0.4

0.2

0 Displacement (cm) −0.2

−0.4

−0.6 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis First Mo de Displacement of Ro of cm versus Time sec

0.08

0.06

0.04

0.02

0

−0.02 Displacement (cm) −0.04

−0.06

−0.08

−0.1 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis Second Mo de Displacement of Ro of cm versus Time sec 0.5

0.4

0.3

0.2

0.1

0

−0.1 Displacement (cm)

−0.2

−0.3

−0.4

−0.5 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis First Second Mo de Displacement of Ro of cm versus

Time sec

9000

8000

7000

6000

5000

4000

Total Energy (Joules) 3000

2000

1000

0 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis Total Energy Joules versus Time sec 0.4

0.3

0.2

0.1

0

Displacement (cm) −0.1

−0.2

−0.3

−0.4 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis at damping First Second Mo de Displacement of Ro of

cm versus Time sec

4500

4000

3500

3000

2500

2000

Total Energy (Joules) 1500

1000

500

0 0 2 4 6 8 10 12

Time (seconds)

Figure Mo dal Analysis at damping Total Energy Joules versus Time sec

Part IV

ARCHITECTURE AND DESIGN

Chapter

Data Typ es Physical Quantity and

Matrix Data Structures

Intro duction

Basic engineering quantities such as length mass and force are dened by a

numerical value numb er itself plus physical units The imp ortance of the engineering

units is well known Unfortunately physical units are not a standard part of mainstream

nite element software packages indeed most engineering software packages simply

assume that engineering units will b e consistent and leave the details of checking to

engineer in the writers exp erience it is not uncommon for engineers to overlo ok this

detail While this practice of implementation may b e satisfactory for computation of

well established algorithms it is almost certain to lead to incorrect results when engineers

are working on the development of new and innovative computations

ALADDIN deviates from this trend by supp orting the basic data typ e physical

quantity as well as matrices of physical quantities Engineers may dene units as part

of the problem description and manipulate these quantities via standard arithmetic and

matrix op erations Any set of valid engineering units can b e used For example mm cm

m km and in are all valid units of length In this chapter we discuss the data structures

used to implement physical quantities and matrices of physical quantities Sp ecial storage

techniques for large symmetric matrices are also mentioned

Physical Quantities

Any physical unit can b e decomp osed into basic units The four basic units needed

for engineering analysis are length unit L mass unit M time unit t and temp erature

unit T Any engineering unit can b e obtained with the following combinations

unit k L M t T

where are exp onents and k is the scale factor For units of length and mass

and resp ectively Nondimensional quan

tities ie numb ers degrees and radians are given by the family of zero exp onents

With this basic units in place we can dene the units data struc

ture as

define SI

define US

define SIUS

typedef struct dimensionalexponents

char unitsname units name

double scalefactor scaleconversion factor

double lengthexpnt exponent for length

double massexpnt exponent for mass

double timeexpnt exponent for time

double tempexpnt exponent for temperature

int unitstype US or SI units

DIMENSIONS

The character string stores the unit name and scale factor the scale factor with resp ect

to a basic unit For example in US units the basic unit of length is inch It follows that

will b e the scale factor for one fo ot The units typ e ag allows for the representation of

various systems of units eg SI US and combined SI US SI US units are those shared

by b oth US and SI systems the two most imp ortant examples b eing time and non

dimensional units We use variables of data typ e double to represent exp onents thereby

05

avoiding mathematical diculties in manipulation of quantities For example if x y

the unit exp onents of x If the units exp onents were

x x x x y y y y

dened as integers then x would b e incorrectly truncated to

x x x x

With the units data structure in place the quantity data structure is simply dened as

typedef struct engineeringquantity

double value

DIMENSIONS dimen

QUANTITY

Notice that physical units alone are the sp ecial case of a quantity with numerical value

Relationship b etween Quantity and Units

In engineering applications there is no need to distinguish b etween dierent sys

tems of units during calculation The main use of units is for clarication of problem

input and problem output ALADDIN stores a physical quantity as an unscaled value

with resp ect to a set of reference units and by default all quantities are stored internally

in the SI units system In the SI system the reference set of units are meter m for

C for temp erature length kilogram kg for mass second sec for time and deg

Supp ose for example that we dene the quantity x km one kilometer

Because km m x will b e saved internally as value In the data structure

DIMENSIONS units name will p oint to the character string km The scale factor for

km with resp ect to reference unit m is Now lets see what happ ens when we

print x Because the output value valuescale factor print x will still give

km

US and SI Units Conversion

Scale factors are needed to convert units in US to SI and vice versa All quantities

in US units must b e converted into SI b efore they can b e used in calculations Fortunately

for most sets of units only a single scale factor is needed to convert a quantity from US

into SI and vice versa eg in mm E m

The imp ortant exception is temp erature units Conversion of temp erature units is

o o

complicated by the nonlinear relationship b etween systems that is x F x F since

o o

x F x C In other words the value and unit of a temp erature quantity

can not b e treated separately We have to know the value of temp erature b efore we can

convert its units from one to another unit system ALADDIN handles this problem by

o

rst installing the deg F unit for F with scale factor into symb ol table When

the value a numb er and the unit are combined into a quantity we convert the deg F into

C When a temp erature quantity is printed out we need to convert its units to the deg

prefered units A related complication is units for temp erature increment One degree of

temp erature increase is dierent from one degree temp erature To see how this problem

o o o

arises let y F If y is a one degree temp erature increase then y F F

o

C where is value of previous temp erature If on the other hand y is at one degree

o o

Fahrenheit temp erature then y C C Similar diculties crop

o

up in the computation of temp erature gradient mm F can only b e considered as

o

a mm extension for one Fahrenheit degree temp erature increase which is mm C

o o

This cannot b e considered as mm F which is mm C divisions of

this kind in real engineering computations are meaningless To avoid these confusions a

new set of units are chosen for temp erature increments they are DEG F and DEG C

to distinguish from deg F and deg C The conversion b etween DEG F and DEG C is

o

DEG F DEG C And for simplicity we will ignore the case of mm F

Library Functions for Internal Op erations on Units ALADDIN also provides

functions for internal op erations on units example functions include copying units

obtaining default units checking consistency of units simplifying the units name after

various op erations calculating the length of units name and printing of units For a

summary of functions see Table Note Some mathematical functions such as

logx lnx or expx cannot have units in their argument lists Other mathematical

functions such as sine and cosine can only have degree or radian in their arguments

Functions for Units Op erations

Function Purp ose of Function

SameUnits Check if two units are of same typ e

UnitsMult Multiply two units

UnitsDiv Divide two units

UnitsCopy Make a copy of a unit

UnitsPower compute a unit raised to a p ower

UnitsNegate Negate a unit d d

UnitsPrint Print name scalefactor typ e and exp onents of a unit

ZeroUnits Initialize a unit

DefaultUnits Determine p ointer on symb ol table for a given unit name

UnitsSimplify Simplify unit name string with simple character string

RadUnitsSimplify Convert a nondimensional unit into a radian unit

UnitsLength Measure the total length of several units names

ConvertTempUnits Convert temp erature units b etween SI and US systems

UnitsConvert Convert units b etween US and SI systems except for

temp erature units

Table Functions for Units Op erations

Matrices

ALADDINs matrix mo dule has following features

It supp orts wide range of matrix op erations data typ es integer double and complex

and storage metho ds In this section only the double and indirect storage metho ds

are discussed The skyline matrix for large degree of freedom will b e discussed in

next section

It allows users to dynamic allo cate and deallo cate the memory of matrix

It provides the units for each element of the matrix

Our strategy of development is to devise a software framework that will allow any com

bination of data typ e and storages scheme to b e implemented

Matrix Name

MATRIX *spM Matrix Parameters. Column units buffer

Union containing int, double, COMPLEX.

BODY OF MATRIX

Row units buffer

Figure Layout of Memory in Matrix Data Structure

Figure shows a highlevel layout of memory for the matrix data structure Details of

the matrix data structure are as follows

Data Structures for Matrices of Engineering Quantities

typedef struct

double dReal dImaginary

COMPLEX

typedef enum

INTEGERARRAY

DOUBLEARRAY

COMPLEXARRAY

DATATYPE

typedef enum

SEQUENTIAL

INDIRECT

SKYLINE

SPARSE

INTERNALREP

typedef struct MATRIX

char cpMatrixName name

int iNoRows norows

int iNoColumns nocolumns

DIMENSIONS spRowUnits rowunitsbuf

DIMENSIONS spColUnits colunitsbuf

INTERNALREP eRep storage type

DATATYPE eType data type

union

int iaa

double daa

COMPLEX caa

uMatrix

MATRIX

Memory is provided for a character string to the matrix name two integers for the numb er

of matrix rows and columns two onedimensional arrays of data typ e DIMENSIONS and

integer ags for the basic data typ e and storage scheme for matrix elements The union

uMatrix contains p ointers to matrix b o dies of integers doubles and COMPLEX elements

For the purp ose of this study however we will implement and describ e algorithms for

TYPE equals DOUBLE ARRAY data typ e double plus units alone ie DATA

Row Units Buffer Pa.m Pa.m Pa.m2 Column Units Buffer

10 5 12 A 5 5 7

m 12 7 13

Figure Matrix with Units Buers

The units for elements in a matrix are stored in two onedimensional arrays of data

typ e DIMENSIONS One array stores column units and the second array row units The

th

units for matrix element at row i and column j is simply the pro duct of the i element

th

of the row units buer and the j element of column units buer Figure shows

for example a x stiness matrix Elements A pam Nm A

2 2

pam N and A pam m Nm This strategy for storing units not

only requires much less memory than complete elementbyelement storage of units but it

reects the reality that most engineering matrices are in fact convenient representations

of equations of motion and equlibrium The units of individual terms in these equations

must b e consistent

double **daa daa[0] daa[0][0] daa[0][1] daa[0][2] ......

daa[1] daa[1][0] daa[1][1] daa[1][2] ...... daa[2]

daa[2][0] daa[2][1] daa[2][2] ...... daa[3]

daa[4] daa[3][0]daa[3][1] daa[3][2] ......

...... daa[4][0] daa[4][1] daa[4][2] ......

......

Figure Matrix b o dy for Indirect Storage Pattern

Matrices generated through the command language and le input are stored with

an INDIRECT storage pattern Details of the latter storage pattern are shown in Figure

Skyline Matrix Storage

The metho d of skyline storage is suitable for large symmetric matrices which

are sparsely p opulated by nonzero elements along or close to the matrix diagonal

ALADDIN uses skyline storage for matrices generated during nite element analysis To

illustrate the general idea of skyline storage consider A given by

A

We rst note that indirect storage of A would require a array of p ointers plus six

onedimensional arrays each containing elements of data typ e double On an engineering Array of Pointers

double **daa

Column Hights 1 2 1 4 5 3 Diagonal Elements 10 45 3 1 4 20 4 0 6 34 1 0 3

9 0 3

Column Number 1 2 3 4 5 6

Figure Metho d of Skyline Storage for Symmetric Matrix

workstation where p ointers are bytes bytes are needed for the matrix b o dy The

metho d of skyline storage reduces memory requirements by taking advantage of matrix

symmetries and storing in each column only those matrix elements from the matrix

diagonal to the upp ermost nonzero element The distance b etween the diagonal and

the last nonzero element is called the column height Figure shows the layout of

memory for skyline storage of matrix A In each column memory is allo cated for the

memory for the size of column height plus one with the height stored in the rst

element of the corresp onding array The second comp onent of the column array stores

the matrix diagonal and the last element the upp ermost nonzero element in the array

The column height is needed for computation of matrix op erations for example matrix

element iRowNo iColumnNo is accessed and printed with the formula

ik MIN iRowNo iColumnNo

im MAX iRowNo iColumnNo

ifimik spAuMatrixdaaim

printf e spAuMatrixdaa im imik

else

printf e

Here MIN and MAX are macros that return the minimum and maximum of two input

arguments resp ectively

Functions in Matrix Library Table contains a summary of matrix functions

provided by ALADDIN During matrix op erations consistency of units is checked as is

compatibility of matrix dimensions Readers should notice the subtle dierence b etween

function pairs MatrixAdd and MatrixAddReplace MatrixSub and MatrixSubRe

place and MatrixMult and MatrixMultReplace In the functions MatrixInverseIt

eration and MatrixHouseHolder matrices A and B must b e symmetric

Matrix Function and Purp ose

Function Purp ose of Function

MatrixAllo c Allo cate memory for matrix

MatrixFree Free memory for matrix

MatrixPrint Print content of matrix

MatrixCopy Make a copy of matrix

MatrixTransp ose Compute transp ose of matrix

MatrixAdd Compute sum of two matrices C A B

MatrixSub Compute dierence of two matrices C A B

MatrixMult Compute pro duct of matrices

MatrixNegate Negate matrix B A

MatrixAddReplace Replacement sum of two matrices A A B

MatrixSubReplace Replacement dierence of two matrices A A B

MatrixMultReplace Replacement pro duct of two matrices A AB

MatrixNegateReplace Negate matrix replacement A A

MatrixSubstitute Substitute small matrix into larger matrix

MatrixExtract Extract small matrix from larger matrix

MatrixSolve Solve linear equations Afxg fbg

1

MatrixInverse Compute matrix inverse A

MatrixInverseIteration Use inverse iteration to solve symmetric eigenvalue

problem Afxg B fxg for lowest eigenvalue and

eigenvector

MatrixHouseHolder Use Householder transformation and QL Algorithm to

solve Afxg fxg

Table Selected Matrix Op erations

Units Buers for Matrix Multiplication

The handling of units in multiplication of two dimensional matrices needs sp ecial

attention Let A b e a p q matrix with row units buer a a a and column units

1 2 p

buer b b b And let B b e a q r matrix with row units buer c c c

1 2 r 1 2 q

and a column units buer d d d The units for elements A and B are a b

1 2 q ik k j i k

and c d resp ectively Moreover let C b e the pro duct of A and B From basic linear

k j

algebra we know that C A B with summation implied on indice k The units

ij ik k j

accompanying C are a b c d for k q Due to the consistency condition

ij i k k j

P

q

all of the terms in A B must have same units Put another way the exp onents

ik k j

k =1

of units must satisfy the pro duct constraint a b c d a b c d a b c d The

i 1 1 j i 2 2 j i q q j

units for C are a b c d

ij i 1 1 j

units b1 b2 .... bk .... bq units d1 d2 .... dj .... dr a1 c1 a2 c2 A B ai Aik ck Bkj

ap cq

units d1b1 d2b1 .... djb1 .... drb1 a1c1 a2c1 A * B C aic1 C ij

apc1

Figure Units Buer Multiplication of Two Matrices

The units buers for matrix C are written as a row units buer a c a c a c and a

1 1 2 1 p 1

column buer is d b d b d b This arrangement of units exp onents is graphically

1 1 2 1 r 1

displayed in Figure It is imp ortant to notice that although the units for C matrix

are unique the solution for the units buers is not unique

Units Buers for Inverse Matrix

The units buers for an inverse matrix may b e obtained as the sp ecial case of

ab ove results Again let A b e the square matrix of interest with numb er of rows and

columns equal ie p q Let matrix B b e the inverse matrix of matrix A From the

previous section we know that the units for element C are a b c d and b ecause B is the

ij i k k j

inverse of matrix A the diagonal elements of the matrix C must b e dimensionless ie

a b c d for k p and i p However b ecause contents of the units

i k k i

buers need not b e unique and

c d

k i

a b

i k

we can arbitrarily select c and d with the following set as the units buers

k j

c

k

b

k

for k p and d a for i p The reader should notice that in this

i i

arrangement of units exp onents the row units buer of inverse matrix of A is the inverse

of As column units buer and the column buer of inverse matrix of A is the inverse if

As row units buer

1

Let M b e a n n square matrix M its inverse In expanded matrix form

1

ie including units buers M and M can b e written

units b b b

1 2 n

a M M M

1 11 12 1n

a M M M

M

2 21 22 2n

a M M M

n 31 32 nn

1 1 1

units a a a

1 2 n

1

  

M b M M

1

1n 12 11

1

1

  

M b M M M

2

21 22 2n

1

  

M b M M

n

nn 32 31

The corresp onding IR and IL are

1 1 1

units b a b a b a

1 1 1 2 1 n

1

a b

1 1

1

1

a b

IR M M

2 1

1

a b

n 1

1 1 1

units a a a

1 2 n

a

1

a

2

a

n

units a a a

1 2 n

1

a

1

1

1

a

IL M M

2

1

a

n

We observe that the units of IL and IR dep end only on the row units buer of the

matrix M

Example from Structural Engineering In undergraduate structural analysis classes

we learn that an external force vector ffg can b e written as the pro duct of a stiness matrix

K and displacement vector d

K fdg ff g

Supp ose that we are working in a three dimensional co ordinate space xyz Without

a loss of generality in discussion we can limit the total numb er of degrees of freedom

to three two translations u and v in directions x and y resp ectively and a rotational

degree of freedom ab out the z axis The translational forces and moment in vector ffg

are f f and M In expanded form the ab ovementioned equation is

1 2

k k k u f

11 12 13 1

k k k v f

21 22 23 2

k k k M

31 32 33

Because u and v are translational displacements they will have length units m or

in External forces f and f will have units newton N or p ound force lbf For

1 2

the underlying equations of equilibrium to b e consistent units for k k k and k

11 12 21 22

must b e Nm or lbfin And b ecause has nondimensional radian units k and

13

k have units N or lbf The third equation represents rotational equilibrium with

23

its righthand side having units of moment ie Nm or lbfin The units for k and

31

k are N or lbf and units for k Nm or lbfin For SI units we write

32 33

units N m N m N

k k k

11 12 13

K

k k k

21 22 23

m k k k

31 32 33

and for US units

units l bf in l bf in l bf

k k k

11 12 13

K

k k k

21 22 23

in k k k

31 32 33

The equations of equilibrium and units buers for the corresp onding compliance matrix

are

u f c c c

1 11 12 13

v f c c c

2 21 22 23

M c c c

31 32 33

For SI units

units m

mN c c c

11 12 13

C

mN c c c

21 22 23

N c c c

31 32 33

A similar matrix C can b e written for US units We observe that the units buers for the

compliance matrix which is the inverse of the stiness matrix follows the general rule

stated at the conclusion of the previous section

Now lets lo ok at the numerical details and units of the matrix pro duct K C

for notational convenience we will call the identity pro duct IR The elements rst and

second rows of IR have units of m and the third row of IR units mm

In expanded matrix form we have

units m

IR K C

m

Similarly we have

units m

IL C K

m

Three p oints are noted ab out this result Matrices IL and IR are not equal as most

engineers might exp ect instead IL is the transp ose of IR Second IL and IR are

not symmetric with resp ect to the units or units buers Finally these identity matrices

are not dimensionless Even though the values of odiagonal elements are all zero some

of them have nondimensional units

Some readers may feel uncomfortable knowing that socalled indentity matrices

are not dimensionless and may wonder how could that b e Actually when you lo ok

carefully into the equations the results are not surprising For example lets take the

T

rst column of compliance matrix C and lab el it fC g c c c When K fC g

1 11 21 31 1

is compared to K fdg one quickly realizes that c c c takes the place of u v

11 21 31

here c c are the displacement p er unit force and c is the rotation p er unit moment

11 21 31

T

Given that the units for ffg are f or ce f or ce moment then units for the rst column of

matrix IR will b e forceforce forceforce momentforce or m Similar results

may b e derived for the remaining columns of C and in fact may b e generalized

Chapter

Architecture and Design of

ALADDIN

Intro duction

A key design ob jective for ALADDIN is the development of a program structure

that is very mo dular We have captured this principle by designing the program archi

tecture and supp orting software mo dules around the compiler construction to ol called

YACC an acronym for Yet Another Compiler Compiler YACC takes the language

description and automatically generates C co de for a parser that will match streams of

input against the rules of the language A key advantage in using YACC is that it pro

vided us with the freedom to exp eriment with the language designsemantics and to add

and delete new features Exp erience in other domains ie computer science indicates

such strategies result in mo dular software that is extensible and easier to maintain

Program Mo dules and Key Data Structures

Figure shows the interfaces and relationships among the seven mo dules in

ALADDIN They are a Main Mo dule b PrePro cessor Mo dule c Central Control

Mo dule d Finite Element Base Mo dule e Element Library Mo dule f Matrix Mo d

ule and g an Engineering Units Mo dule A detailed summary is as follows

Main Mo dule The main mo dule acts as the entry p oint for program execution It

loads information sp eciced in ALADDINs header les into the symb ol table directs the

source of exp ected input ie keyb oard or les and details of command options decides

whether or not to check the input syntax errors withwithout execution of commands

The main mo dule calls the prepro cessor mo dule and executes the program

Prepro cessor Mo dule ALADDINs prepro cessor mo dule parses input streams from

either the keyb oard of le and prepares an array of machine instructions that will b e

executed by ALADDINs stack machine The stack machine is part of the program control ULTILITIES Initialization Environment Input Matrix Module math operations FINITE ELEMENT MODULE MAIN read & scan input, run equation solver FEA Base Module eigenvalue solver matrix print et al. Memory allocation for FE data structure Mesh generation Units Module Setup FEA matrices Pre-Processor Language units operations Setup material properties YACC grammar Parser Miscellaneous Lexical analyser Working Array dynamic memory Build execution instruction stack allocation error handling Element Library Module

Central Control Module Push and Pop stack FEA Output Execute stack instruction Output

Call other modules

Figure Architecture of Program

mo dule

Program Control Mo dule The central control mo dule is comp osed of a stack machine

and is the heart of ALADDIN The design and implementation details for the stack

machine will b e describ ed in the next section of this rep ort

Finite Element Base Mo dule The nite element base mo dule contains ALADDINs

framework for nite element analysis This mo dule has co de to generate no des and ele

ments in nite element meshes a problem descriptor for b oundary and initial conditions

material and sections prop erties and facilities to setup external loads It contains func

tions to allo cate and compute nite element mass stiness and external load matrices

The heart of the nite element base structure is the data structure frame It has

b een designed to read store and up date information in nite element analysis frame

comprises of a set of control parameters and p ointers to no de element material and load

which include the basic input formation

typedef struct frame

char name Title

int nonodes no of nodes

int norigid no of rigid body elements

int noelements no of flexible elements

int noelementattr no of element attributes

int nonodeloads no of nodal loads

int noelementloads no of element loads

int nodimen no of dimension

int nodof no of dof per nodein global

int nonodesperelmt max no of nodes per element

NODE node array of nodes

RIGID rigid rigid body information

ELEMENT element array of elements

ELEMENTATTR eattr array of element attributes

NODELOADS nforces array of nodal forces

ELEMENTLOADS eforces array of element forces

LOADTYPE loadtype test for dynamicstatic problems

LOADHISTORY loadhist loadhistory structure for dynamic analysis

LOADSTEP loadstep loadstep structure for nonlinear analysis

TIME time time data structure for dynamic analysis

MATRIX eigenvalue Eigenvalue vector

EFRAME

The control parameters dene the problem size and the extend of allo cation These are

global parameters and keeps constant throughout the analysis The no de data structure

NODE contains the information ab out the no des co ordinates b oundary constraint infor

mation of that no de the initial displacement and velo city of the no des And the element

data structure ELEMENT contains the information of its connection to the no des in

the element the relation b etween the global and lo cal degree of freedoms material and

geometry of the element et al They are given as

typedef struct node

QUANTITY coord Coordinates of node

int boundid Boundary Constraint ID

int rbnum component of rigid body number

QUANTITY disp

QUANTITY velocity

MATRIX TrT

NODE

typedef struct elementstate

int state state elasticplastic deformation

state elastic deformation

ELEMENTSTATE

typedef struct elementresponse

MATRIX Forces

MATRIX stress

MATRIX displ

MATRIX velocity

MATRIX strainpl

double effectplstrain

QUANTITY minmoment

QUANTITY maxmoment Mzc

QUANTITY minshear maxshear

RESPONSE

typedef struct element

char elmtattrname ElmtAttr name

int nodeconnect List of Nodal Connectivities

int elmtattrno Elmt Attribute No stored in frame

int darray Destination array storage

RESPONSE rp Response Pointer

ELEMENTSTATE esp Deformation State of the Element

MATERLOADCURVE LCptr properties for describe yield

surface and stressstrain curve

ELEMENT

The element attribute information is included in the ELEMENT ATTR data structure

typedef struct elmtattr

char name

char elmttype

char material

char section

int mapldoftogdof

QUANTITY workmaterial Working Array for Material Properties

QUANTITY worksection Working Array for Section Properties

ELEMENTATTR

There are two working arrays in the element attribute data structure One for the material

prop erties and the other for the section prop erty For given element no the material and

section prop erties can b e found directly from these working array instead of lo oking into

the hashing table

Finite Element Library Mo dule The nite element library mo dule is a collection of

nite felement functions Like FEAP ALADDIN allows engineers to add new nite ele

ments to the program without having to interact other parts of the program At the time of

writing Decemb er the library contains two and three dimensional b eamcolumn

elements a plane stressstrain element and two four no de shell elements Each element

has co de to compute stiness and mass matrices plus for a given displacement vector a

vector of internal forces acting on the no dal degrees of freedom

Matrix Mo dule The matrix mo dule contains functions to allo cate and deallo cate

memory for matrices to compute basic op erations of matrices to compute solutions to

families of linear equations and to solve the symmetric eigenvalue problem

Units Mo dule The units mo dule provides the units op erations of engineering quantities

and matrices for b oth US and SI systems of units Op erations for units conversion are

provided as are facilities to turn units op erations ono The following data structure

stores details of the units name conversion factor length mass and time exp onents

static struct

char name units name

double conversion scale factor

int lengthexpnt

int massexpnt

int timeexpnt

int tempexpnt

int unitstype

engunits

micron E SI Units of Length

mm SI

cm SI

dm SI

m SI

km SI

g SI Units of Mass

kg SI

Mg E SI

sec SIUS Units of Time

min SIUS

hr SIUS

degC SI Temperature

N SI Units of Force

kN SI

kgf SI

Pa SI Units of Pressure

kPa SI

MPa E SI

GPa E SI

Jou SI Energy Units

kJ E SI

Watt SI Power Units

kW SI

In the SI units system for example we employ the character N to represent one Newton

force and the character m to represent one meter length Both units have a scale factor

equal to one it follows that the reference unit for moment would b e Nm with a

scale factor also equal to

Initialization Mo dule ALADDIN employs a linked list symb ol table data structure

with op erations for loading storing and retrieving information during a matrixnite

element analysis Items in the symb ol table are required to have unique names The

heart of the symb ol table is dened by the data structure

Data Structure for Node in Symbol Table

typedef struct Symbtabelement

char cpSymName

short type

union

double value Store a number

char str String

int defn Function Procedure

void voidptr Builtin MathFE Functions

double doubleptr Builtin MathFE Functions

MATRIX matrixptr Builtin Matrix Functions

QUANTITY quantityptr Builtin Quantity Functions

ARRAY elmtptr Elmt Library ptr to func

QUANTITY q Engineering Quantity

MATRIX m Matrix

DIMENSIONS dimen Basic Dimension

ELEMENTATTR eap Element Attribute ptr

SECTIONATTR sap Section Attribute ptr

MATERIALATTR map Materials Attribute ptr

u

struct Symbtabelement next

SYMBOL

Here MATRIX QUANTITY and DIMENSIONS are the data structures for matrix quantity

ATTR SECTION ATTR and and units dened in Chapter The names ARRAY ELEMENT

MATERIAL ATTR are p ointers to the element section and material attributes in nite ele

ment analysis

The initialization environment loads keywords constants nite element analysis

information eg material and section prop erties and builtin functions needed for the

command language into ALADDINs symb ol table We use the returned data typ e and

details of the argument list ie numb er and typ es of data to organize builtin functions

into six groups They are

Functions requiring one matrix argument and returning a quantity Two examples

are LNorm and QuanCast

Functions requiring no argument and return a matrix Two examples from the nite

element section are Stiff and Mass

Functions requiring one matrix argument and returning a matrix Two examples are

Copy and Trans

Functions requiring two matrix arguments and returning a matrix One example is

Solve

Functions that accept a variable numb er of matrix arguments and return a matrix

Sp ecial functions for the generation of nite element meshes

The following script of co de shows how functions with one matrix argument are dened

in a data structure called builtin matrix and subsequently installed in ALADDINs

Problem symb ol table by the function Init

a Data structure for builtin functions

static struct

char name

MATRIX func

builtinmatrix

Copy MatrixCopy

Trans MatrixTranspose

b InitProblem Load builtin functions into Symbol Table

InitProblem

int i

SYMBOLPTR spA

a Load builtin functions into symbol table

for i i sizeofbuiltinmatrixsizeofbuiltinmatrix i

spA buildtablebuiltinmatrixiname BLTINMATRIX

spAumatrixptr builtinmatrixifunc

Here we use the C function build table to install the function names into the symb ol

table Pointers to the base address of the function are assigned with the statement

spAumatrixptr builtin matrixifunc

Material and Section Prop erty Data Structures Material and section prop erties

are stored in the material and section attribute data structures MATERIAL ATTR

SECTION ATTR They are given as

typedef struct materials

char name Material name

QUANTITY E Youngs modulus

QUANTITY G Shear modulus

QUANTITY fy Yield stress

QUANTITY fu Ultimate stress

QUANTITY ET Tangent Youngs Modulus

double nu Poissions ratio

QUANTITY density

QUANTITY alphathermal thermal expansion coefficient

MATERLOADCURVE LCptr parameters for describing yield

surface and stress strain curve

MATERIALATTR

typedef struct sectionattr

char sectionname

int sectiontype

QUANTITY Ixx Iyy Izz

QUANTITY Ixz Ixy Iyz

QUANTITY weight Section weight

QUANTITY bf Width of flange

QUANTITY tf thickness of flange

QUANTITY depth Section depth

QUANTITY area

QUANTITY platethickness

QUANTITY torconst Torsional Constant J

QUANTITY xcoord ycoord zcoord centroid coord

QUANTITY rT Section Radius of gyration

QUANTITY width Section width

QUANTITY tw Thickness of web

SECTIONATTR

In many of ab ove data structures MATER LOAD CURVE data structure is used to

describ e the stressstrain curve of the material for each element

typedef struct materloadcurve

char name load curve type

double R radius of yield surface

double backstress back stress vector

double H tangent of stressplastic strain curve

double alpha parameter for RambergOsgood relation

double n strain hardening exponent

double beta parameter for strain hardening

beta kinematic hardening

beta isotropic hardening

MATERLOADCURVE

Many material prop erties such as R the radius of yield surface in plane and H the

tangent of stressplastic strain curve are p oint dep endent Therefore arrays are used to

identify the corresp onding prop erties for every integration p oints The character string

name identies the typ e of the stressstrain curve Two stress strain curves are currently

available They are Ramb ergOsgo o d stress strain curve and the BiLinear stress strain

curve

Working Array The P ARRAY data structure transfers information b etween nite el

ement base mo dule and element library mo dule This information is used to compute

element level mass and stiness matrices and internal force vectors for b oth linar and

nonlinear problems

Design and Implementation of Stack Machine

ALADDIN employs a nitestate stack machine mo del which follows in the spirit

of work presented by Kernighan and Pike Stack machines are suitable for mo deling

systems that have a nite numb er of internal congurations or states and whose b ehavior

evolves as a linear sequence of discrete p oints in time ALADDINs stack machine reads

blo cks of command statements from either a problem description le or the keyb oard

converts them into stack machine instructions and nally executes the statements

ALADDIN employs three connected data structures an array of machine in

structions a program stack and a symb ol table plus carefully designed algorithms and

software to handle the pro cessing of input statements and blo cks of input statements To

gether these data structures and algorithms form the heart of ALADDINs stack machine

The stack machine pro cesses blo cks of input statements in two steps Array of Machine Instructions Stack quantity data strcture pc Inst 1 stackp Data 1 matrix Inst 2 built in functions Data 2 data strcture Inst 3 Data 3 Inst 4 ...... Data 4 .....

Symbol Table Symbol 1 Symbol 2 Symbol 3 ptr to funcs double char string section ptr material ptr elmt_attr ptr

Symbol 4 Symbol 5 Symbol 6

ptr to funcs double char string section ptr material ptr

elmt_attr ptr

Figure Data Structures in ALADDINs Stack Machine

Parse the input statement or blo ck of statements and construct an array of machine

instructions Groups of machine instructions are comp osed of calls to functions plus

instructions to push and p op data and op erands tofrom the program stack

Step through the array of machine instructions and execute the functions p ointed to

by the machine instructions

Figure is a simplied schematic of the stack machines participating data structures

and their connectivity

Array of Machine Instructions The array of machine instructions and program

stack are declared with the following C statements

Define array of machine instructions

typedef int Inst

define STOP Inst

define NPROG

Inst prog NPROG

Inst progp

Inst pc

Define data structure for program stack

typedef union Datum

QUANTITY q

MATRIX m

SYMBOL sym

DATUM

define NSTACK

static DATUM stack NSTACK

The C statement Inst prog allo cates memory for the array of machine in

structions Each element of prog is a p ointer of typ e int Variables progp and pc are

p ointers of typ e Inst which will b e used to track elements in the array of instructions

The data structure DATUM is a union of p ointers to quantity matrix and symb ol

table items Each element of the program stack is either a p ointer to a quantity a p ointer

to a matrix or a p ointer to a symb ol table entry The C statement static DATUM

allo cates a blo ck of memory for the program stack containing elements of structure

DATUM

The C function Code plays a central role in the assembly of machine instructions

For example the function call CodePush will add to the machine array an element

containing a p ointer to function Push and then increments the program p ointer progp

The function code builds up the machine stack prog adding data

types Inst to it The arguments to code are pointers

to the functions defined later on in codec and pointers to

data types SYMBOL which have been coerced by the use of the

cast Inst

Inst Code Inst f

Inst oprogp progp

ifprogp progNPROG

ExecutionErrorERROR program too big char

progp f

return oprogp

Push DATUM d onto the stack and increment stackp to next element

Push DATUM d

ifstackp stackNSTACK

ExecutionErrorERROR stack overflow char

stackp d stackpd stackp

In functions Code and Push ExecutionError is a function that rep orts runtime

execution errors in the interpretation of input commands eg overows of the program

stack Function Code has a single argument the function call Code Push will for

example add to the machine array an instruction to call function Push

Execution of Program Stack An execution p ointer marches along the machine array

and implements the instruction set assembled during step of the input pro cess The

machine instructions will push and p op items tofrom the program stack and call external

C functions as directed by the arguments to Code

Executep

Inst p

for pc p pc STOP

pc pc

if CheckBreak break

pc

The co de generated during parsing has b een carefully arranged so that a STOP com

mand terminates each sequence of instructions that should b e handled by a single call to

Execute

Example of Machine Stack Execution

We now demonstrate use of the stack machine by working stepbystep through

the details of pro cessing the assignment x in We assume that Step of the input

pro cess is complete with the array of machine instructions taking the values shown on

the lefthand side of Figure During Step of the input pro cess the YACC parser

details to b e describ ed in the next section recognizes that x is a variable with data typ e

VAR and in as a quantity with numb er and a units dimension in The grammatical

rule for assignment ie has right asso ciativity Hence when the machine is executed SymbolTable

sym 2 Symbol 1 Symbol 2 Symbol 3 Machine Array name:

type:NUMBER Stack u.value: 2 units_name: (Inst) Push_Dimension units_type : SI_US u.q->dimen d1 ...... scale_factor: 1.0 (Inst) ...... d2

d3 (Inst) Push_constant Symbol 4 Symbol 5 Symbol 6 ...... (Inst) sym 4 name: type: units_name: in (Inst) Dimension_Eval u.value: units_type : US u.q->dimen scale_factor: 1.0 ...... (Inst) Push_Variable ...... quantity

(Inst) value

Symbol 7 Symbol 8 Symbol 9 dimen (Inst) Pop sym 9 name: x type: VAR (Inst) STOP units_name: in units_name: in u.value: units_type : SI_US units_type : US u.q->dimen scale_factor: 1.0 ...... scale_factor: 1.0 ......

......

Figure Schematic of Machine and Stack for x in

in will b e pushed onto the stack rst and in two steps rst the unit in is pushed and

then the numb er

Detailed snapshots of the program op eration for Step of the pro cessing are

lo cated at the end of this subsection The stepbystep pro cedure for execution of the

stack machine is

Push symb ol table p ointer onto stack for the variable in

Push a constant onto the stack

Pop b oth and in o the stack and combine them into a single quantity in The

quantity is pushed back onto the stack

Push onto the stack the symb ol table p ointer to variable x

Pop x and in from the stack Assign in to x and push x back onto the stack

Data x is p opp ed and cleared from the stack

Figures to show the relevant details of the machine array symb ol table and

program stack for Steps to resp ectively In each of these gures pc is a program

counter that p oints to elements in the array of machine instructions the elements of the

machine array are p ointers to C functions The dashed and solid arrows represent the two

stages of the pc p ositions As detailed in the C function Execute and shown in Figure

program counter pc initially p oints to Inst Push Dimension The p osition of pc

is represented by the dotted lefttoright arrow in Figure Notice however that pc

is incremented to the solid arrow p osition ie pc pc b efore Push Dimension is

called Now pc p oints at Inst Push Dimension The details of Push Dimension

are as follows

PushDimension push dimensioned quantity onto stack

void PushDimension

DATUM d

int length

dq QUANTITY MyCallocsizeofQUANTITY

dqdimen NULL

dqvalue SYMBOL pcuqvalue

pc pc

Pushd

The machine instruction at the new value of pc p oints to a quantity stored in the symb ol

Dimension allo cates memory of a new quantity given by dq and copies table Push

to it the contents of the symb ol table entry The result is pushed onto the program stack

After unit in and numb er are b oth pushed onto stack ie d and d on the

stack shown in Figure function Dimension Eval p ops d and d from the stack

assigns the units in to numb er and pro duces the quantity in back onto the stack

Next the symb ol table p ointer for variable x is pushed onto the stack by C function

Push Variable Details of this step are shown in Figure

Quantity assigns the quantity in to variable x and The C function Assign

pushes the new x onto stack Details of this step are shown in Figure The second

tolast machine instruction p ops the last item from the stack as shown in Figure

Finally Inst STOP halts the lo oping mechanism in C function Execute Machine Array pc -1 (Inst) Push_Dimension Push_Dimension(): Push "in" onto stack pc = pc+1 (Inst) (Inst) Push_constant Symbol 1 name: (Inst) type: (Inst) Dimension_Eval u.value: (Inst) Push_Variable u.q->dimen ...... (Inst) (Inst) Assign_Quantity units_name: in (Inst) Pop units_type : US (Inst) STOP scale_factor: 1.0 ......

Stack quantity value units_name: in d1 dimen units_type : US scale_factor: 1.0

......

Figure Step Push Unit onto Stack

Machine Array

(Inst) Push_Dimension (Inst) pc -1 (Inst) Push_constant Push_Constant(): Push constant " 2" onto stack pc = pc+1 (Inst) (Inst) Dimension_Eval (Inst) Push_Variable Symbol 2 name: (Inst) type: NUMBER (Inst) Assign_Quantity u.value: 2 (Inst) Pop u.q->dimen units_name: ...... units_type : SI_US (Inst) STOP scale_factor: 1.0 ......

Stack quantity value units_name: in dimen d1 units_type : US d2 scale_factor: 1.0

......

Figure Step Push Numb er onto Stack Machine Array

(Inst) Push_Dimension (Inst) (Inst) Push_constant (Inst) pc -1 (Inst) Dimension_Eval Dimension_Eval(): Pop out d2 and d1 from stack pc = pc + 1 combine "2" and "in" into one quantity, d, and (Inst) Push_Variable Push d back to stack (Inst) (Inst) Assign_Quantity (Inst) Pop

(Inst) STOP

Stack Stack quantity value: 2 d1 d dimen d2

units_name: in units_type : US Pop d2, Pop d1, Push d scale_factor: 1.0

......

Figure Step Combine Numb er and Unit into Quantity

Machine Array

(Inst) Push_Dimension (Inst) (Inst) Push_constant (Inst) (Inst) Dimension_Eval Push_Variable(): Push symbole table pointer pc -1 (Inst) Push_Variable onto stack for the variable "x" pc = pc+1 (Inst) (Inst) Assign_Quantity Symbol 3 (Inst) Pop name: x type: VAR (Inst) STOP u.value: u.q->dimen units_name: ...... units_type : SI_US scale_factor: 1.0 ...... Stack quantity value: 2 units_name: in d dimen units_type : US d3 scale_factor: 1.0

......

Figure Step Push Variable onto Stack Machine Array

(Inst) Push_Dimension (Inst) (Inst) Push_constant

(Inst) (Inst) Dimension_Eval

(Inst) Push_Variable (Inst) Assign_Quantity (): Pop out d3 and d from stack, (Inst) Assign_Quantity pc-1 assign " 2in" in d, to "x" in d3, store new data pc = pc+1 (Inst) Pop in d4 and push d4 back to stack (Inst) STOP Symbol 3 name: x type: QUANTITY u.value: 2 Stack Stack u.q->dimen ...... d d4 d3 units_name: in units_type : US scale_factor: 1.0

Pop d3, Pop d and Push d4 ......

Figure Step Assign Quantity to Variable

Machine Array Stack Stack (Inst) Push_Dimension

(Inst) d4

(Inst) Push_constant

(Inst) Pop d4 (Inst) Dimension_Eval

(Inst) Push_Variable

(Inst)

(Inst) Assign_Quantity

pc-1 (Inst) Pop

pc = pc+1 (Inst) STOP Pop (): Pop out . Clear top data from stack

Figure Step Clear Top Data from Stack

Language Design and Implementation

We have used the UNIX to ol YACC an acronym for Yet Another Compiler

Compiler to dene a language for the denition and solution of matrix and nite

element problems For gentle intro ductions to YACC see Chapter of Kernighan and

Pike and the OReilly text by Levine et al For a theoretical discussion on LR

parsers see Aho et al

In ALADDIN the details of the YACC grammar and asso ciated C co de are lo cated

in a le called grammary which is partitioned into four parts

Part Optional C statement declaration

Part YACC declarations lexical tokens grammar variable precedence

and associativity information

Part Grammar rules and semantic actions

Part Lexical analysis with a C function called yylex

YACC takes the sp ecications in Parts to and generates a C co de function called

yyparse for a the matching of tokens and their typ es against the grammatical rules

of the language and b the handling of semantic actions

Part In Part of the YACC sp ecication we write a C function called yylex to

scan streams of input characters and identify token names and their typ es The names

and typ es of tokens are passed onto yyparse for the matching against grammatical

rules Here is an abbreviated version of yylex

yylex

double value

int finished

a Eat blank space tab and newline input Read comment statements

whilec fgetcfin c t c n c

ifc n

lineno

iffin stdin finp stdin

ifc n

printfALADDIN

fflushstdout

fputcc finp

ifc

iffollow TRUE FALSE TRUE

c fgetcfin

finished FALSE

whilefinished FALSE

c fgetcfin

ifc n

lineno

ifc EOF

FatalErrorERROR file ended with unbalanced comment n

char NULL

ifc follow TRUE FALSE TRUE

finished TRUE

else

return c

b return endoffile

ifc EOF

return ENDOFFILE

c read and store floatingpoint numbers

if c isdigitc

ungetcc fin

fscanffin lf value

iffin stdin finp stdin fprintffinp lf value

yylvalsym buildtable NUMBER value

return NUMBER

d read and store variable

if isalphac c

SYMBOL s

char sbuf p sbuf

do

ifp sbuf sizeofsbuf

p

ExecutionErrorERROR name too long

p c

while c fgetcfin EOF isalnumc c

ungetcc fin

p

iffin stdin finp stdin fprintffinp s sbuf

if s lookupsbuf

s buildtablesbuf VAR

yylvalsym s

switchint stype

case UNDEF case VAR case QUAN

return VAR

default

return stype

e Get Quoted String

if c

char sbuf p

iffin stdin finp stdin fputcc finp

forp sbuf c fgetcfin p

ifc n c EOF

ExecutionErrorERROR missing quote

ifp sbuf sizeofsbuf

p

ExecutionErrorERROR string name too long

iffin stdin finp stdin

fputcc finp

p backslashc

p

yylvalsym SYMBOL SaveStringsbuf

iffin stdin finp stdin

fputcc finp

return STRING

iffin stdin finp stdin

fputcc finp

switchc

case

return follow GE GT

case

return follow LE LT

case

return follow EQ

case

return follow NE NOT

case

return follow OR

case

return follow AND

default

return c

Here we emphasize only the main comp onents of yylex yylex scans streams of input

and automatically removes black spaces tabs and all input b etween comment statements

Numb ers must b egin with either a digit of a decimal p oint they are temp orarily stored

in ALADDINs symb ol table Character strings are enclosed within quotes ie

Variables and builtin function names are alphanumeric strings that must b egin with

a character the details of keywords in ALADDINs programming language are stored

in the symb ol table Finally yylex identies token typ es for twocharacter sequences

used in relational and logical op erators The interested reader should consult the program

source co de for details on functions backslash follow warning and so on Now

lets lo ok at the details for our stack machine

Part We use the macro declarations

define Codecc Codec Codec

define Codeccc Codec Codec Codec

as short form for calls to function Code

Part The YACC declarations b egins with character

union

SYMBOLPTR sym

Inst inst

int narg

token sym NUMBER

token sym VAR

type inst quantity

type inst dimensions

left left associative same precedence

left left associative higher precedence

right right associative higher precedence

The union declares that YACC stack may holds three dierent typ es of elements a p ointer

to an item in the symb ol table a machine instruction p ointer and an integer narg to

represent the numb er of arguments in a function The token declaration with arguements

sym says that NUMBER and VAR will b e input tokens accessed by dereferencing a

symb ol table p ointer In ALADDIN NUMBER and VAR are integers generated by YACC to

represent value of typ e double and character strings resp ectively The type declaration

sp ecies that quantity and dimensions will b e machine instructions

The left and right keywords sp ecify left and right asso ciativity of op erators

resp ectively In YACC the precedence of op erators is dened by order of app earance

with tokens in the same declaration having equal precedence Tokens app earing at the

end of the declaration list have higher precedence than those at the b eginning Therefore

the op erators and are left asso ciative and in the same precedence level The multiply

and divide op erators have equal precedence and are left asso ciative They have higher

precedence than the add and subtract op erators The p ower op erator has the highest

precedence level and is right asso ciative

Part Grammatical Rules ALADDIN has more than grammatical rules

Rather than attempt to explain all of them here we will concentrate only on those rules

needed to match simple assignment statements to identify matrices and last generate a

forlo oping construct We b egin with the collection of rules needed to recognize

in in and in in

quantity NUMBER CodePushDimensionless Inst rule

CodePushConstant Inst

CodeDimensionEval

Numb er is a digit It is assigned typ e NUMBER in yylex A stream of input that

consists of a numb er alone is matched by rule of the grammar A numb er without units

is considered to b e a quantity ie see lefthand side of rule The name refers to

value of the symb ol to the left of the colon in this case quantity The semantic actions

for rule are a series of machine instructions via calls to Code to push a dimensionless

quantity onto the program stack push a constant onto the program stack and nally

evaluate the result

We now intro duce rules of the grammar designed to parse units expressions of the

2 2

form in in in l b in insec and so on The grammatical rules are

dimensions DIMENSION Code PushDimension rule

Code Inst

dimensions rule

dimensions dimensions Code DimensionMult rule

dimensions dimensions Code DimensionDiv rule

dimensions quantity rule

Code DimensionPower

YACC uses the vertical bar symb ol j to separate individual rules in a group the symb ol

should b e interpreted as meaning or Semantic actions are included inside the f g The

input streams in and in are considered are of typ e quantity

quantity NUMBER dimensions CodePushConstant Inst

CodeDimensionEval rule

quantity rule

and are matched by rules and More precisely in is rst matched by rule and

then by rule The units are sp ecied by typ e dimension

With the rules for recognizing a quantity in place it is relatively straight forward

to dene grammatical rules for arithmetic op erations on quantities In the input command

in in the quantities in and in are rst recognized by rule and the addition

of quantities by the rule

quantity quantity quantity CodeQuantityAdd rule

Add takes care of the appropriate stack op er The C co de lo cated in function Quantity

ations Similar rules are written for subtraction of two quantities rule multiplication

of two quantities rule and division of quantities rule A quantity raised to the

p ower of another quantity is considered to b e a quantity rule

quantity quantity quantity CodeQuantitySub rule

quantity quantity CodeQuantityMul rule

quantity quantity CodeQuantityDiv rule

quantity quantity CodeQuantityPower rule

Again Quantity Sub Quantity Mul and so on are C functions for arithmetic of

quantities with appropriate pushing and p opping of data items tofrom ALADDINs

program stack Input commands such as x in and y in x involve the as

signment of a quantity to a variable Both cases can b e represented the rule

quantity VAR quantity Code PushVariable Inst rule

Code AssignQuantity

Using the rules stated ab ove in is recognized as a quantity and x is a variable typ e

The complete input x in is matched by rule Moreover b ecause YACC rules are

recursively dened in x is matched by rule Parser trees for the statements x

in followed by y in x are shown in Figure

Quantity

VAR Quantity

NUMBER Dimension

x = 3 in

Quantity

VAR Quantity

Quantity Quantity

NUMBER Dimension

y = 2 in + x

Figure Parser Trees for x in and y in x

Matrix Generation As p ointed out in the previous chapters two mechanisms exist for

the generation of matrices denition of matrices from input and generation of matrices

via builtin matrix functions We will b egin with the latter eg as in A Zero

token sym MATX

matrix MATX Code PushMatrix Mrule

Code Inst

Code MatrixEval

YACC uses the variable typ e MATX to represent variables of typ e matrix The seman

tic action that follows identication of a matrix has two key parts the C function

Push Matrix pushes a p ointer to the symb ol table entry containing the matrix onto

Eval p ops the matrix p ointer from the stack allo cates the program stack Matrix

memory for a new matrix and copies the contents of the symb ol table matrix to the new

matrix Finally a p ointer to the new matrix is pushed onto the stack

The second approach is to generate matrices directly from keyb oardle input

Matrices generated directly from input are dened as series of quantities inside Con

sider for example the x matrix

which may also b e represented as A matrix row is simply a list of quantities

separated by commas Individual matrix rows are separated by semicolons The YACC

grammar for identifying matrices is

type narg matrixseq

type narg quantityrow

matrix matrixseq Code PushVariable

Code Inst

Code MatrixBuild Mrule

matrixseq quantityrow Code PushVariable

Code Inst

Mrule

matrixseq quantityrow Code PushVariable

Code Inst

Mrule

where type sp ecies that matrix seq and quantity row are of typ e narg matrix seq

records numb er of rows and the numb er is pushed onto stack this is done by M rule

and M rule As so on as row of quantities is identied matrix seq is initialized with

numb er M rule Then matrix seq is increased by for each semicolon that

is parsed with the sum b eing accumulated recursively via M rule Within each row

columns separated by commas are quantities

quantityrow

quantity QRrule

quantityrow quantity QRrule

row Similarly the numb er of columns in a matrix is recorded by quantity

Matrix Op erations The grammatical rules for matrix op erations are similar to those

of engineering quantities

matrix matrix Code BltinMatrixMult Mrule

matrix matrix Code BltinMatrixAdd Mrule

matrix matrix Code BltinMatrixSub Mrule

matrix Mrule

quantity matrix Code BltinQuanMatrixMult

Mrule

matrix quantity Code BltinMatrixQuanMult Mrule

matrix quantity Code BltinMatrixQuanDiv Mrule

These rules generate an array of machine instructions for matrix addition subtraction

and multiplication ie M rule M rule and M rule They allow for the parsing

of a matrix inside parentheses M rule the multiplication of a quantity times a matrix

M rule a matrix times a quantity M rule and a matrix divided by a quantity

M rule

For Lo oping Construct The development of a YACC grammar and supp orting C

co de for lo oping and branching constructs is the most complicated part of ALADDINs

programming language A description of the whilelo oping construct may b e found in

Chapter of Kernighan and Pike The purp ose of this subsection is to explain our

implementation of the forlo oping construct The family of grammatical rules

stmt for exprlist cond exprlist stmt end Frule

Inst initiation Frule

Inst condition Frule

Inst body of loop Frule

Inst increments Frule

Inst end if cond fails Frule

for FOR Code ForCode STOP STOP CodeSTOP STOP CodeSTOP

exprlist listlist CodeSTOP

listlist progp Lrule

quantity Lrule

listlist quantity Lrule

cond quantity CodeSTOP

assumes that memory in the array of machine instructions will take a form as shown in

Figure A forlo op is simply a statement stmt The initiation and incremental

steps of the forlo op are expressed as exprlists which are themselves sub divided into

rule an engineering quantity listlist A listlist could b e a space nothing L

L rule or a series of quantities separated with L rule The b o dy of a forlo op

is also a statementstmt this rule allows for the nesting of forlo op constructs The

condition part of the for lo op is an engineering quantity

After the token FOR has b een recognized ve spaces in the array of machine

rule the instructions are reserved for the storage of p ointers to the initiation co de F Machine Stack

...... (Inst) For_Code

listlist ...... initialization (Inst) STOP cond ...... condition (Inst) STOP listlist ...... increment (Inst) STOP stmt ...... body of for-loop (Inst) STOP end, if condition fails

next stmt

Figure Machine Stack for ForLo op Construct

condition F rule the incremental steps F rule the b o dy of the forlo op F rule

and the STOP instruction F rule The two character sequence refers n refers

to the value of a typ e stacked n spaces b eyond the current namelist pro duction In this

particular case is the lo cation in the machine of the token identied by F rule The

initiation condition b o dy increments and end comp onents of the for lo op are access by

machine array elements to resp ectively For the sake of completeness

Code we now include the C co de for For

ForCode

DATUM d

Inst savepc pc

ExecuteInst savepc initiation

ExecuteInst savepc cond

d Pop

whiledqvalue

ifCheckBreak break

ExecuteInst savepc body of loop

ExecuteInst savepc increments

ifreturning CheckBreak break

ExecuteInst savepc cond

if CheckUnits ON

freechar dqdimenunitsname

freechar dqdimen

freechar dq

d Pop

ifreturning

pc Inst savepc next statement

AfterBreak

Notice how the layout of memory in Figure has b een carefully combined with function

calls to Execute

Part V

CONCLUSIONS AND FUTURE

WORK

Chapter

Conclusions and Future Work

Conclusions

In the general area of computational technology for engineering the s are

shaping up to b e the decade of global networking and multimedia These advances will

allow for the prototyping of interactive computing environments tailored to the life cycle

development of complex engineering systems For these environments to b e commercially

successful they will need to supp ort development of engineering systems from multiple

viewp oints and at multiple levels of abstraction Engineers should b e provided with

the to ols to integrate once disparate disparate disciplines While the merging of matrix

computations with nite elements optimization and graphics is already evident many

other p ossibilities exist For instance now that many companies are engaging in business

practices that are geographically disp ersed engineers will so on exp ect connectivity to

a wide range of information services electronic contract negotations management of

pro ject requirements design rule checking over the Internet and availability of materials

and construction services are likely candidates The participating computer programs

and networking infrastructure will need to b e fast and accurate exible reliable and of

course easy to use

Our longterm goal for ALADDIN is to provide engineers with such a computa

tional problemsolving environment Version of ALADDIN is simply a rst step in

this direction and is much less ambitious The emphasis in development has so far b een

on the basic system sp ecication and its application to matrix and nite element prob

lems We have tried to determine what data typ es control structures and functions will

allow engineers to solve a wide variety of problems without the language b ecoming to o

large and complicated and without extensibility of the system b eing compromised Our

strategy for achieving the latter ob jective is describ ed in Chapter The test applications

have b een taken from traditional Civil Engineering and have fo cussed on the design and

analysis of highway bridges and earthquakeresistant buildings

ALADDIN Version is approximately lines of C and getting the pro

gram to this p oint has taken approximately three years of parttime work We have

written nearly all of the source co de from scratch along the way a new data structure

for the matrices with units was designed and software implemented Many of the matrix

algorithms that ALADDIN uses are do cumented in the forthcoming text of Austin and

Mazzoni The language design must b e followed by entensive testing of the software

with matrix and nite element test problems that are complicated enough to push the

limits of the software Note In our exp erience many co ding errors will not show up in

trivial engineering applications

As the work on ALADDIN progressed we o ccasionally identied small extensions

to the language that would allow ALADDIN to attack a new problem area When the

language for ALADDIN was rst designed we did not have design rule checking in mind

for example Yet once the basic matrix and function language sp ecication was in place

and the nite element analyses worked only a couple of extra functions were needed for

the implementation of basic design rule checking

Together these observations lead us to b elieve that our goal of keeping the AL

ADDIN language small and extensible has b een achieved This work lays the foundation

for many avenues of future work

Future Work

Figure is a schematic of the current comp onents of work plus mo dules of work

that are needed for the next extension of ALADDIN The future work should fo cus on

Nonlinear Algorithms The scop e of applications in this rep ort has b een restricted

to timedep endent analysis of linear structural systems Future work should extend

this work to the timehistory analysis of systems having material and geometric

nonlinearities A rst step in this direction is rep orted in Chen and Austin

Userdefined Functions Version of ALADDIN do es not p ermit the use of

userdened functions and pro cedures in the input le When we rst b egan working

on ALADDIN our feeling was that the input le language should b e relatively simple

otherwise why not simply co de the whole problem in C An easy way of controling

language complexity is to disallow userdened functions in the input le and this

is what we have done for ALADDIN Version Now that the matrix and nite

element libraries are working this early decision needs to b e revised We would like

to combine the nite element analysis with discrete simulated annealing optimization

algorithms along the lines prop osed by Kirkpatrick The latter could b e

succinctly implemented if userdened functions were available The current version

of ALADDIN assumes that all userdened variables are global When userdened

functions are added to ALADDIN notions of scop e should also b e added to variables

this could b e implemented via an array of Symb ol Tables

Graphical Library An obvious limitation of ALADDIN Version is that it

lacks a graphical user interface Providing a suitable interface is easier said than ALADDIN'S KERNEL. MATRIX LIBRARY

[ STACK MACHINE ]

FINITE ELEMENT LIBRARY

INPUT FILE

Block of input statements....

OPTIMIZATION LIBRARY

Block of input statements....

Block of input statements.... GRAPHICS LIBRARY

Block of input statements....

SCOPE OF THIS REPORT FUTURE WORK

ALADDIN'S KERNEL AND INPUT FILES LIBRARIES OF BUILT-IN C FUNCTIONS

Figure Future Development for ALADDIN

done If ALADDIN simply prep orted to conduct nite element analysis then it

would b e a relatively easy pro cess to co deup an interactive pre and p ostnite

element pro cessor in X windows or a suitable PC graphics package

The problem with this approach is that it only serves one half of ALADDINs capa

bilities in addition to graphically describing the nite element mesh and mo deling

assumptions a graphical interface should also provide a graphical counterpart to

the solution algorithm sp ecications eg Newmark Integration We will explore

the use of visual programming languages to see if they are suitable for this purp ose

Optimization Library We would like to extend the language sp ecication so that

engineers can describ e design ob jectives design constraints and design parameters

for general engineering optimization problems in a compact manner The issue of

compactness is particularly relevant for optimization problems that involve nite

element analysis b ecause they often contain hundreds and sometimes thousands of

constraints

Further work is needed to determine how groups of similar constraints can b e bun

dled into groups and how ALADDINs control structures can b e exploited to write

down these constraints in a compact manner Once the issue of constraints is sorted

out the pathway for describing the design parameters and ob jectives should hop e

fully b ecome clearer

Test Problem Suite New suites of test problem les will b e needed as the details

of items and are lled in please let us know if you nd an error in one of the

test les

Version of ALADDIN is basic in the sense that many features found in commer

cial nite element co des have yet to b e implemented in ALADDIN For example the

current version of ALADDIN only supp orts external loads applied at the no des In

the near future we will add element level loads so that uniform loads can b e applied

to twodimensional problems and pressure loads can b e applied to the surface of

shell nite elements in threedimensional problems

WWW Home Page We are currently developing a World Wide Web WWW Home

Page for ALADDIN The ALADDIN home page will provide basic information on

ALADDIN sample matrix and nite element test problems ALADDIN source co de

and copies of this rep ort Our nearterm plans are to exp eriment with the dynamic

do cuments capabilities of WWW and create home pages where WWW visitors can

interact with an ALADDIN script running at the University of Maryland

Work items to are tightly coupled Understanding their interaction is an active

area of research

Acknowledgements

This work has b een supp orted in part by NSF Grant ECD by NSF grants

to the Institute for Systems Research at the University of Maryland and by a series of

fellowship grants to WaneJang Lin from the Federal Highway Administration

The early stages of this pro ject would not have b een p ossible without valuable

discussions with Dr Bunu Alib e and Bert Davy faculty memb ers in the Department of

Civil Engineering at Morgan State University

Bibliography

ABAQUS Example Problems Manual version Hibbitt Karlsson Sorensen

Inc Hibbitt Karlsson Sorensen Inc Main Str Pawtuchet RI

Aho A V Sethi R Ullman J D Compilers Principles Techniques and Tools

Addison Wesley

Austin M A Pister K S Mahin S A A Metho dology for the Probabilistic

Limit States Design of Earthquake Resistant Structures Journal of the Structural

Division ASCE August

Austin M A Pister K S Mahin S A Probabilistic Limit States Design of Moment

Resistant Frames Under Seismic Loading Journal of the Structural Division ASCE

August

Austin MA Mazzoni D C Programming for Engineers JohnWiley and Sons

Scheduled for publication in

Balling R J Pister K S Polak E DELIGHTSTRUCT A ComputerAided

Design Environment for Structural Engineering Computer Methods in Applied Me

chanics and Engineering pages January

Bathe K J Numerical Methods in Finite Element Analysis PrenticeHall Engle

wo o d Clis NJ

Bathe K J Finite Element Procedures in Engineering Analysis PrenticeHall

Englewo o d Clis NJ

Bathe K J Cimento A P Some Practical Pro cedures for the Solution of Nonlinear

Finite Element Equations Computer Methods in Applied Mechanics and Engineering

Chen XG Austin MA Development of a Shell Finite Element for Pro ject AL

ADDIN Technical rep ort University of Maryland College Park MD

Cmelik RF Gehani NH Dimensional Analysis with C IEEE Software pages

May

Gallop oulos E Houstis E Computer as a ThinkerDo er ProblemSolving Envi

roments for Computational Science IEEE Computational Science and Engineering

Gehani NH Databases and Units of Measure IEEE Transactions on Software

Engineering Novemb er

Ghali A Neville AM Structural Analysis A Unied and Matrix Approach

Chapman and Hall nd Edition edition

Jin Lanheng Analysis and Evaluation of a Shell Finite Element with Drilling Degree

of Freedom Technical rep ort University of Maryland College Park Maryland

Johnson S C YACC Yet another Compiler Compiler Technical rep ort ATT

Bell Lab oratories Murray Hill New Jersey

Karr M Loveman D B Incorp orating Units into Programming Languages Com

munications of the ACM May

Kernighan B W Pike R The UNIX Programming Environment PrenticeHall

Software Series

Kirkpatrick S Gelatt CD Vecchi MP Optimization by Simulated Annealing

Science May

Kronlof K Method Integration Concepts and Case Studies JohnWiley and Sons

Levine JR Mason T Brown D Lex and Yacc OReilly and Asso ciates Inc

Luenb erger David G Linear and Nonlinear Programming AddisonWesley Publish

ing Company

Mondkar D P Powell G H ANSR General Purp ose program for Analysis of

Nonlinear Structural Resp onse Report No EERC Earthquake Engineering

Research Center Decemb er

Nye W T Riley D C SangiovanniVincentelli A L Tits A L DE

LIGHTSPICE An OptimizationBased System for the Design of Integrated Circuits

IEEE Trans CAD Integrated Circuits and Systems CAD pages

Nye W T Tits A L An ApplicationOriented OptimizationBased Metho dology

for Interactive Design of Engineering Systems International Journal of Control

Nye W Tits A L DELIGHT FOR BEGINNERS Memorandum No UCBERL

M Department of Electrical Engineering July

Salter KG A Metho dology for Decomp osing System Requirements into Data Pro

cessing Requirements Proc nd Int Conf on Software Engineering

Tesler LG Networked Computing in the s Scientic American

Septemb er

Wu TL DELIGHTMIMO An Interactive System for OptimizationBased Multi

variable Control System Design Memorandum No UCBERL M Department

of Electrical Engineering Decemb er

Zienkiewitz OC Taylor RL The Finite Element Method McGrawHill Inc

For details on FEAP see Chapter