Sie sind auf Seite 1von 122

Volume I: Report

SOFTWARE FOR PLASTIC


COLLAPSE
COMPUTATION IN
STRUCTURES

TFG presented for the DEGREE in MECHANICAL
ENGINEERING
by
Benito Moya Fernndez
and
Cristina Hernndez Olivar

Barcelona, June 11th 2014

Director: Mr. David Snchez Molina
Departamento de Resistencia de Materiales y Estructuras en la Ingeniera
Department of Materials Strength and Structures in Engineering
(DRMEE)
Universitat Politcnica de Catalunya (UPC)

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 2
Benito Moya Fernndez
Abstract:
At the moment there are much software for structural design and computation, each one with
its advantages and disadvantages.
There are software for Finite Elements Analysis too that, in a general manner, has the
capability to show the tensile status from a part under load.
But there is not a software that, based on the definition of a structure in classical terms (Nodes
and bars arrangement, each one with his physical and constructive characteristics), and taking
a combination of loads acting and evolving in the time, give us an approaching of when and
how that structure collapses.
In this way, this project wants to do the following.
- From the basis of structural matrix calculation, set up a logical operative for a
computer, for plastic collapse computation is structures.
- One time established this operative, to define the necessary data, in scope to do these
calculations with a computer. This means, in addition to indicate the necessary data, to
establish the data structure, so a computer could understand and operate with them
in efficient form. This acts on input and output data.
- One time data and its structure defined, we need to indicate the flow and evolution in
time from this data, getting the flow diagram for the software. This is very important,
because it will define the transformation of the information, and where we want to
arrive with each one of the transformations.
- The flow diagram will define, by default, a block diagram. Each block will become an
intermediate step. And in each step we will define the operative blocks, in scope to get
the desired transformation in the input information.
- At this point we will have the capability of to establish the first step from the software:
The software pseudo-code. We will define the computation basis that we will use in
pseudo-code and we will do all of steps (blocks) from the software. In this manner we
can do the final software implementation in any programing language.
- At the end we will choose a programing language, to program the final application
code.
In the first software release, it will be limited to a plane tensile state; it wants to mean that we
will work in two dimensions. The computational basis to work in two or three dimensions are
the same, but the implementation in pseudo-code and programing language are very different,
in 3D is very hardest than 2D.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 3
Benito Moya Fernndez
Abstraccin:
Actualmente existen muchos programas para el diseo y clculo de estructuras, cada uno de
ellos con sus ventajas e inconvenientes.
Existe software para el anlisis por elementos finitos que, de una manera general, tiene la
capacidad de mostrar el estado tensional de un elemento bajo carga.
Pero no existe un software que, basado en la definicin de una estructura en trminos clsicos
(Conjunto de nudos y barras, cada uno con sus propiedades fsicas y constructivas), y tomando
una combinacin de cargas actuando y evolucionando a lo largo del tiempo, nos d una
aproximacin de cuando y como la estructura colapsa.
En este sentido, este proyecto pretende hacer lo siguiente:
- Partiendo de las bases del clculo matricial aplicado a estructuras, establecer una
operativa lgica para una computadora, para el colapso plstico de estructuras.
- Una vez establecida sta operativa, definir los datos necesarios, con el objetivo de
realizar estos clculos con una computadora. Esto significa, en adicin a los datos
necesarios, establecer la estructura de estos datos, para que una computadora pueda
interpretarlos y operar con ellos de una manera eficiente. Esto afecta a los datos de
entrada y los de salida.
- Una vez estn definidos los datos y su estructura, necesitamos indicar el flujo de estos
datos y su evolucin en el tiempo, obteniendo el diagrama de flujo del programa. Esto
es muy importante porque define las transformaciones de la informacin, y donde
queremos llegar con cada una de ellas.
- El diagrama de flujo os definir, por defecto, el diagrama de bloques. Cada bloque ser
un paso intermedio. Y cada paso definir la operativa del bloque, con el objetivo de
obtener la transformacin deseada en la informacin de entrada.
- En este punto tendremos la capacidad de definir el primer paso del software, el
pseudo-cdigo del programa. Definiremos las bases de computacin que usaremos en
dicho pseudo-cdigo y realizaremos todos los pasos intermedios (bloques) para el
programa. De esta manera podremos realizar la implementacin final del programa en
cualquier lenguaje de programacin.
- Al final escogeremos un lenguaje de programacin, para programar el cdigo final de
la aplicacin.
En la primera edicin de este programa, se ha limitado al estado de tensiones en un plano,
esto quiere decir que trabajaremos en dos dimensiones. Las bases de computacin para
trabajar en dos o tres dimensiones son las mismas, pero el pseeudo-cdigo y la programacin
final son muy diferentes, la programacin en 3D es mucho ms ardua que en 2D.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 4
Benito Moya Fernndez
Abstracci:
Actualment existeixen molts programes pel clcul i disseny destructures, cadascun dells amb
els seus avantatges i inconvenients.
Existeixen programes per lanlisi per elements finits que, duna manera general, tenen la
capacitat de mostrar lestat tensional dun element sota crrega.
Per no existeix cap programa que, basat amb la definici duna estructura en els seus termes
clssics (Conjunt de nusos y barres, cadascuna dells amb les seves propietats fsiques i
constructives), i agafant una combinaci de crregues actuant i evolucionant al llarg del temps,
ens doni una aproximaci de quan i com lestructura collapsa.
En aquest sentit, aquest projecte vol fe el segent:
- Partint de les bases de clcul matricial aplicades a estructures, establir una operativa
lgica per una computadora, pel collapse plstic destructures.
- Una vegada establida aquesta operativa, definir les dades necessries, amb lobjectiu
de realitzar els clculs amb una computadora. Aix significa, a ms de les dades
necessries, establir lestructura daquestes dades, perqu una computadora pugui
interpretar-los i operar amb ell duna manera eficient. Aix afecta tant a les dades
dentrada com a les de sortida.
- Una vegada definides les dades i la seva estructura, necessitem indicar el flux
daquestes dades i la seva evoluci en el temps, obtenint el diagrama de flux del
programa. Aix s molt important perqu defineix les transformacions, i on volem
arribar amb cadascuna delles.
- El diagrama de flux definir, per defecte, el diagrama de blocs. Cadascun dels blocs
esdevindr un pas entremig. I cada pas definir loperativa del bloc, amb lobjectiu
dobtenir la transformaci desitjada amb la informaci dentrada.
- En aquest punt tindrem la capacitat de definir el primer pas del programa, el
pseudocodi del programa. Definirem les bases de computaci que farem servir dins del
mencionat pseudocodi i realitzarem tots els passos entremig (blocs) pel programa.
Daquesta manera podrem realitzar la implementaci final del programa en qualsevol
llenguatge de programaci.
- Finalment escollirem un llenguatge de programaci, per programar el codi final de
laplicaci.
A la primera edici daquest programa, sha limitat a lestat tensional dins dun pla, aix vol dir
que treballarem en dues dimensions. Les bases de computaci per treballar en dues o tres
dimensions son les mateixes, per el pseudo-codi i la programaci final son molt diferents, la
programaci en 3D es molt mes complicada que en 2D.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 5
Benito Moya Fernndez
Contents
Abstract: .............................................................................................................................2
Abstraccin: ........................................................................................................................3
Abstracci: ..........................................................................................................................4
1. Introduction ............................................................................................................6
2. Report .....................................................................................................................7
2.1 Software target ............................................................................................................7
2.1.1 Graphical User Interfaces (GUI) ............................................................................7
2.1.2 Program capabilities .............................................................................................7
3. Solved examples ......................................................................................................9
3.1 Single straight beam. ....................................................................................................9
3.2 Half portico, all rigid nodes .........................................................................................10
4. Calculation basis .................................................................................................... 17
4.1 Matrix calculation basis. .............................................................................................17
4.1.1 Stiffness Matrix in Local Reference System (LRS) ...............................................18
4.1.2 Nodal force vector in Local Reference System (LRS). ..........................................20
4.1.3 General reactions and displacements .................................................................29
4.1.4 Global reference system .....................................................................................30
4.1.5 Global matrix assembly ......................................................................................30
4.2 Resolution procedure .................................................................................................33
4.2.1 Previous requirements .......................................................................................33
4.2.2 Calculation procedure ........................................................................................34
5. Data for calculations .............................................................................................. 41
5.1 General data ...............................................................................................................42
5.2 Descriptive data ..........................................................................................................42
5.2.1 Nodes .................................................................................................................42
5.2.2 Beams .................................................................................................................43
5.3 Operative data ............................................................................................................45
6. Data Base .............................................................................................................. 48
7. Software description .............................................................................................. 49
7.1 Functional program description .................................................................................49
7.1.1 Data input ...........................................................................................................51
7.1.2 Calculations ........................................................................................................56
7.1.3 Result presentation. ...........................................................................................57
7.2 Internal workings ........................................................................................................59
7.2.1 Data input and preparation ................................................................................61
7.2.2 Calculations ........................................................................................................83
7.2.3 Presentation of solutions ..................................................................................106
7.3 Programming ............................................................................................................108
7.3.1 Data base programming ...................................................................................109
7.3.2 Application programming .................................................................................112
8. Bibliography ........................................................................................................ 114
9. Quick Start Guide ................................................................................................. 115
9.1 Project ......................................................................................................................115
10. ANNEX I - Budget ................................................................................................. 121
10.1 Developing expenses ................................................................................................121
10.2 Business expenses ....................................................................................................121
10.3 Sale price ..................................................................................................................121
11. ANNEX II Code in Visual Basic ............................................................................ 122


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 6
Benito Moya Fernndez
1. Introduction
At the moment there are much software for structural design and computation, each one with
its advantages and disadvantages.
There are software for Finite Elements Analysis too that, in a general manner, has the
capability to show the tensile status from a part under load.
But there is not a software that, based on the definition of a structure in classical terms (Nodes
and bars arrangement, each one with his physical and constructive characteristics), and taking
a combination of loads acting and evolving in the time, give us an approaching of when and
how that structure collapses.
In this way, this project wants to do the following.
- From the basis of structural matrix calculation, set up a logical operative for a
computer, for plastic collapse computation is structures.
- One time established this operative, to define the necessary data, in scope to do these
calculations with a computer. This means, in addition to indicate the necessary data, to
establish the data structure, so a computer could understand and operate with them
in efficient form. This acts on input and output data.
- One time data and its structure defined, we need to indicate the flow and evolution in
time from this data, getting the flow diagram for the software. This is very important,
because it will define the transformation of the information, and where we want to
arrive with each one of the transformations.
- The flow diagram will define, by default, a block diagram. Each block will become an
intermediate step. And in each step we will define the operative blocks, in scope to get
the desired transformation in the input information.
- At this point we will have the capability of to establish the first step from the software:
The software pseudo-code. We will define the computation basis that we will use in
pseudo-code and we will do all of steps (blocks) from the software. In this manner we
can do the final software implementation in any programing language.
- At the end we will choose a programing language, to program the final application
code.
In the first software release, it will be limited to a plane tensile state; it wants to mean that we
will work in two dimensions. The computational basis to work in two or three dimensions are
the same, but the implementation in pseudo-code and programing language are very different,
in 3D is very hardest than 2D.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 7
Benito Moya Fernndez
2. Report
2.1 Software target
As we have indicated, this application is intended to fill the gap for calculating the plastic
collapse in structures, in scope to get this we will program the graphic interfaces and
performances that we will explain below.
2.1.1 Graphical User Interfaces (GUI)
The program has a limited number of friendly Graphical User Interfaces, at specific application
and for specific operations, we can list the following (In the Annex IV Application description,
we can find a more detailed explanation about the GUIs, and we can see an image from each
one of it):
- Welcome screen: Is the first screen we can see when the program starts, in this screen
we can choose the basic options from initial job.
- Creation/edition of structures screen: Is the screen that will appears when we choose
create a new structure, or load a saved structure, in the welcome screen. (In this case,
the saved structure will appear in the graphic area).
- Output data screen: Is the screen when will appear the result data from the
computations.
There are others screens that will appear in some cases (Information Windows, Message
boxes, etc). Is too long make a list for all Windows and screens. The three listed above are
the basic screens, others screens are hanged from these.
2.1.2 Program capabilities
In this program release, the computation capabilities implemented are for plastic collapse
computation in structures, with the performances explained bellow.
- Structural capabilities. Will be described more detailed on Annex I Computation
basis:
o Two dimensions structures with a maximum of 200 nodes, we can define each
node independently as a support node or structural node.
o Straight beams with a constant section, we can define independently each
junction in both nodes for each beam.
- Load capabilities. Will be described more detailed on Annex I Computation basis:
o Uniform loads must be defined on beams; between two nodes (No free spaces
on loaded beam are permitted).
o Uniform load are limited to three types: Triangle, constant and trapezoidal
loads.
o We can define a point load on any place on the beam.
o The loads evolution function along the time can be defined independently for
each load. The evolution function is restricted to linear, quadratic, cubic, and
square root from time.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 8
Benito Moya Fernndez
- Calculation procedure. The detailed calculations procedure is explained on Annex I
Computation basis:
o Structural Matrix Calculation applied to plastic collapse.
o Matrix determinant solver, the reduced (1) stiffness matrix determinant is
equal to zero when the structure collapses.
- Data presentation. On Annex II Calculation data, are explained all data we use for
calculations, both internally and externally data:
o Data input via the GUI. Text mode available via keyboard.
o Structure layout and detailed list printing available.
o Data output via the GUI, presentation in text mode, availability for printing
with the following data:
Nodes plasticization list, with time (order) for each plasticization.
Loads level for each plasticization.
o Data output via the GUI, presentation in graphical mode, with the following
data:
Drawing of structure, on the graphical window, indicating the position
and order of appearance for each node plasticization.
Individual data presentation for each plasticized node, selecting on
each one in the pop up list.
o Availability for jumping to each one presentation (Graphical or text).
o Availability for show individual load diagram from each beam.
o Availability for show saved data form older projects.
- Pre-programmed data base. Explained with more detail on Annex III Data base:
o Common steel profiles included.
o Availability for programming self-defined profiles, and save these profiles to
further uses.
- Data storage. Explained with detail on Annex IV Software description. Availability for
two storage modes:
o Project TXT mode: Self-defined text file (*.DCP file type) with structure beams
definition. Editable with common text editor.
o Solution TXT mode: Self-defined text file (*.RCP file type) with plastic collapse
solution data.
o Data base storage: Standard Microsoft Access data base

(1) The reduced stiffness matrix includes the columns that have a free movement in Z axis
(Rotational movement). This mean that at least one beam has an articulated junction
to this support.




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 9
Benito Moya Fernndez
3. Solved examples
Three examples are shown below, solved them in a manual way, using the same system that
the program uses. And after each manual solution, program solution is shown for each one.
3.1 Single straight beam.
The first example is a continuous straight beam, with point load in the middle of the beam.
This example is very illustrative, because we can solve it in two ways, we can solve it with
classical torque formulas manually, and we can solve it with matrix calculations with the
program.
After all we can compare all solutions.
In matrix calculations; because we need at least a 3x3 matrix and if we have only two rigid
nodes, we dont have a matrix; we must put a dummy node in an intermediate location in the
beam. With that we get a 3x3 matrix.
This dummy node doesnt change the calculations results.
The manual calculations for a straight beam are:


In example, for a beam with 1000mm length, and a profile IPE-100 we have:


When the load F arrives to 86.680N the beam collapses.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 10
Benito Moya Fernndez
If we program this data on software:
Node 1 : Absolute position (3,000 ; 3,000) Type : Support
Node 2 : Absolute position (3,250 ; 3,000) Type : Not support
Node 3 : Absolute position (4,000 ; 3,000) Type : Support
Beam 1 : Profile IPE-100
Start node 1 (Junction rigid)
End node 2 (Junction rigid)
No load defined
Beam 2 : Profile IPE-100
Start node 2 (Junction rigid)
End node 3 (Junction rigid)
Load: Point load 250 N/lapse Linear function
Distance from start node 250mm
In Minimum step between iterations we program the value 0,1

The program gives us the data shown below:
- The structure collapses at time lapse 346,8
- This lapse means that the load is 86.700 N
And the program indicates that a new articulation appears at absolute point (3,500 ; 3,000),
this means that the new node appears in the center of the beam.
The difference between manual load and computed load is because we have a minimum step
of 25N (250N/Lapse x 0,1 Minimum iteration step) and only when the load is bigger than beam
cans support, collapse arrive. In the previous step load is lower than collapse load:

3.2 Half portico, all rigid nodes
The second example proposed is the half portico. We will solve this example only by matrix
calculations way (Manual and program).
The structure appears in drawing:

With manual calculations we will arrive until the first articulation appears, because the
following steps are similar in each stage.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 11
Benito Moya Fernndez
First step is composing the elemental stiffness matrix from each beam:
Beam N 1:
- Start node : 1
- End node : 2
- Profile : IPE-100
- Beam length : 2.000mm
- Profile area : 1.030 mm
- Y Inertia : 1.710.000 mm4
- Wpl Y : 39.400 mm
- Angle : 90
- Young modulus : 210000 MPa
- Rp 0,2% : 275 MPa
- Load defined as:
o Point load 500 t (N)
o Angle 180 in general axis - Location 1000mm from start node
Elemental stiffness matrix in local axis:


0 0


0 0
0

]
0


0 0


0 0
0





0 0 0 0


0 0

[

]
0 0

0 0 0 0


0 0


0 0



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 12
Benito Moya Fernndez
Now we need to apply a 90 rotation on this stiffness matrix, for translate to general reference
axis.

0 4158000 -4158 0 4158000


0 250950 0 0 -250950 0

[

]
4158000 0 5544000000 -4158000 0 2772000000

-4158 0 -4158000 4158 0 4158000


0 -250950 0 0 250950 0


4158000 0 2772000000 -4158000 0 5544000000


Now we must to compose forces.
0
-250t

|

|
-125000t
0
-250t
125000t
And apply the same rotation:
-250t
0

|

|
-125000t
-250t
0
125000t


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 13
Benito Moya Fernndez
Beam N 2:
- Start node : 2
- End node : 3
- Profile : IPE-100
- Beam length : 2.000mm
- Profile area : 1.030 mm
- Y Inertia : 1.710.000 mm4
- Wpl Y : 39.400 mm
- Angle : 90
- Young modulus : 210000 MPa
- Rp 0,2% : 275 MPa
- Load defined as:
o Point load 500 N/Lapse
o Angle 270 - Location 1000mm from start node
Elemental stiffness matrix and forces are the same for local and general axis (Angle for this
beam is zero)

0 0 0 0


0 0

[

]
0 0
0 0 0 0


0 0


0 0


0
-250t

|

|
-125000t
0
-250t
125000t



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 14
Benito Moya Fernndez
And now we must to compose general stiffness matrix and forces:

4158 0 4158000 -4158 0 4158000 0 0 0

0 250950 0 0 -250950 0 0 0 0
[

]
4158000 0 5544000000 -4158000 0 2772000000 0 0 0
-4158 0 -4158000 112308 0 4158000 -108150 0 0
0 -250950 0 0 251488,65 538650 0 -538,65 538650
4158000 0 2772000000 -4158000 538650 12726000000 0 -538650 35910000
0 0 0 -108150 0 0 108150 0 0

0 0 0 0 -538,65 -538650 0 538,65 -538650

0 0 0 0 538650 359100000 0 -538650 718200000

-250t
0
125000t
-250t

|

|
-250t
-250000t
0
-250t
125000t

In first stage we can reduce the stiffness matrix the columns and arrows 1, 2, 3, 7, 8 and 9;
because those columns and arrows are not affected by movements (Are supports with all
movements restricted).

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 15
Benito Moya Fernndez
Now we have a matrix system like the figure:

Or in other way:


One system with three equations.
The solution for this system is:


Now we can solve the system in two ways:
- Solve displacements in function of parameter t, through multiple iterations, and
check forces and torques for each beam (In the same way that program uses).
- Using an inverse analysis, because we want know when a new articulation appears.
We can check beam by beam, what torque I need to arrive to plasticization in the
beam.
We choose the second way, because we know the displacements in one node in function from
parameter t
In our example, both beams have the same profile, and the torque we need to cause the
plasticization is:


In this case, for node 2, each beam increases the torque on node the same quantity, so we can
suppose that each beam receives the same torque from complete structure (this theorization
is correct because we have a symmetric system on a diagonal through node 2).

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 16
Benito Moya Fernndez
Then:
||


The program calculation, just arriving to first articulation, indicates the next data:
- The first articulation appears at time lapse 43,375
- The torque on beam is 10.875.000 Nmm
- The plasticization is on beam number two
The next step is analyze structure and re-compose general matrix, recalculate and find the next
articulations.




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 17
Benito Moya Fernndez
4. Calculation basis
4.1 Matrix calculation basis.
Like we have mentioned in the introduction, the calculation basis for plastic collapse in
structures is the same that we can use in classical mathematics for matrix calculations.
Here we dont like do a matrix calculation course, so we will not stop in the calculations
demonstration.
Only we stop briefly explain those concepts that, for some special reason, may be relevant for
the program understanding.
For every structure, and starting from matrix calculation basis, we can define the Stiffness
Matrix from a structure like the composition of each beam to these matrix.
For each beam we can define a particular matrix system (Stiffness matrix and nodes loads),
attending to geometrical and physical parameters from beam (Material, profile, length, nodes
fixation, etc). Like we can see in figure 1:

So each beam has associated a local matrix system like:




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 18
Benito Moya Fernndez
In a simplified manner we can write:
|| || || ||
Where:
- R is the nodes reactions vector.
- F is the nodes forces vector, associated to the beam.
- K is the stiffness matrix.
- D is the displacements vector
The index () indicates that we are in local reference system
We know how to calculate the stiffness matrix in local system too. We can convert the system
to the general reference system applying a rotation with the appropriate degrees and side.
4.1.1 Stiffness Matrix in Local Reference System (LRS)
The stiffness matrix in LRS means that the beam is in horizontal position, the node on the left
side is the origin node, and the node on the right side is the destination node.
We can define three types of stiffness matrix, in accordance with the nodes fixation.
Straight beam with both rigid nodes:


0 0


0 0
0

]
0


0 0


0 0
0


(2)

Where:
- L is the beam length
- A is the beam section area.
- I is the moment of inertia from beam profile
- E is the Young modulus.
Note: There are others simplified expressions, but are irrelevant for the application purpose.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 19
Benito Moya Fernndez
Straight beam with one rigid node and other articulated node:


0 0


0 0
0


0
[

]
0


0 0


0 0
0


0
0 0 0 0 0 0 (3)

In this case we have supposed that the rigid node is on the left side. In the other case, the
terms must be inverted, and the matrix is as:


0 0


0 0
0


0 0

]
0 0 0 0 0 0


0 0


0 0
0


0 0


0 0


(4)

Straight beam with both articulated nodes:


0 0


0 0
0 0 0 0 0 0
[

]
0 0 0 0 0 0


0 0


0 0
0 0 0 0 0 0
0 0 0 0 0 0 (5)


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 20
Benito Moya Fernndez
4.1.2 Nodal force vector in Local Reference System (LRS).
The nodal force vector, rather, the contribution of the forces present in the beam on the nodal
forces set in the structure, will depend of the beam loads.
We will avoid the demonstration that nodal forces caused by the bars would be the same
reactions on supports (no horizontal or vertical displacement) of the same features as the links
of the bars (rigid or articulated), but changed sign.
At this time, the calculations here explained are intended for to compose the LRS matrix set
(local stiffness, reactions, forces and displacements), to assembly the general matrix system.
All these calculations will be used one more time in the reverse process, the analysis of all and
every one of the beams, once known the forces, torques and displacements in all nodes in the
general matrix system.
We will do:



||

(6)

In this way, in dependence from the junction type in the nodes we can find:
- Two articulated nodes
- One articulated node and one rigid node
- Two rigid nodes.
But for the matrix calculation in structures, we only take the nodal forces that a beam
generates in the following conditions:
- We take the bar independently from the structure, and consider both nodes rigid.
- The nodal will be the same as the reactions in the nodes, but inverting sign.
The reactions depend from loads on the beam, logically if we dont take count with the own
weight, and the beam has no loads, there are no reactions, and the beam dont contributes to
the structure (On nodal forces).
With the loads, we can find many distributions (Localized or distributed loads), and the
distribution law can take many forms.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 21
Benito Moya Fernndez
Here is where perhaps we have the greatest limitation, because we discard all loads with
irregular distribution (Those loads we cant define through a mathematical function), its
implementation by software can be very difficult.
We will distinguish between point and distributed loads.
We must limit the point loads, because make many point loads on the same beam isnt logical,
for that we can use distributed load.
For the distributed loads we can define many distribution laws, but for practicality we will limit
these loads to only one type. We will define this type as trapezoidal load.
This loads organization give us, as discussed below, four combinations, one point load and
three distributed loads.
Point loads: We will define the point load applied in any place on the beam and with any
incidence angle, like the figure:

In these conditions, we can decompose the force in two components, the horizontal
component, co-linear with the beam axis and other one vertical, perpendicular to the same
axis.


Note: The sign comes from international sign convention (Positive to UP and RIGHT side,
negative to DOWN and LEFT side). If we draw the force on the other side from the beam
(stretching instead of pushing the beam) the forces appear like the figure, and we dont need
the sign.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 22
Benito Moya Fernndez
In these conditions the forces will be:


For the horizontal reactions we have:



For the vertical reactions and torques we have:



So the nodal forces vector, in local reference system, for one beam with a point load in any
point on the beam and with any incidence angle, would read:


)

||


(7)







Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 23
Benito Moya Fernndez
Distributed loads: Like we have explained in the beginning of this section, the distributed loads
are limited to only one type we have named trapezoidal load, like the figure:


Although is presented in normal distribution (perpendicular to beam axis), we can find other
no normal distribution. In example, the wind load on a roof. So we will define the general
distributed load like in the figure:

We introduce the constraint that the load is over the entire length of the beam, because if we
leave free areas (with no load) on the beam, the calculation will be more complicated.
This is not a limit for calculation, because in we need free areas in a beam, we can define
auxiliary nodes in the desired beam.
Any other type of distributed load can be defined as a variant of this, so for example, a load
with uniform distribution across the bar would be a special case in which:

And triangular load that would cover the entire bar would be one that:

This allows us to use only one calculation procedure, having defined the reactions in nodes 1
and 2.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 24
Benito Moya Fernndez
Calculate directly the reactions produced by this geometry can be tricky, but we can apply
superposition, as shown in the picture:

The independent calculation for each part of load, although is not simply, is more easy than
direct calculation.
For each case we have that there are two components (As in point load), one horizontal part,
co-linear to beam axis, and other one perpendicular to the same axis.
Uniformly distributed load: If we define the uniformly distributed load like shown in the
picture:

We have that the reactions will come defined by the expressions:
- Horizontal reaction (co-linear to beam axis):


- Normal reaction (Perpendicular to beam axis): We define the normal component like
in the drawing:

In these conditions we have that the vertical reactions are:



And the induced torques on the nodes is:


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 25
Benito Moya Fernndez
With all this, the vector of nodal forces in LRS for a rod with a uniformly distributed load and
inclined, would be as follows:



||


(8)

Triangular load: If we define the triangular load like the figure:

We have that the reactions and torques comes from the expressions:
- Horizontal reaction (co-linear to beam axis): With the load distribution like the figure,
the reactions would be:



- Normal reaction (Perpendicular to beam axis): We define the normal component like
in the drawing:

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 26
Benito Moya Fernndez
We have that the vertical reactions come from the expressions:


And the induced torques on the nodes is:



In case with inverted load, and the higher load side would be in the node 2, like in the
picture bellow:

The horizontal reactions will be:


The vertical reactions will be:


And the torques will be:



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 27
Benito Moya Fernndez
In these conditions, we can define the vector of nodal forces in LRS, for a triangular load as:
If the higher load is in the node 1:



||


(9)

In the other case:


||

(10)


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 28
Benito Moya Fernndez
Finally, for a composite trapezoidal load we would have:
Case 1, higher load in node 1:

[

] [

]


[

] [

]

||

] [

]
[

] [

]


[

] [

]

[

] [

] (11)

Case 2, higher load in node 2:
[

] [

]
[

] [

]
||

] [

]
[

] [

]
[

] [

]
[

] [

] (12)

These two expressions are those implemented in the program, regardless of what type of load
is applied, since the values of the parameters that define the charge will determine its type.
This does not mean that, to facilitate data entry, will schedule a series of menus that
somehow, and pre-define the type of load.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 29
Benito Moya Fernndez
4.1.3 General reactions and displacements
The general reactions and displacements are part of the problem to solve, so that we use it in
Global Reference System (GRS), although we translate it after to LRS.
There are special nodes in the set of structure nodes, nodes where we know displacements
and reactions, these nodes help us to solve the system
- At support nodes all displacements are zero in all directions, so we can do:
0
0

|| ||
0
0
0
0 (13)

At a node other than a support all reactions will be zero, then we can do:
0
0

|| ||
0
0
0
0 (14)

This mean that in all supports, in general matrix system (In global reference system), all
displacements will be zero.
In the same way, in all nodes other than support, in general matrix system, we will take all
reactions like as zero.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 30
Benito Moya Fernndez
4.1.4 Global reference system
Like we have already explained, the conversion to global reference system is made applying a
rotation to beam
We must take care with local reference system, because although that the beam is in
horizontal position, if the origin node is on the right, really the beam is rotated 180 degrees.
The matrix for change the reference system comes defined like:
0 0 0 0
0 0 0 0
[]
0 0 1 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0 0 1 (15)

Being the angle that is necessary to turn the local reference system to match the global
reference system.
To change the entire matrix system we must do:
Nodal forces:
For the nodal forces, we will do the operation:
|| || ||
Stiffness matrix:
For the stiffness matrix, we will do the operation:
|

|| |

|
We will do both operations for all and each one of the beams.
4.1.5 Global matrix assembly
With all we have seen in the last section, we can get a set of matrix and nodal force vectors for
all an each of one of beams. Now we need to compose, beginning in this set, the global
stiffness matrix, and the global forces vector.
Each beams node, its name and number is irrelevant, has correspondence with a general node
in the structure.
Each beams stiffness matrix can be divided in four sub-matrices with rank 3x3, like in the
scheme:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 31
Benito Moya Fernndez
|

|


|
(18)
Each one of these sub-matrix has relation with other sub-matrix with the same range, included
in the general stiffness matrix, relate mode is well known.
In example, we will suppose that the local node A has correspondence with the general node
3, and the local node B has correspondence with the general node 5, like we can see below:

As we can find through the structural matrix calculations, from this structure we can extract a
matrix with range 24x24 (3 columns and 3 arrows for each node), the general stiffness matrix
appears like:
(19)
From this representation it follows that in the sub-matrix 3-3 (row 3 column 3) corresponds to
the sub-matrix from beam AA, in the same way the sub-matrix 3-5 (row 3 column 5)
corresponds to the sub-matrix from beam AB.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 32
Benito Moya Fernndez
We will do the general matrix assembly adding in each general sub-matrix all and each one
sub-matrix in all beams that have correspondence.
In the same way we will do with the general nodal forces vector.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 33
Benito Moya Fernndez
4.2 Resolution procedure
The resolution procedure is, in a general view, the same that we can use for manual
calculations.
There is the caveat that, manually, we are the processor, and we can discern the type of
problem, choosing one path or another when it comes to solving the equations system, based
on that type.
In this case: A logical calculations structure, that allows us to program it in a computer, we
must to choose a set of environment variables, these variables restrict the number of possible
solutions to program, in scope to making this project an allowable work from the point of view
of the resources and time available.
For do that we must begin from a previous limitations (Typology of structures that we want to
solve) and restricted calculi parameters.
4.2.1 Previous requirements
As we have commented, we will limit the software to a typology of structures and restricted
calculi parameters.
- The equations system is presented in a matrix view like:

|| || || ||

Where:
o R is the reactions in the supports from a load combination on the structure.
o F is the nodal forces in the structure.
o K is the structure stiffness matrix.
o d is the nodes displacements.
- Each node will be defined, in each one of the four parts from the equation, by all
beams that connect with the node.
- For calculations, in addition to all the premises of the matrix calculations in structures,
we will restrict:
o We will calculate only plane structures (2D structures).
o In all nodes other than support, the reaction is zero.
o In all support nodes, the displacements and rotations are zero.
o All applied loads are defined (Or we can define it) in a nodal form,
unequivocally, both in its magnitude and its evolution along the time.
With all this we can define the calculation procedure.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 34
Benito Moya Fernndez
4.2.2 Calculation procedure
The calculation procedure is based in, through linear combinations of rows from stiffness
matrix; convert the matrix in its diagonal form.
|| || || |

| ||
The identity matrix in this case acts as a wildcard, linear combinations of rows and columns
that apply to the stiffness matrix, apply it to the identity matrix. This will leave us the
equations system like:
|| || || |

| ||

Where C is a coefficients matrix to apply to addition vector Reactions and Forces
In this way, for each row (separate equation) we get an expression like:


That we can write like:


It wants mean: The displacements in a node, in a determinate sense (Vertical or horizontal), is
function from a linear combination of all and each of one the forces and reactions in the
structure.
In this stage, we can look at point where the displacements are zero (The supports) from these
points we can take:


We will obtain many expressions of this type as supports having the structure (Actually
equations triple support points), allowing us to establish a new equations system, to find the
reactions in terms of the forces applied to the structure


It wants mean: The reactions in all supports are proportionally to a linear combination of all
and each of one the forces and reactions in the structure.
Once we found the reactions of all the supports and in every way, we solve the rest of the
system to find the displacements and rotations of all nodes, using the expression (24).
All steps to obtain the stiffness matrix, making the diagonal of this matrix and construction of
coefficients matrix, are steps that we make at the beginning of the calculation process. From
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 35
Benito Moya Fernndez
this we get displacements and rotations in each node, and we make the reverse process,
obtaining the result torques in each node from each beam, and solving the stresses in all
beams.
Basically, for all and each of one the beam the process is:
Find for each beam a displacements vector like:

(27)

This vector is only the nodes displacements from both nodes of the beam, previously
calculated.
On this vector we apply a rotation, equal in magnitude, but reverse in sense, to the rotation
applied before to forces vector from beam, then appears a vector like:

(28)

We can see that the rotations are the same in both vectors.

In this new context, we can establish a new equations system as follows:
||

||

||


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 36
Benito Moya Fernndez
The b sub-index indicates that is a particular expression for each beam, is a direct solution,
solving the multiplication we can get the nodal forces from the beam.

With this we can solve the stress along the beam, found the maximum stress and verifying
what load is greater than the beam can resist.
Operate with all these data (Forces and torques) may be very hard, so we will make the
following simplifications:
First simplification:
- Is well known that the normal stresses distribution and torque distribution, along the
beam, have a law in manner that when the normal stress is maximum, the torque
stress is zero and vice versa.
- Normally, in a structure, the torque stresses are very much bigger than the normal
stresses.
- So, we can dispense the normal stress when we will calculate the stress law in the
beam.
Second simplification:
- In a general manner, the axial forces cant make an articulation (Strictly talking),
because they are parallel to axis, they can make only a beam break, and this appears
only when the axial force is very big, and an articulation is formed before it, through
torque stress.
- So, we can dispense the axial forcers when we will calculate the stress law in the
beam.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 37
Benito Moya Fernndez
With these conditions we can tell:
- For the plastic collapse in structures, we only need to count the flexion torque on the
end from all and each of one of beams, and not-nodal loads.
- The torque evolution along the beam will determine where, when and how the
articulation can be formed.
Now, for the resolution, we must to do:
- Define in a clear, logically and structured manner, how the torque will evolve along the
beam.
- In the same way, define the possibility that the beam will collapse in a concrete point.
For the torque evolution along the beam, we will apply the superposition theorem, exploding
the torque in two parts, the hyper-static part and the iso-static part.
- The hyper-static part is easy to solve, in fact the hyper-static nodal torques are the
answers from expression (29). The fact that the nodes have been articulated or fixed
nodes, will come implicit with the solutions, so if the node is articulated the torque will
be zero, If other value appears with an articulated node, there are a mistake on
calculations. The torque evolution along the beam is very easy, because is a linear
interpolation between both nodes, is very important the torque sign:

The expression that will define the torque is:




In this expression, each torque must been taken in count with his sign.

Note: Node 2 torque, although is negative, is presented in positive sense, because we
want the result torque presented on the side of the traction. In the same way, when
both torques are in the same sense, in the beam appears a zero crossing (The flexion
torque is zero).





Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 38
Benito Moya Fernndez
- The iso-static part depends exclusively from the loads on the beam, obviously if there
are not load on the beam, the iso-static part will be null.
In the same way we did with the reactions calculation from each beam, and having as
target to compose the general matrix system, we will restrict the calculations only on a
point load on the beam, in the concentrate loads case:


Or, in the distributed load case, we will restrict the load to a trapezoidal form, like we
did in the section 4.2.1

Defining all others cases like a variant of this case. In the same way we did with the
reactions. So we can define only one calculations procedure
As we have indicated at begin of this chapter, we will obviate the axil forces when we calculate
the plastic collapse; so we only take in count the forces perpendicular to the beam.
In the point forces case, we can see that the torque evolves along the beam with the
expression:


With this, the total torque on a beam with point loads applied, will be the addition of both iso-
static and hyper-static components, the expression will be:

] [

]

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 39
Benito Moya Fernndez
With the distribute loads case, we return to apply superposition theory.

We will define L as total beam length between nodes 1 and 2. In these conditions, and without
axial load, we have for each part that we have divided the trapezoidal load:
- Uniform load: Torque in x function is:

)
- Triangular load: The triangular load has a problem, is easier starting calculations from
node where load is zero. The torque expression in x function will be the same,
independently how the load is distributed, we will invert the axis system if necessary,
because start the calculations from other side, force us to use superposition theory in
each fraction of x. The torque expression with this particularity will be:

)
- Trapezoidal load: The trapezoidal load, logically and with the starting node
particularity, will be the addition of other two loads.

[ (

)] [ (

)]
In these conditions, the total torque along a beam with distributed loads will be given us by
the expression:

] [ (

)] [ (

)]


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 40
Benito Moya Fernndez
The expressions (30), (32) and (36) are those that define the torques on the beams in function
of applied loads. These expressions are the only expressions programmed, because the load
definition will obviate the part of expression that is not necessary.
In example: For an uniformly distributed load, q1=q2, the last part in expression (36) is zero
To find a valid solution, we must find the point (The geometrically point x) where the
expressions arrive to the maximum value, and make these values equals to the maximum
stress that the beam can support, in this way we can find the load that makes a plastic
articulation in the point.
In the point load case, if the articulation is not yet created on the nodes, will be created in the
load application point, so to find the load that creates an articulation, we only need make the
torque force in this point be equal to the plastic moment resistance from the beam, and solve
the equation.

] [


The distributed load case is more complicated, we must to derivate the torque expression in
function from x and make the derivative expression equal to zero, to find the point where is
located the maximum torque.
The torque derivative expression in function from x is:

[ (

)] [ (

)]
So:




So the maximum moment is calculated by substituting this value in expression (36).
Although appears complicated, we must remember that all values for expression (39) are
known, they are the numeric values from beam length and loads. After we only need put the
value given from expression (39), the x value, in the expression (36)




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 41
Benito Moya Fernndez
5. Data for calculations

All we have saw in the Annex-I will be structured in a logically manner, ever from a computer
point of view, sometime this could be in discordance with a clear representation from an
operator point of view, we will try take in count both points of view when defining the data.
From computer point of view we will define:
- Space economy: All data must be organized in a way that may not be duplicated, nor
unnecessary occupied memory.

- Structured data: Structures must be established for to group those similar data, in a
way that the pass between procedures could be easy and fast, making the programing
process more efficient.
From operator point of view we will define:
- Clear: Avoid ambiguities that complicate data entry, program maintenance, etc

- Organized: In the structures, the data will be organized in a way that they appear clear
and intelligible.

With these preliminary we can separate the necessary data in:
- General data, they will define the basic project principles.

- Descriptive data, they will define the structure description.

- Operative data, basically the internal data that the program will use in calculations.

- Storage data, basically the same data from inputs and outputs, they can be stored in a
hard disc

All these data are described with more details, dividing them in other subgroups, and these
subgroups are the data structures that the program works. These structures contain the
variables for calculations.
We will made a variables declaration in pseudo-code, for use it after in the programing code.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 42
Benito Moya Fernndez
5.1 General data
These data give us the general information about the project, are reserved for identification
data:
- Project name.
- Project author.
- Begin date.
- Last modification date.
- Structure construction material.
These data are in example; more data can be added if necessary.
5.2 Descriptive data
The physical structure description is made with accepting some conventions, these
conventions are name conventions valid to work in a computer.
Basically a structure is defined trough a nodes set, between these nodes are located beams,
and some beams have loads associated.
These two basic structures (Nodes and beams) will be the basic elements to define our
structure in our application.
5.2.1 Nodes
Node, without relations with other elements, is an abstract concept, because is a location in
space, it defines the dimensions of structure, but with nothing connected to it makes no sense.
From this point of view, to define a node we need:
- Tag: A name/number for the node, an identification

- Space location: X and Y coordinate, in absolute reference.

- Typology: With this feature we want define the node type, general or support node.

This is a data type that group four variables, its definition in pseudo-code will be:
Declare NODE As Type
POSITION_X As Real
POSITION_Y As Real
NODE_TYPE As Boolean
End Declare

But this is only a node, our structure will be a nodes group, at this time we have limited the
nodes number to 200, but in all case will be greater than 1 (If we have only one beam, we need
at least two nodes). To operate with all nodes at once, in example to pass all nodes between
two procedures with only one instruction, we need to group them in a variable. This variable
must have a dynamic elements number in run time, and allow us to work with each element
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 43
Benito Moya Fernndez
independently or with all elements at once. This structured variable by excellence is the matrix
(Normally called ARRAY in most programing language)
Its declaration in pseudo-code will be:
Declare STRUCTURE As ARRAY (Elements_Number) of NODE
As you can see, in node declaration we obviate the identification field, we did this to
economize memory requirements, because an individual node has no sense. All nodes will be
used in a structure, so to indicate one node we only need indicate its position in to structure.
5.2.2 Beams
Beams are the materialization of structure, are the link between nodes and its node junctions,
and loads that can be defined, indicate us the structure evolution.
Basically the fields for a beam definition are:
- Starting node
- Starting junction
- Ending node
- Ending junction
- Profile
- Plastic moment
- Profile rotation
- Load type
- Incidence angle
- Incidence angle axis
- Parameter Q1
- Parameter Q2
- Load evolution function
The concept starting node and ending node have the purpose of define the angle between the
Local Reference System (LRS) and General Reference System (GRS). The software will calculate,
with nodes definition, the beam length and angle.
With the junctions type we can select the correct stiffness matrix path to apply, according
paragraph 4.1.1 in annex I (Stiffness matrix in LRS)
Profile is a reference to data base, where are defined the profiles and its properties (Area,
inertia, etc.).
Profile rotation indicates us if the profile is oriented with the greater inertia parallel to
structure plane, so is a Boolean parameter that indicates the profile is rotated or not.
Load type is a numeric value that indicates us the load path, as seen in paragraph 4.1.2 in
annex I (Nodal force vector in LRS). Following loads are defined:
- 0 No load applied.
- 1 Point applied beam
o Q1 parameter indicates load magnitude.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 44
Benito Moya Fernndez
o Q2 parameter indicates distance from starting node.
- 2 Uniform distributed load.
o Q1 and Q2 parameters are equals, and indicate load magnitude.
- 3 Triangular distributed load
o Q1 parameter indicates load magnitude and Q2 parameter will be zero.
Or
o Q2 parameter indicates load magnitude and Q1 parameter will be zero.
- 4 Trapezoidal distributed load.
o Q1 parameter indicates load magnitude in starting node.
o Q2 parameter indicates load magnitude in ending node.
The incidence angle is obviously. Is a Boolean parameter that will define with what reference
system are defined the loads. We do that to make more easy data input, in example for the
wind load, is very easy to define a horizontal wind load on general axis, but define it on
inclined beam is very difficult, because is possible that we have defined the beam between
two nodes in the structure, nodes located in a position, so we dont know the beam angle. If
we set this parameter to true, the software will convert the incidence angle.
The evolution function is a parameter, this parameter will select a function from functions
library.
Like nodes, we need a variable type definition for beams, to group the different fields that
compose the complete beam description. This variable declaration appears like:
Declare BEAM As Type
STA_NODE As Integer Number from starting node
STA_TYPE As Boolean Junction type in starting node
END_NODE As Integer Number from ending node
END_TYPE As Boolean Junction type in ending node
PROFILE As Text Profile definition
WP As Real Plastic Strength moment
ROTATED As Boolean Beam rotation on X Axis
LOAD As Integer Load type
INCIDENCE As Real Incidence angle for load
REFERENCE As Boolean Reference system for load
VALUE_1 As Real Parameter 1 for load
VALUE_2 As Real Parameter 2 for load
FUNCTION As Integer Load evolution function
End Declare

As we can see, like in nodes declaration, there are not identifications defined, this is because
all beams will be defined by starting and ending nodes, so no further identification is needed.
And also like with the nodes, we need to group beams in a matrix, for the same reason. So we
will define the matrix:
Declare BEAMS_SET As Array (Stages, Elements_Number) of BEAM.
Beam position in the matrix allow us identify it for calculations.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 45
Benito Moya Fernndez
5.3 Operative data
Operative data, the data with which the computer works internally, in most cases will be
numeric data, normally real numbers. In some cases data will be text (Only for data base
seeking)
Basically we extract the operative data from expression (21) in paragraph 4.2.2 in annex I
(Calculation procedure)
|| || || |

| ||
All calculations are restricted to these variables and their transformations. Although we can
have more than one copy (instances) for each one of them, containing different data each one.
The most important variable in the program is the GENERAL STIFFNESS MATRIX, all elements in
this matrix will be real numbers with double precision (Double In short name for this type of
number in most programing languages), and will have a rank of three times the numbers of
nodes in the structure, because each node has, in a two dimensional space, three free
movements, two displacements and one rotation.
The stiffness matrix will be a dynamic thing, change when a new articulation appears. And the
origin values for all phases must be preserved, to use them in the next phase.
So we will add a new dimension to general stiffness matrix (GSM onwards), to allow us to
define more than one GSM in the same variable. So GSM is a 3D array.
We will declare the GSM like:
Declare GSM As ARRAY (M ; N*3 ; N*3) of DOUBLE
N is the nodes number from structure.
First index M is the phase number, in a general way there is only one phase at begin, but
normally for plastic collapse will be two or more phases.
This data structure will be re-dimensioned each time an articulation appears; we must increase
index M one unit. In case that articulation appears in the middle of a beam, we must add three
units to second and third indexes also.
This re-dimensioning process will be made preserving all data from preceding phases; almost
all programing languages can do this directly.






Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 46
Benito Moya Fernndez
We can see the concept for three dimension array in the picture bellow.

For the rest of operative data we will do the same, but with care with the arrays dimensions.
In the same way we will do with the coefficients matrix, we will declare this matrix as you can
see:
Declare COEFFICIENTS As ARRAY (M ; N*3 ; N*3) Of Double
All other matrices will have two dimensions, and their ranks are (M ; 3*N) in all cases.
Displacements matrix.
Declare DISPLACEMENTS As ARRAY (M ; 3*N) of Double
Reactions matrix.
Declare REACTION As ARRAY (M ; 3*N) of Double
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 47
Benito Moya Fernndez
Nodal forces matrix.
Declare N_FORCES As ARRAY (M ; 3*N;[num]) of Double
Note: [num] is an integer, which will be defined later in the program description, which is
imposed by the diversity of existing load functions.
Operationally, the program needs to also control the instant of occurrence of each articulation,
this can be controlled with a one-dimensional array (a vector), which are stored moments of
progress of each phase, its declaration would be:
Declare PHASES As ARRAY (M) of Double
Note that we used PHASE instead STAGE, because this last name is reserved (For better
program understanding) to actual PHASE number. We assign a value to this variable in a
sentence:
STAGE = PHASES.ELEMENTS_NUMBER
Furthermore, for calculations is interesting to keep each and every one of the diagonal
matrices, until the appearance of the plastic collapse of the structure, in addition to stress
values, reactions and displacement from each node at each phase. This is motivated by the
following:
- Every time an articulation appears we need re-compose the matrix, at least to put the
new stiffness values from new structure. Furthermore, if articulation appears outside
an existing node, we must add three columns and three arrows to the new matrix,
because we will have a new node.
- Once re-assembled the matrix, we must recalculate and save stress values,
displacements and reactions for each time of appearance of the articulation, with a
view to taking them as input data for continue the next phase calculations.
- The above two points must be made every time a new phase appears, and for each
and every one of the stages preceding the current phase calculation.
Also the program will use more variables and constants in run time, these variables and
constants are not interesting at this time, because almost all of them are control variables, and
have not relevance at this moment, so we will obviate their description.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 48
Benito Moya Fernndez
6. Data Base
Program includes a data base for standard profiles and materials. The data base can be used as
alternative storage system for project data.
This data base is programed with Microsoft Access, and we can access it through SQL
statements. Taking advantage of this implementation, applies also to create and save own
manufacturing profiles (eg girders), and different materials of the pre-programmed, in order to
be able to be used them in subsequent projects.
From the point of view of projects is an effective storage system that allows us to save
different versions of each project, and access them agile
As a database is structured in tables, which we can divide in two areas: Projects area and
materials area.
Materials area has two tables, one for construction materials and other one for profiles
Construction materials table has five fields:
- Tag (Material commercial reference or standard designation).
- Description.
- Yield stress.
- Young modulus.
- Density.
Profiles table has ten fields:
- Family (HEB, UPN, etc).
- Profile number (100, 120).
- Description.
- Area
- Inertia Y
- Inertia Z
- Resistant plastic moment Y
- Resistant plastic moment Z
- Weight (Kg/m)
- Drawing (*)
NOTE (*): Drawing refers to an image stored in the same application folder (In the computers
hard disk), when a profile is selected the program shows a profiles image, to help us in
selection. A further detailed description from this capability is given in Annex IV Application
description.
Project area has three tables, which contains the same data as those described for the
projects, except projects table, which contains one more field to indicate the revision index of
the project.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 49
Benito Moya Fernndez
7. Software description
The software is a program type called Windows Form, that means program shows us a set
of forms (windows) where the process is developed.
Previously we will do a functional description of program, how develops all processes, from
starting to the final data presentation (In the screen or printed).
After that, we will do a more detailed description from internal function, what and how to do
in all processes, to get the expected result. We will write in pseudo-code all of most important
routines to solve the calculations, and we will justify them.
Finally, enter a little more into the details of the program, indicating the language chosen and
the reasons, explaining the solutions to critical program processes
7.1 Functional program description
The program is similar to many existing programs for Windows in the market.
When we start the program, a welcome screen like shown more bellow appears:

On this screen we can choose basic start options:
- Start a new project.
- Load an existing project.
- Maintenance Jobs.
Each on one of these options closes this window and opens a new one.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 50
Benito Moya Fernndez
With Start new project option, we will open a project input general data screen, here we can
input all general data from a new project, in a screen like you can see more bellow:

Then, after pressing OK button, will open the window that allows us to edit structures, as
shown:

On it we can distinguish the marked areas.
1- Drawings area, graphic window where we can design our structure.
2- Tools palette, where program shows all we need to create and/or edit our structure.
3- Data area, where the program shows the edition/selection data
4- Options belt, where we can see the active commands line, the program gives us
information all time, and we can select some graphical modes.
Drawing area is in white, because we have selected create a new project.
This screen functions are described with more details in section 7.1.1 Data input.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 51
Benito Moya Fernndez
If selected option is Load existing project, a file browser will appear:

On this dialog box we can select the project to open, and after to press OK button, same
structures edition window will appear, but now showing selected structure in browser.
The program doesnt ask us for project data, because they are of the stored project. Ever we
can access to them by pop up menu File with option Project that opens general data dialog
box.
If selected option is Maintenance, a window with a three folders tab will appear:

Where we can choose following options in a Tab Control:
- Projects data base
- Materials data base
- Profiles data base
- Project beams and nodes
In section 7.1.4 Maintenance Option we will describe with more details these options.
7.1.1 Data input
As we have told, we will do data input from a structure on edition screen. For that we have
three ways:
- Directly on graphic area.
- Manually
- A combination of both ways.
All this must be doing in a logic sequence, which means, a beam is defined between two
nodes; we cant define a beam if we havent any node, or only one node. The program has the
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 52
Benito Moya Fernndez
capability to detect this malfunction and, if we try to define a beam when we have less than
two nodes, it gives us an error message. A logic sequence to define a structure will be:
- Define nodes.
- Create beams.
- Define loads.
This sequence is flexible, that means, if we have created a set of nodes, and after starting
beams creation process need more nodes, we can create without problems.
Also we can delete nodes if later we dont need them. In this way we can remark
- The program gives us an error message if we try to create a beam when less than two
nodes are created. Dont allow us to create a beam until exist at least two nodes.
- The program gives us an error message if we try to create two beams between the
same two nodes, independently if the order from nodes is inverted from one beam to
other. In example: If we define a beam between nodes 1 and 2, we cant define a
beam between nodes 2 and 1. The program will give us a message Duplicated beam
and dont allow us to create it.
Although this seems a handicap, if we want create a composed beam in example,
really isnt, to define a composed beam we need to create it on profiles data base, and
after use it in the structure.
- The program will advise us if we try to delete a node with a beam connected. This
advertisement tells us that if we delete the node, all beams connected will be deleted
too. If we accept the advertisement, all connected beams will be deleted.
- If we try to delete a beam with loads defined, the program will advise that if we delete
the beam, all associated loads will be deleted.
- When saving a structure, manually or previously to calculations, the program advises
us if there are free nodes and if we want to delete them, if we agree all free nodes will
be deleted, if we disagree the program will return to edition screen.
Direct data input: We can do direct data input on graphic area, with choosing tool from tools
box, when we drop mouse pointer on desired tool it keeps selected, from this moment we can
see that the mouse pointer changes to
tool icon when on drawing area.
Basic tools for edition are:
- Node
- Beam
- Load
- New
- Delete
- Edit
- Zoom In
- Zoom out
As you can see, all icons are very intuitive.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 53
Benito Moya Fernndez
The tools "new", "edit" and "delete" are used with tools of node, beam and load; that means
when any element tool is selected must have care which option (new, delete or edit) is
selected.
All time, while mouse pointer is in to graphic area, we can see in data area following
information:
- X Y pointer coordinates.
- Active selection, in case any item is selected in edition mode.
- Characteristics of the active selection.





Manual data input: Ever we can do data input manually, to do that we can Access to edition
dialog boxes through pop up menu Edition. In this menu we can find the submenu New
that give us three options: Node, Beam or Load. With each one of these options opens a
dialog box, different for each one of them, where we can define all data from nodes, beams
and loads.
These dialog boxes are the same for editing existing elements, but here we can select the node
identification tag, but we cant change it. In a new node case, the identification number will be
given us by computer.
In beam case, where we select both nodes (Starting and ending node) in graphic window, the
same dialog box opens in both cases (New and edit). Here we can select nodes, invert nodes,
select profiles and inclusively define loads.
Loads are defined on beams, and in fact we will define them on same dialog box, we can do it
at same time than beams or more later. Only we have disabled modify beam definitions
(nodes, profile and nodes order), to prevent accidental modification; and vice-versa, when we
are editing a beam we can see existing loads, but we cant modify them.
NOTE: When we define loads must have specially care with selected reference system (Local or
general), because the loads rotation is different in each case.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 54
Benito Moya Fernndez
The loads definition is made in the following way:
- On beams edition screen we have a button to add loads, if we click on it a new window
will opens for loads edition.

- In this window we have some option groups. The first group is for load selection:
o No load, if we select this option, we will delete all defined loads, will be the
default selection when we define a new beam.
o Point load.
o Uniformly distributed load
o Triangular load
o Trapezoidal load.
If we select triangular or trapezoidal load a new options group will appears; where we
can select where is located the starting node (node where load is lowest).

Second options group is to select load function, this means define load evolution along
the time. And we have too a text box to define the time factor, because all functions
are defined with a unitary time factor, but on calculation time we can modify this
unitary time factor multiplying it by this factor.

To avoid an infinite number of load functions, in a first instance load functions are
limited to four evolution laws:

Linear function, with the expression:



Quadratic function, with the expression:



Cubic function, with the expression:



Square root, with the expression:


Where (q) is the factor that load increases each time lapse, in accordance with defined
factors.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 55
Benito Moya Fernndez

We should define incidence angle from load, and the reference system for this angle.
About this we can remark:
Angles are ever positive and are defined in a positive rotation sense
(counter-clock wise)
Independently from reference system chosen, a load with incidence
angle zero is a load parallel to X axis, an ascendant load will have an
incidence angle of 90 and a descendant load will have an incidence
angle of 270
We suggest define loads in general reference system, is better and
easier to define loads in reference to structure than to beam.
Once defined all data from our structure:
- Nodes.
- Beams.
- Loads.
And always before calculations, we must save data on disk, this will cause a review of
structure, program will revise that there arent alone nodes (without beams connected), there
arent incongruences, and saves a copy on hard disk. After all of this we can launch
calculations.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 56
Benito Moya Fernndez
7.1.2 Calculations
Once launched calculation process, an options screen will appears.

These options are:
- Limit of time/iterations until arrive to collapse, if we arrive to this limit without
collapse, program will exits from calculation process and gives us a message with text
"time limit exceeded without collapse"
- Time step between iterations, this factor will multiply all individually time factors from
each defined load on all beams. Is a general way to control the calculation precision, a
smaller value will give us a very accurate value, but will make calculation slower than a
greater value. A greater value will make calculations faster but with a lower precision.
- Check control to select take in count own weight from beams. Will make calculations
more realistic but will be slower.
- Selection group, where we can select the data will appear on debugger screen:
o Current iteration number.
o Loads on beams.
o Load son nodes.
o Articulations location.
o Articulations time.
Once options selected we will push on Accept and calculation process will start. We can
follow process on debugger screen that will appear.

This windows is basically a text window where will appear messages with calculations data, as
we have pre-selected.
Independently from what data are selected, all data are generated by program; we can see
these data in a TXT file that the program will create.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 57
Benito Moya Fernndez
7.1.3 Result presentation.
Once finished all calculations a presentation window will appear, the result will be presented
in text mode by default, data presented are:
- Number of iterations until collapse.
- Calculation time
- Location and iteration number for each articulation until collapse.
- Loads on all beams when all and one of each articulations are created
Also we will have a set of buttons to access to:
- Graphic presentation, where we will see a schematic representation of our structure
with location for all articulations and its appearance order; if we click with the mouse
on an articulation more detailed data will appear.
- More details, which will redirect us to another window with more detailed data.
In all of these windows we can print all shown results.
Sample of text mode presentation window:


Sample of graphic mode presentation window:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 58
Benito Moya Fernndez

Sample of detailed mode presentation window:



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 59
Benito Moya Fernndez
7.2 Internal workings
Internal working is simple; to illustrate the flow diagram is shown below:




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 60
Benito Moya Fernndez
This distribution in operative blocks gives us an idea about the three basic processes in that are
program divided.
- Data input and preparation.
- Calculations.
- Data presentation.
We will treat each of them separately, showing major routines in pseudo-code
To create pseudo-code, laws shown below are applied.
- Pseudo-code sentences are created in natural English language, as close as possible to
spoken / written language, so that reading can determine what makes each line.
- Syntactical structures similar to programing language are used, foreseeing its
translation to a programing language be almost directly possible
To get this, conventions that are explained below are used:
- Reserved words are written in small letters, with first letter in capital.
- Variables are written in capital.
- Sub-routine or function parameters are enclosed in parentheses, separated with ;
symbol, and with the return parameter (if exist) at the end from list preceded by word
Return.
- Although in most of programing languages is not necessary strictly, starting and end
from each routine and/or sentences group are indicated.
o If / End If
o Sub(-routine) / End Sub (-routine)
o Function / End Function
o For CTN = VALUE_1 To VALUE_2 / Next CNT
o Etc
- For refer to a concrete data in a data structure, we will do:
STRUCTURE.IDENTIFICATOR
This expression refers to the value from variable named "IDENTIFICATOR", which is
part of "STRUCTURE".
- For refer to a concrete data in a data structure, and this structure is an element from
an array, we will do:
MATRIX (ELEMENT).IDENTIFICATOR
ELEMENT is the position in matrix from variable with data type "STRUCTURE"
- All variables declared within a sub-routine, are temporary variables, and are destroyed
when sub-routine ends. If variable is declared outside a sub-routine and used there, is
a global variable and is declared at program start.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 61
Benito Moya Fernndez
7.2.1 Data input and preparation
Data input at users level is treated on program description; here we will describe internal
process that these data receive, for can to be treated after by program
Every time we do an input a new data, every time we do a modification or we delete a data;
we must verify all dependences associated to these data
So for example, when we do a new input from a node, we must do:
- Add a new element to nodes array
- Introduce values to fields from new element.
The modification of the characteristics of a node is simpler, since only three parameters we
can modify:
- Change coordinate X
- Change coordinate Y
- Change node type (Support yes/no)
And we must do that without modify existing data from other nodes.
But when we must delete a node, for example node number 38 from an array with 78
elements, and in each node have beams connected, this is more complicated, because we
must do:
- Step 1: Verify if the node has beams connected.
o In case false jump to next step
o In case true ask for if you want to delete all connected beams
In case false abort the process
In case true:
Scroll through beams matrix, deleting all beams that are
connected to deleted node, also deleting all associated loads.
Compact beams matrix (Delete void elements, displacing
elements to reduce size and re-dimensioning to existing
beams number)
- Step 2: Delete node
o Move all values from next node to previous node for all and each one node
beyond deleted node.
o Re-dimensioning the matrix to a rank decreased in one unit (In our case 77
elements).
- Step 3: Scroll through the beams matrix once more, to do:
o Starting in following the deleted node and for all and each one of them to the
end, seek this node in starting or ending position for all and each one beam in
beams matrix, and assign the previous node.

We must do all these steps be carefully with no lose information
This is extensible to beams, but with beams is easier, because we havent dependencies down.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 62
Benito Moya Fernndez
7.2.1.1 Creating, editing and deleting nodes
First we have to define when and how to create, editing and deleting nodes. Every time we do
something, we expect program do other thing, this means do a program oriented to events.
How determine what must do the program is easy, we look on options in tool box and/or
editing windows. Each option enables or disables a Boolean variable, that acts like indicator
from an option (In most programing languages these variables are named Flags)
Creation of a new node:
We can create a new node when:
- We are with mouse pointer in to the graphic screen, and the tool NODE is active, we
push on mouse left button.
- After open New node option from Edition menu, and after input all data we need,
we push on OK button.
In both cases the position values from the new node, must be stored in temporary variables,
which we must to pass as parameters to corresponding routine.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 63
Benito Moya Fernndez
To create a new node, we must verify first if a node exists in same locations; there cant be two
nodes in same place.
Function VERIFY_NODE (POS_X;POS_Y) As Boolean
Declare TOP; COUNTER As Integer
VERIFY_NODE = False
TOP = STRUCTURE.COUNT
For COUNTER = 1 to TOP
If STRUCTURE (COUNTER).POS_X = POS_X Or
STRUCTURE (COUNTER).POS_Y = POS_Y Then
VERIFY_NODE = True
End If
Next COUNTER
End Function
We will use the value returned by function as flag to create or not the new node.
Once verified if node dont exist, the sentence to add a new node to structure will be:
ELEMENTS = STRUCTURE.COUNT+1
Redim Preserve STRUCTURE As Array (ELEMENTS) Of NODE

With this sentence we will have a new empty node at the matrix end, the input data routine
will be:
Sub NODE_EDITION (ELEMENTS;POS_X;POS_Y;TIPO)
STRUCTURE (ELEMENTS).POS_X = POS_X
STRUCTURE (ELEMENTS).POS_Y = POS_Y
STRUCTURE (ELEMENTS).TYPE = TYPE
End Sub

The complete sub-routine to create a new node will be:
Sub NEW_NODE (POS_X;POS_Y;TYPE)
Declare ANSWER As Boolean
ANSWER = VERIFY_NODE (POS_X;POS_Y)
If ANSWER = True
MsgBox (A node already exist in indicated location)
Exit NEW_NODE
Else
Declare ELEMENTS As Integer
ELEMENTS = STRUCTURE.COUNT+1
Redim Preserve STRUCTURE As Array (ELEMENTS) Of NODE
Call NODE_EDITION (ELEMENTS;POS_X;POS_Y;TYPE)
End If
End Sub
Finally this routine will be called from processes that can create a new node as shown:
Call NEW_NODE (POS_X;POS_Y;TYPE)

Editing an existing node:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 64
Benito Moya Fernndez
Edition from existing node only can be made from the edition window, so the procedure will
be called from this window, this will be detected by program with selected options.
Routine to add a new node is the same than to edit an existing node, if ELEMENTS is the last
position in the matrix (The new element location), we will add a new node. If ELEMENTS point
to an existing node, we will overwrite the existing values with other new values. To edit an
existing node we can call the node edition routine directly:
Call NODE_EDITION (ELEMENTS;POS_X;POS_Y;TYPE)
Where ELEMENTS is the position from the element to modify
Delete an existing node:
We can delete a node through two ways.
- From graphic window, with the options Node and Delete enabled, when the
mouse pointer is on a node, we push left mouse button.
- From edition window and with a node selected, we push on delete button.
If all conditions are true then sequence to delete a node will be called, which includes the sub-
routines shown below
- Verify associated beams
- Delete node
- Delete associated beams
- Renumber the nodes from beams affected by the disappearance of the node
To delete an existing node we will proceed moving all nodes, beyond the node to eliminate,
one position down, starting with the next to deleted until last node. At the end we will
decrease the matrix dimension in one element. The procedure is shown below:
Sub DELETE_NODE (ELEMENT)
Declare COUNTER As Integer
Declare TOP As Integer
For COUNTER = ELEMENT+1 To TOP
STRUCTURE(COUNTER-1)=STRUCTURE(COUNTER)
Next COUNTER
Redim Preserve STRUCTURE As Array (TOP-1) Of NODE
End Sub.

With this we will delete last matrix element.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 65
Benito Moya Fernndez
Next step will be verifying if exist any beam associated to deleted node, to verify this we will
use the function:
Function VERIFY (ELEMENT) As Boolean
VERIFY = False
Declare COUNTER; TOP As Integer
TOP= BEAMS_SET.NUM_ELEMENTS
For COUNTER = 1 To TOP
If BEAMS_SET (COUNTER).START = ELEMENT Or
BEAMS_SET (COUNTER).END = ELEMENT Then
VERIFY = True
End If
Next COUNTER
End If

This function gives us a flag that indicates if a beam has or not a reference to deleted node.
To delete all and each one of beams with reference to deleted node we will do:
Sub DELETE_BEAMS_NODE (ELEMENT)
Declare DELETED_BEAMS As Integer
Declare TOP As Integer
Declare COUNTER_1; COUNTER_2 As Integer
DELETED_BEAMS = 0
TOP = BEAMS_SET.NUM_ELEMENTS
For COUNTER_1 = 1 To TOP
If BEAMS_SET (COUNTER_1).START = ELEMENT Or
BEAMS_SET (COUNTER_1).END = ELEMENT Then
DELETED_BEAMS = DELETED_BEAMS+1
For COUNTER_2 = COUNTER_1+1 To TOP
BEAMS_SET(COUNTER_2-1) =BEAMS_SET(COUNTER_2)
Next COUNTER_2
End If
Next COUNTER_1
Redim Preserve BEAMS_SET As Array (TOP DELETED_BEAMS) Of BEAM
End Sub.

With this we will have deleted all beams with reference to deleted node, but now we need to
re-define all beams with references to nodes beyond deleted node. To do this we must scroll
through beams matrix and verify defined values for both start and end nodes. In case those
values are higher than deleted node (Both or only one), we will re-assign the same value
decreased in one unit to each node greater to deleted node, because on nodes matrix all we
did is move each one node beyond deleted node a position down.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 66
Benito Moya Fernndez
To do this we will do:
Sub REASSIGN_NODES_BEAM (ELEMENT)
Declare TOP As Integer
Declare COUNTER As Integer
TOP= BEAMS_SET.NUM_ELEMENTS
For COUNTER = 1 To TOP
If BEAMS_SET(COUNTER).START > ELEMENT Then
BEAMS_SET(COUNTER).START =
BEAMS_SET(COUNTER).START-1
End If
If BEAMS_SET(COUNTER).END > ELEMENT Then
BEAMS_SET(COUNTER).END =
BEAMS_SET(COUNTER).END-1
End If
Next COUNTER
End Sub.
The complete routine will be:
Sub COMPLETE_DELETE_NODE (ELEMENT)
Declare EXIST; ANSWER As Boolean
ANSWER = MsgBox (Really do you want delete node & ELEMENT & ?)
If ANSWER = False Then
Exit DELETE_NODE
Else
EXIST = VERIFY (ELEMENT)
If EXIST = True Then
ANSWER = MsgBox (There are beams associated to this node,
Do you want to delete it too?)
If ANSWER = False Then
Exit DELETE_NODE
End If
End If
Call DELETE_NODE (ELEMENT)
Call DELETE_BEAMS_NODE (ELEMENT)
Call REASSIGN_NODES_BEAM (ELEMENT)
End If
End Sub
And to call this routine, we will do:
Call DELETE_NODE (TMP_ELEMENT)
With this we will finish all processes we can do with nodes in the structure at editing time.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 67
Benito Moya Fernndez
7.2.1.2 Creating, editing and deleting beams
Creation, edition and deleting beams, although they have more associated data, is easier than
with nodes, because we havent dependencies down.
We can start the creation and edition processes from graphic window or pop up menu, with
New Beam option to create, or Edition Beam to modify. But in both cases we will
finish processes from graphic window.
The procedures for editing or create a beam are the same, with the same exception that with
nodes.
To create a new beam we must to define all essential parameters:
- Starting node
- Ending node
- Junction type at starting and ending
- Profile
- Rotation angle (*)
NOTE (*): This rotation angle is around X axis (Axis parallel to beam)
To make easier the beam creation, we will have pre-defined some parameters on profiles.
- Junction type will be defines as rigid in both cases.
- Rotation angle will be define to zero
- Load axis will be defined in local reference system
With all this, beams edition window will appear when any event below happens:
- When mouse pointer is on graphic window and we have selected two existing nodes,
in these conditions the edition window appears with the data from start and end
nodes on text boxes. If we select same node as start and end node, an error message
will launched by system and beam will not be created.
- From Edition New Beam menu option, which opens directly edition
window, but in this case with text boxes empty
Independently how we have opened the edition window, we can change nodes or invert its
order.
Once defined all parameters we need, we can start the process to create/edit.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 68
Benito Moya Fernndez
A new beam creation / modifying an existing beam
As we have already told, independently to how we started the process, we will finish on
edition window, we can see what process we have started in text from finish button, will
appears "Create" or "Modify" depending from started process.
And independently from started process too, first we must do is verify no duplicated beam
exist on beams matrix. We must scroll through beams matrix, comparing nodes from existing
beams to created/edited beam nodes.
This has an inconvenience: If we want to modify an existing beam, logically it exists in beams
matrix; if we only want to change the beam rotation or profile type, we dont need to verify
nodes, but if we change any node from beam, we must verify it. How to make this
discrimination results in create new options (flags) on program that make the code more
complicated. So we will make ever this comparison and only we will obviate the created beam
(On case editing an existing beam). This means create a comparison condition.
As we want to get a true or false value, we will use a function. Beams comparison function will
be:
Function COMPARE_BEAM (NUM;START;END) As Boolean
Declare TOP; COUNTER As Integer
TOP = BEAMS_SET.NUM_ELEMENTS
COMPARE_BEAM = False
For COUNTER = 1 To TOP
If (BEAMS_SET.START = START And
BEAMS_SET.END = END And COUNTER <> ELEMENT) Or
(BEAMS_SET.END = START And
BEAMS_SET.START = END And COUNTER <> ELEMENT)
Then
COMPARE_BEAMS = True
End If
Next COUNTER
End Function
The ELEMENT variable is the beam position in beams matrix, if the beam compared is a new
element, its position in to beams matrix will be the number of elements from beams matrix
BEAMS_SET plus one element; because we know the position from a new element in to beams
matrix, but its position is not created yet. So "COUNTER<>ELEMENT" comparison is ever true,
and the new beam will be compared with all existing beams.
In case we are editing an existing beam, when we arrive to concrete element, comparison will
be false, so we will not make the comparison with itself

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 69
Benito Moya Fernndez
Routine to input data is very easy, always we will input all data (including loads), and will be
like:
Sub EDIT_BEAM (NUM;INIT;TP_I;ARR;TP_A;PROF;ROT;LD;ANG;REF;V1;V2;FNC)
With BEAMS_SET (NUM)
.STA_NODE = INIT
.STA_TYPE = TP_I
.END_NODE = END
.END_TYPE = TP_A
.PROFILE = PRO
.ROTATED = ROT
.LOAD = LD
.INCIDENCE = ANG
.REFERENCE = RF
.VALUE_1 = V1
.VALUE_2 = V2
.FUNCTION = FNC
End With
End Sub
Values for all undefined data will be zero.
The complete routine to create a beam will be:
Sub NEW_BEAM (NUM;INIT;TP_I;ARR;TP_A;PROF;ROT;LD;ANG;REF;V1;V2;FNC)
Declare ANSWER As Boolean
ANSWER = VERIFY_BEAMS (NUM;INI;ARR)
If ANSWER = True Then
MsgBox (There is a beam already defined between indicated nodes, if
you want to modify it, please access it in edition mode)
Exit NEW_BEAM
End If
Call EDIT_BEAM (NUM;INIT;TP_I;ARR;TP_A;PROF;ROT;LD;ANG;REF;V1;V2;FNC)
End Sub
Deleting an existing beam:
Existing beam deletion is a similar process to node deletion; we will move all beams with a
position higher than deleted beam to one position down, from the next node until the last. At
the end we will re-dimension the beams matrix with one minus element.
As we already have mentioned, because we havent dependencies down, we dont need verify
anything more, only ask for if the operator really wants to eliminate the beam.
Also, as we already have mentioned too, because the loads are associated to a beam, all loads
associated with deleted beam will be deleted too.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 70
Benito Moya Fernndez
Events that can delete a beam are:
- When mouse pointer on graphic screen, and with tools Beam and Delete active,
we click with left mouse button on an existing beam.
- On edition window we select delete
In these conditions we will start the routine below:
Sub DELET_BEAM (POSITION)
Declare ANSWER As Boolean
Declare TOP; COUNTER As Integer
ANSWER = MsgBox (Are you sure you want to delete this beam?)
If ANSWER = False Then
Exit DELETE_BEAM
End If
For COUNTER = POSITION+1 To TOP
BEAMS_SET (COUNTER-1) = BEAMS_SET (COUNTER)
Next COUNTER
Redim Preserve BEAMS_SET As ARRAY (TOP - 1) Of BEAM
End Sub

With this we have finish all processes to create, delete and edit a beam. Of course, is supposed
all needed data are correct. So verification process will be made on graphic interface.
7.2.1.3 Input data from a file
We can read previous saved data for editing o recalculate a structure.
Last option has no sense, because we can store solved calculations, to access it without new
calculations. In fact this will be most usual option, because calculations can take much time.
As we have indicated, project data can be stored in a data base or in a text file with own file
format DCP.
Data base storage and access will be made with SQL standard sentences; here do not want to
do a course in SQL, so we dont explain data access procedures in data base.
Text file data structure is interesting, it will give us an idea that how to access it through a text
editor.
As we have indicated, basic data for a structure are general data and descriptive data.
In descriptive data we can differentiate between node data and beam data.
Finally this data separation gives us three data blocks, we will define these three blocks in our
file, and we will do this through a header in each block.
First block will contain general data, so always it will have the same size
Two next blocks, nodes block and beams blocks, will have variable size, because each structure
will be different than other.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 71
Benito Moya Fernndez
So will program a different header for each block, that activate a different sequence in
program when we read the file
File will be read in sequential form, line by line. At the beginning we will find a tag with
program identification and release. If this header doesnt appear, program sends an error
message Cant open file. We do that to prevent try to open a file from other application, this
can cause a program malfunction and deteriorate the file.
Once verified the file authentication, we will proceed to read the file, data structure will be as
shown below
ACCP-Ver.1.0 Build 001/Rev.0 2014;
HEADER01 General data;
PROJECT/Project name;
AUTHOR/Author name;
DATE/Starting date;
MODIFIED/Last edition date;
MATERIAL/Material from structure;
HEADER02 Nodes data;
001/5240/3750/0;
002/3714/1789/1;


NNN/xxx/yyy/t;
HEADER03 Beams data;
001/0/005/1/IPE120/0/0/0/0/0/0/0;
003/1/004/0/IPN100/0/1/1.57079/0/5000/0/2;
..
..
OOO/TO/FFF/TF/PERFIL/GP/TC/AI/EI/Q1/Q2/FC;
EOF;

This structure is explained below:
We will have indicated end of line with char ;, this char is the most used for almost all
program languages to determine end of line sequence. Is not the same than new line char that
usually is not present.
The first line is the program identification, if it is wrong causes an error message
After that we can see the line:
HEADER01 General data;
This line identifies where description block starts. Below this line we can find the fields that
describe all general data, each one in one separate line, preceded by a label and separated by
char /.
Field value is presented enclosed in quotes to indicate that is a literal, program will save it
without quotes.
When we finish with the general data, we find the line:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 72
Benito Moya Fernndez
HEADER02 Nodes data;
That indicates the general data block end, and where the nodes definition block starts. Below
this point the line structure is like shown:
NNN/xxx/yyy/t;
Each parameter is separated to next by character /, each field is:
NNN : Node number (001 NNN 200)
xxx : X position from node
yyy : Y position from node
t : Node type (0 Node/ 1 Support)
Parameter NNN is not strictly necessary, but is indicated for clarity.
More ahead we find the line:
HEADER03 Beams data;
That indicates the nodes definition block end, and where the beams definitions block starts.
Beams definition is similar to nodes definition, the structure is:
OOO/TO/FFF/TF/PROF/GP/TC/AI/EI/Q1/Q2/FC;
Where each field is:
OOO : Start node
TO : Start node type
FFF : End node
TF : End node type
PROF : Profile type
WP : Profile plastic moment
GP : Profile rotation
TC : Load type
AI : Incidence angle
EI : Reference from incidence angle
Q1 : Parameter Q1
Q2 : Parameter Q2
FC : Load evolution function
The values allowed for each parameter are defined in section 5.2.2
Finally we find the line EOF (End Of File)
We obviate description for this code because is not interesting for program purpose.
7.2.1.4 Saving data before calculations
Once the structure defined, and before launching calculations, we must save done work on
disk. We can do that in two ways, in a text file or in program database.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 73
Benito Moya Fernndez
Like almost all programs, first we must do is verify if any previous file exist. This is
independently if a new project or an existing one is.
If we have opened an existing project, we have a flag indicating that file already exist, in this
case we will make a safety copy from old file (Rename those file with .BAK file type), and we
will proceed with save process. The access path and filename are stored in a variable; the file
and its safety copy are in the same folder.
In a new file case, flag will be off, and a window similar to a browser will appears, but with a
text box with a proposed name for the file (The proposed name is the name project from
general data block), if we want we can change the name.
In case that the name for the file (Proposed by computer or written by user) already exists on
disk, program ask us if we want to overwrite existing file. If we accept, program will rename
the existing file with .BAK file type and then saves a new file version. If we decline the browser
window turns to appear and give us the opportunity to change the name.
In all cases we must to verify if a previous safety copy already exists on disk, because if we try
to rename a .DCP file to a .BAK, and .BAK file already exist, program will give us an error
message File access denied, and program will crash because is an external exception. To
prevent it, we will verify if a previous .BAK file already exists and we will delete it before to
save a safety copy.
This is the only handicap to save a project in a text file instead data base, we only can save a
version from a project (Of course we can do copies manually)
The file structure is explained on section 7.2.1.3 Input data from a file. And like in that
section, we consider irrelevant for program purpose, explain in pseudo-code how to save data.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 74
Benito Moya Fernndez
7.2.1.5 Preparation of data for the calculation
Once we have all structure data, and all data are already verified and saved, we can compose
all matrices we need for calculations, as shown in expression (21)
|| || || |

| ||
According to this expression we must compose a total of five matrices, some of it we only will
declare it, because we don't have data to include. Other matrices will be filled with data from
nodes and beams from structure definition.
First step is to declare all matrices, to reserve space in memory.
As we have explained, all of these matrices should be filled with a set of all elements that
define expression (21) for each stage of plastic collapse. We dont know how many stages will
be before plastic collapse. If the structure is simple (with a reduced numbers of nodes and
beams) and all nodes are articulated, possible that only with one stage the collapse arrives. But
usually the structures will be complexes, and more than one stage will appear, so we will
define two stages at least for each structure; and if we need more stages, we will re-
dimensioning all matrices.
For all other dimensions we will take a least a structure containing two nodes and a beam. This
is not a structure in strictly sense, but is just to declare all variables, this give us a matrix of 36
(6x6) elements. In these conditions we have two types of matrices, two dimensions matrices
and three dimensions matrices, so we will do:
Declare CG, CA, FA, KG As Array (2,6,6) Of Real = 0
Declare RG, FG, DG As Array (2,6) Of Real = 0
Declare DG_CALC, DG_PREV, DG_TOTAL As Array (6) Of Real = 0
Declare FG_CALC, MRR As Array (2,6,4) Of Real = 0
Where:
- CG : General coefficients matrix
- CA : Auxiliary coefficients matrix
- KG : General stiffness matrix
- RG : General reactions matrix
- FG : General nodal forces matrix
- FA : Auxiliary forces matrix
- DG : General displacements matrix
- FG_CALC : Local forces matrix for calculations
- DG_CALC : General displacements matrix for calculations
- DG_PREV : General previous displacements addition
- DG_TOTAL : Total general displacements for current stage
- MRR : Reactions solution matrix
Note: We have chosen short names for these variables, using the first letter from the matrix
name (C for coefficient, K for stiffness, etc.) and letter G to indicate that is a general matrix.
All matrices are initialized to zero, according to programing language, this can be not strictly
necessary, but it is advisable.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 75
Benito Moya Fernndez
The matrix FG_CALC becomes imposed by fact that we have diverse evolution from load in
each beam, which can arrive to the same node.
This declaration will be made outside any procedure or formulary, because are global variables
and we need use it in many points from program. According programing language, this
declaration can be made in other way.
Once the data preparation procedure launched, first step we must to do is re-dimensioning all
matrices to real size of our structure. We will change the matrices size with preserving all
existing data. In case we need set to zero all values, this will be made through a sentence:
Sub REDIMENSION (STAGES,RANK)
Redim Preserve CG As Array (STAGES,RANK,RANK) Of Real
Redim Preserve KG As Array (STAGES,RANK,RANK) Of Real
Redim Preserve RG As Array (STAGES,RANK,4) Of Real
Redim Preserve FG As Array (STAGES,RANK,4) Of Real
Redim Preserve DG As Array (STAGES,RANK) Of Real
Redim Preserve DG_CALD As ARRAY (RANK) Of Real
Redim Preserve FG_CALC As Array (STAGES,RANK,4) Of Real
End Sub
Now we must fill data on all matrices, we start with coefficient matrix, at the beginning it will
be an identity matrix. The sub-routine will be:
Sub CGI (STAGE,RANK)
Declare COUNTER As Integer
For COUNTER = 1 To RANK
CG(STAGE,COUNTER,COUNTER)=1
Next COUNTER
End Sub
This routine will be used each time we need an identity matrix with each collapse stage.
We will continue with displacement matrix and reactions matrix, we dont know the values,
but we know that there are some values that will be zero, and others one will be different to
zero. We know the zero value; they are part of calculation assumptions.
- In supports displacements are zero.
- In nodes reactions are zero.
So we can say:
- In supports all reactions are different than zero.
- In all nodes others different a supports, all displacements are zero.
Although last sentence could be not strictly true, as indicator for calculations, we are
interested in make these values are different to zero, but after that we can give a value
different than zero. And also, for both destination matrices (RG and DG), the origin data are
the same (STRUCTURE), we can use the same routine to define both matrices at same time.
Sub RG_DG (STAGE,RANK,STRUCTURE)
Declare COUNTER As Integer
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 76
Benito Moya Fernndez
For COUNTER = 1 To RANK
If STRUCTURE(COUNTER).TYPE=0 Then
RG(STAGE,COUNTER)=0
DG(STAGE,COUNTER)=1
Else
RG(STAGE,COUNTER)=1
DG(STAGE,COUNTER)=0
End If
Next COUNTER
End Sub
Now we must assembly stiffness matrix and nodal forces matrix.
First we must to get the local stiffness matrix and local nodal forces matrix, for all and each
one of beams. For that we must get:
- Beam length and its position in the structure (Angle). We can calculate it from relative
position of nodes.
- Inertia momentum from profile section, according defined profile.
- Profile area.
- Structure material, defined in general data project.
- Local stiffness matrix, according nodes junction type.
And for local nodal forces matrix associated to a beam we need also:
- All associated loads and its type
This routine runs in to structures edition formulary, so we dont need re-define and/or pass
elements from matrices as parameters. Also, because the calculation matrices are declared as
global variables, they are transparent to entire program.
The best way to assembly is scroll through all BEAMS_SET matrix, and putt he calculated values
on stiffness matrix and nodal forces matrix.
This routine will run each time a new stage appears, so we will pass the stage number like a
parameter to routine.
It is understood that the data in the database is already open and loaded into memory, so you
can access them (types of profiles, moments of inertia, material data, etc....). In pseudo-code
subroutine only indicates access to data in an approximate manner as is done in SQL
statements.
The final code implementation depends directly from programing language and database
chosen.
The complete sub-routine is:
Sub KG_FG_CALC (STAGE)
We make an internal variable declaration in sub-routine
Declare CNT_1;TOP_1;TOP_2;RMR As Integer Loop controls
Declare LGB;PX1;PX2;PY1;PY2;DX;DY;ANG as Real Calculation variables
Declare FX1;FY1;MZ1;FX2;FY2;MZ2 As Real Calculation variables
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 77
Benito Moya Fernndez
Declare TPORG;TPDST;GIR;REF As Boolean Control flags
Declare ORG;DST As Integer Beam nodes
Declare PRF As Text Profile type
Declare FNT;TYPE_CG;TPCG as integer Load and function type
Declare INCID;INCID_T As Real Incidence angles
Declare PM;VAL_1;VAL_2 As Real Load values
Declare AREA;INERTIA;YOUNG As Real Profile values
Declare MRL;MRL_G As Array (6;6) Of Real Local stiffness matrices
Declare MFL;MFL_G As Array (6,4) Of Real Local forces for calculation
Declare TMRL As Integer Type local matrix
Declare SNG;CSG As Real Change reference variables
Declare L1;L2;L3;L4;L5;L6 As Integer Columns and rows to fill
TOP_1 = BEAMS_SET(STAGE).ELEMENTS_NUMBER Counters init.
TOP_2 = 6
Loop to scroll all beams
For CNT_1 = 1 To TOP_1
Extract values from beams and assign to
Calculation variables
With BEAMS_SET(STAGE,CNT_1)
ORG = .STA_NODE
DST = .END_NODE
TPORG = . STA_TYPE
TPDST = . END_TYPE
PRF = .PROFILE
PM = .WP
GIR = .ROTATED
TYPE_CG = .LOAD
INCID = .INCIDENCE
REF = .REFERENCE
VAL_1 = .VALUE_1
VAL_2 = .VALUE_2
FNT = .FUNCTION
End With
If TYPE_CG = 0 Then
TPCG = 0
End If
If TYPE_CG = 1 Then
TPCG = 1
End If
If TYPE_CG > 1 Then
If VAL_1 <= VAL_2 Then
TPCG = 3
Else
TPCG = 2
End If
End If

Extract data from nodes
PX1 = ESTRUCTURE(ORG).POSITION_X
PY1 = ESTRUCTURE(ORG).POSITION_Y
PX2 = ESTRUCTURE(DST).POSITION_X
PY2 = ESTRUCTURE(DST).POSITION_Y
Extract data from database
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 78
Benito Moya Fernndez
Find First in MATERIALS Where MAT = MATERIAL
YOUNG = MATERIALS.YOUNG_MODULUS
Find First in PROFILES Where PROFILE = PRF
If GIR = 0 Then
INERTIA = PROFILES.MIY
Else
INERTIA = PROFILES.MIZ
End If
AREA = PROFILES.AREA
Start calculations with beam data
First we calculate is beam length
DX = PX2 PX1
DY = PY2 PY1
LGB = SqrRoot (DX^2 + DY^2)
ANG = Atan (DY/DX)
Select local stiffness matrix according junction type
If TPORG = 0 And TPDST = 0 Then Both nodes rigid
TPMRL = 1
End If
If TPORG = 0 And TPDST = 1 Then Start rigid and End articulated
TPMRL = 2
End If
If TPORG = 1 And TPDST = 0 Then Start articulated and End rigid
TPMRL = 3
End If
If TPORG = 1 And TPDST = 1 Then Both nodes articulated
TPMRL = 4
End If
Calculation from according matrix
MRL=0
Select Case TPMRL
Case 1
MRL(1;1) = YOUNG*AREA/LGB
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(1;4)
MRL(2;2) = (12*YOUNG*INERTIA)/(LGB^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(3;3) = 4*YOUNG*INERTIA/LGB
MRL(6;6) = MRL(3;3)
MRL(3;6) = MRL(3;3)/2
MRL(6;3) = MRL(3;6)
MRL(2;3) = (6*YOUNG*INERTIA)/(LGB^2)
MRL(3;2) = MRL(2;3)
MRL(2;6) = MRL(2;3)
MRL(6;2) = MRL(2;3)
MRL(3;5) = - MRL(2;3)
MRL(5;3) = MRL(3;5)
MRL(6;5) = MRL(3;5)
MRL(5;6) = MRL(3;5)
End Case 1
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 79
Benito Moya Fernndez
Case 2
MRL(1;1) = YOUNG*AREA/LGB
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
MRL(2;2) = (3*YOUNG*INERTIA)/(LGB^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(3;3) = 3*YOUNG*INERTIA/LGB
MRL(2;3) = (3*YOUNG*INERTIA)/(LGB^2)
MRL(3;2) = MRL(2;3)
MRL(3;5) = - MRL(2;3)
MRL(5;3) = MRL(3;5)
End Case 2
Case 3
MRL(1;1) = YOUNG*AREA/LGB
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
MRL(2;2) = (3*YOUNG*INERTIA)/(LGB^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(6;6) = 3*YOUNG*INERTIA/LGB
MRL(5;6) = (3*YOUNG*INERTIA)/(LGB^2)
MRL(6;5) = MRL(5;6)
MRL(2;6) = - MRL(5;6)
MRL(6;2) = MRL(2;6)
End Case 3
Case 4
MRL(1;1) = YOUNG*AREA/LGB
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
End Case 4
End Select
Beams force composition
If REF = 0 Then
INCID_T = INCID + ANG
Else
INCID_T = INCID
End If

Select Case TPCG
Case 0 Beam without load
MFL(1;FNT) = 0 X force on node 1
MFL(2;FNT) = 0 Y force on node 1
MFL(3;FNT) = 0 Z momentum on node 1
MFL(4;FNT) = 0 X force on node 2
MFL(5;FNT) = 0 Y force on node 2
MFL(6;FNT) = 0 Z momentum on node 2
End Case 0
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 80
Benito Moya Fernndez
Case 1 Beam with point load (Expression 7)
Declare DA;DB;SN;CS As Real
DA = VAL_2
DB = LGB VAL_2
SN = SIN(INCID_T)
CS = COS(INCID_T)
MFL(1;FNT) = -VAL_1*CS*(DB/LGB)
MFL(2;FNT) = -VAL_1*SN*(DB^2/LGB^2)*(3-2*(DB/LGB))
MFL(3;FNT) = -VAL_1*SN*(DA*DB^2)/(2*LGB^2)
MFL(4;FNT) = -VAL_1*CS*(DA/LGB)
MFL(5;FNT) = -VAL_1*SN*(DA^2/LGB^2)*(3-2*(DA/LGB))
MFL(6;FNT) = VAL_1*SN*(DB*DA^2)/(2*LGB^2)
End Case 1
Case 2 Beam with trapezoidal load, max. on node 1 (Expression 11)
Declare Q1;Q2;SN;CS As Real
Q1 = VAL_1 VAL_2
Q2 = VAL_2
SN = Sin(INCID_T)
CS = Cos(INCID_T)
MFL(1;FNT) = -(2*Q1*LGB*CS/6)-(Q2*LGB*CS/2)
MFL(2;FNT) = -(7*Q1*LGB*SN/20)-(Q2*LGB*SN/2)
MFL(3;FNT) = -( Q1*LGB^2*SN/20)-(Q2*LGB^2*SN/12)
MFL(4;FNT) = -(Q1*LGB*CS/6)-(Q2*LGB*CS/2)
MFL(5;FNT) = -(3*Q1*LGB*SN/20)-(Q2*LGB*SN/2)
MFL(6;FNT) = ( Q1*LGB^2*SN/30)+(Q2*LGB^2*SN/12)
End Case 2
Case 3 Beam with trapezoidal load, max. on node 2 (Expression 12)
Declare Q1;Q2;SN;CS As Real
Q1 = VAL_2 VAL_1
Q2 = VAL_1
SN = Sin(INCID_T)
CS = Cos(INCID_T)
MFL(1;FNT) = -(Q1*LGB*CS/6)-(Q2*LGB*CS/2)
MFL(2;FNT) = -(3*Q1*LGB*SN/20)-(Q2*LGB*SN/2)
MFL(3;FNT) = -( Q1*LGB^2*SN/30)-(Q2*LGB^2*SN/12)
MFL(4;FNT) = -(2*Q1*LGB*CS/6)-(Q2*LGB*CS/2)
MFL(5;FNT) = -(7*Q1*LGB*SN/20)-(Q2*LGB*SN/2)
MFL(6;FNT) = ( Q1*LGB^2*SN/20)+(Q2*LGB^2*SN/12)
End Case 3
Find the rotation components
SNG = Sin(ANG)
CSG = Cos(ANG)

Apply rotation on local stiffness matrix, to get stiffness matrix in
global reference axis
MRL_G(1;1) = (CSG^2*MRL(1;1))+(SNG^2*MRL(2;2))
MRL_G(4;4) = MRL_G(1;1)
MRL_G(1;4) = -MRL_G(1:1)
MRL_G(4;1) = MRL_G(1;4)
MRL_G(1;2) = CSG*SNG*(MRL(2;2)-MRL(1;1)
MRL_G(2;1) = MRL_G(1;2)
MRL_G(4;5) = MRL_G(1;2)
MRL_G(5;4) = MRL_G(1;2)
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 81
Benito Moya Fernndez
MRL_G(1;5) = -MRL_G(1;2)
MRL_G(5;1) = MRL_G(1;5)
MRL_G(2;4) = MRL_G(1;5)
MRL_G(4;3) = MRL_G(1;5)
MRL_G(2;2) = (SNG^2*MRL(1;1))+(CSG^2*MRL(2;2))
MRL_G(5;5) = MRL_G(2;2)
MRL_G(2;5) = -MRL_G(2;2)
MRL_G(5;2) = MRL_G(2;5)
MRL_G(1;3) = SNG*MRL(2;3)
MRL_G(1;6) = MRL_G(1;3)
MRL_G(3;1) = MRL_G(1;3)
MRL_G(6;1) = MRL_G(1;3)
MRL_G(3;4) = -MRL_G(1;3)
MRL_G(4;3) = MRL_G(3;4)
MRL_G(4;6) = MRL_G(3;4)
MRL_G(6;4) = MRL_G(3;4)
MRL_G(2;3) = CSG*MRL(2;3)
MRL_G(2;6) = MRL_G(2;3)
MRL_G(3;2) = MRL_G(2;3)
MRL_G(6;2) = MRL_G(2;3)
MRL_G(3;5) = -MRL_G(2;3)
MRL_G(5;3) = MRL_G(3;5)
MRL_G(5;6) = -MRL_G(3;5)
MRL_G(6;5) = MRL_G(5;6)
MRL_G(3;3) = MRL(3;3)
MRL_G(6;6) = MRL(6;6)
MRL_G(3;6) = MRL(3;6)
MRL_G(6;3) = MRL(6;3)
Apply rotation on local forces to get forces in
global reference axis
MFL_G(1;FNT) = CSG*MFL(1;FNT)+SNG*MFL(2;FNT)
MFL_G(2;FNT) = -SNG*MFL(1;FNT)+CSG*MFL(2;FNT)
MFL_G(3;FNT) = MFL(3;FNT)
MFL_G(4;FNT) = CSG*MFL(4;FNT)+SNG*MFL(5;FNT)
MFL_G(5;FNT) = -SNG*MFL(4;FNT)+CSG*MFL(5;FNT)
MFL_G(6;FNT) = MFL(6;FNT)
Assembly global stiffness matrix
L1 = 3*(ORG-1)+1
L2 = 3*(ORG-1)+2
L3 = 3*(ORG-1)+3
L4 = 3*(DST-1)+1
L5 = 3*(DST-1)+2
L6 = 3*(DST-1)+3
KG(STAGE;L1;L1) = KG(STAGE;L1;L1)+MRL_G(1;1)
KG(STAGE;L1;L2) = KG(STAGE;L1;L2)+MRL_G(1;2)
KG(STAGE;L1;L3) = KG(STAGE;L1;L3)+MRL_G(1;3)
KG(STAGE;L1;L4) = KG(STAGE;L1;L4)+MRL_G(1;4)
KG(STAGE;L1;L5) = KG(STAGE;L1;L5)+MRL_G(1;5)
KG(STAGE;L1;L6) = KG(STAGE;L1;L6)+MRL_G(1;6)
KG(STAGE;L2;L1) = KG(STAGE;L2;L1)+MRL_G(2;1)
KG(STAGE;L2;L2) = KG(STAGE;L2;L2)+MRL_G(2;2)
KG(STAGE;L2;L3) = KG(STAGE;L2;L3)+MRL_G(2;3)
KG(STAGE;L2;L4) = KG(STAGE;L2;L4)+MRL_G(2;4)
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 82
Benito Moya Fernndez
KG(STAGE;L2;L5) = KG(STAGE;L2;L5)+MRL_G(2;5)
KG(STAGE;L2;L6) = KG(STAGE;L2;L6)+MRL_G(2;6)
KG(STAGE;L3;L1) = KG(STAGE;L3;L1)+MRL_G(3;1)
KG(STAGE;L3;L2) = KG(STAGE;L3;L2)+MRL_G(3;2)
KG(STAGE;L3;L3) = KG(STAGE;L3;L3)+MRL_G(3;3)
KG(STAGE;L3;L4) = KG(STAGE;L3;L4)+MRL_G(3;4)
KG(STAGE;L3;L5) = KG(STAGE;L3;L5)+MRL_G(3;5)
KG(STAGE;L3;L6) = KG(STAGE;L3;L6)+MRL_G(3;6)
KG(STAGE;L4;L1) = KG(STAGE;L4;L1)+MRL_G(4;1)
KG(STAGE;L4;L2) = KG(STAGE;L4;L2)+MRL_G(4;2)
KG(STAGE;L4;L3) = KG(STAGE;L4;L3)+MRL_G(4;3)
KG(STAGE;L4;L4) = KG(STAGE;L4;L4)+MRL_G(4;4)
KG(STAGE;L4;L5) = KG(STAGE;L4;L5)+MRL_G(4;5)
KG(STAGE;L4;L6) = KG(STAGE;L4;L6)+MRL_G(4;6)
KG(STAGE;L5;L1) = KG(STAGE;L5;L1)+MRL_G(5;1)
KG(STAGE;L5;L2) = KG(STAGE;L5;L2)+MRL_G(5;2)
KG(STAGE;L5;L3) = KG(STAGE;L5;L3)+MRL_G(5;3)
KG(STAGE;L5;L4) = KG(STAGE;L5;L4)+MRL_G(5;4)
KG(STAGE;L5;L5) = KG(STAGE;L5;L5)+MRL_G(5;5)
KG(STAGE;L5;L6) = KG(STAGE;L5;L6)+MRL_G(5;6)
KG(STAGE;L6;L1) = KG(STAGE;L6;L1)+MRL_G(6;1)
KG(STAGE;L6;L2) = KG(STAGE;L6;L2)+MRL_G(6;2)
KG(STAGE;L6;L3) = KG(STAGE;L6;L3)+MRL_G(6;3)
KG(STAGE;L6;L4) = KG(STAGE;L6;L4)+MRL_G(6;4)
KG(STAGE;L6;L5) = KG(STAGE;L6;L5)+MRL_G(6;5)
KG(STAGE;L6;L6) = KG(STAGE;L6;L6)+MRL_G(6;6)
Assembly global forces matrix
FG(STAGE;L1;FNT) = FG(STAGE;L1;FNT)+MFL_G(1;FNT)
FG(STAGE;L2;FNT) = FG(STAGE;L2;FNT)+MFL_G(2;FNT)
FG(STAGE;L3;FNT) = FG(STAGE;L3;FNT)+MFL_G(3;FNT)
FG(STAGE;L4;FNT) = FG(STAGE;L4;FNT)+MFL_G(4;FNT)
FG(STAGE;L5;FNT) = FG(STAGE;L5;FNT)+MFL_G(5;FNT)
FG(STAGE;L6;FNT) = FG(STAGE;L6;FNT)+MFL_G(6;FNT)
Next CNT_1
End Sub.

Finally we must fix the size from reactions calculation matrix, dimension from this matrix will
fixed when we have defined all nodes from structure, and ever before start calculations.
Values change for this matrix with each new stage, but its rank not, and nodes where are
defined neither, independently if the number of nodes in the structure increases.
This is so because if any new node appears as a result of the plasticization of a bar in an
intermediate point, it is added at the end of the matrices (Stiffness, displacement, reactions
and nodal forces).
So this matrix will be dimensioned at the beginning of calculations. Together with it we will
create and fix the size from a vector, this vector will contain position from nodes that are
supports. We will do that to access directly to these nodes without scrolling through all nodes
in structure.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 83
Benito Moya Fernndez
This variable creation will be made at the beginning of program, in to declarations block; its
resize will be made just before to launch calculations, through a sub-routine.
Declaration appears like:
Declare MRG As Array (2;3;3) Of Real
Declare SUPPORTS As Array (3) Of Integer
Declared size is a least we need, as we have said we will do a resize before calculations, with
the sentences below:

Sub SUPPORT_MATRIX()
Declare CNT; TOP; TOTAL;POS as Integer Local supports variables
TOP = STRUCTURE.ELEMENTS_NUMBER
TOTAL=0
For CNT = 1 To TOP
If STRUCTURE(CNT).TYPE=1 Then
TOTAL = TOTAL+1
POS=CNT-1
Redim Preserve SUPPORT As Array (3*TOTAL) Of Integer
SUPPORT (3*(TOTAL-1)+1)=3*POS+1
SUPPORT (3*(TOTAL-1)+2)=3*POS+2
SUPPORT (3*(TOTAL-1)+3)=3*POS+3
End If
Next CNT
Redim MRG As Array (2; 3*TOTAL; 3*TOTAL)
End Sub
7.2.2 Calculations
Once assembled the matrices from stiffness, identity and nodal forces; we can start to
calculate.
First step is to get a diagonal matrix from general stiffness matrix, at same time we will do the
same linear combinations with lines and arrows on identity matrix; in this way we will get a
coefficient matrix to solve reactions, and later displacements.
To get a diagonal matrix, we will proceed making zero all values below main diagonal before,
later we will do the same with values on top from main diagonal.
Procedure to get a diagonal will be like:
Sub DIAGONAL (STAGE)
Auxiliary variables declaration
Declare TOP;CNT_1;CNT_2 As Integer
Declare FACTOR As Real
We take as counters limit the matrices Rank
TOP = KG.Rank2
Scroll on general stiffness matrix from top to down
And put values on diagonal stiffness matrix
For CNT_1 = 1 To TOP
For CNT_2 =1 To TOP
KG_D(STAGE;CNT_1;CNT_2)=KG(STAGE;CNT_1;CNT_2)
Next CNT_1
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 84
Benito Moya Fernndez
Next CNT_2
Scroll on diagonal stiffness matrix from top to down in first step of
diagonal making process, also assembly coefficients matrix
For CNT_1 = 1 To TOP
FACTOR = KG_D(STAGE;CNT_1+1;CNT_1)/KG_D(STAGE;CNT_1;CNT_1)
For CNT_2 = CNT_1 To TOP
KG_D(STAGE;CNT_1+1;CNT_2)= KG_D(STAGE;CNT_1+1;CNT_2)
(FACTOR * KG_D(STAGE;CNT_1;CNT_2))
Coefficients matrix has been initialized to identity matrix
on resize process when a new stage appears
CG(STAGE;CNT_1+1;CNT_2)= CG(STAGE;CNT_1+1;CNT_2) (FACTOR
* CG(STAGE;CNT_1;CNT_2))
Next CNT_2
Next CNT_1 Now we scroll from down to up
For CNT_1 = TOP To 1 DownCount
FACTOR = KG_D(STAGE;CNT_1-1;CNT_1)/KG_D(STAGE;CNT_1;CNT_1)
For CNT_2 = CNT_1 To 1 DownCount
KG_D(STAGE;CNT_1-1;CNT_2)= KG_D(STAGE;CNT_1-1;CNT_2)
(FACTOR * KG_D(STAGE;CNT_1;CNT_2))
CG(STAGE;CNT_1-1;CNT_2)= CG(STAGE;CNT_1-1;CNT_2) (FACTOR
* CG(STAGE;CNT_1;CNT_2))
Next CNT_2
Next CNT_1
End Sub

Next step is verified if structure already has collapsed, this is easy because if only one element
on diagonal stiffness matrix (Other than a support location) is equal to zero, the structure has
collapsed.
In program we will have a global flag to verify if structure has or hasnt collapsed.
Declare Global CPE As Boolean
This variable is initialized to false (Logic value zero) when calculations start, and we change its
value as result from a comparison in the routine.
Sub COLLAPSE (STAGE)
Auxiliary variable declaration
Declare TOP_1;TOP_2;CNT_1;CNT_2 As Integer
Declare IS_SUPPORT As Boolean
TOP_1 = KG_D.Rank2
TOP_2 = SUPPORTS.ELEMENTS_NUMBER
Loop to verify all elements in KD
For CNT_1=1 To TOP_1
If KG_D(STAGE;CNT_1;CNT_1) = 0 Then
IS_SUPPORT = False
Loop to verify is not a support
For CNT_2 = 1 To TOP_2
If SUPPORTS (CNT_2) = CNT_1 Then
IS_SUPPORT = True
End If
Next CNT_2
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 85
Benito Moya Fernndez
If IS_SUPPORT = False Then
CPE = True
End If
End If
Next CNT_1
End Sub

If structure dont has collapsed we will proceed with solve the matrices system.
All process will be included in a large cycle loop, that includes other loops that solve in an
iterative manner all needed blocks to get final solution.
First step is applying coefficients matrix to nodal forces vector and reactions vector, we get a
new matrices system, as shown in expressions (22) to (26). Later we must to solve reactions on
supports, because in other nodes than supports reactions will be zero. For do that we will look
on displacements, that will be zero on supports; later we will construct an auxiliary matrices
system, with elements from matrices of stiffness and forces. We can do that because we have
a vector with position from supports on structure; we can keep these positions to select
arrows and files with same position on the matrices from auxiliary system.
This auxiliary system has the particularity, it dont increases its rank; only increases the number
of forces if number of nodes increases to (It means the new node appears in the middle of a
beam).
From created vector SUPPORT we can extract the correct values to auxiliary coefficient matrix,
and forces matrix. The forces matrix has a rectangular form, because if for coefficients we
select columns and arrows, from forces we need all columns for each selected arrow.
We can make all processes in the same routine, resize both matrices, diagonalization and solve
support reaction; the complete routine may appear like:
Sub AUX_CALC1 (STAGE) Auxiliary calculations sub-routine 1
Auxiliary variables definition
Declare RANK_1, RANK_2 As Integer
Declare LOC_1, LOC_2 As Integer
Declare CNT_1, CNT_2, CNT_3 As Integer
Declare FACTOR As Real
Select a rank for arrays
RANK_1 = SUPPORT.ELEMENTS_NUMBER
RANK_2 = NODES.ELEMENTS_NUMBER
Resize auxiliary matrices
Redim Preserve CA As Array (STAGE,RANK_1,RANK_1)
Redim Preserve FA As Array (STAGE,RANK_1,RANK_2)
Start refill stage on auxiliary matrices
For CNT_1 = 1 To RANK_1
LOC_1 = SUPPORT (CNT_1)
For CNT_2 = 1 To RANK_1
LOC_2 = SUPPORT (CNT_2)
CA (STAGE, CNT_1, CNT_2) = CG (STAGE, LOC_1, LOC_2)
Next CNT_2
For CNT_3 = 1 To RANK_2
FA (STAGE, CNT_1, CNT_2) = CG (STAGE, LOC_1, CNT_3)
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 86
Benito Moya Fernndez
Next CNT_3
Next CNT_1
Diagonalization and composition
First step Up to Down
For CNT_1 = 1 To RANK_1
Multiplying factor
FACTOR = CA (STAGE, CNT_1+1; CNT_1) / CA (STAGE, CNT_1, CNT_1)
Auxiliary coefficients matrix diagonalization
For CNT_2 = CNT_1 To RANK_1
CA (STAGE, CNT_1+1, CNT_2) = CA ( STAGE, CNT_1+1, CNT_2)
(FACTOR * CA (STAGE, CNT_1, CNT_2))
Next CNT_2
Auxiliary forces matrix composition
For CNT_2 = CNT_1 To RANK_2
FA (STAGE, CNT_1+1, CNT_2) = FA ( STAGE, CNT_1+1, CNT_2)
(FACTOR * FA (STAGE, CNT_1, CNT_2))
Next CNT_2
Next CNT_1
Second step Down to Up
For CNT_1 = RANK_1 To 1 DownCount
Multiplying factor
FACTOR = CA (STAGE, CNT_1-1; CNT_1) / CA (STAGE, CNT_1, CNT_1)

Auxiliary coefficients matrix diagonalization
For CNT_2 = RANK_1 to 1
CA (STAGE, CNT_1-1, CNT_2) = CA ( STAGE, CNT_1-1, CNT_2)
(FACTOR * CA (STAGE, CNT_1, CNT_2))
Next CNT_2
Auxiliary forces matrix composition
For CNT_2 = CNT_1 To RANK_2
FA (STAGE, CNT_1-1, CNT_2) = FA ( STAGE, CNT_1-1, CNT_2)
(FACTOR * FA (STAGE, CNT_1, CNT_2))
Next CNT_2
Next CNT_1
Reactions vs forces solution
For CNT_1 = 1 To RANK_1
Multiplying factor
FACTOR = - (CA (STAGE, CNT_1; CNT_1)) Note de negative sign
Auxiliary forces matrix solution
For CNT_2 = 1 To RANK_2
FA (STAGE, CNT_1, CNT_2) = FA ( STAGE, CNT_1, CNT_2) / FACTOR
Next CNT_2
Next CNT_1
End Sub

Finally we can solve directly all reactions, because now we have a reduced system like:

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 87
Benito Moya Fernndez

Note: System shown as example is a structure with four nodes; two of these nodes (Nodes 1
and 2) are supports.

Now we can show all reactions like a function from all forces on the structure, dont forget that
each force shown is a combination from all forces from all beams connected to node, each one
with its evolution function. In fact each force in forces vector is a combination of four factors,
each factor is a multiplication for each evolution function, so each reaction will have a similar
combination of all forces, and the final reactions vector must have a 3D structure.



This 3D reactions vector is an intermediate variable, that we use only for solve the matrix we
have really interested:

|| || || |

| ||

We must get a unique matrix for left side in the equation, and we can do that because we can
get all components form all forces, to get a combination that shows all and each one of
reactions, dont forget again that all values in forces vector are known, only the parameter t
(Time) is unknown. Well, not exactly unknown, we will fix it in a step after.

We can get reaction in functions of forces and addition of forces and reaction only in a one
step, to fill the FG_CALC matrix. This matrix appears like a unique matrix on the left side in the
equation.
We can make it easier if we separate the process in three steps, first step is get a coefficient
matrix for each reaction R1, R2, R3, R4 Rn; we will get a vector of reaction matrices, each one of
these reaction matrices will have two dimensions. First dimension will be 4; the coefficient
number for each evolution function that exists in each nodal force, second dimension will be
the number of nodal forces (three times the number of nodes in the structure). A three
dimensional representation for that appears like:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 88
Benito Moya Fernndez

Each box is the value (Result from multiplying the coefficient in FA matrix by the
corresponding value from FG matrix) that multiplies the function f(t).

Second step is to transform each one from these reaction matrices in a simplified matrix with
four factors (each factor multiplying one function f(t)). Be careful with reactions components,
each reaction has three components (one in each axis X, Y and Z) each one of these
components has also four factors (one for each evolution function). So we will obtain a two
dimensions matrix for each reaction (A matrix 3 x 4). Then we can add only factors that affects
the same component (Fx1 + Fx2 + + Fxn ; Fy1 + Fy2 + + Fyn ; Mz1 + Mz2 + + Mzn ). Finally we
get a 3D matrix for all reactions like:

It seems difficult, but dont forget that we know all values for FG and FA matrices, so we only
need take care with numeric values and when and where we need add.

Finally as step 3, we can compose a reaction matrix similar to forces matrix, to prepare de
addition of both matrices.

In our example matrices (Four nodes with two supports), developed representation for a
single stage will be:
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 89
Benito Moya Fernndez

Both matrices have the same size, so the addition is a direct operation.

If you remember, at the program beginning, we have defined the general reactions matrix in
the same way that general forces matrix, so now we can fill the corresponding stage with the
values from auxiliary matrix 2. Take care with reactions position.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 90
Benito Moya Fernndez
Subroutine for those three steps will be:

Sub AUX_CALC2 (STAGE) Auxiliary calculations sub-routine 2
Auxiliary variables definition
Declare RANK_1, RANK_2, RANK_3 As Integer
Declare LOC_1, LOC_2, LOC_3 As Integer
Declare CNT_1, CNT_2, CNT_3 As Integer
Declare FACTOR As Real
Declare AUX_1, AUX_2 As Array (6,6,4) Of Real = 0
Select a rank for arrays
RANK_1 = SUPPORT.ELEMENTS_NUMBER
RANK_2 = FORCES.ELEMENTS_NUMBER
RANK_3 = NODES.ELEMENTS_NUMBER
Resize auxiliary matrices
Redim AUX_1 As Array (RANK_1, RANK_2, 4)
Redim AUX_2 As Array (RANK_1, 3, 4)
Start calculations on auxiliary matrices to solve reactions solution
Step 1, fill the AUXILIARY MATRIX 1
For CNT_1 = 1 To RANK_1
For CNT_2 = 1 To RANK_2
FACTOR = FA (STAGE, CNT_1, CNT_2)
For CNT_3 = 1 to 4
AUX_1(CNT_1, CNT_2, CNT_3) =
FACTOR * FG (STAGE, CNT_2, CNT_3)
Next CNT_3
Next CNT_2
Next CNT_1
Step 2, compact components from reactions on AUXILIARY MATRIX 2
to obtain a 3 x 4 matrix for each reaction
For CNT_1 = 1 To RANK_1
For CNT_2 = 1 To RANK_3
LOC_1 = ((CNT_2 1) * 3) + 1
LOC_2 = ((CNT_2 1) * 3) + 2
LOC_3 = ((CNT_2 1) * 3) + 3
For CNT_3 = 1 To 4
AUX_2 (CNT_1, 1 , CNT_3) =
AUX_2 (CNT_1, 1 , CNT_3) +
AUX_1 (CNT_1, LOC_1 , CNT_3) +
AUX_2 (CNT_1, 2 , CNT_3) =
AUX_2 (CNT_1, 2 , CNT_3) +
AUX_1 (CNT_1, LOC_2 , CNT_3) +
AUX_2 (CNT_1, 3 , CNT_3) =
AUX_2 (CNT_1, 3 , CNT_3) +
AUX_1 (CNT_1, LOC_3 , CNT_3) +
Next CNT_3
Next CNT_2
Next CNT_1
Step 3, put components from AUXILIARY MATRIX 2 on to reactions matrix
For CNT_1 = 1 To RANK_1
LOC_1 = SUPPORT (CNT_1)
LOC_2 = Int((CNT_1 1)/3)
LOC_3 = ((CNT_1 1) Mod 3) + 1
For CNT_2 = 1 To 4
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 91
Benito Moya Fernndez
RG (STAGE, LOC_1, CNT_2) = AUX_2(LOC_2, LOC_3, CNT_2)
Next CNT_2
Next CNT_1
End Sub

Now we can do the addition between forces and reactions, in a separately routine for more
clarity.
In most of programing languages we can make directly the matrix addition with entire matrices
in a unique sentence like:
FA_CALC (STAGE) = RG (STAGE) + FG (STAGE)
But is clearer and better for program understanding do that with a routine.
Although reaction matrix has many elements equal to zero, we will scroll through all elements,
because is easier to program.
Sub FINAL_FORCES (STAGE) Final forces to solve displacements
Declare CNT_1, CNT_2 As Integer
Declare TOP As Integer
TOP = RG.ELEMENTS_NUMBER
For CNT_1 = 1 To TOP
For CNT_2 = 1 To 4
FA_CALC (STAGE, CNT_1, CNT_2) =
FG (STAGE, CNT_1, CNT_2) + GR (STAGE, CNT_1, CNT_2)
Next CNT_2
Next CNT_1
End Sub

And finally we can solve all displacements, because we know all values in equation:
|| || || |

| ||

Now left side in this equation is a numeric value in function of (t); on the right side matrix KD is
a diagonal matrix, so for each line on the equations system have an expression like:



Or directly:


We can solve this in a single routine, but we must take care with previous stages in structure
collapse, because:
- Each time a new articulation appears, the displacements will evolve in a different
manner.
- In each stage we must keep the time lapse without previous time intervals.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 92
Benito Moya Fernndez
- In each stage we must add previous displacements as a constant.
So we have stored all times a new articulations appears, in a variable called PHASES, and we
have stored too all previous displacements. Now we must scroll through previous
displacements to add those values to new displacements in present stage.

We can calculate displacements for actual stage separately, and after add calculated values to
previous displacements.

In all cases we need three variables, these variables that we have created at program
beginning; DG_CALC that contains current calculated values; DG_PREV, that contains the
addition from all previous stages calculated displacements; and DG_TOTAL that contains
added values from previous displacements and displacements from current stage.


First step is to calculate previous displacements addition:

Sub DISPLACEMENTS_PREVIOUS (STAGE)
Declare CNT_1, CNT_2, CNT_3 As Integer
Declare TOP_1 As Integer
TOP_1 = 3 * NODES.ELEMENTS_NUMBER
DG_PREV = 0
If STAGE > 1 Then
For CNT_1 = 1 To TOP_1
For CNT_2 = 1 To STAGE-1
DG_PREV (CNT_1) = DG (CNT_2,CNT_1)
Next CNT_2
Next CNT_1
End If
End Sub

Now we can to calculate the current displacements, we must program this sub-routine
thinking in use it into a loop, foreseen that we need increase the current value while a new
articulation not appears. We start new stage calculations in a lapse equal to zero; dont need
keep previous values for time lapse, because those time lapses are kept in absolute previous
displacements. We must take care with zero values on stiffness matrix where a support is
present, so we skip calculations on those locations.

Sub DISPLACEMENTS_CURRENT (STAGE, LAPSE)
Declare CNT_1, CNT_2 As Integer
Declare TOP_1 As Integer.
Declare LAPSE As Real
Declare LOC As Integer
Declare IS_SUPPORT As Boolean
TOP_1 = 3 * NODES.ELEMENTS_NUMBER
DG_ACT = 0
For CNT_1 = 1 To TOP_1
LOC = (Int((CNT_1 1)/3)) + 1
If STRUCTURE (LOC).TYPE = False Then
For CNT_2 = 1 To 4
DG_ACT (CNT_1) = DG_ACT (CNT_1) +
(LAPSE * FA_CALC (STAGE, CNT_1, CNT_2)
Next CNT_2
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 93
Benito Moya Fernndez
DG_ACT (CNT_1) = DG_ACT (CNT_1) / KG_D (STAGE, CNT_1, CNT_1)
End If
Next CNT_1
End Sub

And finally we need add both values.

Sub DISPLACEMENTS_TOTAL ()
Declare CNT_1, TOP As Integer
TOP = 3 * NODES.ELEMENST_NUMBER
For CNT_1 = 1 To TOP
DG_TOTAL (CNT_1) = DG_PREV (CNT_1) + DG_ACT (CNT_1)
Next CNT_1
End Sub.

When we have all displacements for all nodes, we must to do the reverse way; this means
calculate the moment on each node. Remember, the moment given by rotation on each node
is a hyper-static moment.

First step is to find an own system for each beam. Remember, we can build for each beam a
system like:

In this system we know displacements in general axis, but the transformation to local axis is
very easy, is apply only a rotation, this rotation is the same that we applied in general
displacements construction, but changing sense (This means changing the sign of angle).


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 94
Benito Moya Fernndez
The matrix for change the reference will be:
0 0 0 0
0 0 0 0
[

]
0 0 1 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0 0 1 (40)

Note that is a similar matrix than expression (15), but changing the sign from a. In fact is the
transposed matrix from expression (15), because:





This is the only change we must to do, because we know the local stiffness matrix for a single
beam (It is defined by beam parameters), and forces and torques are incognita that we can
solve directly.
Now we must to establish a sequence to do that:
1) To extract the corresponding displacements for a beam.
2) Rotate the displacements to match the local reference system.
3) Compose the local stiffness matrix.
4) Solve forces and torques for local system.
5) Use local torques to solve local demands on beam.
We must to do these steps for all beams, and many times while a new articulation doesnt
appears.
So we will program each step in a separate subroutine, and we will include all subroutine in a
larger loop.
We will foresee any needed variable, taking care with where and how to declare them.
Remember: We only need the place and the time where a new articulation appears.
The place to re-define the general stiffness matrix after that we can test if the structure has
collapsed.
If the structure has not collapsed, we need the time lapse to keep a new stage in our process.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 95
Benito Moya Fernndez
Needed variables are:
- LOCATION_NA : Location for a new articulation
- TIME_NA : Time lapse for a new articulation
- NA_FLAG : Flag that indicates if a new articulation is present.
- NA_IEN : Flag that indicates if a new articulation is on an existing
Node
- NA_BEAM : Beam number where a new articulation appears
We will declare these variables at program beginning; we can add the next lines:
Declare LOCATION_NA As NODE (*)
Declare TIME_NA As Real
Declare NA_FLAG; NA_IEN As Boolean
Declare NA_BEAM As Integer

(*) Note: Way to declare a new articulation like a NODE type? A new articulation can appear in
an existing node, but it can appear in the middle of a beam. If the last option becomes we
need a complete node definition (X position, Y position and node type) to put it in to nodes
array.
Remember, we only declare a variable when we need it, if in a subroutine dont appears a
declaration for a used variable it means that this variable is declared before.
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 96
Benito Moya Fernndez
Then the sequence will be:
Sub EXTRACT (BEAM)
Sub routine to extract data from a beam and compose matrix
Declare START_N, END_N As Integer Variables for node number
Declare START_T, END_T As Integer Variables for node type
Declare START_X, START_Y, END_X, END_Y As real Variables for nodes location
Declare LOC_1, LOC_2, LOC_3, LOC_4, LOC_5, LOC_6 As Integer
Declare DELTA_X, DELTA_Y, L_BEAM, A_BEAM As Real Variables for calculations
Declare YOUNG, AREA, INERTIA As Real Variables from beam
Declare PRF As TEXT
Declare GIR As Boolean
Declare CASE_KL As Integer Case stiffness matrix

Note: Local stiffness matrix and local displacements matrix an local forces
matrices are defined in the large loop subroutine, they arent defined here


Extract nodes number and type for a beam
START_N = BEAMS_SET (BEAM).STA_NODE
START_T = BEAMS_SET (DEAM).STA_TYPE
END_N = BEAMS_SET (BEAM).END_NODE
END_T = BEAMS_SET (BEAM).END_TYPE
PRF = BEAMS_SET (BEAM).PROFILE
Extract data from database
Find First in MATERIALS Where MAT = MATERIAL
YOUNG = MATERIALS.YOUNG_MODULUS
Find First in PROFILES Where PROFILE = PRF
If GIR = 0 Then
INERTIA = PROFILES.MIY
Else
INERTIA = PROFILES.MIZ
End If
AREA = PROFILES.AREA
Extract nodes location from each node
START_X = STRUCTURE (START_N).POSITION_X
START_Y = STRUCTURE (START_N).POSITION_Y
END_X = STRUCTURE (END_N).POSITION_X
END_Y = STRUCTURE (END_N).POSITION_Y
Extract displacements from corresponding nodes
LOC_1 = ((START_N 1) *3) + 1
LOC_2 = ((START_N 1) *3) + 2
LOC_3 = ((START_N 1) *3) + 3
LOC_4 = ((END_N 1) *3) + 1
LOC_5 = ((END_N 1) *3) + 2
LOC_6 = ((END_N 1) *3) + 3
NODE_D_G (1) = DG_TOTAL (LOC_1)
NODE_D_G (2) = DG_TOTAL (LOC_2)
NODE_D_G (3) = DG_TOTAL (LOC_3)
NODE_D_G (4) = DG_TOTAL (LOC_4)
NODE_D_G (5) = DG_TOTAL (LOC_5)
NODE_D_G (6) = DG_TOTAL (LOC_6)
Calculating angle between beam and general reference system and beam length
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 97
Benito Moya Fernndez
DELTA_X = END_X START_X
DELTA_Y = END_Y START_Y
A_BEAM = Atan (DELTA_Y / DELTA_X)
L_BEAM = SqrRoot (DELTA_X * DELTA_X + DELTA_Y * DELTA_Y)
Applying rotation to displacements
NODE_D_L (1) = Cos (A_BEAM) * NODE_D_G (1) Sin (A_BEAM) * NODE_D_G (2)
NODE_D_L (2) = Sin (A_BEAM) * NODE_D_G (1) + Cos (A_BEAM) * NODE_D_G (2)
NODE_D_L (3) = NODE_D_G (3)
NODE_D_L (4) = Cos (A_BEAM) * NODE_D_G (4) Sin (A_BEAM) * NODE_D_G (5)
NODE_D_L (5) = Sin (A_BEAM) * NODE_D_G (4) + Cos (A_BEAM) * NODE_D_G (5)
NODE_D_L (6) = NODE_D_G (6)
Selecting corresponding stiffness matrix
If START_T = 0 And END_T = 0 Then Both nodes rigid
CASE_KL = 1
End If
If START_T = 0 And END_T = 1 Then Start rigid and End articulated
CASE_KL = 2
End If
If START_T = 1 And END_T = 0 Then Start articulated and End rigid
CASE_KL = 3
End If
If START_T = 1 And END_T = 1 Then Both nodes articulated
CASE_KL = 4
End If
Calculation from according matrix
MRL=0
Select Case CASE_KL
Case 1
MRL(1;1) = YOUNG*AREA/BEAM_L
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
MRL(2;2) = (12*YOUNG*INERTIA)/(BEAM_L^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(3;3) = 4*YOUNG*INERTIA/BEAM_L
MRL(6;6) = MRL(3;3)
MRL(3;6) = MRL(3;3)/2
MRL(6;3) = MRL(3;6)
MRL(2;3) = (6*YOUNG*INERTIA)/(BEAM_L^2)
MRL(3;2) = MRL(2;3)
MRL(2;6) = MRL(2;3)
MRL(6;2) = MRL(2;3)
MRL(3;5) = - MRL(2;3)
MRL(5;3) = MRL(3;5)
MRL(6;5) = MRL(3;5)
MRL(5;6) = MRL(3;5)
End Case 1
Case 2
MRL(1;1) = YOUNG*AREA/BEAM_L
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 98
Benito Moya Fernndez
MRL(4;1) = MRL(4;1)
MRL(2;2) = (3*YOUNG*INERTIA)/(BEAM_L^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(3;3) = 3*YOUNG*INERTIA/BEAM_L
MRL(2;3) = (3*YOUNG*INERTIA)/(BEAM_L^2)
MRL(3;2) = MRL(2;3)
MRL(3;5) = - MRL(2;3)
MRL(5;3) = MRL(3;5)
End Case 2
Case 3
MRL(1;1) = YOUNG*AREA/BEAM_L
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
MRL(2;2) = (3*YOUNG*INERTIA)/(BEAM_L^3)
MRL(5;5) = MRL(2;2)
MRL(2;5) = - MRL(2;2)
MRL(5;2) = MRL(2;5)
MRL(6;6) = 3*YOUNG*INERTIA/BEAM_L
MRL(5;6) = (3*YOUNG*INERTIA)/(BEAM_L^2)
MRL(6;5) = MRL(5;6)
MRL(2;6) = - MRL(5;6)
MRL(6;2) = MRL(2;6)
End Case 3
Case 4
MRL(1;1) = YOUNG*AREA/BEAM_L
MRL(4;4) = MRL(1;1)
MRL(1;4) = - MRL(1;1)
MRL(4;1) = MRL(4;1)
End Case 4
End Select
Force FX1
LFM (1) = MRL (1;1) * NODE_D_L (1) + MRL (4;4) * NODE_D_L (4)
Force FY1
LFM (2) = MRL (2;2) * NODE_D_L (2) + MRL (2;3) * NODE_D_L (3) +
MRL (2;5) * NODE_D_L (5) + MRL (2;6) * NODE_D_L (6)
Momentum MZ1
LFM (3) = MRL (3;2) * NODE_D_L (2) + MRL (3;3) * NODE_D_L (3) +
MRL (3;5) * NODE_D_L (5) + MRL (3;6) * NODE_D_L (6)
Force FX2
LFM (1) = MRL (1;1) * NODE_D_L (1) + MRL (4;4) * NODE_D_L (4)
Force FY2
LFM (2) = MRL (2;2) * NODE_D_L (2) + MRL (2;3) * NODE_D_L (3) +
MRL (2;5) * NODE_D_L (5) + MRL (2;6) * NODE_D_L (6)
Momentum MZ2
LFM (3) = MRL (3;2) * NODE_D_L (2) + MRL (3;3) * NODE_D_L (3) +
MRL (3;5) * NODE_D_L (5) + MRL (3;6) * NODE_D_L (6)
End Sub

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 99
Benito Moya Fernndez
Now we have solved local forces on a beam, we have got the values from vector:



||




With this we can solve the stress demand on a beam, as we have explained in section 4.2.2
To do this we can use all tools explained in section 4.2.2, first is the superposition theorem but,
before apply it we can check if the beam is loaded. If there are not load defined, we can
compare directly the biggest momentum in both nodes with beam. With this we can save
much time.
If a load is defined on a beam, we can use the corresponding expression from 4.2.2, depends
the load (punctual or distributed). For a punctual load we will use expression n (32), for a
distributed load we will use expressions n (36) and (39) (We will use the X value from
expression 39 in to expression 36).
We can do that with a subroutine:
Sub SOLVE_BEAM (BEAM, YS)
Declare WP; YS As Real Plastic moment and yield strength
Declare MAX_MZ; BEAM_MS As Real Max. torque and beam strength
Declare P1; P2; INC As Real Load parameters on beam
Declare STA; END As Integer Node numbers
Declare LEN; DX; DY As Real Beam length
Declare SX; SY; EX; EY As Real Nodes position
Declare REF As Boolean Reference system for load
Declare MAX_P As Real Max. torque position
Load parameter from beam and nodes to calculation variables
P1 = BEAMS_SET (BEAM).VALUE_1
P2 = BEAMS_SET (BEAM).VALUE_2
INC = BEAMS_SET (BEAM).INCIDENCE
REF = BEAMS_SET (BEAM).REFERENCE
STA = BEAMS_SET (BEAM).STA_NODE
END = BEAMS_SET (BEAM).END_NODE
SX = STRUCTURE (STA).POSITION_X
SY = STRUCTURE (STA).POSITION_Y
EX = STRUCTURE (END).POSITION_X
EY = STRUCTURE (END).POSITION_Y
Compose a value for Plastic Strength to make easier comparisons
WP = BEAMS_SET (BEAM).WP
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 100
Benito Moya Fernndez
BEAM_MS = WP * YS
Beam length calculation
DX = EX SX
DY = EY SY
LEN = SqrRoot ((DX*DX) + (DY*DY))
For loaded and unloaded beams we need to check if
a new articulation appears on any beam node
If Abs(LFM (3)) > BEAM_MS And BEAMS_SET (BEAM).STA_TYPE = 0 Then
NA_FLAG = True
LOCATION_NA = NODES.(BEAMS_SET(BEAM).STA_NODE)
NA_IEN = True
End If
If Abs(LFM (6)) > BEAM_MS And BEAMS_SET (BEAM).STA_TYPE = 0 Then
NA_FLAG = True
LOCATION_NA = NODES.(BEAMS_SET(BEAM).END_NODE)
NA_IEN = True
End If
Loaded beam
Select Case BEAMS_SET (BEAM).LOAD
Case punctual load - Expression 37 from section 4.2.2
Case 1
LOCATION_NA.POSITION_X = EX + (DX * (VALUE_2/LEN))
LOCATION_NA.POSITION_Y = EY + (DY * (VALUE_2/LEN))
LOCATION_NA.NODE_TYPE = False
MAX_MZ = (LFM(3) ( P2*((LFM(3)+LFM(6))/LEN)) + (P1 * Sin (INC) *
(P2 (P2 * P2 / LEN))
Case uniformly distributed load - Expressions 36 and 39 from section 4.2.2
Case Else
Select the lowest Px parameter as start node
If P2 < P1 Then The lowest load is on the ending node
First we calculate the Max. Mz position with 39
MAX_P = (LEN/2) * ((P2 + 2 * P1)/(2*P2 + P1))
LOCATION_NA.POSITION_X = EX (DX * (MAX_P/LEN))
LOCATION_NA.POSITION_Y = EY (DY * (MAX_P/LEN))
LOCATION_NA.NODE_TYPE = False
And after we apply this value in 36
MAX_MZ = (LFM(6) + (MAX_P * ((LFM(3)+LFM(6))/LEN))-
((P2 * Sin(INC))*(((LEN*MAX_P) (MAX_P*MAX_P))/2))1
((P1 P2) * Sin(INC))*((LEN*MAX_P/6) (MAX_P*MAX_P/3)))
Else The lowest load is on the starting node
First we calculate the Max. Mz position with 39
MAX_P = (LEN/2) * ((P1 + 2 * P2)/(2*P1 + P2))
LOCATION_NA.POSITION_X = SX + (DX * (MAX_P/LEN))
LOCATION_NA.POSITION_Y = SY + (DY * (MAX_P/LEN))
LOCATION_NA.NODE_TYPE = False
And after we apply this value in 36
MAX_MZ = (LFM(3) (MAX_P * ((LFM(3)+LFM(6))/LEN))+
((P1 * Sin(INC))*(((LEN*MAX_P) (MAX_P*MAX_P))/2))+
((P2 P1) * Sin(INC))*((LEN*MAX_P/6) (MAX_P*MAX_P/3)))
End If
End Select
Now we make the comparison
If Abs(MAX_MZ)>BEAM_MS Then
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 101
Benito Moya Fernndez
NA_FLAG = True
NA_BEAM = BEAM
End If
End Sub

At this moment we have solved, in separately sub-routines, these questions:

- General stiffness matrix diagonalization
- General forces in general axis reference system
- General forces for a single beam
- Maximum torque (moment) in a beam and its comparison with maximum beam
strength
- Indicate where and when a new articulation appears; and stores these data in to a
variable to proceed to check the structure integrity.

But still need to do something, we need:

- To store the new articulation position and re-compose stiffness matrix for next
calculations.
- If the new articulation is not on existing node, we need re-compose the stiffness
matrix and local forces matrix for previous calculations too.

If the new articulation is present in an existing node, we only need to store where and when
appears, and re-compose the stiffness matrix for next step. In fact this means define a new
structure stage which a corresponding node in a beam marked like articulation; because we
construct the stiffness matrix each time. The routine to do that is:

Note that the stage is the current stage, so we need to re-size all matrices to one more unit in
stages range, to foresee the next stage; in addition we must to re-size the other matrices in 3
units each supplementary range for each stage.

Sub NEW_AIEN (STAGE, NA_BEA, NA_NODE)
New Articulation In Existing Node
Declare CNT_1 As Integer Counter for loop
Re-dimensioning beams collection to a one more stage
Redim Preserve BEAMS_SET(STAGE + 1 ,BEAMS_NUMBER)
Assign the same elements from previous stage to new stage
For CNT_1 = 1 To BEAMS_NUMBER
BEAMS_SET(STAGE + 1, CNT_1) = BEAMS_SET(STAGE,CNT_1)
Next
Modify the node in corresponding beam to an articulation
If BEAMS_SET(STAGE,NA_BEA).STA_NODE = NA_NODE Then
BEAMS_SET(STAGE + 1,NA_BEA).STA_TYPE = 1
End If
If BEAMS_SET(STAGE,NA_BEA).END_NODE = NA_NODE Then
BEAMS_SET(STAGE + 1,NA_BEA).END_TYPE = 1
End If
End Sub

With that we have defined a new stage in the structure, because we have changed one node
type for one beam; the next iteration in calculations will take in count this change and the new
stiffness matrix will be different.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 102
Benito Moya Fernndez
If the new articulation appears in the middle of a beam the re-composition for all data
structures is more complicated. For the structure definitions we need change the nodes matrix
and the beams matrix.

But we need re-compose previous data for calculations, because we need add previous stages
forces and displacements to get the current stage forces and displacements to arrive to a new
articulation and at the end of iterations to get the plastic collapse.

The first part from these three operations is to change the structure definitions:

Sub NEW_AINN (STAGE, NA_BEA, NA_NODE) New Articulation In New Node
Declare CNT_1 As Integer Counter for loop
Declare BEAM_1, BEAM_2 As Beam Beams for new structure
Declare L1, L2 As Real Length for beams calculation
Declare LEN; DX; DY As Real Original beam length
Declare DX1; DY1; DX2; DY2 As Real New beams distances
Declare SX; SY; EX; EY; IX; IY As Real Nodes position
Declare MQ As Real Intermediate Load
Re-dimensioning the beams matrix and the nodes matrix to add a new element
NODES_NUMBER = NODES_NUMBER + 1
BEAMS_NUMBER = BEAMS_NUMBER + 1
Redim Preserve STRUCTURE(NODES_NUMBER)
STRUCTURE(Last_Element).POSITION_X = LOCATION_NA.POSITION_X
STRUCTURE(Last_Element).POSITION_Y = LOCATION_NA.POSITION_Y
STRUCTURE(Last_Element).NODE_TYPE = LOCATION_NA.NODE_TYPE
Redim Preserve BEAMS_SET(STAGE+1, BEAMS_NUMBER)
For CNT_1 = 1 To BEAMS_NUMBER
BEAMS_SET(STAGE + 1, CNT_1) = BEAMS_SET(STAGE , CNT_1)
Next
Divide the beam in two parts and store data in BEAM_1 and BEAM_2
BEAM_1 = BEAMS_SET(STAGE,NA_BEA)
BEAM_2 = BEAMS_SET(STAGE,NA_BEA)
STA = BEAMS_SET (NA_BEA).STA_NODE
END = BEAMS_SET (NA_BEA).END_NODE
SX = STRUCTURE (STA).POSITION_X
SY = STRUCTURE (STA).POSITION_Y
EX = STRUCTURE (END).POSITION_X
EY = STRUCTURE (END).POSITION_Y
IX = LOCATION_NA.POSITION_X
IY = LOCATION_NA.POSITION_Y
DX = EX SX
DY = EY SY
LEN = SqrRoot ((DX*DX) + (DY*DY))
DX1 = IX SX
DY1 = IY SY
L1 = SqrRoot ((DX1*DX1) + (DY1*DY1))
DX2 = EX IX
DY2 = EY IY
L2 = SqrRoot ((DX2*DX2) + (DY2*DY2))
BEAM_1.END_NODE = STRUCTURE.LAST_ELEMENT
BEAM_2.STA_NODE = STRUCTURE.LAST_ELEMENT
If BEAM_SET(STAGE, NA_BEA).LOAD = 1 Then
BEAM_1.LOAD = 1
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 103
Benito Moya Fernndez
BEAM_2.LOAD = 0
BEAM_2.VALUE_1 = 0
BEAM_2.VALUE_2 = 0
End If
If BEAM_SET(STAGE, NA_BEA).LOAD > 1 Then
MQ = BEAM_1.VALUE_1 + (L1*((BEAM_1.VALUE_2 BEAM_1.VALUE_1)/LEN))
BEAM_1.VALUE_2 = MQ
BEAM_2.VALUE_1 = MQ
End If
Put the new beams values in to beams set matrix
For CNT_1 = 1 To STAGE + 1
BEAMS_SET(CNT_1,NA_BEA) = BEAM_1
BEAMS_SET(CNT_1,Last_Element) = BEAM_2
Next
BEAMS_SET(STAGE + 1,NA_BEA).END_TYPE = 1
BEAMS_SET(STAGE + 1,Last_element).STA_TYPE = 1
End Sub

Now we have a new nodes set (A new structure definition) and a new beams set defined on it.
Next step is to re-compose the stiffness matrix with the new structure data; This step is very
easy because we have defined the sub-routine in a way to re-use it in many program locations.
Is for that we have re-sized the KG matrix and FG matrix outside the sub-routine (Remember
the sub-routine RECOMPOSE in page 66).

Sub RECOMPOSE_KG (STAGE)
Recompose KG when a new node appears
Declare RANK As Integer Range for square stiffness matrix
Declare G_CNT As Integer General loop counter
Declare G_TOP As Integer General loop limit
Re-sizing general stiffness matrix
RANK = STRUCTURE.ELEMENTS_NUMBER * 3
G_TOP = STAGE + 1
Call REDIMENSION (G_TOP;RANK)
For G_CNT = 1 To STAGE
Call KG_FG_CALC (G_CNT)
Next
End Sub

With subroutine above we have a new set of stiffness matrices and a new set of general forces
matrices too, and then we can recalculate all forces for previous stages.

Sub RECOMPOSE_FG (STAGE)
Recompose FG when a new node appears
Declare G_CNT As Integer General loop counter
Declare G_TOP As Integer General loop limit
Declare LAP_TIME As Real Time Lapses
For G_CNT = 1 To STAGE
LAP_TIME = LAPSES (STAGE)
Call DIAGONAL (STAGE)
Call AUX_CALC1 (STAGE)
Call AUX_CALC2 (STAGE)
Call FINAL_FORCES (STAGE)
Call DISPLACEMENTS_PREVIOUS (STAGE)
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 104
Benito Moya Fernndez
Call DISPLACEMENTS_CURRENT (STAGE; LAP_TIME)
NEXT
End Sub

Now we must to combine all those sub-routines in a larger loop routine.

Sub COMPLET_CALCULATIONS
Complete collapse calculation routine
Declare GCNT1 As Integer General counter
Declare STOP As Boolean Stop flag
CURRENT_ITER = 0 Current iteration number
STAGE = 1 Initializing to first stage
CPE = False Collapse not present
NA_FLAG = False No new articulation
STOP = False No STOP order
Large cycle routine Calculations until collapse appears or iterations limit matched
Do
Call KG_FG_CALC (STAGE)
Call DIAGONAL (STAGE)
Call COLLAPSE (STAGE)
If CPE = False Then
Call AUX_CALC1(STAGE)
Call AUX_CALC2(STAGE)
Call FINAL_FORCES(STAGE)
Call DISPLACEMENTS_PREVIOUS(STAGE)
LAPSE = 0
While NA_FLAG = False And MAX_ITER > CURRENT_ITER Do
LAPSE = LAPSE + INCREMENT
Call DISPLACEMENTS_CURRENT (STAGE, LAPSE)
For GCNT1 = 1 To BEAMS_NUMBER
Call EXTRACT(STAGE,GCNT1)
Call SOLVE_BEAM (STAGE,BEAM, YS)
Next
CURRENT_ITER = CURRENT_ITER + 1
Went
TIMES_LAPSES(STAGE) = LAPSE
If NA_FLAG = True Then
If NA_IEN = True Then
Call NEW_AIEN (STAGE,NA_BEAM,NA_NODE)
Else
Call NEW_AINN (STAGE,NA_BEAM,NA_NODE)
Call RECOMPOSE_KG(STAGE)
Call RECOMPOSE_FG(STAGE)
End If
End If
End If
If MAX_ITER <= CURRENT_ITER Or CPE = True Then
STOP = True
End If
Until STOP = True
End Sub

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 105
Benito Moya Fernndez
With this we have finished sub-routines in pseudo-code, but as pseudo-code keep in mind, if
you choose a different programing language, the following things:
- Direct translation to code can be impossible, because some syntactical structures may
be very different
- Some program structures may be inexistent in chosen programing language, so be
careful with chosen language.
- Is possible that some explained operations must be made with complementary
subroutines.


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 106
Benito Moya Fernndez
7.2.3 Presentation of solutions
In a simple way, on calculations we have all intermediate data between initial structure and
plastic collapsed structure. The most important are displacements, forces and torques on each
place from our structure, but we have other data too.
We can show all of these data at any moment, but for available computer capabilities
(Memory, CPU speed, Graphic Card, etc), and timing schedule; we have programed only a
few part of them.
In this way we will show:
- Graphical collapse scheme:


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 107
Benito Moya Fernndez
- Matrices:



- Text data:





Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 108
Benito Moya Fernndez
7.3 Programming
The software is programmed in Visual Studio R-2010 platform. Although we have a new Visual
Studio R-2012, we prefer the older release for two reasons:
- An older version is more stable, because all bugs were solved through service packs
launched by Microsoft.
- The newest 2012 version doesnt have anything strictly needed for our application, in
other hand is more exigent in resources (memory, processor capabilities, etc), and
this is a handicap for available computers.
In this platform we have chosen Visual Basic as programming language, also for diverse
reasons:
- Programming is friendlier in this language than others implemented.
- Calculations requirements not justifies other languages with more calculation power
like Visual C, but more complicated to use.
- Visual Basic is an intuitive and easy to use programming language, so the programming
time is lower than other languages.
- Migration process to other language is easy, because release 2010 is integrated in to
.NET platform
In Visual Studio.NET, in all releases, there are many APIs (Application Programming Interface)
that make easier programming, freeing the programmer to implement code for certain tasks,
these tasks are usually run automatically by the operating system, such as: Opening and
closing windows redraw, saved to disk, printing, communications, etc. ... the list is very
extensive and there is no need to list it all herself.
In the same way, in this chapter, we will pass without details on some aspects, such example:
How to draw the structure on screen, how to print, how to access to database, etc. ; all those
points are programmed, but they have not relevance for our purpose. We will stop, off course
on matrix assembly, calculation routines, and over all things with relevance on results, and
how to solve proposed solution in pseudo-code.
We show only the programed solution, the explanation of the solution is made on previous
chapter. No own Visual Basic codes are shown (Forms and controls main code, that is
generated directly by program suit and normally the programmer dont has control on it)
Many differences can be appreciated between the pseudo-code and final code, because the
pseudo-code is only a structural general presentation from final code. Final code depends on
grammatically particularities from selected programming language.
The code is presented in a separate document, in landscape format because the statements in
any programming language normally are very large, and a portrait presentation may be so
much short for some routines.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 109
Benito Moya Fernndez
7.3.1 Data base programming
As we have explained above, data base is programmed in Microsoft Access 2007-2010.
You can see a screenshot from design view, from a data table:

This means that you can edit data base directly in Microsoft Access, but is not recommended
because the program makes a total data verification in run time, if you program directly a
structure, a beam, a node; or any other program data, you are skipping all verifications, and
this could cause a program failure.
You can see a complete data base description below:
Tabla: BEAMS
Propiedades

AlternateBackShade:


95


AlternateBackThemeColorInd 1
AlternateBackTint: 100 BackShade: 100
BackTint: 100 DatasheetForeThemeColorInd 0
DatasheetGridlinesThemeColo 3 DateCreated: 16/10/2013 23:43:51
DefaultView: 2 DisplayViewsOnSharePointSit 1
FilterOnLoad: Falso GUID: {guid {76D60CC1-CB07-4D2
9CC9-C6ECFD735642}}
HideNewField: Falso LastUpdated: 17/10/2013 0:02:26
NameMap: Datos binarios largos OrderByOn: Falso
OrderByOnLoad: Verdadero Orientation: De izquieda a derecha
PublishToWeb: 1 ReadOnlyWhenDisconnected: Falso
RecordCount: 0 ThemeFontIndex: 1
TotalsRow: Falso Updatable: Verdadero
Columnas
Nombre Tipo Tamao
Id Entero largo 4
PROJECT Texto 255
STA_NODE Entero largo 4
STA_TYPE S/No 1
END_NODE Entero largo 4
END_TYPE S/No 1
PROFILE Texto 255
ROTATED S/No 1
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 110
Benito Moya Fernndez
LOAD Entero largo 4
INCIDENCE Doble 8
REFERENCE S/No 1
VALUE_1 Doble 8
VALUE_2 Entero largo 4
FUNCTION Entero largo 4
Tabla: MATERIAL
Propiedades

AlternateBackShade:


95


AlternateBackThemeColorInd 1
AlternateBackTint: 100 BackShade: 100
BackTint: 100 DatasheetForeThemeColorInd 0
DatasheetGridlinesThemeColo 3 DateCreated: 15/10/2013 21:15:30
DefaultView: 2 DisplayViewsOnSharePointSit 1
FilterOnLoad: Falso GUID: {guid {DAC02146-30B4-479
AC1D-B620BD340D66}}
HideNewField: Falso LastUpdated: 15/10/2013 21:18:28
NameMap: Datos binarios largos OrderByOn: Falso
OrderByOnLoad: Verdadero Orientation: De izquieda a derecha
PublishToWeb: 1 ReadOnlyWhenDisconnected: Falso
RecordCount: 0 ThemeFontIndex: 1
TotalsRow: Falso Updatable: Verdadero
Columnas
Nombre Tipo Tamao
Id Entero largo 4
FAMILY Texto 255
CODE Texto 255
YOUNG Doble 8
STRESS Doble 8
DENSITY Doble 8
Tabla: NODES
Propiedades

AlternateBackShade:


95


AlternateBackThemeColorInd 1
AlternateBackTint: 100 BackShade: 100
BackTint: 100 DatasheetForeThemeColorInd 0
DatasheetGridlinesThemeColo 3 DateCreated: 16/10/2013 23:40:35
DefaultView: 2 DisplayViewsOnSharePointSit 1
FilterOnLoad: Falso GUID: {guid {50480E97-0873-4C99
BB0D-3601E521CB72}}
HideNewField: Falso LastUpdated: 17/10/2013 0:36:53
NameMap: Datos binarios largos OrderByOn: Falso
OrderByOnLoad: Verdadero Orientation: De izquieda a derecha
PublishToWeb: 1 ReadOnlyWhenDisconnected: Falso
RecordCount: 0 ThemeFontIndex: 1
TotalsRow: Falso Updatable: Verdadero
Columnas
Nombre Tipo Tamao
Id Entero largo 4
PROJECT Texto 255
NUMBER Entero largo 4
POS_X Doble 8
POS_Y Doble 8
TYPE S/No 1
Tabla: PROFILES
Propiedades

AlternateBackShade:


95


AlternateBackThemeColorInd 1
AlternateBackTint: 100 BackShade: 100
BackTint: 100 DatasheetForeThemeColorInd 0
DatasheetGridlinesThemeColo 3 DateCreated: 15/10/2013 21:01:04
Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 111
Benito Moya Fernndez
DefaultView: 2 DisplayViewsOnSharePointSit 1
FilterOnLoad: Falso GUID: {guid {AD0027C4-39DE-4FB
86D2-9639DB142C31}}
HideNewField: Falso LastUpdated: 17/10/2013 0:36:38
NameMap: Datos binarios largos OrderByOn: Falso
OrderByOnLoad: Verdadero Orientation: De izquieda a derecha
PublishToWeb: 1 ReadOnlyWhenDisconnected: Falso
RecordCount: 0 ThemeFontIndex: 1
TotalsRow: Falso Updatable: Verdadero
Columnas
Nombre Tipo Tamao
Id Entero largo 4
SERIES Texto 255
SIZE Texto 255
DESC Texto 255
AREA Doble 8
Y_INERTIA Doble 8
Z_INERTIA Doble 8
Y_PR Doble 8
Z_PR Doble 8
WEIGHT Doble 8
IMAGE Texto 255
Tabla: PROJECTS
Propiedades

AlternateBackShade:


95


AlternateBackThemeColorInd 1
AlternateBackTint: 100 BackShade: 100
BackTint: 100 DatasheetForeThemeColorInd 0
DatasheetGridlinesThemeColo 3 DateCreated: 15/10/2013 21:21:45
DefaultView: 2 DisplayViewsOnSharePointSit 1
FilterOnLoad: Falso GUID: {guid {BBEB6D17-8FA8-4EA
B5CB-2C5A18C99B0B}}
HideNewField: Falso LastUpdated: 16/10/2013 23:40:31
NameMap: Datos binarios largos OrderByOn: Falso
OrderByOnLoad: Verdadero Orientation: De izquieda a derecha
PublishToWeb: 1 ReadOnlyWhenDisconnected: Falso
RecordCount: 0 ThemeFontIndex: 1
TotalsRow: Falso Updatable: Verdadero
Columnas
Nombre Tipo Tamao
Id Entero largo 4
PROJECT Texto 255
AUTOR Texto 255
INICIO Fecha/Hora 8
ULTIMO Fecha/Hora 8
MATERIAL Texto 255

This data description is shown only for academic purpose, in scope to understand the program
procedure.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 112
Benito Moya Fernndez
7.3.2 Application programming
As explained at the beginning, the application is developed in Microsoft Visual Basic 2010.
Programming environment start page is shown below:

Once the project opened, you can program code, like shown below:


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 113
Benito Moya Fernndez
Or you can design all forms with developing tolls included in programing environment:

This report is not intended for program teaching, and is only shown as general information.
If some people are interested in learn more about Microsoft Visual Basic, or any other
programing language, please refers to the programmers manual.



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 114
Benito Moya Fernndez
8. Bibliography
- Mecnica de estructuras Libro 1: Resistencia de materiales
Miguel Cervera Ruiz y Elena Blanco Daz
Edicions UPC
- Mecnica de estructuras Libro 2: Mtodos de anlisis
Miguel Cervera Ruiz y Elena Blanco Daz
Edicions UPC
- Mecnica de medios continuos para ingenieros
Xavier Oliver Olivella y Carlos Agelet de Saracbar Bosch
Edicions UPC
- Anlisis de estructuras Mtodos clsico y matricial (3 Ed.)
James K. Nelson, Jr (Western Michigan University), Jack C. McCormac (Clemson
University)
Alfaomega Grupo Editor, S.A. de C.V.
- Prontuario de perfiles CELSA Versin 1.01
- Manual avanzado de Microsoft Visual Basic 2008
Jorge Serrano Prez
ANAYA Multimedia
- Paso a Paso Visual Basic 2010
James Foxal
ANAYA Multimedia
- Paso a Paso Access 2010
Joyce Cox y Joan Lambert
ANAYA Multimedia
- MySQL 5.0 Reference Manual
http://dev.mysql.com/doc/refman/5.0/es/index.html
- Visual Basic Reference Manual
http://msdn.microsoft.com/en-us/library/sh9ywfdk.aspx
- SQL Server Languaje Reference
http://msdn.microsoft.com/en-us/library/sh9ywfdk.aspx





Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 115
Benito Moya Fernndez
9. Quick Start Guide

Once the program starts, the main menu appears on computer screen:

In this menu you can chose one of three options:
- Project : For open an existing project or create a new one.
- Maintenance : The maintenance tools form appears
- Exit : To close program
9.1 Project
In this form you can start to create a structure directly, or choose to open an existing one.






Sub-folders

Elements
selection

Drawing area

Actions
selection
Buttons
Check boxes
Cursor
current position
Zoom value Zoom bar

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 116
Benito Moya Fernndez
Sub folders allow you to select different ways to edit/create a structure, and allow you to set
the environment variables:

First step to create a new structure is give the Project Data, when you push on NEW button,
the project data window appears:

In this window you can put the typical project data:
- Project code
- Project description
- Project author
Start date is selected by computer but you can change this data.
Once you push on Create button. You will return to the editing window, but this time all
controls will be enabled.
Environment
variables

Text
mode

Graphic
mode

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 117
Benito Moya Fernndez

The process to create a structure is:

- We must create at least two nodes. You can create more if you want, but two is the
minimum (We need two nodes for define a beam).
- After that we can create a beam between these two nodes.
- And at the end you can create nodes and beams at yourself.

To create an element in the drawing area you need select first which element do you want to
create, clicking on desired element in the box Elements. After that, each time you click on
drawing area you will create the selected element. When you want create a beam, you need
click twice on drawing area, one time for start node, and a second time for ending node.

When you are creating a node, the new node window appears:



The coordinates showed in the boxes are where you have clicked on drawing area, now you
can correct and/or adjust it. You can select too if the node is a support or not.
When you have created all desired nodes, you can start with beams creation.

Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 118
Benito Moya Fernndez

Above you can see the screen with only three nodes, now you can select a beam in Elements
box and try to create a beam.
You must click twice on drawing area, each time on a different existing node. Once these two
correct clicks are made, the beam creation window appears.

Here you can choose all beam parameters:
- Profile
- Start and end node (You can change any node, but remember: must to be different
nodes)
- Node junction type (Junction to node are rigid by default)
- Load defined on the beam (At least a beam in the structure must to have a load)
Once the structure is finished, you can launch calculations.




Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 119
Benito Moya Fernndez
When calculations finish, the results windows appears. Here you can see a graphical
representation from each collapse stage.

Or select different matrices from different stages:






Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 120
Benito Moya Fernndez
Or see different data from calculation process,

You can select an alone beam to show too:


Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 121
Benito Moya Fernndez
10. ANNEX I - Budget
The budget for this program is intended to commercialize and sale the program to engineering
offices and its maintenance in future new releases and capabilities.
In this way the budget contains all business expenses for the first year.
The program is intended for sale by web, all other way may be through multi-software
distributors or engineering offices.
10.1 Developing expenses
Description U Unit price Total
Personal portable computer (Inter Core i7) 2 u. 700,- 1.400,-
Microsoft Visual Basic 2010 professional 2 u. 550,- 1.100,-
Microsoft Office 2010 professional 2 u. 300,- 600,-
Work hours (Investigation and preliminary) 300 u. 25,- 7.500,-
Work hours (Programming and debugging) 600 u. 25,- 15.000,-
Diverse 1 u 1.000,- 1.000,-

- Total developing expenses: 26.600,-
10.2 Business expenses
Description U Unit price Total
Commercial expenses 1 u. 8.000,- 8.000,-
Domain registration and web hosting 1 u. 450,- 450,-
Wage rates (*) 1 u. 39.760,- 39.760,-

- Total business expenses: 48.210,-
(*)Note: The wage rates means one people dedicated full time to commercial and/or technical
support to costumers.
10.3 Sale price
Description Total
Developing expenses 26.600,-
Business expenses 48.210,-
TOTAL EXPENSES 74.810,-
Expected sales first year 100,-U
Cost price 748,10
Gross margin 20,00%
Minimum sale price 935,13



Escola Universitaria dEnginyeria Tcnica Industrial de Barcelona
Degree Final Job Software for Plastic Collapse Computation in Structures
Cristina Hernndez Olivar 122
Benito Moya Fernndez
11. ANNEX II Code in Visual Basic

The code is presented in a separate document, in landscape format because the statements in
any programming language normally are very large, and a portrait presentation may be so
much short for some routines. Please refer to volume II for program code.

Das könnte Ihnen auch gefallen