You are on page 1of 11

ESCUELA POLITCNICA NACIONAL

ANLISIS MATRICIAL
ALUMNO: MARCO REYES
FECHA: 2012-12-03

1.- EJERCICIO DEL EXAMEN :


>> diary Ej_Ex_1
>> help M_KMP
Matriz K de Elemento Marco Plano
[K]=M_KMP(A,I,L,E)
A = Area
I = Inercia
L = Longitud
E = Modulo de Elasticidad
>> Eh=2e6; Ea=21e6;
>> Avc=0.5^2; Ivc=0.5^4/12;
>> [K1]=M_KMP(Avc,Ivc,6,Eh);
>> help M_TMP
Matriz de Transformacion para el elemento Marco Plano
[T]=M_TMP(alfa)
Dato= alfa(angulo con respecto a x del elemento)

>> [T1]=M_TMP(0); [T5]=M_TMP(90);


>>
KV=T1*K1*T1'; KC=T5*K1*T5';
>>
>>
>> %Elementos tensores (Armadura Plana)
>> At=pi*0.25^2/4;
>> help M_KAP
Matriz K de Elemento Armadura Plana
[K]=M_KAP(A,L,E)
A = Area de la seccin transversal
L = Logitud
E = Modulo de Elasticidad
>> [kt]=M_KAP(At,6*sqrt(2),Ea);
>> help M_TAP
Matriz de Transformacion
[T]=M_TAP(alfa)
Dato= alfa(angulo con respecto a x del elemento)

>> [T7]=M_TAP(45); [T8]=M_TAP(-45);


>> K7=T7*kt*T7'; K8=T8*kt*T8';
>>
>> %Ensamble
>> %Vectores de Ensamble
>> lee1=[15 16 1 2 3 4];
>> lee2=[2 3 4 5 6 7];
>> lee3=[5 6 7 11 12 13];
>> lee4=[11 12 13 20 21 14];
>> lee5=[17 18 19 5 6 7];
>> lee6=[5 6 7 8 9 10];
>> lee7=[2 3 8 9];
>> lee8=[8 9 11 12];
>> S=zeros(14);
>> help Ens

Programa Ensamble de la Matriz de Rigidez de un elemento en la Matriz de Rigidez del Sistema


lee = Vector de Ensamble
K = Matriz de Rigidez del Elemento
S = Matriz de Rigidez del Sistema
ngdl = Numero de grados de libertad de la estructura
>> [S]=Ens(lee1,KV,S,14);
>> [S]=Ens(lee2,KV,S,14);
>> [S]=Ens(lee3,KV,S,14);
>> [S]=Ens(lee4,KV,S,14);
>> [S]=Ens(lee5,KC,S,14);
>> [S]=Ens(lee6,KC,S,14);
>> [S]=Ens(lee7,K7,S,14);
>> [S]=Ens(lee8,K8,S,14);
>> aep=[0 12 12 0 12 -12]';
>> AEP=T1*aep;
>> help Acum2
Programa Acumular Acciones de empotramiento para ensamblar SAEP
o Acciones Finales para comprobar el Equilibrio
[PR]=Acum2(lee,Ae,PR)

>> SAEP=zeros(21,1);
>> [SAEP]=Acum2(lee1,AEP,SAEP);
>> [SAEP]=Acum2(lee2,AEP,SAEP);
>> [SAEP]=Acum2(lee3,AEP,SAEP);
>> [SAEP]=Acum2(lee4,AEP,SAEP);
>> Delta=S\-SAEP(1:14); format long
>> %Desplazamiento de elementos en coordenadas globales
>> Delta(21)=0
Delta =
-0.002401504823903
0.000115151176828
-0.001693785805204
0.000500116745203
0.000000000000000
-0.000802075686179
-0.000000000000000
0.000000000000000
-0.001262680393489
-0.000000000000000
-0.000115151176828
-0.001693785805204
-0.000500116745203
0.002401504823903
0
0
0
0
0
0
0
>> [SAEP]=Acum2(lee1, AEP, SAEP);
>> [SAEP]=Acum2(lee2, AEP, SAEP);
>> [SAEP]=Acum2(lee3, AEP, SAEP);
>> [SAEP]=Acum2(lee4, AEP, SAEP);
>> Delta(21)=0
>> D1=Delta(lee1);
>> D2=Delta(lee2);
>> D3=Delta(lee3);
>> D4=Delta(lee4);
>> D5=Delta(lee5);

>> D6=Delta(lee6);
>> D7=Delta(lee7);
>> D8=Delta(lee8);
>> Dmp=[D1 D2 D3 D4 D5 D6];
>> Dt=[D7 D8];
>> d1=T1'*D1; d2=T1'*D2; d3=T1'*D3; d4=T1'*D4; d5=T5'*D5; d6=T5'*D6; d7=T7'*D7; d8=T8'*D8;
>> a1=K1*d1+aep; a2=K1*d2+aep; a3=K1*d3+aep; a4=K1*d4+aep; a5=K1*d5; a6=K1*d6;
>> a7=kt*d7; a8=kt*d8;
>> a_mp=[a1 a2 a3 a4 a5 a6]; a_t=[a7 a8];

a_mp =
Columns 1 through 4
-9.595931402294797 9.595931402294788 9.595931402294792 -9.595931402294783
14.580179742550282 9.772042547139881 14.227957452860128 9.419820257449707
-0.000000000000002 13.924925107270715 11.811591369129729 13.924925107270711
9.595931402294797 -9.595931402294788 -9.595931402294792 9.595931402294783
9.419820257449718 14.227957452860119 9.772042547139872 14.580179742550293
-13.924925107270717 -11.811591369129729 -13.924925107270711 -0.000000000000004
Columns 5 through 6
66.839640514899401 38.383725609179109
0.000000000000000 0.000000000000005
-0.000000000000001 -0.000000000000000
-66.839640514899401 -38.383725609179109
-0.000000000000000 -0.000000000000005
-0.000000000000002 -0.000000000000000
>> a_t
a_t =
-27.141392665454333 -27.141392665454347
0
0
27.141392665454333 27.141392665454347
0
0
>> diary off

MATRIZ DE RIGIDEZ DE ARMADURA PLANA


function [K]=M_KAP(A,L,E)
%Matriz K de Elemento Armadura Plana
% [K]=M_KAP(A,L,E)
% A = Area de la seccin transversal
% L = Logitud
% E = Modulo de Elasticidad
Ra=A*E/L;
K= [Ra 0 -Ra 0
0 0 0 0
-Ra 0 Ra 0
0 0 0 0];
end
MATRIZ DE TRANSFORMACIN DE ARMADURA PLANA
function [T]=M_TAP(alfa)
%Matriz de Transformacion
% [T]=M_TAP(alfa)
% Dato= alfa(angulo con respecto a x del elemento)
%
alf_r=pi*alfa/180; C=cos(alf_r); S=sin(alf_r);
T=[C -S 0 0
S C 0 0
0 0 C -S
0 0 S C];
end

MATRIZ DE RIGIDEZ DE MARCO PLANO


function [K]=M_KMP(A,I,L,E)
%Matriz K de Elemento Marco Plano
% [K]=M_KMP(A,I,L,E)
% A = Area
% I = Inercia
% L = Longitud
% E = Modulo de Elasticidad
k=4*E*I/L; a=2*E*I/L; b=6*E*I/L^2; t=12*E*I/L^2; Ra=A*E/L;
K= [Ra 0 0 -Ra 0 0
0 t b 0 -t b
0 b k 0 -b a
-Ra 0 0 Ra 0 0
0 -t -b 0 t -b
0 b a 0 -b k];
end
MATRIZ DE TRANSFORMACIN DE MARCO PLANO
function [T]=M_TMP(alfa)
%Matriz de Transformacion para el elemento Marco Plano
%
[T]=M_TMP(alfa)
%
Dato= alfa(angulo con respecto a x del elemento)
%
alf_r=pi*alfa/180; C=cos(alf_r); S=sin(alf_r);
T=[C -S 0 0 0 0
S C 0 0 0 0
0 0 1 0 0 0
0 0 0 C -S 0
0 0 0 S C 0
0 0 0 0 0 1];
end

SUBRRUTINA DE ENSAMBLE
function [S]=Ens(lee,K,S,ngdl)
%Programa Ensamble de la Matriz de Rigidez de un elemento en la Matriz de Rigidez del Sistema
% lee = Vector de Ensamble
% K = Matriz de Rigidez del Elemento
% S = Matriz de Rigidez del Sistema
% ngdl = Numero de grados de libertad de la estructura
ng=length(lee);
for i=1:ng
ii=lee(i);
if ii>0
if ii<=ngdl
for j=1:ng
jj=lee(j);
if jj>0
if jj<=ngdl
S(ii,jj)=S(ii,jj)+K(i,j);
end
end
end
end
end
end
end
SUBRRUTINA DE ACUMULAR ACCIONES
function [PR]=Acum2(lee,Ae,PR)
%Programa Acumular Acciones de empotramiento para ensamblar SAEP
%o Acciones Finales para comprobar el Equilibrio
% [PR]=Acum2(lee,Ae,PR)
%
ng=length(lee);
for i=1:ng
ii=lee(i);
PR(ii)=PR(ii)+Ae(i);
end
end

>> diary Port_2A


>> %Rigidez de elementos
>> help M_KMP
Matriz K de Elemento Marco Plano
[K]=M_KMP(A,I,L,E)
A = Area
I = Inercia
L = Longitud
E = Modulo de Elasticidad
>> E=2e6; Ea=21e6;
>> [k1]=M_KMP(0.3*0.5,0.3*0.5^3/12,4,E);
>> [k4]=M_KMP(0.3*0.5,0.3*0.5^3/12,5,E);
>> help M_TMP
Matriz de Transformacion para el elemento Marco Plano
[T]=M_TMP(alfa)
Dato= alfa(angulo con respecto a x del elemento)

>> [T1]=M_TMP(90);
>> [T4]=M_TMP(36.87);
>> [T5]=M_TMP(-36.87);
>> help M_KAP
Matriz K de Elemento Armadura Plana
[K]=M_KAP(A,L,E)
A = Area de la seccin transversal
L = Logitud
E = Modulo de Elasticidad
>> [k8]=M_KAP(pi*0.2^2/4,8,Ea);
>> help M_TAP
Matriz de Transformacion
[T]=M_TAP(alfa)
Dato= alfa(angulo con respecto a x del elemento)

>> [T8]=M_TAP(0);
>> K1=T1*k1*T1'; K4=T4*k4*T4'; K5=T5*k4*T5'; K8=T8*k8*T8';
>> S=zeros(15); B=zeros(24,1);
>> %Vectores de ensamble`
>> lee1=[16 17 18 1 2 3];
>> lee2=[19 20 21 7 8 9];
>> lee3=[22 23 24 13 14 15];
>> lee4=[1 2 3 4 5 6];
>> lee5=[4 5 6 7 8 9];
>> lee6=[7 8 9 10 11 12];
>> lee7=[10 11 12 13 14 15];

>> lee8=[1 2 7 8];


>> lee9=[7 8 13 14];
>> help Ens
Programa Ensamble de la Matriz de Rigidez de un elemento en la Matriz de Rigidez del Sistema
lee = Vector de Ensamble
K = Matriz de Rigidez del Elemento
S = Matriz de Rigidez del Sistema
ngdl = Numero de grados de libertad de la estructura
>> [S]=Ens(lee1,K1,S,15);
>> [S]=Ens(lee2,K1,S,15);
>> [S]=Ens(lee3,K1,S,15);
>> [S]=Ens(lee4,K4,S,15);
>> [S]=Ens(lee6,K4,S,15);
>> [S]=Ens(lee5,K5,S,15);
>> [S]=Ens(lee7,K5,S,15);
>> [S]=Ens(lee8,K8,S,15);
>> [S]=Ens(lee9,K8,S,15);
>> aep4=[4*4/2*(3/5) 4*4/2*(4/5) 4*4^2/12 4*4/2*(3/5) 4*4/2*(4/5) -4*4^2/12]';
>> aep5=[4*4/2*(-3/5) 4*4/2*(4/5) 4*4^2/12 4*4/2*(-3/5) 4*4/2*(4/5) -4*4^2/12]';
>> AEP4=T4*aep4; AEP5=T5*aep5;
>> help Acum2
Programa Acumular Acciones de empotramiento para ensamblar SAEP
o Acciones Finales para comprobar el Equilibrio
[PR]=Acum2(lee,Ae,PR)
>> [B]=Acum2(lee4,-AEP4,B);
>> [B]=Acum2(lee6,-AEP4,B);
>> [B]=Acum2(lee5,-AEP5,B);
>> [B]=Acum2(lee7,-AEP5,B);
>> %Resolver el sistema de ecuaciones
>> format long, Delta=S\B(1:15)
Delta =
1.0e-03 *
-0.095185143613405
-0.215408335898447
-0.540274664365655
0.028128017210729
-0.728242195893575
0.096585961825855
0.000000000000000
-0.422516661535079
-0.000000000000000
-0.028128017210728
-0.728242195893575
-0.096585961825855
0.095185143613406
-0.215408335898447
0.540274664365655

>> %Acciones en los elementos


>> Delta(24)=0;
>> D1=Delta(lee1); D2=Delta(lee2); D4=Delta(lee4); D5=Delta(lee5); D8=Delta(lee8);
>> d1=T1'*D1; d2=T1'*D2; d4=T4'*D4; d5=T5'*D5; d8=T8'*D8;
>> a1=k1*d1; a2=k1*d2; a4=k4*d4+aep4; a5=k4*d5+aep5; a8=k8*d8;
>> a8c=[a8' 0 0]';
>> aresult=[a1 a2 a4 a5 a8c]
aresult =
Columns 1 through 4
16.155625192383496 31.688749615130902 17.343039145127108 7.556288469418189
-1.712449105294840 0.000000000000002 7.187230779309433 5.861769194930818
-1.911448506486590 0.000000000000001 3.599806832629262 5.474708268558628
-16.155625192383496 -31.688749615130902 -7.743039145127109 -17.156288469418190
1.712449105294840 -0.000000000000002 5.612769220690568 6.938230805069183
-3.599806832629263 0.000000000000000 -5.474708268558628 -5.433423302672678
Column 5
-7.849614882552547
0
7.849614882552547
0
0
0
>> %Comprobar equilibrio
>> A1=T1*a1; A2=T1*a2; A4=T4*a4; A5=T5*a5; A8=T8*a8;
>> PR=zeros(24,1);
>> [PR]=Acum2(lee1,A1,PR);
>> [PR]=Acum2(lee2,A2,PR);
>> [PR]=Acum2(lee4,A4,PR);
>> [PR]=Acum2(lee5,A5,PR);
>> [PR]=Acum2(lee8,A8,PR);
>> PR
PR =
0.000000000000007
-0.000000000000007
-0.000000000000001
0
0.000000000000008
0
-1.712449105294848
-15.844374807565458
-5.433423302672678
0
0
0

0
0
0
1.712449105294841
16.155625192383496
-1.911448506486590
-0.000000000000000
31.688749615130902
0.000000000000001
0
0
0
>> diary off

MATRIZ DE RIGIDEZ
function [K]=M_KAP(A,L,E)
%Matriz K de Elemento Armadura Plana
% [K]=M_KAP(A,L,E)
% A = Area de la seccin transversal
% L = Logitud
% E = Modulo de Elasticidad
Ra=A*E/L;
K= [Ra 0 -Ra 0
0 0 0 0
-Ra 0 Ra 0
0 0 0 0];
end
MATRIZ DE TRANSFORMACIN
function [T]=M_TAP(alfa)
%Matriz de Transformacion
% [T]=M_TAP(alfa)
% Dato= alfa(angulo con respecto a x del elemento)
%
alf_r=pi*alfa/180; C=cos(alf_r); S=sin(alf_r);
T=[C -S 0 0
S C 0 0
0 0 C -S
0 0 S C];
end

MATRIZ DE RIGIDEZ
function [K]=M_KMP(A,I,L,E)
%Matriz K de Elemento Marco Plano
% [K]=M_KMP(A,I,L,E)
% A = Area

% I = Inercia
% L = Longitud
% E = Modulo de Elasticidad
k=4*E*I/L; a=2*E*I/L; b=6*E*I/L^2; t=12*E*I/L^2; Ra=A*E/L;
K= [Ra 0 0 -Ra 0 0
0 t b 0 -t b
0 b k 0 -b a
-Ra 0 0 Ra 0 0
0 -t -b 0 t -b
0 b a 0 -b k];
end
MATRIZ DE TRANSFORMACIN
function [T]=M_TMP(alfa)
%Matriz de Transformacion para el elemento Marco Plano
%
[T]=M_TMP(alfa)
%
Dato= alfa(angulo con respecto a x del elemento)
%
alf_r=pi*alfa/180; C=cos(alf_r); S=sin(alf_r);
T=[C -S 0 0 0 0
S C 0 0 0 0
0 0 1 0 0 0
0 0 0 C -S 0
0 0 0 S C 0
0 0 0 0 0 1];
End

SUBRRUTINA DE ENSAMBLE
function [S]=Ens(lee,K,S,ngdl)
%Programa Ensamble de la Matriz de Rigidez de un elemento en la Matriz de Rigidez del Sistema
% lee = Vector de Ensamble
% K = Matriz de Rigidez del Elemento

% S = Matriz de Rigidez del Sistema


% ngdl = Numero de grados de libertad de la estructura
ng=length(lee);
for i=1:ng
ii=lee(i);
if ii>0
if ii<=ngdl
for j=1:ng
jj=lee(j);
if jj>0
if jj<=ngdl
S(ii,jj)=S(ii,jj)+K(i,j);
end
end
end
end
end
end
end
SUBRRUTINA DE ACUMULAR ACCIONES
function [PR]=Acum2(lee,Ae,PR)
%Programa Acumular Acciones de empotramiento para ensamblar SAEP
%o Acciones Finales para comprobar el Equilibrio
% [PR]=Acum2(lee,Ae,PR)
%
ng=length(lee);
for i=1:ng
ii=lee(i);
PR(ii)=PR(ii)+Ae(i);
end
end

You might also like