Merge pull request #3907 from GitPaean/testing_primary_updating

update primary variables in prepareTimeStep after updating the well target
This commit is contained in:
Tor Harald Sandve
2022-05-03 09:07:14 +02:00
committed by GitHub

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