



Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!




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
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.
Global force vector F 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