next up previous
Next: water Up: CHNOSZ examples Previous: info

hkf

hkf>   ## Don't show:
hkf> data(thermo)
thermo: loaded 1997 aqueous, 3089 total species to thermo$obigt
thermo: loaded 5264 proteins to thermo$ECO
thermo: loaded 6717 proteins to thermo$SGD
thermo: loaded 4155 localizations and 3570 abundances to thermo$yeastgfp

hkf> ## End Don't show
hkf>
hkf>   ## aqueous species
hkf>   a <- info(info("methane","aq"))
info: 1291 refers to methane, CH4 aq (AH97b, SSW01, 1.Sep.06).
info: Cp (from EOS) of methane aq differs by -4.8 from tabulated value.

hkf>   hkf(property="Cp",ghs=a,eos=a)
[[1]]
        Cp
1 61.50309


hkf>   # the non-solvation heat capacity
hkf>   hkf(property="Cp",ghs=a,eos=a,contrib="n")
[[1]]
        Cp
1 59.17543


hkf>   # at different temperature and pressure
hkf>   hkf(property="Cp",ghs=a,eos=a,T=c(373.15,473.15),P=1000)
[[1]]
        Cp
1 47.88520
2 47.50141


hkf>   ## crystalline, gas, liquid species
hkf>   a <- info(info("methane","gas"))
info: methane (CH4) available in gas, gas.
info: 2843 refers to methane, CH4 gas (WEP+82, Kel60, 15.Dec.87).
info: 2870 refers to methane, CH4 gas (HOK+98, 30.Aug.06).
info: Cp of methane gas is NA; set by EOS parameters to 8.54.

hkf>   cgl(property="Cp",ghs=a,eos=a)
[[1]]
        Cp
1 8.543362

[[2]]
        Cp
1 8.517083


hkf>   # melting and vaporization of n-octane
hkf>   a <- info(info(rep("n-octane",3),c("cr","liq","gas")))
info: 2266 refers to n-octane, C8H18 cr (HOK+98, 30.Aug.06).
info: 2531 refers to n-octane, C8H18 liq (HOK+98, 30.Aug.06).
info: 2877 refers to n-octane, C8H18 gas (HOK+98, 30.Aug.06).

hkf>   t <- cgl(property="G",ghs=a,eos=a,T=seq(200,420,10),P=1)

hkf>   which.pmax(t,pmin=TRUE)  # 1 = cr, 2 = liq, 3 = gas
 [1] 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3

hkf>   # compare that result with the tabulated
hkf>   # transition temperatures
hkf>   print(a)
         name abbrv formula state source1 source2      date    G      H      S    Cp     V     a
2266 n-octane  <NA>   C8H18    cr  HOK+98    <NA> 30.Aug.06 3951 -65295  59.82 60.03 123.6 -7.08
2531 n-octane  <NA>   C8H18   liq  HOK+98    <NA> 30.Aug.06 1709 -59656  86.25 60.85 158.7  5.27
2877 n-octane  <NA>   C8H18   gas  HOK+98    <NA> 30.Aug.06 4112 -49785 111.30 44.84   0.0 -0.91
          b      c d          e f lambda       T
2266 0.2260 -24000 0  0.000e+00 0      0  216.39
2531 0.1588 731900 0  0.000e+00 0      0  398.82
2877 0.1750      0 0 -7.232e-05 0      0 1000.00


next up previous
Next: water Up: CHNOSZ examples Previous: info