Beam2D2Node_main
%曾攀习题3-13
clc
%1进行单元及节点编号,建立整体坐标系,并将均布荷载简化为等效节点荷载
%2输入单元信息
E=3E10;I=204E-8;A=7.65E-4;
L1=1;L2=0.9;alpha1=0;alpha2=90
%3计算单元刚度矩阵并组装为整体刚度矩阵
format short
Beam2D2Node=Beam2D2NodeFunc; %调用函数接口
k1=Beam2D2Node.Stiffness(E,I,A,L1,alpha1);
k2=Beam2D2Node.Stiffness(E,I,A,L2,alpha2);
KK=zeros(9,9);
KK=Beam2D2Node.Assemble(KK,k1,1,2);
KK=Beam2D2Node.Assemble(KK,k2,3,2)
%4处理位移边界条件及节点力,求解位移
k=KK([4:6],[4:6]);
Fp=[0;-40000;6666.7;0;-40000;6666.7;0;0;0]
u=k\Fp(4:6);%前6个是已知的外荷载
U=[0;0;0;u;0;0;0]
%5计算支反力,Fr=KK×U-Fp
P=KK*U
Fr=Beam2D2Node.Forces(KK,U)-Fp
Beam2D2NodeFunc
function Beam2D2Node=Beam2D2NodeFunc
Beam2D2Node.Stiffness=@Beam2D2Node_Stiffness;
Beam2D2Node.Assemble=@Beam2D2Node_Assemble;
Beam2D2Node.Forces=@Beam2D2Node_Forces;
end
fun