Merge pull request #2648 from joakim-hove/use-connections-segment-perf-length

Use WellConnections.segment_perf_length()
This commit is contained in:
Joakim Hove 2020-06-05 11:05:57 +02:00 committed by GitHub
commit 04f6c24022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 38 deletions

View File

@ -477,9 +477,6 @@ namespace Opm
void assembleSICDPressureEq(const int seg, WellState& well_state) const; void assembleSICDPressureEq(const int seg, WellState& well_state) const;
// TODO: when more ICD devices join, we should have a better interface to do this
void calculateSICDFlowScalingFactors();
EvalWell pressureDropSpiralICD(const int seg) const; EvalWell pressureDropSpiralICD(const int seg) const;
// assemble the pressure equation for sub-critical valve (WSEGVALV) // assemble the pressure equation for sub-critical valve (WSEGVALV)

View File

@ -111,9 +111,6 @@ namespace Opm
const double outlet_depth = outlet_segment.depth(); const double outlet_depth = outlet_segment.depth();
segment_depth_diffs_[seg] = segment_depth - outlet_depth; segment_depth_diffs_[seg] = segment_depth - outlet_depth;
} }
// update the flow scaling factors for sicd segments
calculateSICDFlowScalingFactors();
} }
@ -3630,38 +3627,6 @@ namespace Opm
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
calculateSICDFlowScalingFactors()
{
// top segment will not be spiral ICD segment
for (int seg = 1; seg < numberOfSegments(); ++seg) {
const Segment& segment = segmentSet()[seg];
if (segment.segmentType() == Segment::SegmentType::SICD) {
// getting the segment length related to this ICD
const int parental_segment_number = segmentSet()[seg].outletSegment();
const double segment_length = segmentSet().segmentLength(parental_segment_number);
// getting the total completion length related to this ICD
// it should be connections
const auto& connections = well_ecl_.getConnections();
double total_connection_length = 0.;
for (const int conn : segment_perforations_[seg]) {
const auto& connection = connections.get(conn);
const auto& perf_range = connection.perf_range();
const double connection_length = perf_range->second - perf_range->first;
assert(connection_length > 0.);
total_connection_length += connection_length;
}
SICD& sicd = *segment.spiralICD();
sicd.updateScalingFactor(segment_length, total_connection_length);
}
}
}
template<typename TypeTag> template<typename TypeTag>