From 49dfe1006fd4b90caf307b568113c6bd1ca3953e Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Mon, 13 Sep 2021 15:11:38 +0200 Subject: [PATCH] cleanup --- .../wells/MultisegmentWell_impl.hpp | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index e1167ba81..5b8d326d5 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -1743,22 +1743,20 @@ namespace Opm return rates; }; - auto bhp = this->MultisegmentWellGeneric:: + auto bhpAtLimit = this->MultisegmentWellGeneric:: computeBhpAtThpLimitProd(frates, summary_state, maxPerfPress(ebos_simulator), getRefDensity(), deferred_logger); - if(bhp) - return bhp; + if(bhpAtLimit) + return bhpAtLimit; auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) { - // Not solving the well equations here, which means we are - // calculating at the current Fg/Fw values of the - // well. This does not matter unless the well is - // crossflowing, and then it is likely still a good - // approximation. + // Solver the well iterations to see if we are + // able to get a solution with an update + // solution std::vector rates(3); computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger); return rates; @@ -1795,21 +1793,19 @@ namespace Opm return rates; }; - auto bhp = this->MultisegmentWellGeneric:: + auto bhpAtLimit = this->MultisegmentWellGeneric:: computeBhpAtThpLimitInj(frates, summary_state, getRefDensity(), deferred_logger); - if(bhp) - return bhp; + if(bhpAtLimit) + return bhpAtLimit; auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) { - // Not solving the well equations here, which means we are - // calculating at the current Fg/Fw values of the - // well. This does not matter unless the well is - // crossflowing, and then it is likely still a good - // approximation. + // Solver the well iterations to see if we are + // able to get a solution with an update + // solution std::vector rates(3); computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger); return rates;