Docsity

Código para armaduras en Matlab: Ejercicio segundo parcial, Apuntes de Análisis Estructural

Toggle sidebar
bg1
CÓDIGO PARA ARMADURAS REALIZADO EN MATBLAB
% File: truss_ejercicio_segundo parcial_data.m
%
% The following variables are declared as global in order
% to be used by all the functions (M-files) constituting
% the program
%
global nnd nel nne nodof eldof n
global geom connec prop nf load
%
format short e
%
%%%%%%%%%%%%%% Beginning of data input %%%%%%%%%%%%%%%%
%
nnd = 8; % Number of nodes:
nel = 13; % Number of elements:
nne = 2; % Number of nodes per element:
nodof =2; % Number of degrees of freedom per node
eldof = nne*nodof; % Number of degrees of freedom
% per element
%
% Nodes coordinates X and Y
geom=zeros(nnd,2);
geom = [0. 0. ; ... % X and Y coord. node 1
3. 0. ; ... % X and Y coord. node 2
6. 0. ; ... % X and Y coord. node 3
9. 0. ; ... % X and Y coord. node 4
12. 0.; ... % X and Y coord. node 5
3. 3. ; ... % X and Y coord. node 6
6. 4.5; ... % X and Y coord. node 7
9. 3. ] % X and Y coord. node 8
% Element connectivity
%
connec = zeros(nel,2);
connec = [1 2 ; ... % 1st and 2nd node of element 1
2 3 ; ... % 1st and 2nd node of element 2
3 4 ; ... % 1st and 2nd node of element 3
4 5 ; ... % 1st and 2nd node of element 4
1 6 ; ... % 1st and 2nd node of element 5
2 6 ; ... % 1st and 2nd node of element 6
2 7 ; ... % 1st and 2nd node of element 7
3 7 ; ... % 1st and 2nd node of element 8
7 4 ; ... % 1st and 2nd node of element 9
4 8 ; ... % 1st and 2nd node of element 10
8 5 ; ... % 1st and 2nd node of element 11
6 7 ; ... % 1st and 2nd node of element 12
7 8 ] ... % 1st and 2nd node of element 13
%
% Geometrical properties
%
% prop(1,1) = E; prop(1,2)= A
%
prop=zeros(nel,2);
prop = [30*10^6 0.045; ... % E and A of element 1
30*10^6 0.045; ... % E and A of element 2
30*10^6 0.045; ... % E and A of element 3
30*10^6 0.045; ... % E and A of element 4
pf3
pf4
pf5

Vista previa parcial del texto

¡Descarga Código para armaduras en Matlab: Ejercicio segundo parcial y más Apuntes en PDF de Análisis Estructural solo en Docsity!

CÓDIGO PARA ARMADURAS REALIZADO EN MATBLAB % File: truss_ejercicio_segundo parcial_data.m % % The following variables are declared as global in order % to be used by all the functions (M-files) constituting % the program % global nnd nel nne nodof eldof n global geom connec prop nf load % format short e % %%%%%%%%%%%%%% Beginning of data input %%%%%%%%%%%%%%%% % nnd = 8; % Number of nodes: nel = 13; % Number of elements: nne = 2; % Number of nodes per element: nodof =2; % Number of degrees of freedom per node eldof = nne*nodof; % Number of degrees of freedom % per element % % Nodes coordinates X and Y geom=zeros(nnd,2); geom = [0. 0. ; ... % X and Y coord. node 1

    1. ; ... % X and Y coord. node 2
    1. ; ... % X and Y coord. node 3
    1. ; ... % X and Y coord. node 4
  1. 0.; ... % X and Y coord. node 5
    1. ; ... % X and Y coord. node 6
  2. 4.5; ... % X and Y coord. node 7
    1. ] % X and Y coord. node 8 % Element connectivity % connec = zeros(nel,2); connec = [1 2 ; ... % 1st and 2nd node of element 1 2 3 ; ... % 1st and 2nd node of element 2 3 4 ; ... % 1st and 2nd node of element 3 4 5 ; ... % 1st and 2nd node of element 4 1 6 ; ... % 1st and 2nd node of element 5 2 6 ; ... % 1st and 2nd node of element 6 2 7 ; ... % 1st and 2nd node of element 7 3 7 ; ... % 1st and 2nd node of element 8 7 4 ; ... % 1st and 2nd node of element 9 4 8 ; ... % 1st and 2nd node of element 10 8 5 ; ... % 1st and 2nd node of element 11 6 7 ; ... % 1st and 2nd node of element 12 7 8 ] ... % 1st and 2nd node of element 1 3 % % Geometrical properties % % prop(1,1) = E; prop(1,2)= A % prop=zeros(nel,2); prop = [3010^6 0.045; ... % E and A of element 1 3010^6 0.045; ... % E and A of element 2 3010^6 0.045; ... % E and A of element 3 3010^6 0.045; ... % E and A of element 4

3010^6 0.02; ... % E and A of element 5 3010^6 0.02; ... % E and A of element 6 3010^6 0.02; ... % E and A of element 7 3010^6 0.02; ... % E and A of element 8 3010^6 0.02; ... % E and A of element 9 3010^6 0.02; ... % E and A of element 10 3010^6 0.02; ... % E and A of element 11 3010^6 0.02; ... % E and A of element 12 30*10^6 0.02] ... % E and A of element 13 % % Boundary conditions % nf = ones(nnd, nodof); % Initialize the matrix nf to 1 nf(1,1) = 0; nf(1,2) = 0; % Prescribed nodal freedom of node 1 nf(5,2) = 0; % Prescribed nodal freedom of node 5 % % Counting of the free degrees of freedom % n=0; for i=1:nnd for j=1:nodof if nf(i,j) ~= 0 n=n+1; nf(i,j)=n; end end end % % loading % load = zeros(nnd, 2); load(2,:)=[0 - 6]; %forces in X and Y directions at node 2 load(3,:)=[0 - 8]; %forces in X and Y directions at node 3 load(4,:)=[0 - 2]; %forces in X and Y directions at node 4 % %%%%%%%%%%%%%%%%%%%%%%% End of input %%%%%%%%%%%%%%%%%%%%%% RESULTADOS OBTENIDOS ******* PRINTING MODEL DATA **************


Number of nodes: 8 Number of elements: 13 Number of nodes per element: 2 Number of degrees of freedom per node: 2 Number of degrees of freedom per element: 4


Node X Y 1, 0000.00, 0000. 2, 0003.00, 0000. 3, 0006.00, 0000. 4, 0009.00, 0000.

Total number of active degrees of freedom, n = 13

******* PRINTING ANALYSIS RESULTS **************

Global force vector F 0

  • 6 0
  • 8 0
  • 2 0 0 0 0 0 0 0

Displacement solution vector: delta


Nodal displacements Node disp_X disp_Y 1, 0.0000000000, 0.000000000 0 2, 0.0000200000, - 0. 3, 0.0000377778, - 0. 4, 0.0000555556, - 0. 5, 0.0000711111, 0. 6, 0.0000858378, - 0. 7, 0.0000266500, - 0. 8, 0.0000058862, - 0.


Members actions element force action 1, 9.00, Tension 2, 8.00, Tension 3, 8.00, Tension 4, 7.00, Tension

5, - 12.73, Compression 6, 4.50, Tension 7, 1.80, Tension 8, 8.00, Tension 9, - 1.80, Compression 10, 3.50, Tension 11, - 9.90, Compression 12, - 10.06, Compression 13, - 7.83, Compression


Members stresses element stress action 1, 200.00, Tension 2, 177.78, Tension 3, 177.78, Tension 4, 155.56, Tension 5, - 636.40, Compression 6, 225.00, Tension 7, 90.14, Tension 8, 400.00, Tension 9, - 90.14, Compression 10, 175.00, Tension 11, - 494.97, Compression 12, - 503.12, Compression 13, - 391.31, Compression