#3442 Implement export of ICD/ICV table for performations

This commit is contained in:
Gaute Lindkvist
2018-11-29 15:20:36 +01:00
parent f0d3a36374
commit f14d36ca23
6 changed files with 198 additions and 41 deletions

View File

@@ -176,6 +176,38 @@ double RimWellPathValve::convertOrificeDiameter(double
return 0.0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<std::pair<double, double>> RimWellPathValve::segmentsBetweenValves() const
{
RimPerforationInterval* perforationInterval = nullptr;
this->firstAncestorOrThisOfType(perforationInterval);
double startMD = perforationInterval->startMD();
double endMD = perforationInterval->endMD();
std::vector<double> valveMDs = valveLocations();
std::vector<std::pair<double, double>> segments;
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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -54,6 +54,9 @@ public:
RiaEclipseUnitTools::UnitSystem wellPathUnitSystem,
RiaEclipseUnitTools::UnitSystem wantedUnitSystem);
std::vector<std::pair<double, double>> segmentsBetweenValves() const;
// Overrides from RimWellPathCompletionInterface
bool isEnabled() const override;
RiaDefines::WellPathComponentType componentType() const override;