mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
MSW : Make sure the ICV is using the full perforation interval #6152
This commit is contained in:
parent
277ff167a3
commit
63f964da82
@ -264,28 +264,39 @@ std::vector<std::pair<double, double>> RimWellPathValve::valveSegments() const
|
|||||||
RimPerforationInterval* perforationInterval = nullptr;
|
RimPerforationInterval* perforationInterval = nullptr;
|
||||||
this->firstAncestorOrThisOfType( perforationInterval );
|
this->firstAncestorOrThisOfType( perforationInterval );
|
||||||
|
|
||||||
double startMD = this->startMD();
|
|
||||||
double endMD = this->endMD();
|
|
||||||
|
|
||||||
std::vector<double> valveMDs = valveLocations();
|
|
||||||
|
|
||||||
std::vector<std::pair<double, double>> segments;
|
std::vector<std::pair<double, double>> segments;
|
||||||
segments.reserve( valveMDs.size() );
|
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
|
||||||
|
|
||||||
for ( size_t i = 0; i < valveMDs.size(); ++i )
|
|
||||||
{
|
{
|
||||||
double segmentStart = startMD;
|
// Flow for ICV is defined as the complete perforation interval
|
||||||
double segmentEnd = endMD;
|
|
||||||
if ( i > 0 )
|
segments.push_back( std::make_pair( perforationInterval->startMD(), perforationInterval->endMD() ) );
|
||||||
{
|
|
||||||
segmentStart = 0.5 * ( valveMDs[i - 1] + valveMDs[i] );
|
|
||||||
}
|
|
||||||
if ( i < valveMDs.size() - 1u )
|
|
||||||
{
|
|
||||||
segmentEnd = 0.5 * ( valveMDs[i] + valveMDs[i + 1] );
|
|
||||||
}
|
|
||||||
segments.push_back( std::make_pair( segmentStart, segmentEnd ) );
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ICD/AICD : Use the valve start/end, can be a subset of perforation interval
|
||||||
|
|
||||||
|
double startMD = this->startMD();
|
||||||
|
double endMD = this->endMD();
|
||||||
|
|
||||||
|
std::vector<double> valveMDs = valveLocations();
|
||||||
|
segments.reserve( valveMDs.size() );
|
||||||
|
|
||||||
|
for ( size_t i = 0; i < valveMDs.size(); ++i )
|
||||||
|
{
|
||||||
|
double segmentStart = startMD;
|
||||||
|
double segmentEnd = endMD;
|
||||||
|
if ( i > 0 )
|
||||||
|
{
|
||||||
|
segmentStart = 0.5 * ( valveMDs[i - 1] + valveMDs[i] );
|
||||||
|
}
|
||||||
|
if ( i < valveMDs.size() - 1u )
|
||||||
|
{
|
||||||
|
segmentEnd = 0.5 * ( valveMDs[i] + valveMDs[i + 1] );
|
||||||
|
}
|
||||||
|
segments.push_back( std::make_pair( segmentStart, segmentEnd ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return segments;
|
return segments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user