From 76fa3b080774b60835d233bf3afefcc628840ca4 Mon Sep 17 00:00:00 2001 From: Jeff Henning Date: Fri, 7 Dec 2018 20:42:35 -0500 Subject: [PATCH] Patch PropsSI for INCOMP fluid with zero mass fraction (#1765) --- src/CoolProp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CoolProp.cpp b/src/CoolProp.cpp index a2ea87b8..154e1fe1 100644 --- a/src/CoolProp.cpp +++ b/src/CoolProp.cpp @@ -168,7 +168,8 @@ std::string extract_fractions(const std::string &fluid_string, std::vector 10*DBL_EPSILON) // Only push component if fraction is positive and non-zero + if ((f > 10*DBL_EPSILON) || // Only push component if fraction is positive and non-zero + (pairs.size() == 1)) // ..or if there is only one fluid (i.e. INCOMP backend ) { // And add to vector fractions.push_back(f);