Merge pull request #1783 from GitPaean/not_throw_for_potential_failure

not throw for failure when failing in calculating well potentials
This commit is contained in:
Atgeirr Flø Rasmussen 2019-04-12 09:45:34 +02:00 committed by GitHub
commit d03465b00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

@ -1075,12 +1075,12 @@ namespace Opm {
try { try {
for (const auto& well : well_container_) { for (const auto& well : well_container_) {
// Only compute the well potential when asked for // Only compute the well potential when asked for
bool needed_for_output = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) || const bool needed_for_output = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) ||
summaryConfig.hasSummaryKey( "WOPI:" + well->name()) || summaryConfig.hasSummaryKey( "WOPI:" + well->name()) ||
summaryConfig.hasSummaryKey( "WGPI:" + well->name())) && well->wellType() == INJECTOR) || summaryConfig.hasSummaryKey( "WGPI:" + well->name())) && well->wellType() == INJECTOR) ||
((summaryConfig.hasSummaryKey( "WWPP:" + well->name()) || ((summaryConfig.hasSummaryKey( "WWPP:" + well->name()) ||
summaryConfig.hasSummaryKey( "WOPP:" + well->name()) || summaryConfig.hasSummaryKey( "WOPP:" + well->name()) ||
summaryConfig.hasSummaryKey( "WGPP:" + well->name())) && well->wellType() == PRODUCER); summaryConfig.hasSummaryKey( "WGPP:" + well->name())) && well->wellType() == PRODUCER);
if (needed_for_output || wellCollection().requireWellPotentials()) if (needed_for_output || wellCollection().requireWellPotentials())
{ {
std::vector<double> potentials; std::vector<double> potentials;

View File

@ -2313,7 +2313,11 @@ namespace Opm
} }
if (!converged) { if (!converged) {
OPM_DEFLOG_THROW(std::runtime_error, "Failed in getting converged for the potential calculation for well " << name(), deferred_logger); // TODO: temporary approach to recover the running of prediction case
// more sophisicated treatment should be developed to handle the situation in a general way
// OPM_DEFLOG_THROW(std::runtime_error, "Failed in getting converged for the potential calculation for well " << name(), deferred_logger);
deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL",
"Failed in getting converged for the potential calculation for well " + name());
} }
return potentials; return potentials;