MultisegmentWell: move getWQTotal to MultisegmentWellPrimaryVariables

also drop otherwise unused getSegmentWQTotal
This commit is contained in:
Arne Morten Kvarving 2022-12-19 09:52:48 +01:00
parent 6b47f9bf1a
commit dbdcb2d5ce
5 changed files with 12 additions and 20 deletions

View File

@ -360,22 +360,6 @@ computeSegmentFluidProperties(const EvalWell& temperature,
}
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
getSegmentWQTotal(const int seg) const
{
return primary_variables_.evaluation_[seg][WQTotal];
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
getWQTotal() const
{
return getSegmentWQTotal(0);
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::

View File

@ -140,13 +140,10 @@ protected:
EvalWell getFrictionPressureLoss(const int seg) const;
EvalWell getHydroPressureLoss(const int seg) const;
EvalWell getSegmentWQTotal(const int seg) const;
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
const EvalWell& saltConcentration,
const int pvt_region_index,
const int seg_idx) const;
EvalWell getWQTotal() const;
std::pair<bool, std::vector<Scalar> >
getFiniteWellResiduals(const std::vector<Scalar>& B_avg,

View File

@ -394,6 +394,14 @@ getQs(const int comp_idx) const
return this->getSegmentRate(0, comp_idx);
}
template<class FluidSystem, class Indices, class Scalar>
typename MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::
getWQTotal() const
{
return evaluation_[0][WQTotal];
}
#define INSTANCE(...) \
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;

View File

@ -122,6 +122,9 @@ public:
//! \brief Returns scaled rate for a component.
EvalWell getQs(const int comp_idx) const;
//! \brief Get WQTotal.
EvalWell getWQTotal() const;
// the values for the primary varibles
// based on different solutioin strategies, the wells can have different primary variables
std::vector<std::array<double, numWellEq> > value_;

View File

@ -1653,7 +1653,7 @@ namespace Opm
inj_controls,
prod_controls,
getRefDensity(),
this->getWQTotal(),
this->primary_variables_.getWQTotal(),
this->primary_variables_.getBhp(),
gQ,
this->linSys_,