35 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
36 "Couldn't find phase name in file:" + id_);
39 std::string model = xphase->
child(
"thermo")[
"model"];
40 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
41 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
42 "thermo model attribute must be StoichSubstance");
49 if (id_ !=
"" && id_ != xmlphase[
"id"]) {
50 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
53 std::string model = xmlphase.
child(
"thermo")[
"model"];
54 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
55 throw CanteraError(
"StoichSubstanceSSTP::StoichSubstanceSSTP",
56 "thermo model attribute must be StoichSubstance");
86 return cStoichSubstance;
135 "To be removed after Cantera 2.2.");
136 for (
int i = 0; i < 6; i++) {
202 "stoichiometric substances may only contain one species.");
227 if (!phaseNode.
hasChild(
"thermo")) {
228 throw CanteraError(
"StoichSubstanceSSTP::initThermoXML",
229 "no thermo XML node");
250 std::string model = eosdata[
"model"];
251 if (model !=
"StoichSubstance" && model !=
"StoichSubstanceSSTP") {
252 throw CanteraError(
"StoichSubstanceSSTP::setParametersFromXML",
253 "thermo model attribute must be StoichSubstance");
264 "To be removed after Cantera 2.2.");
276 throw CanteraError(
"electrodeElectron::electrodeElectron",
277 "Couldn't find phase name in file:" + id_);
280 if (xphase->
child(
"thermo")[
"model"] !=
"electrodeElectron") {
281 throw CanteraError(
"electrodeElectron::electrodeElectron",
282 "thermo model attribute must be electrodeElectron");
290 if (id_ !=
"" && id_ != xmlphase[
"id"]) {
291 throw CanteraError(
"electrodeElectron::electrodeElectron",
294 if (xmlphase.
child(
"thermo")[
"model"] !=
"electrodeElectron") {
295 throw CanteraError(
"electrodeElectron::electrodeElectron",
296 "thermo model attribute must be electrodeElectron");
310 if (&right !=
this) {
318 if (eosdata[
"model"] !=
"electrodeElectron") {
319 throw CanteraError(
"electrodeElectron::setParametersFromXML",
320 "thermo model attribute must be electrodeElectron");
326 doublereal rho = 10.0;
333 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.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
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.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
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).
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)
Set the equation of state parameters.
virtual doublereal refPressure() const
Returns the reference pressure in Pa.
doublereal temperature() const
Temperature (K).
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...
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
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)
doublereal getFloatDefaultUnits(const 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.
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 ...
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.