Manage GConSale and GConSump with ScheduleState object

This commit is contained in:
Joakim Hove
2021-01-12 18:29:59 +01:00
parent 6ca2d2c9e6
commit b32f3f7546
3 changed files with 11 additions and 9 deletions

View File

@@ -2288,7 +2288,7 @@ namespace Opm
// Gas injection rate = Total gas production rate + gas import rate - gas consumption rate - sales rate;
// The import and consumption is already included in the REIN rates.
double inj_rate = well_state.currentInjectionREINRates(group.name())[phasePos];
const auto& gconsale = schedule.gConSale(current_step_).get(group.name(), summaryState);
const auto& gconsale = schedule[current_step_].gconsale().get(group.name(), summaryState);
inj_rate -= gconsale.sales_target;
double target = std::max(0.0, (inj_rate - groupTargetReduction)) / efficiencyFactor;