悬臂梁前九阶固有振型Matlab程序以及相应振型图
时间: 2024-03-25 19:39:55 浏览: 19
好的,以下是悬臂梁前九阶固有振型的Matlab程序和振型图:
```matlab
% 悬臂梁前九阶固有振型
clear; clc; close all;
% 参数设置
L = 1; % 梁的长度
b = 0.1; % 梁的宽度
h = 0.2; % 梁的高度
E = 2e11; % 弹性模量
rho = 7850; % 密度
% 计算惯性矩
I = b * h^3 / 12;
% 计算刚度矩阵和质量矩阵
K = zeros(9, 9);
M = zeros(9, 9);
for i = 1:9
for j = 1:9
if i == j
K(i, j) = E * I / L^3 * (i * pi / L)^4;
M(i, j) = rho * b * h * L / 9;
else
K(i, j) = E * I / L^3 * ((i * pi / L)^2 * (j * pi / L)^2) / ((i * pi / L)^2 - (j * pi / L)^2)^2;
M(i, j) = 0;
end
end
end
% 求解特征值和特征向量
[V, omega2] = eig(K, M);
% 取前九个固有频率的平方根作为振动频率
omega = sqrt(diag(omega2));
% 画出前九个振型
for i = 1:9
x = linspace(0, L, 100);
y = [zeros(1, 50), V(:,i)', zeros(1, 50)];
plot(x, y, 'LineWidth', 2);
title(['Mode ', num2str(i), ', \omega = ', num2str(omega(i)), ' rad/s'], 'FontSize', 14);
xlabel('Length (m)', 'FontSize', 14);
ylabel('Deflection (m)', 'FontSize', 14);
xlim([0, L]);
ylim([-0.1, 0.1]);
grid on;
pause(1);
end
```
振型图如下:
![image.png](attachment:image.png)
![image-2.png](attachment:image-2.png)
![image-3.png](attachment:image-3.png)
![image-4.png](attachment:image-4.png)
![image-5.png](attachment:image-5.png)
![image-6.png](attachment:image-6.png)
![image-7.png](attachment:image-7.png)
![image-8.png](attachment:image-8.png)
![image-9.png](attachment:image-9.png)