Chemical model of Amazon river water

This example closely follows Section 6.2 of Bethke (2007).

A chemical analysis of the major element composition of water in the Amazon river Table 1. The "free" O(aq) concentration of 5.8mg.kg means its bulk composition will be more than this. In addition, the pH is 6.5. Assume that the extent of the system is 1kg of solvent water along with the solutes dissolved in it.

Table 1: Major element composition of Amazon river water

SpeciesConcentration (mg.kg)
HCO19
SiO(aq)7
O(aq)5.8 free
Ca4.3
SO3
Cl4.9
Na1.8
Mg1.1
Al0.07
Fe0.06

The concentration of Cl is listed as 1.9mg.kg in Bethke (2007), but its molality is computed to be 1.38E-4mol/kg(solvent water). Hence its bulk composition must have been at least 1.38E-4mol since all the stoichiometric coefficients of Cl- in all the secondary species are positive. This implies the bulk composition of Cl must be more than 1.9mg/kg(soln). There is probably a typo in the book. Hence the bulk concentration is set to 4.9mg/kg(soln), leading to 1.383E-4moles. In any case, charge balance is performed on Cl.

MOOSE input file: no minerals

The MOOSE input file contains the usual GeochemicalModelDefinition that specifies the database file to use, and in this case just the basis species and equilibrium minerals (that are prevented from precipitating, but for which the saturation indices are of interest). The flag piecewise_linear_interpolation = true in order to compare with the Geochemists Workbench result.

[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 H+ SiO2(aq) Al+++ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- 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"}>>> = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
    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 # for comparison with GWB
  []
[]
(moose/modules/geochemistry/test/tests/equilibrium_models/amazon.i)

To instruct MOOSE to find the equilibrium configuration, a TimeIndependentReactionSolver is used:

  • The pH is fixed by setting the activity of H.

  • The bulk mole number of the aqueous species is also fixed appropriately. The numbers are different than the concentration in mg.kg given in the above table, and may be worked out using the TDS.

  • The prevent_precipitation input prevents any minerals from precipitating when finding the equilibrium configuration, even if their saturation indices are positive.

  • The other flags enable an accurate comparison with the Geochemists Workbench software.

[TimeIndependentReactionSolver<<<{"href": "../../../syntax/TimeIndependentReactionSolver/index.html"}>>>]
  model_definition<<<{"description": "The name of the GeochemicalModelDefinition user object (you must create this UserObject yourself)"}>>> = definition
  charge_balance_species<<<{"description": "Charge balance will be enforced on this basis species.  This means that its bulk mole number may be changed from the initial value you provide in order to ensure charge neutrality.  After the initial swaps have been performed, this must be in the basis, and it must be provided with a bulk_composition constraint_meaning."}>>> = "Cl-"
  constraint_species<<<{"description": "Names of the species that have their values fixed to constraint_value with meaning constraint_meaning.  All basis species (after swap_into_basis and swap_out_of_basis) must be provided with exactly one constraint.  These constraints are used to compute the configuration during the initial problem setup, and in time-dependent simulations they may be modified as time progresses."}>>> = "H2O              H+            O2(aq)             SiO2(aq)         Al+++            Fe++             Ca++             Mg++             Na+              HCO3-            SO4--            Cl-      "
  constraint_value<<<{"description": "Numerical value of the containts on constraint_species"}>>> = "  1.0              -6.5          1.813E-4           0.0001165        2.5945E-6        1.0744E-6        0.0001073        4.526E-5         7.83E-5          0.0003114        3.1233E-5        1.383E-4"
  constraint_meaning<<<{"description": "Meanings of the numerical values given in constraint_value.  kg_solvent_water: can only be applied to H2O and units must be kg.  bulk_composition: can be applied to all non-gas species, and represents the total amount of the basis species contained as free species as well as the amount found in secondary species but not in kinetic species, and units must be moles or mass (kg, g, etc).  bulk_composition_with_kinetic: can be applied to all non-gas species, and represents the total amount of the basis species contained as free species as well as the amount found in secondary species and in kinetic species, and units must be moles or mass (kg, g, etc).  free_concentration: can be applied to all basis species that are not gas and not H2O and not mineral, and represents the total amount of the basis species existing freely (not as secondary species) within the solution, and units must be molal or mass_per_kg_solvent.  free_mineral: can be applied to all mineral basis species, and represents the total amount of the mineral existing freely (precipitated) within the solution, and units must be moles, mass or cm3.  activity and log10activity: can be applied to basis species that are not gas and not mineral and not sorbing sites, and represents the activity of the basis species (recall pH = -log10activity), and units must be dimensionless.  fugacity and log10fugacity: can be applied to gases, and units must be dimensionless"}>>> = "kg_solvent_water log10activity free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
  constraint_unit<<<{"description": "Units of the numerical values given in constraint_value.  Dimensionless: should only be used for activity or fugacity constraints.  Moles: mole number.  Molal: moles per kg solvent water.  kg: kilograms.  g: grams.  mg: milligrams.  ug: micrograms.  kg_per_kg_solvent: kilograms per kg solvent water.  g_per_kg_solvent: grams per kg solvent water.  mg_per_kg_solvent: milligrams per kg solvent water.  ug_per_kg_solvent: micrograms per kg solvent water.  cm3: cubic centimeters"}>>> = "   kg               dimensionless molal              moles            moles            moles            moles            moles            moles            moles            moles            moles"
  max_initial_residual<<<{"description": "Attempt to alter the initial-guess molalities so that the initial residual for the Newton process (that finds the aqueous configuration) is less than this number of moles"}>>> = 0.1 # this small value is needed so that the charge-balance species is not switched to Ca++ (which, by the way, does not make a huge difference to the result)
  prevent_precipitation<<<{"description": "Mineral species in this list will be prevented from precipitating, irrespective of their saturation index (unless they are initially in the basis)"}>>> = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
  stoichiometric_ionic_str_using_Cl_only<<<{"description": "If set to true, the stoichiometric ionic strength will be set equal to Cl- molality (or max_ionic_strength if the Cl- molality is too big).  This flag overrides ionic_str_using_basis_molality_only"}>>> = true # for comparison with GWB
  mol_cutoff<<<{"description": "Information regarding species with molalities less than this amount will not be outputted"}>>> = 1E-7
  abs_tol<<<{"description": "If the residual of the algebraic system (measured in mol) is lower than this value, the Newton process (that finds the aqueous configuration) is deemed to have converged"}>>> = 1E-15
[]
(moose/modules/geochemistry/test/tests/equilibrium_models/amazon.i)

GWB input file: no minerals

The analogous GWB input file is

# React script that is the GWB equivalent to amazon.i
data = thermo.tdat verify
conductivity = conductivity-USGS.dat
temperature = 25 C
H2O          = 1 free kg
HCO3-        = .0003114 mol
SiO2(aq)     = .0001165 mol
O2(aq)       = .0001813 free molal
Ca++         = .0001073 mol
SO4--        = 3.1233e-5 mol
Cl-          = .0001383 mol
balance on Cl-
Na+          = 7.83e-5 mol
Mg++         = 4.526e-5 mol
Al+++        = 2.5945e-6 mol
Fe++         = 1.0744e-6 mol
pH           = 6.5
suppress all
printout  species = long
epsilon = 1e-12
(moose/modules/geochemistry/test/tests/equilibrium_models/amazon.rea)

Results: no minerals

Error and charge-neutrality error

The geochemistry simulation reports an error of 3.163e-16mol, and that the charge of the solution is 0mol.

Solution mass

The solution mass is 1.000kg.

Ionic strength and water activity

The ionic strength is 0.0005644mol/kg(solvent water), and the water activity is 1.000.

pH, pe and Eh

The pH is 6.5, the pe is 14.07, and Eh = 0.832V.

Species distribution

Ignoring all mineral supersaturation, Bethke (2007) states that an equilibrium calculation of the molalities of the most abundant species results in Table 2.

Identical results are produced by the geochemistry module and the Geochemists Workbench software.

Table 2: Calculated molalities, activity coefficients and activities of the most abundant species in Amazon river water

SpeciesMolality (mol.kg)Activity coeffloga
HCO0.974-3.75
O(aq)1.000-3.74
Cl0.973-3.87
CO(aq)1.000-3.89
SiO(aq)1.000-3.93
Ca0.899-4.02
Na0.973-4.12
Mg0.901-4.39
SO0.898-4.56

Minerals

Both the geochemistry module and the GWB software predict identical saturation indices for minerals. They predict the saturation indices of the equilibrium solution in Table 2 are greater than 0 for the minerals: nontronite, hematite, kaolinite, beidellite, pyrophyllite, gibbsite, paragonite and quartz (see Figure 6.3 of Bethke (2007)).

Fixing mineral volumes

An alternate model assumes the water is in equilibrium with kaolinite and hematite, and that these control the aluminum and iron concentrations. That is, instead of Al, kaolinite is used in the basis, and instead of Fe, hematite is used in the basis. The free volumes of each of these is rather unimportant, but Bethke (2007) suggests using the values in Table 3.

Table 3: Alternate model of Amazon river water assumes equilibrium with kaoline and hematite with specified amount

MineralFree amount (cm)
Kaolinite1
Hematite1

MOOSE input file: with minerals

[TimeIndependentReactionSolver<<<{"href": "../../../syntax/TimeIndependentReactionSolver/index.html"}>>>]
  model_definition<<<{"description": "The name of the GeochemicalModelDefinition user object (you must create this UserObject yourself)"}>>> = definition
  swap_out_of_basis<<<{"description": "Species that should be removed from the model_definition's basis and be replaced with the swap_into_basis species"}>>> = "Al+++ Fe++"
  swap_into_basis<<<{"description": "Species that should be removed from the model_definition's equilibrium species list and added to the basis.  There must be the same number of species in swap_out_of_basis and swap_into_basis.  These swaps are performed before any other computations during the initial problem setup. If this list contains more than one species, the swapping is performed one-by-one, starting with the first pair (swap_out_of_basis[0] and swap_into_basis[0]), then the next pair, etc"}>>> = "Kaolinite Hematite"
  charge_balance_species<<<{"description": "Charge balance will be enforced on this basis species.  This means that its bulk mole number may be changed from the initial value you provide in order to ensure charge neutrality.  After the initial swaps have been performed, this must be in the basis, and it must be provided with a bulk_composition constraint_meaning."}>>> = "Cl-"
  constraint_species<<<{"description": "Names of the species that have their values fixed to constraint_value with meaning constraint_meaning.  All basis species (after swap_into_basis and swap_out_of_basis) must be provided with exactly one constraint.  These constraints are used to compute the configuration during the initial problem setup, and in time-dependent simulations they may be modified as time progresses."}>>> = "H2O              H+            O2(aq)             SiO2(aq)         Kaolinite    Hematite     Ca++             Mg++             Na+              HCO3-            SO4--            Cl-      "
  constraint_value<<<{"description": "Numerical value of the containts on constraint_species"}>>> = "  1.0              -6.5          1.813E-4            0.0001165       1E-2         0.033        0.0001073        4.526E-5         7.83E-5          0.0003114        3.1233E-5        1.383E-4"
  constraint_meaning<<<{"description": "Meanings of the numerical values given in constraint_value.  kg_solvent_water: can only be applied to H2O and units must be kg.  bulk_composition: can be applied to all non-gas species, and represents the total amount of the basis species contained as free species as well as the amount found in secondary species but not in kinetic species, and units must be moles or mass (kg, g, etc).  bulk_composition_with_kinetic: can be applied to all non-gas species, and represents the total amount of the basis species contained as free species as well as the amount found in secondary species and in kinetic species, and units must be moles or mass (kg, g, etc).  free_concentration: can be applied to all basis species that are not gas and not H2O and not mineral, and represents the total amount of the basis species existing freely (not as secondary species) within the solution, and units must be molal or mass_per_kg_solvent.  free_mineral: can be applied to all mineral basis species, and represents the total amount of the mineral existing freely (precipitated) within the solution, and units must be moles, mass or cm3.  activity and log10activity: can be applied to basis species that are not gas and not mineral and not sorbing sites, and represents the activity of the basis species (recall pH = -log10activity), and units must be dimensionless.  fugacity and log10fugacity: can be applied to gases, and units must be dimensionless"}>>> = "kg_solvent_water log10activity free_concentration bulk_composition free_mineral free_mineral bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
  constraint_unit<<<{"description": "Units of the numerical values given in constraint_value.  Dimensionless: should only be used for activity or fugacity constraints.  Moles: mole number.  Molal: moles per kg solvent water.  kg: kilograms.  g: grams.  mg: milligrams.  ug: micrograms.  kg_per_kg_solvent: kilograms per kg solvent water.  g_per_kg_solvent: grams per kg solvent water.  mg_per_kg_solvent: milligrams per kg solvent water.  ug_per_kg_solvent: micrograms per kg solvent water.  cm3: cubic centimeters"}>>> = "   kg               dimensionless molal              moles            moles        moles        moles            moles            moles            moles            moles            moles"
  prevent_precipitation<<<{"description": "Mineral species in this list will be prevented from precipitating, irrespective of their saturation index (unless they are initially in the basis)"}>>> = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
  ramp_max_ionic_strength_initial<<<{"description": "The number of iterations over which to progressively increase the maximum ionic strength (from zero to max_ionic_strength) during the initial equilibration.  Increasing this can help in convergence of the Newton process, at the cost of spending more time finding the aqueous configuration."}>>> = 0 # not needed in this simple problem
  stoichiometric_ionic_str_using_Cl_only<<<{"description": "If set to true, the stoichiometric ionic strength will be set equal to Cl- molality (or max_ionic_strength if the Cl- molality is too big).  This flag overrides ionic_str_using_basis_molality_only"}>>> = true # for comparison with GWB
  mol_cutoff<<<{"description": "Information regarding species with molalities less than this amount will not be outputted"}>>> = 1E-7
  abs_tol<<<{"description": "If the residual of the algebraic system (measured in mol) is lower than this value, the Newton process (that finds the aqueous configuration) is deemed to have converged"}>>> = 1E-15
[]

[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 H+ SiO2(aq) Al+++ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- 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"}>>> = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
    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 # for comparison with GWB
  []
[]
(moose/modules/geochemistry/test/tests/equilibrium_models/amazon_with_minerals.i)

GWB input file: with minerals

# React script that is the GWB equivalent to amazon_with_minerals.rea
data = thermo.tdat verify
conductivity = conductivity-USGS.dat
temperature = 25 C
H2O          = 1 free kg
HCO3-        = .0003114 mol
SiO2(aq)     = .0001165 mol
O2(aq)       = .0001813 free molal
Ca++         = .0001073 mol
SO4--        = 3.1233e-5 mol
Cl-          = .0001383 mol
balance on Cl-
Na+          = 7.83e-5 mol
Mg++         = 4.526e-5 mol
swap Kaolinite for Al+++
Kaolinite    = .01 free mol
swap Hematite for Fe++
Hematite     = .033 free mol
pH           = 6.5
suppress ALL
unsuppress  Hematite Kaolinite
printout  species = long
epsilon = 1e-15
(moose/modules/geochemistry/test/tests/equilibrium_models/amazon_with_minerals.rea)

Results: with minerals

According to this model, only nontronite clay is supersaturated by any significant amount. The geochemistry module produces identical results to the GWB software.

References

  1. Craig M. Bethke. Geochemical and Biogeochemical Reaction Modeling. Cambridge University Press, 2 edition, 2007. doi:10.1017/CBO9780511619670.[BibTeX]