|
楼主 |
发表于 2010-12-12 13:28
|
显示全部楼层
程序如下,和在本版块http://forum.vibunion.com/thread-98188-1-1.html中的类似,区别在于这里采用内嵌函数,麻烦学长给看一下:
- function [time,y] = qiujie
- tic
- period = 2*pi; %%%因为对时间t采用了无量纲化,cos(oemga*t)变成了cos(T),所以周期变为2*pi/1,暂时这样
- tspan = (0:period/100:1000*period);
- y0 = [0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001];
- e0 = 0.6*10^-3; Lb = 100*10^-3; %Situ_H_imp
-
- cz = 0.0002:0.0001:0.0200;
- options = odeset('Reltol',1e-3,'Abstol',1e-6);
- row = length(cz);
- column = length(80100:100:100001);
- U = zeros(row,column);
- for i = 1:length(cz)
- disp(cz(i))
- [time,y] = ode15s(@equ_elastic_without_UMP,tspan,y0,options,e0,cz(i),Lb);
- y0 = y(end,:);
- U(i,:) = y(80100:100:end,1)';
- plot(y(80100:end,1),y(80100:end,3));
- saveas(gcf,sprintf('Lb=1.00,e0=0.0006,without_UMP,cz=%6.5f_traj_Situ_H_imp.bmp',cz(i)),'bmp'); % Situ_H
- plot(y(80100:100:end,1),y(80100:100:end,3),'r.','markersize',5);
- saveas(gcf,sprintf('Lb=1.00,e0=0.0006,without_UMP,cz=%6.5f_poincare_Situ_H_imp.bmp',cz(i)),'bmp'); % Situ_H
- end
- plot(cz,U,'r.','markersize',5);
- saveas(gcf,'分岔图.bmp','bmp');
- toc
- %%%%%%%% 运动微分方程 %%%%%%%%%
- function uu = equ_elastic_without_UMP(T,u,e0,cz,Lb)
- m1 = 60; %转子质量 kg
- m2 = 25; %轴颈质量 kg
- c1 = 4000; %转子阻尼 N.s/m
- c2 = 1200; %轴承阻尼 N.s/m
- Ke = 6.2*10^6; %转轴刚度 N/m
- % e0 = 0.6*10^-3; %转子质量偏心 m
- % Rr = 60*10^-3; %转子半径 m
- % Lr = 150*10^-3; %转子长 m
- delta_0 = 4.5*10^-3; %均匀气隙大小 m
- % cz = 0.2*10^-3; %轴颈间隙 m
- Rb = 50*10^-3; %轴承半径 m
- % Lb = 20*10^-3; %轴承长 m
- mu = 18*10^-3; %绝对润滑油粘度 无单位
-
- omega = 13; %大轴旋转角速度
-
- % global cz
-
-
- sigma = mu * omega * Rb * Lb * (Rb/cz)^2 * (Lb/2/Rb)^2; %Sommerfeld修正系数
-
- A1 = u(7) + 2*u(6);
- A2 = u(5) - 2*u(8);
-
- alpha = atan(A1./A2) - pi/2* sign(A1./A2) - pi/2* sign(A1);
-
- E = sqrt(u(5).^2 +u(7).^2); %轴颈轴心轨迹
- E_minus = sqrt(1 -E.^2);
-
- B1 = u(7)*cos(alpha) - u(5)*sin(alpha);
- B2 = u(5)*cos(alpha) + u(7)*sin(alpha);
-
- G = 2./E_minus * ( pi/2 + atan(B1./ E_minus) );
- V = (2 + B1 * G) ./ E_minus.^2;
- S = B2 ./ ( 1 - B2.^2 );
-
- F_oil_same = -sqrt( A2.^2 + A1.^2 ) ./ E_minus.^2;
-
- f_x = F_oil_same * ( 3* u(5) *V - sin(alpha) * G - 2 *cos(alpha)*S );
- f_y = F_oil_same * ( 3* u(7) *V + cos(alpha) * G - 2 *sin(alpha)*S ); %油膜力的无量纲表达式
-
- fx = sigma * f_x;
- fy = sigma * f_y; %非线性油膜力
-
- uu = zeros(8,1);
- uu(1) = u(2);
- uu(2) = -c1/(m1*omega) * u(2) - Ke/(m1*omega^2) * u(1) + Ke * cz/(m1*omega^2*delta_0)*u(5) + e0 * cos(T)/delta_0 ;
- uu(3) = u(4);
- uu(4) = -c1/(m1*omega) * u(4) - Ke/(m1*omega^2) * u(3) + Ke * cz/(m1*omega^2*delta_0)*u(7) + e0 * sin(T)/delta_0 ;
- uu(5) = u(6);
- uu(6) = -c2/(m2*omega) * u(6) + Ke * delta_0/(2*m2*omega^2*cz) * u(1) - Ke/(2*m2*omega^2) * u(5) + fx/(m2*omega^2 *cz);
- uu(7) = u(8);
- uu(8) = -c2/(m2*omega) * u(8) + Ke * delta_0/(2*m2*omega^2*cz) * u(3) - Ke/(2*m2*omega^2) * u(7) + fy/(m2*omega^2 *cz);
复制代码 |
|