Ensures well rate initialization actually happens.

Do not use the well's comp_frac member, only rely on the control's distr
member for initialization. This forced a change to WellsManager's
initialization of the distr member.
This commit is contained in:
Atgeirr Flø Rasmussen
2013-06-02 23:30:43 +02:00
parent 175cecacda
commit 5d457ff708
2 changed files with 24 additions and 5 deletions

View File

@@ -60,11 +60,10 @@ namespace Opm
}
// Initialize well rates to match controls if type is SURFACE_RATE
if ((ctrl->current >= 0) && // open well
(ctrl->type[ctrl->current] != SURFACE_RATE)) {
(ctrl->type[ctrl->current] == SURFACE_RATE)) {
const double rate_target = ctrl->target[ctrl->current];
for (int p = 0; p < np; ++p) {
const double phase_distr = ctrl->distr[np * ctrl->current + p]
* wells->comp_frac[np * w + p];
const double phase_distr = ctrl->distr[np * ctrl->current + p];
wellrates_[np*w + p] = rate_target * phase_distr;
}
}