Go to the documentation of this file.
11 #ifndef CT_IONSFROMNEUTRALVPSSTP_H
12 #define CT_IONSFROMNEUTRALVPSSTP_H
26 cIonSolnType_PASSTHROUGH = 2000 ,
27 cIonSolnType_SINGLEANION ,
28 cIonSolnType_SINGLECATION ,
29 cIonSolnType_MULTICATIONANION
85 const std::string&
id =
"");
103 virtual std::string
type()
const {
104 return "IonsFromNeutral";
119 virtual doublereal
cp_mole()
const;
120 virtual doublereal
cv_mole()
const;
180 virtual void getdlnActCoeffds(
const doublereal dTds,
const doublereal*
const dXds,
181 doublereal* dlnActCoeffds)
const;
272 virtual bool addSpecies(shared_ptr<Species> spec);
273 void setNeutralMoleculePhase(shared_ptr<ThermoPhase> neutral);
274 shared_ptr<ThermoPhase> getNeutralMoleculePhase();
413 mutable vector_fp dlnActCoeff_NeutralMolecule_;
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
std::vector< size_t > passThroughList_
List of the species in this ThermoPhase which are passed through to the neutralMoleculePhase ThermoPh...
IonSolnType_enumType
enums for molten salt ion solution types
vector_fp dlnActCoeffdlnX_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dX - diagonal component.
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...
A class for 2D arrays stored in column-major (Fortran-compatible) form.
virtual void setParametersFromXML(const XML_Node &thermoNode)
Set equation of state parameter values from XML entries.
std::vector< size_t > fm_invert_ionForNeutral
Mapping between ion species and neutral molecule for quick invert.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void getdlnActCoeffdlnX_diag(doublereal *dlnActCoeffdlnX_diag) const
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
Array2D dlnActCoeffdlnN_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
void getDissociationCoeffs(vector_fp &fm_neutralMolec_ions, vector_fp &charges, std::vector< size_t > &neutMolIndex) const
Get the Salt Dissociation Coefficients.
vector_fp muNeutralMolecule_
Storage vector for the neutral molecule chemical potentials.
virtual void calcNeutralMoleculeMoleFractions() const
Calculate neutral molecule mole fractions.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
vector_fp fm_neutralMolec_ions_
Formula Matrix for composition of neutral molecules in terms of the molecules in this ThermoPhase.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
void getNeutralMoleculeMoleGrads(const doublereal *const dx, doublereal *const dy) const
Calculate neutral molecule mole fractions.
virtual std::string type() const
String indicating the thermodynamic model implemented.
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 ...
void getCationList(std::vector< size_t > &cation) const
Get the list of cations in this object.
void s_update_dlnActCoeff() const
Update the change in 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)
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
void s_update_lnActCoeff() const
Update the activity coefficients.
vector_fp moleFractionsTmp_
Temporary mole fraction vector.
std::vector< size_t > anionList_
List of the species in this ThermoPhase which are anion species.
AnyMap m_rootNode
Root node of the AnyMap which contains this phase definition.
vector_fp lnActCoeff_NeutralMolecule_
Storage vector for the neutral molecule ln activity coefficients.
vector_fp NeutralMolecMoleFractions_
Mole fractions using the Neutral Molecule Mole fraction basis.
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log species mole number derivatives of the log activity coefficients.
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.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
size_t indexSpecialSpecies_
Index of special species.
shared_ptr< ThermoPhase > neutralMoleculePhase_
This is a pointer to the neutral Molecule Phase.
vector_fp dlnActCoeffdlnN_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
void getAnionList(std::vector< size_t > &anion) const
Get the list of anions in this object.
void s_update_dlnActCoeff_dlnN() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
virtual doublereal enthalpy_mole() const
Return the Molar enthalpy. Units: J/kmol.
vector_fp dlnActCoeffdT_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dT.
virtual void setParameters(const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
Set equation of state parameters from an AnyMap phase description.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
A map of string keys to values whose type can vary at runtime.
void getNeutralMolecMoleFractions(vector_fp &neutralMoleculeMoleFractions) const
Return the current value of the neutral mole fraction vector.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies for the species in the mixture.
size_t numNeutralMoleculeSpecies_
Number of neutral molecule species.
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,...
void s_update_dlnActCoeffdT() const
Update the temperature derivative of the ln activity coefficients.
Namespace for the Cantera kernel.
IonSolnType_enumType ionSolnType_
Ion solution type.
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 bool addSpecies(shared_ptr< Species > spec)
std::vector< size_t > cationList_
List of the species in this ThermoPhase which are cation species.