check whether the group targets are converged.

This commit is contained in:
Kai Bao 2017-01-16 15:55:52 +01:00
parent 65a3fff6f2
commit 9e93ebcc64
2 changed files with 11 additions and 0 deletions

View File

@ -268,6 +268,12 @@ namespace Opm {
perfTimer.start();
// the step is not considered converged until at least minIter iterations is done
report.converged = getConvergence(timer, iteration,residual_norms) && iteration > nonlinear_solver.minIter();
// checking whether the group targets are converged
if (wellModel().wellCollection()->groupControlActive()) {
report.converged = report.converged && wellModel().wellCollection()->groupTargetConverged(well_state.wellRates());
}
report.update_time += perfTimer.stop();
residual_norms_history_.push_back(residual_norms);
if (!report.converged) {

View File

@ -682,6 +682,11 @@ enum WellVariablePositions {
assembleWellEq(ebosSimulator, dt, well_state, true);
converged = getWellConvergence(ebosSimulator, it);
// checking whether the group targets are converged
if (wellCollection()->groupControlActive()) {
converged = converged && wellCollection()->groupTargetConverged(well_state.wellRates());
}
if (converged) {
break;
}