mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3158 from totto82/operability_solve
shut/stop unsolvable wells
This commit is contained in:
@@ -1408,6 +1408,7 @@ namespace Opm {
|
||||
std::string exc_msg;
|
||||
try {
|
||||
for (const auto& well : well_container_) {
|
||||
const bool old_well_operable = well->isOperable();
|
||||
well->checkWellOperability(ebosSimulator_, this->wellState(), deferred_logger);
|
||||
|
||||
if (!well->isOperable() ) continue;
|
||||
@@ -1425,6 +1426,22 @@ namespace Opm {
|
||||
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();
|
||||
}
|
||||
|
||||
} // end of for (const auto& well : well_container_)
|
||||
updatePrimaryVariables(deferred_logger);
|
||||
} catch (const std::runtime_error& e) {
|
||||
|
||||
Reference in New Issue
Block a user