mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user