MultisegmentWell: move getSegmentRate to MultisegmentWellPrimaryVariables

This commit is contained in:
Arne Morten Kvarving 2022-12-19 09:52:48 +01:00
parent 99020fe33b
commit 62297b2a63
4 changed files with 14 additions and 12 deletions

View File

@ -360,22 +360,12 @@ computeSegmentFluidProperties(const EvalWell& temperature,
}
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
getSegmentRate(const int seg,
const int comp_idx) const
{
return primary_variables_.evaluation_[seg][WQTotal] *
primary_variables_.volumeFractionScaled(seg, comp_idx);
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
getQs(const int comp_idx) const
{
return getSegmentRate(0, comp_idx);
return primary_variables_.getSegmentRate(0, comp_idx);
}
template<typename FluidSystem, typename Indices, typename Scalar>

View File

@ -142,7 +142,6 @@ protected:
EvalWell getHydroPressureLoss(const int seg) const;
EvalWell getQs(const int comp_idx) const;
EvalWell getSegmentWQTotal(const int seg) const;
EvalWell getSegmentRate(const int seg, const int comp_idx) const;
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
const EvalWell& saltConcentration,
const int pvt_region_index,

View File

@ -377,6 +377,15 @@ getBhp() const
return this->getSegmentPressure(0);
}
template<class FluidSystem, class Indices, class Scalar>
typename MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::
getSegmentRate(const int seg,
const int comp_idx) const
{
return evaluation_[seg][WQTotal] * this->volumeFractionScaled(seg, comp_idx);
}
#define INSTANCE(...) \
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;

View File

@ -115,6 +115,10 @@ public:
//! \brief Get pressure for a segment.
EvalWell getSegmentPressure(const int seg) const;
//! \brief Get rate for a component in a segment.
EvalWell getSegmentRate(const int seg,
const int comp_idx) 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_;