mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-13 09:22:05 -05:00
Communicate exceptions during WellModel::updateAndCommunicate
For multi segment well the underlying call to MultisegmentWell::updateWellStateWithTarget (at least if updateWellStateWithTHPTargetProd is called for a producer under thp control) might throw as there might be a singular matrix during the solve needed in MultisegmentWell::iterateWellEqWithControl. Previously, if that happened then the MPI process where it happened would stop the nonlinear iteration as failed and try with a chopped time step. The others might go one with the current time step and we would see MPI errors about truncated messages. Now we communicate any exception happening during this part of WellModel::updateAndCommunicate and all processes will stop the nonlinear iteration as failed and chop the time step.
This commit is contained in:
1 parent
cb3ab14a71
commit
779dd74923
1 file changed
+6
@@ -2144,10 +2144,16 @@ namespace Opm {
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
updateAndCommunicateGroupData(reportStepIdx, iterationIdx);
|
||||
|
||||
// updateWellStateWithTarget might throw for multisegment wells hence we
|
||||
// have a parallel try catch here to thrown on all processes.
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH()
|
||||
// if a well or group change control it affects all wells that are under the same group
|
||||
for (const auto& well : well_container_) {
|
||||
well->updateWellStateWithTarget(ebosSimulator_, this->groupState(), this->wellState(), deferred_logger);
|
||||
}
|
||||
OPM_END_PARALLEL_TRY_CATCH("BlackoilWellModel::updateAndCommunicate failed: ",
|
||||
ebosSimulator_.gridView().comm())
|
||||
updateAndCommunicateGroupData(reportStepIdx, iterationIdx);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user