using the first cell of the well to initialize bhp

instead of using the the first cell of all the wells in
WellStateMultiSegment
This commit is contained in:
Kai Bao
2015-10-08 13:12:18 +02:00
parent 9b5b5198b2
commit 70e1ccb736

View File

@@ -196,7 +196,7 @@ namespace Opm
if (well_controls_get_current_type(ctrl) == BHP) {
bhp_[w] = well_controls_get_current_target(ctrl);
} else {
const int first_cell = wells[0]->wellCells()[0];
const int first_cell = wells[w]->wellCells()[0];
const double safety_factor = (wells[w]->wellType() == INJECTOR) ? 1.01 : 0.99;
bhp_[w] = safety_factor* state.pressure()[first_cell];
}