Merge pull request #5462 from GitPaean/handle_group_well_action_local

make sure a well exists in the process before closing it due to group action
This commit is contained in:
Bård Skaflestad 2024-07-03 11:33:29 +02:00 committed by GitHub
commit efa0895fcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2226,10 +2226,10 @@ namespace Opm {
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger, comm);
for (const auto& [group_name, to] : this->closed_offending_wells_) {
if (!this->wasDynamicallyShutThisTimeStep(to.second)) {
if (this->hasWell(to.second) && !this->wasDynamicallyShutThisTimeStep(to.second)) {
wellTestState.close_well(to.second, WellTestConfig::Reason::GROUP, simulationTime);
this->updateClosedWellsThisStep(to.second);
const std::string msg =
const std::string msg =
fmt::format("Procedure on exceeding {} limit is WELL for group {}. Well {} is {}.",
to.first,
group_name,