|
% 定义矩阵 a 和 b,以及转换矩阵 M
a = [377.6 98.978 -97.096; 98.978 75.243 -50.307; -97.096 -50.307 74.694];
b = [0.0015839 0.0012259 -0.00032942; 0.0012259 -0.00028488 -0.00062267; -0.00032942 -0.00062267 -0.00029432];
syms m n;
M = [cos(m)*sin(n) sin(m)*sin(n) cos(n); -sin(m) cos(m) 0; -cos(m)*cos(n) -sin(m)*cos(n) sin(n)];
% 计算坐标变换后的应力和应变
sigma_prime = M*a*(M.');
epsilon_prime = M*b*(M.');
% 计算应变幅值最大的临界面
Delta_gamma_max = 0;
p=5;
for beta = -2*pi:pi/180:0
for theta = -pi:pi/180:0
M = [cos(theta) sin(beta)*sin(theta) cos(beta)*sin(theta); ...
0 cos(beta) -sin(beta); ...
-sin(theta) cos(theta)*sin(beta) cos(beta)*cos(theta)];
epsilon_prime_xy = epsilon_prime(2,1);
epsilon_prime_xz = epsilon_prime(3,1);
Delta_gamma = 0;
for j = 1:p-1
for m = j+1:p
epsilon_j_xy = epsilon_prime(j,2);
epsilon_m_xy = epsilon_prime(m,2);
epsilon_j_xz = epsilon_prime(j,3);
epsilon_m_xz = epsilon_prime(m,3);
Delta_jm = 2*sqrt((epsilon_j_xy-epsilon_m_xy)^2 + (epsilon_j_xz-epsilon_m_xz)^2);
if Delta_jm > Delta_gamma
Delta_gamma = Delta_jm;
end
end
end
if Delta_gamma > Delta_gamma_max
Delta_gamma_max = Delta_gamma;
critical_beta = beta*180/pi;
critical_theta = theta*180/pi;
end
end
end
% 计算临界面上的法向应变幅
epsilon_prime_xx = epsilon_prime(1,1);
Delta_epsilon_n_max = 0;
for j = 1:p-1
for m = j+1:p
epsilon_j_xx = epsilon_prime(j,1);
epsilon_m_xx = epsilon_prime(m,1);
Delta_jm = abs(epsilon_j_xx - epsilon_m_xx)/2;
if Delta_jm > Delta_epsilon_n_max
Delta_epsilon_n_max = Delta_jm;
end
end
end
% 输出结果
fprintf('临界面的旋转角度为 beta = %f 度, theta = %f 度\n', critical_beta, critical_theta);
fprintf('临界面上的法向应变幅为 Delta_epsilon_n = %f\n', Delta_epsilo
|
|