mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-24 21:38:05 -05:00
Patch PropsSI for INCOMP fluid with zero mass fraction (#1765)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user