31 neutralMoleculePhase_(0),
40 std::string inputFile, std::string
id) :
42 neutralMoleculePhase_(0),
53 const XML_Node& phaseRoot,
bool spInstalled) :
55 neutralMoleculePhase_(0),
61 throw CanteraError(
"PDSS_IonsFromNeutral",
"sp installing not done yet");
128 throw CanteraError(
"PDSS_IonsFromNeutral::initAllPts",
"Dynamic cast failed");
157 const XML_Node& phaseNode, std::string
id)
161 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSXML",
162 "no thermo Node for species " + speciesNode.
name());
164 std::string model =
lowercase((*tn)[
"model"]);
165 if (model !=
"ionfromneutral") {
166 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSXML",
167 "thermo model for species isn't IonsFromNeutral: "
168 + speciesNode.
name());
172 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSXML",
173 "no Thermo::neutralSpeciesMultipliers Node for species " + speciesNode.
name());
178 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSXML",
"Dynamic cast failed");
182 std::vector<std::string> key;
183 std::vector<std::string> val;
190 for (
size_t i = 0; i <
numMult_; i++) {
230 std::string inputFile, std::string
id)
233 if (inputFile.size() == 0) {
234 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSFile",
235 "input file is null");
238 ifstream fin(path.c_str());
240 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSFile",
"could not open "
241 +path+
" for reading.");
252 throw CanteraError(
"PDSS_IonsFromNeutral::constructPDSSFile",
253 "ERROR: Can not find phase named " +
254 id +
" in file named " + inputFile);
259 &(fxml_phase->
root()));
297 doublereal val = 0.0;
298 for (
size_t i = 0; i <
numMult_; i++) {
332 doublereal val = 0.0;
333 for (
size_t i = 0; i <
numMult_; i++) {
338 val -= 2.0 * log(2.0);
359 doublereal val = 0.0;
360 for (
size_t i = 0; i <
numMult_; i++) {
365 val += 2.0 * log(2.0);
377 doublereal val =
cp_R();
385 doublereal val = 0.0;
386 for (
size_t i = 0; i <
numMult_; i++) {
397 doublereal val = 0.0;
398 for (
size_t i = 0; i <
numMult_; i++) {
418 throw CanteraError(
"PDSS_IonsFromNeutral::cv_mole()",
"unimplemented");
427 doublereal val = 0.0;
428 for (
size_t i = 0; i <
numMult_; i++) {
433 val += 2.0 * log(2.0);
441 doublereal val = 0.0;
442 for (
size_t i = 0; i <
numMult_; i++) {
452 doublereal val = 0.0;
453 for (
size_t i = 0; i <
numMult_; i++) {
458 val -= 2.0 * log(2.0);
466 doublereal val = 0.0;
467 for (
size_t i = 0; i <
numMult_; i++) {
477 doublereal val = 0.0;
478 for (
size_t i = 0; i <
numMult_; i++) {
505 throw CanteraError(
"PDSS_IonsFromNeutral::critTemperature()",
"unimplemented");
512 throw CanteraError(
"PDSS_IonsFromNeutral::critPressure()",
"unimplemented");
519 throw CanteraError(
"PDSS_IonsFromNeutral::critDensity()",
"unimplemented");
558 throw CanteraError(
"PDSS_IonsFromNeutral::satPressure()",
"unimplemented");