Computes activity coefficients for non-minerals and non-gases (since these species do not have activity coefficients). More...
#include <GeochemistryActivityCoefficientsDebyeHuckel.h>
Public Member Functions | |
GeochemistryActivityCoefficientsDebyeHuckel (const GeochemistryIonicStrength &is_calculator, const GeochemicalDatabaseReader &db) | |
void | setInternalParameters (Real temperature, const ModelGeochemicalDatabase &mgd, const std::vector< Real > &basis_species_molality, const std::vector< Real > &eqm_species_molality, const std::vector< Real > &kin_species_molality) override |
Sets internal parameters, such as the ionic strength and Debye-Huckel parameters, prior to computing activity coefficients and activity of water. More... | |
Real | waterActivity () const override |
Computes and returns the activity of water. More... | |
void | buildActivityCoefficients (const ModelGeochemicalDatabase &mgd, std::vector< Real > &basis_activity_coef, std::vector< Real > &eqm_activity_coef) const override |
Compute the activity coefficients and store them in basis_activity_coef and eqm_activity_coef Note: More... | |
const DebyeHuckelParameters & | getDebyeHuckel () const |
Real | getIonicStrength () const |
Return the current value of ionic strength. More... | |
Real | getStoichiometricIonicStrength () const |
Return the current value of stoichiometric ionic strength. More... | |
bool | operator== (const GeochemistryActivityCoefficients &) const |
Private Attributes | |
const unsigned | _numT |
number of temperature points in the database file More... | |
const GeochemistryDebyeHuckel | _database_dh_params |
Debye-Huckel parameters found in the database. More... | |
const GeochemistryNeutralSpeciesActivity | _database_dh_water |
Debye-Huckel parameters found in the database for computing the water activities. More... | |
const GeochemistryNeutralSpeciesActivity | _database_dh_neutral |
Debye-Huckel parameters found in the database for computing the neutral (CO2) activities. More... | |
const GeochemistryIonicStrength & | _is_calculator |
ionic-strength calculator More... | |
Real | _ionic_strength |
current value of ionic strength More... | |
Real | _sqrt_ionic_strength |
current value of sqrt(ionic strength) More... | |
Real | _stoichiometric_ionic_strength |
current value of stoichiometric ionic strength More... | |
unsigned | _num_basis |
number of basis species More... | |
unsigned | _num_eqm |
number of equilibrium species More... | |
DebyeHuckelParameters | _dh |
Debye-Huckel parameters. More... | |
EquilibriumConstantInterpolator | _interp_A |
Interpolator object for the Debye-Huckel parameter A. More... | |
EquilibriumConstantInterpolator | _interp_B |
Interpolator object for the Debye-Huckel parameter B. More... | |
EquilibriumConstantInterpolator | _interp_Bdot |
Interpolator object for the Debye-Huckel parameter Bdot. More... | |
EquilibriumConstantInterpolator | _interp_a_water |
Interpolator object for the Debye-Huckel parameter a_water. More... | |
EquilibriumConstantInterpolator | _interp_b_water |
Interpolator object for the Debye-Huckel parameter b_water. More... | |
EquilibriumConstantInterpolator | _interp_c_water |
Interpolator object for the Debye-Huckel parameter c_water. More... | |
EquilibriumConstantInterpolator | _interp_d_water |
Interpolator object for the Debye-Huckel parameter d_water. More... | |
EquilibriumConstantInterpolator | _interp_a_neutral |
Interpolator object for the Debye-Huckel parameter a_neutral. More... | |
EquilibriumConstantInterpolator | _interp_b_neutral |
Interpolator object for the Debye-Huckel parameter b_neutral. More... | |
EquilibriumConstantInterpolator | _interp_c_neutral |
Interpolator object for the Debye-Huckel parameter c_neutral. More... | |
EquilibriumConstantInterpolator | _interp_d_neutral |
Interpolator object for the Debye-Huckel parameter d_neutral. More... | |
Computes activity coefficients for non-minerals and non-gases (since these species do not have activity coefficients).
Also computes the activity of water. Uses a Debye-Huckel model
Definition at line 58 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
GeochemistryActivityCoefficientsDebyeHuckel::GeochemistryActivityCoefficientsDebyeHuckel | ( | const GeochemistryIonicStrength & | is_calculator, |
const GeochemicalDatabaseReader & | db | ||
) |
method | Method used by this class to compute activity coefficients and activity of water |
is_calculator | Calculates ionic strengths |
db | Original geochemistry database: used to find the temperature interpolation type, Debye-Huckel params, etc |
Definition at line 13 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
|
overridevirtual |
Compute the activity coefficients and store them in basis_activity_coef and eqm_activity_coef Note:
Implements GeochemistryActivityCoefficients.
Definition at line 134 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
const DebyeHuckelParameters & GeochemistryActivityCoefficientsDebyeHuckel::getDebyeHuckel | ( | ) | const |
Definition at line 121 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
Real GeochemistryActivityCoefficientsDebyeHuckel::getIonicStrength | ( | ) | const |
Return the current value of ionic strength.
Definition at line 218 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
Real GeochemistryActivityCoefficientsDebyeHuckel::getStoichiometricIonicStrength | ( | ) | const |
Return the current value of stoichiometric ionic strength.
Definition at line 224 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
|
inlineinherited |
Definition at line 23 of file GeochemistryActivityCoefficients.h.
|
overridevirtual |
Sets internal parameters, such as the ionic strength and Debye-Huckel parameters, prior to computing activity coefficients and activity of water.
If using a Debye-Huckel activity model, you must ensure the ionic strength calculator (eg, maxIonicStrength) is set appropriately before calling this function.
temperature | the temperature in degC |
mgd | the Model Geochemical database |
basis_species_molality | Molalities of the basis species in mgd |
eqm_species_molality | Molalities of the equilibrium species in mgd |
kin_species_molality | Molalities of the kinetic species |
Implements GeochemistryActivityCoefficients.
Definition at line 90 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
|
overridevirtual |
Computes and returns the activity of water.
Note that you will probably want to call setInternalParameters prior to calling this method
Implements GeochemistryActivityCoefficients.
Definition at line 127 of file GeochemistryActivityCoefficientsDebyeHuckel.C.
Referenced by TEST().
|
private |
Debye-Huckel parameters found in the database for computing the neutral (CO2) activities.
Definition at line 104 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
|
private |
Debye-Huckel parameters found in the database.
Definition at line 98 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
|
private |
Debye-Huckel parameters found in the database for computing the water activities.
Definition at line 101 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
|
private |
Debye-Huckel parameters.
Definition at line 125 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by buildActivityCoefficients(), getDebyeHuckel(), setInternalParameters(), and waterActivity().
|
private |
Interpolator object for the Debye-Huckel parameter A.
Definition at line 128 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter a_neutral.
Definition at line 149 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter a_water.
Definition at line 137 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter B.
Definition at line 131 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter b_neutral.
Definition at line 152 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter b_water.
Definition at line 140 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter Bdot.
Definition at line 134 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter c_neutral.
Definition at line 155 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter c_water.
Definition at line 143 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter d_neutral.
Definition at line 158 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
Interpolator object for the Debye-Huckel parameter d_water.
Definition at line 146 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by GeochemistryActivityCoefficientsDebyeHuckel(), and setInternalParameters().
|
private |
current value of ionic strength
Definition at line 110 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by buildActivityCoefficients(), getIonicStrength(), and setInternalParameters().
|
private |
ionic-strength calculator
Definition at line 107 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by setInternalParameters().
|
private |
number of basis species
Definition at line 119 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by buildActivityCoefficients(), and setInternalParameters().
|
private |
number of equilibrium species
Definition at line 122 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by buildActivityCoefficients(), and setInternalParameters().
|
private |
number of temperature points in the database file
Definition at line 95 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
|
private |
current value of sqrt(ionic strength)
Definition at line 113 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by buildActivityCoefficients(), and setInternalParameters().
|
private |
current value of stoichiometric ionic strength
Definition at line 116 of file GeochemistryActivityCoefficientsDebyeHuckel.h.
Referenced by getStoichiometricIonicStrength(), setInternalParameters(), and waterActivity().