mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2204 from joakim-hove/shut-wells-timestep
Evaluate ACTIONX at the end of every timestep
This commit is contained in:
commit
4ad0074552
@ -966,7 +966,7 @@ public:
|
|||||||
}
|
}
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
|
|
||||||
const auto& simulator = this->simulator();
|
auto& simulator = this->simulator();
|
||||||
wellModel_.endTimeStep();
|
wellModel_.endTimeStep();
|
||||||
if (enableAquifers_)
|
if (enableAquifers_)
|
||||||
aquiferModel_.endTimeStep();
|
aquiferModel_.endTimeStep();
|
||||||
@ -987,6 +987,13 @@ public:
|
|||||||
|
|
||||||
bool isSubStep = !EWOMS_GET_PARAM(TypeTag, bool, EnableWriteAllSolutions) && !this->simulator().episodeWillBeOver();
|
bool isSubStep = !EWOMS_GET_PARAM(TypeTag, bool, EnableWriteAllSolutions) && !this->simulator().episodeWillBeOver();
|
||||||
eclWriter_->evalSummaryState(isSubStep);
|
eclWriter_->evalSummaryState(isSubStep);
|
||||||
|
|
||||||
|
auto& schedule = simulator.vanguard().schedule();
|
||||||
|
int episodeIdx = simulator.episodeIndex();
|
||||||
|
this->applyActions(episodeIdx,
|
||||||
|
simulator.time() + simulator.timeStepSize(),
|
||||||
|
schedule,
|
||||||
|
simulator.vanguard().summaryState());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -999,10 +1006,6 @@ public:
|
|||||||
const auto& timeMap = schedule.getTimeMap();
|
const auto& timeMap = schedule.getTimeMap();
|
||||||
|
|
||||||
int episodeIdx = simulator.episodeIndex();
|
int episodeIdx = simulator.episodeIndex();
|
||||||
this->applyActions(episodeIdx + 1,
|
|
||||||
simulator.time() + simulator.timeStepSize(),
|
|
||||||
schedule,
|
|
||||||
simulator.vanguard().summaryState());
|
|
||||||
|
|
||||||
// check if we're finished ...
|
// check if we're finished ...
|
||||||
if (episodeIdx + 1 >= static_cast<int>(timeMap.numTimesteps())) {
|
if (episodeIdx + 1 >= static_cast<int>(timeMap.numTimesteps())) {
|
||||||
|
@ -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
|
// Use the pvtRegionIdx from the top cell
|
||||||
const int well_cell_top = well_perf_data_[w][0].cell_index;
|
const int well_cell_top = well_perf_data_[w][0].cell_index;
|
||||||
const int pvtreg = pvt_region_idx_[well_cell_top];
|
const int pvtreg = pvt_region_idx_[well_cell_top];
|
||||||
|
Loading…
Reference in New Issue
Block a user