Patch PropsSI for INCOMP fluid with zero mass fraction (#1765)

This commit is contained in:
Jeff Henning
2018-12-07 20:42:35 -05:00
committed by GitHub
parent 45882c6bce
commit 76fa3b0807

View File

@@ -168,7 +168,8 @@ std::string extract_fractions(const std::string &fluid_string, std::vector<doubl
throw ValueError(format("fraction [%s] was not converted to a value between 0 and 1 inclusive", fraction.c_str()));
}
if (f > 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);