update primary variables in prepareTimeStep

it should not change running results.
This commit is contained in:
Kai Bao 2022-04-27 13:36:52 +02:00
parent 26c7055b9e
commit 57d8f1aa24

View File

@ -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);