mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Catch exceptions from well testing (often: inf/nan in MSW matrices).
This commit is contained in:
parent
c6bb607cdc
commit
2294983759
@ -584,7 +584,12 @@ namespace Opm {
|
||||
well->setPrevSurfaceRates(this->wellState(), this->prevWellState());
|
||||
}
|
||||
|
||||
well->wellTesting(ebosSimulator_, simulationTime, this->wellState(), this->groupState(), wellTestState(), deferred_logger);
|
||||
try {
|
||||
well->wellTesting(ebosSimulator_, simulationTime, this->wellState(), this->groupState(), wellTestState(), deferred_logger);
|
||||
} catch (std::runtime_error& e) {
|
||||
const std::string msg = fmt::format("Exception during testing of well: {}. The well will not open.\n Exception message: {}", wellEcl.name(), e.what());
|
||||
deferred_logger.warning("WELL_TESTING_FAILED", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user