|
楼主 |
发表于 2011-3-23 14:24
|
显示全部楼层
本帖最后由 zishendemi 于 2011-3-23 16:47 编辑
谢谢楼上两位!代码如下:
clear;
Rou=17000;
E=2.1*10^11;
I=0.548;
N=2*1000*[146.4
146.4
284.4
410.9
528.2
653.3
772.1
884.8
995.8
1105.7
1203.3
1293.8
1384.2
1462.4
1534.1
1594.1
1643.2
1621.1
1593.8
1562.9
1527.8
1487.9
1436.9
1376.1
1310.9
1240.0
1165.1
1090.8
1013.8
907.2
799.7
688.7
580.0
688.7
799.7
907.2
1013.8
1090.8
1165.1
1240.0
1310.9
1376.1
1436.9
1487.9
1527.8
1562.9
1593.8
1621.1
1643.2
1594.1
1534.1
1462.4
1384.2
1293.8
1203.3
1105.7
995.8
884.8
772.1
653.3
528.2
410.9
284.4
146.4
146.4 ];
L=[1.5
1.5
3
3
9
9
9
9
9
9
9
9
9
9
9
9
47
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
15
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
47
9
9
9
9
9
9
9
9
9
9
9
9
3
3
1.5
1.5];
cable=[1.30E+07
1.17E+07
1.19E+07
1.05E+07
1.66E+07
1.79E+07
1.95E+07
2.14E+07
2.41E+07
2.59E+07
2.90E+07
3.09E+07
3.45E+07
3.49E+07
3.97E+07
7.74E+07
5.00E+07
3.30E+07
2.55E+07
2.07E+07
1.67E+07
1.75E+07
1.94E+07
1.68E+07
1.52E+07
1.09E+07
8.70E+06
7.74E+06
1.05E+07
9.11E+06
6.80E+06
5.53E+06
5.53E+06
6.80E+06
9.11E+06
1.05E+07
7.74E+06
8.70E+06
1.09E+07
1.52E+07
1.68E+07
1.94E+07
1.75E+07
1.67E+07
2.07E+07
2.55E+07
3.30E+07
5.00E+07
7.74E+07
3.97E+07
3.49E+07
3.45E+07
3.09E+07
2.90E+07
2.59E+07
2.41E+07
2.14E+07
1.95E+07
1.79E+07
1.66E+07
1.05E+07
1.19E+07
1.17E+07
1.30E+07
];
M=zeros(132);
K=zeros(132);
for j=1:65 %i=4:2:124
k=BeamElementStiffness(E,I,L(j),N(j));
K=BeamAssemble(K,k,j,j+1);
m=BeamElementMass(Rou,L(j));
M=BeamMassAssemble(M,m,j,j+1);
end;
M(3,:)=[];
M(:,3)=[];
M(129,:)=[];
M(:,129)=[];
K(3,:)=[];
K(:,3)=[];
K(129,:)=[];
K(:,129)=[];
cable=zeros(64); %暂时不把cable加到总刚K中,即一个简支梁
a=2;
for i=4:2:126
K(i,i)=K(i,i)+cable(a);
a=a+1;
end;
K(1,1)=K(1,1)+cable(1);
K(129,129)=K(129,129)+cable(64);
W=sqrt(eigs(K,M,10,'sa'));
W |
|