|
楼主 |
发表于 2014-12-29 11:07
|
显示全部楼层
本帖最后由 牛小贱 于 2015-1-4 09:34 编辑
程序如下,主要问题就是我在程序里面未添加Fa这一项之前是可以进行计算得到图,添加Fa之后就出现警告,终止运行。
- function fangchengfenchatu
- tic
- N=256;
- M=200;
- RelTol = 1e-6; %相对误差Relative tolerance
- AbsTol = 1e-6; %绝对误差Absolute tolerance
- options = odeset('RelTol',RelTol,'AbsTol',ones(1,8)*AbsTol); %需要改变的参数‘ones(1,4)’
- ommiga=200:10:2500;
- L=length(ommiga);
- for j=1:L
- j
- [t,Y] = ode45( @fangcheng001,[0:(2*pi/M):(288*2*pi)],[0.01 0.001 0.01 0.001 0.01 0.001 0.01 0.001],options,ommiga(j));
- y1=Y(:,1);
- y11=y1((end-N*M):end);
- for i=1:N
-
- Point1(i,j)=y11(1+(i-1)*M);
- end
-
- end
- ommiga = ommiga';
- plot(ommiga,Point1,'.k','MarkerSize',1)
- toc
复制代码- function dy=fangcheng001(t,y,ommiga)
- %ommiga=450;%转速
- m1=4;
- m2=32.1;
- c1=1050;
- c2=2100;
- c=0.00011;
- R=0.025;
- L=0.012;
- e=0.00005;
- miu=0.018;
- k=2.5*10^7;
- s=miu*ommiga*R*L*(R/c)^2*(L/2/R)^2;
- M=s/(m1*ommiga^2*c);
- %求解Fa;
- xi=1.2e-3;
- Rt=0.5;
- Rb=0.37;
- B1=35/360*2*pi;
- B2=40/360*2*pi;
- xii=0.83;
- V=30;
- p0=11.8;
- C=V^2*sin(B1)*p0*(cos(B1)+xii*B2);
- A1=(Rt^2-Rb^2)^2*pi*C*Rt/(Rt^2-Rb^2+2*Rt*xi)^2;
- A3=3*(Rt^2-Rb^2)^2*pi*C*Rt^3/(Rt^2-Rb^2+2*Rt*xi)^4;
- E=sqrt(y(5)^2+y(7)^2)/xi;
- Fa=A1*E+A3^3*E^3;
- %无量纲方程
- dy=[ y(2);
- -c1/(m1*ommiga)*y(2)-k/(m1*ommiga^2)*(y(1)-y(5))+fx(y(1),y(3),y(2),y(4))*M;
- y(4);
- -c1/(m1*ommiga)*y(4)-k/(m1*ommiga^2)*(y(3)-y(7))-9.8/(c*ommiga^2)+fy(y(1),y(3),y(2),y(4))*M;
- y(6);
- -c2/(m2*ommiga)*y(6)-2*k/(m2*ommiga^2)*(y(5)-y(1))+e*cos(t)/c+Fa*cos(t)/(c*m2*ommiga^2);
- y(8);
- -c2/(m2*ommiga)*y(8)-2*k/(m2*ommiga^2)*(y(7)-y(3))+e*sin(t)/c-9.8/(c*ommiga^2)+Fa*sin(t)/(c*m2*ommiga^2);];
- end
复制代码
|
|