Sie sind auf Seite 1von 8

Engineering Computations

CALFEM — a program for computer-aided learning of the finite element method


Ola Dahlblom Anders Peterson Hans Petersson
Article information:
To cite this document:
Ola Dahlblom Anders Peterson Hans Petersson, (1986),"CALFEM — a program for computer-aided learning of the finite
element method", Engineering Computations, Vol. 3 Iss 2 pp. 155 - 160
Permanent link to this document:
http://dx.doi.org/10.1108/eb023653
Downloaded on: 21 June 2016, At: 22:06 (PT)
References: this document contains references to 0 other documents.
To copy this document: permissions@emeraldinsight.com
The fulltext of this document has been downloaded 147 times since 2006*

Access to this document was granted through an Emerald subscription provided by emerald-srm:349251 []
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

For Authors
If you would like to write for this, or any other Emerald publication, then please use our Emerald for Authors service
information about how to choose which publication to write for and submission guidelines are available for all. Please visit
www.emeraldinsight.com/authors for more information.
About Emerald www.emeraldinsight.com
Emerald is a global publisher linking research and practice to the benefit of society. The company manages a portfolio of
more than 290 journals and over 2,350 books and book series volumes, as well as providing an extensive range of online
products and additional customer resources and services.
Emerald is both COUNTER 4 and TRANSFER compliant. The organization is a partner of the Committee on Publication
Ethics (COPE) and also works with Portico and the LOCKSS initiative for digital archive preservation.

*Related content and download information correct at time of download.


Education
& TRAINING 4
type since they seldom contribute to understanding of the
CALFEM - a program for method. These programs should, of course, be used by
computer-aided learning students who have already mastered the method.
Computer programs especially designed for usage in
of the finite element courses of the finite element method are seldom presented.
method Some programs in this area are those which originate
from the program SMIS 5 , whose first version was
published in 1963. EMOI 6 , ISMIS 7 and CAL 8,9 enable
the user to perform matrix operations and to carry out
Ola D a h l b l o m , Anders Peterson and special operations of matrix structural analysis. These
Hans Petersson programs are mainly designed to be executed in batch
Division of Structural Mechanics, Lund Institute of mode. It is, however, of great importance that errors
Technology, Box 118, S-221 00 Lund, Sweden always appearing for a beginner can be corrected in the
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

(Received January 1986) run as soon as they appear.


An interactive computer program, CALFEM 10 , has
been developed as a tool for teaching of the fundamental
concept of the finite element method. The user of this
ABSTRACT program completely determines what will be done.
Detailed messages are obtained if illegal operations are
A computer program, CALFEM, is presented. This given which often makes it possible for the user to correct
interactive computer program is designed as a tool for his errors immediately.
teaching of the finite element method. No programming
knowledge is needed. The program is well suited to solve In CALFEM the calculation procedure is defined by
problems in structural mechanics and for solution of field the commands given by the user. A command consists of a
problems. A variety of finite elements is available. command name followed by arguments. The different
parts of a command are separated by empty spaces
One objective when designing CALFEM was that the (blanks). In general the arguments are matrix names or
user shall understand every part of the computational numbers.
procedure. The program is based on a command
language. All information is stored in user-defined An example of a command is:
matrices created by usage of commands. Required input BAR2E EP EK
to matrices are given on request from the program. The
contents of the matrices can be looked upon at any time The name of this command is BAR2E and the arguments
and new decisions can be made in the course of the run. are the matrix names EP and EK. The command creates
The user of the program determines in which way he wants an element stiffness matrix EK for a two-dimensional bar
to proceed with the calculation process by choosing element. The calculation is based on data in the matrix
proper commands. This means that everything in the EP, which is created of user-supplied input after a
computational procedure is under the direct control of the question from the program.
user. This is in contrast to many conventional 'black box' There exists a special and more general version of
finite element programs. CALFEM called CAMFEM 1 1 . This program is primarily
intended to be a research tool but can also be used as a
Commands can be stored on user-defined secondary
more advanced teaching tool than CALFEM. Among the
storage files. The files can be edited in CALFEM and be
facilities of CAMFEM are the possibilities of storing
used further on in the calculation procedure. The program
matrices on secondary storage and using macro
is written in FORTRAN 77 and all calculations are
commands defined by the user himself.
performed in double precision.
The command language of CALFEM is divided into
five different groups of commands:
INTRODUCTION
The finite element method has rapidly become a very
popular technique for computer solution of problems in Basic commands
engineering. Many text books are written on this subject, This group consists of commands for data handling.
describing the theory behind the method and the
methodology of a finite element analysis 1-4 .
Several finite element computer programs are also Control commands
available. It is, however, not satisfactory in a teaching This group consists of commands for control of output
environment to use computer programs of the 'black box' and the command bank (see below).

0264-4401/86/020155-06$2.00
© 1986 Pineridge Press Ltd Eng. Comput., 1986, Vol. 3, June 155
Education and Training
Output from the program is written on the display
screen, but is also stored in a listing bank (see Figure 3).
This bank is also a file on secondary storage. The user can
determine if output is to be stored or not. The contents of
the listing bank can at any time be sent to a line printer.
In Figure 4 the communication between a user and the
program is illustrated. CALFEM is in the primary
memory of the computer. Input commands and data are
given from the keyboard interactively. Output is shown
on the display screen but can also be sent to a line printer.
In the following sections a brief description of
commands to be used in a finite element analysis is given.
Most of the described commands belong to the groups of
element and system commands.

FINITE ELEMENT CALCULATION


The general principle of a finite element calculation can be
illustrated as in Figure 5. As shown the calculation is
basically divided into four steps. For each element of the
structure the element stiffness matrix is calculated. If
'distributed loads' are present the corresponding element
load vectors are calculated too. The contribution from
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

Matrix commands
Commands for matrix operations.

System commands
This group consists of commands for establishment,
condensation and solution of systems of equations.

Element commands
Commands for calculation of element matrices and
element forces for various types of finite elements.
A list of the commands in CALFEM is given in the
Appendix.
All data used are stored in matrices named by the user.
The matrices are stored in a matrix bank in the primary
memory of the computer. A one-dimensional array is
used. The matrices are identified by their names. The
structure of the matrix bank is illustrated in Figure 1.
At any stage of a calculation the user can look at the
contents of the matrix bank and change it if desired.
At execution of the program, commands given by the
user are stored in the command bank. This bank is a file on
secondary storage and it can be edited by the command
EDIT (with subcommands). The command bank is
illustrated in Figure 2. It is to be noted that the user can
determine if commands are to be stored or not. Stored
commands can be used further on in the calculation
procedure.

156 Eng. Comput., 1986, Vol. 3, June


Education and Training

A command for calculation of an element stiffness


matrix and a load vector (if element loads are present) is in
general of the form:
eltypE EP EK[ER]
where a pair of brackets denotes that the argument
(usually a matrix) can be omitted. The command consists
of a command name (eltypE) and two or three arguments.
The command name is a logical name connected to the
finite element used. It may be noted that special
commands that take into account geometric and inertia
effects, distributed springs and special loading conditions
are also available. The arguments are EP, EK and ER
where EP contains element properties (and load
parameters), EK is the calculated element stiffness matrix
and ER contains the element load vector due to
'distributed loads'. In general the element properties are
given on request from the program and the matrices are
created by the command. The sizes of the matrices depend
on the finite element used.
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

each element is added to the global stiffness matrix and


the load vector. Taking into account the boundary
conditions, the system of equations is solved giving the
unknown variables. By using the variables related to each
element the element forces can be calculated.
Element matrices and load vectors in CALFEM can be
established for several types of finite elements. In the
following, the commands for the four basic steps will be
described in more detail. In the description commands
working on the element level are called element
commands (calculation of element stiffness matrix and
element forces). The structural commands include
commands for establishing system matrices and for
solving systems of equations.
The concept used in CALFEM of direct numbering of
the degrees of freedom (nodal variables) often facilitates
modelling in a pedagogical way. An elastic support can be
treated by adding the spring stiffness of the support to the
global system matrix at the diagonal element
corresponding to the degree of freedom where the elastic
support acts. With the concept of direct numbering of the
degrees of freedom the position where to add the spring
stiffness is obvious. An internal hinge, e.g. in a plane frame,
can be modelled by using separate rotational degrees of
freedom for the members interconnected via the hinge.
Such additional degrees of freedom can easily be handled
in the present concept.

Element commands
This group contains commands that calculate element
stiffness matrices, element load vectors and element forces
for different types of finite elements. In Figure 6 a
description of the finite elements included in the present
version of CALFEM is shown. The numbered arrows
denote nodal variables. It may be noted that the 'spring
element' can also be used for one-dimensional heat
conduction and groundwater flow and electric circuits.

Eng. Comput., 1986, Vol. 3, June 157


Education and Training

the features of the program can be shown here. For


additional examples the reader is referred to the program
manual 10 .
When teaching the finite element method it is in civil
engineering pedagogical to introduce the theory and the
methodology by usage of simple bar and beam elements4
if the students have a good background in structural
mechanics.
The very simple example below shows an analysis of a
simple structure built up by one bar and one beam
element.

A beam-bar structure
The plane beam-bar structure shown in Figure 7 will be
analysed by usage of CALFEM. The element numbers
and global nodal variable numbers are shown in Figure 8.
The element stiffness matrices are calculated by the
commands BAR2E and BEAM2E for the bar and the
beam element, respectively. When assembling the
matrices the command ELIN is used together with
The contributions from all elements of the structure are topology information given in Figure 8.
assembled to the global system matrix and the load Prescribed values of the displacement vector U are the
vector. The system of equations is solved giving a vector variables of row number 1 through 5. The solution of the
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

containing the primary unknowns to be solved. The system of equations is performed by the command
element forces can then be calculated by a command of SOLVE and the element forces are calculated by BAR2S
the form: and BEAM2S for the bar and the beam element
respectively.
eltypS EP EN U
The calculation is listed below in Figure 9. It may be
where EP is predefined by the command eltyp, EN noted that input rows begin with the sign ' > ' (not given by
contains the element topology predefined by use of the the user) and an accepted input row is echoed with two
assembly command ELIN (see below) and U is the added stars (**).
calculated solution vector.

System commands CONCLUDING REMARKS


This group includes assembly and solution commands. A computer program, CALFEM, designed for computer
The command that assembles the calculated element aided learning of the finite element method has been
stiffness matrices and load vectors to a global system described. The program is based on a command language.
matrix and a global load vector is: The computational procedure is under the direct control
of the user and the stored data can be inspected and
ELIN EN EK K [ER R] manipulated at any stage of the computation.
where EN, EK and ER are described above and K and R The program has been used for computer exercises in
are the global system matrix and the global load vector several undergraduate and graduate courses. The
respectively. The arguments within the brackets can be experience is that CALFEM is a very efficient teaching
omitted if no element loads are present. tool which, in combination with theoretical studies,
If some elements of the structure have identical element
matrices these can be assembled at the same time. The
command that solves the established system of
equations is:
SOLVE K U R B [Q]
where K and R must be predefined. Prescribed variables in
the solution vector U are stored in the matrix B.
If the last argument Q is given the reaction forces are
also calculated according to the relation:
Q= KU-R
Normally all matrices are stored as full matrices in
CALFEM. In order to save computer storage the banded
form of the system matrix can be utilized optionally for
the commands ELIN and SOLVE.

EXAMPLE
As CALFEM contains about 70 commands which can be
combined in an unlimited number of ways only some of

158 Eng. Comput., 1986, Vol. 3, June


Education and Training
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

makes it easy for the student to learn the methodology in 10 Dahlblom, O., Peterson, A. and Petersson, H. Manual for
finite element analysis. CALFEM—a program for computer aided learning of the finite
element method, Version 85, Report TVSM-3007, Division of
CALFEM has been implemented on UNIVAC, DEC, Structural Mechanics, Lund Institute of Technology, Lund (1986)
VAX and IBM PC. 11 Dahlblom, O. and Peterson, A. Computer aided modelling based on
the finite element method, Report TVSM-3001, Division of
Structural Mechanics, Lund Institute of Technology, Lund (1982)
REFERENCES
1 Zienkiewiez, O. C. The Finite Element Method, 3rd Edn, McGraw- APPENDIX
Hill, London (1977)
2 Cook, R. D. Concepts and Applications of the Finite Element List of the commands in CALFEM
Analysis, 2nd Edn, Wiley, New York (1981)
3 Becker, E. B., Carey, G. F. and Oden, J. T. Finite Elements, an 1. BASIC COMMANDS
Introduction, Volume I, Prentice-Hall, Englewood Cliffs (1981) LMAT Load matrix
4 Thelanderson, S. Structural Analysis by Computer (in Swedish but DELETE Delete matrix
also translated to English), Studentlitteratur, Lund (1984)
5 Wilson, E. L. SMIS—Symbolic Matrix Interpretive System, Report COPY Copy matrix
No. UCSESM 73-3 (modified version), Department of Civil PRINT Output matrix
Engineering, University of California, Berkeley (1973) C Write out a comment line
6 Mays, J. R. EMOI—Extended Matrix Operation Interpreter, STOP Stop execution
Department of Civil Engineering, University of Colorado at Denver
(1977) START Get ready for new run
7 Becker, E. B. and Craig, R. R. ISMIS—Interactive Structures and 2. CONTROL COMMANDS
Matrix Interpretive, User's Manual, University of Texas at Austin
(1980) DSOFF Stop output on display screen
8 Wilson, E. L. CAL—Computer Analysis Language for the static DSON Resume output on display screen
and dynamic analysis of structural systems, Report No. UCSESM LBSEND Direct output to line printer
77-2, Department of Civil Engineering, University of California, LBDEL Delete stored output
Berkeley (1977)
9 Wilson, E. L. CAL—A Computer Analysis Language for teaching LBOFF Stop storage of output
structural analysis, Comp. Struct., 10, 127-132 (1979) LBON Resume storage of output

Eng. Comput., 1986, Vol. 3, June 159


Education and Training

QMOFF Turn off question mode BAR2S Compute normal force and stress
QMON Turn on question mode BAR2G Compute element stiffness matrix with
LANENG Give output in English respect to geometrical non-linearity
LANSWE Give output in Swedish Three-dimensional bar element
CBOFF Stop storage of commands BAR3E Compute element stiffness matrix
CBON Resume storage of commands BAR3S Compute normal force and stress
EDIT Edit the command bank Two-dimensional beam element
RUN Execute the commands in the command BEAM2E Compute element matrices
bank BEAM2S Compute section forces
STATUS List the current status of the control BEAM2W Compute element matrices with respect to a
parameters spring foundation
3. MATRIX COMMANDS BEAM2G Compute element matrices with respect to
geometrical non-linearity
ADD Add two matrices
BEAM2D Compute element matrices for dynamic
SUB Subtract one matrix from another
analysis
MULT Multiply one matrix by another
BEAM2L Compute element matrices for element with
INV Invert a matrix
concentrated load and distributed load
DET Compute the determinant of a matrix
BEAM2F Compute section forces in element with
TRANS Transpose a matrix
concentrated load and distributed load
REDUCE Reduce the size of a matrix
ABS Compute the absolute values of the Three-dimensional beam element
elements of a matrix BEAM3E Compute element stiffness matrix
SQRT Compute the square roots of the elements BEAM3S Compute section forces
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

of a matrix Triangular field element


MAX Determine the largest value in a matrix FLW2TE Compute element matrices
MIN Determine the smallest value in a matrix FLW2TS Compute flows
SUM Compute the sum of the elements of a FLW2TD Compute element matrices for transient
matrix analysis
PROD Compute the product of the elements of a Quadrilateral field element
matrix FLW2QE Compute element matrices
FLW2QS Compute flows
4. SYSTEM COMMANDS
ELIN Assemble element matrices Triangular plane element
SOLVE Solve a system of equations PLANTE Compute element matrices
COND Carry out static elimination PLANTS Compute stresses
STEP Carry out step-by-step calculation Quadrilateral plane element
EIGEN Solve an eigenvalue problem PLANQE Compute element matrices
PLANTS Compute stresses
5. ELEMENT COMMANDS Rectangular plane element
Spring element (analogue element) PLANRE Compute element matrices
BAR 1E Compute element stiffness matrix PLANRS Compute stresses
BAR 1S Compute spring force Rectangular plate element
Two-dimensional bar element PLATRE Compute element matrices
BAR2E Compute element stiffness matrix PLATRS Compute section forces

160 Eng. Comput., 1986, Vol. 3, June


This article has been cited by:

1. Patrick Paultre, Eric Lapointe, Charles Carbonneau, Jean Proulx. 2016. LAS: A programming language and development
environment for learning matrix structural analysis. Computer Applications in Engineering Education 24:1, 89-100. [CrossRef]
2. P. Paultre, P. Léger, J. Proulx. 1991. Computer‐Aided Education in Structural Dynamics. Journal of Computing in Civil
Engineering 5:4, 374-390. [CrossRef]
3. P. Paultre, P. Léger, J. Proulx. 1990. Computer graphics for computer assisted learning of structural analysis. Computers &
Structures 36:6, 1159-1166. [CrossRef]
Downloaded by George Washington University At 22:06 21 June 2016 (PT)

Das könnte Ihnen auch gefallen