Next: nuts
Up: CHNOSZ examples
Previous: water
subcrt> ## Don't show:
subcrt> 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
subcrt> ## End Don't show
subcrt> ## properties of species
subcrt> 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
subcrt> # calculating at different temperatures
subcrt> 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
subcrt> # calculating at even increments
subcrt> subcrt("water",T=seq(500,1000,length.out=10),
subcrt+ 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
subcrt> # calculating on a temperature-pressure grid
subcrt> 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
subcrt> # to calculate only selected properties
subcrt> 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 -8.002062e-05
2 25.00 1.000000 -56687.71 2.594265e-04
3 50.00 1.000000 -57123.89 4.571985e-04
4 75.00 1.000000 -57594.93 6.117661e-04
5 100.00 1.013220 -58098.40 7.500729e-04
6 125.00 2.320144 -58631.71 8.848130e-04
7 150.00 4.757169 -59193.26 1.026376e-03
8 175.00 8.918049 -59781.38 1.185803e-03
9 200.00 15.536499 -60394.50 1.377204e-03
10 225.00 25.478603 -61031.25 1.621580e-03
11 250.00 39.736493 -61690.35 1.954957e-03
12 275.00 59.431251 -62370.65 2.448793e-03
13 300.00 85.837843 -63071.13 3.272707e-03
14 325.00 120.457572 -63790.84 4.956272e-03
15 350.00 165.211289 -64528.89 1.036574e-02
subcrt> # the properties of multiple species
subcrt> subcrt(c("glucose","ethanol","CO2"))
subcrt: 3 species at 15 values of T and P (wet)
$species
name formula state ispecies
1885 glucose C6H12O6 aq 1885
1344 ethanol C2H5OH aq 1344
69 CO2 CO2 aq 69
$out
$out$glucose
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 173.91268 -217373.0 -303657.6 57.94307 110.0960 67.00495
2 25.00 1.000000 0.9970614 160.45908 -218905.4 -301670.7 64.89006 112.3803 88.06603
3 50.00 1.000000 0.9880295 149.20560 -220620.9 -299347.6 72.36728 114.0163 96.92799
4 75.00 1.000000 0.9748643 139.68572 -222523.4 -296847.1 79.81780 115.6152 102.89809
5 100.00 1.013220 0.9583926 131.54961 -224610.6 -294206.6 87.13992 117.4675 108.37033
6 125.00 2.320144 0.9390726 124.53290 -226875.8 -291419.9 94.35666 119.8244 114.57459
7 150.00 4.757169 0.9170577 118.43651 -229317.5 -288455.5 101.55804 123.0132 122.69331
8 175.00 8.918049 0.8923427 113.10609 -231935.2 -285247.3 108.89241 127.5389 134.38261
9 200.00 15.536499 0.8647434 108.42168 -234732.0 -281678.4 116.59260 134.2686 152.51168
10 225.00 25.478603 0.8338733 104.29011 -237717.2 -277539.6 125.04220 144.8245 182.78652
11 250.00 39.736493 0.7990719 100.64038 -240910.5 -272432.4 134.93342 162.5468 238.16104
12 275.00 59.431251 0.7592362 97.42215 -244351.2 -265510.6 147.68370 195.2258 353.31619
13 300.00 85.837843 0.7124075 94.60943 -248119.0 -254650.7 166.76355 264.6322 646.05718
14 325.00 120.457572 0.6545772 92.21918 -252399.6 -232809.2 203.46509 452.5063 1711.25099
15 350.00 165.211289 0.5746875 90.40601 -257778.8 -158523.2 323.14500 1322.9173 10657.10627
$out$ethanol
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 34.33240 -42911.98 -70936.06 29.43380 51.47302 72.44086
2 25.00 1.000000 0.9970614 32.04991 -43723.90 -69250.00 35.34500 53.79651 64.30090
3 50.00 1.000000 0.9880295 30.21166 -44672.06 -67678.83 40.40674 54.93469 61.80176
4 75.00 1.000000 0.9748643 28.71268 -45740.14 -66147.85 44.97055 55.64002 60.82118
5 100.00 1.013220 0.9583926 27.47862 -46917.57 -64632.83 49.17312 56.15333 60.44846
6 125.00 2.320144 0.9390726 26.45421 -48194.64 -63121.05 53.09002 56.57906 60.41531
7 150.00 4.757169 0.9170577 25.59907 -49565.07 -61605.26 56.77423 56.98250 60.65665
8 175.00 8.918049 0.8923427 24.88189 -51022.77 -60077.66 60.26846 57.41820 61.21205
9 200.00 15.536499 0.8647434 24.27836 -52562.43 -58528.25 63.61277 57.95319 62.22954
10 225.00 25.478603 0.8338733 23.76938 -54179.54 -56941.65 66.85154 58.69667 64.05185
11 250.00 39.736493 0.7990719 23.33993 -55870.56 -55290.71 70.04504 59.86332 67.48890
12 275.00 59.431251 0.7592362 22.97829 -57633.41 -53519.97 73.29682 61.94783 74.73219
13 300.00 85.837843 0.7124075 22.67582 -59468.72 -51492.95 76.83848 66.32983 93.24524
14 325.00 120.457572 0.6545772 22.42781 -61383.85 -48761.15 81.39583 78.18967 160.73592
15 350.00 165.211289 0.5746875 22.23908 -63411.30 -42693.65 91.12070 133.28344 727.81941
$out$CO2
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 73.29142 -91606.76 -100328.21 23.08743 30.27577 66.65869
2 25.00 1.000000 0.9970614 67.61986 -92250.00 -98900.00 28.10000 33.28796 51.09345
3 50.00 1.000000 0.9880295 62.89754 -93002.60 -97692.15 31.99278 34.78578 46.31744
4 75.00 1.000000 0.9748643 58.91003 -93845.38 -96561.05 35.36508 35.73921 44.44646
5 100.00 1.013220 0.9583926 55.50370 -94768.21 -95460.39 38.41842 36.46276 43.73909
6 125.00 2.320144 0.9390726 52.56481 -95763.30 -94367.89 41.24934 37.09777 43.68297
7 150.00 4.757169 0.9170577 50.00811 -96826.01 -93269.40 43.91970 37.74061 44.15483
8 175.00 8.918049 0.8923427 47.76770 -97952.38 -92150.95 46.47874 38.48142 45.23246
9 200.00 15.536499 0.8647434 45.79209 -99139.47 -90994.47 48.97605 39.44172 47.20274
10 225.00 25.478603 0.8338733 44.04063 -100385.48 -89771.76 51.47392 40.82846 50.72891
11 250.00 39.736493 0.7990719 42.48106 -101690.14 -88432.04 54.06884 43.05494 57.37755
12 275.00 59.431251 0.7592362 41.08805 -103055.76 -86870.02 56.94382 47.07750 71.38713
13 300.00 85.837843 0.7124075 39.84265 -104489.77 -84823.97 60.53182 55.56485 107.19221
14 325.00 120.457572 0.6545772 38.73382 -106012.64 -81429.06 66.22352 78.53702 237.71986
15 350.00 165.211289 0.5746875 37.76948 -107693.85 -71600.43 82.03713 185.14818 1334.45989
subcrt> ## input/output in different units
subcrt> nuts(c("K","J"))
nuts: temperature in K
nuts: energy in J
subcrt> 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 273.16 1.000000 0.9998289 45.03529 -235515.3 -287724.3 63.31387 18.01828 76.17219
2 298.15 1.000000 0.9970614 41.55247 -237181.4 -285837.3 69.92418 18.06830 75.36053
3 323.15 1.000000 0.9880295 38.63281 -239006.4 -283953.6 75.99125 18.23346 75.33141
4 348.15 1.000000 0.9748643 36.15435 -240977.2 -282069.1 81.60828 18.47970 75.48617
5 373.15 1.013220 0.9583926 34.02698 -243083.7 -280176.4 86.85799 18.79731 75.97278
6 398.15 2.320144 0.9390726 32.18315 -245315.1 -278266.7 91.80499 19.18403 76.70671
7 423.15 4.757169 0.9170577 30.57178 -247664.6 -276334.6 96.49970 19.64456 77.68193
8 448.15 8.918049 0.8923427 29.15313 -250125.3 -274372.6 100.98511 20.18866 79.00632
9 473.15 15.536499 0.8647434 27.89596 -252690.6 -272370.0 105.30365 20.83300 80.87185
10 498.15 25.478603 0.8338733 26.77533 -255354.7 -270311.0 109.50017 21.60424 83.55611
11 523.15 39.736493 0.7990719 25.77115 -258112.4 -268173.5 113.62465 22.54515 87.49715
12 548.15 59.431251 0.7592362 24.86701 -260958.8 -265924.7 117.73775 23.72806 93.51769
13 573.15 85.837843 0.7124075 24.04945 -263889.6 -263512.3 121.92477 25.28777 103.50976
14 598.15 120.457572 0.6545772 23.30725 -266900.9 -260836.4 126.33672 27.52189 123.20824
15 623.15 165.211289 0.5746875 22.63103 -269988.9 -257632.2 131.36558 31.34782 182.41621
subcrt> subcrt("water",T=298.15)
subcrt: 1 species at 298.15 K and 1 bar (wet)
$species
name formula state ispecies
1 water H2O liq 1
$out
$out$water
T P rho logK G H S V Cp
1 298.15 1 0.9970614 41.55247 -237181.4 -285837.3 69.92418 18.06830 75.36053
subcrt> nuts(c("cal","C")) # back to defaults
nuts: energy in cal
nuts: temperature in C
subcrt> ## properties of reactions
subcrt> subcrt(c("H2O","H+","k-feldspar","kaolinite","K+","SiO2"),
subcrt+ c(-1,-2,-2,1,2,4))
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
2141 -2 k-feldspar K(AlSi3)O8 cr 2141
2146 1 kaolinite Al2Si2O5(OH)4 cr 2146
6 2 K+ K+ aq 6
72 4 SiO2 SiO2 aq 72
$out
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 -9.451752 11813.720 39338.2001 101.037908 -44.45760 -941.315278
2 25.00 1.000000 0.9970614 -7.360641 10041.711 24831.7553 49.857720 -54.01690 -349.644469
3 50.00 1.000000 0.9880295 -6.136706 9073.958 18785.9482 30.286323 -59.01240 -163.141374
4 75.00 1.000000 0.9748643 -5.298797 8441.137 15826.5800 21.428921 -62.44680 -83.488468
5 100.00 1.013220 0.9583926 -4.665077 7965.252 14287.7248 17.144501 -65.31326 -43.880256
6 125.00 2.320144 0.9390726 -4.151839 7563.877 13483.8390 15.047763 -68.08975 -22.842309
7 150.00 4.757169 0.9170577 -3.717503 7197.853 13070.3223 14.030222 -71.12250 -11.993008
8 175.00 8.918049 0.8923427 -3.339037 6847.025 12844.9084 13.501163 -74.74984 -7.903078
9 200.00 15.536499 0.8647434 -3.003487 6502.522 12651.2416 13.067065 -79.46467 -10.251158
10 225.00 25.478603 0.8338733 -2.704162 6163.823 12316.6809 12.363201 -86.27006 -20.738785
11 250.00 39.736493 0.7990719 -2.439021 5838.469 11610.2462 10.966953 -97.24159 -43.800069
12 275.00 59.431251 0.7592362 -2.210199 5543.551 10165.2552 8.267154 -116.71119 -91.071487
13 300.00 85.837843 0.7124075 -2.025097 5310.940 7209.9258 3.025926 -155.04184 -202.796812
14 325.00 120.457572 0.6545772 -1.903001 5208.424 247.5404 -8.732556 -246.90325 -584.941499
15 350.00 165.211289 0.5746875 -1.911364 5449.958 -24848.5653 -49.245722 -616.91895 -3449.033414
subcrt> subcrt(c("glucose","ethanol","CO2"),c(-1,2,2))
subcrt: 3 species at 15 values of T and P (wet)
$reaction
coeff name formula state ispecies
1885 -1 glucose C6H12O6 aq 1885
1344 2 ethanol C2H5OH aq 1344
69 2 CO2 CO2 aq 69
$out
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 41.33497 -51664.47 -38870.99 47.09938 53.40160 211.19414
2 25.00 1.000000 0.9970614 38.88047 -53042.45 -34629.35 61.99994 61.78868 142.72267
3 50.00 1.000000 0.9880295 37.01279 -54728.47 -31394.33 72.43175 65.42464 119.31041
4 75.00 1.000000 0.9748643 35.55970 -56647.64 -28570.68 80.85347 67.14326 107.63720
5 100.00 1.013220 0.9583926 34.41503 -58760.96 -25979.83 88.04317 67.76470 100.00477
6 125.00 2.320144 0.9390726 33.50513 -61040.11 -23557.96 94.32207 67.52930 93.62197
7 150.00 4.757169 0.9170577 32.77783 -63464.65 -21293.84 99.82982 66.43299 86.92966
8 175.00 8.918049 0.8923427 32.19308 -66015.10 -19209.89 104.60201 64.26029 78.50642
9 200.00 15.536499 0.8647434 31.71922 -68671.83 -17366.99 108.58505 60.52127 66.35287
10 225.00 25.478603 0.8338733 31.32991 -71412.88 -15887.19 111.60871 54.22577 46.77501
11 250.00 39.736493 0.7990719 31.00160 -74210.89 -15013.13 113.29434 43.28973 11.57186
12 275.00 59.431251 0.7592362 30.71053 -77027.17 -15269.37 112.79757 22.82483 -61.07756
13 300.00 85.837843 0.7124075 30.42751 -79797.99 -17983.13 107.97704 -20.84288 -245.18227
14 325.00 120.457572 0.6545772 30.10406 -82393.41 -27571.21 91.77360 -139.05292 -914.33944
15 350.00 165.211289 0.5746875 29.61111 -84431.51 -70064.90 23.17066 -686.05402 -6532.54766
subcrt> # to specify the states
subcrt> 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
1885 -1 glucose C6H12O6 aq 1885
1344 2 ethanol C2H5OH aq 1344
2844 2 carbon dioxide CO2 gas 2844
$out
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 43.54319 -54424.52 -26748.41 101.58240 -7.149939 94.642455
2 25.00 1.000000 0.9970614 41.81836 -57050.45 -24931.35 107.96994 -4.787243 58.293229
3 50.00 1.000000 0.9880295 40.44531 -59803.91 -23657.82 112.07869 -4.146932 45.227380
4 75.00 1.000000 0.9748643 39.32511 -62646.03 -22624.19 115.16295 -4.335172 37.947405
5 100.00 1.013220 0.9583926 38.39515 -65556.70 -21747.56 117.59687 -5.160824 32.274921
6 125.00 2.320144 0.9390726 37.61183 -68521.75 -21011.04 119.50986 -6.666251 26.469275
7 150.00 4.757169 0.9170577 36.94269 -71528.67 -20433.39 120.92027 -9.048231 19.236262
8 175.00 8.918049 0.8923427 36.36238 -74564.64 -20066.43 121.76805 -12.702557 9.012325
9 200.00 15.536499 0.8647434 35.84990 -77614.71 -20008.20 121.90352 -18.362182 -6.765727
10 225.00 25.478603 0.8338733 35.38650 -80659.40 -20438.01 121.03488 -27.431147 -33.110848
11 250.00 39.736493 0.7990719 34.95348 -83670.80 -21700.81 118.59338 -42.820148 -81.351378
12 275.00 59.431251 0.7592362 34.52904 -86604.65 -24532.25 113.37140 -71.330174 -181.780770
13 300.00 85.837843 0.7124075 34.08173 -89381.42 -30783.53 102.36418 -131.972586 -437.273646
14 325.00 120.457572 0.6545772 33.55168 -91829.38 -46601.49 75.73357 -296.126970 -1367.278456
15 350.00 165.211289 0.5746875 32.76589 -93426.87 -108187.46 -23.57128 -1056.350374 -9178.771201
subcrt> # this warns about an unbalanced reaction
subcrt> subcrt(c("glucose","ethanol"),c(-1,3))
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
$reaction
coeff name formula state ispecies
1885 -1 glucose C6H12O6 aq 1885
1344 3 ethanol C2H5OH aq 1344
$out
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 -70.91547 88637.07 90849.39 30.35832 44.323086 150.317614
2 25.00 1.000000 0.9970614 -64.30935 87733.64 93920.65 41.14494 49.009272 104.836660
3 50.00 1.000000 0.9880295 -58.57063 86604.67 96311.14 48.85293 50.787754 88.477289
4 75.00 1.000000 0.9748643 -53.54767 85303.00 98403.56 55.09386 51.304845 79.565463
5 100.00 1.013220 0.9583926 -49.11376 83857.88 100308.12 60.37945 50.992507 72.975052
6 125.00 2.320144 0.9390726 -45.17028 82291.84 102056.75 64.91340 49.912804 66.671343
7 150.00 4.757169 0.9170577 -41.63932 80622.30 103639.71 68.76465 47.934273 59.276639
8 175.00 8.918049 0.8923427 -38.46043 78866.90 105014.34 71.91298 44.715640 49.253549
9 200.00 15.536499 0.8647434 -35.58661 77044.69 106093.69 74.24571 39.591009 34.176925
10 225.00 25.478603 0.8338733 -32.98196 75178.54 106714.68 75.51241 31.265526 9.369036
11 250.00 39.736493 0.7990719 -30.62059 73298.83 106560.24 75.20169 17.043170 -35.694329
12 275.00 59.431251 0.7592362 -28.48730 71450.94 104950.71 72.20675 -9.382344 -129.119618
13 300.00 85.837843 0.7124075 -26.58197 69712.83 100171.86 63.75189 -65.642760 -366.321452
14 325.00 120.457572 0.6545772 -24.93576 68248.02 86525.76 40.72239 -217.937299 -1229.043233
15 350.00 165.211289 0.5746875 -23.68878 67544.89 30442.31 -49.78291 -923.066932 -8473.648026
subcrt> ## auto balancing reactions
subcrt> # the basis species must first be defined
subcrt> basis(c("CO2","H2O","NH3","H2S","O2"))
C H N O S ispecies logact state
CO2 1 0 0 2 0 69 0 aq
H2O 0 2 0 1 0 1 0 liq
NH3 0 3 1 0 0 68 0 aq
H2S 0 2 0 0 1 70 0 aq
O2 0 0 0 2 0 2852 0 gas
subcrt> subcrt(c("glucose","ethanol"),c(-1,3))
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
1885 -1 glucose C6H12O6 aq 1885
1344 3 ethanol C2H5OH aq 1344
1 -3 water H2O liq 1
2852 3 oxygen O2 gas 2852
$out
T P logK G H S V Cp
1 0.01 1.000000 -208.94412 261158.7 296631.2 130.22203 -9.731763 116.392097
2 25.00 1.000000 -188.96676 257796.8 298870.9 138.09510 -5.195617 71.826385
3 50.00 1.000000 -171.96763 254277.6 300439.9 143.15707 -3.912637 55.763683
4 75.00 1.000000 -157.34123 250649.1 301716.6 146.96655 -4.134258 46.975000
5 100.00 1.013220 -144.62498 246935.8 302805.1 149.98848 -5.399415 40.238893
6 125.00 2.320144 -133.46843 243154.6 303730.1 152.39088 -7.639293 33.588777
7 150.00 4.757169 -123.60268 239320.3 304477.7 154.21562 -10.999421 25.656624
8 175.00 8.918049 -114.81872 235447.1 304999.4 155.41948 -15.850331 14.831614
9 200.00 15.536499 -106.95248 231551.2 305200.3 155.86603 -22.907997 -1.446155
10 225.00 25.478603 -99.87463 227652.6 304905.7 155.27850 -33.547201 -28.051255
11 250.00 39.736493 -93.48381 223779.3 303782.3 153.11472 -50.592293 -75.820297
12 275.00 59.431251 -87.70320 219974.4 301127.1 148.22877 -80.566515 -173.448335
13 300.00 85.837843 -82.48194 216313.9 295188.0 137.78768 -141.506081 -417.705575
14 325.00 120.457572 -77.80895 212959.5 280195.4 112.57187 -300.502967 -1294.446611
15 350.00 165.211289 -73.78894 210397.8 222389.3 19.40211 -1017.110388 -8581.403166
subcrt> # a bug in CHNOSZ <0.9 caused the following
subcrt> # to initiate an infinite loop
subcrt> basis(c("H2O","H2S","O2","H+"))
basis: changed basis to H2O H2S O2 H+.
H O S Z ispecies logact state
H2O 2 1 0 0 1 0 liq
H2S 2 0 1 0 70 0 aq
O2 0 2 0 0 2852 0 gas
H+ 1 0 0 1 3 0 aq
subcrt> 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 Z O
1 1 -4
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
2852 -2 oxygen O2 gas 2852
3 1 H+ H+ aq 3
$out
T P logK G H S V Cp
1 0.01 1.000000 146.78591 -183467.3 -211836.2 -103.8328 -9.925885 -90.32967
2 25.00 1.000000 132.52027 -180790.0 -213550.0 -109.8580 -7.291868 -55.16446
3 50.00 1.000000 120.37530 -177991.3 -214792.3 -113.8640 -6.637342 -46.14137
4 75.00 1.000000 109.91771 -175102.1 -215915.1 -117.2113 -6.950917 -44.40700
5 100.00 1.013220 100.81437 -172132.6 -217039.7 -120.3304 -8.023337 -45.99838
6 125.00 2.320144 92.81193 -169086.1 -218233.6 -123.4250 -9.891743 -49.92509
7 150.00 4.757169 85.71472 -165961.4 -219550.7 -126.6301 -12.748000 -55.97292
8 175.00 8.918049 79.36946 -162754.9 -221043.4 -130.0518 -16.906167 -64.51951
9 200.00 15.536499 73.65399 -159460.2 -222806.8 -133.8702 -23.020646 -78.74145
10 225.00 25.478603 68.46831 -156065.5 -225037.9 -138.4453 -32.865619 -103.12976
11 250.00 39.736493 63.72797 -152550.5 -228040.7 -144.2883 -50.361745 -143.69001
12 275.00 59.431251 59.35987 -148884.5 -232241.6 -152.0591 -83.219030 -211.53774
13 300.00 85.837843 55.29882 -145024.5 -238385.5 -162.8808 -147.593467 -343.81965
14 325.00 120.457572 51.47902 -140895.7 -248921.5 -180.5902 -290.975456 -736.21384
15 350.00 165.211289 47.78952 -136264.5 -276762.8 -225.4553 -796.461689 -2919.94786
subcrt> # note the next one is a non-reaction
subcrt> # (products same as reactants)
subcrt> subcrt("H2O",1)
subcrt: 1 species at 15 values of T and P (wet)
subcrt: reaction is not balanced; it is missing this composition:
H O
-2 -1
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 water H2O liq 1
2 -1 water H2O liq 1
$out
T P logK G H S V Cp
1 0.01 1.000000 0 0 0 0 0 0
2 25.00 1.000000 0 0 0 0 0 0
3 50.00 1.000000 0 0 0 0 0 0
4 75.00 1.000000 0 0 0 0 0 0
5 100.00 1.013220 0 0 0 0 0 0
6 125.00 2.320144 0 0 0 0 0 0
7 150.00 4.757169 0 0 0 0 0 0
8 175.00 8.918049 0 0 0 0 0 0
9 200.00 15.536499 0 0 0 0 0 0
10 225.00 25.478603 0 0 0 0 0 0
11 250.00 39.736493 0 0 0 0 0 0
12 275.00 59.431251 0 0 0 0 0 0
13 300.00 85.837843 0 0 0 0 0 0
14 325.00 120.457572 0 0 0 0 0 0
15 350.00 165.211289 0 0 0 0 0 0
subcrt> # but this one auto-balances into a reaction
subcrt> # (water to steam)
subcrt> subcrt("H2O",1,"gas")
subcrt: 1 species at 15 values of T and P
subcrt: reaction is not balanced; it is missing this composition:
H O
-2 -1
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
2857 1 steam H2O gas 2857
1 -1 water H2O liq 1
$out
T P logK G H S V Cp
1 0.01 1.000000 -2.29851343 2872.9060 10590.025 28.78056 -18.01828 -8.365347
2 25.00 1.000000 -1.58542852 2162.9115 10381.655 28.05072 -18.06830 -8.434168
3 50.00 1.000000 -0.99438432 1470.3330 10167.594 27.36141 -18.23346 -8.689500
4 75.00 1.000000 -0.49878485 794.5787 9946.790 26.70340 -18.47970 -8.988325
5 100.00 1.013220 -0.07905088 134.9732 9717.501 26.06755 -18.79731 -9.366129
6 125.00 2.320144 0.27968054 -509.5259 9477.595 25.44694 -19.18403 -9.802786
7 150.00 4.757169 0.58835881 -1139.1840 9225.803 24.83650 -19.64456 -10.296919
8 175.00 8.918049 0.85560981 -1754.5123 8960.358 24.23173 -20.18866 -10.874349
9 200.00 15.536499 1.08822734 -2356.0025 8678.676 23.62730 -20.83300 -11.580994
10 225.00 25.478603 1.29162861 -2944.1170 8377.014 23.01658 -21.60424 -12.483222
11 250.00 39.736493 1.47017929 -3519.2798 8050.046 22.39110 -22.54515 -13.685746
12 275.00 59.431251 1.62743189 -4081.8732 7689.976 21.73935 -23.72806 -15.385218
13 300.00 85.837843 1.76630441 -4632.2407 7284.288 21.04354 -25.28777 -18.033855
14 325.00 120.457572 1.88921708 -5170.6988 6809.122 20.26983 -27.52189 -23.002334
15 350.00 165.211289 1.99819710 -5697.5506 6201.186 19.32651 -31.34782 -37.413768
subcrt> # properties of a species and a formation
subcrt> # reaction for that species
subcrt> subcrt("C2H5OH") # species
subcrt: 1 species at 15 values of T and P (wet)
$species
name formula state ispecies
1344 ethanol C2H5OH aq 1344
$out
$out$ethanol
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 34.33240 -42911.98 -70936.06 29.43380 51.47302 72.44086
2 25.00 1.000000 0.9970614 32.04991 -43723.90 -69250.00 35.34500 53.79651 64.30090
3 50.00 1.000000 0.9880295 30.21166 -44672.06 -67678.83 40.40674 54.93469 61.80176
4 75.00 1.000000 0.9748643 28.71268 -45740.14 -66147.85 44.97055 55.64002 60.82118
5 100.00 1.013220 0.9583926 27.47862 -46917.57 -64632.83 49.17312 56.15333 60.44846
6 125.00 2.320144 0.9390726 26.45421 -48194.64 -63121.05 53.09002 56.57906 60.41531
7 150.00 4.757169 0.9170577 25.59907 -49565.07 -61605.26 56.77423 56.98250 60.65665
8 175.00 8.918049 0.8923427 24.88189 -51022.77 -60077.66 60.26846 57.41820 61.21205
9 200.00 15.536499 0.8647434 24.27836 -52562.43 -58528.25 63.61277 57.95319 62.22954
10 225.00 25.478603 0.8338733 23.76938 -54179.54 -56941.65 66.85154 58.69667 64.05185
11 250.00 39.736493 0.7990719 23.33993 -55870.56 -55290.71 70.04504 59.86332 67.48890
12 275.00 59.431251 0.7592362 22.97829 -57633.41 -53519.97 73.29682 61.94783 74.73219
13 300.00 85.837843 0.7124075 22.67582 -59468.72 -51492.95 76.83848 66.32983 93.24524
14 325.00 120.457572 0.6545772 22.42781 -61383.85 -48761.15 81.39583 78.18967 160.73592
15 350.00 165.211289 0.5746875 22.23908 -63411.30 -42693.65 91.12070 133.28344 727.81941
subcrt> basis("CHNOS")
C H N O S ispecies logact state
CO2 1 0 0 2 0 69 -3 aq
H2O 0 2 0 1 0 1 0 liq
NH3 0 3 1 0 0 68 -4 aq
H2S 0 2 0 0 1 70 -7 aq
O2 0 0 0 2 0 2852 -80 gas
subcrt> subcrt("C2H5OH",1) # reaction
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
1344 1 ethanol C2H5OH aq 1344
69 -2 CO2 CO2 aq 69
1 -3 water H2O liq 1
2852 3 oxygen O2 gas 2852
$out
T P logK G H S V Cp
1 0.01 1.000000 -250.2791 312823.2 335502.2 83.122646 -63.13336 -94.80204
2 25.00 1.000000 -227.8472 310839.2 333500.3 76.095159 -66.98430 -70.89628
3 50.00 1.000000 -208.9804 309006.1 331834.2 70.725321 -69.33727 -63.54673
4 75.00 1.000000 -192.9009 307296.8 330287.3 66.113084 -71.27751 -60.66220
5 100.00 1.013220 -179.0400 305696.7 328784.9 61.945314 -73.16412 -59.76588
6 125.00 2.320144 -166.9736 304194.7 327288.1 58.068813 -75.16859 -60.03319
7 150.00 4.757169 -156.3805 302784.9 325771.5 54.385800 -77.43242 -61.27303
8 175.00 8.918049 -147.0118 301462.2 324209.3 50.817469 -80.11062 -63.67480
9 200.00 15.536499 -138.6717 300223.0 322567.3 47.280985 -83.42926 -67.79902
10 225.00 25.478603 -131.2045 299065.5 320792.8 43.669794 -87.77297 -74.82626
11 250.00 39.736493 -124.4854 297990.2 318795.5 39.820378 -93.88202 -87.39216
12 275.00 59.431251 -118.4137 297001.6 316396.4 35.431208 -103.39134 -112.37078
13 300.00 85.837843 -112.9094 296111.9 313171.1 29.810638 -120.66320 -172.52330
14 325.00 120.457572 -107.9130 295352.9 307766.6 20.798264 -161.45004 -380.10717
15 350.00 165.211289 -103.4000 294829.3 292454.2 -3.768551 -331.05637 -2048.85550
subcrt> ## properties of mineral phases
subcrt> # properties of phase species
subcrt> subcrt(c("pyrrhotite","pyrrhotite"),state=c("cr1","cr2"))
subcrt: 2 species at 15 values of T and P
subcrt: some points below T limits for pyrrhotite cr2 (using 999999 for G).
subcrt: some points above T limits for pyrrhotite cr1 (using 999999 for G).
subcrt: some points above T limits for pyrrhotite cr2 (using 999999 for G).
$species
name formula state ispecies
2199 pyrrhotite FeS cr1 2199
2200 pyrrhotite FeS cr2 2200
$out
$out$pyrrhotite
T P logK G H S V Cp
1 0.01 1.000000 18.99174 -23737.73 -24318.15 13.29594 18.2 12.40142
2 25.00 1.000000 17.65373 -24084.00 -24000.00 14.41000 18.2 13.06116
3 50.00 1.000000 16.54077 -24457.79 -23665.22 15.48790 18.2 13.72116
4 75.00 1.000000 15.60432 -24858.14 -23313.94 16.53464 18.2 14.38116
5 100.00 1.013220 14.80847 -25284.30 -22946.16 17.55455 18.2 15.04116
6 125.00 2.320144 14.12608 -25735.09 -22561.88 18.55111 18.2 15.70116
7 150.00 4.757169 -516.47339 999999.00 -22161.10 19.52717 18.2 16.36116
8 175.00 8.918049 -487.66198 999999.00 -21743.83 20.48509 18.2 17.02116
9 200.00 15.536499 -461.89521 999999.00 -21310.05 21.42682 18.2 17.68116
10 225.00 25.478603 -438.71468 999999.00 -20859.77 22.35405 18.2 18.34116
11 250.00 39.736493 -417.74963 999999.00 -20392.99 23.26819 18.2 19.00116
12 275.00 59.431251 -398.69692 999999.00 -19909.71 24.17046 18.2 19.66116
13 300.00 85.837843 -381.30632 999999.00 -19409.93 25.06193 18.2 20.32116
14 325.00 120.457572 -365.36942 999999.00 -18893.65 25.94351 18.2 20.98116
15 350.00 165.211289 -350.71125 999999.00 -18360.87 26.81602 18.2 21.64116
$out$pyrrhotite
T P logK G H S V Cp
1 0.01 1.000000 -800.06486 999999.00 -24186.36 13.33352 18.2 17.4
2 25.00 1.000000 -733.00592 999999.00 -23751.53 14.85670 18.2 17.4
3 50.00 1.000000 -676.29805 999999.00 -23316.53 16.25775 18.2 17.4
4 75.00 1.000000 -627.73436 999999.00 -22881.53 17.55434 18.2 17.4
5 100.00 1.013220 -585.67792 999999.00 -22446.53 18.76098 18.2 17.4
6 125.00 2.320144 -548.90297 999999.00 -22011.53 19.88934 18.2 17.4
7 150.00 4.757169 13.54563 -26227.13 -21576.53 20.94896 18.2 17.4
8 175.00 8.918049 13.05065 -26761.64 -21141.53 21.94774 18.2 17.4
9 200.00 15.536499 12.61870 -27319.37 -20706.53 22.89229 18.2 17.4
10 225.00 25.478603 12.23956 -27898.65 -20271.53 23.78820 18.2 17.4
11 250.00 39.736493 11.90499 -28497.89 -19836.53 24.64022 18.2 17.4
12 275.00 59.431251 11.60830 -29115.56 -19401.53 25.45247 18.2 17.4
13 300.00 85.837843 11.34393 -29750.16 -18966.53 26.22848 18.2 17.4
14 325.00 120.457572 -365.36942 999999.00 -18531.53 26.97136 18.2 17.4
15 350.00 165.211289 -350.71125 999999.00 -18096.53 27.68382 18.2 17.4
subcrt> # properties of the stable phases
subcrt> subcrt("pyrrhotite")
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
2199 pyrrhotite FeS cr* 2199
$out
$out$pyrrhotite
T P logK G H S V Cp state
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.88 18.55111 18.2 15.70116 1
7 150.00 4.757169 13.54563 -26227.13 -21576.53 20.94896 18.2 17.40000 2
8 175.00 8.918049 13.05065 -26761.64 -21141.53 21.94774 18.2 17.40000 2
9 200.00 15.536499 12.61870 -27319.37 -20706.53 22.89229 18.2 17.40000 2
10 225.00 25.478603 12.23956 -27898.65 -20271.53 23.78820 18.2 17.40000 2
11 250.00 39.736493 11.90499 -28497.89 -19836.53 24.64022 18.2 17.40000 2
12 275.00 59.431251 11.60830 -29115.56 -19401.53 25.45247 18.2 17.40000 2
13 300.00 85.837843 11.34393 -29750.16 -18966.53 26.22848 18.2 17.40000 2
14 325.00 120.457572 11.10731 -30400.19 -18412.10 27.17109 18.2 13.62360 3
15 350.00 165.211289 10.89557 -31067.03 -18070.77 27.73012 18.2 13.68310 3
subcrt> # phase transitions in a reaction
subcrt> subcrt(c("pyrite","pyrrhotite","H2O","H2S","O2"),c(-1,1,-1,1,0.5))
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
2195 -1 pyrite FeS2 cr 2195
2199 1 pyrrhotite FeS cr* 2199
2200 1 water H2O liq 1
2201 1 H2S H2S aq 70
1 -1 oxygen O2 gas 2852
$out
T P rho logK G H S V Cp
1 0.01 1.000000 0.9998289 -52.14735 65178.84 75463.23 36.56399 9.393522 45.80720
2 25.00 1.000000 0.9970614 -47.07641 64223.71 76315.76 39.56222 11.273663 26.59476
3 50.00 1.000000 0.9880295 -42.74887 63210.03 76894.34 41.42886 12.076372 20.67869
4 75.00 1.000000 0.9748643 -39.01730 62155.69 77378.50 42.87304 12.455260 18.39112
5 100.00 1.013220 0.9583926 -35.76625 61068.07 77825.15 44.11233 12.622392 17.49507
6 125.00 2.320144 0.9390726 -32.90754 59951.40 78259.78 45.23830 12.671798 17.32574
7 150.00 4.757169 0.9170577 -30.36388 58790.73 79281.90 47.72319 12.664625 18.70468
8 175.00 8.918049 0.8923427 -28.08221 57585.35 79752.36 48.79914 12.655308 18.86590
9 200.00 15.536499 0.8647434 -26.02982 56354.33 80234.95 49.84053 12.716766 19.64651
10 225.00 25.478603 0.8338733 -24.17246 55098.32 80749.05 50.88988 12.977756 21.46421
11 250.00 39.736493 0.7990719 -22.48198 53816.82 81329.23 52.01284 13.708314 25.39280
12 275.00 59.431251 0.7592362 -20.93457 52507.42 82048.81 53.33721 15.562235 34.45066
13 300.00 85.837843 0.7124075 -19.50912 51163.85 83095.22 55.17429 20.433402 59.15837
14 325.00 120.457572 0.6545772 -18.18444 49769.97 85222.63 58.74730 35.644453 149.83274
15 350.00 165.211289 0.5746875 -16.92864 48269.42 91903.56 69.50981 112.875612 969.81465
$state
T P pyrrhotite
1 0.01 1.000000 1
2 25.00 1.000000 1
3 50.00 1.000000 1
4 75.00 1.000000 1
5 100.00 1.013220 1
6 125.00 2.320144 1
7 150.00 4.757169 2
8 175.00 8.918049 2
9 200.00 15.536499 2
10 225.00 25.478603 2
11 250.00 39.736493 2
12 275.00 59.431251 2
13 300.00 85.837843 2
14 325.00 120.457572 3
15 350.00 165.211289 3
subcrt> ## heat capacity of Fe(cr)
subcrt> # compare calculated values of heat capacity with
subcrt> # values from Robie and Hemingway, 1995, (from which
subcrt> # the parameters in the database were derived)
subcrt> nuts(c("J","K")) # set the units
nuts: energy in J
nuts: temperature in K
subcrt> # we set pressure here otherwise subcrt goes for
subcrt> # Psat (saturation vapor pressure of H2O above
subcrt> # 100 degrees C) which can not be calculated above
subcrt> # the critical point of H2O (~647 K)
subcrt> t <- subcrt("Fe",T=seq(300,1800,20),P=1)
subcrt: 1 species at 76 values of T and P
info: V of natroalunite cr are NA; set to 0.
subcrt: 4 phases for Fe ... phases 1 2 3 4 are stable.
subcrt> plot(t$out[[1]]$T,t$out[[1]]$Cp,type="l",
subcrt+ xlab=axis.label("T"),ylab=axis.label("Cp"))
subcrt> # add points from RH95
subcrt> RH95 <- thermo$expt$RH95
subcrt> points(RH95[,1],RH95[,2])
subcrt> title(main=paste("Heat capacity of Fe(cr)\n",
subcrt+ "(points - Robie and Hemingway, 1995)"))
subcrt> # reset the units
subcrt> nuts(c("C","cal"))
nuts: temperature in C
nuts: energy in cal
subcrt> ## these produce NAs and warnings
subcrt> # Psat is not defined above the critical point
subcrt> subcrt("alanine",T=seq(0,5000,by=1000))
Warning: water.SUPCRT92: errors calculating 5 of 6 points; for Psat we need T < 647.067 K.
subcrt: 1 species at 6 values of T and P (wet)
Warning: water.SUPCRT92: errors calculating 3 of 6 points; T and/or P are NA, or T < Tfusion@P, T > 2250 degC, or P > 30kb.
$species
name formula state ispecies
1618 alanine C3H7NO2 aq 1618
$out
$out$alanine
T P rho logK G H S V Cp
1 1e-02 1 9.998289e-01 70.30240 -87870.78 -133142.96 36.59025 58.15163 13.35591
2 1e+03 1 1.701990e-04 25.92454 -151024.68 -67118.87 109.31389 -376.79186 49.48560
3 2e+03 1 9.531414e-05 -Inf Inf -35701.13 136.96023 NaN NaN
4 3e+03 1 0.000000e+00 29.26455 -438293.46 13787.63 155.00305 NA NA
5 4e+03 1 0.000000e+00 30.69595 -600186.79 63281.94 168.19814 NA NA
6 5e+03 1 0.000000e+00 32.06898 -773771.13 112778.51 178.60611 NA NA
subcrt> # above the T, P limits for the H2O equations of state
subcrt> subcrt("alanine",T=c(2250,2251),P=c(30000,30001),grid="T")
subcrt: 1 species at 4 values of T and P (wet)
Warning: water.SUPCRT92: errors calculating 3 of 4 points; T and/or P are NA, or T < Tfusion@P, T > 2250 degC, or P > 30kb.
$species
name formula state ispecies
1618 alanine C3H7NO2 aq 1618
$out
$out$alanine
T P rho logK G H S V Cp
1 2250 30000 1.026316 -Inf Inf 21919.72 142.1466 NaN NaN
2 2250 30001 0.000000 24.37980 -281468.9 21921.22 142.1466 NA NA
3 2251 30000 0.000000 24.38258 -281612.6 21969.16 142.1662 NA NA
4 2251 30001 0.000000 24.38245 -281611.1 21970.66 142.1662 NA NA
subcrt> ## Skarn example after Johnson et al., 1992
subcrt> P <- seq(500,5000,500)
subcrt> # this is like the temperature specification used
subcrt> # in the example by Johnson et al., 1992
subcrt> # T <- seq(0,1000,100)
subcrt> # we use this one to avoid warnings at 0 deg C, 5000 bar
subcrt> T <- c(2,seq(100,1000,100))
subcrt> subcrt(c("andradite","carbon dioxide","H2S","Cu+","quartz","calcite",
subcrt+ "chalcopyrite","H+","H2O"),coeff=c(-1,-3,-4,-2,3,3,2,2,3),
subcrt+ state=c("cr","g","aq","aq","cr","cr","cr","aq","liq"),
subcrt+ P=P,T=T,grid="P")
subcrt: 9 species at 110 values of T and P (wet)
subcrt: some points above T limits for andradite cr (ignored).
subcrt: some points above T limits for calcite cr (ignored).
subcrt: 2 phases for quartz ... phases 1 2 are stable.
subcrt: 3 phases for chalcopyrite ... phases 1 2 3 are stable.
$reaction
coeff name formula state ispecies
2022 -1 andradite Ca3Fe2Si3O12 cr 2022
2844 -3 carbon dioxide CO2 gas 2844
70 -4 H2S H2S aq 70
1083 -2 Cu+ Cu+ aq 1083
2202 3 quartz SiO2 cr* 2202
2203 3 calcite CaCO3 cr 2048
2048 3 chalcopyrite CuFeS2 cr* 2057
2057 2 H+ H+ aq 3
2058 2 water H2O liq 1
$out
T P rho logK G H S V Cp
1 2 500 1.02359990 82.3648797 -103697.6352 -144405.9 -137.9678 63.528711 -185.296100
2 100 500 0.98027455 51.5228952 -87971.2924 -155916.9 -174.7265 56.676473 -77.256660
3 200 500 0.89701698 32.1436145 -69590.6387 -163014.3 -191.6459 61.062294 -64.591523
4 300 500 0.77664194 18.9803000 -49776.9907 -169714.6 -204.4686 74.119789 -77.023211
5 400 500 0.57799120 9.0194783 -27781.1703 -196326.3 -246.3027 -132.794621 -723.910907
6 500 500 0.25694656 -0.9573624 3386.8611 -231750.2 -300.5764 -1574.624792 1131.734535
7 600 500 0.16398650 -7.5626815 30214.9540 -202522.8 -263.3891 -402.714387 -286.685276
8 700 500 0.12964454 -13.2476444 58989.6361 -255016.4 -319.8340 -495.575466 -777.377878
9 800 500 0.11009099 -19.5535474 96015.9219 -372643.3 -434.1422 -2035.281723 -1744.816514
10 900 500 0.09688301 -28.0901437 150787.3030 -681636.7 -707.2109 -8199.466193 -5272.652163
11 1000 500 0.08711666 -44.5952131 259791.5885 -1961614.8 -1742.6437 -40796.530094 -28324.867318
12 2 1000 1.04483931 81.7873116 -102970.4753 -144561.8 -135.4149 58.394462 -186.951733
13 100 1000 0.99970469 51.1280788 -87297.1744 -156911.1 -174.9484 56.142018 -78.586210
14 200 1000 0.92370628 31.8079813 -68863.9959 -164241.1 -192.4235 60.563124 -66.089456
15 300 1000 0.82320847 18.6693991 -48961.6341 -171008.5 -205.3824 66.379429 -72.585693
16 400 1000 0.69257907 9.0027495 -27729.6432 -180278.3 -220.1838 52.035008 -124.118722
17 500 1000 0.52821136 1.2831023 -4539.2311 -199321.2 -246.3299 -98.023791 -258.121791
18 600 1000 0.37392977 -5.3380921 21327.1188 -215442.5 -266.2060 -461.519667 -106.839154
19 700 1000 0.28235808 -10.8518738 48321.6537 -223064.8 -274.3956 -739.680699 -99.395163
20 800 1000 0.23102723 -15.5417578 76316.3925 -234681.8 -285.7380 -1113.918858 -124.354658
21 900 1000 0.19845264 -19.6393090 105423.3992 -245861.1 -295.7218 -1747.743089 -88.372970
22 1000 1000 0.17561269 -23.2164781 135248.7254 -250290.8 -299.4000 -2701.450744 9.415429
23 2 1500 1.06375805 81.2527447 -102297.4539 -145205.8 -134.4392 54.396733 -187.869024
24 100 1500 1.01730894 50.7369840 -86629.4108 -157953.4 -175.2821 55.614801 -79.616890
25 200 1500 0.94640664 31.4749650 -68143.0185 -165442.8 -193.1360 60.098656 -67.321807
26 300 1500 0.85760020 18.3666797 -48167.7341 -172108.6 -205.9207 66.305681 -66.896003
27 400 1500 0.75097211 8.7632905 -26992.0782 -179406.7 -217.6294 67.215188 -80.308780
28 500 1500 0.62961762 1.3010940 -4602.8807 -188734.5 -230.5040 41.986099 -108.199217
29 600 1500 0.50831911 -4.7339249 18913.3076 -195370.5 -238.6376 -46.120851 -101.321623
30 700 1500 0.40972516 -9.7009928 43196.9650 -202958.9 -246.8259 -192.579667 -65.821692
31 800 1500 0.34079679 -13.8716229 68115.3466 -206758.0 -250.5857 -359.300722 -11.111799
32 900 1500 0.29336526 -17.3532583 93151.9271 -205473.7 -249.4722 -532.955774 35.219593
33 1000 1500 0.25923723 -20.2390654 117903.6623 -200214.8 -245.1881 -697.871562 66.725372
34 2 2000 1.08048340 80.7521207 -101667.1667 -146221.0 -134.6569 51.199174 -188.580872
35 100 2000 1.03348196 50.3495289 -85967.8618 -159034.6 -175.7035 55.103376 -80.434766
36 200 2000 0.96640772 31.1444820 -67427.5257 -166627.7 -193.8016 59.647135 -68.500742
37 300 2000 0.88562644 18.0659200 -47378.9735 -173310.6 -206.6276 65.660407 -65.152566
38 400 2000 0.79265545 8.4953607 -26166.8196 -180028.6 -217.4238 70.115736 -68.911840
39 500 2000 0.69117683 1.1089070 -3922.9804 -187195.9 -227.3426 66.214033 -74.121337
40 600 2000 0.58996426 -4.7605816 19019.8084 -189442.8 -230.1549 43.577550 -54.454738
41 700 2000 0.50024878 -9.4882179 42249.5128 -193550.4 -234.5413 -2.861942 -45.875114
42 800 2000 0.42869433 -13.4168223 65882.0894 -196585.7 -237.5359 -64.613385 -14.122886
43 900 2000 0.37444904 -16.7024537 89658.4217 -196677.6 -237.6336 -121.786168 9.589584
44 1000 2000 0.33328467 -19.4607092 113369.3103 -195335.2 -236.5380 -159.867452 14.057094
45 2 2500 1.09530649 80.2789352 -101071.4248 -147525.1 -135.7994 48.585386 -189.431982
46 100 2500 1.04847948 49.9655833 -85312.3048 -160147.9 -176.1949 54.612348 -81.097524
47 200 2500 0.98442868 30.8164412 -66717.3203 -167799.4 -194.4280 59.214372 -69.540819
48 300 2500 0.90963179 17.7684333 -46598.7966 -174532.7 -207.3549 64.903441 -64.774993
49 400 2500 0.82587445 8.2224715 -25326.2852 -181035.9 -217.8134 70.335441 -64.773957
50 500 2500 0.73647934 0.8723360 -3086.0633 -187487.7 -226.7518 72.522855 -63.414189
51 600 2500 0.64765806 -4.9346562 19715.2836 -188290.2 -227.8154 68.088175 -37.283551
52 700 2500 0.56644119 -9.5742738 42632.7058 -190838.1 -230.5050 56.181546 -34.588352
53 800 2500 0.49747171 -13.4064900 65831.3539 -193562.7 -233.1819 38.384208 -19.965707
54 900 2500 0.44158649 -16.6216232 89224.5250 -195089.9 -234.5476 24.530695 -12.446599
55 1000 2500 0.39699289 -19.3516094 112733.7440 -196489.2 -235.6895 22.092684 -17.412048
56 2 3000 1.10860171 79.8284044 -100504.2051 -149059.6 -137.6754 46.405566 -190.589254
57 100 3000 1.06247990 49.5849972 -84662.4839 -161288.2 -176.7432 54.143844 -81.646691
58 200 3000 1.00091814 30.4907319 -66012.1626 -168961.1 -195.0227 58.801396 -70.419063
59 300 3000 0.93082544 17.4743997 -45827.6755 -175750.5 -208.0587 64.155290 -64.969580
60 400 3000 0.85387725 7.9505600 -24488.7622 -182173.0 -218.3915 69.759950 -63.093159
61 500 3000 0.77288539 0.6240693 -2207.7702 -188345.7 -226.9469 74.041506 -59.493052
62 600 3000 0.69258709 -5.1520540 20583.8466 -188644.2 -227.3998 75.823110 -31.558493
63 700 3000 0.61802345 -9.7563379 43443.4082 -190701.8 -229.5549 76.037151 -31.587804
64 800 3000 0.55259242 -13.5515328 66543.5732 -193494.0 -232.2916 74.639860 -24.856367
65 900 3000 0.49735113 -16.7441587 89882.2930 -195918.8 -234.4520 76.633075 -24.990792
66 1000 3000 0.45156467 -19.4728148 113439.8319 -198765.0 -236.7757 84.886279 -32.903561
67 2 3500 1.12072902 79.3969365 -99960.9857 -150781.6 -140.1457 44.553225 -192.132100
68 100 3500 1.07561550 49.2076096 -84018.1242 -162451.3 -177.3379 53.698478 -82.113356
69 200 3500 1.01617732 30.1672528 -65311.8332 -170115.9 -195.5924 58.406795 -71.135016
70 300 3500 0.94992267 17.1836799 -45065.2452 -176956.0 -208.7259 63.450959 -65.423877
71 400 3500 0.87830307 7.6814641 -23659.9119 -183356.1 -219.0250 68.934064 -62.437366
72 500 3500 0.80363761 0.3738764 -1322.6626 -189415.2 -227.4242 73.930963 -58.033552
73 600 3500 0.72968242 -5.3829542 21506.3549 -189543.8 -227.6708 78.036135 -29.929983
74 700 3500 0.66033862 -9.9710620 44399.5401 -191511.6 -229.7267 82.721650 -31.901064
75 800 3500 0.59827127 -13.7512104 67524.0722 -194513.2 -232.6651 87.173981 -28.870779
76 900 3500 0.54448193 -16.9380639 90923.1720 -197495.7 -235.3205 94.235826 -31.777219
77 1000 3500 0.49867827 -19.6713804 114596.5859 -201041.0 -238.2162 104.589344 -39.625385
78 2 4000 1.13198820 78.9818060 -99438.3351 -152658.7 -143.1052 42.951860 -194.113411
79 100 4000 1.08798935 48.8332576 -83378.9476 -163633.7 -177.9707 53.275947 -82.520420
80 200 4000 1.03042040 29.8459054 -64616.1190 -171266.1 -196.1427 58.028345 -71.720741
81 300 4000 0.96738518 16.8960518 -44310.9231 -178146.9 -209.3535 62.799127 -65.993115
82 400 4000 0.90010396 7.4157242 -22841.3984 -184552.3 -219.6626 68.048359 -62.266634
83 500 4000 0.83045585 0.1252544 -443.1124 -190568.7 -228.0031 73.208204 -57.580761
84 600 4000 0.76148818 -5.6168587 22440.8664 -190655.9 -228.1988 78.148785 -29.803424
85 700 4000 0.69635913 -10.1960384 45401.3237 -192668.4 -230.3019 84.434358 -33.158009
86 800 4000 0.63726966 -13.9687839 68592.4469 -195882.4 -233.4467 90.733171 -31.832270
87 900 4000 0.58513830 -17.1543816 92084.3612 -199197.6 -236.3981 98.825172 -35.206745
88 1000 4000 0.53987890 -19.8914196 115878.4347 -203030.8 -239.5301 108.428512 -41.721151
89 2 4500 1.14260972 78.5809145 -98933.6115 -154665.8 -146.4715 41.546002 -196.578024
90 100 4500 1.09968504 48.4617812 -82744.6810 -164832.9 -178.6351 52.875413 -82.883570
91 200 4500 1.04380563 29.5266057 -63924.8379 -172413.3 -196.6774 57.664602 -72.206528
92 300 4500 0.98353069 16.6112738 -43564.0753 -179323.1 -209.9424 62.199495 -66.600933
93 400 4500 0.91988547 7.1534079 -22033.4299 -185747.2 -220.2827 67.176161 -62.345603
94 500 4500 0.85436529 -0.1204771 426.2118 -191753.6 -228.6093 72.259857 -57.562801
95 600 4500 0.78947750 -5.8496369 23370.8785 -191849.4 -228.8149 77.408288 -30.204577
96 700 4500 0.72785142 -10.4225141 46409.7840 -193941.8 -231.0037 84.132215 -34.481947
97 800 4500 0.67136869 -14.1900397 69678.9033 -197324.7 -234.3132 90.735742 -33.803669
98 900 4500 0.62087994 -17.3744997 93265.9503 -200817.7 -237.4235 98.440329 -36.597558
99 1000 4500 0.57641094 -20.1124585 117166.1075 -204705.4 -240.6010 106.549943 -41.310271
100 2 5000 1.15275733 78.1926025 -98444.7255 -156782.2 -150.1777 40.295145 -199.556336
101 100 5000 1.11077194 48.0930415 -82115.0869 -166046.5 -179.3257 52.495753 -83.211976
102 200 5000 1.05645387 29.2092764 -63237.8229 -173558.6 -197.1991 57.314575 -72.613864
103 300 5000 0.99858803 16.3291150 -42824.0968 -180485.5 -210.4953 61.648709 -67.201065
104 400 5000 0.93805835 6.8944002 -21235.6522 -186934.6 -220.8763 66.346236 -62.561116
105 500 5000 0.87602855 -0.3628699 1283.7251 -192946.2 -229.2102 71.248246 -57.732435
106 600 5000 0.81457739 -6.0796073 24289.6723 -193068.2 -229.4473 76.327030 -30.749498
107 700 5000 0.75593556 -10.6337328 47350.3069 -195290.1 -231.8496 81.886439 -27.745457
108 800 5000 0.70174792 -14.4093170 70755.6450 -198741.3 -235.1468 89.327441 -34.975949
109 900 5000 0.65281273 -17.5913704 94430.1077 -202306.0 -238.3215 96.222496 -36.714604
110 1000 5000 0.60922636 -20.3273514 118417.9767 -206109.4 -241.4312 102.815829 -39.443974
$state
T P quartz chalcopyrite
1 2 500 1 1
2 100 500 1 1
3 200 500 1 1
4 300 500 1 1
5 400 500 1 1
6 500 500 1 1
7 600 500 2 2
8 700 500 2 3
9 800 500 2 3
10 900 500 2 3
11 1000 500 2 3
12 2 1000 1 1
13 100 1000 1 1
14 200 1000 1 1
15 300 1000 1 1
16 400 1000 1 1
17 500 1000 1 1
18 600 1000 1 2
19 700 1000 2 3
20 800 1000 2 3
21 900 1000 2 3
22 1000 1000 2 3
23 2 1500 1 1
24 100 1500 1 1
25 200 1500 1 1
26 300 1500 1 1
27 400 1500 1 1
28 500 1500 1 1
29 600 1500 1 2
30 700 1500 2 3
31 800 1500 2 3
32 900 1500 2 3
33 1000 1500 2 3
34 2 2000 1 1
35 100 2000 1 1
36 200 2000 1 1
37 300 2000 1 1
38 400 2000 1 1
39 500 2000 1 1
40 600 2000 1 2
41 700 2000 2 3
42 800 2000 2 3
43 900 2000 2 3
44 1000 2000 2 3
45 2 2500 1 1
46 100 2500 1 1
47 200 2500 1 1
48 300 2500 1 1
49 400 2500 1 1
50 500 2500 1 1
51 600 2500 1 2
52 700 2500 2 3
53 800 2500 2 3
54 900 2500 2 3
55 1000 2500 2 3
56 2 3000 1 1
57 100 3000 1 1
58 200 3000 1 1
59 300 3000 1 1
60 400 3000 1 1
61 500 3000 1 1
62 600 3000 1 2
63 700 3000 2 3
64 800 3000 2 3
65 900 3000 2 3
66 1000 3000 2 3
67 2 3500 1 1
68 100 3500 1 1
69 200 3500 1 1
70 300 3500 1 1
71 400 3500 1 1
72 500 3500 1 1
73 600 3500 1 2
74 700 3500 2 3
75 800 3500 2 3
76 900 3500 2 3
77 1000 3500 2 3
78 2 4000 1 1
79 100 4000 1 1
80 200 4000 1 1
81 300 4000 1 1
82 400 4000 1 1
83 500 4000 1 1
84 600 4000 1 2
85 700 4000 2 3
86 800 4000 2 3
87 900 4000 2 3
88 1000 4000 2 3
89 2 4500 1 1
90 100 4500 1 1
91 200 4500 1 1
92 300 4500 1 1
93 400 4500 1 1
94 500 4500 1 1
95 600 4500 1 2
96 700 4500 2 3
97 800 4500 2 3
98 900 4500 2 3
99 1000 4500 2 3
100 2 5000 1 1
101 100 5000 1 1
102 200 5000 1 1
103 300 5000 1 1
104 400 5000 1 1
105 500 5000 1 1
106 600 5000 1 2
107 700 5000 1 3
108 800 5000 2 3
109 900 5000 2 3
110 1000 5000 2 3
subcrt> # the volumes are significantly different from SUPCRT92
subcrt>
subcrt> ## Standard Gibbs energy of reactions with HCN and
subcrt> ## formaldehyde, after Schulte and Shock, 1995 Fig. 1
subcrt> rxn1 <- subcrt(c("formaldehyde","HCN","H2O","glycolic acid","NH3"),
subcrt+ c(-1,-1,-2,1,1),P=300)
subcrt: 5 species at 15 values of T and P (wet)
subcrt> rxn2 <- subcrt(c("formaldehyde","HCN","H2O","glycine"),
subcrt+ c(-1,-1,-1,1),P=300)
subcrt: 4 species at 15 values of T and P (wet)
subcrt> plot(x=rxn1$out$T,rxn1$out$G/1000,type="l",ylim=c(-40,-10),
subcrt+ xlab=axis.label("T"),ylab=axis.label("DG0r","k"))
subcrt> lines(rxn1$out$T,rxn2$out$G/1000)
subcrt> # write the reactions on the plot
subcrt> text(150,-14,describe(rxn1$reaction,
subcrt+ use.name=c(TRUE,FALSE,FALSE,TRUE,FALSE)))
subcrt> text(200,-35,describe(rxn2$reaction,
subcrt+ use.name=c(TRUE,FALSE,FALSE,TRUE)))
subcrt> title(main=paste("Standard Gibbs energy of reactions",
subcrt+ "after Schulte and Shock, 1995",sep="\n"))
subcrt> ## Calculation of chemical affinities
subcrt> # after LaRowe and Helgeson, 2007
subcrt> # Fig. 3 (a): reduction of nicotinamide adenine
subcrt> # dinucleotide (NAD) coupled to oxidation of glucose
subcrt> # list the available NAD species
subcrt> info('NAD ')
info: no match for NAD .
info: approximately matching species are:
name abbrv formula state
1825 H2NAD(red) H2NAD(red) C21H29N7O14P2 aq
1826 HNAD(red)- HNAD(red)- C21H28N7O14P2- aq
1827 NAD(red)-2 NAD(red)-2 C21H27N7O14P2-2 aq
1828 H2NAD(ox)+ H2NAD(ox)+ C21H28N7O14P2+ aq
1829 HNAD(ox) HNAD(ox) C21H27N7O14P2 aq
1830 NAD(ox)- NAD(ox)- C21H26N7O14P2- aq
1834 H4NADP(red) H4NADP(red) C21H30N7O17P3 aq
1835 H3NADP(red)- H3NADP(red)- C21H29N7O17P3- aq
1836 H2NADP(red)-2 H2NADP(red)-2 C21H28N7O17P3-2 aq
1837 HNADP(red)-3 HNADP(red)-3 C21H27N7O17P3-3 aq
1838 NADP(red)-4 NADP(red)-4 C21H26N7O17P3-4 aq
1839 H4NADP(ox)+ H4NADP(ox)+ C21H29N7O17P3+ aq
1840 H3NADP(ox) H3NADP(ox) C21H28N7O17P3 aq
1841 H2NADP(ox)- H2NADP(ox)- C21H27N7O17P3- aq
1842 HNADP(ox)-2 HNADP(ox)-2 C21H26N7O17P3-2 aq
1843 NADP(ox)-3 NADP(ox)-3 C21H25N7O17P3-3 aq
subcrt> T <- seq(0,120,10)
subcrt> # oxidation of glucose (C6H12O6)
subcrt> 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 1536 -3 aq
H2O 0 2 0 1 0 1 0 liq
NH3 0 3 1 0 0 68 999 aq
CO2 1 0 0 2 0 69 -3 aq
H+ 0 1 0 0 1 3 -7 aq
subcrt> t <- 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).
subcrt> # LH07's diagrams are shown per mole of electron (24 e- per 12 NAD)
subcrt> A <- t$out$A/24/1000
subcrt> plot(x=T,y=A,xlim=range(T),ylim=c(1.4,5.4),
subcrt+ xlab=axis.label('T'),ylab=axis.label('A',opt='k'),type='l')
subcrt> text('NAD(ox)-/NAD(red)-2 = 1',x=median(T),y=median(A))
subcrt> # different activity ratio
subcrt> t <- 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).
subcrt> A <- t$out$A/24/1000
subcrt> lines(x=T,y=A)
subcrt> text('NAD(ox)-/NAD(red)-2 = 10',x=median(T),y=median(A))
subcrt> # different activity ratio
subcrt> t <- 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).
subcrt> A <- t$out$A/24/1000
subcrt> lines(x=T,y=t$out$A/24/1000)
subcrt> text('NAD(ox)-/NAD(red)-2 = 0.1',x=median(T),y=median(A))
subcrt> # this command prints the reaction on the plot
subcrt> text(40,4.5,c2s(s2c(describe(t$reaction,
subcrt+ use.name=c(TRUE,TRUE,FALSE,FALSE,FALSE,FALSE)),
subcrt+ sep='=',move.sep=TRUE),sep='\n'))
subcrt> # label the plot
subcrt> title(main=paste('Chemical affinity of NAD reduction',
subcrt+ 'after LaRowe and Helgeson, 2007',sep='\n'),
subcrt+ sub=describe(thermo$basis,T=NULL))
subcrt> ### non-ideality calculations -- activity coefficients of
subcrt> ### aqueous species as a function of charge, temperature,
subcrt> ### and ionic strength -- after Alberty, 2003
subcrt> ## p. 16 Table 1.3 apparent pKa of acetic acid with
subcrt> ## changing ionic strength
subcrt> subcrt(c("acetic acid","acetate","H+"),c(-1,1,1),
subcrt+ IS=c(0,0.1,0.25),T=25,property="logK")
subcrt: 3 species at 298.15 K and P (wet)
nonideal: 2 species were nonideal.
$reaction
coeff name formula state ispecies
486 -1 acetic acid C2H4O2 aq 486
511 1 acetate C2H3O2- aq 511
3 1 H+ H+ aq 3
$out
T P logK G loggam IS
1 25 1 -4.757213 6490.000 0.0000000 0.00
2 25 1 -4.542751 6197.421 -0.4938181 0.10
3 25 1 -4.473510 6102.960 -0.6532497 0.25
subcrt> # note that these *apparent* values of G and logK approach
subcrt> # their *standard* counterparts as IS goes to zero.
subcrt> ## p. 95: basis and elemental stoichiometries of species
subcrt> ## (a digression here from the nonideality calculations)
subcrt> # note coefficient of O2 and NH3 will be zero for these species
subcrt> basis(c("ATP-4","H+","H2O","HPO4-2","O2","NH3"))
basis: changed basis to C10H12N5O13P3-4 H+ H2O HPO4-2 O2 NH3.
C H N O P Z ispecies logact state
C10H12N5O13P3-4 10 12 5 13 3 -4 1792 0 aq
H+ 0 1 0 0 0 1 3 0 aq
H2O 0 2 0 1 0 0 1 0 liq
HPO4-2 0 1 0 4 1 -2 20 0 aq
O2 0 0 0 2 0 0 2852 0 gas
NH3 0 3 1 0 0 0 68 0 aq
subcrt> # cf Eq. 5.1-33: (basis composition)
subcrt> species(c("ATP-4","H+","H2O","HPO4-2","ADP-3","HATP-3","HADP-2","H2PO4-"))
subcrt> lb <- length(basis())
subcrt> # cf Eq. 5.1-32: (elemental composition)
subcrt> as.matrix(species()[,1:lb])
C10H12N5O13P3-4 H+ H2O HPO4-2 O2 NH3
1 1 0 0 0 0 0
2 0 1 0 0 0 0
3 0 0 1 0 0 0
4 0 0 0 1 0 0
5 1 -1 1 -1 0 0
6 1 1 0 0 0 0
7 1 0 1 -1 0 0
8 0 1 0 1 0 0
subcrt> ## p. 273-275: activity coefficient (gamma)
subcrt> ## as a function of ionic strength and temperature
subcrt> ## (as of 20080304, these do look quantitatively different
subcrt> ## from the plots in Alberty's book.)
subcrt> iplotfun <- function(T,col,add=TRUE) {
subcrt+ IS <- seq(0,0.25,0.0025)
subcrt+ s <- subcrt(c("H2PO4-","HADP-2","HATP-3","ATP-4"),IS=IS,grid="IS",T=T)
subcrt+ if(!add) thermo.plot.new(xlim=range(IS),ylim=c(0,1),
subcrt+ xlab=axis.label("IS"),ylab="gamma")
subcrt+ for(i in 1:4) lines(IS,10^s$out[[i]]$loggam,col=col)
subcrt+ }
subcrt> iplotfun(0,"blue",add=FALSE)
subcrt: 4 species at 273.16 K and P (wet)
nonideal: 4 species were nonideal.
subcrt> iplotfun(25,"black")
subcrt: 4 species at 298.15 K and P (wet)
nonideal: 4 species were nonideal.
subcrt> iplotfun(40,"red")
subcrt: 4 species at 313.15 K and P (wet)
nonideal: 4 species were nonideal.
subcrt> title(main=paste("activity coefficient (gamma) of -1,-2,-3,-4",
subcrt+ "charged species at 0, 25, 40 deg C, after Alberty, 2003",
subcrt+ sep="\n"),cex.main=0.95)
Next: nuts
Up: CHNOSZ examples
Previous: water