用MATLAB绘制三向应力圆

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');

效果如下

相关推荐
tyatyatya3 天前
MATLAB中进行视觉检测入门教程
开发语言·matlab·视觉检测
2zcode4 天前
基于Matlab可见光通信系统中OOK调制的误码率性能建模与分析
算法·matlab·php
听情歌落俗4 天前
MATLAB3-1变量-台大郭彦甫
开发语言·笔记·算法·matlab·矩阵
XIAOYU6720134 天前
金融数学专业需要学哪些数学和编程内容?
开发语言·matlab·金融
听情歌落俗4 天前
MATLAB3-2数据存储-台大郭彦甫
开发语言·数学建模·matlab·矩阵
slandarer5 天前
MATLAB | 这是屎吗?抱歉打错了,这是什么?
开发语言·matlab
茜茜西西CeCe5 天前
数字图像处理-巴特沃斯高通滤波、低通滤波
图像处理·opencv·计算机视觉·matlab·巴特沃斯高通滤波·巴特沃斯低通滤波
电力程序小学童5 天前
基于密集型复杂城市场景下求解无人机三维路径规划的Q-learning算法研究(matlab)
算法·matlab·无人机
通信小呆呆5 天前
OCDM 波形通信感知一体化:从原理到 MATLAB 实现
matlab·信息与通信·通信感知一体化·ocdm
2zcode5 天前
基于Matlab不同作战类型下兵力动力学模型的构建与稳定性分析
开发语言·matlab