mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user