You are on page 1of 2

#include<stdio.

h>
#include<conio.h>
#include<math.h>
int main()
{
int i,j;
float mTc=190.6,mPc=45.99,mW=0.012;
float eTc=305.3,ePc=48.72,eW=0.100;
float oTc=154.6,oPc=48.72,oW=0.022;
float nTc=126.2,nPc=34.00,nW=0.038;
float hTc=33.9,hPc=13.13,hW=-0.216;
float b0,b1,b,Tr,Pr,v,z,R=0.08205;
printf("\n\tTable for METHANE at pressure 10(10)50atm and Temperature 223(50)773
\n\tTc=%f\tPc=%f\tW=%f the molar volumes are:\n\n\t",mTc,mPc,mW);
for(i=223;i<=773;i=i+50)
{
for(j=10;j<=50;j=j+10)
{
Tr=(float) i/mTc;
Pr=(float) j/mPc;
b1=(float) 0.0139-0.172/pow(Tr,4.2);
b0=(float) 0.083-0.422/pow(Tr,1.6);
b=(float) b0+(mW*b1);
z=(float) 1+((b*Pr)/Tr);
v=(float) (z*R*i)/(j);
printf("%f\t",v);
}
printf("\n\t");
}
printf("\n\tTable for ETHANE at pressure 10(10)50atm and Temperature 223(50)773
\n\tTc=%f\tPc=%f\tW=%f the molar volumes are:\n\n\t",eTc,ePc,eW);
for(i=223;i<=773;i=i+50)
{
for(j=10;j<=50;j=j+10)
{
Tr=(float) i/eTc;
Pr=(float) j/ePc;
b1=(float) 0.0139-0.172/pow(Tr,4.2);
b0=(float) 0.083-0.422/pow(Tr,1.6);
b=(float) b0+(eW*b1);
z=(float) 1+((b*Pr)/Tr);
v=(float) (z*R*i)/(j);
printf("%f\t",v);
}
printf("\n\t");
}
printf("\n\tTable for OXYGEN at pressure 10(10)50atm and Temperature 223(50)773
\n\tTc=%f\tPc=%f\tW=%f the molar volumes are:\n\n\t",oTc,oPc,oW);
for(i=223;i<=773;i=i+50)
{
for(j=10;j<=50;j=j+10)
{
Tr=(float) i/oTc;
Pr=(float) j/oPc;
b1=(float) 0.0139-0.172/pow(Tr,4.2);
b0=(float) 0.083-0.422/pow(Tr,1.6);
b=(float) b0+(oW*b1);
z=(float) 1+((b*Pr)/Tr);

v=(float) (z*R*i)/(j);
printf("%f\t",v);
}
printf("\n\t");
}
printf("\n\tTable for NITROGEN at pressure 10(10)50atm and Temperature 223(50)7
73 \n\tTc=%f\tPc=%f\tW=%f the molar volumes are:\n\n\t",nTc,nPc,nW);
for(i=223;i<=773;i=i+50)
{
for(j=10;j<=50;j=j+10)
{
Tr=(float) i/nTc;
Pr=(float) j/nPc;
b1=(float) 0.0139-0.172/pow(Tr,4.2);
b0=(float) 0.083-0.422/pow(Tr,1.6);
b=(float) b0+(nW*b1);
z=(float) 1+((b*Pr)/Tr);
v=(float) (z*R*i)/(j);
printf("%f\t",v);
}
printf("\n\t");
}
printf("\n\tTable for HYDROGEN at pressure 10(10)50atm and Temperature 223(50)7
73 \n\tTc=%f\tPc=%f\tW=%f the molar volumes are:\n\n\t",hTc,hPc,hW);
for(i=223;i<=773;i=i+50)
{
for(j=10;j<=50;j=j+10)
{
Tr=(float) i/hTc;
Pr=(float) j/hPc;
b1=(float) 0.0139-0.172/pow(Tr,4.2);
b0=(float) 0.083-0.422/pow(Tr,1.6);
b=(float) b0+(hW*b1);
z=(float) 1+((b*Pr)/Tr);
v=(float) (z*R*i)/(j);
printf("%f\t",v);
}
printf("\n\t");
}
getch();
}

You might also like