diff --git a/opm/simulators/wells/MultisegmentWellEval.cpp b/opm/simulators/wells/MultisegmentWellEval.cpp index 812758cb9..9bd42ae23 100644 --- a/opm/simulators/wells/MultisegmentWellEval.cpp +++ b/opm/simulators/wells/MultisegmentWellEval.cpp @@ -360,14 +360,6 @@ computeSegmentFluidProperties(const EvalWell& temperature, } } -template -typename MultisegmentWellEval::EvalWell -MultisegmentWellEval:: -getBhp() const -{ - return primary_variables_.getSegmentPressure(0); -} - template typename MultisegmentWellEval::EvalWell MultisegmentWellEval:: diff --git a/opm/simulators/wells/MultisegmentWellEval.hpp b/opm/simulators/wells/MultisegmentWellEval.hpp index 394bc968b..a11f3a1ba 100644 --- a/opm/simulators/wells/MultisegmentWellEval.hpp +++ b/opm/simulators/wells/MultisegmentWellEval.hpp @@ -138,7 +138,6 @@ protected: int pvt_region_index, DeferredLogger& deferred_logger); - EvalWell getBhp() const; EvalWell getFrictionPressureLoss(const int seg) const; EvalWell getHydroPressureLoss(const int seg) const; EvalWell getQs(const int comp_idx) const; diff --git a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp index 8d1c9e282..1394eabee 100644 --- a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp +++ b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp @@ -369,6 +369,14 @@ getSegmentPressure(const int seg) const return evaluation_[seg][SPres]; } +template +typename MultisegmentWellPrimaryVariables::EvalWell +MultisegmentWellPrimaryVariables:: +getBhp() const +{ + return this->getSegmentPressure(0); +} + #define INSTANCE(...) \ template class MultisegmentWellPrimaryVariables,__VA_ARGS__,double>; diff --git a/opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp b/opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp index 0da47e309..a97ab957d 100644 --- a/opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp +++ b/opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp @@ -109,6 +109,9 @@ public: const int seg_upwind, const size_t comp_idx) const; + //! \brief Get bottomhole pressure. + EvalWell getBhp() const; + //! \brief Get pressure for a segment. EvalWell getSegmentPressure(const int seg) const; diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 2b06df8a8..5c60f746b 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -1654,7 +1654,7 @@ namespace Opm prod_controls, getRefDensity(), this->getWQTotal(), - this->getBhp(), + this->primary_variables_.getBhp(), gQ, this->linSys_, deferred_logger);