燃料的特性系数求解程序

本燃料的特性系数求解程序根据韩昭沧编著,冶金工业出版社《燃料及燃烧》一书第六章三节例题6编写,在C free环境下运行良好。小小程序一个,只求满足老师要求。

#include 
void gasp()
{
float loo2,lo,vro2,vh2o,vog,qd,k,sqro2d,pp,p,n,sqco2,sqo2,co2;
float sqh2,sqch4,sqn2,sqco,ch4,c2h4,co,h2,n2;
printf(“请输入CH4:”);
scanf(“%f”,&ch4);
printf(“请输入C2H4:”);
scanf(“%f”,&c2h4);
printf(“请输入CO:”);
scanf(“%f”,&co);
printf(“请输入H2:”);
scanf(“%f”,&h2);
printf(“请输入CO2:”);
scanf(“%f”,&co2);
printf(“请输入N2:”);
scanf(“%f”,&n2);
printf(“\n”);
printf(“请输入CO2′”);
scanf(“%f”,&sqco2);
printf(“请输入02′:”);
scanf(“%f”,&sqo2);
printf(“请输入H2′:”);
scanf(“%f”,&sqh2);
printf(“请输入CH4′:”);
scanf(“%f”,&sqch4);
printf(“请输入N2′:”);
scanf(“%f”,&sqn2);
printf(“请输入CO':”);
scanf(“%f”,&sqco);
loo2=(0.5*co+0.5*h2+2*ch4+3*c2h4)/100;
lo=4.76*loo2;
vro2=(co2+ch4+2*c2h4+2*co)/100;
vh2o=(h2+2*ch4+2*c2h4)/100;
vog=vro2+0.79*lo+n2/100;
qd=126.4*co+108*h2+358*ch4+591*c2h4;
k=vh2o/vro2;
sqro2d=vro2/vog;
pp=(21-sqro2d)/sqro2d;
p=qd/vog;
printf(“LoO2=%f\nLo=%f\nVro2=%f\nVh20=%f\nVo干=%f\nQ低=%f\nK=%f\nRO2’=%f\nP系数=%f\nP=%f\n”,loo2,lo,vro2,vh2o,vog,qd,k,sqro2d,pp,p);
}
void solidp()
{
}
void six()
{
int i;
printf(“1.for solid and liquid\n2.for gas\n”);
printf(“please choose an fuel\t”);
scanf(“%d”,&i);
if (i==2)
gasp();
else if (i==1)
solidp();
else
{printf(“error,please choose again!\n”);
six();
}
}
main()
{
six();
}

Leave a Reply

Your email address will not be published. Required fields are marked *