phr_solution_species: Define a solution/surface species

Description Usage Arguments See Also Examples

View source: R/phreeqc_input_helpers.R

Description

Define a solution/surface species

Usage

1
2
3
4
5
phr_solution_species(reaction, log_k = NULL, delta_h = NULL,
  analytical_expression = NULL, ...)

phr_surface_species(reaction, log_k = NULL, delta_h = NULL,
  analytical_expression = NULL, ...)

Arguments

reaction

The formation reaction of the species, e.g.: CO3-2 + H+ = HCO3-.

log_k

The equilibrium coefficient of the reaction at 25 degrees C. Alternatively can be specified for all temperatures using analytical_expression.

delta_h

The enthalpy of reaction, in kJ/mol (or with defined units). Used to determine the temperature dependence of K according to the Van't-Hoff equation, if analytical_expression is not provided.

analytical_expression

Identifier for coefficients for an analytical expression for the temperature dependence of log K. Must be a vector of six numeric values: A1 + A2*T + A3/T + A4*log10(T) + A5 / T^2 + A6*T^2.

...

Further arguments in the input block

A phr_input_section()

See Also

https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/phreeqc3-html/phreeqc3-43.htm https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/html/final-62.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# default units are kJ/mol for log_k
sp1 <- phr_solution_species("CO3-2 + H+ = HCO3-", log_k = 10.329, delta_h = -14.899)
# can also specify units
sp2 <- phr_solution_species("CO3-2 + H+ = HCO3-", log_k = 10.329, delta_h = "-3.561 kcal")
# log_k can also be specified through an analytical expression
sp3 <- phr_solution_species(
 "CO3-2 + H+ = HCO3-",
 analytical_expression = c(107.8871, 0.03252849, -5151.79, -38.92561, 563713.9, 0)
)

list(kJ = sp1, kcal = sp2, analytic = sp3, default = NULL) %>%
  lapply(
    phr_run,
    phr_solution("C" = "1 as CO3-2", temp = 90, units = "mol/L"),
    phr_selected_output(activities = "HCO3-")
  )

paleolimbot/tidyphreeqc documentation built on Aug. 29, 2019, 11:14 p.m.