Merge pull request #3389 from totto82/scaleGuideRates

scale guiderates from si
This commit is contained in:
Bård Skaflestad 2021-06-23 16:53:12 +02:00 committed by GitHub
commit c101ed10f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,6 +290,9 @@ namespace WellGroupHelpers
"Invalid GuideRateInjTarget in updateGuideRatesForInjectionGroups", "Invalid GuideRateInjTarget in updateGuideRatesForInjectionGroups",
deferred_logger); deferred_logger);
} }
const UnitSystem& unit_system = schedule.getUnits();
guideRateValue = unit_system.from_si(UnitSystem::measure::rate, guideRateValue);
guideRate->compute(group.name(), phase, reportStepIdx, guideRateValue); guideRate->compute(group.name(), phase, reportStepIdx, guideRateValue);
} }
} }
@ -1383,6 +1386,10 @@ namespace WellGroupHelpers
oilPot = comm.sum(oilPot); oilPot = comm.sum(oilPot);
gasPot = comm.sum(gasPot); gasPot = comm.sum(gasPot);
waterPot = comm.sum(waterPot); 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); guideRate->compute(group.name(), reportStepIdx, simTime, oilPot, gasPot, waterPot);
} }
@ -1420,6 +1427,10 @@ namespace WellGroupHelpers
oilpot = comm.sum(oilpot); oilpot = comm.sum(oilpot);
gaspot = comm.sum(gaspot); gaspot = comm.sum(gaspot);
waterpot = comm.sum(waterpot); 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); guideRate->compute(well.name(), reportStepIdx, simTime, oilpot, gaspot, waterpot);
} }
} }