Reaktoro  v2.0.0
A unified framework for modeling chemically reactive systems
Thermodynamics

This is the thermodynamics module in Reaktoro, in which various thermodynamic models and related concepts are implemented. More...

Classes

struct  ActivityModelDebyeHuckelParams
 The parameters in the Debye–Hückel activity model for aqueous solutions. More...
 
struct  ActivityModelDrummondParams
 The parameters in the Drummond (1981) activity model. More...
 

Functions

auto ActivityModelDebyeHuckel () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel model. More...
 
auto ActivityModelDebyeHuckel (ActivityModelDebyeHuckelParams params) -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel model with given custom parameters. More...
 
auto ActivityModelDebyeHuckelLimitingLaw () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel limiting law model. More...
 
auto ActivityModelDebyeHuckelKielland () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel model with Kielland (1937) parameters. More...
 
auto ActivityModelDebyeHuckelPHREEQC () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel model using PHREEQC parameters. More...
 
auto ActivityModelDebyeHuckelWATEQ4F () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the Debye–Hückel model using WATEQ4F parameters. More...
 
auto ActivityModelDrummond (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981). More...
 
auto ActivityModelDrummond (String gas, ActivityModelDrummondParams params) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981). More...
 
auto ActivityModelDuanSun (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Duan and Sun (2003). More...
 
auto ActivityModelHKF () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on the HKF model. More...
 
auto ActivityModelPitzerHMW () -> ActivityModelGenerator
 Return the activity model for aqueous phases based on Harvie-Møller-Weare Pitzer's formulation. More...
 
auto ActivityModelRumpf (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Rumpf (1994). More...
 
auto ActivityModelSetschenow (String neutral, real b) -> ActivityModelGenerator
 Return the Setschenow activity model for a neutral aqueous species. More...
 

Detailed Description

This is the thermodynamics module in Reaktoro, in which various thermodynamic models and related concepts are implemented.

Function Documentation

◆ ActivityModelDebyeHuckel() [1/2]

auto ActivityModelDebyeHuckel ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel model.

The activity model for aqueous phases based on the Debye–Hückel model.

See also
Debye–Hückel activity model
Note
This method is equivalent to ActivityModelDebyeHuckelPHREEQC().

◆ ActivityModelDebyeHuckel() [2/2]

auto Reaktoro::ActivityModelDebyeHuckel ( ActivityModelDebyeHuckelParams  params) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel model with given custom parameters.

See also
Debye–Hückel activity model

◆ ActivityModelDebyeHuckelLimitingLaw()

auto ActivityModelDebyeHuckelLimitingLaw ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel limiting law model.

The activity model for aqueous phases based on the Debye–Hückel limiting law model.

See also
Debye–Hückel activity model

Use this method to indicate that the activity coefficients of the ionic species are calculated using the Debye–Hückel limiting law equation. In this model, the Debye–Hückel parameters and b of the ionic species are zero.

◆ ActivityModelDebyeHuckelKielland()

auto ActivityModelDebyeHuckelKielland ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel model with Kielland (1937) parameters.

The activity model for aqueous phases based on the Debye–Hückel model with Kielland (1937) parameters.

See also
Debye–Hückel activity model

In this model, the ion-size parameters are taken from Kielland (1937)[4]:

Ion (Ångström)
H+ 9
Li+ 6
Rb+, Cs+, NH4+, Tl+, Ag+ 2.5
K+, Cl-, Br-, I-, CN-, NO2-, NO3- 3
OH-, F-, NCS-, NCO-, HS-, ClO3-, ClO4-, BrO3-, IO4-, MnO4- 3.5
Na+, CdCl+, ClO2-, IO3-, HCO3-, H2PO4-, HSO3-, H2AsO4-, Co(NH3)4(NO2)2+ 4-4.5
Hg2+2, SO4-2, S2O3-2, S2O6-2, S2O8-2, SeO4-2, CrO4-2, HPO4-2 4
Pb+2, CO3-2, SO3-2, MoO4-2, Co(NH3)5Cl+2, Fe(CN)5NO-2 4.5
Sr+2, Ba+2, Ra+2, Cd+2, Hg+2, S-2, S2O4-2, WO4-2 5
Ca+2, Cu+2, Zn+2, Sn+2, Mn+2, Fe+2, Ni+2, Co+2 6
Mg+2, Be+2 8
PO4-3, Fe(CN)6-3, Cr(NH3)6+3, Co(NH3)6+3, Co(NH3)5H2O+3 4
Al+3, Fe+3, Cr+3, Sc+3, Y+3, La+3, In+3, Ce+3, Pr+3, Nd+3, Sm+3 9
Fe(CN)6-4 5
Co(S2O3)(CN)5-4 6
Th+4, Zn+4, Ce+4, Sn+4 11
Co(SO3)2(CN)4-5 9

◆ ActivityModelDebyeHuckelPHREEQC()

auto ActivityModelDebyeHuckelPHREEQC ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel model using PHREEQC parameters.

The activity model for aqueous phases based on the Debye–Hückel model using PHREEQC parameters.

See also
Debye–Hückel activity model

This method sets the ion-size parameters and the parameter b of the ionic species according to those used in PHREEQC v3. Their values were taken from the database file phreeqc.dat and are listed below:

Ion (Å) b Ion (Å) b
Al(OH)2+ 5.4 0 Al(OH)4- 4.5 0
Al(SO4)2- 4.5 0 Al+++ 9 0
AlF++ 5.4 0 AlF2+ 5.4 0
AlF4- 4.5 0 AlOH++ 5.4 0
AlSO4+ 4.5 0 Ba++ 4 0.153
BaOH+ 5 0 Br- 3 0
CO3-- 5.4 0 Ca++ 5 0.165
CaH2PO4+ 5.4 0 CaHCO3+ 6 0
CaPO4- 5.4 0 Cl- 3.63 0.017
Cu+ 2.5 0 Cu++ 6 0
CuCl+ 4 0 CuCl2- 4 0
CuCl3- 4 0 CuCl3-- 5 0
CuCl4-- 5 0 CuOH+ 4 0
F- 3.5 0 Fe(OH)2+ 5.4 0
Fe(OH)3- 5 0 Fe(OH)4- 5.4 0
Fe++ 6 0 Fe+++ 9 0
FeCl++ 5 0 FeCl2+ 5 0
FeF++ 5 0 FeF2+ 5 0
FeH2PO4+ 5.4 0 FeH2PO4++ 5.4 0
FeHPO4+ 5 0 FeOH+ 5 0
FeOH++ 5 0 FeSO4+ 5 0
H+ 9 0 H2PO4- 5.4 0
H2SiO4-- 5.4 0 H3SiO4- 4 0
HCO3- 5.4 0 HPO4-- 5 0
HS- 3.5 0 K+ 3.5 0.015
KHPO4- 5.4 0 KSO4- 5.4 0
Li+ 6 0 LiSO4- 5 0
Mg++ 5.5 0.2 MgF+ 4.5 0
MgH2PO4+ 5.4 0 MgHCO3+ 4 0
MgOH+ 6.5 0 MgPO4- 5.4 0
Mn(OH)3- 5 0 Mn++ 6 0
Mn+++ 9 0 MnCl+ 5 0
MnCl3- 5 0 MnF+ 5 0
MnHCO3+ 5 0 MnOH+ 5 0
NH4+ 2.5 0 NO2- 3 0
NO3- 3 0 Na+ 4.08 0.082
NaHPO4- 5.4 0 NaSO4- 5.4 0
OH- 3.5 0 PO4--- 4 0
S-- 5 0 SO4-- 5 -0.04
SiF6-- 5 0 Sr++ 5.26 0.121
SrHCO3+ 5.4 0 SrOH+ 5 0
Zn++ 5 0 ZnCl+ 4 0
ZnCl3- 4 0 ZnCl4-- 5 0
Note
This method also sets the default value of b for neutral species to 0.1, which is the default value used in PHREEQC.

References:

  • Parkhurst, D. L., Appelo, C. A. J. (2013). Description of input and examples for PHREEQC version 3 — A computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations. In Groundwater Book 6, Modeling Techniques (p. 497). U.S. Geological Survey Techniques and Methods.

◆ ActivityModelDebyeHuckelWATEQ4F()

auto ActivityModelDebyeHuckelWATEQ4F ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the Debye–Hückel model using WATEQ4F parameters.

The activity model for aqueous phases based on the Debye–Hückel model using WATEQ4F parameters.

See also
Debye–Hückel activity model

This method sets both and b of ionic species according to the ones used in WATEQ4F (Ball and Nordstrom [2], Truesdell and Jones [6]), which are listed in the following table:

Ion (Å) b
Ca+2 5.00 0.165
Mg+2 5.50 0.200
Na+ 4.00 0.075
K+ 3.50 0.015
Cl- 3.50 0.015
SO4-2 5.00 -0.040
HCO3- 5.40 0.000
CO3-2 5.40 0.000
Sr+2 5.26 0.121
H+ 9.00 0.000
OH- 3.50 0.000
SrHCO3+ 5.40 0.000
SrOH+ 5.00 0.000
Cu(S4)2-3 23.00 0.000
CuS4S5-3 25.00 0.000
S2-2 6.50 0.000
S3-2 8.00 0.000
S4-2 10.00 0.000
S5-2 12.00 0.000
S6-2 14.00 0.000
Ag(S4)2-3 22.00 0.000
AgS4S5-3 24.00 0.000
Ag(HS)S4-2 15.00 0.000

These values for and b are empirical. They were determined by fitting the modified Debye–Hückel equation to experimental mean-salt activity coefficient data.

References:

  • Ball, J. W., Nordstrom, D. K. (1991). User’s Manual for WATEQ4F, with revised thermodynamic data base and test cases for calculating speciation of major, trace, and redox elements in natural waters. U.S. Geological Survey Water-Resources Investigations Report, 91–183, 1–188.
  • Truesdell, A. H., Jones, B. F. (1974). WATEQ–A computer program for calculating chemical equilibrium of natural waters. U.S. Geological Survey, Journal of Research, 2(2), 233–248.

◆ ActivityModelDrummond() [1/2]

auto Reaktoro::ActivityModelDrummond ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981).

Parameters
gasThe chemical formula of the dissolved gas in the aqueous phase.
See also
Drummond (1981) activity model

◆ ActivityModelDrummond() [2/2]

auto Reaktoro::ActivityModelDrummond ( String  gas,
ActivityModelDrummondParams  params 
) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981).

Parameters
gasThe chemical formula of the dissolved gas in the aqueous phase.
paramsThe custom parameters for the activity model.
See also
Drummond (1981) activity model

◆ ActivityModelDuanSun()

auto Reaktoro::ActivityModelDuanSun ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Duan and Sun (2003).

References:

  • Duan, Z., Sun, R. (2003). An improved model calculating CO2 solubility in pure water and aqueous NaCl mixtures from 273 to 533 K and from 0 to 2000 bar. Chemical Geology, 193(3-4), 257–271 Construct a ActivityModelDuanSun object with given dissolved gas formula.
    Parameters
    gasThe chemical formula of the dissolved gas.

◆ ActivityModelHKF()

auto Reaktoro::ActivityModelHKF ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on the HKF model.

References:

  • Helgeson, H. C., Kirkham, D. H., Flowers, G. C. (1981). Theoretical prediction of the thermodynamic behavior of aqueous electrolytes at high pressures and temperatures: IV. Calculation of activity coefficients, osmotic coefficients, and apparent molal and standard and relative partial molal properties to 600°C. American Journal of Science, 281(10), 1249–1516.

◆ ActivityModelPitzerHMW()

auto Reaktoro::ActivityModelPitzerHMW ( ) -> ActivityModelGenerator

Return the activity model for aqueous phases based on Harvie-Møller-Weare Pitzer's formulation.

References:

  • Harvie, C.E., Møller, N., Weare, J.H. (1984). The prediction of mineral solubilities in natural waters: The Na-K-Mg-Ca-H-Cl-SO4-OH-HCO3-CO3-CO2-H2O system to high ionic strengths at 25°C. Geochimica et Cosmochimica Acta, 48(4), 723–751.
  • Harvie, C.E., Weare, J.H. (1980). The prediction of mineral soluhilities in natural waters: the system from zero to high concentration at 25°C. Geochimica et Cosmochimica Acta, 44(7), 981–997.
  • Pitzer, K. S. (1975). Thermodynamics of electrolytes. V. effects of higher-order electrostatic terms. Journal of Solution Chemistry, 4(3), 249–265.
  • Helgeson, H. C., Kirkham, D. H., Flowers, G. C. (1981). Theoretical prediction of the thermodynamic behavior of aqueous electrolytes at high pressures and temperatures: IV. Calculation of activity coefficients, osmotic coefficients, and apparent molal and standard and relative partial molal properties to 600°C. American Journal of Science, 281(10), 1249–1516.

◆ ActivityModelRumpf()

auto Reaktoro::ActivityModelRumpf ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Rumpf (1994).

References:

  • Rumpf, B., Nicolaisen, H., Ocal, C., & Maurer, G. (1994). Solubility of carbon dioxide in aqueous mixtures of sodium chloride: Experimental results and correlation. Journal of Solution Chemistry, 23(3), 431–448*.
    Parameters
    gasThe chemical formula of the dissolved gas.

◆ ActivityModelSetschenow()

auto Reaktoro::ActivityModelSetschenow ( String  neutral,
real  b 
) -> ActivityModelGenerator

Return the Setschenow activity model for a neutral aqueous species.

Parameters
neutralThe formula of the neutral aqueous species (e.g., NaCl).
bThe Setschenow b coefficient.