41 MetalSHEelectrons& MetalSHEelectrons::operator=(
const MetalSHEelectrons& right)
44 SingleSpeciesTP::operator=(right);
60 "To be removed after Cantera 2.3.");
61 return cMetalSHEelectrons;
119 doublereal tmp = log(
pressure() / m_p0);
126 doublereal tmp = log(
pressure() / m_p0);
152 if (!phaseNode.
hasChild(
"thermo")) {
154 "no thermo XML node");
157 doublereal dens = 2.65E3;
159 dens =
getFloat(tnode,
"density",
"toSI");
168 XML_Node& xv = xtop->addChild(
"validate");
172 XML_Node& xp = xtop->addChild(
"phase");
175 XML_Node& xe = xp.addChild(
"elementArray",
"E");
177 XML_Node& xs = xp.addChild(
"speciesArray",
"she_electron");
178 xs.
addAttribute(
"datasrc",
"#species_Metal_SHEelectrons");
179 XML_Node& xt = xp.addChild(
"thermo");
181 XML_Node& xtr = xp.addChild(
"transport");
183 XML_Node& xk = xp.addChild(
"kinetics");
186 XML_Node& xsd = xtop->addChild(
"speciesData");
189 XML_Node& xsp = xsd.addChild(
"species");
191 xsp.addChild(
"atomArray",
"E:1");
192 xsp.addChild(
"charge",
"-1");
193 XML_Node& xspt = xsp.addChild(
"thermo");
195 XML_Node& xN1 = xspt.addChild(
"NASA");
199 XML_Node& xF1 = xsd.addChild(
"floatArray",
200 "1.172165560E+00, 3.990260375E-03, -9.739075500E-06, " 201 "1.007860470E-08, -3.688058805E-12, -4.589675865E+02, 3.415051190E-01");
205 XML_Node& xN2 = xspt.addChild(
"NASA");
209 XML_Node& xF2 = xsd.addChild(
"floatArray",
210 "1.466432895E+00, 4.133039835E-04, -7.320116750E-08, 7.705017950E-12," 211 "-3.444022160E-16, -4.065327985E+02, -5.121644350E-01");
231 if ( eosdata[
"model"] !=
"MetalSHEelectrons") {
232 throw CanteraError(
"MetalSHEelectrons::setParametersFromXML",
233 "thermo model attribute must be MetalSHEelectrons");
235 doublereal rho = 2.65E3;
237 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)
Base class for a phase with thermodynamic properties.
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.