Wells specified with GRUP will be put under group control

immediately.
This commit is contained in:
Kai Bao 2017-03-23 14:37:28 +01:00
parent 2fcb449196
commit d50d21d8e0

View File

@ -1131,6 +1131,7 @@ namespace Opm
// Put the well under group control immediately when GRUP control mdoe is specified
if (injSpec().control_mode_ == InjectionSpecification::GRUP) {
set_current_control(self_index_, group_control_index_, wells_);
individual_control_ = false;
}
} else {
// We will now modify the last control, that
@ -1254,9 +1255,11 @@ namespace Opm
// TODO: basically, one group control index is not enough eventually. There can be more than one sources for the
// group control
group_control_index_ = well_controls_get_num(wells_->ctrls[self_index_]) - 1;
// it should only apply for nodes with GRUP injeciton control
individual_control_ = false;
set_current_control(self_index_, group_control_index_, wells_);
// Put the well under group control immediately when GRUP control mdoe is specified
if (injSpec().control_mode_ == InjectionSpecification::GRUP) {
set_current_control(self_index_, group_control_index_, wells_);
individual_control_ = false;
}
} else {
well_controls_iset_type(wells_->ctrls[self_index_] , group_control_index_ , RESERVOIR_RATE);
well_controls_iset_target(wells_->ctrls[self_index_] , group_control_index_ , ntarget);
@ -1343,6 +1346,7 @@ namespace Opm
// Put the well under group control immediately when GRUP control mdoe is specified
if (prodSpec().control_mode_ == ProductionSpecification::GRUP) {
set_current_control(self_index_, group_control_index_, wells_);
individual_control_ = false;
}
} else {
// We will now modify the last control, that