mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
synchronizing the control index at the beginning of assemble()
in StandardWellsDense class. It takes effects after restarting from a previous unconverged solution.
This commit is contained in:
@@ -129,6 +129,20 @@ namespace Opm {
|
|||||||
const double dt,
|
const double dt,
|
||||||
WellState& well_state)
|
WellState& well_state)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// after restarting, the well_controls can be modified while
|
||||||
|
// the well_state still uses the old control index
|
||||||
|
// we need to synchronize these two.
|
||||||
|
const int nw = wells().number_of_wells;
|
||||||
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
const int ctrl_index = well_state.currentControls()[w];
|
||||||
|
WellControls* wc = wells().ctrls[w];
|
||||||
|
const int ctrl_index_2 = well_controls_get_current(wc);
|
||||||
|
if (ctrl_index_2 != ctrl_index) {
|
||||||
|
well_controls_set_current(wc, ctrl_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SimulatorReport report;
|
SimulatorReport report;
|
||||||
if ( ! localWellsActive() ) {
|
if ( ! localWellsActive() ) {
|
||||||
return report;
|
return report;
|
||||||
|
|||||||
Reference in New Issue
Block a user