0% found this document useful (0 votes)
18 views1 page

Matriz Rigidez (Octave)

The document outlines a MATLAB script for calculating the stiffness matrix of a structural system using given lengths, angles, material properties, and cross-sectional areas. It includes the computation of local stiffness matrices for each element and their transformation into a global stiffness matrix. The script also defines the connectivity between nodes and calculates the degrees of freedom for each element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Matriz Rigidez (Octave)

The document outlines a MATLAB script for calculating the stiffness matrix of a structural system using given lengths, angles, material properties, and cross-sectional areas. It includes the computation of local stiffness matrices for each element and their transformation into a global stiffness matrix. The script also defines the connectivity between nodes and calculates the degrees of freedom for each element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1 %%%%%INTRODUCCI�N DE DATOS %%%%%

2 clc
3 long = [4 3 5.2 5.2 4 3 2.6 2.3 2.5];
4 ang = [90 90 0 0 90 90 0 0 90];
5 E = 21e6*[1 1 1 1 1 1 1 1 1];
6 A4040 = 0.4*0.4;
7 A3030 = 0.30*0.3;
8 A2050 = 0.2*0.50;
9 area = [A4040 A3030 A2050 A2050 A4040 A3030 ...
10 A2050 A2050 A4040];
11 I4040 = 0.4*0.4^3/12;
12 I3030 = 0.3*0.3^3/12;
13 I2050 = 0.2*0.5^3/12;
14
15 inercia = [I4040 I3030 I2050 I2050 I4040 I3030 ...
16 I2050 I2050 I4040];
17
18 conexion = [1 1 2;
19 2 2 3;
20 3 2 5;
21 4 3 6;
22 5 4 5;
23 6 5 6;
24 7 5 7;
25 8 7 9;
26 9 8 9];
27 %%%%%MATRIZ DE RIGIDEZ DE CADA ELEMENTO %%%%%
28 for i=1:9
29 EAL = E(i)*area(i)/long(i);
30 EI12 = 12*E(i)*inercia(i)/long(i)^3;
31 EI6 = 6*E(i)*inercia(i)/long(i)^2;
32 EI4 = 4*E(i)*inercia(i)/long(i);
33 EI2 = 2*E(i)*inercia(i)/long(i);
34
35 Klocal=[EAL 0 0 -EAL 0 0;
36 0 EI12 EI6 0 -EI12 EI6;
37 0 EI6 EI4 0 -EI6 EI2;
38 -EAL 0 0 EAL 0 0;
39 0 -EI12 -EI6 0 EI12 -EI6;
40 0 EI6 EI2 0 -EI6 EI4];
41
42 cs = cosd(ang(i));
43 sn = sind(ang(i));
44 B = [cs sn 0 0 0 0;
45 -sn cs 0 0 0 0;
46 0 0 1 0 0 0;
47 0 0 0 cs sn 0;
48 0 0 0 -sn cs 0;
49 0 0 0 0 0 1];
50 Kelem(:,:,i) = B'*Klocal*B;
51 endfor
52 %%%%% CALCULO DE GRADOS DE LIBERTAD %%%%%
53 for i=1:9
54 deNudo = conexion(i,2);
55 aNudo = conexion(i,3);
56 GDL(i,:) = [deNudo*3-2 deNudo*3-1 deNudo*3 ...
57 aNudo*3-2 aNudo*3-1 aNudo*3];
58 endfor
59
60 %%% Ensamblar la matriz de rigidez Global %%%
61 Kglobal = zeros(27,27);
62
63 for i=1:9
64 GDLelem = GDL(i,:);
65 Kglobal(GDLelem,GDLelem) = Kelem(:,:,i)+Kglobal(GDLelem,GDLelem);
66 endfor
67 Kglobal
68
69

You might also like