📄 linearstiffness.m
字号:
% 输入单元长度
l=input('Please input the length of the element: ');
% 输入单元层数
n=input('Please input the number of layers: ');
% 输入x向静矩、y向静矩、弹性模量、剪切模量、扭转常数、密度、固有频率
% Sx=input('Please input the x-direction of shear-moment of the section: ');
% Sy=input('Please input the y-direction of shear-moment of the section: ');
E=input('Please input the elastic modulus of the material: ');
mu=input('Please input the poisson ratio: ');G=0.5*E/(1+mu);
rho=input('Please input the density of the material: ');
w1 = E*A/l;
w2 = 12*E*Iy/(l*l*l);
w3 = 6*E*Iy/(l*l);
w4 = 4*E*Iy/l;
w5 = 2*E*Iy/l;
w6 = 12*E*Ix/(l*l*l);
w7 = 6*E*Ix/(l*l);
w8 = 4*E*Ix/l;
w9 = 2*E*Ix/l;
w10 = G*J/l;
Ke1 = [w1 0 0 0 0 0 -w1 0 0 0 0 0 ;
0 w2 0 0 0 w3 0 -w2 0 0 0 w3 ;
0 0 w6 0 -w7 0 0 0 -w6 0 -w7 0 ;
0 0 0 w10 0 0 0 0 0 -w10 0 0 ;
0 0 -w7 0 w8 0 0 0 w7 0 w9 0 ;
0 w3 0 0 0 w4 0 -w3 0 0 0 w5 ;
-w1 0 0 0 0 0 w1 0 0 0 0 0 ;
0 -w2 0 0 0 -w3 0 w2 0 0 0 -w3 ;
0 0 -w6 0 w7 0 0 0 w6 0 w7 0 ;
0 0 0 -w10 0 0 0 0 0 w10 0 0 ;
0 0 -w7 0 w9 0 0 0 w7 0 w8 0 ;
0 w3 0 0 0 w5 0 -w3 0 0 0 w4];
Ke3=[Ke1(1:6,1:6) zeros(6,1) Ke1(1:6,7:12) zeros(6,1);
zeros(1,6) 70*w4 zeros(1,6) -60*w4;
Ke1(7:12,1:6) zeros(6,1) Ke1(7:12,7:12) zeros(6,1);
zeros(1,6) -60*w4 zeros(1,6) 70*w4];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -