mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MultisegmentWell: move getSegmentRate to MultisegmentWellPrimaryVariables
This commit is contained in:
parent
99020fe33b
commit
62297b2a63
@ -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>
|
template<typename FluidSystem, typename Indices, typename Scalar>
|
||||||
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
||||||
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
||||||
getQs(const int comp_idx) const
|
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>
|
template<typename FluidSystem, typename Indices, typename Scalar>
|
||||||
|
@ -142,7 +142,6 @@ protected:
|
|||||||
EvalWell getHydroPressureLoss(const int seg) const;
|
EvalWell getHydroPressureLoss(const int seg) const;
|
||||||
EvalWell getQs(const int comp_idx) const;
|
EvalWell getQs(const int comp_idx) const;
|
||||||
EvalWell getSegmentWQTotal(const int seg) const;
|
EvalWell getSegmentWQTotal(const int seg) const;
|
||||||
EvalWell getSegmentRate(const int seg, const int comp_idx) const;
|
|
||||||
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
|
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
|
||||||
const EvalWell& saltConcentration,
|
const EvalWell& saltConcentration,
|
||||||
const int pvt_region_index,
|
const int pvt_region_index,
|
||||||
|
@ -377,6 +377,15 @@ getBhp() const
|
|||||||
return this->getSegmentPressure(0);
|
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(...) \
|
#define INSTANCE(...) \
|
||||||
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||||
|
|
||||||
|
@ -115,6 +115,10 @@ public:
|
|||||||
//! \brief Get pressure for a segment.
|
//! \brief Get pressure for a segment.
|
||||||
EvalWell getSegmentPressure(const int seg) const;
|
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
|
// the values for the primary varibles
|
||||||
// based on different solutioin strategies, the wells can have different primary variables
|
// based on different solutioin strategies, the wells can have different primary variables
|
||||||
std::vector<std::array<double, numWellEq> > value_;
|
std::vector<std::array<double, numWellEq> > value_;
|
||||||
|
Loading…
Reference in New Issue
Block a user