MATLAB Code for Solving two-dimensional truss
Versión 1.0.0 (8,27 KB) por
Mehdi Ghasri
Solving the truss using the stiffness method.
The steps of solving the truss by the stiffness method:
- Numbering of nodes and elements
- Specifying the length of each element
- Obtaining sin and cosz
- Forming the stiffness matrix of each member
- Forming the total stiffness matrix
- Writing the relationship F = K U in matrix form
- Removing rows and columns that can be removed from the above matrix
- Solve the above matrix and get U or displacements
- Obtaining the stress in each member
- Obtaining support reactions
To use this code, just add the specifications of the truss you want to the Excel file and run the Truss2DD.m file.
Program outputs include:
- Stiffness matrix
- load vector
- Displacement
- Stress
- Reaction
- Truss Shape(black)
- ِDeformed Shape(red)
Outputs for 4Bar-Truss:
load =
0
0
2000
0
0
-25000
0
0
JointDisp =
0
0
0.0027
0
0.0056
-0.0222
0
0
Stress =
1.0e+04 *
0.2000
-2.1875
-0.5208
0.4167
Reaction =
1.0e+04 *
0.2167
0.3125
0.2000
2.1875
0.0000
-2.5000
-0.4167
0
Citar como
Mehdi Ghasri (2024). MATLAB Code for Solving two-dimensional truss (https://www.mathworks.com/matlabcentral/fileexchange/123260-matlab-code-for-solving-two-dimensional-truss), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2022b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0 |