Changed open / close behaviour of well_controls: 1) well_controls has an explicit open_close flag. 2) Will NOT flip current value to change open|close status
This commit is contained in:
1 parent
37ddb928cf
commit
ae4738f5e7
9 files changed
+59
-33
No files matched your search
@@ -869,17 +869,9 @@ namespace Opm
|
||||
}
|
||||
const int index = it->second;
|
||||
if (line.openshutflag_ == "SHUT") {
|
||||
int cur_ctrl = well_controls_get_current(w_->ctrls[index]);
|
||||
if (cur_ctrl >= 0) {
|
||||
well_controls_invert_current(w_->ctrls[index]);
|
||||
}
|
||||
assert(well_controls_get_current(w_->ctrls[index]) < 0);
|
||||
well_controls_shut_well( w_->ctrls[index] );
|
||||
} else if (line.openshutflag_ == "OPEN") {
|
||||
int cur_ctrl = well_controls_get_current(w_->ctrls[index]);
|
||||
if (cur_ctrl < 0) {
|
||||
well_controls_invert_current(w_->ctrls[index]);
|
||||
}
|
||||
assert(well_controls_get_current(w_->ctrls[index]) >= 0);
|
||||
well_controls_open_well( w_->ctrls[index] );
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Unknown Open/close keyword: \"" << line.openshutflag_<< "\". Allowed values: OPEN, SHUT.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user