mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
92abdc4f23
commit
6fb459a797
@ -50,6 +50,7 @@ namespace Opm
|
||||
tolerance_cnv_ = param.getDefault("tolerance_cnv", tolerance_cnv_);
|
||||
tolerance_wells_ = param.getDefault("tolerance_wells", tolerance_wells_ );
|
||||
tolerance_well_control_ = param.getDefault("tolerance_well_control", tolerance_well_control_);
|
||||
tolerance_pressure_ms_wells_ = param.getDefault("tolerance_pressure_ms_wells", tolerance_pressure_ms_wells_);
|
||||
maxSinglePrecisionTimeStep_ = unit::convert::from(
|
||||
param.getDefault("max_single_precision_days", unit::convert::to( maxSinglePrecisionTimeStep_, unit::day) ), unit::day );
|
||||
max_strict_iter_ = param.getDefault("max_strict_iter",8);
|
||||
@ -76,6 +77,7 @@ namespace Opm
|
||||
tolerance_cnv_ = 1.0e-2;
|
||||
tolerance_wells_ = 1.0e-4;
|
||||
tolerance_well_control_ = 1.0e-7;
|
||||
tolerance_pressure_ms_wells_ = 100.0;
|
||||
maxSinglePrecisionTimeStep_ = unit::convert::from( 20.0, unit::day );
|
||||
solve_welleq_initially_ = true;
|
||||
update_equations_scaling_ = false;
|
||||
|
@ -51,6 +51,8 @@ namespace Opm
|
||||
/// Tolerance for the well control equations
|
||||
// TODO: it might need to distinguish between rate control and pressure control later
|
||||
double tolerance_well_control_;
|
||||
/// Tolerance for the pressure equations for multisegment wells
|
||||
double tolerance_pressure_ms_wells_;
|
||||
|
||||
/// Tolerance for time step in seconds where single precision can be used
|
||||
/// for solving for the Jacobian
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user