From 4aaf86d5efb3d9e37c99faf99eb17576ca0e2050 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Mon, 28 Jun 2021 08:59:30 +0200 Subject: [PATCH] make sure the current well are included in the local fraction sum --- opm/simulators/wells/WellInterfaceEval.cpp | 4 ++-- opm/simulators/wells/WellInterfaceFluidSystem.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opm/simulators/wells/WellInterfaceEval.cpp b/opm/simulators/wells/WellInterfaceEval.cpp index ad4e0b24b..0d43a29b9 100644 --- a/opm/simulators/wells/WellInterfaceEval.cpp +++ b/opm/simulators/wells/WellInterfaceEval.cpp @@ -143,7 +143,7 @@ getGroupInjectionControl(const Group& group, WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, baseif_.currentStep(), baseif_.guideRate(), tcalc.guideTargetMode(), pu, false, injectionPhase); auto localFraction = [&](const std::string& child) { - return fcalc.localFraction(child, ""); + return fcalc.localFraction(child, child); }; auto localReduction = [&](const std::string& group_name) { @@ -237,7 +237,7 @@ getGroupProductionControl(const Group& group, WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, baseif_.currentStep(), baseif_.guideRate(), tcalc.guideTargetMode(), pu, true, Phase::OIL); auto localFraction = [&](const std::string& child) { - return fcalc.localFraction(child, ""); + return fcalc.localFraction(child, child); }; auto localReduction = [&](const std::string& group_name) { diff --git a/opm/simulators/wells/WellInterfaceFluidSystem.cpp b/opm/simulators/wells/WellInterfaceFluidSystem.cpp index 474cdde96..a41e4a9b1 100644 --- a/opm/simulators/wells/WellInterfaceFluidSystem.cpp +++ b/opm/simulators/wells/WellInterfaceFluidSystem.cpp @@ -998,7 +998,7 @@ getGroupInjectionTargetRate(const Group& group, WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, currentStep(), guideRate(), tcalc.guideTargetMode(), pu, false, injectionPhase); auto localFraction = [&](const std::string& child) { - return fcalc.localFraction(child, ""); + return fcalc.localFraction(child, child); //Note child needs to be passed to always include since the global isGrup map is not updated yet. }; auto localReduction = [&](const std::string& group_name) { @@ -1070,7 +1070,7 @@ getGroupProductionTargetRate(const Group& group, WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, currentStep(), guideRate(), tcalc.guideTargetMode(), pu, true, Phase::OIL); auto localFraction = [&](const std::string& child) { - return fcalc.localFraction(child, ""); + return fcalc.localFraction(child, child); //Note child needs to be passed to always include since the global isGrup map is not updated yet. }; auto localReduction = [&](const std::string& group_name) {