/* * setMolalitiesByNames() * * Set the molalities of the solutes by name */ void MolalityVPSSTP::setMolalitiesByName(const std::string& x) { compositionMap xx; for (size_t k = 0; k < nSpecies(); k++) { xx[speciesName(k)] = -1.0; } parseCompString(x, xx); setMolalitiesByName(xx); }
/* * Set the thermodynamic state. */ void MolalityVPSSTP::setStateFromXML(const XML_Node& state) { VPStandardStateTP::setStateFromXML(state); string comp = ctml::getChildValue(state,"soluteMolalities"); if (comp != "") { setMolalitiesByName(comp); } if (state.hasChild("pressure")) { double p = ctml::getFloat(state, "pressure", "pressure"); setPressure(p); } }
/* * Set the temperature (K), pressure (Pa), and molality. */ void MolalityVPSSTP::setState_TPM(doublereal t, doublereal p, const std::string& m) { setMolalitiesByName(m); setState_TP(t, p); }
/* * Set the temperature (K), pressure (Pa), and molalities. */ void MolalityVPSSTP::setState_TPM(doublereal t, doublereal p, compositionMap& m) { setMolalitiesByName(m); setState_TP(t, p); }
void MolalityVPSSTP::setMolalitiesByName(const std::string& x) { compositionMap xx = parseCompString(x, speciesNames()); setMolalitiesByName(xx); }