mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
stop checking operability in the beginning of an timestep
This commit is contained in:
parent
c9e93e6155
commit
bc8da79779
@ -1394,52 +1394,23 @@ namespace Opm {
|
||||
prepareTimeStep(DeferredLogger& deferred_logger)
|
||||
{
|
||||
for (const auto& well : well_container_) {
|
||||
const bool old_well_operable = well->isOperable();
|
||||
well->checkWellOperability(ebosSimulator_, this->wellState(), deferred_logger);
|
||||
|
||||
if (well->isOperable()) {
|
||||
auto& events = this->wellState().well(well->indexOfWell()).events;
|
||||
if (events.hasEvent(WellState::event_mask)) {
|
||||
well->updateWellStateWithTarget(ebosSimulator_, this->groupState(), this->wellState(), deferred_logger);
|
||||
// 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);
|
||||
}
|
||||
|
||||
// solve the well equation initially to improve the initial solution of the well model
|
||||
if (param_.solve_welleq_initially_) {
|
||||
well->solveWellEquation(ebosSimulator_, this->wellState(), this->groupState(), deferred_logger);
|
||||
}
|
||||
}
|
||||
|
||||
const bool well_operable = well->isOperable();
|
||||
if (!well_operable && old_well_operable) {
|
||||
const Well& well_ecl = getWellEcl(well->name());
|
||||
if (well_ecl.getAutomaticShutIn()) {
|
||||
deferred_logger.info(" well " + well->name() + " gets SHUT at the beginning of the time step ");
|
||||
} else {
|
||||
if (!well->wellIsStopped()) {
|
||||
deferred_logger.info(" well " + well->name() + " gets STOPPED at the beginning of the time step ");
|
||||
well->stopWell();
|
||||
}
|
||||
}
|
||||
} else if (well_operable && !old_well_operable) {
|
||||
deferred_logger.info(" well " + well->name() + " gets REVIVED at the beginning of the time step ");
|
||||
well->openWell();
|
||||
}
|
||||
} else if (well_operable && !old_well_operable) {
|
||||
deferred_logger.info(" well " + well->name() + " gets REVIVED at the beginning of the time step ");
|
||||
well->openWell();
|
||||
auto& events = this->wellState().well(well->indexOfWell()).events;
|
||||
if (events.hasEvent(WellState::event_mask)) {
|
||||
well->updateWellStateWithTarget(ebosSimulator_, this->groupState(), this->wellState(), deferred_logger);
|
||||
// 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);
|
||||
}
|
||||
|
||||
} // end of for (const auto& well : well_container_)
|
||||
// solve the well equation initially to improve the initial solution of the well model
|
||||
if (param_.solve_welleq_initially_) {
|
||||
well->solveWellEquation(ebosSimulator_, this->wellState(), this->groupState(), deferred_logger);
|
||||
}
|
||||
}
|
||||
updatePrimaryVariables(deferred_logger);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
|
@ -357,10 +357,6 @@ namespace Opm
|
||||
const int max_iter = param_.max_welleq_iter_;
|
||||
deferred_logger.debug("Compute initial well solution for well " + this->name() + ". Failed to converge in "
|
||||
+ std::to_string(max_iter) + " iterations");
|
||||
// the well operability system currently works only for producers in prediction mode
|
||||
if (this->shutUnsolvableWells())
|
||||
this->operability_status_.solvable = false;
|
||||
|
||||
well_state = well_state0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user