program main
integer ::k,e,t11
character ::i,g
real,dimension(12) ::d1,d2,d11,d21,d12,d22,d13,d23
real ::t,aw1,aw2,an1,an2,au1,au2,b1,b2,b12,D,p1,p2
PRINT *,"****************NAME ::MAHESH KUMAR
INAKHIYA********************"
PRINT *,"********************ROLL NO.
::98002033*************************"
PRINT
*,"****************************************************************"
print *,"PROGRAM FOR CALCULAING DEW PRESSURE & LIQUID PHASE MOL
FRACTION"
PRINT *,"****************************************************************"
print *,"****************** YOU HAVE THREE CHOICES
**********************"
PRINT *,"********[1=0 DEGREE C] ,[2=10 DEGREE C],[3=20 DEGREE
C]*********"
PRINT *,"****************ENTER SERIAL NO.[1 , 2 OR
3]********************"
read *,i
PRINT *,"------------------------------------------"
k=1
do while (k==1)
if (i=="1") then
t=273 !for temperature 273 k calculating dew pressure & liquid phase mol
t11=0 !fractions
print *,"YOU HAVE SELECTED THE TEMPERATURE =",t,"K"
print *,"-------------------------------------------"
b1=-890.48 !second
b2=-2407.94 !virial
b12=-1459.93 !coefficients
D=378.5 !at 273 k
aw1=-54.5203 !wilson constants
aw2=54.0592
an1=207.1733 !nrtl constants
an2=-219.2305
au1=-251.4221 !uniquac connstants
au2=329.9772
d1=reshape((/0.00,0.60,0.75,0.86,0.91,0.93,0.96,0.97,0.98,0.992,0.995,1.00/),shape=(/12/))
d2=reshape((/((1-d1(k)),k=1,12)/),shape=(/12/)) !input data (y1 and y2)
call w(d1,d2,aw1,aw2,t,b1,b2,b12,D,t11) !calling wilson function
call n(d1,d2,an1,an2,t,b1,b2,b12,D,t11) !calling nrtl function
call u(d1,d2,au1,au2,t,b1,b2,b12,D,t11) !calling uniquac function
else
if (i=="2") then
t=283 !at temperature 283 k calculating
dew pressure & liquid phase mol
print *,"YOU HAVE SELECTED THE TEMPERATURE =",t,"k"
!fractions
print *,"----------------------------------------------------------------"
t11=10
b1=-674.551 !second
b2=-1467.533 !virial
b12=-997.926 !coefficients
D=146.231 !at 283 k
aw1=-88.1385 !wilson constants
aw2=88.2576
an1=245.3268 !nrtl constants
an2=-261.8777
au1=-288.7026 !uniquac constants
au2=388.3321
d1=reshape((/0.00,0.56,0.72,0.837,0.896,0.925,0.956,0.966,0.98,0.991,0.994,1.0/),shape=(/12/))
d2=reshape((/((1-d1(k)),k=1,12)/),shape=(/12/)) !input datas (y1 & y2)
call w(d1,d2,aw1,aw2,t,b1,b2,b12,D,t11) !calling wilson function
call n(d1,d2,aw1,aw2,t,b1,b2,b12,D,t11) !calling nrtl function
call u(d1,d2,au1,au2,t,b1,b2,b12,D,t11) !calling uniquac function
else
if (i=="3") then
t=293 !at temperature 293 k calculating
dew pressure & liquid phase mol
t11=20
print *,"YOU HAVE SELECTED THE TEMPERATURE =",t,"K"
print
*,"----------------------------------------------------------------"
b1=-757.267 !second
b2=-1992.02 !virial
b12=-1190.014 !coefficients
D=369.259 ! at 293 k
aw1=-117.7690 !wilson constants
aw2=117.5804
an1=281.7871 !nrtl constants
an2=-302.9206
au1=106.3344 !uniquac constants
au2=-106.4543
d1=reshape((/0.00,0.515,0.685,0.816,0.882,0.915,0.951,0.962,0.977,0.99,0.994,1.00/),shape=(/12/))
d2=reshape((/((1-d1(k)),k=1,12)/),shape=(/12/)) !input datas (y1 & y2)
call w(d1,d2,aw1,aw2,t,b1,b2,b12,D,t11) !calling wilson function
call n(d1,d2,aw1,aw2,t,b1,b2,b12,D,t11) !calling nrtl function
call u(d1,d2,au1,au2,t,b1,b2,b12,D,t11) ! calling uniquac function
end if
end if
end if
print *," WANT TO CONTINUE ??(Y/N)"
read *,g
if (g=="y" .or. g=="Y") then
PRINT
*,"----------------------------------------------------------------"
print *,"GIVE YOUR NEXT CHOICE"
read *,i
if (i=="1" .or.
i=="2" .or. i=="3") then
k=1
else
k=2
end if
else
k=2
end if
end do
end program main