资源描述
4100型非增压柴油机热力学计算源程序#includc graphics.h#include conio.h#include dos.h#include stdio.h#include math.hvoid draw(nl,Pa,s 1 ,n2,Pb,l,p,Pz)float n 1 ,Pa,s 1 ,n2,Pb,l,p,Pz;(float k,j;int gdriver,gniode,i,x,y,r,L=500,B=50,u,z;gdriver=DETECT;initgraph(&gdriver,&gmode,);setbkcolor( 15);setcolor(8);cleardevice();line(20,55,20,410);line(20,410,600,410);line(2O.55,l 7,65);line(20,55,23,65);line(600,410,590,407);linc(600,410,590,413);gotoxy(2.4);printf(p);gotoxy(2,5);printf(/);gotoxy(2,6);printf(Ma);k=(float)(L/s l);u=L;z=(int)(B*Pa);gotoxy( 1,2);printf(rn 叩 1-13125);x=L;r=(int)(B*Pa*pow(float)L/x,n 1);u=x;z=r;for(x=L;x=(int)(k);x-)r=(int)(B*Pa*pow(float)L/x,n 1);line(u,400-z,x,400-r);u=x,z=r;line(x+1,400-r,(int)(p*L/s 1 -1 ),(int)(400-B *Pz);j=(float)(L/l);u=L;z=(int)(B*Pb);moveto(505,415);outtext(V* IOe-4/(m*m*m);y=L;r=(int)(B *Pb*pow(float)L/y,n2);u=y;z=r;for(y=L;y=(int)j;y-)r=(int)(B*Pb*pow(float)L/y,n2);line(u,400-z,y.400-r);u=y;z=r;gotoxy(6,4);prinlf(z,);moveto(505,375);outtext(nb);movcto(25,250);outtcxt(c);mo veto(505,400) ;ou ttext( a);arc(L,400-(int)(B*(Pa+(Pb-Pa)/2),270,450,(int)(B*(Pb-Pa)/2);getch();closegraph();main() float Hu=42705,gc=0.86,gh=0.13,go=0.01;float Pz=6.0,a= 1.6,sz=0.70,sb=0.86,Rr=0.03,Tr=750,Qin=0.84,s= 16,P0=0.09,T0=293;float Tl = l 0,sc= 1.11 ,a2= 19.26,b=0.0025,o=0.98;floatTa,Pa,Qv,n 1 ,n2,m,n,Tc,Pc,L(),L,gi,B,B0,Xz,Bz,Cvpmx,Cppmx,Cvpmc,Cvpmz,Cvpmb,Cv l,C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