582

I-PROPATH: Ideal Gases and Ideal Gas Mixtures

8. Application Programs

8.1 Single Shot Programs
I-PROPATH oﬀers the following ﬁve single shot programs.
(1) IPROPAIR calculates properties of air as a mixture of ideal gases.
(2) IPROPCHO calculates properties of complete combustion-by-air products of CX HY OZ .
(3) IPROPIDG calculates properties of ideal gases.
(4) IPROPJNF calculates properties by JANAF-style table.
(5) IPROPKCK calculates properties by Keenan-Chao-Kaye-style gas table.

8.2 Sample Output of IPROPIDG
Do you need ERROR MESSAGES ? NO->0 : YES->1 = 1
This program can calculate properties of the following 54 ideal gases.
ISUB : Name of substance| ISUB : Name of substance
1 : NITROGEN N2|
2 : WATER H20
3 : HYDROGEN H2|
4 : NITRIC MONOXIDE NO
5 : NITROGEN DIOXIDE NO2|
6 : DINITROGEN MONOXIDE N2O
7 : OXYGEN O2|
8 : CARBON MONOXIDE CO
9 : CARBON DIOXIDE CO2|
10 : METHANE CH4
11 : PROPANE C3H8|
12 : ETHYLENE C2H4
13 : CHLORINE CL2|
14 : AMMONIA H3N (NH3)15 : SULFUR DIOXIDE O2S (SO2)|
16 : NEON NE
17 : OZONE O3|
18 : CARBON C
19 : HYDROGEN CHLORIDE HCL|
20 : FLUORINE F2
21 : HYDROGEN IODIDE HI|
22 : HELIUM-4 HE
23 : ARGON AR|
24 : HCFC22 CHCLF2
25 : CFC13 CCLF3|
26 : CHLOROFORM CHCL3
27 : HCFC21 CHCL2F|
28 : CFC12 CCL2F2
29 : METHYLENE CLORIDE CH2CL2|
30 : CARBON TETRAFLUORIDE CF4
31 : METHANOL CH3-OH|
32 : HCFC142B CH3-CCLF2
33 : ETHYL CHLORIDE C2H5CL|
34 : CFC114 CCLF2-CCLF2
35 : HFC152A CH3-CHF2|
36 : ACETYLENE C2H2
37 : ETHANE C2H6|
38 : n-BUTANE C4H10
39 : ISOBUTANE C4H10|
40 : ISOPENTANE C5H12
98 : other substances
Select one of ISUBs (1-40) or (98) = 98
ISUB : Name of substance| ISUB : Name of substance
41 : METHYL CHLORIDE CH3CL|
42 : ACETALDEHYDE C2H4O
43 : ACETIC ACID C2H4O2|
44 : ETHANOL C2H6O
45 : PROPYLENE C3H6|
46 : ACETONE C3H6O
47 : n-PENTANE C5H12|
48 : BENZENE C6H6
49 : n-HEXANE C6H14|
50 : TOLUENE C7H8
51 : n-HEPTANE C7H16|
52 : n-OCTANE C8H18
53 : ISO-OCTANE C8H18|
54 : NAPHTHALENE C10H8
98 : other substances|
99 : Stop.
Select one of ISUBs (41-54) or (98-99) = 50
Name of Substance : TOLUENE C7H8
KPA PRESSURE TEMPERATURE
0
Pa
K
1
bar
C
2
bar
K
3
Pa
C
othersPa
K----------------------------Select one set of units for pressure and temperature : KPA = 0
KMOL
Amount of Substance0kmolApplication Programs
1kgotherskmol----------------------------Select kmol or kg for amount of substance : KMOL = 0
You can select one from the following 8 patterns of calculation
1 : (P,T) >>> V, CP, H, S, etc |2 : (P,V) >>> T, CP, H, S, etc
3 : (T,V) >>> P, CP, H, S, etc |4 : (P,S) >>> T, V, CP, H, etc
5 : (T,S) >>> P, V, CP, H, etc |6 : (V,S) >>> P, T, CP, H, etc
7 : (P,H) >>> T, V, CP, S, etc |8 : (P,U) >>> T, V, CP, S, etc
Input INDEX for pattern of calculation (1-8) = 1
Name of Substance : TOLUENE C7H8INPUT P[Pa] = 1.0E+06
INPUT T[K] = 500
AMM=
92.14100[kg/kmol]
T =500.000[K]P = 0.10000E+07[Pa]V = 0.41573E+01[m^3/kmol]
CP = 0.17078E+06[J/(kmol*K)] CV = 0.16246E+06[J/(kmol*K)]
W = 0.21778E+03[m/s]S = 0.37141E+06[J/(kmol*K)]
H = 0.28222E+08[J/kmol]
U = 0.24065E+08[J/kmol]--------------------------------------------------------1 : CONTINUE
2 : SELECT PATTERN OF CALCULATION
3 : SELECT SYSTEM OF UNITS
4 : SELECT SUBSTANCE
5 : STOP
What do you wish to do next ? Input (1-5) = 2
You can select one from the following 8 patterns of calculation
1 : (P,T) >>> V, CP, H, S, etc |2 : (P,V) >>> T, CP, H, S, etc
3 : (T,V) >>> P, CP, H, S, etc |4 : (P,S) >>> T, V, CP, H, etc
5 : (T,S) >>> P, V, CP, H, etc |6 : (V,S) >>> P, T, CP, H, etc
7 : (P,H) >>> T, V, CP, S, etc |8 : (P,U) >>> T, V, CP, S, etc
Input INDEX for pattern of calculation (1-8) = 6
Name of Substance : TOLUENE C7H8INPUT V[m^3/kmol] = 4.1573
INPUT S[J/(kmol*K)] = 0.37141E+06
AMM=
92.14100[kg/kmol]
T =500.009[K]P = 0.10000E+07[Pa]V = 0.41573E+01[m^3/kmol]
CP = 0.17078E+06[J/(kmol*K)] CV = 0.16246E+06[J/(kmol*K)]
W = 0.21778E+03[m/s]S = 0.37141E+06[J/(kmol*K)]
H = 0.28223E+08[J/kmol]
U = 0.24066E+08[J/kmol]--------------------------------------------------------1 : CONTINUE
2 : SELECT PATTERN OF CALCULATION
3 : SELECT SYSTEM OF UNITS
4 : SELECT SUBSTANCE
5 : STOP
What do you wish to do next ? Input (1-5) = 5
Stop - Program terminated.

8.3 Example of User’s PROGRAM UNIT (IPROPJNF.FOR)
Source program
C *****C This propram calculates properties of ideal gases
C in order to produce a JANAF style gas table
CHARACTER*25 ANAME,IDENTIINTEGER IERR,ISUBREAL TREAL C(1:10)
REAL A(1:4)
COMMON /UNIT/KPA,KGM,MESSCOMMON /CNST/GASCONCHARACTER*25 AANAME(54)INTEGER IP(54)ISUBNO=54
IDISP=40

583

584

I-PROPATH: Ideal Gases and Ideal Gas Mixtures

WRITE(6,2200)
2200 FORMAT(1H ,’ Do you need ERROR MESSAGES ? NO->0 : YES->1 = ’)READ(5,*) IM
CALL IPINIT(0,0,IM,0,0.0)
DO 10 I=1,ISUBNO
IP(I)=I
AANAME(I)=IDENTI(I,’S’)
10 CONTINUE
100 WRITE(6,2100) ISUBNO
2100 FORMAT(1H ,’ This program can calculate properties of ’,
1 ’the following ’,I2,’ ideal gases.’//2 1h ,1X,’ISUB : Name of substance’,10X,
3’| ISUB : Name of substance’)
DO 20 I=1,IDISP,2
WRITE(6,2110) IP(I),AANAME(I),IP(I+1),AANAME(I+1)
2110 FORMAT(1H ,2X,I3,’ : ’,A25,’ | ’,I3,’ : ’,A25)
20 CONTINUEWRITE(6,2120) IDISP
2120 FORMAT(1H ,3X,’98 : other substances’
1/3X,’Select one of ISUBs (1-’,I2,’) or (98) = ’)READ(5,*) ISUB
IF (ISUB .LT. 1 .OR. ISUB .GT. IDISP) THEN
WRITE(6,2140)
2140 FORMAT(2X,’ISUB : Name of substance’,10X,
1’| ISUB : Name of substance’)
DO 30 I=IDISP+1,ISUBNO,2
WRITE(6,2110) IP(I),AANAME(I),IP(I+1),AANAME(I+1)
30 CONTINUEWRITE(6,2160) IDISP+1,ISUBNO
2160 FORMAT(1H ,3X,’98 : other substances’,11X,
1 ’|
99 : Stop.’/
2 3X,’Select one of ISUBs (’,I2,’-’,I2,’) or (98-99) = ’)READ(5,*) ISUB
ENDIF
ANAME=IDENTI(ISUB,’S’)
IF (ISUB .LT. 1 .OR. ISUB .GT. ISUBNO) THEN
IF (ISUB .EQ. 98) THEN
GOTO 100
ELSE
STOP
ENDIF
ENDIF
WRITE(6,2000) ANAME
2000 FORMAT(1H , ’ Name of Substance : ’,A25)
CALL IDGFND(IERR,ISUB,C,ANAME)
AMM=C(1)
WRITE(6,2300) AMM,C(2),C(3),C(4)AKF=-C(7)/(298.15*GASCON)/ALOG(10.0)
WRITE(6,2320) C(5),C(6),C(7),ANAME,AKF
2300 FORMAT(3X,’ Molecular weight= ’, F13.4/
1 3X,’ Critical temperature = ’,F13.3, ’[K]’/2 3X,’ Critical pressure= ’,E13.5, ’[Pa]’/
3 3X,’ Critical volume= ’,E13.5, ’[m**3/kmol]’)
2320 FORMAT(1H ,’ At reference state of 0.1MPa and 298.15 K’/
1 3X,’ Absolute entropy= ’,E13.5,’[J/(kmol*K)]’/
1 3X,’ Enthalpy of formation= ’,E13.5,’[J/kmol]’/
1 3X,’ Gibbs energy of formation = ’,E13.5,’[J/kmol]’/
1 3X,’ Logarithm of the equilibrium constant of the reaction ’/
1 3X,’ for the formation of ’,A25/
1 3X,’ from the elements:log(Kf) = ’,F10.4/)
200 WRITE(6,*) ’ INPUT T [K] = ’
READ(5,*) T
CALL IDGT(IERR,ISUB,T,A,ANAME)
CP=A(1)
CV=CP-GASCONWSOUND=SQRT(CP/CV*GASCON/AMM*T)
S=A(2)
GREF=A(3)H=A(4)
U=H-GASCON*TApplication Programs

585

WRITE(6,1000) ANAME,T,CP,S,GREF,H,CV,WSOUND
1000 FORMAT(1H ,’ Substance : ’,A25/
1 3X,’
T = ’,F12.3,’[K]’/2 3X,’
CP(T) = ’,E12.6,’[J/(kmol*K)]’/
2 3X,’
S0(T) = ’,E12.6,’[J/(kmol*K)]’/
3 3X,’-(G0(T)-H0(298.15K))/T = ’,E12.6,’[J/(kmol*K)]’/
4 3X,’
H(T)-H(298.15K) = ’,E12.6,’[J/kmol]’/
5 3X,’
CV(T) = ’,E12.6,’[J/(kmol*K)]’/
6 3X,’
W= ’,E12.6,’[m/s]’/
7 3X,’-----------------------------------------------’)WRITE(6,*) ’ 1:CONTINUE | 2:SELECT SUBSTANCE | 3:STOP ’
WRITE(6,*) ’ What do you wish to do next ? Input (1-3) = ’
READ(5,*) INUM
IF (INUM .EQ. 1) THEN
GOTO 200
ELSEIF (INUM .EQ. 2) THEN
GOTO 100
ENDIF
STOP
END

Sample output
Do you need ERROR MESSAGES ? NO->0 : YES->1 = 1
This program can calculate properties of the following 54 ideal gases.
ISUB : Name of substance| ISUB : Name of substance
1 : NITROGEN N2|
2 : WATER H20
3 : HYDROGEN H2|
4 : NITRIC MONOXIDE NO
5 : NITROGEN DIOXIDE NO2|
6 : DINITROGEN MONOXIDE N2O
7 : OXYGEN O2|
8 : CARBON MONOXIDE CO
9 : CARBON DIOXIDE CO2|
10 : METHANE CH4
11 : PROPANE C3H8|
12 : ETHYLENE C2H4
13 : CHLORINE CL2|
14 : AMMONIA H3N (NH3)15 : SULFUR DIOXIDE O2S (SO2)|
16 : NEON NE
17 : OZONE O3|
18 : CARBON C
19 : HYDROGEN CHLORIDE HCL|
20 : FLUORINE F2
21 : HYDROGEN IODIDE HI|
22 : HELIUM-4 HE
23 : ARGON AR|
24 : HCFC22 CHCLF2
25 : CFC13 CCLF3|
26 : CHLOROFORM CHCL3
27 : HCFC21 CHCL2F|
28 : CFC12 CCL2F2
29 : METHYLENE CLORIDE CH2CL2|
30 : CARBON TETRAFLUORIDE CF4
31 : METHANOL CH3-OH|
32 : HCFC142B CH3-CCLF2
33 : ETHYL CHLORIDE C2H5CL|
34 : CFC114 CCLF2-CCLF2
35 : HFC152A CH3-CHF2|
36 : ACETYLENE C2H2
37 : ETHANE C2H6|
38 : n-BUTANE C4H10
39 : ISOBUTANE C4H10|
40 : ISOPENTANE C5H12
98 : other substances
Select one of ISUBs (1-40) or (98) = 2
Name of Substance : WATER H20
Molecular weight=
18.0150
Critical temperature =647.130[K]Critical pressure=
0.22055E+08[Pa]Critical volume=0.55950E-01[m**3/kmol]
At reference state of 0.1MPa and 298.15 K
Absolute entropy=
0.18872E+06[J/(kmol*K)]
Enthalpy of formation= -0.24181E+09[J/kmol]
Gibbs energy of formation = -0.22859E+09[J/kmol]
Logarithm of the equilibrium constant of the reaction
for the formation of WATER H20
from the elements:log(Kf) =40.0470
INPUT T [K] = 300
Substance : WATER H20
T =300.000[K]CP(T) = 0.335859E+05[J/(kmol*K)]
S0(T) = 0.188928E+06[J/(kmol*K)]

586

I-PROPATH: Ideal Gases and Ideal Gas Mixtures-(G0(T)-H0(298.15K))/T = 0.188721E+06[J/(kmol*K)]
H(T)-H(298.15K) = 0.621280E+05[J/kmol]
CV(T) = 0.252714E+05[J/(kmol*K)]W= 0.428969E+03[m/s]----------------------------------------------1:CONTINUE | 2:SELECT SUBSTANCE | 3:STOP
What do you wish to do next ? Input (1-3) = 1
INPUT T [K] = 500
Substance : WATER H20
T =500.000[K]CP(T) = 0.352270E+05[J/(kmol*K)]
S0(T) = 0.206414E+06[J/(kmol*K)]-(G0(T)-H0(298.15K))/T = 0.192569E+06[J/(kmol*K)]
H(T)-H(298.15K) = 0.692221E+07[J/kmol]
CV(T) = 0.269125E+05[J/(kmol*K)]W= 0.549600E+03[m/s]----------------------------------------------1:CONTINUE | 2:SELECT SUBSTANCE | 3:STOP
What do you wish to do next ? Input (1-3) = 2
This program can calculate properties of the following 54 ideal gases.
ISUB : Name of substance| ISUB : Name of substance
1 : NITROGEN N2|
2 : WATER H20
3 : HYDROGEN H2|
4 : NITRIC MONOXIDE NO
5 : NITROGEN DIOXIDE NO2|
6 : DINITROGEN MONOXIDE N2O
7 : OXYGEN O2|
8 : CARBON MONOXIDE CO
9 : CARBON DIOXIDE CO2|
10 : METHANE CH4
11 : PROPANE C3H8|
12 : ETHYLENE C2H4
13 : CHLORINE CL2|
14 : AMMONIA H3N (NH3)15 : SULFUR DIOXIDE O2S (SO2)|
16 : NEON NE
17 : OZONE O3|
18 : CARBON C
19 : HYDROGEN CHLORIDE HCL|
20 : FLUORINE F2
21 : HYDROGEN IODIDE HI|
22 : HELIUM-4 HE
23 : ARGON AR|
24 : HCFC22 CHCLF2
25 : CFC13 CCLF3|
26 : CHLOROFORM CHCL3
27 : HCFC21 CHCL2F|
28 : CFC12 CCL2F2
29 : METHYLENE CLORIDE CH2CL2|
30 : CARBON TETRAFLUORIDE CF4
31 : METHANOL CH3-OH|
32 : HCFC142B CH3-CCLF2
33 : ETHYL CHLORIDE C2H5CL|
34 : CFC114 CCLF2-CCLF2
35 : HFC152A CH3-CHF2|
36 : ACETYLENE C2H2
37 : ETHANE C2H6|
38 : n-BUTANE C4H10
39 : ISOBUTANE C4H10|
40 : ISOPENTANE C5H12
98 : other substances
Select one of ISUBs (1-40) or (98) = 98
ISUB : Name of substance| ISUB : Name of substance
41 : METHYL CHLORIDE CH3CL|
42 : ACETALDEHYDE C2H4O
43 : ACETIC ACID C2H4O2|
44 : ETHANOL C2H6O
45 : PROPYLENE C3H6|
46 : ACETONE C3H6O
47 : n-PENTANE C5H12|
48 : BENZENE C6H6
49 : n-HEXANE C6H14|
50 : TOLUENE C7H8
51 : n-HEPTANE C7H16|
52 : n-OCTANE C8H18
53 : ISO-OCTANE C8H18|
54 : NAPHTHALENE C10H8
98 : other substances|
99 : Stop.
Select one of ISUBs (41-54) or (98-99) = 52
Name of Substance : n-OCTANE C8H18
Molecular weight=114.2310
Critical temperature =568.700[K]Critical pressure=
0.24900E+07[Pa]Critical volume=0.48600E+00[m**3/kmol]
At reference state of 0.1MPa and 298.15 K
Absolute entropy=
0.46723E+06[J/(kmol*K)]
Enthalpy of formation= -0.20875E+09[J/kmol]
Gibbs energy of formation =0.16000E+08[J/kmol]
Logarithm of the equilibrium constant of the reaction
for the formation of n-OCTANE C8H18
from the elements:log(Kf) =-2.8031
INPUT T [K] = 500
Substance : n-OCTANE C8H18
T =500.000[K]CP(T) = 0.287545E+06[J/(kmol*K)]

Application Programs

587

S0(T) = 0.588724E+06[J/(kmol*K)]-(G0(T)-H0(298.15K))/T = 0.492094E+06[J/(kmol*K)]
H(T)-H(298.15K) = 0.483151E+08[J/kmol]
CV(T) = 0.279231E+06[J/(kmol*K)]W= 0.193590E+03[m/s]----------------------------------------------1:CONTINUE | 2:SELECT SUBSTANCE | 3:STOP
What do you wish to do next ? Input (1-3) = 3
Stop - Program terminated.

References[1] Daubert, T. E. and Danner, R.P., Physical and Thermodynamic Properties of Pure Chemicals, data compilation, Design Institute for Physical Property Data Americal Institute of Chemical Engineers, Hemisphere,(1991).
[2] Keenan, J. P., Chao, J. and Kaye, J, Gas Tables, 2nd. ed. (SI Units), Wiley, (1983).
[3] Chase, Jr.,M.W. et al., JANAF Thermochemical Tables, 3rd ed., J. Physical and Chemical Reference Data,
Vol.14(1985), supplement No.1.