From b08bc029e6f1113aa1de0fbc4fce7df241db5c5a Mon Sep 17 00:00:00 2001 From: Stein Krogstad Date: Sun, 1 Oct 2023 13:16:48 +0200 Subject: [PATCH 1/2] Fix shut-in logic for wells with shut-intructions --- opm/simulators/wells/WellInterface_impl.hpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 9648715e3..8e58d46a9 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -632,23 +632,9 @@ namespace Opm const bool well_operable = this->operability_status_.isOperableAndSolvable(); if (!well_operable && old_well_operable) { - if (this->param_.local_well_solver_control_switching_) { - deferred_logger.info(" well " + this->name() + " gets STOPPED during iteration "); - this->stopWell(); - changed_to_stopped_this_step_ = true; - } else { - // \Note: keep the old manner for now for testing checking. - // Will be investgiated and fixed in a later PR - if (this->well_ecl_.getAutomaticShutIn()) { - deferred_logger.info(" well " + this->name() + " gets SHUT during iteration "); - } else { - if (!this->wellIsStopped()) { - deferred_logger.info(" well " + this->name() + " gets STOPPED during iteration "); - this->stopWell(); - changed_to_stopped_this_step_ = true; - } - } - } + deferred_logger.info(" well " + this->name() + " gets STOPPED during iteration "); + this->stopWell(); + changed_to_stopped_this_step_ = true; } else if (well_operable && !old_well_operable) { deferred_logger.info(" well " + this->name() + " gets REVIVED during iteration "); this->openWell(); From 6f64388f1eb49cd4c41885c27feae79f9ea771df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Mon, 20 Nov 2023 20:46:46 +0100 Subject: [PATCH 2/2] Reduce Timestep for Certain Sensitive Tests This increases the cost of those tests, but in return we get improved determinism and stability of the tests. --- parallelTests.cmake | 2 +- regressionTests.cmake | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/parallelTests.cmake b/parallelTests.cmake index cb3942630..a490f6463 100644 --- a/parallelTests.cmake +++ b/parallelTests.cmake @@ -203,4 +203,4 @@ add_test_compare_parallel_simulation(CASENAME rxft ABS_TOL ${abs_tol_parallel} REL_TOL 1.0e-3 DIR rxft_smry - TEST_ARGS --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --ecl-enable-drift-compensation=false) + TEST_ARGS --enable-tuning=true --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --ecl-enable-drift-compensation=false) diff --git a/regressionTests.cmake b/regressionTests.cmake index 8b60a3382..2eb2d109a 100644 --- a/regressionTests.cmake +++ b/regressionTests.cmake @@ -285,7 +285,7 @@ add_test_compareECLFiles(CASENAME polymer_oilwater SIMULATOR flow ABS_TOL ${abs_tol} REL_TOL ${rel_tol} - TEST_ARGS --tolerance-mb=1.e-7) + TEST_ARGS --solver-max-time-step-in-days=10 --tolerance-mb=1.e-7) add_test_compareECLFiles(CASENAME polymer_injectivity FILENAME 2D_POLYMER_INJECTIVITY @@ -439,7 +439,8 @@ add_test_compareECLFiles(CASENAME udq_actionx SIMULATOR flow ABS_TOL ${abs_tol} REL_TOL ${rel_tol} - DIR udq_actionx) + DIR udq_actionx + TEST_ARGS --solver-max-time-step-in-days=5) add_test_compareECLFiles(CASENAME udq_wconprod FILENAME UDQ_WCONPROD @@ -1221,7 +1222,8 @@ add_test_compareECLFiles(CASENAME rxft_smry SIMULATOR flow ABS_TOL ${abs_tol} REL_TOL ${rel_tol} - DIR rxft_smry ) + DIR rxft_smry + TEST_ARGS --enable-tuning=true) add_test_compareECLFiles(CASENAME bo_diffusion FILENAME BO_DIFFUSE_CASE1 @@ -1242,7 +1244,8 @@ add_test_compareECLFiles(CASENAME actionx_wpimult SIMULATOR flow ABS_TOL ${abs_tol} REL_TOL ${rel_tol} - DIR actionx) + DIR actionx + TEST_ARGS --enable-tuning=true) add_test_compareECLFiles(CASENAME wvfpexp_02 FILENAME WVFPEXP-02