Manual Cal Sap

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

CAL–SAP

COMPUTER ASSISTED LEARNING


OF

STRUCTURAL ANALYSIS PROCEDURES

COPYRIGHT (c) 1977-2008

BY

EDWARD L. WILSON

STRUCTURAL ANALYSIS PROGRAMS


1050 LENEVE PLACE
EL CERRITO, CA 94530

Draft Dated June 29, 2008


i

TABLE OF CONTENTS
1.1 Purpose of Program
1.3 Required User Background
1.4 Program Installation
1.5 The CAL Command Language
1.6 Data Preparation
1.7 Execution of the CAL Program

2. SUMMARY OF BASIC COMMANDS


RETURN Return to Interactive Mode from the File input mode
LOAD Loads an Array from the Input File
ZERO Create a Zero Array
PRINT Array is Displayed on Console and Output File
DELETE Array is Deleted from Storage
DUP Creates an Identical Array with Different Name
WRITE Create a Duplicate Copy of an Array on Disk

3. STANDARD MATRIX OPERATION COMMANDS


ADD Matrix Addition
SUB Matrix Subtraction
MULT Matrix Multiplication
TMULT Transpose Matrix Multiplication
TRAN Transpose of a Matrix
SCALE Multiplication of a Matrix by a Constant
SOLVE Solution of a set of Equations
INVERT Matrix Inversion
DUPSM Duplication of Submatrix
STOSM Store Submatrix
DUPDG Duplication of Diagonal
STODG Store Diagonal

EXAMPLE OF CAL COMMANDS


4. DIRECT STIFFNESS COMMANDS
4.1 Matrix Formulation of the Slope-Deflection Method
4.2 Summary of The Direct Stiffness Commands
SLOPE Formation of 4 x 4 Stiffness Matrix
LOADI Load Integer Array
ADDK Add Member Stiffness to Total Stiffness
MEMFRC Calculation of Member Forces
4.3 Example of Slope-Deflection Analysis
4.4 Two-Dimensional Frame Analysis with Axial Deformations –
FRAME Formation of 6 x 6 Stiffness Matrix
4.5 Three-Dimensional Frame and Truss Members FRAME3 Formation of 12 x
12 Stiffness Matrix

5. COMMANDS FOR DYNAMIC ANALYSIS


5.1 Evaluation of Mode Shapes and Frequencies
EIGEN Eigensolution with Diagonal Mass Matrix
JACOBI Eigensolution with Full Mass Matrix
SQREL Square Root of Each Term in a Matrix
RITZ Evaluation of Load Dependent Ritz Vectors
NORM Evaluation of Column Norms
PROD Evaluation of Product of All Terms

5.2 Dynamic Response by Mode Superposition


DYNA Dynamic Response of Modal Equations
MAX Select Maximum Values
PLOT Prepare printer PLOT of Response
FUNCT Form Function at Equal Intervals

5.3 Dynamic Response by Direct Step-by-Step Integration STEP


Newmark-Wilson Integration Method

5.4 Dynamic Analysis in the Frequency Domain


DFT Convert Time Function to Frequency Domain
IDFT Transform Frequency Function to Time Function
RADIUS Creates Frequency Response Function
FSOLVE Solves Modal Response Equations in Frequency Domain
1

CHAPTER 1

PURPOSE, DATA PREPARATION AND


EXECUTION

1.1. PURPOSE OF PROGRAM

At the present time, a large number of computer programs exist which evaluate the
displacements and member forces within complex three-dimensional structures. After
the computer model and input data is prepared, the analysis process is completely
automated. Therefore, it is now possible for students, professional engineers, and
professors to perform structural analysis and design using computer programs
without a complete knowledge of the approximations which have been incorporated
in the computer program. In addition, many individuals do not assume the
responsibility or have the ability to independently verify the results produced by a
structural analysis program.

The major reasons for the misuse of computer programs for structural analysis and
design is the lack of understanding of the engineering fundamentals of
equilibrium, force-deformation requirements, and displacement compatibility
equations. Another reason, which contributes to the inappropriate use of computer
programs, is that the traditional hand calculation methods of structural analysis are
not used within modern computer programs. Therefore, many engineers use
structural analysis programs as "black boxes" in which the approximations used
within the program are not appreciated. This is particularly true if a program is used
for three-dimensional dynamic response analysis.

One possible educational solution to this problem is to require students to write their
own programs for structural analysis which are based on the direct stiffness method
and on modern three-dimensional numerical methods of dynamic analysis. This
would result in an improvement in the students' programming ability; however, this
2 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

may be accomplished at the expense of a basic understanding of structural behavior.

Since programming knowledge is not essential to the responsible use of a structural


analysis program, an alternative approach is to use a special language which was
designed to subdivide structural analysis into a sequence of logical steps. The use of
such an approach requires that the student understand basic structural theory and
behavior without the need to perform a large number of time-consuming hand
calculations. This philosophy was the motivation for the development of the CAL
series of program.

The basic purpose of the CAL-SAP language is to bridge the gap between traditional
methods of teaching structural analysis and the use of automated structural analysis
programs. As a result of using CAL-SAP, it is hoped that engineers will understand
the theory and approximations which are used in modern structural analysis
programs.

Since the program can be easily modified, we use the program as an effective
research tool. New numerical algorithms for the static or dynamic analysis of
structures can be programmed and tested within a few hours. All floating point
calculations are carried out in double-precision 64 bit accuracy.

The program has been used to verify other programs for structural analysis. Simple
static and dynamic problems can easily be solved with the CAL-SAP program and
their results compared with programs which are being used for the first time.

It should be remembered, however, that the basic purpose of CAL is educational. No


attempt has been made to extend the capacity of the program by using sparse matrix
methods or to effectively use disk storage. Since CAL-SAP is designed for the
solution of small educational and research problems, under 1000 degrees of freedom,
it has limited values for the solution of large practical structures. One of the many
large capacity programs (Such as SAP-2000 or ETABS), with graphics and design
post processors, should be used for this class of problems.
3

1.2 REQUIRED USER BACKGROUND

Since the program performs basic matrix operations it can be used in upper division
courses on structural analysis that uses matrix notation. However, it will not
teach non-structural engineers to prepare computer input for large or small
structural systems. In my opinion, the most qualified individual to create a computer
model for a large, real structure is an experienced engineer that knows structural
analysis theory and has a clear understanding of the behavior of structures. This
knowledge cannot be automated into any computer program. Unfortunately,
many firms delegate the responsibility of the preparation and definition of the
computer model to junior engineers or non-engineering personel. The responsibility
of a CAL-SAP user is to be able to independently verify that the basic three
fundamental equations of mechanics are satisfied.

1.2. PROGRAM INSTALLATION

The CALSAP.EXE executable program is the only file which is required in order to
execute all CAL-SAP commands. Copy the CALSAP.Exe program in a folder
named CALSAP. In the same folder define or copy the file FileList and the example
problems. The Filelist ASCII file contains the name are the example problems and
any new problem that the user wants to define.

1.3. DATA PREPARATION

The CAL-SAP computer program is designed to interpret a sequence of commands


which are supplied by the user in a "input data file" prepared. The input data file
must be prepared, printed or edited by the NOTEPAD or WORDPAD editors. The
LIST, DISPLAY and PLOT commands can be executed by selecting the Post
Processing mode from the main CAL-SAP menu. The name of the CAL input data
file must have the extension TEX.

This version of the program performs matrix analysis, direct stiffness structural
analysis and dynamic response analysis. Several other commands exist; however,
they have not been documented at this time. Also, I plan to add additional
4 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

commands and output option in the future as requested by the users.

1.4. THE CAL COMMAND LANGUAGE

Data on a "command line" must be separated by commas, or, one or more blanks. A
typical CAL command line has the following form:

COMMAND M1 M2 - - A=a1,a2 - B=? : (Comment)

Where "COMMAND" is a one to 12 character name of the CAL command


"Mi" is a one to four character array name
"ai" is optional data for some commands

The notation "M+" indicates that a new array will be created by the operation. If the
array name for new data has previously been used the old array will be eliminated
before the operation is executed. The notation "M-" indicates that the array will be
modified by the CAL operation.

Typical data, "ai", to be used by the operation can be in either integer or floating point
form. In the case of a floating point number, it can have the form of arithmetic
statements. For example, 2.5+4*2-6/2 will be interpreted as ((2.5+4)*2-6)/2.

A "!" in column one of a command or data line indicates that the line will be a
comment line which is used to make the CAL input file more readable. In addition, a
! (after the essential data entered on any line) will allow additional comments to be
entered.

1.5. EXECUTION OF THE CAL PROGRAM

After the CAL-SAP Windows program is opened, the program asks the user for the
CAL-SAP project "name" of the input data file which contains the batch command.
The results of every CAL-SAP solution are saved on the output file name
"name.OUT".

After the CAL program is terminated the output file, name.OUT, can be printed or
edited by the WORDPAD editor.
5

CHAPTER 2

BASIC COMMANDS
The group of CAL commands presented in this section controls the flow of execution
of the CAL commands. Also, it allows for input, output, duplication or generation
of arrays within the computer's memory, RAM, or the transfer of arrays between
RAM and low speed disk storage. Note that the "+" sign after an array name
indicates that the array is created by the CAL command and the "-" sign after an
array name indicates that the CAL command modifies or deletes the data within the
array.

RETURN
The RETURN command will terminate the execution of the batch input mode and
return the CAL program to the interactive mode. This command can only be given
in the batch input file mode.

LIST or L
If the interactive LIST command is executed a list of the name and size of all arrays
which are contained in the computer storage is displayed.

LOAD M1+ R=? C=?


The LOAD command will create a matrix named "M1" with "R" rows and
"C"columns. The data must immediately follow the LOAD command. The data
must be supplied one row per line. The data is separated by commas, or, one or more
blanks. A line of data may be continued on the next line by the use of a "\" at the end
of the line. If the data for a row is greater than 160 characters the matrix must be
loaded by the use of submatrix operations. All input data should be checked with a
PRINT command.

ZERO M1+ R=? C=? T=? D=?


The ZERO command will create a R x C matrix named M1. If "T=?" is specified all
terms of the matrix will be set to "T". If the matrix is square the diagonal terms will
be set to "D".
6 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

PRINT or P M1
The PRINT command will cause the matrix "M1" to be displayed on the terminal and
written to the "????.OUT" print file, which can be printed by the DOS PRINT
command.

DELETE or D M1-
The array named M1 will be deleted and the storage within the computer will be
compacted.

DUP M1 M2+
The DUP command forms a new matrix named M2 in which all terms are equal to the
terms in matrix M1.

WRITE M1 and READ M1


The WRITE command can be used to save the array named M1 as a binary disk file
called "name.M1. Therefore, M1 must not have over a three character name. The
read command reads the array on the binary file named "name.M1" into RAM. Since
files can be renamed by the DOS command REN, data generated in one CAL
problem can be used as input to another CAL problem with a different "name".
7

CHAPTER 3

STANDARD MATRIX OPERATION


COMMANDS

This group of CAL commands is intended to perform standard matrix operations.


Note that the TMULT command eliminates, for most problems, the need to perform
a matrix transpose. Also, it is always more efficient to solve a set of equations
directly without using matrix inversion and multiplication.

ADD M1- M2
This operation replaces the matrix M1 with M1 + M2

SUB M1- M2
The SUB operation replaces the matrix M1 with M1 - M2

MULT M1 M2 M3+
The MULT command creates the matrix M3 which is the product of the matrices M1
and M2. ( The number of numerical operations required for matrix multiplication is
NxMxL; where, M1 is a N by M matrix and M2 is a M by L matrix.)

TMULT M1 M2 M3
Same as the MULT command except that M1 is stored in transposed form.

TRAN M1 M2+
The TRAN command forms the matrix M2 which is the transpose of the matrix M1.

SCALE M1+ M2
The SCALE command multiplies each term in matrix M1 by M2(1,1).

SOLVE A- B- S=? EQ=?


The SOLVE command operates on the matrix equation AX = B where A is a
symmetric matrix and B is specified. The results X are stored in the same location
8 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

as the B matrix. The following options are possible:

S=0 The matrix A is triangularized and B is replaced by the solution matrix X.


S=1 The matrix A is triangularized only.
S=2 The matrix B is reduced only - A must have been previously triangularized.
S=3 The matrix B is replaced by the solution matrix X by backsubstitution only.

EQ=The number of equations to be reduced - to be used in substructure analysis.

Any nonsingular set of equations can be made symmetric if both sides of the equation
are multiplied by the transpose of A.

(The number of numerical operations required to triangularize the N x N matrix


A is N3/6 . The number of operations required for forward reduction is N2L/2 and
for backsubstitution is N2L/2 ; where, L is the number of columns in the matrix B.)

INVERT A-
The symmetric matrix A is replaced by its inverse.
(The number of numerical operations required to invert a symmetric matrix is N3/2)

DUPSM M1 M2+ R=? C=? L=RL,CL


The command DUPSM creates a new matrix M2 with "R" rows and "C" columns.
The term M2(1,1) is identical to the term M1(RL,CL).

STOSM M1- M2 L=RL,CL


The command STOSM stores the submatrix M2 in matrix M1. The term M2(1,1) is
located at row RL and column CL in matrix M1.

DUPDG M1 M2+
The command DUPDG creates a row matrix M2 from the diagonal terms of matrix
M1.

STODG M1- M2
The command STODG stores the row matrix M2 on the diagonal of the matrix M1.

EXAMPLE OF CAL COMMANDS


9

The set of equations shown below must be solved. Since the SOLVE command
only solves symmetrical systems we must use additional operations to make the
system symmetrical.

 0 3.4 - 2.0   X1  3.0 


    
4.0 - 1.0 0.0   X2  = - 1.0  1
0.0 6.0 4.0   X3  4.0 
    

An input file of the following form must be prepared:

! SOLUTION OF NONSYMMETRIC SET OF EQUATIONS


LOAD A R=3 C=3
0 3.4 2.0
4 -1.0 0
0 6 4
PRINT A
LOAD B R=3 C=1
3
-1
4
PRINT B
TMULT A A ATA
TMULT A B X
SOLVE ATA X
PRINT X ! Print Results
MULT A X ! ERR
SUB ERR B
PRINT ERR ! Each value should be very close to zero
RETURN ! Return to the WINDOWS operating system

If the above data file is called "CALEX" it can be executed by giving the DOS
command CAL91. The CAL program will then ask the user for the "name" of the
input file and the user will respond by entering CALEX and a carriage return. The
above data is then executed by the user entering the CAL RUN command. The
results will be on the output file "CALEX.OUT"

The CAL program disk contains the file CALEX; therefore, the user can check the
program by executing the above data file.
10 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

CHAPTER 4

DIRECT STIFFNESS COMMANDS

The direct stiffness operations allow for the automatic formulation of element
stiffness matrices, the direct addition of element stiffness to form the global stiffness
matrix and the calculation of member forces in a local member coordinate system.
The first step in the use of these commands is for the user to identify all displacement
degrees of freedom at the joints of the structural system. These displacements
should be numbered U1, U2, - - - -UN. The corresponding external joint loads will be
R1, R2 - - - - RN. One equilibrium equation must be written in the direction of each
unknown displacement. The structural members should also be numbered from 1 to
M.

4.1 Matrix Formulation of the Slope-Deflection Method

The classical slope-deflection method, for horizontal beams and vertical columns, is
a well-known approach for structural analysis. However, it is identical to the direct
stiffness method in which axial deformations are assumed to be zero. Therefore, it
will be used to illustrate the basic steps involved in the direct stiffness method.
11

Figure 4.1 Positive Definition of Member Forces and Displacements


12 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

For the sign convention shown in Figure 4.1 the classical slope-deflection
equations can be written as

EI 6 ( v3 - v4 )
F1 = [ 4 v1 + 2 v 2 + ]
L L
EI 6 ( v3 - v4 )
F = [ 2 v1 + 4 v 2 + ]
2 L L

( F 1+ F 2 )
F3 = - F4 =
L

The relative displacement between the ends of the member, v3 - v4, has been written
in terms of the absolute global displacements. Now, these equations can be written,
for a typical member "M", as the following symmetric matrix equation:

 4 2 6 6 
-
 F1   L L   v1 
     
     
   2 4 6
-
6  
 F 2  L L   v2 
  = 4EI     4.1
  L  6   
 F 3  6 12 12   
- 2 v3
   L L   
2
L L
     
 
 F 4  M
 6 6 12 12   
- - -   v4  M
 L L L
2
L  M
2
=
FM

K
vM

K
M

Or symbolically, ; where, is the 4 x 4 element symmetrical


stiffness matrix.

In order to illustrate the direct stiffness method we will consider the rigid frame
example structure shown in Figure 4.2. The first step required, in the analysis of a
structure by the slope defection method, is to select the independent displacement
13

degrees of freedom

u3
u1 5 u1
u4
u4
100 in 1 2
6 u2 7 u2
u8 u9
u3
120 in 3 4

u6
180 in

Figure 4.2 Displacement Degrees Of Freedom For Rigid Frame

The next step, after the degrees of freedom are identified, is to write one equilibrium
equation for each degree of freedom. For this structure, the nine equilibrium
equations can be written in the following matrix form:
 R1   F 3   F 3   0 -   0 -   0-   0-   0 - 
               
 R2   F 4   F 4   F 4   F 3   0 -   0 -   0- 
               
 R3   0-   0-   0-   0-   F 4   F 4   F 3 
               
 R4   F 1  0 -   0 -   0 -   F 1   0 -   0 - 
               
 R5  =  0-  +  F 1  +  0-  +  0-  +  F 2  +  0 -  +  0- 
               
 R6   0-   0-   0-   F 2   0 -   0 -   0- 
               
 R7   F 2   0-   F 1   0-   0 -   F 1   0- 
 R8   0-   F 2   0-   0-   0-   F 2   F 1
           
 4.2
R9    
0- 1  0- 2  0- 3  F 14  0- 5  0- 6  F 2 7
  
14 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

From matrix Equation (4.2), we can also create a table indicating what member
forces contribute to each of the nine global equilibrium equations.

Table 4.1 GLOBAL EQUILIBRIUM EQUATIONS and MEMBER FORCES

Member 1 2 3 4 5 6 7
Force
F1 4 5 7 9 4 7 8
F2 7 8 - 6 5 8 9
F3 1 1 2 2 - - 3
F4 2 2 - - 3 3 -

Equation (4.2) is nothing more than a simple statement, in matrix form, that the
external applied loads equal the sum of the forces acting at the ends of the seven
elements. It clearly represents the summary of nine different free body diagrams. It
is suggested that the student draw each of these diagrams in order to understand this
simple, but extremely important, force equilibrium statement.

These nine equilibrium equations can be directly expressed in terms of joint


displacements by the substitution of Equation (4.1) for all seven members.
Therefore, the force-displacement relationship for each member is satisfied.

The final step involves the use of the joint displacement compatibility condition. The
displacements at the ends of all members connected to a joint must have the same
global displacements. For this example, Table 4.2 defines the relationship between
the four member displacements for each member and the nine global joint
displacement numbers.
15

Table 4.2 Member Displacements And Global Joint Displacements

Member 1 2 3 4 5 6 7
Displaceme
nt
v1 4 5 7 9 4 7 8
v2 7 8 - 6 5 8 9
v3 1 1 2 2 - - 3
v4 2 2 - - 3 3 -

It is apparent that the integer arrays, given in Tables 4.1 and 4.2, are identical. The
blank positions are reaction points and have zero displacements. The equilibrium
equations can be written in the following form:
R
=[

+
-
-
-
-
+

]
u
=

u
=

u
K

KT
*1

*2

* 7

M
∑ (4.3)

Each element stiffness can be expanded to a 7 x 7 matrix and the total stiffness
KT

matrix, , can be formed by direct matrix addition. Or, the total stiffness matrix can
be formed directly. This would involve the addition of each term in the 4 x 4 element
K
* M

stiffness matrix, , into the correct location in the 7 x 7 total stiffness matrix. The
procedure is time-consuming, repetitive, and prone to error if done by hand
calculations. For this reason special commands have been added to the CAL
program to perform these direct additions of stiffness operations.

4.2SUMMARY OF THE DIRECT STIFFNESS COMMANDS

SLOPE KM E=? I=? L=?


The slope command forms the 4 x 4 member stiffness matrix named KM for a beam
or a column. Where "E" equals the modulus of elasticity, "I" equals the moment of
inertia and "L" equals the length of the member.

LOADI M1 R=? C=?


The LOADI command allows an integer array named M1 to be loaded which has
"R" rows and "C" columns. The integer array given in Table 4.1 or 4.2 can be
16 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

loaded with this CAL command. The array loaded by the LOADI command can
be checked by the CAL PRINT command.

ADDK K KM ID N=?
The element stiffness matrix named "KM" is added to the total stiffness matrix
named "K". The row and column numbers where the terms are to be added are
obtained from the "N" column of the integer array loaded by the LOADI command.
The ADDK command is used for each member to add the element stiffness matrices
to the total (global) stiffness matrix.

After the joint loads are defined, the joint equilibrium equations are solved for joint
displacements by the SOLVE command. The use of the MEMFRC command for
each member allows member forces to be calculated.

MEMFRC T U ID F+ N=?
The member forces are evaluated by the multiplication of the matrix named "T" by
the joint displacement matrix named "U" and the results are stored in a matrix named
"F". The joint displacements which are to be used in multiplication are obtained
from the "N" column of the integer array named "ID". If "T" is the element stiffness
matrix the member forces are given according to the global sign convention. If "T"
is a special member force-displacement transformation matrix the member forces
will be given in a local member coordinate system.

4.3 Example Of Slope-Deflection Analysis

A complete analysis of the structure shown in Figure 4.1 will now be given. In order
to illustrate that the properties of the stiffness matrix are not a function of the loading
on the structure let us use the following two different lateral load conditions in the
same analysis:

 10
T
20 0 0 0 0 0 0 0
R =  4.2
 20 -10 0 0 0 0 0 0 0
The CAL input data file is shown in Table 4.3 and is on the CAL program disk under
the name SLOPEX. It is suggested that the student run this example problem and
PRINT the output file named "SLOPEX.OUT". Shear and bending moment
17

diagrams should be plotted and the overall static of both load conditions should be
checked.

Since this problem could have been solved by the traditional slope-deflection method
it is extremely important that each step of the direct stiffness method, using matrix
notation and the CAL program, be completely understood before other types of
elements are used.

Some important points to remember when using the direct stiffness method are:

1. The positive direction of forces and displacements for both members and joints
must be the same.

2. The basic equations which are written and solved are simple equilibrium
equations in which the external loads are set equal to the sum of the forces
acting ot the ends of the elements.

3. The integer "ID" array represents a summary of the equilibrium equations as


well as a summary of joint compatibility conditions.

4. Matrix notation and the CAL ADDK and MEMFRC commands are simple
operations which minimize bookkeeping functions.
18 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

Table 4.3 Cal Input Data File For Slope-Deflection Example

! SLOPE-DEFLECTION ANALYSIS EXAMPLE


SLOPE KCU L=100 I=800 E=30000 ! Members 1 And 2
SLOPE KCL L=120 I=80 E=30000 ! Members 3 And 4
SLOPE KB L=180 I=2000 E=30000 ! Member 5, 6 And 7
LOADI ID R=4 C=7 : ! Load Integer (Equilibrium) Array
4 5 7 9 4 7 8
7 8 0 6 5 8 9
1 1 2 2 0 0 3
2 2 0 0 3 3 0
PRINT ID ! CHECK INPUT DATA
ZERO KT R=9 C=9 ! START WITH ZERO TOTAL STIFFNESS MATRIX
ADDK KT KCU ID N=1 ! Add Member 1 Stiffness To Total Stiffness
ADDK KT KCU ID N=2 ! Add Member 2 Stiffness To Total Stiffness
ADDK KT KCL ID N=3 ! Add Member 3 Stiffness To Total Stiffness
ADDK KT KCL ID N=4 ! ADD MEMBER 4 STIFFNESS TO TOTAL STIFFNESS
ADDK KT KB ID N=5 ! ADD MEMBER 5 STIFFNESS TO TOTAL STIFFNESS
ADDK KT KB ID N=6 ! ADD MEMBER 6 STIFFNESS TO TOTAL STIFFNESS
ADDK KT KB ID N=7 ! ADD MEMBER 7 STIFFNESS TO TOTAL STIFFNESS
LOAD R R=9 C=2 ! LOAD TWO LOAD CONDITIONS
10 10
20 -10
0 0
0 0
0 0
0 0
0 0
0 0
0 0
P R : CHECK LOAD DATA
SOLVE KT R : SOLVE FOR GLOBAL DISPLACEMENTS
P R : PRINT DISPLACEMENTS
MEMFRC KCU R ID F N=1 : CALCULATE AND PRINT MEMBER 1 FORCES
P F
MEMFRC KCU R ID F N=2 : CALCULATE AND PRINT MEMBER 2 FORCES
P F
MEMFRC KCL R ID F N=3 : CALCULATE AND PRINT MEMBER 3 FORCES
P F
MEMFRC KCL R ID F N=4 : CALCULATE AND PRINT MEMBER 4 FORCES
P F
MEMFRC KB R ID F N=5 : CALCULATE AND PRINT MEMBER 5 FORCES
P F
MEMFRC KB R ID F N=6 ! Calculate And Print Member 6 Forces
P F
MEMFRC KB R ID F N=7 ! Calculate And Print Member 7 Forces
P F
RETURN ! RETURN To Home Window
19

4.4 Two-Dimensional Frame Analysis with Axial Deformations

FRAME KM TM [KG] I=? A=? E=? X=Xi,Xj Y=Yi,Yj [P=?]

The FRAME command forms the 6 x 6 element stiffness matrix named "KM" and a
4 x 6 force-displacement matrix named "TM" for a general two-dimensional
bending member with axial deformations included in the formulation. The
properties of the member are given as:

I= the Moment of Inertia of the member,


A= the Axial Area of the member, and
E= the Modulus of Elasticity of the member.

The coordinates of the "i" and "j" ends of the member are defined by Xi,Yi and Xj,Yj
respectively. Note that the user is responsible for the definition of the "i" and "j"
ends of the member. If P is specified the 6 x 6 geometric stiffness matrix KG is
formed.

The element stiffness matrix, "KM", is formed with respect to the positive definition
of global forces and displacements as shown below.

2
Figure 4.3 POSITIVE DEFINITION OF FORCES AND DISPLACEMENTS

The member forces, with respect to the member's local coordinate system, can be
evaluated by the use of the MEMFRC operation which multiplies the matrix "TM"
20 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

by the joint displacements. The positive definition of the member forces in the
local coordinate system is shown below. The MEMFRC command will evaluate the
local member forces in the order P1 - - P4.

Figure 4.4 Positive Definition Of Output Forces

4.5 THREE-DIMENSIONAL MEMBERS

The three-dimensional CAL commands TRUSS and FRAME3 illustrate how


structural analysis can be further automated. Both of these reference a node
coordinate array, Nx3 in size, named "XYZ" which contain the node point
coordinates; therefore, only the node point numbers need be used.

TRUSS KM TM A=? E=? N=I,J

The TRUSS command forms the 6 x 6 element stiffness matrix named "KM" and a
1 x 6 force-displacement matrix named "TM" for a general three-dimensional
21

member with axial deformations only included in the formulation. The Axial
Area of the member is "A". The Modulus of Elasticity of the member is "E".

Node numbers I and J refer to the row numbers in the "XYZ" array. The element
stiffness matrix, "KM", is formed with respect to the positive definition of global
forces and displacements as shown below.

Figure 4.5 POSITIVE DEFINITION OF TRUSS FORCES AND DISPLACEMENTS

The member axial force can be evaluated by the use of the MEMFRC operation
which multiplies the matrix "TM" by the joint displacements. A positive axial force
indicates tension.

FRAME3 KM TM II=I33,I22 A=? JJ=? E=? G=? N=I,J P=P1,P2

The FRAME3 command forms the 12 x 12 element stiffness matrix named "KM"
and an 8 x 12 force-displacement matrix named "TM" for a general
three-dimensional member with axial, bending and torsional deformations included
in the formulation. The properties of the member are given as

I33= the Moment of Inertia about the 3-axis


22 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

I22= the Moment of Inertia about the 2-axis


JJ= the Torsional Moment of Inertia about the 1-axis
A= the Axial Area of the member
G= the Shear Modulus, and
E= the Modulus of Elasticity of the member.

The coordinates of joint number I, J, P1 and P2 must have been previously loaded in
an array named "XYZ".

Figure 4.6 TYPICAL THREE DIMENSIONAL FRAME ELEMENT

The element stiffness matrix, "KM", is formed with respect to the positive definition
of global forces and displacements as shown below.
23

Figure 4.6 Positive Definition Of Forces And Displacements

The member forces, with respect to the member's local coordinate system, can be
evaluated by the use of the MEMFRC operation which multiplies the matrix "TM"
by the joint displacements. The positive definition of the member forces in the local
coordinate system is shown below. The MEMFRC command will evaluate the local
member forces in the order P1 - - P8.

Figure 4.8 POSITIVE FORCES IN LOCAL 1-2-3 SYSTEM

The section properties I22 and I33 of a three-dimensional frame member must be
24 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

specified with respect to a 1-2-3 local member coordinate system. In addition,


member forces, which are produced by the computer program, are defined in
reference to this local right-hand coordinate system. Therefore, it is the user's
responsibility to define the member 1 – 2 - 3 system in reference to the global x-y-z
system.

The positive 1-axis, V1 vector, is defined by a line along the axis of the member
from node point "I" to node point "J".

The 2 and 3-axes can be specified, with the P=P1,P2 option, by any one of the
following three methods:

METHOD 1 - GLOBAL PLANES ONLY - P=?,0


xy plane P=1,0 3-axis is the Z-axis and V2 = V3 x V1
zx plane P=2,0 3-axis is the Y-axis and V2 = V3 x V1
yz plane P=3,0 3-axis is the X-axis and V2 = V3 x V1

METHOD 2 - SPECIFICATION OF "Vp" VECTOR - P=P1,P2


The coordinates of node numbers P1 and P2 are specified by the user in the joint
coordinate information. The vector Vp is normal to the 2-axis and is defined by the
line from node point P1 to node point P2. The 2 and 3-axes are then calculated as
follows:

V2 = Vp x V1 and V3 = V1 x V2

Node points P1 and P2 may be "dummy nodes" which are not connected to members.

METHOD 3 - SPECIFICATION OF "K" NODE - P=0,K


The VK vector is defined by the line from node "I" to node "K". The 3 and 2-axes
are then calculated as follows:

V3 = V1 x VK and V2 = V3 x V1
25

CHAPTER 4.
COMMANDS FOR DYNAMIC ANALYSIS
In this section several commands are presented which allow CAL-SAP to perform
linear dynamic analysis of small structural systems. With the aid of other commands
it is possible to solve the following types of dynamic problems:

A. Evaluation of free-vibration mode shapes and frequencies.

B. Automatic generation of Ritz vectors to be used in a mode superposition


analysis or response spectra analysis.

C. Mode superposition analysis due to arbitrary loading.

D. Step-by-step analysis of structural systems with arbitrary viscous damping.

E. Dynamic analysis in the frequency domain.

All commands assume that the mass and stiffness matrices have been calculated by
other CAL commands. The PLOT interactive command can be used to produce
time history response plots of results.

5.1 EVALUATION OF MODE SHAPES AND FREQUENCIES

EIGEN K- V+ M-

This command solves the following eigenvalue problem for the mode shapes and
frequencies:
KV = MVe
Where "K" is the name of the N x N stiffness matrix K. The command is restricted
to a diagonal mass matrix; therefore, the array named "M" must be given as a row or
column array of the diagonal terms of the N x N mass matrix M.

The N x N matrix V, which contains all the eigenvectors (mode shapes) stored
column wise, is named "V" and is normalized in order that VT M V = I.
26 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

The N x N matrix e is a diagonal matrix of eigenvalues w2 (frequencies wi are in


radians per sec.2). The EIGEN command stores the eigenvalues ei in place of the
mass terms Mi in the array named "M".

The program uses the standard Jacobi method; therefore, both K and M must be
symmetric and positive definite matrices.

JACOBI K- V+ M- E+

This command solves the following eigenvalue problem for the mode shapes and
frequencies:
KV = MVe
Where "K" is the name of the N x N stiffness matrix K and "M" is the name of the
N x N mass matrix. The N x N matrix V, which contains all eigenvectors (mode
shapes) stored column-wise, is named "V" and is normalized in order that VT M V =
I.

The N x N matrix e is a diagonal matrix of eigenvalues wi2 (frequencies wi are in


radians per sec.2). The JACOBI command stores the eigenvalues ei as a N x 1
column matrix named "E". The program uses a modified Jacobi method where both
K and M must be symmetric and positive definite matrices.

SQREL M1

The SQREL command replaces each term in matrix M1 with the square root of the
term.

INVEL M1

The INVEL command replaces each term in matrix M1 with the inverse of the term.

RITZ K- M F- V+ NV=? S=?

Given a N x N stiffness matrix named "K", a N x 1 mass matrix named "M" and
a N x 1 force vector named "F", a N x NV matrix of orthogonal vectors, V, named
"V" is generated using a LOAD DEPENDENT algorithm. The matrix V is
27

normalized in order that VT M V = I.

The generated vectors V are not orthogonal with respect to the stiffness matrix K.
If "S" is a nonzero number the static vector response is not included in the response.

NORM M1 M2+ T=?

A row matrix M2 is formed in which each column contains the sum of the
corresponding column of the matrix M1. If "T" is not equal to zero the square root of
the sum of the square is calculated.

PROD M1 D

This command forms a 1 x 2 array named "D" which contains the product of all
terms in the array named "M1". The product is stored as two numbers of the form
D(1) 10D(2). This command is used to evaluate the determinate of a matrix.

5.2 DYNAMIC RESPONSE BY MODE SUPERPOSITION

DYNAM W C F G(t) X(t)+ DT=? N=?

This command evaluates a set of "I" uncoupled second order differential equations
which are generated in the mode superposition analysis of a structural system. The
typical equation is of the following form:

Xi + 2 ci wi Xi + w2 Xi = fi g(t) ; i = 1,---I

Where

W is a row or column array of the frequencies wi in radians per second.

C is the name of a row or column array of the damping ratios ci.

F is the name of I x 1 column array of the terms fi.

G is the name of a 2 x M array which can be used to define the time function g(t).
X(t) is the name of the I x N array where the results are stored.
28 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

DT is the time increment for which the results are produced.

The array G defines a time function in terms of straight line segments where G(1,J)
defined the time tj and G(2,J) is the value g(tj). The time function must be defined
in the range T = 0 to Tmax, where Tmax = N x DT. Therefore, the maximum value
of G(1,M) must be greater than Tmax.

The accuracy of the solution is not a function of the output time increment "DT"
since the command produces the exact solution for straight line segments.

MAX X(t) Xmax+

The MAX command locates the maximum absolute value in each row of the array
named X(t) and stores the results in a column matrix Xmax. The maximum value
and its column number are also printed or displayed.

FUNCT G F(t)+ N=? DT=?

The FUNCT command forms a 1 x N array named F(t). The terms are extracted at
"DT" intervals from the time function defined in the array named G. The array G
defines a time function in terms of straight line segments where G(1,J) defines the
time tj and G(2,J) is the value g(tj). The time function must be defined in the range
T = 0 to Tmax, where Tmax = N x DT. Therefore, the maximum value of G(1,M)
must be greater than Tmax.
29

5.3 DYNAMIC RESPONSE DY DIRECT STEP-BY-STEP


INTEGRATION
STEP K- M C UVA- U+ P F(t) DT=? L=Li,Lmax P=delta,alpha,theta
This command evaluates the displacements U, at equal time steps, of a structural
system where the dynamic equilibrium equations are specified in the following form:
Ma(t) + Cv(t) + Ku(t) = PF(t)

Where a(t), v(t) and u(t) are the time-dependent acceleration, velocity and
displacement vectors respectively. K, M and C are the names of the N x N stiffness
matrix, {K}, mass matrix, M, and damping matrix, C respectively.

The loads are specified as the product of a N x 1 matrix P and a 1 x J array {F(t)}
named F(t). The loads F(i) are given at equal time steps as specified by "DT".

UVA is the name of a N x 3 array of initial conditions in which


The first column is a vector of initial displacements U(0)
The second column is a vector of initial velocities V(0)
The third column is a vector of initial accelerations A(0)
After STEP is executed this array will contain the displacements, velocities and
accelerations at the last time step.

U is the name of the displacements which are stored as an N x Lmax array. The
step-by-step integration is conducted with a time increment "DT"; however, the
displacements are stored at Li time steps (or at "Li x DT" time intervals). Therefore,
the number of loads specified "J" must be greater than " Li x Lmax ".

The Newmark-Wilson step-by-step integration method is used where the parameters


are specified by delta, alpha and theta. The following table lists possible values:

Method delta alpha theta


Newmark's Average Acceleration 1/2 1/4 1.00
Newmark's Linear Acceleration 1/2 1/6 1.00
Theta Method - Low Damping 1/2 1/6 1.42
Theta Method - High Damping 1/2 1/6 2.0

If the P parameters are not specified the linear acceleration method is used.
30 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

5.4 DYNAMIC ANALYSIS IN THE FREQUENCY DOMAIN

The CAL operations DFT, IDFT and FSOLVE are provided in order to solve linear
dynamic analysis problems in the frequency domain. This approach can be very
effective for problems in which the loading is periodic over a very large time span
such as machine vibrations or wind and wave loading on structures. It can be used
for other types of loading, (i.e. earthquake ground motions), if the period of the
loading is selected to be sufficiently long to assure that the response of the structure
at the end of each loading period is essentially zero. If the damping of the system is
small a very large period may be required if accurate results are to be obtained for
loading which is not basically periodic. Following is a summary of these basic CAL
operations:

DFT F(m,t)- DT=?


The M x N array named F(m,t) contains M different time functions. Each row in
the array contains values of the function at equal time intervals ∆t . The time
functions F(m,t) represent a time span of − ∞ to + ∞ ; however, only the values
within a typical period N ∆t are specified as shown below:

F (t )

−t t

Tp = N ∆t Tp = N ∆t

Figure 5.1 TYPICAL TIME FUNCTION "m"


31

The term F(m,1) represents the value of the function "m" at the beginning and end of
the basic time period N x DT. The DFT operation expands the time functions in a
series of the following form:

F(t) = F 0 + ∑ Fck Cos(k dω ) + ∑ Fsk Sin(k dω ) 3

where k=1,2,----- (N-1)/2 (for N odd), or, (N-2)/2 (for N even), and dw = 2π/(N DT).
The calculated constants for time function "m" are stored in the mth row in the order
F0, Fc1, Fs1, Fc1 - - and replace the original terms in the F(m,t) array. For N even the
Nth column will be zero.

IDFT F(m,w)-
This operation transforms the frequency domain functions back to the time domain.
The M x N array named F(m,w), which is in the form generated by the DFT or
FSOLVE operations, is replaced by time function values at equal time intervals.

RADIUS F(m,w) R(m,w)+

This command operates on the M x N F(m,w) array and creates a M x L R(m,w)


array, where L = (N - 1) / 2. The terms are calculated from the following
equations:

R(m, i) = F(m,2i )2 + F(m,2i + 1 )2 4

FSOLVE W C F P(w) Y(m,w)+ DT=?

This operation evaluates the solution of a set of uncoupled second order differential
equations which are generated in the mode superposition analysis of a structural
system for which the loading has been transformed to the frequency domain. W, C,
and F are M x 1 arrays and have the same definition as given by the DYNAM
operation. The 1 x N array named P(w) is in the same form as produced by the DFT
operation and DT is the time step which was used to transform the time domain to the
frequency domain.

The mth row in the M x N array named Y(m,w) contains the terms Y0, Yc1, Ys1, yc2
32 C O M P U TE R A S S I S TE D L E A R N I N G o f S T R U C TU R A L A N A L Y S I S P R O C E D U R E S

----- which is the solution of the mth mode written in the following form:

Y( ω ) = Y 0 + ∑ Yck Cos(k dω ) + ∑ Ysk Sin(k dω ) 5

The frequency domain solution Y(m,w) can be transformed to the modal time
domain by the IDFT operation - IDFT Y(m,t).

You might also like