From fefa5c22ce80feaa13ff516c1359178914e432e0 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 29 Jan 2020 09:13:25 +0100 Subject: [PATCH] make assembleWellEqIteration private --- opm/simulators/wells/MultisegmentWell.hpp | 16 ++++++++-------- opm/simulators/wells/StandardWell.hpp | 16 ++++++++-------- opm/simulators/wells/WellInterface.hpp | 19 ++++++++++--------- opm/simulators/wells/WellInterface_impl.hpp | 4 ++-- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/opm/simulators/wells/MultisegmentWell.hpp b/opm/simulators/wells/MultisegmentWell.hpp index aa6521bf3..8a429263a 100644 --- a/opm/simulators/wells/MultisegmentWell.hpp +++ b/opm/simulators/wells/MultisegmentWell.hpp @@ -122,14 +122,6 @@ namespace Opm WellState& well_state, Opm::DeferredLogger& deferred_logger) override; - virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, - const std::vector& B_avg, - const double dt, - const Well::InjectionControls& inj_controls, - const Well::ProductionControls& prod_controls, - WellState& well_state, - Opm::DeferredLogger& deferred_logger) override; - /// updating the well state based the current control mode virtual void updateWellStateWithTarget(const Simulator& ebos_simulator, WellState& well_state, @@ -428,6 +420,14 @@ namespace Opm const double simulation_time, const int report_step, WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) override; + virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, + const std::vector& B_avg, + const double dt, + const Well::InjectionControls& inj_controls, + const Well::ProductionControls& prod_controls, + WellState& well_state, + Opm::DeferredLogger& deferred_logger) override; + virtual void updateWaterThroughput(const double dt, WellState& well_state) const override; EvalWell getSegmentSurfaceVolume(const Simulator& ebos_simulator, const int seg_idx) const; diff --git a/opm/simulators/wells/StandardWell.hpp b/opm/simulators/wells/StandardWell.hpp index 270635622..18ea81437 100644 --- a/opm/simulators/wells/StandardWell.hpp +++ b/opm/simulators/wells/StandardWell.hpp @@ -172,14 +172,6 @@ namespace Opm WellState& well_state, Opm::DeferredLogger& deferred_logger) override; - virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, - const std::vector& B_avg, - const double dt, - const Well::InjectionControls& inj_controls, - const Well::ProductionControls& prod_controls, - WellState& well_state, - Opm::DeferredLogger& deferred_logger) override; - virtual void updateWellStateWithTarget(const Simulator& ebos_simulator, WellState& well_state, Opm::DeferredLogger& deferred_logger) const override; @@ -438,6 +430,14 @@ namespace Opm const WellState& well_state, Opm::DeferredLogger& deferred_logger) override; + virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, + const std::vector& B_avg, + const double dt, + const Well::InjectionControls& inj_controls, + const Well::ProductionControls& prod_controls, + WellState& well_state, + Opm::DeferredLogger& deferred_logger) override; + // check whether the well is operable under the current reservoir condition // mostly related to BHP limit and THP limit void updateWellOperability(const Simulator& ebos_simulator, diff --git a/opm/simulators/wells/WellInterface.hpp b/opm/simulators/wells/WellInterface.hpp index 797e63553..5094af0cc 100644 --- a/opm/simulators/wells/WellInterface.hpp +++ b/opm/simulators/wells/WellInterface.hpp @@ -168,15 +168,6 @@ namespace Opm Opm::DeferredLogger& deferred_logger ) = 0; - virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, - const std::vector& B_avg, - const double dt, - const Well::InjectionControls& inj_controls, - const Well::ProductionControls& prod_controls, - WellState& well_state, - Opm::DeferredLogger& deferred_logger - ) = 0; - void updateWellTestState(const WellState& well_state, const double& simulationTime, const bool& writeMessageToOPMLog, @@ -460,6 +451,16 @@ namespace Opm const double simulation_time, const int report_step, WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) = 0; + + virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator, + const std::vector& B_avg, + const double dt, + const Well::InjectionControls& inj_controls, + const Well::ProductionControls& prod_controls, + WellState& well_state, + Opm::DeferredLogger& deferred_logger + ) = 0; + void updateWellTestStateEconomic(const WellState& well_state, const double simulation_time, const bool write_message_to_opmlog, diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index cfab2d67a..712f6a7da 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -1289,7 +1289,7 @@ namespace Opm WellState& well_state, Opm::DeferredLogger& deferred_logger) { - const int max_iter = param_.max_inner_iter_wells_; + const int max_iter = param_.max_welleq_iter_; int it = 0; const double dt = ebosSimulator.timeStepSize(); const auto& summary_state = ebosSimulator.vanguard().summaryState(); @@ -1371,7 +1371,7 @@ namespace Opm if (converged) { deferred_logger.debug("WellTest: Well equation for well " + name() + " converged"); } else { - const int max_iter = param_.max_inner_iter_wells_; + const int max_iter = param_.max_welleq_iter_; deferred_logger.debug("WellTest: Well equation for well " +name() + " failed converging in " + std::to_string(max_iter) + " iterations"); well_state = well_state0;