From 57d8f1aa244cf08526f186db6df54260d830eeae Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 27 Apr 2022 13:36:52 +0200 Subject: [PATCH] update primary variables in prepareTimeStep it should not change running results. --- opm/simulators/wells/BlackoilWellModel_impl.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index c3908f4c3..3b26d5bba 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1492,6 +1492,8 @@ namespace Opm { auto& events = this->wellState().well(well->indexOfWell()).events; if (events.hasEvent(WellState::event_mask)) { well->updateWellStateWithTarget(ebosSimulator_, this->groupState(), this->wellState(), deferred_logger); + well->updatePrimaryVariables(this->wellState(), deferred_logger); + well->initPrimaryVariablesEvaluation(); // There is no new well control change input within a report step, // so next time step, the well does not consider to have effective events anymore. events.clearEvent(WellState::event_mask);