Merge pull request #6227 from GitPaean/phaseMixtureCompMixture3

avoid to use too small d = 1. - rs * rv.
This commit is contained in:
Atgeirr Flø Rasmussen authored and GitHub committed 2025-05-05 11:36:28 +02:00
commit d4f548745b
1 file changed
+4 -2
@@ -85,7 +85,8 @@ namespace {
}
const Scalar denom = Scalar{1} - rs*rv;
if (! (denom > Scalar{0})) {
// too small denominator can cause small volrat and too big density
if (! (denom > threshold)) {
const auto msg = fmt::format(R"(Problematic denominator value {} for well {}.
Connection density calculation with (Rs, Rv) = ({}, {}).
Proceeding as if no dissolution or vaporisation for this connection)",
@@ -131,7 +132,8 @@ namespace {
}
const Scalar d = Scalar{1} - rsw*rvw;
if (! (d > Scalar{0})) {
// too small denominator can cause small volrat and too big density
if (! (d > threshold)) {
const auto msg = fmt::format(R"(Problematic denominator value {} for well {}.
Connection density calculation with (Rsw, Rvw) = ({}, {}).
Proceeding as if no dissolution or vaporisation for this connection)",