% 以下为例题2: 三个连续梁单元的结构
clear
clc
length1 = Geometry( 0,0, 1,0) % 由结点坐标求三个单元几何信息
length2 = Geometry( 1,0, 2,0)
length3 = Geometry( 2,0, 3,0)
g1=[0 1] % 三个单元定位向量
g2=[1 2]
g3=[2 0]
E=1,I=1 % 材料信息
k1=LocalElementStiff(E,I,length1) % 局部单刚
k2=LocalElementStiff(E,I,length2)
k3=LocalElementStiff(E,I,length3)
K1=k1 % 整体单刚
K2=k2
K3=k3
GK=zeros(2) % 由三个单元和相应定位向量聚集总刚
GK=ElementAssemble1(GK,K1,g1)
GK=ElementAssemble1(GK,K2,g2)
GK=ElementAssemble1(GK,K3,g3)
f0=fixendF(1,36,1) % 2单元有均布荷载时产生的等效荷载—局部坐标
ep=-f0 % 转换为整体坐标
P=zeros(2,1) % 总结点荷载维度及置零
P = fAssemble(P,ep,g2) % 等效荷载聚集
U=GK\P % 求解方程
U1=ElementDisp(U,g1) % 定位向量提取三个单元的结点位移
U2=ElementDisp(U,g2)
U3=ElementDisp(U,g3)
u1=U1
u2=U2
u3=U3
f1=k1*u1 % 求局部坐标下的单元杆端内力
f2=k2*u2+f0
f3=k3*u3
- 1
- 2
前往页