mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3442 Implement export of ICD/ICV table for performations
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user