里兹法的MATLAB实现振动力学

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

function[D,C]=RitzTorsionD(a,b,n)%Thisfunctioncalculatesthetorsionalrigidityofrectangularsection%basedonRitzmethod,inwhichthetrialfunctionis%(x^2-a^2)*(y^2-b^2)*(C1+C2*x^2*y^2+C3*x^4*y^4+C4*x^6*y^6+...)%Usage:%[C,D]=RitzTorsion(a,b,n)%Input:%a------widthofthesection%b------heightofthesection%n------thenumberofthetrialfunctions%Output:%D------thetorsionalrigidity%C------thecoefficientsofthetrialfunctions%%-------------------------------------------------------------%---------------------------------------------------------------ifnargin3a=1;b=1;n=4;endsymsxyC=zeros(n,1);D=0;F0=(x^2-a^2)*(y^2-b^2);F=sym(zeros(n,1));fori=1:nj=2*(i-1);F(i)=F0*x^j*y^j;endFx=diff(F,x);Fy=diff(F,y);A=zeros(n,n);B=zeros(n,1);fori=1:nforj=1:nA(i,j)=eval(2*int(int(Fx(i)*Fx(j)+Fy(i)*Fy(j),x,-a,a),y,-b,b));endB(i)=eval(4*int(int(F(i),x,-a,a),y,-b,b));endC=A\B;D=sum(C.*B/2);return

1 / 1
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功