eq_sol_wham: Calculate equilibrium solubility in the presence of humic...

View source: R/eq_sol_wham.R

eq_sol_whamR Documentation

Calculate equilibrium solubility in the presence of humic acid

Description

Compute equilibrium solubility in the presence of humic acid, using the Windermere Humic Acid Model (WHAM), due to Tipping and Hurley (see phreeqc::Tipping_Hurley.dat, https://doi.org/10.1016/0016-7037(92)90158-F, and https://water.usgs.gov/water-resources/software/PHREEQC/documentation/phreeqc3-html/phreeqc3.htm). This function works like eq_sol_fixed().

Usage

eq_sol_wham(
  ph,
  dic,
  phosphate = 0,
  phase,
  mass_ha = 0,
  element,
  mu_is = 0.003,
  phase_quantity = 1,
  pe = 4,
  eq_phase_components = list(),
  new_phase = list(),
  phase_out = "Fix_pH",
  new_species = list(),
  surface_components = list(),
  output_components = list(),
  buffer = "NaOH",
  db = pbcu2sol,
  max_iter = 3,
  print = NULL,
  ...
)

pb_sol_wham(element = "Pb", ...)

cu_sol_wham(element = "Cu", ...)

Arguments

ph

pH

dic

Dissolved inorganic carbon, in mg C/L.

phosphate

Orthophosphate, in mg P/L.

phase

Equilibrium phase.

mass_ha

Mass of humic acid in grams dissolved organic carbon.

element

An element to return the equilibrium concentration of.

mu_is

An initial guess for the ionic strength, used to estimate the specific surface area of the humic acid molecules.

phase_quantity

Moles of equilibrium phase initially present.

pe

Set the pe of the solution.

eq_phase_components

Additional equilibrium phase components, passed to tidyphreeqc::phr_input_section as a list.

new_phase

Define phases not included in the database.

phase_out

Add an equilibrium phase to the output. Default is the pseudophase "Fix_pH".

new_species

Define solution species not included in the database.

surface_components

Additional surface components, passed to tidyphreeqc::phr_input_section as a list.

output_components

Additional output components, passed to tidyphreeqc::phr_input_section as a list.

buffer

Substance added or subtracted from the solution to yield the desired pH.

db

The database to use for equilibrium solubility computations. The default is leadsol

max_iter

Maximum iterations allowed for convergence of ionic strength.

print

Choose whether to print the input file ("input"), the full output ("output"), or the selected output. Default is the latter.

...

Arguments passed on to tidyphreeqc::phr_input_section() as solution phase components. Concentrations should be expressed in mmol/kgw.

Value

A tibble with columns representing equilibrium phase, pH, dissolved inorganic carbon, orthophosphate (as P), pe, ionic strength (mu), total concentration of element in solution, and moles of the equilibrium phase dissolved.

Functions

  • pb_sol_wham(): Shorthand for eq_sol_wham() with element = "Pb". For backwards compatibility.

  • cu_sol_wham(): Shorthand for eq_sol_wham() with element = "Cu". For backwards compatibility.

Examples

eq_sol_wham(element = "Pb", ph = 7.5, dic = 50, phase = "Cerussite", Na = 10, mass_ha = 3.5e-3)

bentrueman/pbcusol documentation built on Oct. 25, 2024, 1:06 p.m.