mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2648 from joakim-hove/use-connections-segment-perf-length
Use WellConnections.segment_perf_length()
This commit is contained in:
commit
04f6c24022
@ -477,9 +477,6 @@ namespace Opm
|
||||
|
||||
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;
|
||||
|
||||
// assemble the pressure equation for sub-critical valve (WSEGVALV)
|
||||
|
@ -111,9 +111,6 @@ namespace Opm
|
||||
const double outlet_depth = outlet_segment.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>
|
||||
|
Loading…
Reference in New Issue
Block a user