28double A_Debye_default = 1.172576;
29double B_Debye_default = 3.28640E9;
30double maxIionicStrength_default = 30.0;
34 : m_maxIionicStrength(maxIionicStrength_default)
35 , m_A_Debye(A_Debye_default)
36 , m_B_Debye(B_Debye_default)
41DebyeHuckel::~DebyeHuckel()
64 for (
size_t k = 0; k <
m_kk; k++) {
72 return 1.0 / mvSolvent;
82 for (
size_t k = 1; k <
m_kk; k++) {
95 for (
size_t k = 0; k <
m_kk; k++) {
96 acMolality[k] = exp(acMolality[k]);
114 for (
size_t k = 1; k <
m_kk; k++) {
128 for (
size_t k = 0; k <
m_kk; k++) {
141 for (
size_t k = 0; k <
m_kk; k++) {
154 for (
size_t k = 0; k <
m_kk; k++) {
165 for (
size_t k = 1; k <
m_kk; k++) {
179 for (
size_t k = 0; k <
m_kk; k++) {
192 for (
size_t k = 0; k <
m_kk; k++) {
200 for (
size_t k = 0; k <
m_kk; k++) {
214 for (
size_t k = 0; k <
m_kk; k++) {
232 }
else if (estString ==
"charged-species"
234 return cEST_chargedSpecies;
235 }
else if (estString ==
"weak-acid-associated"
237 return cEST_weakAcidAssociated;
238 }
else if (estString ==
"strong-acid-associated"
240 return cEST_strongAcidAssociated;
241 }
else if (estString ==
"polar-neutral"
243 return cEST_polarNeutral;
244 }
else if (estString ==
"nonpolar-neutral"
246 return cEST_nonpolarNeutral;
249 "Invalid electrolyte species type '{}'", estString);
255 || model ==
"dilute-limit"
258 }
else if (model ==
"B-dot-with-variable-a"
261 }
else if (model ==
"B-dot-with-common-a"
267 }
else if (model ==
"Pitzer-with-beta_ij"
273 "Unknown model '{}'", model);
287void DebyeHuckel::setB_dot(
double bdot)
292 "B_dot entry in the wrong DH form");
295 for (
size_t k = 0; k <
nSpecies(); k++) {
296 if (fabs(
charge(k)) > 0.0001) {
307 for (
size_t k = 0; k <
m_kk; k++) {
328 if (node.hasKey(
"A_Debye")) {
329 if (node[
"A_Debye"] ==
"variable") {
332 setA_Debye(node.convert(
"A_Debye",
"kg^0.5/gmol^0.5"));
335 if (node.hasKey(
"B_Debye")) {
336 setB_Debye(node.convert(
"B_Debye",
"kg^0.5/gmol^0.5/m"));
338 if (node.hasKey(
"max-ionic-strength")) {
339 setMaxIonicStrength(node[
"max-ionic-strength"].asDouble());
341 if (node.hasKey(
"use-Helgeson-fixed-form")) {
342 useHelgesonFixedForm(node[
"use-Helgeson-fixed-form"].asBool());
344 if (node.hasKey(
"default-ionic-radius")) {
347 if (node.hasKey(
"B-dot")) {
348 setB_dot(node[
"B-dot"].asDouble());
350 if (node.hasKey(
"beta")) {
351 for (
auto& item : node[
"beta"].asVector<
AnyMap>()) {
352 auto&
species = item[
"species"].asVector<
string>(2);
366 }
else if (
dynamic_cast<PDSS_ConstVol*
>(providePDSS(0)) == 0) {
367 throw CanteraError(
"DebyeHuckel::initThermo",
"Solvent standard state"
368 " model must be WaterIAPWS or constant_incompressible.");
372 for (
size_t k = 1; k <
nSpecies(); k++) {
374 throw CanteraError(
"DebyeHuckel::initThermo",
"Solute standard"
375 " state model must be constant_incompressible.");
386 case DHFORM_DILUTE_LIMIT:
387 activityNode[
"model"] =
"dilute-limit";
390 activityNode[
"model"] =
"B-dot-with-variable-a";
392 case DHFORM_BDOT_ACOMMON:
393 activityNode[
"model"] =
"B-dot-with-common-a";
396 activityNode[
"model"] =
"beta_ij";
398 case DHFORM_PITZER_BETAIJ:
399 activityNode[
"model"] =
"Pitzer-with-beta_ij";
404 activityNode[
"A_Debye"] =
"variable";
405 }
else if (
m_A_Debye != A_Debye_default) {
406 activityNode[
"A_Debye"].setQuantity(
m_A_Debye,
"kg^0.5/gmol^0.5");
410 activityNode[
"B_Debye"].setQuantity(
m_B_Debye,
"kg^0.5/gmol^0.5/m");
416 activityNode[
"use-Helgeson-fixed-form"] =
true;
423 activityNode[
"B-dot"] = B_dot;
429 for (
size_t i = 0; i <
m_kk; i++) {
430 for (
size_t j = i; j <
m_kk; j++) {
433 entry[
"species"] = vector<string>{
436 beta.push_back(std::move(entry));
440 activityNode[
"beta"] = std::move(beta);
442 phaseNode[
"activity-data"] = std::move(activityNode);
451 dhNode[
"ionic-radius"].setQuantity(
m_Aionic[k],
"m");
454 int estDefault = cEST_nonpolarNeutral;
461 estDefault = cEST_weakAcidAssociated;
462 }
else if (fabs(
charge(k)) > 0.0001) {
463 estDefault = cEST_chargedSpecies;
472 case cEST_chargedSpecies:
473 estType =
"charged-species";
475 case cEST_weakAcidAssociated:
476 estType =
"weak-acid-associated";
478 case cEST_strongAcidAssociated:
479 estType =
"strong-acid-associated";
481 case cEST_polarNeutral:
482 estType =
"polar-neutral";
484 case cEST_nonpolarNeutral:
485 estType =
"nonpolar-neutral";
489 "Unknown electrolyte species type ({}) for species '{}'",
492 dhNode[
"electrolyte-species-type"] = estType;
496 speciesNode[
"Debye-Huckel"] = std::move(dhNode);
505 if (tempArg != -1.0) {
509 if (presArg != -1.0) {
522 throw CanteraError(
"DebyeHuckel::A_Debye_TP",
"shouldn't be here");
530 if (tempArg != -1.0) {
534 if (presArg != -1.0) {
546 throw CanteraError(
"DebyeHuckel::dA_DebyedT_TP",
"shouldn't be here");
554 if (tempArg != -1.0) {
558 if (presArg != -1.0) {
570 throw CanteraError(
"DebyeHuckel::d2A_DebyedT2_TP",
"shouldn't be here");
578 if (tempArg != -1.0) {
582 if (presArg != -1.0) {
594 throw CanteraError(
"DebyeHuckel::dA_DebyedP_TP",
"shouldn't be here");
622 int est = cEST_nonpolarNeutral;
623 double stoichCharge = spec->charge;
624 if (fabs(spec->charge) > 0.0001) {
625 est = cEST_chargedSpecies;
628 if (spec->input.hasKey(
"Debye-Huckel")) {
629 auto& dhNode = spec->input[
"Debye-Huckel"].as<
AnyMap>();
630 Aionic = dhNode.
convert(
"ionic-radius",
"m", NAN);
631 if (dhNode.hasKey(
"weak-acid-charge")) {
632 stoichCharge = dhNode[
"weak-acid-charge"].asDouble();
633 if (fabs(stoichCharge - spec->charge) > 0.0001) {
634 est = cEST_weakAcidAssociated;
638 if (dhNode.hasKey(
"electrolyte-species-type")) {
639 est =
interp_est(dhNode[
"electrolyte-species-type"].asString());
659 const static double npActCoeff[] = {0.1127, -0.01049, 1.545E-3};
660 double I2 = IionicMolality * IionicMolality;
662 npActCoeff[0] * IionicMolality +
664 npActCoeff[2] * I2 * IionicMolality;
665 return pow(10.0 , l10actCoeff);
670 const double a0 = 1.454;
671 const double b0 = 0.02236;
672 const double c0 = 9.380E-3;
673 const double d0 = -5.362E-4;
678 double Is2 = Is * Is;
679 double bhat = 1.0 + a0 * sqrt(Is);
680 double func = bhat - 2.0 * log(bhat) - 1.0/bhat;
681 double v1 =
m_A_Debye / (a0 * a0 * a0 * Is) * func;
682 double oc = 1.0 - v1 + b0 * Is / 2.0 + 2.0 * c0 * Is2 / 3.0
683 + 3.0 * d0 * Is2 * Is / 4.0;
693 for (
size_t k = 1; k <
m_kk; k++) {
704 double z_k, zs_k1, zs_k2;
715 for (
size_t k = 0; k <
m_kk; k++) {
724 for (
size_t k = 0; k <
m_kk; k++) {
746 xmolSolvent = std::max(8.689E-3, xmolSolvent);
749 double ac_nonPolar = 1.0;
753 double lnActivitySolvent = 0.0;
756 double y, yp1, sigma;
758 case DHFORM_DILUTE_LIMIT:
759 for (
size_t k = 0; k <
m_kk; k++) {
764 (xmolSolvent - 1.0)/xmolSolvent +
771 for (
size_t k = 0; k <
m_kk; k++) {
773 if (est == cEST_nonpolarNeutral) {
778 - z_k * z_k * numTmp / (1.0 + denomTmp *
m_Aionic[k])
783 lnActivitySolvent = (xmolSolvent - 1.0)/xmolSolvent;
787 if (denomTmp > 0.0) {
788 for (
size_t k = 0; k <
m_kk; k++) {
792 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
798 lnActivitySolvent += coeff * tmp;
800 for (
size_t k = 1; k <
m_kk; k++) {
816 case DHFORM_BDOT_ACOMMON:
818 for (
size_t k = 0; k <
m_kk; k++) {
821 - z_k * z_k * numTmp / (1.0 + denomTmp)
824 if (denomTmp > 0.0) {
827 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
832 (xmolSolvent - 1.0)/xmolSolvent +
836 for (
size_t k = 1; k <
m_kk; k++) {
850 (xmolSolvent - 1.0)/xmolSolvent;
852 for (
size_t k = 1; k <
m_kk; k++) {
855 - z_k * z_k * numTmp / (1.0 + denomTmp);
856 for (
size_t j = 0; j <
m_kk; j++) {
861 if (denomTmp > 0.0) {
864 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 -2.0*log(yp1));
869 (xmolSolvent - 1.0)/xmolSolvent +
873 for (
size_t k = 0; k <
m_kk; k++) {
874 for (
size_t j = 0; j <
m_kk; j++) {
882 case DHFORM_PITZER_BETAIJ:
886 tmpLn = log(1.0 + denomTmp);
887 for (
size_t k = 1; k <
m_kk; k++) {
890 - z_k * z_k * numTmp / 3.0 / (1.0 + denomTmp);
894 for (
size_t j = 0; j <
m_kk; j++) {
899 sigma = 1.0 / (1.0 + denomTmp);
901 (xmolSolvent - 1.0)/xmolSolvent +
905 for (
size_t k = 0; k <
m_kk; k++) {
906 for (
size_t j = 0; j <
m_kk; j++) {
915 throw CanteraError(
"DebyeHuckel::s_update_lnMolalityActCoeff",
"ERROR");
927 double z_k, coeff, tmp, y, yp1, sigma, tmpLn;
931 for (
size_t k = 0; k <
m_kk; k++) {
939 xmolSolvent = std::max(8.689E-3, xmolSolvent);
941 double numdAdTTmp = dAdT * sqrtI;
943 double d_lnActivitySolvent_dT = 0;
946 case DHFORM_DILUTE_LIMIT:
947 for (
size_t k = 1; k <
m_kk; k++) {
951 d_lnActivitySolvent_dT = 2.0 / 3.0 * dAdT *
m_Mnaught *
957 for (
size_t k = 0; k <
m_kk; k++) {
960 - z_k * z_k * numdAdTTmp / (1.0 + denomTmp *
m_Aionic[k]);
964 coeff = 2.0 / 3.0 * dAdT *
m_Mnaught * sqrtI;
966 if (denomTmp > 0.0) {
967 for (
size_t k = 0; k <
m_kk; k++) {
970 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
978 case DHFORM_BDOT_ACOMMON:
980 for (
size_t k = 0; k <
m_kk; k++) {
983 - z_k * z_k * numdAdTTmp / (1.0 + denomTmp);
985 if (denomTmp > 0.0) {
988 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
998 for (
size_t k = 1; k <
m_kk; k++) {
1002 if (denomTmp > 0.0) {
1005 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1013 case DHFORM_PITZER_BETAIJ:
1015 tmpLn = log(1.0 + denomTmp);
1016 for (
size_t k = 1; k <
m_kk; k++) {
1019 - z_k * z_k * numdAdTTmp / (1.0 + denomTmp)
1024 sigma = 1.0 / (1.0 + denomTmp);
1030 throw CanteraError(
"DebyeHuckel::s_update_dlnMolalityActCoeff_dT",
1037 double z_k, coeff, tmp, y, yp1, sigma, tmpLn;
1040 if (d2AdT2 == 0.0 && dAdT == 0.0) {
1041 for (
size_t k = 0; k <
m_kk; k++) {
1049 xmolSolvent = std::max(8.689E-3, xmolSolvent);
1051 double numd2AdT2Tmp = d2AdT2 * sqrtI;
1055 case DHFORM_DILUTE_LIMIT:
1056 for (
size_t k = 0; k <
m_kk; k++) {
1062 case DHFORM_BDOT_AK:
1063 for (
size_t k = 0; k <
m_kk; k++) {
1066 - z_k * z_k * numd2AdT2Tmp / (1.0 + denomTmp *
m_Aionic[k]);
1070 coeff = 2.0 / 3.0 * d2AdT2 *
m_Mnaught * sqrtI;
1072 if (denomTmp > 0.0) {
1073 for (
size_t k = 0; k <
m_kk; k++) {
1076 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1084 case DHFORM_BDOT_ACOMMON:
1086 for (
size_t k = 0; k <
m_kk; k++) {
1089 - z_k * z_k * numd2AdT2Tmp / (1.0 + denomTmp);
1091 if (denomTmp > 0.0) {
1094 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1104 for (
size_t k = 1; k <
m_kk; k++) {
1108 if (denomTmp > 0.0) {
1111 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 -2.0*log(yp1));
1119 case DHFORM_PITZER_BETAIJ:
1121 tmpLn = log(1.0 + denomTmp);
1122 for (
size_t k = 1; k <
m_kk; k++) {
1125 - z_k * z_k * numd2AdT2Tmp / (1.0 + denomTmp)
1130 sigma = 1.0 / (1.0 + denomTmp);
1136 throw CanteraError(
"DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2",
1143 double z_k, coeff, tmp, y, yp1, sigma, tmpLn;
1147 for (
size_t k = 0; k <
m_kk; k++) {
1155 xmolSolvent = std::max(8.689E-3, xmolSolvent);
1157 double numdAdPTmp = dAdP * sqrtI;
1161 case DHFORM_DILUTE_LIMIT:
1162 for (
size_t k = 0; k <
m_kk; k++) {
1168 case DHFORM_BDOT_AK:
1169 for (
size_t k = 0; k <
m_kk; k++) {
1171 if (est == cEST_nonpolarNeutral) {
1176 - z_k * z_k * numdAdPTmp / (1.0 + denomTmp *
m_Aionic[k]);
1181 coeff = 2.0 / 3.0 * dAdP *
m_Mnaught * sqrtI;
1183 if (denomTmp > 0.0) {
1184 for (
size_t k = 0; k <
m_kk; k++) {
1187 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1195 case DHFORM_BDOT_ACOMMON:
1197 for (
size_t k = 0; k <
m_kk; k++) {
1200 - z_k * z_k * numdAdPTmp / (1.0 + denomTmp);
1202 if (denomTmp > 0.0) {
1205 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1216 for (
size_t k = 1; k <
m_kk; k++) {
1220 if (denomTmp > 0.0) {
1223 sigma = 3.0 / (y * y * y) * (yp1 - 1.0/yp1 - 2.0*log(yp1));
1231 case DHFORM_PITZER_BETAIJ:
1233 tmpLn = log(1.0 + denomTmp);
1234 for (
size_t k = 1; k <
m_kk; k++) {
1237 - z_k * z_k * numdAdPTmp / (1.0 + denomTmp)
1238 - 2.0 * z_k * z_k * dAdP * tmpLn
1243 sigma = 1.0 / (1.0 + denomTmp);
1249 throw CanteraError(
"DebyeHuckel::s_update_dlnMolalityActCoeff_dP",
Headers for the DebyeHuckel ThermoPhase object, which models dilute electrolyte solutions (see Thermo...
Declarations for the class PDSS_ConstVol (pressure dependent standard state) which handles calculatio...
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
Declaration for class Cantera::Species.
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
A map of string keys to values whose type can vary at runtime.
size_t size() const
Returns the number of elements in this map.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
double convert(const string &key, const string &units) const
Convert the item stored by the given key to the units specified in units.
size_t nRows() const
Number of rows.
size_t nColumns() const
Number of columns.
double & value(size_t i, size_t j)
Returns a changeable reference to position in the matrix.
virtual void resize(size_t n, size_t m, double v=0.0)
Resize the array, and fill the new entries with 'v'.
Base class for exceptions thrown by Cantera classes.
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...
unique_ptr< WaterProps > m_waterProps
Pointer to the water property calculator.
int m_formDH
form of the Debye-Huckel parameterization used in the model.
DebyeHuckel(const string &inputFile="", const string &id="")
Full constructor for creating the phase.
double m_A_Debye
Current value of the Debye Constant, A_Debye.
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...
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
vector< double > m_B_Dot
Array of B_Dot values.
double m_IionicMolality
Current value of the ionic strength on the molality scale.
double _osmoticCoeffHelgesonFixedForm() const
Formula for the osmotic coefficient that occurs in the GWB.
double m_densWaterSS
Storage for the density of water's standard state.
void s_update_d2lnMolalityActCoeff_dT2() const
Calculate the temperature 2nd derivative of the activity coefficient.
void getSpeciesParameters(const string &name, AnyMap &speciesNode) const override
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
int m_form_A_Debye
Form of the constant outside the Debye-Huckel term called A.
bool m_useHelgesonFixedForm
If true, then the fixed for of Helgeson's activity for water is used instead of the rigorous form obt...
static double _nonpolarActCoeff(double IionicMolality)
Static function that implements the non-polar species salt-out modifications.
vector< int > m_electrolyteSpeciesType
Vector containing the electrolyte species type.
double m_B_Debye
Current value of the constant that appears in the denominator.
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
double AionicRadius(int k=0) const
Reports the ionic radius of the kth species.
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
void s_update_dlnMolalityActCoeff_dT() const
Calculation of temperature derivative of activity coefficient.
void s_update_lnMolalityActCoeff() const
Calculate the log activity coefficients.
vector< double > m_Aionic
a_k = Size of the ionic species in the DH formulation. units = meters
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
void setA_Debye(double A)
Set the A_Debye parameter.
void calcDensity() override
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
vector< double > m_dlnActCoeffMolaldT
Derivative of log act coeff wrt T.
double m_Aionic_default
Default ionic radius for species where it is not specified.
void setDebyeHuckelModel(const string &form)
Set the DebyeHuckel parameterization form.
vector< double > m_speciesCharge_Stoich
Stoichiometric species charge -> This is for calculations of the ionic strength which ignore ion-ion ...
double m_maxIionicStrength
Maximum value of the ionic strength allowed in the calculation of the activity coefficients.
double _lnactivityWaterHelgesonFixedForm() const
Formula for the log of the water activity that occurs in the GWB.
void setBeta(const string &sp1, const string &sp2, double value)
Set the value for the beta interaction between species sp1 and sp2.
void getActivities(double *ac) const override
Get the array of non-dimensional activities at the current solution temperature, pressure,...
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.
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
void setDefaultIonicRadius(double value)
Set the default ionic radius [m] for each species.
vector< double > m_d2lnActCoeffMolaldT2
2nd Derivative of log act coeff wrt T
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
void s_update_dlnMolalityActCoeff_dP() const
Calculate the pressure derivative of the activity coefficient.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
PDSS_Water * m_waterSS
Pointer to the Water standard state object.
double m_IionicMolalityStoich
Stoichiometric ionic strength on the molality scale.
vector< double > m_lnActCoeffMolal
Logarithm of the activity coefficients on the molality scale.
vector< double > m_dlnActCoeffMolaldP
Derivative of log act coeff wrt P.
void getMolalityActivityCoefficients(double *acMolality) const override
Get the array of non-dimensional molality-based activity coefficients at the current solution tempera...
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
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 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...
double m_Mnaught
This is the multiplication factor that goes inside log expressions involving the molalities of specie...
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
vector< double > m_molalities
Current value of the molalities of the species in the phase.
void calcMolalities() const
Calculates the molality of all species and stores the result internally.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Class for pressure dependent standard states that use a constant volume model.
Class for the liquid water pressure dependent standard state.
double density() const override
Return the standard state density at standard state.
virtual double molarVolume() const
Return the molar volume at standard state.
size_t nSpecies() const
Returns the number of species in the phase.
size_t m_kk
Number of species in the phase.
double temperature() const
Temperature (K).
string speciesName(size_t k) const
Name of the species with index k.
size_t speciesIndex(const string &name) const
Returns the index of a species named 'name' within the Phase object.
double moleFraction(size_t k) const
Return the mole fraction of a single species.
shared_ptr< Species > species(const string &name) const
Return the Species object for the named species.
double charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
vector< double > m_speciesCharge
Vector of species charges.
string name() const
Return the name of the phase.
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
double RT() const
Return the Gas Constant multiplied by the current temperature.
void initThermoFile(const string &inputFile, const string &id)
Initialize a ThermoPhase object using an input file.
virtual void getSpeciesParameters(const string &name, AnyMap &speciesNode) const
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
AnyMap m_input
Data supplied via setParameters.
double pressure() const override
Returns the current pressure of the phase.
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
virtual void _updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
void getStandardVolumes(double *vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
Header file for a common definitions used in electrolytes thermodynamics.
bool caseInsensitiveEquals(const string &input, const string &test)
Case insensitive equality predicate.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
static int interp_est(const string &estString)
Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field.
const double SmallNumber
smallest number to compare to zero.
const int cEST_solvent
Electrolyte species type.
Contains declarations for string manipulation functions within Cantera.