Merge pull request #3288 from joakim-hove/actionx-event

Make sure well potentials are recalculated for ACTIONX wells
This commit is contained in:
Joakim Hove 2021-05-22 19:09:00 +02:00 committed by GitHub
commit da94a16d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1589,7 +1589,7 @@ namespace Opm {
+ ScheduleEvents::PRODUCTION_UPDATE
+ ScheduleEvents::INJECTION_UPDATE;
const auto& events = schedule()[reportStepIdx].wellgroup_events();
const bool event = report_step_starts_ && events.hasEvent(well->name(), effective_events_mask);
const bool event = events.hasEvent(well->name(), ScheduleEvents::ACTIONX_WELL_EVENT) || (report_step_starts_ && events.hasEvent(well->name(), effective_events_mask));
const bool needPotentialsForGuideRates = well->underPredictionMode() && (!onlyAfterEvent || event);
const bool needPotentialsForOutput = !onlyAfterEvent && (needed_for_summary || write_restart_file);
const bool compute_potential = needPotentialsForOutput || needPotentialsForGuideRates;