next up previous
Next: swap.basis Up: CHNOSZ examples Previous: makeup

basis

## Don't show: data(thermo)
thermo$obigt: 1809 aqueous, 3368 total species
## End(Don't show) ## define basis species # one, two and three element examples basis("O2")
O ispecies logact state O2 2 67 0 aq
basis(c("H2O", "O2"))
H O ispecies logact state H2O 2 1 1 0 liq O2 0 2 67 0 aq
basis(c("H2O", "O2", "H+"))
H O Z ispecies logact state H2O 2 1 0 1 0 liq O2 0 2 0 67 0 aq H+ 1 0 1 3 0 aq
## clear the basis species basis(delete=TRUE)
H O Z ispecies logact state H2O 2 1 0 1 0 liq O2 0 2 0 67 0 aq H+ 1 0 1 3 0 aq
## Not run: ##D ## marked dontrun because they produce errors ##D # fewer species than elements ##D basis(c("H2O", "H+")) ##D # more species than elements ##D basis(c("H2O", "O2", "H2", "H+")) ##D # non-independent species ##D basis(c("CO2", "H2O", "HCl", "Cl-", "H+")) ## End(Not run) ## specify activities and states basis(c("H2O", "O2", "CO2"), c(-2, -78, -3), c("liq", "aq", "aq"))
C H O ispecies logact state H2O 0 2 1 1 -2 liq O2 0 0 2 67 -78 aq CO2 1 0 2 69 -3 aq
# change logarithms of activities/fugacities basis(c("H2O", "O2"), c(0, -80))
C H O ispecies logact state H2O 0 2 1 1 0 liq O2 0 0 2 67 -80 aq CO2 1 0 2 69 -3 aq
# change state of CO2 basis("CO2", "gas")
C H O ispecies logact state H2O 0 2 1 1 0 liq O2 0 0 2 67 -80 aq CO2 1 0 2 3087 -3 gas


next up previous
Next: swap.basis Up: CHNOSZ examples Previous: makeup