not using too small d = 1. - rs*rv in StandardWellConnections

too small denominator can cause small volrat and too big density.
This commit is contained in:
Kai Bao committed 2025-05-02 09:15:01 +02:00
1 parent ca92b6906c
commit c777c42b31
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)",