Merge pull request #3164 from totto82/fixNOgrp

honour group available for higher controll
This commit is contained in:
Atgeirr Flø Rasmussen authored and GitHub committed 2021-04-20 11:13:27 +02:00
commit fc8d17c04e
1 file changed
+2 -2
@@ -2594,7 +2594,7 @@ namespace Opm {
for (Phase phase : all) { for (Phase phase : all) {
// Check higher up only if under individual (not FLD) control. // Check higher up only if under individual (not FLD) control.
const Group::InjectionCMode& currentControl = this->wellState().currentInjectionGroupControl(phase, group.name()); const Group::InjectionCMode& currentControl = this->wellState().currentInjectionGroupControl(phase, group.name());
if (currentControl != Group::InjectionCMode::FLD) { if (currentControl != Group::InjectionCMode::FLD && group.injectionGroupControlAvailable(phase)) {
const Group& parentGroup = schedule().getGroup(group.parent(), reportStepIdx); const Group& parentGroup = schedule().getGroup(group.parent(), reportStepIdx);
const std::pair<bool, double> changed = WellGroupHelpers::checkGroupConstraintsInj( const std::pair<bool, double> changed = WellGroupHelpers::checkGroupConstraintsInj(
group.name(), group.name(),
@@ -2628,7 +2628,7 @@ namespace Opm {
} }
// Check higher up only if under individual (not FLD) control. // Check higher up only if under individual (not FLD) control.
const Group::ProductionCMode& currentControl = this->wellState().currentProductionGroupControl(group.name()); const Group::ProductionCMode& currentControl = this->wellState().currentProductionGroupControl(group.name());
if (currentControl != Group::ProductionCMode::FLD) { if (currentControl != Group::ProductionCMode::FLD && group.productionGroupControlAvailable()) {
const Group& parentGroup = schedule().getGroup(group.parent(), reportStepIdx); const Group& parentGroup = schedule().getGroup(group.parent(), reportStepIdx);
const std::pair<bool, double> changed = WellGroupHelpers::checkGroupConstraintsProd( const std::pair<bool, double> changed = WellGroupHelpers::checkGroupConstraintsProd(
group.name(), group.name(),