mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
checking the residual for the well control equations.
This commit is contained in:
@@ -1840,6 +1840,7 @@ namespace detail {
|
||||
const double tol_mb = param_.tolerance_mb_;
|
||||
const double tol_cnv = param_.tolerance_cnv_;
|
||||
const double tol_wells = param_.tolerance_wells_;
|
||||
const double tol_well_control = param_.tolerance_well_control_;
|
||||
|
||||
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
||||
const int np = asImpl().numPhases();
|
||||
@@ -1893,7 +1894,7 @@ namespace detail {
|
||||
|
||||
const double residualWell = detail::infinityNormWell(residual_.well_eq,
|
||||
linsolver_.parallelInformation());
|
||||
converged_Well = converged_Well && (residualWell < Opm::unit::barsa);
|
||||
converged_Well = converged_Well && (residualWell < tol_well_control);
|
||||
const bool converged = converged_MB && converged_CNV && converged_Well;
|
||||
|
||||
// Residual in Pascal can have high values and still be ok.
|
||||
@@ -1913,6 +1914,7 @@ namespace detail {
|
||||
for (int idx = 0; idx < np; ++idx) {
|
||||
msg += " W-FLUX(" + materialName(idx).substr(0, 1) + ")";
|
||||
}
|
||||
msg += " WELL-CONT";
|
||||
// std::cout << " WELL-CONT ";
|
||||
OpmLog::note(msg);
|
||||
}
|
||||
@@ -1929,6 +1931,7 @@ namespace detail {
|
||||
for (int idx = 0; idx < np; ++idx) {
|
||||
ss << std::setw(11) << well_flux_residual[idx];
|
||||
}
|
||||
ss << std::setw(11) << residualWell;
|
||||
// std::cout << std::setw(11) << residualWell;
|
||||
ss.precision(oprec);
|
||||
ss.flags(oflags);
|
||||
@@ -1976,6 +1979,7 @@ namespace detail {
|
||||
getWellConvergence(const int iteration)
|
||||
{
|
||||
const double tol_wells = param_.tolerance_wells_;
|
||||
const double tol_well_control = param_.tolerance_well_control_;
|
||||
|
||||
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
||||
const int np = asImpl().numPhases();
|
||||
@@ -2010,7 +2014,7 @@ namespace detail {
|
||||
|
||||
const double residualWell = detail::infinityNormWell(residual_.well_eq,
|
||||
linsolver_.parallelInformation());
|
||||
converged_Well = converged_Well && (residualWell < Opm::unit::barsa);
|
||||
converged_Well = converged_Well && (residualWell < tol_well_control);
|
||||
const bool converged = converged_Well;
|
||||
|
||||
// if one of the residuals is NaN, throw exception, so that the solver can be restarted
|
||||
@@ -2040,6 +2044,7 @@ namespace detail {
|
||||
for (int idx = 0; idx < np; ++idx) {
|
||||
msg += " W-FLUX(" + materialName(idx).substr(0, 1) + ")";
|
||||
}
|
||||
msg += " WELL-CONT";
|
||||
OpmLog::note(msg);
|
||||
}
|
||||
std::ostringstream ss;
|
||||
@@ -2049,6 +2054,7 @@ namespace detail {
|
||||
for (int idx = 0; idx < np; ++idx) {
|
||||
ss << std::setw(11) << well_flux_residual[idx];
|
||||
}
|
||||
ss << std::setw(11) << residualWell;
|
||||
ss.precision(oprec);
|
||||
ss.flags(oflags);
|
||||
OpmLog::note(ss.str());
|
||||
|
||||
Reference in New Issue
Block a user