Relax the PT tolerance again for two-phase

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-12-02 12:17:45 -05:00
parent 8168104a21
commit 1c7512a318
2 changed files with 7 additions and 7 deletions

View File

@@ -1368,14 +1368,14 @@ void HelmholtzEOSMixtureBackend::T_phase_determination_pure_or_pseudopure(int ot
if (other == iP)
{
if (value > HEOS.SatL->p()*(1e-10 + 1)){
if (value > HEOS.SatL->p()*(1e-8 + 1)){
this->_phase = iphase_liquid; _Q = -1000; return;
}
else if (value < HEOS.SatV->p()*(1 - 1e-10)){
else if (value < HEOS.SatV->p()*(1 - 1e-8)){
this->_phase = iphase_gas; _Q = 1000; return;
}
else{
throw ValueError(format("Saturation pressure [%g Pa] corresponding to T [%g K] is within 1e-8 %% of given p [%Lg Pa]", HEOS.SatL->p(), _T, value));
throw ValueError(format("Saturation pressure [%g Pa] corresponding to T [%g K] is within 1e-6 %% of given p [%Lg Pa]", HEOS.SatL->p(), _T, value));
}
}