Merge pull request #5861 from vkip/bugfix_restart_with_inactive_wells

Bugfix: Upon restart, do not try to restore segment info for inactive wells
This commit is contained in:
Kai Bao 2025-01-22 12:59:20 +01:00 committed by GitHub
commit 939e6f3a6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -258,7 +258,7 @@ loadRestartData(const data::Wells& rst_wells,
{
const auto& well_name = well_state.name(well_index);
this->loadRestartWellData(well_name, handle_ms_well, phs,
this->loadRestartWellData(well_name, handle_ms_well & !well_state.is_permanently_inactive_well(well_name), phs,
rst_wells.at(well_name),
wellModel_.perfData(well_index),
well_state.well(well_index));

View File

@ -360,13 +360,13 @@ public:
serializer(permanently_inactive_well_names_);
}
private:
bool enableDistributedWells_ = false;
bool is_permanently_inactive_well(const std::string& wname) const {
return std::find(this->permanently_inactive_well_names_.begin(), this->permanently_inactive_well_names_.end(), wname) != this->permanently_inactive_well_names_.end();
}
private:
bool enableDistributedWells_ = false;
PhaseUsage phase_usage_;
// The wells_ variable is essentially a map of all the wells on the current