Initialize rate-controlled well bhp with safety factor.

Safety factor is 1.01 (INJECTOR) or 0.99 (PRODUCER), similar to
mrst's ad-fi/utils/initWellSolLocal.m > initialize().
This commit is contained in:
Atgeirr Flø Rasmussen 2013-05-30 11:03:08 +02:00
parent 8f722702c6
commit 31dd4f707c

View File

@ -46,7 +46,8 @@ namespace Opm
if ((ctrl->current < 0) || // SHUT
(ctrl->type[ctrl->current] != BHP)) {
const int cell = wells->well_cells[wells->well_connpos[w]];
bhp_[w] = state.pressure()[cell];
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
bhp_[w] = safety_factor*state.pressure()[cell];
}
else {
bhp_[w] = ctrl->target[ctrl->current];