23 using namespace Cantera;
35 MetalSHEelectrons::MetalSHEelectrons():
53 if (infile ==
"MetalSHEelectrons_default.xml") {
64 throw CanteraError(
"MetalSHEelectrons::MetalSHEelectrons",
65 "Couldn't find phase name in file:" +
id);
69 std::string model = th[
"model"];
70 if (model !=
"MetalSHEelectrons") {
71 throw CanteraError(
"MetalSHEelectrons::MetalSHEelectrons",
72 "thermo model attribute must be MetalSHEelectrons");
87 std::string idxml = xmlphase[
"id"];
89 throw CanteraError(
"MetalSHEelectrons::MetalSHEelectrons",
94 std::string model = th[
"model"];
95 if (model !=
"MetalSHEelectrons") {
96 throw CanteraError(
"MetalSHEelectrons::MetalSHEelectrons",
97 "thermo model attribute must be MetalSHEelectrons");
130 if (&right !=
this) {
167 return cMetalSHEelectrons;
289 for (
int i = 0; i < 6; i++) {
446 if (!phaseNode.
hasChild(
"thermo")) {
448 "no thermo XML node");
451 doublereal dens = 2.65E3;
462 XML_Node& xv = xtop->addChild(
"validate");
466 XML_Node& xp = xtop->addChild(
"phase");
469 XML_Node& xe = xp.addChild(
"elementArray",
"E");
471 XML_Node& xs = xp.addChild(
"speciesArray",
"she_electron");
472 xs.
addAttribute(
"datasrc",
"#species_Metal_SHEelectrons");
473 XML_Node& xt = xp.addChild(
"thermo");
475 XML_Node& xtr = xp.addChild(
"transport");
477 XML_Node& xk = xp.addChild(
"kinetics");
480 XML_Node& xsd = xtop->addChild(
"speciesData");
483 XML_Node& xsp = xsd.addChild(
"species");
485 xsp.addChild(
"atomArray",
"E:1");
486 xsp.addChild(
"charge",
"-1");
487 XML_Node& xspt = xsp.addChild(
"thermo");
489 XML_Node& xN1 = xspt.addChild(
"NASA");
493 XML_Node& xF1 = xsd.addChild(
"floatArray",
494 "1.172165560E+00, 3.990260375E-03, -9.739075500E-06, "
495 "1.007860470E-08, -3.688058805E-12, -4.589675865E+02, 3.415051190E-01");
499 XML_Node& xN2 = xspt.addChild(
"NASA");
503 XML_Node& xF2 = xsd.addChild(
"floatArray",
504 "1.466432895E+00, 4.133039835E-04, -7.320116750E-08, 7.705017950E-12,"
505 "-3.444022160E-16, -4.065327985E+02, -5.121644350E-01");
521 doublereal rho = c[0];
553 std::string model = eosdata[
"model"];
554 if (model !=
"MetalSHEelectrons") {
555 throw CanteraError(
"MetalSHEelectrons::setParametersFromXML",
556 "thermo model attribute must be MetalSHEelectrons");
558 doublereal rho = 2.65E3;