|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
找了很多资料也没找到8节点六面体单元的单元刚度矩阵的求法,无奈自己编了一个,分享一下,也希望大家多多指教其中的不足和错误。
%%%%X、Y节点坐标;E、UM弹性模量和泊松比;lmd单元连接的各节点坐标
function EK = RectESM(X,Y,Z,E,NU,lmd)
x1 = X(lmd(1)); x2 = X(lmd(2)); x3 = X(lmd(3)); x4 = X(lmd(4)); %%%%8个节点的坐标
y1 = Y(lmd(1)); y2 = Y(lmd(2)); y3 = Y(lmd(3)); y4 = Y(lmd(4));
z1 = Z(lmd(1)); z2 = Z(lmd(2)); z3 = Z(lmd(3)); z4 = Z(lmd(4));
x5 = X(lmd(5)); x6 = X(lmd(6)); x7 = X(lmd(7)); x8 = X(lmd(8));
y5 = Y(lmd(5)); y6 = Y(lmd(6)); y7 = Y(lmd(7)); y8 = Y(lmd(8));
z5 = Z(lmd(5)); z6 = Z(lmd(6)); z7 = Z(lmd(7)); z8 = Z(lmd(8));
D=[1-NU NU NU 0 0 0
NU 1-NU NU 0 0 0
NU NU 1-NU 0 0 0
0 0 0 (1-2*NU)/2 0 0
0 0 0 0 (1-2*NU)/2 0
0 0 0 0 0 (1-2*NU)/2];
D=E/(1+NU)/(1-2*NU)*D;
A=[-0.774597 0 0.774597];
H=[0.555556 0.888889 0.555556]; %%% 下面采用3节点高斯积分法求解三次积分 %%%
z=zeros(24);
for p=1:3
r=A(p);
for m=1:3
s=A(m);
for n=1:3
t=A(n);
a=((s-1)*(1-t)*x1+(1-s)*(1-t)*x2+(1+s)*(1-t)*x3+(1+s)*(t-1)*x4+(s-1)*(1+t)*x5+(1-s)*(1+t)*x6+(1+s)*(1+t)*x7-(1+s)*(1+t)*x8)/8;
b=((r-1)*(1-t)*x1+(1+r)*(t-1)*x2+(1+r)*(1-t)*x3+(1-r)*(1-t)*x4+(r-1)*(1+t)*x5-(1+r)*(1+t)*x6+(1+r)*(1+t)*x7+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