Matlab
% 定义主应力值
sigma1 = 100; % MPa
sigma2 = 50; % MPa
sigma3 = -33; % MPa
sigma_m1=(sigma1 + sigma3)/2;
sigma_m2=(sigma1 + sigma2)/2;
sigma_m3=(sigma2 + sigma3)/2;
% 计算半径
r1 = (sigma1 - sigma3) / 2;
r2 = (sigma1 - sigma2) / 2;
r3 = (sigma2 - sigma3) / 2;
% 角度范围(从0到2π)
theta = linspace(0, 2*pi, 1000);
% 计算圆上的点(以sigma_m为中心)
% 第一个圆
x1 = sigma_m1 + r1 * cos(theta);
y1 = r1 * sin(theta);
% 第二个圆
x2 = sigma_m2 + r2 * cos(theta);
y2 = r2 * sin(theta);
% 第三个圆
x3 = sigma_m3 + r3 * cos(theta);
y3 = r3 * sin(theta);
% 绘制应力圆
figure;
hold on;
plot(x1, y1, 'b', 'LineWidth', 2); % 蓝色表示第一个圆
plot(x2, y2, 'r', 'LineWidth', 2); % 红色表示第二个圆
plot(x3, y3, 'g', 'LineWidth', 2); % 绿色表示第三个圆
% 添加主应力点
plot(sigma1, 0, 'kx', 'MarkerSize', 10, 'MarkerFaceColor', 'k'); % σ1点
plot(sigma2, 0, 'kx', 'MarkerSize', 10, 'MarkerFaceColor', 'k'); % σ2点
plot(sigma3, 0, 'kx', 'MarkerSize', 10, 'MarkerFaceColor', 'k'); % σ3点
% 添加标签和标题
xlabel('\sigma_{normal}');
ylabel('\tau');
title('3向应力圆 (Mohr Circle)');
legend('\sigma_1', '\sigma_2', '\sigma_3', 'Location', 'best');
grid on;
axis equal;
hold off;
% 添加文本标注主应力值
text(sigma1, 0, sprintf('σ1 = %d MPa', sigma1), 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom');
text(sigma2, 0, sprintf('σ2 = %d MPa', sigma2), 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom');
text(sigma3, 0, sprintf('σ3 = %d MPa', sigma3), 'HorizontalAlignment', 'center', 'VerticalAlignment', 'top');
效果如下