mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -51,8 +51,7 @@ namespace Opm
|
||||
// above or below (depending on if the well is an
|
||||
// injector or producer) pressure in first perforation
|
||||
// cell.
|
||||
if ((well_controls_get_current(ctrl) < 0) || // SHUT
|
||||
(well_controls_get_current_type(ctrl) != BHP)) {
|
||||
if (well_controls_well_is_shut(ctrl) || (well_controls_get_current_type(ctrl) != BHP)) {
|
||||
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
||||
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
|
||||
bhp_[w] = safety_factor*state.pressure()[first_cell];
|
||||
@@ -61,8 +60,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
// Initialize well rates to match controls if type is SURFACE_RATE
|
||||
if ((well_controls_get_current(ctrl) >= 0) && // open well
|
||||
(well_controls_get_current_type(ctrl) == SURFACE_RATE)) {
|
||||
if (well_controls_well_is_open( ctrl ) || (well_controls_get_current_type(ctrl) == SURFACE_RATE)) {
|
||||
const double rate_target = well_controls_get_current_target(ctrl);
|
||||
const double * distr = well_controls_get_current_distr( ctrl );
|
||||
for (int p = 0; p < np; ++p) {
|
||||
|
||||
Reference in New Issue
Block a user