You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
970 B

%%%%%% Element Stiffness Matrix with element geometry parameters %%%%%%%%
function ke_all=lk_all(ch)
load('d_ratio_ani.mat',...
'd11_ratio','d12_ratio','d13_ratio',...
'd21_ratio','d22_ratio','d23_ratio',...
'd31_ratio','d32_ratio','d33_ratio',...
'd44_ratio','d55_ratio','d66_ratio')
num=zeros(1,3);
for i=1:3
num(i)=size(ch,i+1);
end
ke_all=zeros([24,24,num]);
for i=1:num(1)
for j=1:num(2)
for k=1:num(3)
ch_e=ch(:,i,j,k);
d11=ch_e(1);d12=ch_e(2);d13=ch_e(3);
d21=ch_e(4);d22=ch_e(5);d23=ch_e(6);
d31=ch_e(7);d32=ch_e(8);d33=ch_e(9);
d44=ch_e(10);d55=ch_e(11);d66=ch_e(12);
ke_all(:,:,i,j,k)=d11.*d11_ratio+d12.*d12_ratio+d13.*d13_ratio...
+ d21.*d21_ratio+d22.*d22_ratio+d23.*d23_ratio...
+ d31.*d31_ratio+d32.*d32_ratio+d33.*d33_ratio...
+ d44.*d44_ratio+d55.*d55_ratio+d66.*d66_ratio;
end
end
end
end