Rama
Rama
Rama
ien=[1 2;2 3;2 4;3 5;4 5;5 6]' % numery wezłów w elementach
% Tablica alokacji
lm=tab_aloc(2,3,lw,ien,le)
% w układzie elementowym
L1=el_length(XY,1,ien);
L2=el_length(XY,2,ien);
L3=el_length(XY,3,ien);
L4=el_length(XY,4,ien);
L5=el_length(XY,5,ien);
L6=el_length(XY,6,ien);
k1=elstif_frame(1,Ee,Ie,Ae,Le);
k2=elstif_frame(2,Ee,Ie,Ae,Le);
k3=elstif_frame(3,Ee,Ie,Ae,Le);
k4=elstif_frame(4,Ee,Ie,Ae,Le);
k5=elstif_frame(5,Ee,Ie,Ae,Le);
k6=elstif_frame(6,Ee,Ie,Ae,Le);
C1=eltrans(53.1301);
k1g=C1'*k1*C1;
k2g=k2;
C3=eltrans(53.1301);
k3g=C3'*k3*C3;
C4=eltrans(90);
k4g=C4'*k4*C4;
k5g=k5;
C6=eltrans(90);
k6g=C6'*k6*C6;
k=zeros(N,N);
k=agre_stif(k,1,k1g,3,2,le,lw,lm);
k=agre_stif(k,2,k2g,3,2,le,lw,lm);
k=agre_stif(k,3,k3g,3,2,le,lw,lm);
k=agre_stif(k,4,k4g,3,2,le,lw,lm);
k=agre_stif(k,5,k5g,3,2,le,lw,lm);
k=agre_stif(k,6,k6g,3,2,le,lw,lm);
k(18,:)=[];k(:,18)=[];k(17,:)=[];k(:,17)=[];k(16,:)=[];k(:,16)=[];
k(1,:)=[];k(:,1)=[];k(1,:)=[];k(:,1)=[];k(1,:)=[];k(:,1)=[];
f=zeros(N,1);
fw=[0;0;0;0;0;0;0;0;M;0;P;0;0;0;0;0;0;0];
f=fw;
%
u=k\f
% element 1
u1g=[0;0;0;u(1);u(2);u(3)]
f1g=k1g*u1g
% element 2
u2g=[u(1);u(2);u(3);u(4);u(5);u(6)]
f2g=k2g*u2g
% element 3
u3g=[u(1);u(2);u(3);u(7);u(8);u(9)]
f3g=k3g*u3g
% element 4
u4g=[u(4);u(5);u(6);u(10);u(11);u(12)]
f4g =k4g*u4g
% element 5
u5g=[u(7);u(8);u(9);u(10);u(11);u(12)]
f5g=k5g*u5g
% element 6
u6g=[u(10);u(11);u(12);0;0;0]
f6g=k6g*u6g
f=zeros(N,1);
fq4=[p0*Le(4)/2;0;p0*Le(4)*Le(4)/12;p0*Le(4)/2;0;-p0*Le(4)*Le(4)/12]
C7=eltrans(180);
fq4g=C7*fq4;
% agregacja
f=agre_load(f,4,3,2,lm,fq4g);
u=k\f
% element 1
u1g=[0;0;0;u(1);u(2);u(3)]
u1=C1*u1g
% element 2
u2g=[u(1);u(2);u(3);u(4);u(5);u(6)]
u2=u2g
% element 3
u3g=[u(1);u(2);u(3);u(7);u(8);u(9)]
u3=C3*u3g
% element 4
u4g=[u(4);u(5);u(6);u(10);u(11);u(12)]
u4=C4*u4g
% element 5
u5g=[u(7);u(8);u(9);u(10);u(11);u(12)]
u5=u5g
% element 6
u6g=[u(10);u(11);u(12);0;0;0]
u6=C6*u6g
f1=k1*u1
f2=k2*u2
f3=k3*u3
f4=k4*u4-fq4g
f5=k5*u5
f6=k6*u6