Manual for the MATLAB program to solve the 2D truss
1. Two-dimensional truss analysis program calculates and displays the stiffness matrix and
displacement and internal forces for each element.
The file that you currently are reading is guiding you in reading the codes of program for
the analysis of two-dimensional trusses which have written in MATLAB language.
Features of this program:
The inputs will receive via an Excel file which is called TRUSS.xlsx. The advantage
of this type of data receiving is that if you have a mistake in Entering truss
parameters you don't need to start the time consuming process of input data again
from beginning. Rather just modify the Excel file and then "just run the program
again.
Not using functions and there are only two loops in it for simplicity.
Calculation and displaying the displacements and support reaction forces and
stiffness matrix for the entire structure and also calculates and displays the stiffness
matrix and displacement and internal forces for each element separately.
Display date and time at the end of each analysis.
Saving the answers of the program in 2 separate txt files with the name of
Reactions.txt and Displacements.txt and the end of analysis.
I mention the performance of each line of program in front of the command.
This program has the ability to solve the 2D trusses with different E and Cross
section Area.
This program is Useless for the trusses that their supports are inclined I
emphasized that the supports of the truss are inclined not the truss itself.
2. In the Excel file which we enter inputs for the program I insert some numbers as an
example and solve the program by myself in another pdf file and then we let the program
to run with those numbers and compare our answer with computer answers.
For solving this problem first step is to determine the degree of freedom (dof) in our truss
from node 1 in this way that we call horizontal degree of freedom in node 1 as U1 and the
vertical one U2 and the horizontal dof in node 2 as U3 and the vertical one as U4, the
horizontal dof in node 3 as U5 and the vertical one as U6 and name them in this way till
the last node.
Note:
it is necessary to name the dof in the mentioned way because I design the stiffness
matrix according to these dof and their names.
We consider the direction of the elements from left to right and from top to bottom
and for inclined elements from bottom to top and we consider this law when we insert the
start node and end node of each element in excel file.
In excel file the units should be related to each other for example if we assume that
the coordination of the nodes calculated in Cm then the cross section area must be in
Cm2.
When we insert the loads in the excel file if one load direction is in opposite to its
related dof we assume that load as negative number.
The loads must be applied on the nodes in the same way that their related dof is.
For the output of this program pay attention to the pictures below: