introducing tolerance_pressure_ms_wells for pressure equations

for the multisegment wells. More detailedly, we should distinguish the
rate control equations, bhp control equations and ordinary pressure
equations.
This commit is contained in:
Kai Bao
2017-10-03 15:23:38 +02:00
parent 92abdc4f23
commit 6fb459a797
3 changed files with 7 additions and 2 deletions

View File

@@ -548,6 +548,8 @@ namespace Opm
}
}
} else { // pressure equation
// TODO: we should distinguish the rate control equations, bhp control equations
// and the oridnary pressure equations
const double pressure_residal = residual[seg][eq_idx];
const std::string eq_name("Pressure");
if (std::isnan(pressure_residal)) {
@@ -575,8 +577,7 @@ namespace Opm
report.converged = report.converged && (maximum_residual[comp_idx] < param.tolerance_wells_);
}
// TODO: it is not good to use a hard-coded value.
report.converged = report.converged && (maximum_residual[SPres] < 100.0);
report.converged = report.converged && (maximum_residual[SPres] < param.tolerance_pressure_ms_wells_);
} else { // abnormal values found and no need to check the convergence
report.converged = false;
}