Skip to content

Commit

Permalink
Fix PT inputs along critical isobar and critical isotherm; closes #1034
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed May 1, 2016
1 parent 6d62bb7 commit 77637ec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp
Expand Up @@ -1636,6 +1636,18 @@ void HelmholtzEOSMixtureBackend::T_phase_determination_pure_or_pseudopure(int ot
else{
_phase = iphase_supercritical_gas; break;
}
case iP:
{
if (std::abs(_p - _crit.p) < 10*DBL_EPSILON){
_phase = iphase_critical_point; break;
}
else if (_p > _crit.p){
_phase = iphase_supercritical_liquid; break;
}
else{
_phase = iphase_supercritical_gas; break;
}
}
default:
throw ValueError(format("T=Tcrit; invalid input for other to T_phase_determination_pure_or_pseudopure"));
}
Expand Down

0 comments on commit 77637ec

Please sign in to comment.