From c3cf59327dda242271275c689654e65c5b19279f Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Thu, 17 Jun 2021 23:56:02 +0200 Subject: [PATCH] scale guiderates from si --- opm/simulators/wells/WellGroupHelpers.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/opm/simulators/wells/WellGroupHelpers.cpp b/opm/simulators/wells/WellGroupHelpers.cpp index b2eac79ca..4cdaaf5c5 100644 --- a/opm/simulators/wells/WellGroupHelpers.cpp +++ b/opm/simulators/wells/WellGroupHelpers.cpp @@ -290,6 +290,9 @@ namespace WellGroupHelpers "Invalid GuideRateInjTarget in updateGuideRatesForInjectionGroups", deferred_logger); } + + const UnitSystem& unit_system = schedule.getUnits(); + guideRateValue = unit_system.from_si(UnitSystem::measure::rate, guideRateValue); guideRate->compute(group.name(), phase, reportStepIdx, guideRateValue); } } @@ -1307,6 +1310,10 @@ namespace WellGroupHelpers oilPot = comm.sum(oilPot); gasPot = comm.sum(gasPot); waterPot = comm.sum(waterPot); + const UnitSystem& unit_system = schedule.getUnits(); + oilPot = unit_system.from_si(UnitSystem::measure::liquid_surface_rate, oilPot); + waterPot = unit_system.from_si(UnitSystem::measure::liquid_surface_rate, waterPot); + gasPot = unit_system.from_si(UnitSystem::measure::gas_surface_rate, gasPot); guideRate->compute(group.name(), reportStepIdx, simTime, oilPot, gasPot, waterPot); } @@ -1344,6 +1351,10 @@ namespace WellGroupHelpers oilpot = comm.sum(oilpot); gaspot = comm.sum(gaspot); waterpot = comm.sum(waterpot); + const UnitSystem& unit_system = schedule.getUnits(); + oilpot = unit_system.from_si(UnitSystem::measure::liquid_surface_rate, oilpot); + waterpot = unit_system.from_si(UnitSystem::measure::liquid_surface_rate, waterpot); + gaspot = unit_system.from_si(UnitSystem::measure::gas_surface_rate, gaspot); guideRate->compute(well.name(), reportStepIdx, simTime, oilpot, gaspot, waterpot); } }