From a650b529d1c5173bf078db7708d8ae3b2f2f4641 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 21 Sep 2021 11:05:03 +0200 Subject: [PATCH] commit WGstate after shut well from outside --- opm/simulators/wells/BlackoilWellModelGeneric.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.cpp b/opm/simulators/wells/BlackoilWellModelGeneric.cpp index b98e64fe2..98b5d646b 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.cpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.cpp @@ -1588,6 +1588,10 @@ forceShutWellByNameIfPredictionMode(const std::string& wellname, } } + // the wellTesteState is updated between timesteps and we also need to update the privous WGstate + if(well_was_shut) + this->commitWGState(); + // Communicate across processes if a well was shut. well_was_shut = comm_.max(well_was_shut);