19 #ifndef CT_IONSFROMNEUTRALVPSSTP_H
20 #define CT_IONSFROMNEUTRALVPSSTP_H
34 cIonSolnType_PASSTHROUGH = 2000 ,
35 cIonSolnType_SINGLEANION ,
36 cIonSolnType_SINGLECATION ,
37 cIonSolnType_MULTICATIONANION
106 const std::string&
id =
"",
228 virtual doublereal
cp_mole()
const;
231 virtual doublereal
cv_mole()
const;
317 virtual void getdlnActCoeffds(
const doublereal dTds,
const doublereal*
const dXds,
318 doublereal* dlnActCoeffds)
const;
445 virtual void setState_TP(doublereal t, doublereal p);
705 mutable vector_fp dlnActCoeff_NeutralMolecule_;
virtual void setMassFractions(const doublereal *const y)
Set the mass fractions to the specified values, and then normalize them so that they sum to 1...
virtual ~IonsFromNeutralVPSSTP()
Destructor.
void s_update_dlnActCoeff() const
Update the change in the ln activity coefficients.
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplication routine for objects which inherit from ThermoPhase.
virtual void setConcentrations(const doublereal *const c)
Set the concentrations to the specified values within the phase.
virtual void setState_TP(doublereal t, doublereal p)
Set the temperature (K) and pressure (Pa)
void getNeutralMolecMoleFractions(vector_fp &neutralMoleculeMoleFractions) const
Return the current value of the neutral mole fraction vector.
IonsFromNeutralVPSSTP & operator=(const IonsFromNeutralVPSSTP &b)
Assignment operator.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
std::vector< double > fm_neutralMolec_ions_
Formula Matrix for composition of neutral molecules in terms of the molecules in this ThermoPhase...
size_t indexSpecialSpecies_
Index of special species.
virtual void calcNeutralMoleculeMoleFractions() const
Calculate neutral molecule mole fractions.
Class XML_Node is a tree-based representation of the contents of an XML file.
virtual void calcIonMoleFractions(doublereal *const mf) const
Calculate ion mole fractions from neutral molecule mole fractions.
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 initThermo()
void s_update_dlnActCoeff_dlnN_diag() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
bool IOwnNThermoPhase_
If true then we own the underlying neutral Molecule Phase.
void getDissociationCoeffs(vector_fp &fm_neutralMolec_ions, vector_fp &charges, std::vector< size_t > &neutMolIndex) const
Get the Salt Dissociation Coefficients Returns the vector of dissociation coefficients and vector of ...
void constructPhaseXML(XML_Node &phaseNode, std::string id)
Import and initialize an IonsFromNeutralVPSSTP phase specification in an XML tree into the current ob...
A class for 2D arrays stored in column-major (Fortran-compatible) form.
virtual int eosType() const
Equation of state type flag.
Base class for a phase with thermodynamic properties.
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log concentration-like derivatives of the log activity coefficients - diagonal compo...
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual doublereal enthalpy_mole() const
Return the Molar enthalpy. Units: J/kmol.
virtual void setTemperature(const doublereal t)
Set the temperature of the phase.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
void getCationList(std::vector< size_t > &cation) const
Get the list of cations in this object.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies for the species in the mixture.
IonSolnType_enumType ionSolnType_
Ion solution type.
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal *const dlnActCoeffdlnN)
Get the array of derivatives of the ln activity coefficients with respect to the ln species mole numb...
Array2D dlnActCoeffdlnN_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
Header for intermediate ThermoPhase object for phases which employ Gibbs excess free energy based for...
std::vector< doublereal > dlnActCoeffdT_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dT.
void initLengths()
Initialize lengths of local variables after all species have been identified.
virtual void setMoleFractions(const doublereal *const x)
Set the mole fractions to the specified values, and then normalize them so that they sum to 1...
std::vector< doublereal > muNeutralMolecule_
Storage vector for the neutral molecule chemical potentials.
void s_update_dlnActCoeffdT() const
Update the temperature derivative of the ln activity coefficients.
void s_update_dlnActCoeff_dlnX_diag() const
Update the derivative of the log of the activity coefficients wrt log(mole fraction) ...
std::vector< size_t > anionList_
List of the species in this ThermoPhase which are anion species.
std::vector< size_t > passThroughList_
List of the species in this ThermoPhase which are passed through to the neutralMoleculePhase ThermoPh...
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< doublereal > lnActCoeff_NeutralMolecule_
Storage vector for the neutral molecule ln activity coefficients.
void getNeutralMoleculeMoleGrads(const doublereal *const dx, doublereal *const dy) const
Calculate neutral molecule mole fractions.
void getAnionList(std::vector< size_t > &anion) const
Get the list of anions in this object.
virtual void getdlnActCoeffdlnX_diag(doublereal *dlnActCoeffdlnX_diag) const
Get the array of log concentration-like derivatives of the log activity coefficients - diagonal compo...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
std::vector< size_t > fm_invert_ionForNeutral
Mapping between ion species and neutral molecule for quick invert.
virtual void setMoleFractions_NoNorm(const doublereal *const x)
Set the mole fractions to the specified values without normalizing.
std::vector< doublereal > dlnActCoeffdlnN_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN - diagonal component...
std::vector< size_t > cationList_
List of the species in this ThermoPhase which are cation species.
virtual doublereal gibbs_mole() const
Molar Gibbs free Energy for an ideal gas. Units = J/kmol.
void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object.
std::vector< doublereal > dlnActCoeffdlnX_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dX - diagonal component.
virtual void getdlnActCoeffds(const doublereal dTds, const doublereal *const dXds, doublereal *dlnActCoeffds) const
Get the change in activity coefficients w.r.t.
std::vector< doublereal > NeutralMolecMoleFractions_
Mole fractions using the Neutral Molecule Mole fraction basis.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual void setMassFractions_NoNorm(const doublereal *const y)
Set the mass fractions to the specified values without normalizing.
size_t indexSecondSpecialSpecies_
Index of special species.
size_t numNeutralMoleculeSpecies_
Number of neutral molecule species.
ThermoPhase * neutralMoleculePhase_
This is a pointer to the neutral Molecule Phase.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
void s_update_lnActCoeff() const
Update the activity coefficients.
std::vector< doublereal > moleFractionsTmp_
Temporary mole fraction vector.
IonSolnType_enumType
enums for molten salt ion solution types
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.