mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Bugfix in well rate init.
Do not always try to initialize, also initialize proper phase rates.
This commit is contained in:
parent
ad4c9a47e0
commit
175cecacda
@ -59,11 +59,12 @@ namespace Opm
|
||||
bhp_[w] = ctrl->target[ctrl->current];
|
||||
}
|
||||
// Initialize well rates to match controls if type is SURFACE_RATE
|
||||
if ((ctrl->current >= 0) || // open well
|
||||
if ((ctrl->current >= 0) && // open well
|
||||
(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];
|
||||
const double phase_distr = ctrl->distr[np * ctrl->current + p]
|
||||
* wells->comp_frac[np * w + p];
|
||||
wellrates_[np*w + p] = rate_target * phase_distr;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user