/* * @param right Object to be copied */ EdgePhase& EdgePhase::operator=(const EdgePhase & right) { if (&right != this) { SurfPhase::operator=(right); setNDim(1); } return *this; }
SurfPhase::SurfPhase(doublereal n0): ThermoPhase(), m_n0(n0), m_logn0(0.0), m_press(OneAtm) { if (n0 > 0.0) { m_logn0 = log(n0); } setNDim(2); }
SurfPhase::SurfPhase(doublereal n0): ThermoPhase(), m_n0(n0), m_logn0(0.0), m_tmin(0.0), m_tmax(0.0), m_press(OneAtm), m_tlast(0.0) { if (n0 > 0.0) m_logn0 = log(n0); setNDim(2); }
//==================================================================================================================== FixedChemPotSSTP::FixedChemPotSSTP(std::string Ename, doublereal val) : SingleSpeciesTP(), chemPot_(0.0) { std::string pname = Ename + "Fixed"; setID(pname); setName(pname); setNDim(3); addUniqueElement(Ename, -12345.); freezeElements(); vector_fp ecomp(nElements(), 0.0); ecomp[0] = 1.0; double chrg = 0.0; SpeciesThermo* spth = new SimpleThermo(); setSpeciesThermo(spth); addUniqueSpecies(pname, &ecomp[0], chrg, 0.0); double c[4]; c[0] = 298.15; c[1] = val; c[2] = 0.0; c[3] = 0.0; m_spthermo->install(pname, 0, SIMPLE, c, 0.0, 1.0E30, OneAtm); freezeSpecies(); initThermo(); m_p0 = OneAtm; m_tlast = 298.15; setChemicalPotential(val); // Create an XML_Node entry for this species XML_Node* s = new XML_Node("species", 0); s->addAttribute("name", pname); std::string aaS = Ename + ":1"; s->addChild("atomArray", aaS); XML_Node& tt = s->addChild("thermo"); XML_Node& ss = tt.addChild("Simple"); ss.addAttribute("Pref", "1 bar"); ss.addAttribute("Tmax", "5000."); ss.addAttribute("Tmin", "100."); ss.addChild("t0", "298.15"); ss.addChild("cp0", "0.0"); std::string sval = fp2str(val); ss.addChild("h", sval); ss.addChild("s", "0.0"); saveSpeciesData(0, s); delete s; s = 0; }
FixedChemPotSSTP::FixedChemPotSSTP(const std::string& Ename, doublereal val) : chemPot_(0.0) { std::string pname = Ename + "Fixed"; setID(pname); setName(pname); setNDim(3); addElement(Ename); auto sp = make_shared<Species>(pname, parseCompString(Ename + ":1.0")); double c[4] = {298.15, val, 0.0, 0.0}; shared_ptr<SpeciesThermoInterpType> stit( newSpeciesThermoInterpType("const_cp", 0.1, 1e30, OneAtm, c)); sp->thermo = stit; addSpecies(sp); initThermo(); m_p0 = OneAtm; m_tlast = 298.15; setChemicalPotential(val); // Create an XML_Node entry for this species XML_Node s("species", 0); s.addAttribute("name", pname); std::string aaS = Ename + ":1"; s.addChild("atomArray", aaS); XML_Node& tt = s.addChild("thermo"); XML_Node& ss = tt.addChild("Simple"); ss.addAttribute("Pref", "1 bar"); ss.addAttribute("Tmax", "5000."); ss.addAttribute("Tmin", "100."); ss.addChild("t0", "298.15"); ss.addChild("cp0", "0.0"); std::string sval = fp2str(val); ss.addChild("h", sval); ss.addChild("s", "0.0"); saveSpeciesData(0, &s); }
/* * @param right Object to be copied */ EdgePhase::EdgePhase(const EdgePhase & right) : SurfPhase(right.m_n0) { setNDim(1); *this = operator=(right); }
// Default constructor EdgePhase::EdgePhase(doublereal n0) : SurfPhase(n0) { setNDim(1); }
EdgePhase::EdgePhase(const EdgePhase& right) : SurfPhase(right.m_n0) { setNDim(1); *this = right; }