% 设计简支平板的参数
Lx = 0.5; % 长度
Ly = 0.3; % 宽度
h = 0.02; % 离散化步长
c = 1; % 杨氏模量
rho = 7800;% 密度
b = 0.1; % 矩形截面宽度
d = 0.01; % 矩形截面高度
I = b*d^3/12;% 截面惯性矩
% 定义待求解的模态数
m = 6;
% 离散化网格
xmesh = 0:h:Lx;
ymesh = 0:h:Ly;
tspan = 0:0.1:20;
u0 = zeros(m*2,1);
options = []; %选项
% 定义偏微分方程
function [c, f, s] = pde(x, y, u, DuDx, DuDy)
% 模型参数
global c rho b d Lx Ly;
c1 = c*rho*b*d;
c2 = c*I/Lx/Ly;
% 计算矩阵
Mx = [c1 0 0 0 0 0;
0 c2 0 0 0 0;
0 0 c2 0 0 0;
0 0 0 c2 0 0;
0 0 0 0 c2 0;
0 0 0 0 0 c2];
My = [c1 0 0 0 0 0;
0 c2 0 0 0 0;
0 0 c2 0 0 0;
0 0 0 c2 0 0;
0 0 0 0 c2 0;
0 0 0 0 0 c2];
M = kron(My,speye(length(xmesh))) + kron(speye(length(ymesh)),Mx);
Kx = [0 1 0 0 0 0;
-12/Lx^3 0 6/Lx^2