Update Well Topology if Triggered From ACTIONX

This commit adds a new flag data member,

    wellStructureChangedDynamically_

to the generic black-oil well model.  This flag captures the

    well_structure_changed

value from the 'SimulatorUpdate' structure in the updateEclWells()
member function.  Then, in BlackoilWellModel::beginTimeStep(), we
key a well structure update off this flag when set.  This, in turn,
enables creating or opening wells as a result of an ACTIONX block
updating the structure in the middle of a report step.
This commit is contained in:
Bård Skaflestad
2023-07-13 17:44:28 +02:00
parent b22f9853db
commit abfb5c9d82
4 changed files with 86 additions and 34 deletions

View File

@@ -188,21 +188,24 @@ void EclActionHandler::applySimulatorUpdate(const int report_step,
const SimulatorUpdate& sim_update,
bool& commit_wellstate,
const TransFunc& updateTrans)
{
OPM_TIMEBLOCK(applySimulatorUpdate);
this->wellModel_.updateEclWells(report_step, sim_update.affected_wells, summaryState_);
if (!sim_update.affected_wells.empty())
commit_wellstate = true;
{
OPM_TIMEBLOCK(applySimulatorUpdate);
if (sim_update.tran_update) {
const auto& keywords = schedule_[report_step].geo_keywords();
ecl_state_.apply_schedule_keywords( keywords );
eclBroadcast(comm_, ecl_state_.getTransMult() );
this->wellModel_.updateEclWells(report_step, sim_update, this->summaryState_);
// re-compute transmissibility
updateTrans(true);
}
}
if (!sim_update.affected_wells.empty()) {
commit_wellstate = true;
}
if (sim_update.tran_update) {
const auto& keywords = schedule_[report_step].geo_keywords();
ecl_state_.apply_schedule_keywords( keywords );
eclBroadcast(comm_, ecl_state_.getTransMult() );
// re-compute transmissibility
updateTrans(true);
}
}
std::unordered_map<std::string, double>
EclActionHandler::fetchWellPI(const int reportStep,