16 #ifndef CT_DEBYEHUCKEL_H
17 #define CT_DEBYEHUCKEL_H
31 #define DHFORM_DILUTE_LIMIT 0
32 #define DHFORM_BDOT_AK 1
33 #define DHFORM_BDOT_ACOMMON 2
34 #define DHFORM_BETAIJ 3
35 #define DHFORM_PITZER_BETAIJ 4
41 #define A_DEBYE_CONST 0
42 #define A_DEBYE_WATER 1
616 DebyeHuckel(
const std::string& inputFile,
const std::string&
id =
"");
677 virtual doublereal
cp_mole()
const;
683 virtual doublereal
cv_mole()
const;
689 * In this equation of state implementation, the density is a
690 * function only of the mole fractions. Therefore, it can't be
691 * an independent variable. Instead, the pressure is used as the
692 * independent variable. Functions which try to set the thermodynamic
693 * state by calling setDensity() may cause an exception to be
702 virtual doublereal
pressure()
const;
792 virtual void setState_TP(doublereal t, doublereal p);
875 int sizeUA = 6)
const;
1118 double pressure = -1.0)
const;
1135 double pressure = -1.0)
const;
1152 double pressure = -1.0)
const;
1169 double pressure = -1.0)
const;
double m_IionicMolalityStoich
Stoichiometric ionic strength on the molality scale.
void s_update_d2lnMolalityActCoeff_dT2() const
Calculate the temperature 2nd derivative of the activity coefficient.
double _lnactivityWaterHelgesonFixedForm() const
Formula for the log of the water activity that occurs in the GWB.
int m_form_A_Debye
Form of the constant outside the Debye-Huckel term called A.
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)) ...
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
vector_fp m_dlnActCoeffMolaldT
Derivative of log act coeff wrt T.
An error indicating that an unimplemented function has been called.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
ThermoPhase * duplMyselfAsThermoPhase() const
Duplicator from the ThermoPhase parent class.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
Class XML_Node is a tree-based representation of the contents of an XML file.
virtual void initThermo()
Initialize the object's internal lengths after species are set.
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...
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...
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
int formDH() const
Returns the form of the Debye-Huckel parameterization used.
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
void setDensity(const doublereal rho)
Set the internally stored density (gm/m^3) of the phase.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual void setState_TP(doublereal t, doublereal p)
Set the temperature (K) and pressure (Pa)
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.
virtual int eosType() const
Equation of state type flag.
Class DebyeHuckel represents a dilute liquid electrolyte phase which obeys the Debye Huckel formulati...
Base class for a phase with thermodynamic properties.
virtual void setTemperature(const doublereal temp)
Set the temperature (K)
Header file for class Cantera::Array2D.
std::vector< int > vector_int
Vector of ints.
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. ...
virtual void setToEquilState(const doublereal *lambda_RT)
This method is used by the ChemEquil equilibrium solver.
The WaterProps class is used to house several approximation routines for properties of water...
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...
void s_update_lnMolalityActCoeff() const
Calculate the log activity coefficients.
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 _nonpolarActCoeff(double IionicMolality) const
Static function that implements the non-polar species salt-out modifications.
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.
vector_fp m_lnActCoeffMolal
Logarithm of the activity coefficients on the molality scale.
PDSS_Water * m_waterSS
Pointer to the Water standard state object.
vector_fp m_B_Dot
Array of B_Dot values.
Array2D & get_Beta_ij()
Returns a reference to M_Beta_ij.
int m_formGC
Format for the generalized concentration:
double _osmoticCoeffHelgesonFixedForm() const
Formula for the osmotic coefficient that occurs in the GWB.
virtual doublereal enthalpy_mole() const
Molar enthalpy of the solution. Units: J/kmol.
void initLengths()
Initialize the internal lengths.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
DebyeHuckel & operator=(const DebyeHuckel &)
Assignment operator.
vector_int m_electrolyteSpeciesType
Vector containing the electrolyte species type.
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
void s_update_dlnMolalityActCoeff_dT() const
Calculation of temperature derivative of activity coefficient.
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.
doublereal temperature() const
Temperature (K).
double AionicRadius(int k=0) const
Reports the ionic radius of the kth species.
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_npActCoeff
These are coefficients to describe the increase in activity coeff for non-polar molecules due to the ...
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.
vector_fp m_pp
Temporary array used in equilibrium calculations.
double m_B_Debye
Current value of the constant that appears in the denominator.
void s_update_dlnMolalityActCoeff_dP() const
Calculate the pressure derivative of the activity coefficient.
WaterProps * m_waterProps
Pointer to the water property calculator.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Process the XML file after species are set up.
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
virtual void getActivities(doublereal *ac) const
Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration.
vector_fp m_dlnActCoeffMolaldP
Derivative of log act coeff wrt P.
virtual void getMolalityActivityCoefficients(doublereal *acMolality) const
Get the array of non-dimensional molality-based activity coefficients at the current solution tempera...
virtual void getUnitsStandardConc(double *uA, int k=0, int sizeUA=6) const
Returns the units of the standard and generalized concentrations.
virtual ~DebyeHuckel()
Destructor.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
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.