update solution for WAG injectors

This commit is contained in:
Tor Harald Sandve
2021-03-09 13:37:03 +01:00
parent a098d76c19
commit 858856adec
2 changed files with 4 additions and 3 deletions

View File

@@ -383,10 +383,11 @@ namespace Opm {
const auto& comm = ebosSimulator_.vanguard().grid().comm(); const auto& comm = ebosSimulator_.vanguard().grid().comm();
WellGroupHelpers::updateGuideRatesForWells(schedule(), phase_usage_, reportStepIdx, simulationTime, well_state_, comm, guideRate_.get()); WellGroupHelpers::updateGuideRatesForWells(schedule(), phase_usage_, reportStepIdx, simulationTime, well_state_, comm, guideRate_.get());
try { try {
// Compute initial well solution for new wells // Compute initial well solution for new wells and injectors that change injection type i.e. WAG.
for (auto& well : well_container_) { for (auto& well : well_container_) {
const uint64_t effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE const uint64_t effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE
+ ScheduleEvents::NEW_WELL; + ScheduleEvents::INJECTION_TYPE_CHANGED
+ ScheduleEvents::NEW_WELL;
const auto& events = schedule()[reportStepIdx].wellgroup_events(); const auto& events = schedule()[reportStepIdx].wellgroup_events();
const bool event = report_step_starts_ && events.hasEvent(well->name(), effective_events_mask); const bool event = report_step_starts_ && events.hasEvent(well->name(), effective_events_mask);

View File

@@ -207,7 +207,7 @@ namespace Opm
} }
if (is_producer_[newIndex] != prevState->is_producer_[oldIndex]) { if (is_producer_[newIndex] != prevState->is_producer_[oldIndex]) {
// Well changed from injector from/to producer, do not use its privious values. // Well changed to/from injector from/to producer, do not use its privious values.
continue; continue;
} }