From 780a0cffbc5f9e53b5478e58456ee284a665841e Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 14 Nov 2023 14:07:30 +0100 Subject: [PATCH] Support connection D factor If positive the D factor is threated a well D factor If negative it is threated as a connction D factor (no scaling) --- src/opm/input/eclipse/Schedule/Well/WDFAC.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/opm/input/eclipse/Schedule/Well/WDFAC.cpp b/src/opm/input/eclipse/Schedule/Well/WDFAC.cpp index 45adea47c..04ad337e8 100644 --- a/src/opm/input/eclipse/Schedule/Well/WDFAC.cpp +++ b/src/opm/input/eclipse/Schedule/Well/WDFAC.cpp @@ -73,10 +73,12 @@ namespace Opm { const auto non_trivial_dfactor = std::any_of(connections.begin(), connections.end(), - [](const auto& conn) { return conn.dFactor() > 0.0; }); + [](const auto& conn) { return conn.dFactor() != 0.0; }); - if (non_trivial_dfactor) + // non-trivial dfactors detected use connection D factors + if (non_trivial_dfactor) { m_type = WDFACTYPE::CON_DFACTOR; + } }