From d47bf0fbdcf0ac7ffb9690892d18c17a2d4bdfa7 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Fri, 14 Nov 2014 18:41:03 -0500 Subject: [PATCH] Fixed bug with PQ flash always yielding critical point Signed-off-by: Ian Bell --- src/Backends/Helmholtz/FlashRoutines.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Backends/Helmholtz/FlashRoutines.cpp b/src/Backends/Helmholtz/FlashRoutines.cpp index 30926638..e676bdf1 100644 --- a/src/Backends/Helmholtz/FlashRoutines.cpp +++ b/src/Backends/Helmholtz/FlashRoutines.cpp @@ -378,7 +378,7 @@ void FlashRoutines::PQ_flash(HelmholtzEOSMixtureBackend &HEOS) pmin_sat = std::max(pmin_satL, pmin_satV); // Check for being AT the critical point - if (!is_in_closed_range(pmax_sat*(1-1e-10), pmax_sat*(1+1e-10), static_cast(HEOS._p))){ + if (is_in_closed_range(pmax_sat*(1-1e-10), pmax_sat*(1+1e-10), static_cast(HEOS._p))){ // Load the outputs HEOS._phase = iphase_critical_point; HEOS._p = HEOS.p_critical();