mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-28 20:13:49 -06:00
Merge pull request #1644 from GitPaean/fixing_control_initialization
using control in DECK to initialize the control in WellState
This commit is contained in:
commit
b5cb7bb829
@ -142,6 +142,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_controls_.resize(nw);
|
current_controls_.resize(nw);
|
||||||
|
// The controls set in the Wells (specified in the DECK) are treated as default initial value
|
||||||
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
current_controls_[w] = well_controls_get_current(wells->ctrls[w]);
|
||||||
|
}
|
||||||
perfRateSolvent_.clear();
|
perfRateSolvent_.clear();
|
||||||
perfRateSolvent_.resize(nperf, 0.0);
|
perfRateSolvent_.resize(nperf, 0.0);
|
||||||
productivity_index_.resize(nw * np, 0.0);
|
productivity_index_.resize(nw * np, 0.0);
|
||||||
@ -172,8 +176,6 @@ namespace Opm
|
|||||||
current_controls_[ newIndex ] = prevState->currentControls()[ oldIndex ];
|
current_controls_[ newIndex ] = prevState->currentControls()[ oldIndex ];
|
||||||
// also change the one in the WellControls
|
// also change the one in the WellControls
|
||||||
well_controls_set_current(wells->ctrls[w], current_controls_[ newIndex ]);
|
well_controls_set_current(wells->ctrls[w], current_controls_[ newIndex ]);
|
||||||
} else {
|
|
||||||
current_controls_[w] = well_controls_get_current(wells->ctrls[w]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wellrates
|
// wellrates
|
||||||
|
Loading…
Reference in New Issue
Block a user