This commit is contained in:
Stein Krogstad
2023-11-16 16:02:53 +01:00
parent 94cde80235
commit 00bd006eb4
2 changed files with 2 additions and 2 deletions

View File

@@ -161,8 +161,8 @@ getWellConvergence(const WellState& well_state,
tolerance_wells,
tolerance_wells,
max_residual_allowed},
well_is_stopped,
std::abs(linSys_.residual()[0][SPres]),
well_is_stopped,
report,
deferred_logger);

View File

@@ -456,7 +456,7 @@ namespace Opm
if (!this->param_.local_well_solver_control_switching_){
converged = this->iterateWellEqWithControl(ebosSimulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);
} else {
if (this->param_.use_implicit_ipr_ && this->well_ecl_.isProducer() && this->wellHasTHPConstraints(summary_state)) {
if (this->param_.use_implicit_ipr_ && this->well_ecl_.isProducer() && this->wellHasTHPConstraints(summary_state) && (this->well_ecl_.getStatus() == WellStatus::OPEN)) {
converged = solveWellWithTHPConstraint(ebosSimulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);
} else {
converged = this->iterateWellEqWithSwitching(ebosSimulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);