29 IonsFromNeutralVPSSTP::IonsFromNeutralVPSSTP() :
30 ionSolnType_(cIonSolnType_SINGLEANION),
31 numNeutralMoleculeSpecies_(0),
32 indexSpecialSpecies_(
npos),
33 indexSecondSpecialSpecies_(
npos),
34 neutralMoleculePhase_(0),
36 IOwnNThermoPhase_(true)
41 const std::string& id_,
43 ionSolnType_(cIonSolnType_SINGLEANION),
44 numNeutralMoleculeSpecies_(0),
45 indexSpecialSpecies_(
npos),
46 indexSecondSpecialSpecies_(
npos),
47 neutralMoleculePhase_(neutralPhase),
48 IOwnNThermoPhase_(true)
57 const std::string& id_,
ThermoPhase* neutralPhase) :
58 ionSolnType_(cIonSolnType_SINGLEANION),
59 numNeutralMoleculeSpecies_(0),
60 indexSpecialSpecies_(
npos),
61 indexSecondSpecialSpecies_(
npos),
62 neutralMoleculePhase_(neutralPhase),
63 IOwnNThermoPhase_(true)
72 ionSolnType_(cIonSolnType_SINGLEANION),
73 numNeutralMoleculeSpecies_(0),
74 indexSpecialSpecies_(
npos),
75 indexSecondSpecialSpecies_(
npos),
76 neutralMoleculePhase_(0),
78 IOwnNThermoPhase_(true)
80 IonsFromNeutralVPSSTP::operator=(b);
83 IonsFromNeutralVPSSTP&
84 IonsFromNeutralVPSSTP::operator=(
const IonsFromNeutralVPSSTP& b)
96 if (b.neutralMoleculePhase_) {
107 GibbsExcessVPSSTP::operator=(b);
120 dlnActCoeff_NeutralMolecule_ = b.dlnActCoeff_NeutralMolecule_;
121 dX_NeutralMolecule_ = b.dX_NeutralMolecule_;
135 IonsFromNeutralVPSSTP::~IonsFromNeutralVPSSTP()
151 "Use initThermoFile instead. To be removed after Cantera 2.3.");
158 "Use importPhase instead. To be removed after Cantera 2.3.");
167 "To be removed after Cantera 2.3.");
168 return cIonsFromNeutral;
207 vector_fp& charges, std::vector<size_t>& neutMolIndex)
const 220 for (
size_t k = 0; k <
m_kk; k++) {
230 doublereal xx, fact2;
236 case cIonSolnType_PASSTHROUGH:
239 case cIonSolnType_SINGLEANION:
241 fact2 = 2.0 *
RT() * log(2.0);
256 mu[icat] =
RT() * log(xx);
267 case cIonSolnType_SINGLECATION:
270 case cIonSolnType_MULTICATIONANION:
285 for (
size_t k = 0; k <
m_kk; k++) {
293 for (
size_t k = 0; k <
m_kk; k++) {
308 for (
size_t k = 0; k <
m_kk; k++) {
314 for (
size_t k = 0; k <
m_kk; k++) {
324 for (
size_t k = 0; k <
m_kk; k++) {
334 for (
size_t k = 0; k <
m_kk; k++) {
344 for (
size_t k = 0; k <
m_kk; k++) {
345 for (
size_t m = 0; m <
m_kk; m++) {
346 dlnActCoeffdlnN[ld * k + m] = data[
m_kk * k + m];
368 for (
size_t k = 0; k <
m_kk; k++) {
374 for (
size_t k = 0; k <
m_kk; k++) {
381 doublereal sum = 0.0;
382 for (
size_t k = 0; k <
m_kk; k++) {
385 for (
size_t k = 0; k <
m_kk; k++) {
394 doublereal sum = 0.0;
401 for (
size_t k = 0; k <
m_kk; k++) {
404 if (fabs(sum) > 1.0E-11) {
405 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
406 "molefracts don't sum to one: {}", sum);
410 case cIonSolnType_PASSTHROUGH:
411 for (
size_t k = 0; k <
m_kk; k++) {
416 case cIonSolnType_SINGLEANION:
439 for (
size_t k = 0; k <
m_kk; k++) {
443 for (
size_t k = 0; k <
m_kk; k++) {
448 for (
size_t k = 0; k <
m_kk; k++) {
452 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
453 "neutral molecule calc error");
457 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
458 "neutral molecule calc error - anion");
474 case cIonSolnType_SINGLECATION:
475 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
"Unknown type");
477 case cIonSolnType_MULTICATIONANION:
478 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
"Unknown type");
481 throw CanteraError(
"IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions",
"Unknown type");
488 doublereal sumy, sumdy;
499 case cIonSolnType_PASSTHROUGH:
500 for (
size_t k = 0; k <
m_kk; k++) {
505 case cIonSolnType_SINGLEANION:
513 const doublereal temp = 1.0/fmij;
514 dy[jNeut] += dx[icat] * temp;
523 const doublereal temp = 1.0/fmij;
524 dy[jNeut] += dx[icat] * temp;
536 dy[k] = dy[k] * sumy - y_[k]*sumdy*sumy*sumy;
541 case cIonSolnType_SINGLECATION:
542 throw CanteraError(
"IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads",
545 case cIonSolnType_MULTICATIONANION:
546 throw CanteraError(
"IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads",
550 throw CanteraError(
"IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads",
606 const size_t nElementsN,
607 const std::vector<std::string>& elnamesVI ,
609 const size_t nElementsI)
611 double fMax = 1.0E100;
612 for (
size_t mi = 0; mi < nElementsI; mi++) {
613 if (elnamesVI[mi] !=
"E" && elemVectorI[mi] > 1.0E-13) {
614 double eiNum = elemVectorI[mi];
615 for (
size_t mn = 0; mn < nElementsN; mn++) {
616 if (elnamesVI[mi] == elnamesVN[mn]) {
617 if (elemVectorN[mn] <= 1.0E-13) {
620 fMax = std::min(fMax, elemVectorN[mn]/eiNum);
629 if (id_.size() > 0 && phaseNode.
id() != id_) {
630 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
631 "phasenode and Id are incompatible");
635 if (!phaseNode.
hasChild(
"thermo")) {
636 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
637 "no thermo XML node");
642 if (!ba::iequals(thermoNode[
"model"],
"ionsfromneutralmolecule")) {
643 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
644 "model name isn't IonsFromNeutralMolecule: " 645 + thermoNode[
"model"]);
649 if (!thermoNode.
hasChild(
"neutralMoleculePhase")) {
650 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
651 "no neutralMoleculePhase XML node");
653 XML_Node& neutralMoleculeNode = thermoNode.
child(
"neutralMoleculePhase");
657 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
667 for (
size_t k = 0; k <
m_kk; k++) {
674 for (
size_t k = 0; k <
m_kk; k++) {
681 for (
size_t k = 0; k <
m_kk; k++) {
688 for (
size_t k = 0; k <
m_kk; k++) {
692 throw CanteraError(
"initThermoXML",
"Dynamic cast failed");
708 const std::vector<std::string>& elnamesVI =
elementNames();
712 for (
size_t k = 0; k <
m_kk; k++) {
716 for (
size_t m = 0; m < nElementsN; m++) {
719 elemVectorN_orig = elemVectorN;
720 fm_tmp.assign(
m_kk, 0.0);
722 for (
size_t m = 0; m < nElementsI; m++) {
725 double fac =
factorOverlap(elnamesVN, elemVectorN, nElementsN,
726 elnamesVI ,elemVectorI, nElementsI);
728 for (
size_t m = 0; m < nElementsN; m++) {
729 std::string mName = elnamesVN[m];
730 for (
size_t mi = 0; mi < nElementsI; mi++) {
731 std::string eName = elnamesVI[mi];
732 if (mName == eName) {
733 elemVectorN[m] -= fac * elemVectorI[mi];
741 for (
size_t k = 0; k <
m_kk; k++) {
742 for (
size_t m = 0; m < nElementsI; m++) {
743 elemVectorI[m] =
nAtoms(k, m);
746 elnamesVI ,elemVectorI, nElementsI);
748 for (
size_t m = 0; m < nElementsN; m++) {
749 std::string mName = elnamesVN[m];
750 for (
size_t mi = 0; mi < nElementsI; mi++) {
751 std::string eName = elnamesVI[mi];
752 if (mName == eName) {
753 elemVectorN[m] -= fac * elemVectorI[mi];
757 bool notTaken =
true;
758 for (
size_t iNeut = 0; iNeut < jNeut; iNeut++) {
766 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
767 "Simple formula matrix generation failed, one cation is shared between two salts");
774 for (
size_t m = 0; m < nElementsN; m++) {
775 if (fabs(elemVectorN[m]) > 1.0E-13) {
776 throw CanteraError(
"IonsFromNeutralVPSSTP::initThermoXML",
777 "Simple formula matrix generation failed");
792 case cIonSolnType_PASSTHROUGH:
794 case cIonSolnType_SINGLEANION:
817 case cIonSolnType_SINGLECATION:
818 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff",
"Unimplemented type");
820 case cIonSolnType_MULTICATIONANION:
821 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff",
"Unimplemented type");
824 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff",
"Unimplemented type");
830 doublereal* dlnActCoeffds)
const 835 for (
size_t k = 0; k <
m_kk; k++) {
844 geThermo->
getdlnActCoeffds(dTds, dX_NeutralMolecule_.data(), dlnActCoeff_NeutralMolecule_.data());
847 case cIonSolnType_PASSTHROUGH:
849 case cIonSolnType_SINGLEANION:
856 dlnActCoeffds[icat] = dlnActCoeff_NeutralMolecule_[jNeut]/fmij;
862 dlnActCoeffds[icat]= 0.0;
868 dlnActCoeffds[icat] = dlnActCoeff_NeutralMolecule_[jNeut];
872 case cIonSolnType_SINGLECATION:
873 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffds",
"Unimplemented type");
875 case cIonSolnType_MULTICATIONANION:
876 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffds",
"Unimplemented type");
879 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffds",
"Unimplemented type");
897 case cIonSolnType_PASSTHROUGH:
899 case cIonSolnType_SINGLEANION:
922 case cIonSolnType_SINGLECATION:
923 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffdT",
"Unimplemented type");
925 case cIonSolnType_MULTICATIONANION:
926 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffdT",
"Unimplemented type");
929 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeffdT",
"Unimplemented type");
947 case cIonSolnType_PASSTHROUGH:
949 case cIonSolnType_SINGLEANION:
972 case cIonSolnType_SINGLECATION:
973 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnX_diag()",
"Unimplemented type");
975 case cIonSolnType_MULTICATIONANION:
976 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnX_diag()",
"Unimplemented type");
979 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnX_diag()",
"Unimplemented type");
997 case cIonSolnType_PASSTHROUGH:
999 case cIonSolnType_SINGLEANION:
1022 case cIonSolnType_SINGLECATION:
1023 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN_diag()",
"Unimplemented type");
1025 case cIonSolnType_MULTICATIONANION:
1026 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN_diag()",
"Unimplemented type");
1029 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN_diag()",
"Unimplemented type");
1036 size_t kcat = 0, kNeut = 0, mcat = 0, mNeut = 0;
1037 doublereal fmij = 0.0;
1041 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN()",
"dynamic cast failed");
1043 size_t nsp_ge = geThermo->
nSpecies();
1047 case cIonSolnType_PASSTHROUGH:
1049 case cIonSolnType_SINGLEANION:
1076 for (
size_t k = 0; k <
m_kk; k++) {
1087 for (
size_t m = 0; m <
m_kk; m++) {
1101 case cIonSolnType_SINGLECATION:
1102 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN",
"Unimplemented type");
1104 case cIonSolnType_MULTICATIONANION:
1105 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN",
"Unimplemented type");
1108 throw CanteraError(
"IonsFromNeutralVPSSTP::s_update_lnActCoeff_dlnN",
"Unimplemented type");
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal *const dlnActCoeffdlnN)
Get the array of derivatives of the log activity coefficients with respect to the log of the species ...
XML_Node * get_XML_Node(const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...
virtual void getLnActivityCoefficients(doublereal *lnac) const
Get the array of non-dimensional molar-based ln activity coefficients at the current solution tempera...
vector_fp muNeutralMolecule_
Storage vector for the neutral molecule chemical potentials.
size_t nElements() const
Number of elements.
vector_fp NeutralMolecMoleFractions_
Mole fractions using the Neutral Molecule Mole fraction basis.
Derived class for pressure dependent standard states of an ideal gas species.
vector_fp dlnActCoeffdlnX_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
doublereal temperature() const
Temperature (K).
void resize(size_t n, size_t m, doublereal v=0.0)
Resize the array, and fill the new entries with 'v'.
Header for intermediate ThermoPhase object for phases which consist of ions whose thermodynamics is c...
const size_t npos
index returned by functions to indicate "no position"
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
vector_fp m_speciesCharge
Vector of species charges. length m_kk.
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
size_t indexSpecialSpecies_
Index of special species.
Class XML_Node is a tree-based representation of the contents of an XML file.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
size_t nSpecies() const
Returns the number of species in the phase.
virtual doublereal density() const
Density (kg/m^3).
void constructPhaseFile(std::string inputFile, std::string id)
The following methods are used in the process of constructing the phase and setting its parameters fr...
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
virtual void initThermo()
bool IOwnNThermoPhase_
If true then we own the underlying neutral Molecule Phase.
void constructPhaseXML(XML_Node &phaseNode, std::string id)
Import and initialize an IonsFromNeutralVPSSTP phase specification in an XML tree into the current ob...
doublereal mean_X(const doublereal *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
vector_fp lnActCoeff_NeutralMolecule_
Storage vector for the neutral molecule ln activity coefficients.
vector_fp dlnActCoeffdT_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dT.
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
Base class for a phase with thermodynamic properties.
void s_update_dlnActCoeff_dlnX_diag() const
Update the derivative of the log of the activity coefficients wrt log(mole fraction) ...
vector_fp dlnActCoeffdlnN_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
virtual void calcNeutralMoleculeMoleFractions() const
Calculate neutral molecule mole fractions.
virtual void initThermo()
vector_fp dlnActCoeffdlnN_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void getdlnActCoeffds(const doublereal dTds, const doublereal *const dXds, doublereal *dlnActCoeffds) const
Get the change in activity coefficients wrt changes in state (temp, mole fraction, etc) along a line in parameter space or along a line in physical space.
void s_update_dlnActCoeffdT() const
Update the temperature derivative of the ln activity coefficients.
IonSolnType_enumType ionSolnType_
Ion solution type.
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log species mole number derivatives of the log activity coefficients.
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal *const dlnActCoeffdlnN)
Get the array of derivatives of the log activity coefficients with respect to the log of the species ...
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
void s_update_lnActCoeff() const
Update the activity coefficients.
Array2D dlnActCoeffdlnN_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
void initLengths()
Initialize lengths of local variables after all species have been identified.
Base class for exceptions thrown by Cantera classes.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
virtual void setMoleFractions(const doublereal *const x)
Set the mole fractions to the specified values.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies for the species in the mixture.
void getMoleFractions(doublereal *const x) const
Get the species mole fraction vector.
void s_update_dlnActCoeff_dlnN() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
std::vector< size_t > anionList_
List of the species in this ThermoPhase which are anion species.
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
vector_fp lnActCoeff_Scaled_
Storage for the current values of the activity coefficients of the species.
virtual void setState_TP(doublereal t, doublereal p)
Set the temperature (K) and pressure (Pa)
virtual doublereal pressure() const
Returns the current pressure of the phase.
std::vector< size_t > passThroughList_
List of the species in this ThermoPhase which are passed through to the neutralMoleculePhase ThermoPh...
bool hasChild(const std::string &ch) const
Tests whether the current node has a child node with a particular name.
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
#define AssertTrace(expr)
Assertion must be true or an error is thrown.
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual int eosType() const
Equation of state type flag.
virtual void calcIonMoleFractions(doublereal *const mf) const
Calculate ion mole fractions from neutral molecule mole fractions.
virtual void getdlnActCoeffdlnX_diag(doublereal *dlnActCoeffdlnX_diag) const
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
const doublereal SmallNumber
smallest number to compare to zero.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log species mole number derivatives of the log activity coefficients.
std::vector< size_t > fm_invert_ionForNeutral
Mapping between ion species and neutral molecule for quick invert.
virtual doublereal enthalpy_mole() const
Return the Molar enthalpy. Units: J/kmol.
std::string id() const
Return the id attribute, if present.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
Contains declarations for string manipulation functions within Cantera.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
std::vector< size_t > cationList_
List of the species in this ThermoPhase which are cation species.
vector_fp moleFractions_
Storage for the current values of the mole fractions of the species.
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
vector_fp fm_neutralMolec_ions_
Formula Matrix for composition of neutral molecules in terms of the molecules in this ThermoPhase...
size_t m_kk
Number of species in the phase.
Array2D dlnActCoeffdlnN_
Storage for the current derivative values of the gradients with respect to logarithm of the species m...
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
void zero()
Set all of the entries to zero.
virtual void initThermoFile(const std::string &inputFile, const std::string &id)
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplication routine for objects which inherit from ThermoPhase.
void getDissociationCoeffs(vector_fp &fm_neutralMolec_ions, vector_fp &charges, std::vector< size_t > &neutMolIndex) const
Get the Salt Dissociation Coefficients.
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
Namespace for the Cantera kernel.
static double factorOverlap(const std::vector< std::string > &elnamesVN, const vector_fp &elemVectorN, const size_t nElementsN, const std::vector< std::string > &elnamesVI, const vector_fp &elemVectorI, const size_t nElementsI)
Return the factor overlap.
size_t indexSecondSpecialSpecies_
Index of special species.
Declarations for the class PDSS_IonsFromNeutral ( which handles calculations for a single ion in a fl...
doublereal nAtoms(size_t k, size_t m) const
Number of atoms of element m in species k.
size_t numNeutralMoleculeSpecies_
Number of neutral molecule species.
ThermoPhase * neutralMoleculePhase_
This is a pointer to the neutral Molecule Phase.
virtual void getdlnActCoeffdlnX_diag(doublereal *dlnActCoeffdlnX_diag) const
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
virtual void getdlnActCoeffds(const doublereal dTds, const doublereal *const dXds, doublereal *dlnActCoeffds) const
Get the change in activity coefficients wrt changes in state (temp, mole fraction, etc) along a line in parameter space or along a line in physical space.
const std::vector< std::string > & elementNames() const
Return a read-only reference to the vector of element names.
vector_fp moleFractionsTmp_
Temporary mole fraction vector.
void getNeutralMoleculeMoleGrads(const doublereal *const dx, doublereal *const dy) const
Calculate neutral molecule mole fractions.
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
doublereal charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
int specialSpecies_
True if this species is the special species.
virtual void getdlnActCoeffdT(doublereal *dlnActCoeffdT) const
Get the array of temperature derivatives of the log activity coefficients.
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase.
vector_fp dlnActCoeffdT_Scaled_
Storage for the current derivative values of the gradients with respect to temperature of the log of ...
void s_update_dlnActCoeff_dlnN_diag() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
vector_fp dlnActCoeffdlnX_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dX - diagonal component.