- clear
- a=0.411;
- n=0.492;
- c=20;
- R=[0,0.9,3.0,6.4,10.9,19.4,29.7,39.2,50.3]; %差压计读数
- H1=[0.84,0.82,0.80,0.78,0.73,0.63,0.51,0.40,0.29]; %压力表读数
- H2=[0.000,0.000,0.001,0.0025,0.004,0.005,0.008,0.010,0.012]; %真空表读数
- N1=[23,24.5,26.3,28.1,30.0,32.1,33.9,34.9,35.9]; %功率表格数
- K=[0.174,0.210,0.270,0.278,0.310,0.338,0.364,0.372,0.379]; %电机效率
- Q=a*(R.^n), %计算并输出流量l/s
- U1=(4*1000*Q)/(pi*39^2),
- U2=(4*1000*Q)/(pi*31^2), %计算并输出进出口流速m/s
- H=0.1+1000*H2/9.8+H1/10+(U2.^2-U1.^2)/(2*9.8);
- H %计算并输出扬程
- N=N1.*K*c, %轴功率w
- M=(H.*Q*9.8)./N, %离心泵效率
- p1=polyfit(Q,H,4),
- p2=polyfit(Q,N,4),
- p3=polyfit(Q,M,4), %分别拟合扬程,轴功,效率关于流量的关系
- x=0:.01:4;
- y1=polyval(p1,x);
- y2=polyval(p2,x);
- y3=polyval(p3,x);
- ylabels{1}='扬程/m';
- ylabels{2}='轴功率/w';
- ylabels{3}='离心泵效率/%';
- figure('units','normalized',...
- 'DefaultAxesXMinorTick','on','DefaultAxesYminorTick','on');
- [ax,hlines(1),hlines(2)] = plotyy(x,y1,x,y2);
- cfig = get(gcf,'color');
- pos = [0.1 0.1 0.7 0.8];
- offset = pos(3)/5.5;
- pos(3) = pos(3) - offset/2;
- set(ax,'position',pos);
- pos3=[pos(1) pos(2) pos(3)+offset pos(4)];
- limx1=get(ax(1),'xlim');
- limx3=[limx1(1) limx1(1) + 1.2*(limx1(2)-limx1(1))];
- hold on;
- [ax2,hlines2(1),hlines2(2)] = plotyy(Q,H,Q,N);
- set(hlines2(1),'linestyle','none','marker','*');
- set(hlines2(2),'linestyle','none','marker','*');
- ax(3)=axes('Position',pos3,'box','off',...
- 'Color','none','XColor','k','YColor','r',...
- 'xtick',[],'xlim',limx3,'yaxislocation','right');
- hlines(3) = line(x,y3,'Color','r','Parent',ax(3));
- limy3=get(ax(3),'YLim');
- line([limx1(2) limx3(2)],[limy3(1) limy3(1)],...
- 'Color',cfig,'Parent',ax(3),'Clipping','off');
- hlines(3) = line(x,y3,'Color','r','Parent',ax(3));
- hlines2(3) = line(Q,M,'Color','r','Parent',ax(3));
- set(hlines2(3),'linestyle','none','marker','*');
- axes(ax(2))
- set(get(ax(1),'ylabel'),'string',ylabels{1})
- set(get(ax(2),'ylabel'),'string',ylabels{2})
- set(get(ax(3),'ylabel'),'string',ylabels{3})
复制代码 |