recovering the SHUT during iteration beahvoir in prepareWellBeforeAssembling

when local_well_solver_control_switching_ is off
and incoporating commenst regarding resetting wellStatus_ in StandardWell within
the function iterateWellEqWithSwitching.
This commit is contained in:
Kai Bao
2023-09-26 11:42:19 +02:00
parent 83bbe89342
commit b1974bbe45
2 changed files with 19 additions and 3 deletions

View File

@@ -626,10 +626,22 @@ namespace Opm
const bool well_operable = this->operability_status_.isOperableAndSolvable();
if (!well_operable && old_well_operable) {
if (!this->wellIsStopped()) {
if (this->param_.local_well_solver_control_switching_) {
deferred_logger.info(" well " + this->name() + " gets STOPPED during iteration ");
this->stopWell();
changed_to_stopped_this_step_ = true;
} else {
// \Note: keep the old manner for now for testing checking.
// Will be investgiated and fixed in a later PR
if (this->well_ecl_.getAutomaticShutIn()) {
deferred_logger.info(" well " + this->name() + " gets SHUT during iteration ");
} else {
if (!this->wellIsStopped()) {
deferred_logger.info(" well " + this->name() + " gets STOPPED during iteration ");
this->stopWell();
changed_to_stopped_this_step_ = true;
}
}
}
} else if (well_operable && !old_well_operable) {
deferred_logger.info(" well " + this->name() + " gets REVIVED during iteration ");