Skip to content

Commit

Permalink
Merge pull request #1681 from atgeirr/fix-shutting-new-well
Browse files Browse the repository at this point in the history
Avoid opening well that was shut on same time step.
  • Loading branch information
atgeirr authored Dec 17, 2018
2 parents a48fbac + b1c16e5 commit 483d6c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions opm/autodiff/BlackoilWellModel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,16 @@ namespace Opm {
if ( wellTestState_.hasWell(well_name, WellTestConfig::Reason::PHYSICAL ) ) {
// TODO: more checking here, to make sure this standard more specific and complete
// maybe there is some WCON keywords will not open the well
if (well_state_.effectiveEventsOccurred(w) ) {
wellTestState_.openWell(well_name);
if (well_state_.effectiveEventsOccurred(w)) {
if (wellTestState_.lastTestTime(well_name) == ebosSimulator_.time()) {
// The well was shut this timestep, we are most likely retrying
// a timestep without the well in question, after it caused
// repeated timestep cuts. It should therefore not be opened,
// even if it was new or received new targets this report step.
well_state_.setEffectiveEventsOccurred(w, false);
} else {
wellTestState_.openWell(well_name);
}
}
}

Expand Down

0 comments on commit 483d6c5

Please sign in to comment.