use common WellGroupEvent map

This commit is contained in:
Tor Harald Sandve 2019-11-27 08:59:29 +01:00
parent 49b5883ff7
commit cab2f4b41f
4 changed files with 5 additions and 5 deletions

View File

@ -276,7 +276,7 @@ namespace Opm {
+ ScheduleEvents::INJECTION_UPDATE
+ ScheduleEvents::NEW_WELL;
if(!schedule().hasWellEvent(well.name(), effective_events_mask, timeStepIdx))
if(!schedule().hasWellGroupEvent(well_name, effective_events_mask, timeStepIdx))
continue;
if (well.isProducer()) {

View File

@ -707,7 +707,7 @@ namespace Opm
const auto& fs = intQuants.fluidState();
Eval perf_pressure = getPerfCellPressure(fs);
const double drawdown = well_state.perfPress()[first_perf_ + perf] - perf_pressure.value();
const bool new_well = schedule.hasWellEvent(name(), ScheduleEvents::NEW_WELL, current_step_);
const bool new_well = schedule.hasWellGroupEvent(name(), ScheduleEvents::NEW_WELL, current_step_);
double productivity_index = cq_s[compIdx].value() / drawdown;
scaleProductivityIndex(perf, productivity_index, new_well, deferred_logger);
well_state.productivityIndex()[np*index_of_well_ + p] += productivity_index;

View File

@ -43,12 +43,12 @@ namespace Opm {
wellState.setCurrentProductionGroupControl(group.name(), Group::ProductionCMode::NONE);
}
if (group.isInjectionGroup() && schedule.hasGroupEvent(group.name(), ScheduleEvents::GROUP_INJECTION_UPDATE, reportStepIdx)) {
if (group.isInjectionGroup() && schedule.hasWellGroupEvent(group.name(), ScheduleEvents::GROUP_INJECTION_UPDATE, reportStepIdx)) {
const auto controls = group.injectionControls(summaryState);
wellState.setCurrentInjectionGroupControl(group.name(), controls.cmode);
}
if (group.isProductionGroup() && schedule.hasGroupEvent(group.name(), ScheduleEvents::GROUP_PRODUCTION_UPDATE, reportStepIdx)) {
if (group.isProductionGroup() && schedule.hasWellGroupEvent(group.name(), ScheduleEvents::GROUP_PRODUCTION_UPDATE, reportStepIdx)) {
const auto controls = group.productionControls(summaryState);
wellState.setCurrentProductionGroupControl(group.name(), controls.cmode);
}

View File

@ -109,7 +109,7 @@ namespace Opm
+ ScheduleEvents::INJECTION_UPDATE;
for (int w = 0; w < nw; ++w) {
effective_events_occurred_[w]
= schedule.hasWellEvent(wells_ecl[w].name(), effective_events_mask, report_step);
= schedule.hasWellGroupEvent(wells_ecl[w].name(), effective_events_mask, report_step);
}
} // end of if (!well_ecl.empty() )