[4] subcrt

## Don't show: data(thermo)
thermo$obigt: 1911 aqueous, 3588 total species
## End(Don't show) ## properties of species subcrt("water")
subcrt: 1 species at 15 values of T and P (wet) $species name formula state ispecies 1 water H2O liq 1 $out $out$water T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 45.03529 -56289.50 -68767.75 15.13238 18.01828 18.20559 2 25.00 1.000000 0.9970614 41.55247 -56687.71 -68316.76 16.71228 18.06830 18.01160 3 50.00 1.000000 0.9880295 38.63281 -57123.89 -67866.54 18.16234 18.23346 18.00464 4 75.00 1.000000 0.9748643 36.15435 -57594.93 -67416.13 19.50485 18.47970 18.04163 5 100.00 1.013220 0.9583926 34.02698 -58098.40 -66963.78 20.75956 18.79731 18.15793 6 125.00 2.320144 0.9390726 32.18315 -58631.71 -66507.34 21.94192 19.18403 18.33334 7 150.00 4.757169 0.9170577 30.57178 -59193.26 -66045.55 23.06398 19.64456 18.56643 8 175.00 8.918049 0.8923427 29.15313 -59781.38 -65576.63 24.13602 20.18866 18.88296 9 200.00 15.536499 0.8647434 27.89596 -60394.50 -65097.99 25.16818 20.83300 19.32884 10 225.00 25.478603 0.8338733 26.77533 -61031.25 -64605.89 26.17117 21.60424 19.97039 11 250.00 39.736493 0.7990719 25.77115 -61690.35 -64095.00 27.15694 22.54515 20.91232 12 275.00 59.431251 0.7592362 24.86701 -62370.65 -63557.52 28.14000 23.72806 22.35126 13 300.00 85.837843 0.7124075 24.04945 -63071.13 -62980.94 29.14072 25.28777 24.73943 14 325.00 120.457572 0.6545772 23.30725 -63790.84 -62341.39 30.19520 27.52189 29.44748 15 350.00 165.211289 0.5746875 22.63103 -64528.89 -61575.58 31.39713 31.34782 43.59852
# calculating at different temperatures subcrt("water", T=seq(0, 100, 10))
subcrt: 1 species at 11 values of T and P (wet) $species name formula state ispecies 1 water H2O liq 1 $out $out$water T P rho logK G H S V Cp 1 1e-02 1.00000 0.9998289 45.03529 -56289.50 -68767.75 15.13238 18.01828 18.20559 2 1e+01 1.00000 0.9997402 43.56558 -56443.94 -68586.98 15.78234 18.01988 18.03185 3 2e+01 1.00000 0.9982319 42.19946 -56604.91 -68406.81 16.40767 18.04711 18.01124 4 3e+01 1.00000 0.9956535 40.92791 -56772.02 -68226.70 17.01183 18.09384 18.01160 5 4e+01 1.00000 0.9922098 39.74171 -56945.08 -68046.60 17.59634 18.15664 18.00788 6 5e+01 1.00000 0.9880295 38.63281 -57123.89 -67866.54 18.16234 18.23346 18.00464 7 6e+01 1.00000 0.9831991 37.59415 -57308.27 -67686.48 18.71111 18.32304 18.00972 8 7e+01 1.00000 0.9777800 36.61946 -57498.06 -67506.30 19.24397 18.42460 18.02755 9 8e+01 1.00000 0.9718175 35.70322 -57693.10 -67325.88 19.76223 18.53764 18.05904 10 9e+01 1.00000 0.9653461 34.84052 -57893.26 -67145.08 20.26708 18.66191 18.10308 11 1e+02 1.01322 0.9583926 34.02698 -58098.40 -66963.78 20.75956 18.79731 18.15793
# calculating at even increments subcrt("water", T=seq(500, 1000, length.out=10), P=seq(5000, 10000, length.out=10))
subcrt: 1 species at 10 values of T and P (wet) $species name formula state ispecies 1 water H2O liq 1 $out $out$water T P rho logK G H S V Cp 1 500.0000 5000.000 0.8760285 18.79959 -66507.32 -58880.39 31.35063 20.56463 16.16781 2 555.5556 5555.556 0.8654972 17.93302 -68000.34 -57864.89 32.27595 20.81486 15.96931 3 611.1111 6111.111 0.8568124 17.18675 -69539.51 -56860.87 33.12421 21.02584 15.76695 4 666.6667 6666.667 0.8497821 16.53864 -71121.37 -55867.36 33.90642 21.19979 15.56827 5 722.2222 7222.222 0.8442069 15.97160 -72742.99 -54883.29 34.63177 21.33979 15.37902 6 777.7778 7777.778 0.8398955 15.47225 -74401.85 -53907.60 35.30791 21.44934 15.20286 7 833.3333 8333.333 0.8366718 15.02998 -76095.79 -52939.27 35.94119 21.53198 15.04167 8 888.8889 8888.889 0.8343802 14.63624 -77822.91 -51977.35 36.53696 21.59112 14.89599 9 944.4444 9444.444 0.8328838 14.28409 -79581.54 -51021.02 37.09966 21.62991 14.76549 10 1000.0000 10000.000 0.8320646 13.96782 -81370.21 -50069.54 37.63302 21.65120 14.64932
# calculating on a temperature-pressure grid subcrt("water", T=c(500, 1000), P=c(5000, 10000), grid="P")
subcrt: 1 species at 4 values of T and P (wet) $species name formula state ispecies 1 water H2O liq 1 $out $out$water T P rho logK G H S V Cp 1 500 5000 0.8760285 18.79959 -66507.32 -58880.39 31.35063 20.56463 16.16781 2 1000 5000 0.6092264 14.47661 -84334.20 -51042.45 39.19692 29.57062 14.91983 3 500 10000 1.0289410 18.16400 -64258.78 -57563.56 30.14555 17.50849 15.21216 4 1000 10000 0.8320646 13.96782 -81370.21 -50069.54 37.63302 21.65120 14.64932
# to calculate only selected properties subcrt("water", property=c("G", "E"))
subcrt: 1 species at 15 values of T and P (wet) $species name formula state ispecies 1 water H2O liq 1 $out $out$water T P G E 1 0.01 1.000000 -56289.50 -0.001441834 2 25.00 1.000000 -56687.71 0.004687396 3 50.00 1.000000 -57123.89 0.008336313 4 75.00 1.000000 -57594.93 0.011305255 5 100.00 1.013220 -58098.40 0.014099350 6 125.00 2.320144 -58631.71 0.016974282 7 150.00 4.757169 -59193.26 0.020162709 8 175.00 8.918049 -59781.38 0.023939775 9 200.00 15.536499 -60394.50 0.028691290 10 225.00 25.478603 -61031.25 0.035033012 11 250.00 39.736493 -61690.35 0.044074816 12 275.00 59.431251 -62370.65 0.058105094 13 300.00 85.837843 -63071.13 0.082759476 14 325.00 120.457572 -63790.84 0.136405967 15 350.00 165.211289 -64528.89 0.324943485
# the properties of multiple species subcrt(c("glucose", "ethanol", "CO2"))
info.character: found ethanol(aq), also available in liq, gas info.character: found CO2(aq), also available in gas subcrt: 3 species at 15 values of T and P (wet) $species name formula state ispecies 1646 glucose C6H12O6 aq 1646 890 ethanol C2H5OH aq 890 1576 CO2 CO2 aq 1576 $out $out$glucose T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 173.79326 -217223.8 -303303.3 58.44726 107.70789 50.82502 2 25.00 1.000000 0.9970614 160.35180 -218759.0 -301469.0 64.85000 112.22417 87.86761 3 50.00 1.000000 0.9880295 149.10680 -220474.8 -299103.3 72.46322 114.29338 99.55370 4 75.00 1.000000 0.9748643 139.59700 -222382.1 -296545.1 80.08605 115.41377 104.46486 5 100.00 1.013220 0.9583926 131.47110 -224476.6 -293901.3 87.41877 116.03858 106.75040 6 125.00 2.320144 0.9390726 124.46178 -226746.2 -291215.0 94.37716 116.33429 107.70121 7 150.00 4.757169 0.9170577 118.36638 -229181.7 -288513.3 100.94173 116.35446 107.74608 8 175.00 8.918049 0.8923427 113.02633 -231771.6 -285815.6 107.10939 116.08233 106.93480 9 200.00 15.536499 0.8647434 108.31637 -234504.0 -283142.8 112.87365 115.42912 105.01902 10 225.00 25.478603 0.8338733 104.13612 -237366.2 -280525.3 118.20917 114.19073 101.30095 11 250.00 39.736493 0.7990719 100.40392 -240344.5 -278017.1 123.04764 111.92173 94.06258 12 275.00 59.431251 0.7592362 97.05201 -243422.8 -275732.2 127.22004 107.56564 78.60677 13 300.00 85.837843 0.7124075 94.02240 -246579.5 -273957.2 130.27534 98.15767 38.89641 14 325.00 120.457572 0.6545772 91.26145 -249778.3 -273648.5 130.69436 72.55735 -106.13397 15 350.00 165.211289 0.5746875 88.70469 -252927.7 -280452.1 119.58704 -46.11750 -1325.30262 $out$ethanol T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 33.94462 -42427.29 -70399.06 29.59045 52.91082 68.20238 2 25.00 1.000000 0.9970614 31.69521 -43240.00 -68770.00 35.30000 55.20200 63.28683 3 50.00 1.000000 0.9880295 29.88323 -44186.44 -67208.90 40.32875 56.33182 61.85543 4 75.00 1.000000 0.9748643 28.40676 -45252.80 -65669.67 44.91690 57.04044 61.37474 5 100.00 1.013220 0.9583926 27.19274 -46429.47 -64136.88 49.16866 57.56610 61.29601 6 125.00 2.320144 0.9390726 26.18661 -47707.13 -62601.14 53.14753 58.01369 61.47463 7 150.00 4.757169 0.9170577 25.34843 -49079.78 -61056.46 56.90185 58.45150 61.90422 8 175.00 8.918049 0.8923427 24.64718 -50541.47 -59495.12 60.47315 58.93974 62.66577 9 200.00 15.536499 0.8647434 24.05878 -52087.04 -57906.18 63.90270 59.55604 63.95424 10 225.00 25.478603 0.8338733 23.56435 -53712.19 -56271.95 67.23866 60.42987 66.19065 11 250.00 39.736493 0.7990719 23.14907 -55413.68 -54560.44 70.54942 61.81808 70.35268 12 275.00 59.431251 0.7592362 22.80148 -57189.95 -52705.65 73.95603 64.31403 79.07374 13 300.00 85.837843 0.7124075 22.51338 -59042.70 -50544.27 77.73378 69.57326 101.31243 14 325.00 120.457572 0.6545772 22.28085 -60981.66 -47538.58 82.75143 83.81245 182.31976 15 350.00 165.211289 0.5746875 22.11123 -63046.77 -40532.04 93.98929 149.93934 862.83506 $out$CO2 T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 73.28680 -91600.98 -100174.87 23.62764 23.69775 57.52860 2 25.00 1.000000 0.9970614 67.61986 -92250.00 -98900.00 28.10000 32.63308 46.92272 3 50.00 1.000000 0.9880295 62.89514 -92999.06 -97771.62 31.73589 36.98426 43.90188 4 75.00 1.000000 0.9748643 58.90255 -93833.46 -96688.36 34.96515 39.65150 42.96155 5 100.00 1.013220 0.9583926 55.49022 -94745.19 -95616.25 37.93904 41.55839 42.91881 6 125.00 2.320144 0.9390726 52.54521 -95727.60 -94536.84 40.73534 43.11612 43.47677 7 150.00 4.757169 0.9170577 49.98284 -96777.08 -93435.29 43.41203 44.56420 44.65024 8 175.00 8.918049 0.8923427 47.73756 -97890.57 -92293.80 46.02206 46.10023 46.66358 9 200.00 15.536499 0.8647434 45.75824 -99066.18 -91086.26 48.62715 47.95527 50.02915 10 225.00 25.478603 0.8338733 44.00464 -100303.46 -89769.31 51.31419 50.48905 55.84130 11 250.00 39.736493 0.7990719 42.44515 -101604.19 -88262.78 54.22810 54.38819 66.63392 12 275.00 59.431251 0.7592362 41.05548 -102974.06 -86398.63 57.65476 61.20897 89.22692 13 300.00 85.837843 0.7124075 39.81865 -104426.83 -83757.27 62.28313 75.25689 146.81664 14 325.00 120.457572 0.6545772 38.72811 -105997.02 -78950.08 70.34180 112.64662 356.56621 15 350.00 165.211289 0.5746875 37.80594 -107797.79 -63808.89 94.70740 284.49343 2118.54037
## properties of reactions subcrt(c("H2O", "H+", "K-feldspar", "kaolinite", "K+", "SiO2"), c(-1, -2, -2, 1, 2, 4))
info.character: found H2O(liq), also available in cr info.character: found K-feldspar(cr), also available in cr_Berman info.character: found kaolinite(cr), also available in cr_Berman info.character: found SiO2(aq), also available in cr, cr, cr, cr, cr, cr, cr, cr_Berman, cr_Berman, cr_Berman, cr_Berman, cr_Berman, cr_Berman, cr_Berman subcrt: 6 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 1 -1 water H2O liq 1 3 -2 H+ H+ aq 3 2059 -2 K-feldspar K(AlSi3)O8 cr 2059 2064 1 kaolinite Al2Si2O5(OH)4 cr 2064 6 2 K+ K+ aq 6 69 4 SiO2 SiO2 aq 69 $out T P rho logK G H S V Cp 2 0.01 1.000000 0.9998289 -9.451752 11813.720 39338.20006 101.037908 -44.45760 -941.315278 3 25.00 1.000000 0.9970614 -7.360641 10041.711 24831.75533 49.857720 -54.01690 -349.644469 4 50.00 1.000000 0.9880295 -6.136706 9073.958 18785.94820 30.286323 -59.01240 -163.141374 5 75.00 1.000000 0.9748643 -5.298797 8441.137 15826.58001 21.428921 -62.44680 -83.488468 6 100.00 1.013220 0.9583926 -4.665077 7965.252 14287.68746 17.144501 -65.31326 -43.880256 7 125.00 2.320144 0.9390726 -4.151839 7563.877 13480.10876 15.047763 -68.08975 -22.842309 8 150.00 4.757169 0.9170577 -3.717503 7197.853 13059.70592 14.030222 -71.12250 -11.993008 9 175.00 8.918049 0.8923427 -3.339037 6847.024 12822.53490 13.501163 -74.74984 -7.903078 10 200.00 15.536499 0.8647434 -3.003486 6502.520 12610.16680 13.067065 -79.46467 -10.251158 11 225.00 25.478603 0.8338733 -2.704161 6163.820 12247.51337 12.363201 -86.27006 -20.738785 12 250.00 39.736493 0.7990719 -2.439019 5838.465 11500.79101 10.966953 -97.24159 -43.800069 13 275.00 59.431251 0.7592362 -2.210196 5543.544 10000.14985 8.267154 -116.71119 -91.071487 14 300.00 85.837843 0.7124075 -2.025094 5310.931 6970.20507 3.025926 -155.04184 -202.796812 15 325.00 120.457572 0.6545772 -1.902996 5208.411 -90.00301 -8.732556 -246.90325 -584.941499 16 350.00 165.211289 0.5746875 -1.911357 5449.941 -25312.56633 -49.245722 -616.91895 -3449.033414
subcrt(c("glucose", "ethanol", "CO2"), c(-1, 2, 2))
info.character: found ethanol(aq), also available in liq, gas info.character: found CO2(aq), also available in gas subcrt: 3 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 1646 -1 glucose C6H12O6 aq 1646 890 2 ethanol C2H5OH aq 890 1576 2 CO2 CO2 aq 1576 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 40.66957 -50832.79 -37844.536 47.98891 45.50927 200.6369 2 25.00 1.000000 0.9970614 38.27834 -52221.00 -33871.000 61.95000 63.44599 132.5515 3 50.00 1.000000 0.9880295 36.44995 -53896.22 -30857.727 71.66607 72.33878 111.9609 4 75.00 1.000000 0.9748643 35.02162 -55790.46 -28170.938 79.67805 77.97012 104.2077 5 100.00 1.013220 0.9583926 33.89483 -57872.76 -25604.990 86.79663 82.21039 101.6792 6 125.00 2.320144 0.9390726 33.00187 -60123.26 -23060.994 93.38858 85.92534 102.2016 7 150.00 4.757169 0.9170577 32.29614 -62531.99 -20470.237 99.68602 89.67693 105.3628 8 175.00 8.918049 0.8923427 31.74314 -65092.44 -17762.245 105.88104 93.99761 111.7239 9 200.00 15.536499 0.8647434 31.31767 -67802.47 -14842.038 112.18604 99.59350 122.9478 10 225.00 25.478603 0.8338733 31.00186 -70665.13 -11557.219 118.89653 107.64711 142.7630 11 250.00 39.736493 0.7990719 30.78452 -73691.25 -7629.306 126.50739 120.49082 179.9106 12 275.00 59.431251 0.7592362 30.66191 -76905.24 -2476.394 136.00153 143.48036 257.9946 13 300.00 85.837843 0.7124075 30.64165 -80359.59 5354.097 149.75849 191.50263 457.3617 14 325.00 120.457572 0.6545772 30.75647 -84179.02 20671.189 175.49211 320.36080 1183.9059 15 350.00 165.211289 0.5746875 31.12965 -88761.39 71770.242 257.80634 914.98305 7288.0535
# to specify the states subcrt(c("glucose", "ethanol", "CO2"), c(-1, 2, 2), c("aq", "aq", "gas"))
subcrt: 3 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 1646 -1 glucose C6H12O6 aq 1646 890 2 ethanol C2H5OH aq 890 3308 2 carbon dioxide CO2 gas 3308 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 42.88704 -53604.40 -26028.639 101.3915 -1.8862397 102.34544 2 25.00 1.000000 0.9970614 41.21623 -56229.00 -24173.000 107.9200 -1.8201698 56.46352 3 50.00 1.000000 0.9880295 39.88726 -58978.76 -22962.279 111.8268 -1.6297424 42.70901 4 75.00 1.000000 0.9748643 38.80199 -61812.69 -21969.808 114.7874 -1.3328898 37.48775 5 100.00 1.013220 0.9583926 37.90191 -64714.54 -21060.999 117.3091 -0.9063873 35.58995 6 125.00 2.320144 0.9390726 37.14776 -67676.30 -20176.164 119.6044 -0.3069069 35.46129 7 150.00 4.757169 0.9170577 36.51154 -70693.87 -19278.015 121.7918 0.5485414 36.67863 8 175.00 8.918049 0.8923427 35.97272 -73765.61 -18333.081 123.9605 1.7971544 39.36756 9 200.00 15.536499 0.8647434 35.51606 -76891.95 -17299.668 126.2023 3.6829584 44.17634 10 225.00 25.478603 0.8338733 35.13042 -80075.70 -16112.956 128.6422 6.6690119 52.65233 11 250.00 39.736493 0.7990719 34.80821 -83323.06 -14655.508 131.4879 11.7144402 68.47465 12 275.00 59.431251 0.7592362 34.54557 -86646.11 -12682.072 135.1535 21.0624187 101.61176 13 300.00 85.837843 0.7124075 34.34387 -90068.89 -9579.707 140.6430 40.9888515 186.02149 14 325.00 120.457572 0.6545772 34.21551 -93646.25 -3317.037 151.2155 95.0675532 493.27418 15 350.00 165.211289 0.5746875 34.21152 -97548.86 18064.615 185.7239 345.9961867 3073.66899
## auto balancing reactions # the basis species must first be defined basis(c("CO2", "H2O", "NH3", "H2S", "O2"))
C H N O S ispecies logact state CO2 1 0 0 2 0 1576 0 aq H2O 0 2 0 1 0 1 0 liq NH3 0 3 1 0 0 66 0 aq H2S 0 2 0 0 1 67 0 aq O2 0 0 0 2 0 65 0 aq
subcrt(c("glucose", "ethanol"), c(-1, 3))
info.character: found ethanol(aq), also available in liq, gas subcrt: 2 species at 15 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: H O -6 3 subcrt: adding missing composition from basis definition and restarting... subcrt: 4 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 1646 -1 glucose C6H12O6 aq 1646 890 3 ethanol C2H5OH aq 890 1 -3 water H2O liq 1 65 3 O2 O2 aq 65 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 -217.95812 272425.3 284802.5 45.81304 79.97637 340.3505 2 25.00 1.000000 0.9970614 -198.61851 270964.1 291409.3 69.03316 90.67952 215.8354 3 50.00 1.000000 0.9880295 -181.94753 269034.3 296249.9 84.64423 95.95173 177.7373 4 75.00 1.000000 0.9748643 -167.45220 266756.2 300481.4 97.26352 99.29786 162.9699 5 100.00 1.013220 0.9583926 -154.72678 264183.8 304473.2 108.33841 101.91874 157.4356 6 125.00 2.320144 0.9390726 -143.45593 261350.0 308398.1 118.51123 104.43252 157.1366 7 150.00 4.757169 0.9170577 -133.39069 258271.9 312371.6 128.17393 107.36160 161.1990 8 175.00 8.918049 0.8923427 -124.33441 254960.0 316507.9 137.64363 111.32308 170.3653 9 200.00 15.536499 0.8647434 -116.12863 251417.5 320957.2 147.26163 117.27683 187.1644 10 225.00 25.478603 0.8338733 -108.64292 247638.9 325959.1 157.49741 126.97241 217.4582 11 250.00 39.736493 0.7990719 -101.76646 243606.1 331953.8 169.13849 144.01200 275.1917 12 275.00 59.431251 0.7592362 -95.39978 239278.7 339869.1 183.75906 176.86056 398.3126 13 300.00 85.837843 0.7124075 -89.44328 234570.4 352040.5 205.19449 249.36991 716.6744 14 325.00 120.457572 0.6545772 -83.77084 229276.9 376250.7 245.94317 451.73020 1889.0376 15 350.00 165.211289 0.5746875 -78.12013 222747.5 458520.0 378.57592 1409.77608 11815.4012
# a bug in CHNOSZ <0.9 caused the following # to initiate an infinite loop basis(c("H2O", "H2S", "O2", "H+"))
H O S Z ispecies logact state H2O 2 1 0 0 1 0 liq H2S 2 0 1 0 67 0 aq O2 0 2 0 0 65 0 aq H+ 1 0 0 1 3 0 aq
subcrt(c("HS-", "SO4-2"), c(-1, 1))
subcrt: 2 species at 15 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: H O Z 1 -4 1 subcrt: adding missing composition from basis definition and restarting... subcrt: 4 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 22 -1 HS- HS- aq 22 24 1 SO4-2 SO4-2 aq 24 65 -2 O2 O2 aq 65 3 1 H+ H+ aq 3 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 152.09929 -190108.5 -203112.5 -47.58301 -65.26364 -237.3256 2 25.00 1.000000 0.9970614 138.31689 -188698.0 -207750.0 -63.88000 -68.29359 -153.0663 3 50.00 1.000000 0.9880295 126.43759 -186955.2 -211222.0 -75.07540 -70.60404 -129.1002 4 75.00 1.000000 0.9748643 116.10567 -184959.7 -214336.5 -84.36212 -72.97053 -121.6743 5 100.00 1.013220 0.9583926 107.02950 -182744.4 -217363.5 -92.75848 -75.79064 -121.3545 6 125.00 2.320144 0.9390726 98.98249 -180327.7 -220442.4 -100.73722 -79.41030 -125.5894 7 150.00 4.757169 0.9170577 91.78553 -177715.7 -223677.2 -108.60281 -84.27817 -133.8745 8 175.00 8.918049 0.8923427 85.29700 -174909.9 -227171.8 -116.60314 -91.00760 -147.0027 9 200.00 15.536499 0.8647434 79.40248 -171905.7 -231091.0 -125.07483 -100.71187 -169.3706 10 225.00 25.478603 0.8338733 74.00643 -168689.0 -235743.7 -134.59501 -115.98979 -208.2014 11 250.00 39.736493 0.7990719 69.02565 -165232.0 -241638.0 -146.03817 -142.43837 -275.9048 12 275.00 59.431251 0.7592362 64.38407 -161486.1 -249626.6 -160.78513 -191.66455 -400.8890 13 300.00 85.837843 0.7124075 60.00618 -157369.8 -261518.9 -181.70257 -290.70754 -679.1648 14 325.00 120.457572 0.6545772 55.79820 -152717.1 -283287.1 -218.27939 -527.91937 -1603.7790 15 350.00 165.211289 0.5746875 51.55551 -147002.6 -348574.1 -323.46203 -1468.38436 -8259.5136
# because O2,aq is in the basis, this is a non-reaction # (O2,aq to O2,aq) subcrt("O2", 1, "aq")
subcrt: 1 species at 15 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: O -2 subcrt: balanced reaction, but it is a non-reaction; restarting... subcrt: 2 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 1 1 O2 O2 aq 65 2 -1 O2 O2 aq 65 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 0 0 0 0 0 0 2 25.00 1.000000 0.9970614 0 0 0 0 0 0 3 50.00 1.000000 0.9880295 0 0 0 0 0 0 4 75.00 1.000000 0.9748643 0 0 0 0 0 0 5 100.00 1.013220 0.9583926 0 0 0 0 0 0 6 125.00 2.320144 0.9390726 0 0 0 0 0 0 7 150.00 4.757169 0.9170577 0 0 0 0 0 0 8 175.00 8.918049 0.8923427 0 0 0 0 0 0 9 200.00 15.536499 0.8647434 0 0 0 0 0 0 10 225.00 25.478603 0.8338733 0 0 0 0 0 0 11 250.00 39.736493 0.7990719 0 0 0 0 0 0 12 275.00 59.431251 0.7592362 0 0 0 0 0 0 13 300.00 85.837843 0.7124075 0 0 0 0 0 0 14 325.00 120.457572 0.6545772 0 0 0 0 0 0 15 350.00 165.211289 0.5746875 0 0 0 0 0 0
# but this one auto-balances into a reaction # (O2,aq to O2,gas) subcrt("O2", 1, "gas")
subcrt: 1 species at 15 values of T and P subcrt: reaction is not balanced; it is missing this composition: O -2 subcrt: adding missing composition from basis definition and restarting... subcrt: 2 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 3316 1 oxygen O2 gas 3316 65 -1 O2 O2 aq 65 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 2.656687 -3320.586 4361.8461 28.1249163 -27.66888 -73.49798 2 25.00 1.000000 0.9970614 2.898308 -3954.000 2900.0000 22.9890000 -30.50086 -48.95093 3 50.00 1.000000 0.9880295 3.031142 -4481.957 1785.1458 19.3943154 -31.98335 -41.47943 4 75.00 1.000000 0.9748643 3.093977 -4928.796 789.2631 16.4246130 -33.00981 -38.63368 5 100.00 1.013220 0.9583926 3.107563 -5305.920 -161.8658 13.7859429 -33.88365 -37.67805 6 125.00 2.320144 0.9390726 3.085280 -5620.806 -1104.4038 11.3438961 -34.75928 -37.83217 7 150.00 4.757169 0.9170577 3.035406 -5877.172 -2063.2277 9.0136235 -35.76508 -38.95080 8 175.00 8.918049 0.8923427 2.963773 -6077.509 -3064.1786 6.7243125 -37.05072 -41.24160 9 200.00 15.536499 0.8647434 2.874244 -6222.712 -4142.1057 4.3977102 -38.84561 -45.31458 10 225.00 25.478603 0.8338733 2.769060 -6311.750 -5352.9001 1.9251644 -41.56208 -52.53584 11 250.00 39.736493 0.7990719 2.648842 -6340.734 -6798.6345 -0.8749501 -46.03831 -66.10741 12 275.00 59.431251 0.7592362 2.512101 -6300.773 -8692.5193 -4.3629955 -54.22276 -94.67562 13 300.00 85.837843 0.7124075 2.353677 -6172.661 -11566.6858 -9.4108951 -71.55704 -167.67256 14 325.00 120.457572 0.6545772 2.159588 -5910.692 -17182.7524 -18.8445872 -118.47196 -433.78257 15 350.00 165.211289 0.5746875 1.882993 -5369.065 -35905.6760 -49.0033546 -335.96134 -2669.78285
# properties of a species and a formation # reaction for that species subcrt("C2H5OH") # species
info.character: found C2H5OH(aq), also available in liq, gas subcrt: 1 species at 15 values of T and P (wet) $species name formula state ispecies 890 ethanol C2H5OH aq 890 $out $out$ethanol T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 33.94462 -42427.29 -70399.06 29.59045 52.91082 68.20238 2 25.00 1.000000 0.9970614 31.69521 -43240.00 -68770.00 35.30000 55.20200 63.28683 3 50.00 1.000000 0.9880295 29.88323 -44186.44 -67208.90 40.32875 56.33182 61.85543 4 75.00 1.000000 0.9748643 28.40676 -45252.80 -65669.67 44.91690 57.04044 61.37474 5 100.00 1.013220 0.9583926 27.19274 -46429.47 -64136.88 49.16866 57.56610 61.29601 6 125.00 2.320144 0.9390726 26.18661 -47707.13 -62601.14 53.14753 58.01369 61.47463 7 150.00 4.757169 0.9170577 25.34843 -49079.78 -61056.46 56.90185 58.45150 61.90422 8 175.00 8.918049 0.8923427 24.64718 -50541.47 -59495.12 60.47315 58.93974 62.66577 9 200.00 15.536499 0.8647434 24.05878 -52087.04 -57906.18 63.90270 59.55604 63.95424 10 225.00 25.478603 0.8338733 23.56435 -53712.19 -56271.95 67.23866 60.42987 66.19065 11 250.00 39.736493 0.7990719 23.14907 -55413.68 -54560.44 70.54942 61.81808 70.35268 12 275.00 59.431251 0.7592362 22.80148 -57189.95 -52705.65 73.95603 64.31403 79.07374 13 300.00 85.837843 0.7124075 22.51338 -59042.70 -50544.27 77.73378 69.57326 101.31243 14 325.00 120.457572 0.6545772 22.28085 -60981.66 -47538.58 82.75143 83.81245 182.31976 15 350.00 165.211289 0.5746875 22.11123 -63046.77 -40532.04 93.98929 149.93934 862.83506
basis("CHNOS")
C H N O S ispecies logact state CO2 1 0 0 2 0 1576 -3 aq H2O 0 2 0 1 0 1 0 liq NH3 0 3 1 0 0 66 -4 aq H2S 0 2 0 0 1 67 -7 aq O2 0 0 0 2 0 3316 -80 gas
subcrt("C2H5OH", 1) # reaction
info.character: found C2H5OH(aq), also available in liq, gas subcrt: 1 species at 15 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: C H O -2 -6 -1 subcrt: adding missing composition from basis definition and restarting... subcrt: 4 species at 15 values of T and P (wet) $reaction coeff name formula state ispecies 890 1 ethanol C2H5OH aq 890 1576 -2 CO2 CO2 aq 1576 1 -3 water H2O liq 1 3316 3 oxygen O2 gas 3316 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 -250.6576 313296.3 335732.6 82.19888 -48.53953 -80.78034 2 25.00 1.000000 0.9970614 -228.2019 311323.1 333980.3 76.05016 -64.26905 -63.56889 3 50.00 1.000000 0.9880295 -209.3041 309484.6 332463.1 71.16111 -72.33710 -58.66193 4 75.00 1.000000 0.9748643 -193.1919 307760.3 331020.1 66.85930 -77.70167 -57.13882 5 100.00 1.013220 0.9583926 -179.2989 306138.8 329592.6 62.89961 -81.94260 -57.27778 6 125.00 2.320144 0.9390726 -167.2020 304610.8 328145.9 59.15434 -85.77065 -58.56148 7 150.00 4.757169 0.9170577 -156.5806 303172.4 326652.1 55.52878 -89.61058 -61.01628 8 175.00 8.918049 0.8923427 -147.1862 301819.9 325077.6 51.93553 -93.82668 -65.08332 9 200.00 15.536499 0.8647434 -138.8236 300551.8 323372.9 48.26872 -98.85351 -71.72714 10 225.00 25.478603 0.8338733 -131.3376 299368.8 321457.6 44.37637 -105.36096 -82.91224 11 250.00 39.736493 0.7990719 -124.6045 298275.2 319187.2 40.00625 -114.59376 -103.04112 12 275.00 59.431251 0.7592362 -118.5254 297281.6 316268.0 34.66854 -129.28808 -143.70881 13 300.00 85.837843 0.7124075 -113.0239 296412.0 311986.4 27.20332 -156.80384 -243.70498 14 325.00 120.457572 0.6545772 -108.0485 295723.8 304031.2 13.91730 -224.04646 -596.21604 15 350.00 165.211289 0.5746875 -103.6008 295401.7 279032.7 -26.24049 -513.09098 -3482.00081
## mineral polymorphs # properties of the stable polymorph subcrt("pyrrhotite")
info.character: found pyrrhotite(cr) with 2 phase transitions subcrt: 1 species at 15 values of T and P subcrt: 3 phases for pyrrhotite ... phases 1 2 3 are stable $species name formula state ispecies 2117 pyrrhotite FeS cr* 2117 $out $out$pyrrhotite T P logK G H S V Cp polymorph 1 0.01 1.000000 18.99174 -23737.73 -24318.15 13.29594 18.2 12.40142 1 2 25.00 1.000000 17.65373 -24084.00 -24000.00 14.41000 18.2 13.06116 1 3 50.00 1.000000 16.54077 -24457.79 -23665.22 15.48790 18.2 13.72116 1 4 75.00 1.000000 15.60432 -24858.14 -23313.94 16.53464 18.2 14.38116 1 5 100.00 1.013220 14.80847 -25284.30 -22946.16 17.55455 18.2 15.04116 1 6 125.00 2.320144 14.12608 -25735.09 -22561.31 18.55111 18.2 15.70116 1 7 150.00 4.757169 13.54563 -26227.13 -21574.90 20.94896 18.2 17.40000 2 8 175.00 8.918049 13.05065 -26761.64 -21138.09 21.94774 18.2 17.40000 2 9 200.00 15.536499 12.61870 -27319.37 -20700.21 22.89229 18.2 17.40000 2 10 225.00 25.478603 12.23956 -27898.65 -20260.89 23.78820 18.2 17.40000 2 11 250.00 39.736493 11.90499 -28497.89 -19819.68 24.64022 18.2 17.40000 2 12 275.00 59.431251 11.60830 -29115.56 -19376.12 25.45247 18.2 17.40000 2 13 300.00 85.837843 11.34393 -29750.16 -18929.63 26.22848 18.2 17.40000 2 14 325.00 120.457572 11.10731 -30400.19 -18360.14 27.17109 18.2 13.62360 3 15 350.00 165.211289 10.89557 -31067.03 -17999.33 27.73012 18.2 13.68310 3
# properties of just the high-T phase subcrt(c("pyrrhotite"), state="cr2")
subcrt: 1 species at 15 values of T and P subcrt: some points above temperature limit for pyrrhotite cr2 (using NA for G) $species name formula state ispecies 2118 pyrrhotite FeS cr2 2118 $out $out$pyrrhotite T P logK G H S V Cp 1 0.01 1.000000 NA NA -24186.36 13.33352 18.2 17.4 2 25.00 1.000000 NA NA -23751.53 14.85670 18.2 17.4 3 50.00 1.000000 NA NA -23316.53 16.25775 18.2 17.4 4 75.00 1.000000 NA NA -22881.53 17.55434 18.2 17.4 5 100.00 1.013220 NA NA -22446.53 18.76098 18.2 17.4 6 125.00 2.320144 NA NA -22010.96 19.88934 18.2 17.4 7 150.00 4.757169 13.54563 -26227.13 -21574.90 20.94896 18.2 17.4 8 175.00 8.918049 13.05065 -26761.64 -21138.09 21.94774 18.2 17.4 9 200.00 15.536499 12.61870 -27319.37 -20700.21 22.89229 18.2 17.4 10 225.00 25.478603 12.23956 -27898.65 -20260.89 23.78820 18.2 17.4 11 250.00 39.736493 11.90499 -28497.89 -19819.68 24.64022 18.2 17.4 12 275.00 59.431251 11.60830 -29115.56 -19376.12 25.45247 18.2 17.4 13 300.00 85.837843 11.34393 -29750.16 -18929.63 26.22848 18.2 17.4 14 325.00 120.457572 NA NA -18479.57 26.97136 18.2 17.4 15 350.00 165.211289 NA NA -18025.10 27.68382 18.2 17.4
# polymorphic transitions in a reaction subcrt(c("pyrite", "pyrrhotite", "H2O", "H2S", "O2"), c(-1, 1, -1, 1, 0.5))
info.character: found pyrrhotite(cr) with 2 phase transitions info.character: found H2O(liq), also available in cr info.character: found H2S(aq), also available in gas info.character: found O2(aq), also available in gas subcrt: 5 species at 15 values of T and P (wet) subcrt: 3 phases for pyrrhotite ... phases 1 2 3 are stable $reaction coeff name formula state ispecies 2113 -1 pyrite FeS2 cr 2113 2117 1 pyrrhotite FeS cr* 2117 2118 1 water H2O liq 1 2119 1 H2S H2S aq 67 1 -1 O2 O2 aq 65 $out T P rho logK G H S V Cp 1 0.01 1.000000 0.9998289 -53.47691 66840.65 73339.88 22.70674 23.10270 76.74467 2 25.00 1.000000 0.9970614 -48.52556 66200.71 74865.76 28.06772 26.39336 51.00948 3 50.00 1.000000 0.9880295 -44.26397 65450.32 76026.28 31.80971 27.91824 43.15399 4 75.00 1.000000 0.9748643 -40.56143 64615.53 77062.23 34.89890 28.78001 40.18033 5 100.00 1.013220 0.9583926 -37.31254 63708.23 78050.85 37.64160 29.34015 39.12761 6 125.00 2.320144 0.9390726 -34.43608 62736.12 79028.07 40.17404 29.76504 39.13721 7 150.00 4.757169 0.9170577 -31.85931 61686.20 80601.30 43.99962 30.17151 41.01710 8 175.00 8.918049 0.8923427 -29.53252 60559.34 81640.37 46.37813 30.67442 42.09967 9 200.00 15.536499 0.8647434 -27.42532 59375.58 82721.78 48.71506 31.43590 44.46420 10 225.00 25.478603 0.8338733 -25.50504 58135.77 83885.82 51.09582 32.74266 49.05383 11 250.00 39.736493 0.7990719 -23.74428 56838.49 85205.66 53.65670 35.18422 58.16419 12 275.00 59.431251 0.7592362 -22.11913 55478.50 86835.57 56.66407 40.15607 78.10607 13 300.00 85.837843 0.7124075 -20.60685 54042.73 89165.33 60.76234 51.62291 130.60170 14 325.00 120.457572 0.6545772 -19.18124 52498.15 93619.35 68.25133 84.68212 322.55027 15 350.00 165.211289 0.5746875 -17.79281 50733.45 107614.36 90.80356 244.66856 1993.44198 $polymorphs T P rho pyrrhotite 1 0.01 1.000000 0.9998289 1 2 25.00 1.000000 0.9970614 1 3 50.00 1.000000 0.9880295 1 4 75.00 1.000000 0.9748643 1 5 100.00 1.013220 0.9583926 1 6 125.00 2.320144 0.9390726 1 7 150.00 4.757169 0.9170577 2 8 175.00 8.918049 0.8923427 2 9 200.00 15.536499 0.8647434 2 10 225.00 25.478603 0.8338733 2 11 250.00 39.736493 0.7990719 2 12 275.00 59.431251 0.7592362 2 13 300.00 85.837843 0.7124075 2 14 325.00 120.457572 0.6545772 3 15 350.00 165.211289 0.5746875 3
## these produce messages about problems with the calculation # above the T, P limits for the H2O equations of state subcrt("alanine", T=c(2250, 2251), P=c(30000, 30001), grid="T")
info.character: found alanine(aq), also available in cr subcrt: 1 species at 4 values of T and P (wet) water.SUPCRT92: errors calculating 3 of 5 points; T < Tfusion@P, T > 2250 degC, or P > 30kb. $species name formula state ispecies 1611 alanine C3H7NO2 aq 1611 $out $out$alanine T P rho logK G H S V Cp 1 2250 30000 1.026316 -Inf Inf NaN NaN NaN NaN 2 2250 30001 0.000000 NA NA NA NA NA NA 3 2251 30000 0.000000 NA NA NA NA NA NA 4 2251 30001 0.000000 NA NA NA NA NA NA
# Psat is not defined above the critical point ## Not run: ##D ## (also gives a warning) ##D subcrt("alanine", T=seq(0, 5000, by=1000)) ## End(Not run) ## minerals with phase transitions # compare calculated values of heat capacity of iron with # values from Robie and Hemingway, 1995 T.units("K")
changed temperature units to K
E.units("J")
changed energy units to J
# we set pressure here otherwise subcrt uses Psat (saturation # vapor pressure of H2O above 100 degrees C) which can not be # calculated above the critical point of H2O (~647 K) s <- subcrt("Fe", T=seq(300, 1800, 20), P=1)
info.character: found Fe(cr) with 3 phase transitions subcrt: 1 species at 76 values of T and P subcrt: 4 phases for iron ... phases 1 2 3 4 are stable
plot(s$out[[1]]$T, s$out[[1]]$Cp, type="l", xlab=axis.label("T"), ylab=axis.label("Cp")) # add points from RH95 RH95 <- read.csv(system.file("extdata/cpetc/RH95.csv", package="CHNOSZ")) points(RH95[,1], RH95[,2]) title(main=paste("Heat capacity of Fe(cr)\n", "(points - Robie and Hemingway, 1995)"))

Image subcrt1

 

# reset the units to default values T.units("C")
changed temperature units to C
E.units("cal")
changed energy units to cal
## Skarn example after Johnson et al., 1992 P <- seq(500, 5000, 500) # this is like the temperature specification used # in the example by Johnson et al., 1992 # T <- seq(0, 1000, 100) # we use this one to avoid warnings at 0 deg C, 5000 bar T <- c(2, seq(100, 1000, 100)) s <- subcrt(c("andradite", "carbon dioxide", "H2S", "Cu+", "quartz", "calcite", "chalcopyrite", "H+", "H2O"), coeff=c(-1, -3, -4, -2, 3, 3, 2, 2, 3), state=c("cr", "g", "aq", "aq", "cr", "cr", "cr", "aq", "liq"), P=P, T=T, grid="P")
subcrt: 9 species at 110 values of T and P (wet) subcrt: 2 phases for quartz ... phases 1 2 are stable subcrt: 3 phases for chalcopyrite ... phases 1 2 3 are stable
# The results are not identical to SUPCRT92, as CHNOSZ has updated # parameters for species e.g. Cu+ from Shock et al., 1997. # Check the calculated phase transitions for chalcopyrite stopifnot(all.equal(s$polymorphs$chalcopyrite[1:11], c(1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3))) ## Standard Gibbs energy of reactions with HCN and ## formaldehyde, after Schulte and Shock, 1995 Fig. 1 rxn1 <- subcrt(c("formaldehyde","HCN","H2O","glycolic acid","NH3"), c(-1,-1,-2,1,1),P=300)
info.character: found H2O(liq), also available in cr info.character: found NH3(aq), also available in gas subcrt: 5 species at 15 values of T and P (wet)
rxn2 <- subcrt(c("formaldehyde","HCN","H2O","glycine"), c(-1,-1,-1,1),P=300)
info.character: found H2O(liq), also available in cr info.character: found glycine(aq), also available in cr subcrt: 4 species at 15 values of T and P (wet)
plot(x=rxn1$out$T,rxn1$out$G/1000,type="l",ylim=c(-40,-10), xlab=axis.label("T"),ylab=axis.label("DG0r","k")) lines(rxn1$out$T,rxn2$out$G/1000) # write the reactions on the plot text(150, -14, describe.reaction(rxn1$reaction, iname=c(1,2,4))) text(200, -35, describe.reaction(rxn2$reaction, iname=c(1,2))) title(main=paste("Standard Gibbs energy of reactions", "after Schulte and Shock, 1995",sep="\n"))

Image subcrt2

 

## Calculation of chemical affinities # after LaRowe and Helgeson, 2007, Fig. 3 (a): reduction of nicotinamide # adenine dinucleotide (NAD) coupled to oxidation of glucose # list the available NAD species info("NAD ")
info.approx: 'NAD ' is ambiguous; has approximate matches to 16 species: [1] "H2NAD(red)" "HNAD(red)-" "NAD(red)-2" "H2NAD(ox)+" "HNAD(ox)" "NAD(ox)-" [7] "H4NADP(red)" "H3NADP(red)-" "H2NADP(red)-2" "HNADP(red)-3" "NADP(red)-4" "H4NADP(ox)+" [13] "H3NADP(ox)" "H2NADP(ox)-" "HNADP(ox)-2" "NADP(ox)-3" [1] NA
T <- seq(0, 120, 10) # oxidation of glucose (C6H12O6) basis(c("glucose", "H2O", "NH3", "CO2", "H+"), c(-3, 0, 999, -3, -7))
C H N O Z ispecies logact state C6H12O6 6 12 0 6 0 1646 -3 aq H2O 0 2 0 1 0 1 0 liq NH3 0 3 1 0 0 66 999 aq CO2 1 0 0 2 0 1576 -3 aq H+ 0 1 0 0 1 3 -7 aq
s <- subcrt(c("NAD(ox)-", "NAD(red)-2"), c(-12, 12), logact=c(0, 0), T=T)
subcrt: 2 species at 13 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: H Z -12 12 subcrt: adding missing composition from basis definition and restarting... subcrt: 6 species at 13 values of T and P (wet)
# LH07's diagrams are shown per mole of electron (24 e- per 12 NAD) A <- s$out$A/24/1000 plot(x=T, y=A, xlim=range(T), ylim=c(1.4, 5.4), xlab=axis.label("T"), ylab=axis.label("A", prefix="k"), type="l") text("NAD(ox)-/NAD(red)-2 = 1", x=53, y=median(A), srt=21) # different activity ratio s <- subcrt(c("NAD(ox)-","NAD(red)-2"), c(-12, 12), logact=c(1, 0), T=T)
subcrt: 2 species at 13 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: H Z -12 12 subcrt: adding missing composition from basis definition and restarting... subcrt: 6 species at 13 values of T and P (wet)
A <- s$out$A/24/1000 lines(x=T, y=A) text("NAD(ox)-/NAD(red)-2 = 10", x=55, y=median(A), srt=24) # different activity ratio s <- subcrt(c("NAD(ox)-","NAD(red)-2"), c(-12, 12), logact=c(0, 1), T=T)
subcrt: 2 species at 13 values of T and P (wet) subcrt: reaction is not balanced; it is missing this composition: H Z -12 12 subcrt: adding missing composition from basis definition and restarting... subcrt: 6 species at 13 values of T and P (wet)
A <- s$out$A/24/1000 lines(x=T, y=A) text("NAD(ox)-/NAD(red)-2 = 0.1", x=52, y=median(A), srt=18) # print the reaction and chemical conditions on the plot text(0, 5.3, describe.reaction(s$reaction, iname=c(1, 2)), adj=0) text(0, 5.1, describe.basis(oneline=TRUE, ibasis=c(1, 2, 4, 5)), adj=0) # label the plot title(main=paste("Reduction of NAD coupled to oxidation of glucose", "after LaRowe and Helgeson, 2007", sep="\n"))

Image subcrt3

 

## Subzero (degrees C) calculations # uncomment the following to try IAPWS95 instead of SUPCRT92 #water("IAPWS95") # the limit for H2O92D.f (from SUPCRT92) is currently -20 deg C # but we go to -30 knowing properties will become NA sb <- subcrt(c("H2O", "Na+"), T=seq(-30, 10), P=1)$out
info.character: found H2O(liq), also available in cr subcrt: 2 species at 41 values of T and P (wet) water.SUPCRT92: errors calculating 10 of 42 points; T < Tfusion@P, T > 2250 degC, or P > 30kb.
# start plot with extra room on right par(mar=c(5, 4, 4, 4)) # plot G plot(sb$water$T, sb$water$G, ylim=c(-63000, -56000), xlab=axis.label("T"), ylab=axis.label("DG0")) points(sb$`Na+`$T, sb$`Na+`$G, pch=2) # add Cp # change y-axis par("usr"=c(par("usr")[1:2], -100, 25)) axis(4) mtext(axis.label("Cp0"), side=4, line=3) points(sb$water$T, sb$water$Cp, pch=16) points(sb$`Na+`$T, sb$`Na+`$Cp, pch=17) legend("topleft", pch=c(16, 1, 17, 2), legend=c("H2O Cp", "H2O G", "Na+ Cp", "Na+ G")) H2O <- expr.species("H2O") Na <- expr.species("Na+") degC <- expr.units("T") title(main=substitute(H2O~and~Na~to~-20~degC, list(H2O=H2O, Na=Na, degC=degC)))

Image subcrt4

 

## Calculations using a variable-pressure standard state thermo$opt$varP <<- TRUE # Calculate the boiling point of n-octane at 2 and 20 bar # We need exceed.Ttr=TRUE because the liquid is metastable # at high temperatures (also, the gas is metastable at low # temperatures, but that doesn't produce NA in the output) sout2 <- subcrt(rep("n-octane", 2), c("liq", "gas"), c(-1, 1), T=seq(-50, 300, 0.1), P=2, exceed.Ttr=TRUE)$out
subcrt: 2 species at 3501 values of T and P
sout20 <- subcrt(rep("n-octane", 2), c("liq", "gas"), c(-1, 1), T=seq(-50, 300, 0.1), P=20, exceed.Ttr=TRUE)$out
subcrt: 2 species at 3501 values of T and P
# find T with the Gibbs energy of reaction that is closest to zero Tvap2 <- sout2$T[which.min(abs(sout2$G))] Tvap20 <- sout20$T[which.min(abs(sout20$G))] # the boiling point increases with pressure stopifnot(Tvap20 > Tvap2) # more precisely, the calculated boiling points should be near the # empirical values (digitized from Fig. 1 of Helgeson et al., 1998) Tvap_2bar <- 156 Tvap_20bar <- 276 stopifnot(abs(Tvap2 - Tvap_2bar) < 6) stopifnot(abs(Tvap20 - Tvap_20bar) < 25) # those comparisons would fail if varP were FALSE (the default) thermo$opt$varP <<- FALSE