mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MultisegmentWell: move code using WellSegments to compile unit
This commit is contained in:
@@ -182,6 +182,27 @@ accelerationalPressureLossConsidered() const
|
||||
return (segmentSet().compPressureDrop() == WellSegments::CompPressureDrop::HFA);
|
||||
}
|
||||
|
||||
|
||||
template<class Scalar>
|
||||
double
|
||||
MultisegmentWellGeneric<Scalar>::getSegmentDp(const int seg,
|
||||
const double density,
|
||||
const std::vector<double>& seg_dp) const
|
||||
{
|
||||
const double segment_depth = this->segmentSet()[seg].depth();
|
||||
const int outlet_segment_index = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment());
|
||||
const double segment_depth_outlet = seg == 0 ? baseif_.refDepth() : this->segmentSet()[outlet_segment_index].depth();
|
||||
double dp = wellhelpers::computeHydrostaticCorrection(segment_depth_outlet, segment_depth,
|
||||
density, baseif_.gravity());
|
||||
// we add the hydrostatic correction from the outlet segment
|
||||
// in order to get the correction all the way to the bhp ref depth.
|
||||
if (seg > 0) {
|
||||
dp += seg_dp[outlet_segment_index];
|
||||
}
|
||||
|
||||
return dp;
|
||||
}
|
||||
|
||||
template class MultisegmentWellGeneric<double>;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user