Add warning about T > Tmax for HS inputs; closes #1181

This commit is contained in:
Ian Bell
2016-08-14 14:49:35 -06:00
parent 12fea271d9
commit 52c553eadd

View File

@@ -1897,6 +1897,9 @@ void FlashRoutines::HS_flash(HelmholtzEOSMixtureBackend &HEOS)
}
}
while(!good_Tmax);
if (rmin*rmax > 0 && std::abs(rmax) < std::abs(rmin)){
throw CoolProp::ValueError(format("HS inputs correspond to temperature above maximum temperature of EOS [%g K]",HEOS.Tmax()));
}
Brent(resid, Tmin, Tmax, DBL_EPSILON, 1e-10, 100);
}