|
% 定義矩陣 a 和 b,以及轉(zhuǎn)換矩陣 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)];
% 計算坐標(biāo)變換后的應(yīng)力和應(yīng)變
sigma_prime = M*a*(M.');
epsilon_prime = M*b*(M.');
% 計算應(yīng)變幅值最大的臨界面
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
% 計算臨界面上的法向應(yīng)變幅
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
% 輸出結(jié)果
fprintf('臨界面的旋轉(zhuǎn)角度為 beta = %f 度, theta = %f 度\n', critical_beta, critical_theta);
fprintf('臨界面上的法向應(yīng)變幅為 Delta_epsilon_n = %f\n', Delta_epsilo
求助 無法從sym轉(zhuǎn)換為 logical-1.jpg (7.07 KB, 下載次數(shù): 4)
下載附件
保存到相冊
2023-5-23 19:16 上傳
|
|