Call applyActions at the end of every timestep

This commit is contained in:
Joakim Hove
2019-12-06 13:12:36 +01:00
parent c256bfdfa4
commit dc5340046a
2 changed files with 20 additions and 5 deletions

View File

@@ -677,6 +677,18 @@ namespace Opm {
}
}
// Due to ACTIONX the well might have been closed 'behind our back'.
const auto well_status = schedule().getWell(well_name, time_step).getStatus();
if (well_status == Well::Status::SHUT) {
well_state_.shutWell(w);
continue;
}
if (well_status == Well::Status::STOP) {
well_state_.thp()[w] = 0.;
wellIsStopped = true;
}
// Use the pvtRegionIdx from the top cell
const int well_cell_top = well_perf_data_[w][0].cell_index;
const int pvtreg = pvt_region_idx_[well_cell_top];