16 #include "cantera/thermo/mix_defs.h"
37 MineralEQ3::MineralEQ3():
59 "Couldn't find phase name in file:" +
id);
63 std::string model = th[
"model"];
64 if (model !=
"StoichSubstance" && model !=
"MineralEQ3") {
66 "thermo model attribute must be StoichSubstance");
80 std::string idxml = xmlphase[
"id"];
87 std::string model = th[
"model"];
88 if (model !=
"StoichSubstance" && model !=
"MineralEQ3") {
90 "thermo model attribute must be StoichSubstance");
112 if (&right ==
this) {
161 return cStoichSubstance;
281 for (
int i = 0; i < 6; i++) {
328 hrt[0] += presCorrect / RT;
444 doublereal rho = c[0];
487 if (!phaseNode.
hasChild(
"thermo")) {
489 "no thermo XML node");
492 std::vector<const XML_Node*> xspecies =
speciesData();
496 if (xsp->
hasChild(
"standardState")) {
497 aStandardState = &xsp->
child(
"standardState");
500 "no standard state mode");
502 doublereal volVal = 0.0;
503 string smodel = (*aStandardState)[
"model"];
504 if (smodel !=
"constantVolume") {
506 "wrong standard state mode");
508 if (aStandardState->
hasChild(
"V0_Pr_Tr")) {
511 double Afactor =
toSI(
"cm3/gmol");
513 Aunits = aV.
attrib(
"units");
514 Afactor =
toSI(Aunits);
522 "wrong standard state mode");
541 convertDGFormation();
548 std::string model = eosdata[
"model"];
549 if (model !=
"MineralEQ3") {
551 "thermo model attribute must be MineralEQ3");
555 doublereal MineralEQ3::LookupGe(
const std::string& elemName)
559 throw CanteraError(
"PDSS_HKFT::LookupGe",
"element " + elemName +
" not found");
563 throw CanteraError(
"PDSS_HKFT::LookupGe",
564 "element " + elemName +
" doesn not have a supplied entropy298");
566 geValue *= (-298.15);
570 void MineralEQ3::convertDGFormation()
579 doublereal totalSum = 0.0;
580 for (
size_t m = 0; m <
nElements(); m++) {
584 ge = LookupGe(ename);