• aalitao77
    了解作者
  • matlab
    开发工具
  • 2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2021-04-24 19:15
    上传日期
将混凝土的细观模型映射到一个事先准备好的网格背景中,根据网格单元在细观模型中的位置赋予其单元属性,从而完成有限元网格的剖分。
P68.zip
  • P68
  • Tensor_rotation_compliance.m
    3.6KB
  • Tensor_rotation.m
    3.5KB
  • P68.m
    2.1KB
内容介绍
function [ Stiffness_matrix_rotated ] = Tensor_rotation_compliance( S2,theta ) %Tensor_rotation Tensor rotational transformation % Rotate stiffness (or any other) tensor with the given input % transformation. % original reference frame e{1}=[1; 0; 0]; e{2}=[0; 1; 0]; e{3}=[0; 0; 1]; % local reference frame ep{1}=[cos(theta); sin(theta); 0]; ep{2}=[cos(theta+pi/2); sin(theta+pi/2); 0]; ep{3}=e{3}; if (dot(cross(ep{1},ep{2}),ep{3}))<0 % ep3_old=ep{3}; % ep{3}=ep{2}; % ep{2}=ep3_old; ep{3}=-ep{3}; disp(dot(cross(ep{1},ep{2}),ep{3})) end for i=1:3 for j=1:3 for k=1:3 for l=1:3 for m=1:3 for n=1:3 for o=1:3 for p=1:3 if m==1 && n==1 && o==1 && p==1 S2_rotated(i,j,k,l)=dot(e{m},ep{i})*dot(e{n},ep{j})*dot(e{o},ep{k})*dot(e{p},ep{l})*S2(m,n,o,p); else S2_rotated(i,j,k,l)=S2_rotated(i,j,k,l)+dot(e{m},ep{i})*dot(e{n},ep{j})*dot(e{o},ep{k})*dot(e{p},ep{l})*S2(m,n,o,p); end end end end end end end end end Stiffness_tensor_rotated=[S2_rotated(1,1,1,1) S2_rotated(1,1,2,2) S2_rotated(1,1,3,3) S2_rotated(1,1,2,3) S2_rotated(1,1,1,3) S2_rotated(1,1,1,2); S2_rotated(2,2,1,1) S2_rotated(2,2,2,2) S2_rotated(2,2,3,3) S2_rotated(2,2,2,3) S2_rotated(2,2,1,3) S2_rotated(2,2,1,2); S2_rotated(3,3,1,1) S2_rotated(3,3,2,2) S2_rotated(3,3,3,3) S2_rotated(3,3,2,3) S2_rotated(3,3,1,3) S2_rotated(3,3,1,2); S2_rotated(2,3,1,1) S2_rotated(2,3,2,2) S2_rotated(2,3,3,3) S2_rotated(2,3,2,3) S2_rotated(2,3,1,3) S2_rotated(2,3,1,2); S2_rotated(1,3,1,1) S2_rotated(1,3,2,2) S2_rotated(1,3,3,3) S2_rotated(1,3,2,3) S2_rotated(1,3,1,3) S2_rotated(1,3,1,2); S2_rotated(1,2,1,1) S2_rotated(1,2,2,2) S2_rotated(1,2,3,3) S2_rotated(1,2,2,3) S2_rotated(1,2,1,3) S2_rotated(1,2,1,2)]; R1=[cos(theta)^2 sin(theta)^2 0 0 0 2*cos(theta)*sin(theta) sin(theta)^2 cos(theta)^2 0 0 0 -2*cos(theta)*sin(theta) 0 0 1 0 0 0 0 0 0 cos(theta) -sin(theta) 0 0 0 0 sin(theta) cos(theta) 0 -cos(theta)*sin(theta) cos(theta)*sin(theta) 0 0 0 cos(theta)^2-sin(theta)^2]; R2=[cos(theta)^2 sin(theta)^2 0 0 0 cos(theta)*sin(theta) sin(theta)^2 cos(theta)^2 0 0 0 -cos(theta)*sin(theta) 0 0 1 0 0 0 0 0 0 cos(theta) -sin(theta) 0 0 0 0 sin(theta) cos(theta) 0 -2*cos(theta)*sin(theta) 2*cos(theta)*sin(theta) 0 0 0 cos(theta)^2-sin(theta)^2]; Stiffness_matrix_rotated=R2*[... S2(1,1,1,1) S2(1,1,2,2) S2(1,1,3,3) S2(1,1,2,3) S2(1,1,1,3) S2(1,1,1,2); S2(2,2,1,1) S2(2,2,2,2) S2(2,2,3,3) S2(2,2,2,3) S2(2,2,1,3) S2(2,2,1,2); S2(3,3,1,1) S2(3,3,2,2) S2(3,3,3,3) S2(3,3,2,3) S2(3,3,1,3) S2(3,3,1,2); S2(2,3,1,1) S2(2,3,2,2) S2(2,3,3,3) S2(2,3,2,3) S2(2,3,1,3) S2(2,3,1,2); S2(1,3,1,1) S2(1,3,2,2) S2(1,3,3,3) S2(1,3,2,3) S2(1,3,1,3) S2(1,3,1,2); S2(1,2,1,1) S2(1,2,2,2) S2(1,2,3,3) S2(1,2,2,3) S2(1,2,1,3) S2(1,2,1,2)]*inv(R1); disp('Difference between transformed matrix and transformed tensor where the latter is rewritten as a matrix: ') disp((Stiffness_matrix_rotated-Stiffness_tensor_rotated)./Stiffness_matrix_rotated*100) end
评论
    相关推荐