14 #ifndef CT_DEBYEHUCKEL_H 15 #define CT_DEBYEHUCKEL_H 29 #define DHFORM_DILUTE_LIMIT 0 30 #define DHFORM_BDOT_AK 1 31 #define DHFORM_BDOT_ACOMMON 2 32 #define DHFORM_BETAIJ 3 33 #define DHFORM_PITZER_BETAIJ 4 39 #define A_DEBYE_CONST 0 40 #define A_DEBYE_WATER 1 579 DebyeHuckel(
const std::string& inputFile,
const std::string&
id =
"");
592 virtual std::string
type()
const {
593 return "DebyeHuckel";
620 virtual doublereal
cp_mole()
const;
625 * In this equation of state implementation, the density is a function only
626 * of the mole fractions. Therefore, it can't be an independent variable.
627 * Instead, the pressure is used as the independent variable. Functions
628 * which try to set the thermodynamic state by calling setDensity() may
629 * cause an exception to be thrown.
656 virtual void setDensity(
const doublereal rho);
820 virtual bool addSpecies(shared_ptr<Species> spec);
double m_IionicMolalityStoich
Stoichiometric ionic strength on the molality scale.
int m_form_A_Debye
Form of the constant outside the Debye-Huckel term called A.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
static double _nonpolarActCoeff(double IionicMolality)
Static function that implements the non-polar species salt-out modifications.
doublereal temperature() const
Temperature (K).
vector_fp m_dlnActCoeffMolaldT
Derivative of log act coeff wrt T.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
std::unique_ptr< WaterProps > m_waterProps
Pointer to the water property calculator.
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
Class XML_Node is a tree-based representation of the contents of an XML file.
bool m_useHelgesonFixedForm
If true, then the fixed for of Helgeson's activity for water is used instead of the rigorous form obt...
virtual double dA_DebyedP_TP(double temperature=-1.0, double pressure=-1.0) const
Value of the derivative of the Debye Huckel constant with respect to pressure, as a function of tempe...
void s_update_lnMolalityActCoeff() const
Calculate the log activity coefficients.
int formDH() const
Returns the form of the Debye-Huckel parameterization used.
double _osmoticCoeffHelgesonFixedForm() const
Formula for the osmotic coefficient that occurs in the GWB.
virtual void setDensity(const doublereal rho)
Set the internally stored density (gm/m^3) of the phase.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Header for intermediate ThermoPhase object for phases which employ molality based activity coefficien...
DebyeHuckel()
Default Constructor.
Class DebyeHuckel represents a dilute liquid electrolyte phase which obeys the Debye Huckel formulati...
Base class for a phase with thermodynamic properties.
Header file for class Cantera::Array2D.
virtual std::string type() const
String indicating the thermodynamic model implemented.
std::vector< int > vector_int
Vector of ints.
virtual int eosType() const
Equation of state type flag.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
virtual double dA_DebyedT_TP(double temperature=-1.0, double pressure=-1.0) const
Value of the derivative of the Debye Huckel constant with respect to temperature. ...
Array2D m_Beta_ij
Array of 2D data used in the DHFORM_BETAIJ formulation Beta_ij.value(i,j) is the coefficient of the j...
vector_fp m_Aionic
a_k = Size of the ionic species in the DH formulation. units = meters
Class for the liquid water pressure dependent standard state.
double m_maxIionicStrength
Maximum value of the ionic strength allowed in the calculation of the activity coefficients.
int m_formDH
form of the Debye-Huckel parameterization used in the model.
double m_A_Debye
Current value of the Debye Constant, A_Debye.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
double AionicRadius(int k=0) const
Reports the ionic radius of the kth species.
vector_fp m_lnActCoeffMolal
Logarithm of the activity coefficients on the molality scale.
void s_update_dlnMolalityActCoeff_dP() const
Calculate the pressure derivative of the activity coefficient.
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
PDSS_Water * m_waterSS
Pointer to the Water standard state object.
vector_fp m_B_Dot
Array of B_Dot values.
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
Array2D & get_Beta_ij()
Returns a reference to M_Beta_ij.
void s_update_d2lnMolalityActCoeff_dT2() const
Calculate the temperature 2nd derivative of the activity coefficient.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
int m_formGC
Format for the generalized concentration:
virtual double A_Debye_TP(double temperature=-1.0, double pressure=-1.0) const
Return the Debye Huckel constant as a function of temperature and pressure (Units = sqrt(kg/gmol)) ...
void s_update_dlnMolalityActCoeff_dT() const
Calculation of temperature derivative of activity coefficient.
virtual void getActivities(doublereal *ac) const
Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration.
virtual doublereal pressure() const
Returns the current pressure of the phase.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
vector_int m_electrolyteSpeciesType
Vector containing the electrolyte species type.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
vector_fp m_speciesCharge_Stoich
Stoichiometric species charge -> This is for calculations of the ionic strength which ignore ion-ion ...
double m_IionicMolality
Current value of the ionic strength on the molality scale.
virtual void getMolalityActivityCoefficients(doublereal *acMolality) const
Get the array of non-dimensional molality-based activity coefficients at the current solution tempera...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
vector_fp m_d2lnActCoeffMolaldT2
2nd Derivative of log act coeff wrt T
vector_fp m_tmpV
vector of size m_kk, used as a temporary holding area.
double m_B_Debye
Current value of the constant that appears in the denominator.
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
virtual double d2A_DebyedT2_TP(double temperature=-1.0, double pressure=-1.0) const
Value of the 2nd derivative of the Debye Huckel constant with respect to temperature as a function of...
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplication routine for objects which inherit from ThermoPhase.
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
vector_fp m_dlnActCoeffMolaldP
Derivative of log act coeff wrt P.
Namespace for the Cantera kernel.
double _lnactivityWaterHelgesonFixedForm() const
Formula for the log of the water activity that occurs in the GWB.
virtual bool addSpecies(shared_ptr< Species > spec)
double m_densWaterSS
Storage for the density of water's standard state.
virtual void setMolarDensity(const doublereal conc)
Set the internally stored molar density (kmol/m^3) of the phase.