next up previous
Next: [1] anim Up: CHNOSZ examples Previous: findit - see demos

[2] transfer

## Don't show: data(thermo)
thermo$obigt: 1809 aqueous, 3368 total species
## End(Don't show) ## react potassium feldspar in a closed system ## after Steinmann et al., 1994 and Helgeson et al., 1969 # load the secondary database to use H4SiO4 add.obigt()
add.obigt: using default file: /home/jedick/R/x86_64-slackware-linux-gnu-library/3.3/CHNOSZ/extdata/thermo/OBIGT-2.csv add.obigt: read 305 rows; made 84 replacements, 221 additions, units = cal add.obigt: use data(thermo) to restore default database
basis(c("Al+3", "H4SiO4", "K+", "H2O", "H+", "O2"), c(0, -6, -6, 0, 0, 0))
Al H K O Si Z ispecies logact state Al+3 1 0 0 0 0 3 1019 0 aq H4SiO4 0 4 0 4 1 0 3536 -6 aq K+ 0 0 1 0 0 1 6 -6 aq H2O 0 2 0 1 0 0 1 0 liq H+ 0 1 0 0 0 1 3 0 aq O2 0 0 0 2 0 0 67 0 aq
species(c("k-feldspar", "muscovite", "pyrophyllite", "kaolinite", "gibbsite"))
Al+3 H4SiO4 K+ H2O H+ O2 ispecies logact state name 1 1 3 1 -4 -4 0 1953 0 cr k-feldspar 2 3 3 1 0 -10 0 1986 0 cr muscovite 3 2 4 0 -4 -6 0 2010 0 cr pyrophyllite 4 2 2 0 1 -6 0 1958 0 cr kaolinite 5 1 0 0 3 -3 0 1932 0 cr gibbsite
a <- affinity(H4SiO4=c(-6, -2), "K+"=c(-3, 8))
energy.args: temperature is 25 C energy.args: pressure is Psat energy.args: variable 1 is log_a(H4SiO4) at 128 values from -6 to -2 energy.args: variable 2 is log_a(K+) at 128 values from -3 to 8 subcrt: 11 species at 298.15 K and 1 bar (wet)
diagram(a, fill="heat")
balance: coefficients are moles of Al+3 in formation reactions diagram: plotting A/2.303RT from affinity(), divided by balancing coefficients
basis("pH", 4)
Al H K O Si Z ispecies logact state Al+3 1 0 0 0 0 3 1019 0 aq H4SiO4 0 4 0 4 1 0 3536 -6 aq K+ 0 0 1 0 0 1 6 -6 aq H2O 0 2 0 1 0 0 1 0 liq H+ 0 1 0 0 0 1 3 -4 aq O2 0 0 0 2 0 0 67 0 aq
species(1:5, c(-4, rep(-999, 4)))
Al+3 H4SiO4 K+ H2O H+ O2 ispecies logact state name 1 1 3 1 -4 -4 0 1953 -4 cr k-feldspar 2 3 3 1 0 -10 0 1986 -999 cr muscovite 3 2 4 0 -4 -6 0 2010 -999 cr pyrophyllite 4 2 2 0 1 -6 0 1958 -999 cr kaolinite 5 1 0 0 3 -3 0 1932 -999 cr gibbsite
tr <- transfer(190, dmode="coupled", plot=c(2, 3), devmax=1, alphamax=-1.5)
--- step 1 --- transfer: destruction exponent is -10 transfer: destruction is coupled ( coupled ) transfer: formation is one species, balanced on Al+3 energy.args: temperature is 25 C energy.args: pressure is Psat subcrt: 11 species at 298.15 K and 1 bar (wet) transfer: coupling: nothing to react transfer: failed step ( would form gibbsite ) --- step 2 --- transfer: destruction exponent is -10 transfer: destruction is coupled ( all ) transfer: formation is one species, balanced on Al+3 energy.args: temperature is 25 C energy.args: pressure is Psat transfer: reacting 1e-14 moles of k-feldspar (primary) transfer: forming 1e-14 moles of gibbsite --- step 3 --- transfer: destruction exponent is -9 transfer: destruction is coupled ( coupled ) transfer: formation is one species, balanced on Al+3 transfer: coupling: no conservant transfer: failed step ( would form gibbsite ) --- step 4 --- transfer: destruction exponent is -9 transfer: destruction is coupled ( all ) transfer: formation is one species, balanced on Al+3 energy.args: temperature is 25 C energy.args: pressure is Psat transfer: reacting 1e-13 moles of k-feldspar (primary) transfer: reacting 1e-14 moles of gibbsite transfer: forming 1.1e-13 moles of gibbsite [... MUCH OUTPUT OMITTED ...] --- step 186 --- transfer: destruction exponent is -15.5 transfer: destruction is coupled ( coupled ) transfer: formation is one species, balanced on Al+3 transfer: coupling: no conservant transfer: failed step ( would form k-feldspar ) --- step 187 --- transfer: destruction exponent is -15.5 transfer: destruction is coupled ( all ) transfer: formation is one species, balanced on Al+3 transfer: change of H4SiO4 by -2.4785409360272 exceeds deviation limit transfer: change of K+ by -2.00429598430172 exceeds deviation limit transfer: change of H+ by 4.22882181228674 exceeds deviation limit transfer: failed step ( would form k-feldspar ) --- step 188 --- transfer: destruction exponent is -16.5 transfer: destruction is coupled ( coupled ) transfer: formation is one species, balanced on Al+3 transfer: coupling: nothing to react transfer: failed step ( would form k-feldspar ) --- step 189 --- transfer: destruction exponent is -16.5 transfer: destruction is coupled ( all ) transfer: formation is one species, balanced on Al+3 transfer: change of H4SiO4 by -2.4785409360272 exceeds deviation limit transfer: change of K+ by -2.00429598430173 exceeds deviation limit transfer: change of H+ by 4.22882181228674 exceeds deviation limit transfer: failed step ( would form k-feldspar ) --- step 190 --- transfer: destruction exponent is -17.5 transfer: destruction is coupled ( coupled ) transfer: formation is one species, balanced on Al+3 transfer: coupling: no conservant transfer: failed step ( would form k-feldspar ) transfer: 74 of 190 steps succeeded ( 149.991146513005 % overall progress)

Image transfer1

 

# plot the output from transfer draw.transfer(tr) # reset the plot layout layout(matrix(1)) # restore the primary database data(thermo)
thermo$obigt: 1809 aqueous, 3368 total species
## can also run the calculation above (at higher resolution) with #feldspar("closed") ## or an example for proteins with #apc("closed")
trnsfr>

Image transfer2

 


next up previous
Next: [1] anim Up: CHNOSZ examples Previous: findit - see demos