Computing pH
This page follows Chapter 11 of Bethke (2007).
The geochemistry
module can be used to provide values for pH assuming equilibrium. Recall that where denotes activity.
An example of such a calculation involves the mineral hematite. Hematite's equilibrium reaction is has an equilibrium constant at 25C. Assuming a water activity of 1, and , equilibrium reads (1)
To perform this calculation using the geochemistry
module, a GeochemicalModelDefinition object must be created with the desired mineral species:
[UserObjects<<<{"href": "../../../syntax/UserObjects/index.html"}>>>]
[definition]
type = GeochemicalModelDefinition<<<{"description": "User object that parses a geochemical database file, and only retains information relevant to the current geochemical model", "href": "../../../source/userobjects/GeochemicalModelDefinition.html"}>>>
database_file<<<{"description": "The name of the geochemical database file"}>>> = "../../../database/moose_geochemdb.json"
basis_species<<<{"description": "A list of basis components relevant to the aqueous-equilibrium problem. H2O must appear first in this list. These components must be chosen from the 'basis species' in the database, the sorbing sites (if any) and the decoupled redox states that are in disequilibrium (if any)."}>>> = "H2O Fe++ H+ O2(aq)"
equilibrium_minerals<<<{"description": "A list of minerals that are in equilibrium with the aqueous solution. All members of this list must be in the 'minerals' section of the database file"}>>> = "Hematite"
piecewise_linear_interpolation<<<{"description": "If true then use a piecewise-linear interpolation of logK and Debye-Huckel parameters, regardless of the interpolation type specified in the database file. This can be useful for comparing with results using other geochemistry software"}>>> = true # to get exact logK at 25degC with no best-fit interpolation
[]
[]
(modules/geochemistry/test/tests/interrogate_reactions/hematite.i)Then a GeochemicalModelInterrogator must be created which specifies the desired swaps and the interrogation = activity
instruction:
[GeochemicalModelInterrogator<<<{"href": "../../../syntax/GeochemicalModelInterrogator/index.html"}>>>]
model_definition<<<{"description": "The name of the GeochemicalModelDefinition user object"}>>> = definition
equilibrium_species<<<{"description": "Only output results for this equilibrium species. If not provided, results for all equilibrium species will be outputted"}>>> = Hematite
activity_species<<<{"description": "Species that are provided numerical values of activity (or fugacity for gases) in the activity_value input"}>>> = 'H2O Fe++'
activity_values<<<{"description": "Numerical values for the activity (or fugacity) for the species in the activity_species list. These are activity values, not log10(activity)."}>>> = '1 1E-10'
interrogation<<<{"description": "Type of interrogation to perform. reaction: Output equilibrium species reactions and log10K. activity: determine activity products at equilibrium. eqm_temperature: determine temperature to ensure equilibrium"}>>> = activity
[]
(modules/geochemistry/test/tests/interrogate_reactions/hematite.i)The output yields the desired information:
(A_H+)^-4 (A_O2(aq))^0.5 = 10^3.068
This is the square-root of Eq. (1).
References
- Craig M. Bethke.
Geochemical and Biogeochemical Reaction Modeling.
Cambridge University Press, 2 edition, 2007.
doi:10.1017/CBO9780511619670.[BibTeX]