A Conception of Module Library and Data Base Management System For Finite Element Analysis
A Conception of Module Library and Data Base Management System For Finite Element Analysis
00
Printed in Chat Britain. Q 1989 Mawell Rrgpmon Macmillan plc
Abetract-The paper discusses the necessity and feasibility of developing an F.E. program module library
instead of the currently prevailing F.E. codes. Emphases are put on ‘adoptability*, which means that the
modules can be readily adopted by users in their own programs, and ‘extensibility’, which means that the
library can be readily extended by users with their own subroutines, and ‘re-organixability’, which means
that the library can be readily ‘tailored’ to compose a special purpose program. To this end, a data base
and its management system written in FORTRAN and independent of any operating system has been
created. The paper will describe in detail the main features of them. Furthermore, the paper will try to
introduce the architecture of this kind of F.E. module library in structural analysis. It is deemed that the
development of the library will greatly benefit F.E. analysers, especially those who are faced with new
ideas, new algorithms, new materials and new structures.
1073
1074 WANG S?iow
THE DATA BABE AND ITS MANAGER users/programmers anywhere at any time by simply
pointing out the file name. A very short subroutine
In implementation of F.E. analysis many demands will then scan the fife directory and pick up all
are made on data management: data input, data associated information pertaining to the tile, includ-
updating, data ~nsfe~ng, data saving and retriev- ing the pointer of the buffer. After the ~mpu~~onal
ing, etc. This kind of manipulation constitutes a mission related to the file is over, the file can be
considerable portion of a general purpose program. deleted for ever or released temporarily. In the latter
In doing so, many large scale commercial package case, the file can be recovered later and resume the
or research tools, such as SAP and ADINA, use related ~mpu~tion. As long as some files are deleted
‘Dynamic Allocation of Array’. The basic idea of the or released, another subroutine may be activated and
technique is as follows. the manager automati~~y compresses the ~a~ng
1. A ‘Master Array’ long enough for conducting buffers in order to make room for new t&s. Yet, a
desired analyses is declared. most important feature is that all files have been
2. The master array is broken down into many placed into a unified, standardized format. As a
sections identifi~ by ‘Pointers’, i.e. beginning result, file contents become clear and ~de~~n~ble,
subscripts in the master array. unlike the data in dynamic allocation which are
3. Each section is then taken as an indi~du~ controllable only to the person who did the allo-
array by making use of dummy/real arguments of cations. Furthermore, data input from card deck is
FORTRAN subroutines. correspondingly standardized. Every data set can be
Before making comments on the dynamic allo- read in by the same FORTRAN statements so that
cation, we briefly present a new data management the progr~~ng efforts are considerably saved.
system as an alternative aiming at significantly simpli- Finally, new files can even be opened through input
fying data ma~pulations. The system consists of the cards, unlike in dynamic allocation where a new array
following in~dients. has to be declared or a new pointer has to be assigned
1. All data are grouped into data sets or ties based and new reading statements must be added.
on their geometrical/physical meanings. All these features make the new data management
2. The master array is again declared but this time it system especially appealing in developing a program
is broken down into file buffers. module library with expected ‘adoptability, extensi-
3. Accompanying the master array, a tile directory is bility, re-organizability’. The library will be easy to
created. It is a named common block insisting master not only for the developer but also for a
of a number of arrays. These arrays are used to user/programmer who intends to adopt its modules
record file parameters which illustrate various or to extend it or to re-organize it.
features and status of every file. Hence, the file In the sections to follow we are going to give
directory is a book-keeping device. detailed descriptions and usages of the system. We
4. All the manipulations of the files, such as opening will also introduce some fundamental thoughts con-
a tile (a buffer is thus ~~b~~~), reading a record cerning the architecture of these kind of libraries. A
of a file, finding pointer and other parameters of sample library, TOOLKIT, will be referred to as a
a file, deleting a file, printing out a file, getting a concrete example.
listing of all the files, saving the entire master array
and file directory onto tape/disk for later use (a FiLFs
restart job, for instance), etc. are performed by
carefully designed software called The Data Base Data are separated into data sets calfed tiles based
Manager. on their geometrical/physical meanings. Each file is
In comparison with the dynamic allocation, the identified by its name. The recommended file names
data management system is much more advantageous obey the following conventions:
in several respects. The complicated and troubl~ome
pointer calculations of dynamic allocation are ex- they consist of one to eight FORTRAN characters;
ceedingly sirnp~~ by merely calling a subroutine they are divided into two parts by a period;
with a few arguments. Data swapping between fast before the period is the commonly used notation or
and slow storage can be carried out automatically by abbreviation of the quantity;
a reading/writing subroutine which will check the after the period is the abbreviation indicating the
buffer contents and perform rea~n~w~ting if the data att~bution, namely, what the data is associ-
requested records are on tape/disk. With the aid of ated with. For example:
the t%ledirectory an overali picture of the master XYZNOD Nodal coordinates,
array at some instant of running time can be found. TOPO.ELE Etement topological info~ation
The information provides users/programmers with (connectivity),
thorough knowledge regarding what data or compu-
tational results they may get from the data base and where NOD is the abbreviation of node* XYZ is the
how much storage in the master array is available to notation of coordinates, TOP0 is the abbreviation
them. Once a file has been opened, it is accessible to for topology and ELE is for element.
Module library and data base management 1075
To fully define a file the following additional MAXNOD is different for different types of el-
parameters are indispensible ements. Under the circumstances, the total
number of subfiles is equal to the total number of
Data type: I, integer; R, real; D, double element groups.
precision; H, character In order to help the user/programmer understand
Record length: according to the nature of the and memorize files, the module library should be
data accompanied by a File Manual that depicts file
Buffer length: requested interval length in features and gives the exact meaning of every entry
the master array in a record. Several pages of a manual for the sample
Tape/disk number: second storage file library TOOLKIT are given in the Appendix.
Pointer: beginning subscript of the
buffer in the master array BUFFERS
Number of subfiles: this parameter is essential
for files with variable record/ All the buffers reside in the blank common block
buffer length. We elaborate
this case as follows. COMMON IA(. . . . .)
There are three types of files in a module library. When a file is opened at the request of the Data Base
Manager, a pointer is assigned (see below) and an
Single-record file. A file that contains only one interval of IA, the master array, is reserved. In
record. For example, all control parameters of a accordance with file types there are three types of
problem can be gathered in such a file. buffer patterns as shown in Fig. 1.
Multi-record file. A file that contains more than
one record. For example, nodal coordinate file TAPES/DISKS
includes NUMNP (total number of nodal points)
records, of which each has three entries: x, y, z of Whenever an entire 6le is too long to store in core,
the node. or a buffer is too long to be constantly kept in core,
Multi-subfile file. A file that contains more than a tape/disk file number is also assigned during open-
one subfile of which each may have different ing. The Data Base Manager automatically saves
record/buffer length and contain many records. data onto or retrieves data from tape/disk files. To
For instance, the file of element connectivity may this end, more parameters are defined in the file
have NEG (total number of element groups) directory to indicate the current buffer status,
subfiles; each subfile has NE (total number of tape/disk status and the position of the magnetic
elements in the group) records while each record heads. Some of these parameters are shown in Fig. 1
has MAXNOD (max. number of nodes to define and Fig. 2. Figure 2 illustrates the record arrange-
an element) entries. Obviously, the variable ment on a tape/disk 6le.
. LR = LB
Buffer NOFROB
LR
/
I
Fig. 1. File buffer. LR, record length; LB, buffer length; NSUBF, total number of subfiles; NORFROB,
record number of the 1st record in the current buffer.
1076 WANG SHOUMEI
SubfiLe I SuMiCe 2
. ..
Buffer I Buffer 2
L Record I
Record 2
SubfiLe KOSUBF
. . .
. . .
.. . Buffer KOBUFR . ..
t
Magnetic head
SUBROUTINE ELELIB(IELTYP,INFUNCT)
FROLIB ELELIB
I
GO TO (1,2,3), IELTYP
,
1 RETURN
LESTAT LE!lYNA EIGEN .. .
2 CALL EL2D(IFUNCT)
RETURN
where 3 CALL EL3D(IFUNCT)
PROLIB: procedure library interface RETURN
LESTAT: linear elastic static analysis END
LEDYNA: linear elastic dynamic analysis
EIGEN: eigenvalue/eigenvector analysis An example of material library
ELELIB: element library interface.
SUBROUTINE PROLIB
CALL LESTAT
RETURN where
END
MATLIB: material library interface
MATOl: linear elastic isotropic materials
An example of procedure library interface for eigen/
MAT02: linear elastic orthogonal anisotropic
eigenvector
materials
...
SUBROUTINE PROLIB
CALL EIGEN
An example of material library interface for
RETURN
MATOl-a material model
END
SUBROUTINE MATLIB(MODEL,ISSTYP)
An example of element library
CALL MATOl(ISSTYP)
RETURN
END
where
v!q
MODEL: material type identifier
where ISSTYPZ strain/stress status identifier to dis-
tinguish, for instance, u&axial case,
ELELIB: element library interface plane stress, plane strain, axisym-
ELBAR: bar element metric case, 2-D beam, 3-D beam,
ELZD: 2-D element plate, shell, etc.
CAS
3215-J
1080 wANcisHounQ1
An example of material library interface for com- transfer along radial direction is permitted, but pro-
bined MAT01 and MAT02 hibited tangentially. Modules on the same level of
SUBROUTINE MATLIB(MODEL,ISSTYP) radius do not have calling relations either, unless
GO TO (1,2), MODEL going through the interfaces. The main driver reads
1 CALL MATOl(ISSTYP) input data and then, most likely, does some prelimin-
RETURN ary calculations and calls the procedure library inter-
2 CALL MATOZ(ISSTYP) face. Some member in the procedure library will later
RETURN call the element library interface, of which one or more
END members will next call the material library interface.
The interfaces are written by a user or a program. An example of main driver is shown as follows.
In the latter case the job is separated into two
successive ones denoted by PRE and MAIN. PRE INPUT
reads the input data and makes a judgement concem- 1
ing which members in the sublibraries are required AUXLIB users’ auxiliary modules for pre-pro-
in the particular run. Based on the decision the cessing
interfaces are written in characters onto a disk/tape I
file, which will later be compiled and linked with CINIT assign data to named common blocks
other modules in the library. 1
It is worth noting that the modules in the library NODDOF set up equation numbers
are already compiled and saved on secondary devices, 1
separately. They are not linked together. To form the ELCON evaluate element connectivity
executable module for MAIN, the LINK EDITOR 1
must be activated. One has to bear in mind that a COLI-IT evaluate column height
LINK command is to be sent to the operating system, 1
and the command includes the interfaces written by PIVOT evaluate pivot address
PRE but excludes the modules of the library which 1
will not enter the particular execution. ELDATA re-organize element data and save on
Figure 3 shows the overall view of the module tape/disk
library. All members in the library can access the data I
base via the data manager. In other words, data PROLIB
Fig. 3.
Module library and data base management 1081
The interface
I
-----__
FYI -------- Rx
i I
I I I I
Foe-01 - - - - POI-01 - - - POI-02 - *- - po2-01 - - - m-02
I
I I I
WI-00-01 - - Pal-01-01- - FctOl-02 - - P02-oO91 - - . .. - **. -
Program modules in each sublibrary are connected A ‘Module Manual’ should be published along
by calling statements and form a complicated tree with the software package to help users/programmers
structure. The hierarchical relations among modules grasp the tree structure and the usage of the module
can be seen from a flowchart as portrayed in Fig. 4, library. Each page of the manual follows the format
where we have attached a level number to every below.
module. Modules having the same level number are
parallel to each other but they are subordinate to DRIVING SUBROUTINE: MAT01 1
some modules at higher levels. MODULE INDEX: MOl-01
Even though a flowchart gives a vivid description MODULE FUNCTION: material stiffness for
of the tree structure, it is not convenient in the case Mode1 MAT01 in 2-
of module libraries. The reason is twofold. First, the Dcase
tree structure of a module library is supposedly sub- INPUT FILES: PROP.ELE
jected to frequent changes, and to constantly update FILES TO BE OPENED: none
its flowchart is obviously not a wise idea; secondly, FILES TO BE RELEASED: none
the flowchart itself cannot be read, memorized and FILES TO BE DELETED: none
analyzed by a FORTRAN program. Thus, automati- OUTPUT FILES: D.MAT
cally re-organizing a module library is impossible. COMMENTS: ...
In or&r to circumvent the difficulty, the author
suggests a systematical way to express the tree struc-
ture by means of a hierarchical numbering system. In The modules in the sublibraries may be a driving
the system, each module is identified by an index that program to call a series of other modules at lower
consists of n two-digit labels with n being the level levels, such as the member of a procedure library
number of the module, as shown in Fig. 4. The nth given below, or a lower level interface, such as the
label gives ordinal number of the module at the level example of element function interface or the example
it is pertaining to, while the other n-1 labels tell what of material strain/stress status interface given below.
modules it is subordinate to. For example, a module Example. LESTAT-Linear Elastic Static analysis
with an index PO2-03-04 means: (1) the module is at module in procedure library
level 3; (2) it is the 4th module at this level; (3) it is
subordinate to the 3rd module at level 2, which, in LESTAT PO1 the driver
turn, is subordinate to the 2nd module at level 1; 1
(4) the letter P shows that the module is in the CLOAD POO-01 calculation of load vector
procedure library (E, element library; M, material 1
library). It has to be pointed out that a module may - ESTIFL POO-02 linear element stiffness
be called by more than one module at higher levels. 1 /
The label 00 is then used to indicate that the module GSTIFL 1’00-03 linear global stiffness
is subordinate to any module at the higher level. 1
With the hierarchical numbering system, the re- SOLVER POl-01 in-core solver
organization of the module library for a particu- 1
lar run can readily be done either manually or STRESS POO-04 element stress
automatically. . ELELIB element library interface
1082 WAN0 %OUMEl
I EL3D JI 1MATLIB 1
I a a
I I I I I
ELK3D ELK30N ELM30 EL030 f~3D ...
APPENDM
****************t********t****+*********************************************
FILE NATURES
DATA TYPE: R
LENGTH OF RECORD: 3
LENGTH OF BUFFER: 3rNUMNP (NUMNP-TOTAL NUMBER OF NODES)
NUMBER OF SUBEILES: I
RECORD FORMAT
NO. ENTRY COMMENT
1 X X-ORDINATE
2 Y Y-ORDINATE
3 z Z-ORDINATE
********+*********+**S**********************~***********************‘****‘********~***************~*****~*
Module library and data base management 1083
**+*******+**+***+****************************~**********************************************************
FILE NATURES
DATA TYPE: I
LENGTH OF RECORD: 10
LENGTH OF BUFFER 10
NUMBER OF SUBFILES: 1
------------------------------------------------_--_-
RECORD FORMAT
NO. ENTRY COMMENT
1 NLOAD NUMBER OF CONCENTRATED LOADS
NCURVE NUMBER OF CURVES TO DEFINE LOAD VARIATION HISTORY
: MAXP MAX.NUMBER OF POINTS ON ANY ONE CURVE
4 NPRES PRESSURE LOAD IDENTIFIER
...
++*****I***+***+************************~*******************~*********~**********************************
FILE NATURES
DATA TYPE: I
LENGTH OF RECORD: MAXNOD (MAX. NO. OF NODES TO DEFINE AN ELEMENT)
LENGTH OF BUFFER MAXNOD+NE (NO. OF ELEMENTS IN THE REGION/ZONES)
NUMBER OF SUBFILES: NUMRG (TOTAL NUMBER OF MESH REGIONS)
-----------------------------------------------------
RECORD FORMAT
NO. ENTRY COMMENT
1 NOD(l) THE FIRST NODE NUMBER
2 NOD(2) THE SECOND NODE NUMBER
...
MAXNOD NOD (MAXNOD) THE LAST NODE NUMBER
*+*******+*+***+***t*************************************************************************************
FILE NATURES
DATA TYPE: D
LENGTH OF RECORD ND*(ND + 1)/2 (ND-NO. OF DOF OF AN ELEMENT)
LENGTH OF BUFFER: SEE ABOVE
NUMBER OF SUBFILES: NEG (TOTAL NUMBER OF ELEMENT GROUPS)
-_-__-_-_--_-_--_-_-_--_----------------- ------------
RECORD FORMAT
NO. ENTRY COMMENT
K(1.1)
: K(291)
ND ii(ND,l)
ND+1 K(292)
ND+2 ~(3~2)
...
...
K(ND.ND)
*L++**+***++****+*L*******************************~*******************~**********************************