The chemical properties of an aqueous phase. More...
#include <AqueousProps.hpp>
Public Member Functions | |
AqueousProps (ChemicalSystem const &system) | |
Construct an uninitialized AqueousProps object with given chemical system. | |
AqueousProps (ChemicalState const &state) | |
Construct an AqueousProps object with given chemical state of the system. | |
AqueousProps (ChemicalProps const &props) | |
Construct an AqueousProps object with given chemical properties of the system. | |
AqueousProps (AqueousProps const &other) | |
Construct a copy of a AqueousProps object. | |
virtual | ~AqueousProps () |
Destroy this AqueousProps object. | |
auto | operator= (AqueousProps other) -> AqueousProps & |
Assign a AqueousProps object to this object. | |
auto | setActivityModel (StringOrIndex const &species, ActivityModelGenerator const &generator) -> void |
Set an activity model for a non-aqueous species that will be used in the calculation of its saturation index. More... | |
auto | update (ChemicalState const &state) -> void |
Update the aqueous properties with given chemical state of the system. | |
auto | update (ChemicalProps const &props) -> void |
Update the aqueous properties with given chemical properties of the system. | |
auto | temperature () const -> real |
Return the temperature of the aqueous phase (in K). | |
auto | pressure () const -> real |
Return the pressure of the aqueous phase (in Pa). | |
auto | waterAmount () const -> real |
Return the amount of solvent water in the aqueous phase (in mol). | |
auto | waterMass () const -> real |
Return the mass of solvent water in the aqueous phase (in kg). | |
auto | charge () const -> real |
Return the electric charge in the aqueous phase (in mol). | |
auto | chargeMolality () const -> real |
Return the molality concentration in the aqueous phase (in molal). | |
auto | elementMolality (StringOrIndex const &symbol) const -> real |
Return the molality of an element (in molal). | |
auto | elementMolalities () const -> ArrayXr |
Return the molality concentrations of the elements (in molal). | |
auto | speciesMolality (StringOrIndex const &name) const -> real |
Return the molality of an aqueous solute species (in molal). | |
auto | speciesMolalities () const -> ArrayXr |
Return the molality concentrations of the species (in molal). | |
auto | ionicStrength () const -> real |
Return the effective ionic strength of the aqueous phase (in molal). Equivalent to ionicStrengthEffective. | |
auto | ionicStrengthEffective () const -> real |
Return the effective ionic strength of the aqueous phase (in molal). | |
auto | ionicStrengthStoichiometric () const -> real |
Return the stoichiometric ionic strength of the aqueous phase (in molal). | |
auto | pH () const -> real |
Return the pH of the aqueous phase. | |
auto | pE () const -> real |
Return the pE of the aqueous phase. | |
auto | Eh () const -> real |
Return the reduction potential of the aqueous phase (in V). | |
auto | alkalinity () const -> real |
Return the explicitly conservative form of total alkalinity of the aqueous phase (in eq/L). More... | |
auto | saturationSpecies () const -> SpeciesList |
Return the non-aqueous species that could be formed from the aqueous solution. More... | |
auto | saturationIndex (StringOrIndex const &species) const -> real |
Return the saturation index ( \(\mathrm{SI} \equiv \log \Omega = \log \mathrm{IAP}/K\)) of a non-aqueous species. More... | |
auto | saturationIndices () const -> ArrayXr |
Return the saturation indices of all non-aqueous species. More... | |
auto | saturationRatio (StringOrIndex const &species) const -> real |
Return the saturation ratio ( \(\mathrm{SR} \equiv \Omega = \mathrm{IAP}/K\)) of a non-aqueous species. More... | |
auto | saturationRatios () const -> ArrayXr |
Return the saturation ratios of all non-aqueous species. More... | |
auto | saturationRatiosLn () const -> ArrayXr |
Return the saturation ratios of all non-aqueous species (in natural log). More... | |
auto | props () const -> ChemicalProps const & |
Return the underlying ChemicalProps object. | |
auto | system () const -> ChemicalSystem const & |
Return the underlying ChemicalSystem object. | |
auto | phase () const -> Phase const & |
Return the underlying Phase object corresponding to the aqueous phase. | |
auto | output (std::ostream &out) const -> void |
Output the properties of the aqueous phase to a stream. | |
auto | output (String const &filename) const -> void |
Output the properties of the aqueous phase to a file. | |
auto | saturationIndexLn (StringOrIndex const &species) const -> real |
Return the saturation index of a given species (in natural log). More... | |
auto | saturationIndexLg (StringOrIndex const &species) const -> real |
Return the saturation index of a given species (in log base 10). More... | |
auto | saturationIndicesLn () const -> ArrayXr |
Return the saturation indices of all non-aqueous species (in natural log). More... | |
auto | saturationIndicesLg () const -> ArrayXr |
Return the saturation indices of all non-aqueous species (in log base 10). More... | |
Static Public Member Functions | |
static auto | compute (ChemicalProps const &props) -> AqueousProps const & |
Compute an AqueousProps object with given ChemicalProps object. More... | |
Detailed Description
The chemical properties of an aqueous phase.
Member Function Documentation
◆ compute()
|
static |
Compute an AqueousProps object with given ChemicalProps object.
Use this method if your model (e.g., reaction rate model) depends on an AqueousProps object and you are repeatedly constructing an AqueousProps object and updating it with the same ChemicalProps object, with same internal state. For example, when calculating mineral saturation indices on mineral reaction rates, each individual rate model requires building an AqueousProps object and updating it with the system's current ChemicalProps. By using this method, you take advantage of memoization optimization. If you supply a ChemicalProps object twice to this method with unchanged internal state, on the second call you will get a cached AqueousProps object.
◆ setActivityModel()
auto setActivityModel | ( | StringOrIndex const & | species, |
ActivityModelGenerator const & | generator | ||
) | -> void |
Set an activity model for a non-aqueous species that will be used in the calculation of its saturation index.
- Parameters
-
species The name or index of the non-aqueous species in the list of species returned by saturationSpecies. generator The activity model generator to be assigned for the non-aqueous species.
◆ alkalinity()
auto alkalinity | ( | ) | const -> real |
Return the explicitly conservative form of total alkalinity of the aqueous phase (in eq/L).
The total alkalinity (Alk) of the aqueous phase is by default calculated as the acid neutralizing capacity (ANC) of the solution using the formula:
\[ \mathrm{Alk=[Na^{+}]+[K^{+}]+2[Ca^{2+}]+2[Mg^{2+}]-[Cl^{-}]-[Br^{-}]-[NO_{3}^{-}]-2[SO_{4}^{2-}] -[TPO_{4}]+[TNH_{3}]-2[TSO_{4}]-[THF]-[THNO_{2}]}, \]
where \([\mathrm{species}]\) is the free molar concentration (mol/L) of the species in the solution. This formula is simpler, derived from the charge balance condition, and equivalent to the standard formula of total alkalinity. The above formula considers the contributions of biogeochemical processes (if any). See https://doi.org/10.1016/j.marchem.2007.01.006 (Wolf-Gladrow et al. (2007)) for further details.
◆ saturationSpecies()
auto saturationSpecies | ( | ) | const -> SpeciesList |
Return the non-aqueous species that could be formed from the aqueous solution.
This method returns, for example, gaseous and mineral species that could form when the aqueous solution is saturated with respect to them.
◆ saturationIndex()
auto saturationIndex | ( | StringOrIndex const & | species | ) | const -> real |
Return the saturation index ( \(\mathrm{SI} \equiv \log \Omega = \log \mathrm{IAP}/K\)) of a non-aqueous species.
- Parameters
-
species The name or index of the non-aqueous species in the list of species returned by saturationSpecies.
◆ saturationIndices()
auto saturationIndices | ( | ) | const -> ArrayXr |
Return the saturation indices of all non-aqueous species.
These non-aqueous species can be obtained with saturationSpecies.
◆ saturationRatio()
auto saturationRatio | ( | StringOrIndex const & | species | ) | const -> real |
Return the saturation ratio ( \(\mathrm{SR} \equiv \Omega = \mathrm{IAP}/K\)) of a non-aqueous species.
- Parameters
-
species The name or index of the non-aqueous species in the list of species returned by saturationSpecies.
◆ saturationRatios()
auto saturationRatios | ( | ) | const -> ArrayXr |
Return the saturation ratios of all non-aqueous species.
These non-aqueous species can be obtained with saturationSpecies.
◆ saturationRatiosLn()
auto saturationRatiosLn | ( | ) | const -> ArrayXr |
Return the saturation ratios of all non-aqueous species (in natural log).
These non-aqueous species can be obtained with saturationSpecies.
◆ saturationIndexLn()
auto saturationIndexLn | ( | StringOrIndex const & | species | ) | const -> real |
Return the saturation index of a given species (in natural log).
- Parameters
-
species The name or index of the non-aqueous species in the list of species returned by saturationSpecies.
◆ saturationIndexLg()
auto saturationIndexLg | ( | StringOrIndex const & | species | ) | const -> real |
Return the saturation index of a given species (in log base 10).
- Parameters
-
species The name or index of the non-aqueous species in the list of species returned by saturationSpecies.
◆ saturationIndicesLn()
auto saturationIndicesLn | ( | ) | const -> ArrayXr |
Return the saturation indices of all non-aqueous species (in natural log).
These non-aqueous species can be obtained with saturationSpecies.
◆ saturationIndicesLg()
auto saturationIndicesLg | ( | ) | const -> ArrayXr |
Return the saturation indices of all non-aqueous species (in log base 10).
These non-aqueous species can be obtained with saturationSpecies.
The documentation for this class was generated from the following file:
- Reaktoro/Utils/AqueousProps.hpp