42 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
43 "Couldn't find phase name in file:" + id_);
47 std::string model = th[
"model"];
48 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
49 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
50 "thermo model attribute must be StoichSubstance");
59 std::string idxml = xmlphase[
"id"];
61 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
66 std::string model = th[
"model"];
67 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
68 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
69 "thermo model attribute must be StoichSubstance");
100 return cStoichSubstance;
150 for (
int i = 0; i < 6; i++) {
171 hrt[0] += presCorrect / RT;
221 "stoichiometric substances may only contain one species.");
246 if (!phaseNode.
hasChild(
"thermo")) {
247 throw CanteraError(
"StoichSubstanceSSTP::initThermoXML",
248 "no thermo XML node");
259 doublereal rho = c[0];
273 std::string model = eosdata[
"model"];
274 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
275 throw CanteraError(
"StoichSubstanceSSTP::setParametersFromXML",
276 "thermo model attribute must be StoichSubstance");
298 throw CanteraError(
"electrodeElectron::electrodeElectron",
299 "Couldn't find phase name in file:" + id_);
303 std::string model = th[
"model"];
304 if (model !=
"electrodeElectron") {
305 throw CanteraError(
"electrodeElectron::electrodeElectron",
306 "thermo model attribute must be electrodeElectron");
315 std::string idxml = xmlphase[
"id"];
317 throw CanteraError(
"electrodeElectron::electrodeElectron",
322 std::string model = th[
"model"];
323 if (model !=
"electrodeElectron") {
324 throw CanteraError(
"electrodeElectron::electrodeElectron",
325 "thermo model attribute must be electrodeElectron");
339 if (&right !=
this) {
351 std::string model = eosdata[
"model"];
352 if (model !=
"electrodeElectron") {
353 throw CanteraError(
"electrodeElectron::setParametersFromXML",
354 "thermo model attribute must be electrodeElectron");
360 doublereal rho = 10.0;
368 doublereal rho = 10.0;
virtual doublereal density() const
Density (kg/m^3).
Class electrodeElectron represents an electron in a metal using the Standard hydrogen reference elect...
XML_Node * get_XML_File(const std::string &file, int debug)
Return a pointer to the XML tree for a Cantera input file.
void setParametersFromXML(const XML_Node &eosdata)
Set equation of state parameter values from XML entries.
virtual void getIntEnergy_RT_ref(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the reference state at the current temperat...
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
StoichSubstanceSSTP & operator=(const StoichSubstanceSSTP &right)
Assignment operator.
Class XML_Node is a tree-based representation of the contents of an XML file.
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Virtual base class for the calculation of multiple-species thermodynamic reference-state property man...
doublereal getFloat(const Cantera::XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
virtual void getUnitsStandardConc(doublereal *uA, int k=0, int sizeUA=6) const
Returns the units of the standard and generalized concentrations.
virtual void getEntropy_R_ref(doublereal *er) const
doublereal molarDensity() const
Molar density (kmol/m^3).
virtual ~electrodeElectron()
Destructor.
void _updateThermo() const
electrodeElectron()
Default constructor for the electrodeElectron class.
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
vector_fp m_s0_R
Dimensionless entropy at the (mtlast, m_p0)
Base class for a phase with thermodynamic properties.
Class StoichSubstanceSSTP represents a stoichiometric (fixed composition) incompressible substance...
bool importPhase(XML_Node &phase, ThermoPhase *th, SpeciesThermoFactory *spfactory)
Import a phase information into an empty thermophase object.
virtual doublereal pressure() const
Report the Pressure. Units: Pa.
electrodeElectron & operator=(const electrodeElectron &right)
Assignment operator.
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
SingleSpeciesTP & operator=(const SingleSpeciesTP &right)
Assignment operator.
virtual void initThermo()
virtual void getParameters(int &n, doublereal *const c) const
Get the equation of state parameters in a vector.
Base class for exceptions thrown by Cantera classes.
virtual int eosType() const
Equation of state flag.
vector_fp m_h0_RT
Dimensionless enthalpy at the (mtlast, m_p0)
vector_fp m_cp0_R
Dimensionless heat capacity at the (mtlast, m_p0)
bool hasChild(const std::string &ch) const
Tests whether the current node has a child node with a particular name.
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
virtual void initThermo()
void setParameters(int n, doublereal *const c)
virtual doublereal refPressure() const
Returns the reference pressure in Pa.
size_t nSpecies() const
Returns the number of species in the phase.
doublereal temperature() const
Temperature (K).
doublereal getFloatDefaultUnits(const Cantera::XML_Node &parent, const std::string &name, const std::string &defaultUnits, const std::string &type)
Get a floating-point value from a child element with a defined units field.
StoichSubstanceSSTP()
Default constructor for the StoichSubstanceSSTP class.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
Header file for the StoichSubstanceSSTP class, which represents a fixed-composition incompressible su...
virtual void getStandardChemPotentials(doublereal *mu0) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
doublereal m_press
The current pressure of the solution (Pa)
virtual void setPressure(doublereal p)
Set the pressure at constant temperature. Units: Pa.
virtual void setParameters(int n, doublereal *const c)
Set the equation of state parameters.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
size_t m_kk
Number of species in the phase.
ThermoPhase * duplMyselfAsThermoPhase() const
Duplication function.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
virtual void setParametersFromXML(const XML_Node &eosdata)
Set equation of state parameter values from XML entries.
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
XML_Node * get_XML_NameID(const std::string &nameTarget, 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 ...
The SingleSpeciesTP class is a filter class for ThermoPhase.
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase Note the density of a phase is an independent...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.