18 #include "cantera/thermo/mix_defs.h"
30 IdealSolnGasVPSS::IdealSolnGasVPSS() :
47 XML_Node* xphase =
get_XML_NameID(
"phase", std::string(
"#")+
id, root);
49 throw CanteraError(
"newPhase",
50 "Couldn't find phase named \"" +
id +
"\" in file, " + infile);
117 return cIdealSolnGasVPSS;
119 return cIdealSolnGasVPSS_iscv;
193 double invDens =
dot(vss.begin(), vss.end(), dtmp);
198 double dens = 1.0/invDens;
208 throw CanteraError(
"IdealSolnGasVPSS::isothermalCompressibility() ",
222 for (
size_t k = 0; k <
m_kk; k++) {
227 for (
size_t k = 0; k <
m_kk; k++) {
232 for (
size_t k = 0; k <
m_kk; k++) {
271 double lc = std::log(c);
304 if (eos == cIdealSolnGasPhase0) {
305 for (
int i = 0; i < sizeUA; i++) {
309 for (
int i = 0; i < sizeUA; i++) {
314 uA[1] = -int(
nDim());
338 for (
size_t k = 0; k <
m_kk; k++) {
359 doublereal invRT = 1.0 /
_RT();
360 for (
size_t k = 0; k <
m_kk; k++) {
370 for (
size_t k = 0; k <
m_kk; k++) {
372 mu[k] += rt*(log(xx));
389 for (
size_t k = 0; k <
m_kk; k++) {
391 sbar[k] += r * (- log(xx));
446 doublereal pres = 0.0;
448 for (
size_t k = 0; k <
m_kk; k++) {
449 tmp = -grt[k] + mu_RT[k];
452 }
else if (tmp > 500.0) {
455 m_pp[k] = m_p0 * exp(500.) * tmp2;
457 m_pp[k] = m_p0 * exp(tmp);
498 std::string model = thermoNode[
"model"];
499 if (model ==
"IdealGasVPSS") {
501 }
else if (model ==
"IdealSolnVPSS") {
505 "Unknown thermo model : " + model);
516 if (phaseNode.
hasChild(
"standardConc")) {
519 "standardConc node for ideal gas");
522 string formStringa = scNode.
attrib(
"model");
523 string formString =
lowercase(formStringa);
524 if (formString ==
"unity") {
526 }
else if (formString ==
"molar_volume") {
528 }
else if (formString ==
"solvent_volume") {
532 "Unknown standardConc model: " + formStringa);
537 "Unspecified standardConc model");
547 std::string model = thermoNode[
"model"];
548 if (model ==
"IdealGasVPSS") {
550 }
else if (model ==
"IdealSolnVPSS") {
554 "Unknown thermo model : " + model);