29 IdealSolidSolnPhase::IdealSolidSolnPhase(
int formGC) :
39 if (formGC < 0 || formGC > 2) {
41 " Illegal value of formGC");
56 if (formGC < 0 || formGC > 2) {
58 " Illegal value of formGC");
74 if (formGC < 0 || formGC > 2) {
76 " Illegal value of formGC");
134 res = cIdealSolidSolnPhase0;
137 res = cIdealSolidSolnPhase1;
140 res = cIdealSolidSolnPhase2;
232 doublereal g =
mean_X(dptr);
292 double dens = 1.0/invDens;
324 "Density is not an independent variable");
359 throw CanteraError(
"IdealSolidSolnPhase::setMolarDensity",
360 "Density is not an independent variable");
477 for (
size_t k = 0; k <
m_kk; k++) {
478 c[k] = dtmp[k] * mmw;
482 for (
size_t k = 0; k <
m_kk; k++) {
488 for (
size_t k = 0; k <
m_kk; k++) {
489 c[k] = dtmp[k] * atmp;
601 if (eos == cIdealSolidSolnPhase0) {
602 for (
int i = 0; i < sizeUA; i++) {
606 for (
int i = 0; i < sizeUA; i++) {
611 uA[1] = -int(
nDim());
636 for (
size_t k = 0; k <
m_kk; k++) {
664 for (
size_t k = 0; k <
m_kk; k++) {
666 mu[k] = RT * (g_RT[k] + log(xx))
695 for (
size_t k = 0; k <
m_kk; k++) {
697 mu[k] = (g_RT[k] + log(xx))
725 scale(_h.begin(), _h.end(), hbar, rt);
751 for (
size_t k = 0; k <
m_kk; k++) {
753 sbar[k] = r * (_s[k] - log(xx));
769 for (
size_t k = 0; k <
m_kk; k++) {
814 doublereal RT =
_RT();
815 const doublereal*
const gk =
DATA_PTR(gibbsrt);
817 for (
size_t k = 0; k <
m_kk; k++) {
841 doublereal RT =
_RT();
842 const doublereal*
const gk =
DATA_PTR(gibbsrt);
844 for (
size_t k = 0; k <
m_kk; k++) {
870 for (
size_t k = 0; k <
m_kk; k++) {
890 copy(_s.begin(), _s.end(), sr);
909 for (
size_t k = 0; k <
m_kk; k++) {
933 copy(_cpr.begin(), _cpr.end(), cpr);
961 for (
size_t k = 0; k !=
m_kk; k++) {
975 for (
size_t k = 0; k !=
m_kk; k++) {
990 for (
size_t k = 0; k !=
m_kk; k++) {
1005 for (
size_t k = 0; k <
m_kk; k++) {
1019 for (
size_t k = 0; k !=
m_kk; k++) {
1033 for (
size_t k = 0; k !=
m_kk; k++) {
1061 for (
size_t k = 0; k !=
m_kk; k++) {
1120 string subname =
"IdealSolidSolnPhase::constructPhaseXML";
1121 if (
id.
size() > 0) {
1122 string idp = phaseNode.
id();
1125 "phasenode and Id are incompatible");
1133 if (phaseNode.
hasChild(
"thermo")) {
1135 string mStringa = thNode.
attrib(
"model");
1137 if (mString !=
"idealsolidsolution") {
1139 "Unknown thermo model: " + mStringa);
1143 "Unspecified thermo model");
1153 if (phaseNode.
hasChild(
"standardConc")) {
1155 string formStringa = scNode.
attrib(
"model");
1156 string formString =
lowercase(formStringa);
1157 if (formString ==
"unity") {
1159 }
else if (formString ==
"molar_volume") {
1161 }
else if (formString ==
"solvent_volume") {
1165 "Unknown standardConc model: " + formStringa);
1169 "Unspecified standardConc model");
1174 throw CanteraError(subname.c_str(),
"importPhase failed ");
1195 if (inputFile.size() == 0) {
1196 throw CanteraError(
"IdealSolidSolnPhase::constructPhaseFile",
1197 "input file is null");
1200 ifstream fin(path.c_str());
1202 throw CanteraError(
"IdealSolidSolnPhase::constructPhaseFile",
"could not open "
1203 +path+
" for reading.");
1214 throw CanteraError(
"IdealSolidSolnPhase::constructPhaseFile",
1215 "ERROR: Can not find phase named " +
1216 id +
" in file named " + inputFile);
1218 fxml_phase->
copy(&phaseNode_XML);
1252 string subname =
"IdealSolidSolnPhase::initThermoXML";
1257 if (phaseNode.
hasChild(
"thermo")) {
1259 string mStringa = thNode.
attrib(
"model");
1261 if (mString !=
"idealsolidsolution") {
1263 "Unknown thermo model: " + mStringa);
1267 "Unspecified thermo model");
1277 if (phaseNode.
hasChild(
"standardConc")) {
1279 string formStringa = scNode.
attrib(
"model");
1280 string formString =
lowercase(formStringa);
1281 if (formString ==
"unity") {
1283 }
else if (formString ==
"molar_volume") {
1285 }
else if (formString ==
"solvent_volume") {
1289 "Unknown standardConc model: " + formStringa);
1292 throw CanteraError(subname.c_str(),
"Unspecified standardConc model");
1308 for (
size_t k = 0; k <
m_kk; k++) {
1376 doublereal pres = 0.0;
1377 for (
size_t k = 0; k <
m_kk; k++) {
1379 for (
size_t m = 0; m <
m_mm; m++) {
1440 for (
size_t k = 0; k <
m_kk; k++) {
1441 deltaE = rrt *
m_pe[k];