add two accessors in MultisegmentWellGeneric

for segment inlets and segment perforations
This commit is contained in:
Arne Morten Kvarving 2022-12-01 09:57:28 +01:00
parent ac245a2e17
commit ade6d99289
2 changed files with 31 additions and 9 deletions

View File

@ -170,6 +170,21 @@ compPressureDrop() const
return segmentSet().compPressureDrop();
}
template<typename Scalar>
const std::vector<std::vector<int>>&
MultisegmentWellGeneric<Scalar>::
segmentInlets() const
{
return segment_inlets_;
}
template<typename Scalar>
const std::vector<std::vector<int>>&
MultisegmentWellGeneric<Scalar>::
segmentPerforations() const
{
return segment_perforations_;
}
template<typename Scalar>
int

View File

@ -40,19 +40,16 @@ class WellState;
template <typename Scalar>
class MultisegmentWellGeneric
{
protected:
MultisegmentWellGeneric(WellInterfaceGeneric& baseif);
public:
//! \brief Returns the inlet segments for each segment.
const std::vector<std::vector<int>>& segmentInlets() const;
// scale the segment rates and pressure based on well rates and bhp
void scaleSegmentRatesWithWellRates(WellState& well_state) const;
void scaleSegmentPressuresWithBhp(WellState& well_state) const;
//! \brief Returns the perforation index for each segment.
const std::vector<std::vector<int>>& segmentPerforations() const;
// get the WellSegments from the well_ecl_
const WellSegments& segmentSet() const;
// components of the pressure drop to be included
WellSegments::CompPressureDrop compPressureDrop() const;
// segment number is an ID of the segment, it is specified in the deck
// get the loation of the segment with a segment number in the segmentSet
int segmentNumberToIndex(const int segment_number) const;
@ -60,6 +57,16 @@ protected:
/// number of segments for this well
int numberOfSegments() const;
protected:
MultisegmentWellGeneric(WellInterfaceGeneric& baseif);
// scale the segment rates and pressure based on well rates and bhp
void scaleSegmentRatesWithWellRates(WellState& well_state) const;
void scaleSegmentPressuresWithBhp(WellState& well_state) const;
// components of the pressure drop to be included
WellSegments::CompPressureDrop compPressureDrop() const;
/// Detect oscillation or stagnation based on the residual measure history
void detectOscillations(const std::vector<double>& measure_history,
const int it,
@ -82,7 +89,7 @@ protected:
// belonging to this segment
std::vector<std::vector<int>> segment_perforations_;
// the inlet segments for each segment. It is for convinience and efficiency reason
// the inlet segments for each segment. It is for convenience and efficiency reason
std::vector<std::vector<int>> segment_inlets_;
std::vector<double> segment_depth_diffs_;