23 warn_deprecated(
"Class MetalSHEelectrons",
"To be removed after Cantera 2.4");
28 warn_deprecated(
"Class MetalSHEelectrons",
"To be removed after Cantera 2.4");
34 warn_deprecated(
"Class MetalSHEelectrons",
"To be removed after Cantera 2.4");
93 doublereal tmp = log(
pressure() / m_p0);
100 doublereal tmp = log(
pressure() / m_p0);
126 if (!phaseNode.
hasChild(
"thermo")) {
128 "no thermo XML node");
131 doublereal dens = 2.65E3;
133 dens =
getFloat(tnode,
"density",
"toSI");
142 XML_Node& xv = xtop->addChild(
"validate");
146 XML_Node& xp = xtop->addChild(
"phase");
149 XML_Node& xe = xp.addChild(
"elementArray",
"E");
151 XML_Node& xs = xp.addChild(
"speciesArray",
"she_electron");
152 xs.
addAttribute(
"datasrc",
"#species_Metal_SHEelectrons");
153 XML_Node& xt = xp.addChild(
"thermo");
155 XML_Node& xtr = xp.addChild(
"transport");
157 XML_Node& xk = xp.addChild(
"kinetics");
160 XML_Node& xsd = xtop->addChild(
"speciesData");
163 XML_Node& xsp = xsd.addChild(
"species");
165 xsp.addChild(
"atomArray",
"E:1");
166 xsp.addChild(
"charge",
"-1");
167 XML_Node& xspt = xsp.addChild(
"thermo");
169 XML_Node& xN1 = xspt.addChild(
"NASA");
173 XML_Node& xF1 = xsd.addChild(
"floatArray",
174 "1.172165560E+00, 3.990260375E-03, -9.739075500E-06, " 175 "1.007860470E-08, -3.688058805E-12, -4.589675865E+02, 3.415051190E-01");
179 XML_Node& xN2 = xspt.addChild(
"NASA");
183 XML_Node& xF2 = xsd.addChild(
"floatArray",
184 "1.466432895E+00, 4.133039835E-04, -7.320116750E-08, 7.705017950E-12," 185 "-3.444022160E-16, -4.065327985E+02, -5.121644350E-01");
205 if ( eosdata[
"model"] !=
"MetalSHEelectrons") {
206 throw CanteraError(
"MetalSHEelectrons::setParametersFromXML",
207 "thermo model attribute must be MetalSHEelectrons");
209 doublereal rho = 2.65E3;
211 rho =
getFloat(eosdata,
"density",
"toSI");
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
double m_h0_RT
Dimensionless enthalpy at the (mtlast, m_p0)
doublereal temperature() const
Temperature (K).
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
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 doublereal density() const
Density (kg/m^3).
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
double m_cp0_R
Dimensionless heat capacity at the (mtlast, m_p0)
void _updateThermo() const
doublereal molarDensity() const
Molar density (kmol/m^3).
Base class for exceptions thrown by Cantera classes.
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
void addAttribute(const std::string &attrib, const std::string &value)
Add or modify an attribute of the current node.
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.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
doublereal m_press
The current pressure of the solution (Pa). It gets initialized to 1 atm.
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
virtual void initThermoFile(const std::string &inputFile, const std::string &id)
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Namespace for the Cantera kernel.
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase.