diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index fd1cebd1b..12399fdf3 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -708,11 +708,13 @@ doublereal MixtureFugacityTP::calculatePsat(doublereal TKelvin, doublereal& mola } } if (!foundGas || !foundLiquid) { - writelog("error couldn't find a starting pressure\n"); + warn_user("MixtureFugacityTP::calculatePsat", + "could not find a starting pressure; exiting."); return 0.0; } if (presGas != presLiquid) { - writelog("error couldn't find a starting pressure\n"); + warn_user("MixtureFugacityTP::calculatePsat", + "could not find a starting pressure; exiting"); return 0.0; } diff --git a/src/thermo/PDSS_HKFT.cpp b/src/thermo/PDSS_HKFT.cpp index 475ee36c4..e724590ee 100644 --- a/src/thermo/PDSS_HKFT.cpp +++ b/src/thermo/PDSS_HKFT.cpp @@ -314,10 +314,11 @@ void PDSS_HKFT::initThermo() " not consistent with G and S: {} vs {} cal gmol-1", sname, Hcalc/toSI("cal/gmol"), m_deltaH_formation_tr_pr); } else { - writelog("PDSS_HKFT::initThermo() WARNING: DHjmol for {} is not" - " consistent with G and S: calculated {} vs input {} cal gmol-1", - sname, Hcalc/toSI("cal/gmol"), m_deltaH_formation_tr_pr); - writelog(" : continuing with consistent DHjmol = {}", Hcalc/toSI("cal/gmol")); + warn_user("PDSS_HKFT::initThermo()", + "DHjmol for {} is not consistent with G and S: calculated {} " + "vs input {} cal gmol-1; continuing with consistent DHjmol = {}", + sname, Hcalc/toSI("cal/gmol"), m_deltaH_formation_tr_pr, + Hcalc/toSI("cal/gmol")); m_deltaH_formation_tr_pr = Hcalc / toSI("cal/gmol"); } } diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index d79fc3334..6368f435a 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -1289,9 +1289,9 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do if (fabs(tmp) > 1.0E-4) { for (int j = 0; j < 3; j++) { if (j != i && fabs(Vroot[i] - Vroot[j]) < 1.0E-4 * (fabs(Vroot[i]) + fabs(Vroot[j]))) { - writelog("RedlichKwongMFTP::NicholsSolve(T = {}, p = {}):" - " WARNING roots have merged: {}, {}\n", - TKelvin, pres, Vroot[i], Vroot[j]); + warn_user("RedlichKwongMFTP::NicholsSolve", + "roots have merged: {}, {} (T = {}, p = {})", + Vroot[i], Vroot[j], TKelvin, pres); } } } @@ -1349,9 +1349,9 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do } } if ((fabs(res) > 1.0E-14) && (fabs(res) > 1.0E-14 * fabs(dresdV) * fabs(Vroot[i]))) { - writelog("RedlichKwongMFTP::NicholsSolve(T = {}, p = {}): " - "WARNING root didn't converge V = {}", TKelvin, pres, Vroot[i]); - writelogendl(); + warn_user("RedlichKwongMFTP::NicholsSolve", + "root did not converge: V = {} (T = {}, p = {})", + Vroot[i], TKelvin, pres); } }