matlab求薄板的振动
如果要用matlab求解薄板在均力作用下的振动情况,最终求得其振动频率等,跪问有没有人有实例程序参考一下.本人我初学者,对于有限元分析不甚了解,急求用matlab 解决这一问题的程序,谢谢各位知情的大侠了.:handshake 用ANSYS做岂不是更方便? 本帖最后由 VibInfo 于 2016-5-11 16:00 编辑原帖由 liquid 于 2007-5-8 23:34 发表
如果要用matlab求解薄板在均力作用下的振动情况,最终求得其振动频率等,跪问有没有人有实例程序参考一下.本人我初学者,对于有限元分析不甚了解,急求用matlab 解决这一问题的程序,谢谢各位知情的大侠了.:handshake
用matlab求解需要你建立适当的数学模型的,建立模型之后根据牛顿定律建立系统运动微分方程才能求出其振动频率,matlab虽然也有一些程式化的模型振动频率求解,不过我建议你还是自己动手建立模型,推导公式,然后用matlab编程序计算
到时候再有社那么具体问题大家会帮助你的
仿真求频率最好是ansys做 楼上所说的建立适当数学模型是不是指有限元的模型呢?假如建立的是有限元模型,那么建立系统运动微分方程是否是针对有限元的结点呢?谢谢了
因为要求自己编程求解振动频率,所以不能用ansys做. 我以前做过平面二维板的固有频率的求解。你看看是否对你有点帮助?
http://forum.vibunion.com/space/38985/viewspace_2376.html 有用过有限元求解四边简支薄板受集中力激励下的振动响应问题的没?
受集中力作用后,整个结构的响应应该是怎样的呀?响应的传递应该是怎样的? xinyuxf同志所推荐的网页好像只有好友才能看,您看能不能把相关内容发我邮箱里,万分感谢啊!
我的邮箱是dingli6666@163.com 呵呵,这个好像要楼主自己翻阅理论书籍吧,应该不会有现成的程序 本帖最后由 VibInfo 于 2016-5-11 16:01 编辑
原帖由 liquid 于 2007-5-9 16:38 发表
楼上所说的建立适当数学模型是不是指有限元的模型呢?假如建立的是有限元模型,那么建立系统运动微分方程是否是针对有限元的结点呢?谢谢了
因为要求自己编程求解振动频率,所以不能用ansys做.
用matlab做频率计算通常是建立物理数学模型,而不是有限元模型。
根据牛顿第二定律建立运动微分方程,得出质量和刚度矩阵、阻尼矩阵,然后计算得到系统固有频率或者振动频率
比如弹簧模型,你大概知道吧,其自由振动运动微分方程为md2x+cdx+kx=0,d2x,dx分别为位移x的二阶一阶导数
用matlab编程序很简单,用命令eig 本帖最后由 VibInfo 于 2016-5-11 16:01 编辑
原帖由 liquid 于 2007-5-9 21:34 发表
xinyuxf同志所推荐的网页好像只有好友才能看,您看能不能把相关内容发我邮箱里,万分感谢啊!
我的邮箱是dingli6666@163.com
我贴出来吧
%%平面应力,四节点八自由度单元求频率
function PlateFreq8
%%%%%%%%%%%%%%%%%%%前处理程序%%%%%%%%%%%%
%%开始输入材料参数%%
E=3e7; %弹性模量
NU=0.3;%泊松比
h=0.05; %板厚度
ROU=7900;%密度
%%%%输入板信息%%
ND=4; %ND:单元结点数
NF=2; %NF:结点自由度数
LENGTH=1.5; %LENGTH:板长度
BREADTH=1.5;%BREADTH:板宽度
%%输入网格划分信息:NEI:横向单元个数;NEJ:纵向单元个数%%
NEI=10;
NEJ=10;
%%%%%%划分网格%%%%%%%%%%%%%%%
NE=NEI*NEJ;%%单元总数
NDF=ND*NF; %%每个单元的总自由度数
NP=(NEI+1)*(NEJ+1);%%节点总数
N=NF*NP; %%自由度总数
%%%%%%%%%%%%%%%%%求节点坐标%%%%%%%%%%%%%%%%%%
=ECoordinates(NEI,NEJ,LENGTH,BREADTH);
%%%%%%%%%%%%%%划分网格,求各单元连接的节点编号%%%%%
ME=EMesh(ND,NEI,NEJ); %ND单元节点数、NEI、NEJ分别为横向和纵向节点数
%%%%%%%%%%%%%%%%%%%%%%%%%%前处理程序结束%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EK =SheetESM(E,NU,h); %单元刚度:E、UM弹性模量和泊松比;h板厚度
EM = SheetEMM(ROU,h,LENGTH/NEI,BREADTH/NEJ);%单元质量:ROU密度;h板厚度;单元尺寸
%%%%%%%%%%%%%%%%%%%%%%%%%%求刚度矩阵%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SK=zeros(NP*2); % 整体刚度矩阵
SM=zeros(NP*2); % 整体质量矩阵
for i=1:1:NE
SK = SheetASM(SK,EK,ME(i,:)); % 求整体刚度矩阵
SM = SheetAMM(SM,EM,ME(i,:));%用集中质量法求质量矩阵
end
%%%%%%%%%%%%%%%%%%%%%%%%%%加入边界条件%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SK(1:(NEJ+1)*2,:)=[];
SK(:,1:(NEJ+1)*2)=[];
SM(1:(NEJ+1)*2,:)=[];
SM(:,1:(NEJ+1)*2)=[];
%%%%%%%%%%%%%%%%%%%%%%%%%%求固有频率%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
=eig(SK,SM);
=sort(sqrt(diag(D))); %频率
Freq=Freq2/(2*pi);
V = V(:,index); %振型
Freq
return;
%%%%%%%%%%%%%%%%%%%%%%%%%主程序结束%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%各个子程序%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%求节点坐标%%%%%%%%%%%%%%%%%%
function =ECoordinates(NEI,NEJ,LENGTH,BREADTH)
%%%%给每一个结点配置X、Y方向的坐标,按横向分布
for I=1:NEI+1
for J=1:NEJ+1
X((I-1)*(NEI+1)+J)=(I-1)*LENGTH/NEI;
Y((I-1)*(NEI+1)+J)=(J-1)*BREADTH/NEJ;
end
end
x=X;
y=Y;
return;
%%%%%%%%计算各单元所连接的节点编号%%%%%%%%%%%%%%%
function y=EMesh(ND,NEI,NEJ)
for I=1:NEI
for J=1:NEJ
NEE=(I-1)*NEJ+J;
ME(NEE,1)=J+(I-1)*(NEJ+1);
ME(NEE,2)=J+I*(NEJ+1);
ME(NEE,3)=J+I*(NEJ+1)+1;
ME(NEE,4)=J+(I-1)*(NEJ+1)+1;
end
end
y=ME;
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%矩形四节点单元法求单元刚度矩阵%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%x、y节点坐标;E、UM弹性模量和泊松比;T板厚度;lmd单元连接的各节点坐标
function EK = SheetESM(E,nu,h)
k=[ 1/2-nu/6 1/8+nu/8 -1/4-nu/12 -1/8+3*nu/8 ...
-1/4+nu/12 -1/8-nu/8nu/6 1/8-3*nu/8];
EK = h*E/(1-nu^2)*[ k(1) k(2) k(3) k(4) k(5) k(6) k(7) k(8)
k(2) k(1) k(8) k(7) k(6) k(5) k(4) k(3)
k(3) k(8) k(1) k(6) k(7) k(4) k(5) k(2)
k(4) k(7) k(6) k(1) k(8) k(3) k(2) k(5)
k(5) k(6) k(7) k(8) k(1) k(2) k(3) k(4)
k(6) k(5) k(4) k(3) k(2) k(1) k(8) k(7)
k(7) k(4) k(5) k(2) k(3) k(8) k(1) k(6)
k(8) k(3) k(2) k(5) k(4) k(7) k(6) k(1)];
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%装配单元刚度矩阵%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function SK = SheetASM(K,EK,lmd)
for i = 1:1:4
for j = 1:1:4
for p = 1:1:2
for q = 1:1:2
m = (i-1) * 2 + p;
n = (j-1) * 2 + q;
M = (lmd(i)-1) * 2 + p;
N = (lmd(j)-1) * 2 + q;
K(M,N) = K(M,N) + EK(m,n);
end
end
end
end
SK=K;
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%计算单元质量矩阵%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%x、y节点坐标;ROU材料密度;h板厚度;lmd单元连接的各节点坐标
function EM = SheetEMM(ROU,h,x,y)
Mfirst = x*y*h*ROU;%%%单元总质量
I=eye(8);
EM=I*Mfirst/4;
return;
%%%%%%%%%装配单元质量矩阵%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function SM = SheetAMM(M,EM,lmd)
for i = 1:1:4
for j = 1:1:4
for p = 1:1:2
for q = 1:1:2
r = (i-1) * 2 + p;
s = (j-1) * 2 + q;
R = (lmd(i)-1) * 2 + p;
S = (lmd(j)-1) * 2 + q;
M(R,S) = M(R,S) + EM(r,s);
end
end
end
end
SM=M;
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
本程序使用matlab7.0运行成功。
程序基本没错,可能会有些纰漏。具体的自己再试试吧
[ 本帖最后由 xinyuxf 于 2007-5-10 10:38 编辑 ] 万分感谢啊! 这个只是平面内的,要计算板的振动,需要脱胎换骨的修改。。