diff --git a/include/teqp/models/multifluid_reducing.hpp b/include/teqp/models/multifluid_reducing.hpp index f2abcc59..a7f64b38 100644 --- a/include/teqp/models/multifluid_reducing.hpp +++ b/include/teqp/models/multifluid_reducing.hpp @@ -77,7 +77,7 @@ namespace teqp { auto [el, swap_needed] = get_BIPdep(collection, identifiers, flags); double betaT, gammaT, betaV, gammaV; - if (el.contains("betaT") && el.contains("gammaT") && el.contains("betaV") & el.contains("gammaV")) { + if (el.contains("betaT") && el.contains("gammaT") && el.contains("betaV") && el.contains("gammaV")) { betaT = el["betaT"]; gammaT = el["gammaT"]; betaV = el["betaV"]; gammaV = el["gammaV"]; // Backwards order of components, flip beta values if (swap_needed) { @@ -281,4 +281,4 @@ namespace teqp { using ReducingFunctions = ReducingTermContainer; -}; // namespace teqp \ No newline at end of file +}; // namespace teqp diff --git a/include/teqp/models/saft/polar_terms.hpp b/include/teqp/models/saft/polar_terms.hpp index c91a7170..237fc6df 100644 --- a/include/teqp/models/saft/polar_terms.hpp +++ b/include/teqp/models/saft/polar_terms.hpp @@ -726,6 +726,9 @@ class MultipolarContributionGubbinsTwu { // The packing fraction is defined by eta = pi/6*rho^*, so use the (temperature-dependent) eta to obtain rho^* rhostar = forceeval(packing_fraction/(static_cast(EIGEN_PI)/6.0)); } + else{ + throw teqp::InvalidArgument("The method used to determine rho^* is invalid"); + } return rhostar; }