mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1518 Add option to chose between absolute or incremental calculations of length and depth when exporting completion data
This commit is contained in:
parent
dbc775e6c2
commit
bb8483a98b
@ -275,7 +275,7 @@ void RicWellPathExportCompletionDataFeature::generateWelsegsTable(RifEclipseOutp
|
|||||||
formatter.add(firstLocation.trueVerticalDepth);
|
formatter.add(firstLocation.trueVerticalDepth);
|
||||||
formatter.add(firstLocation.measuredDepth);
|
formatter.add(firstLocation.measuredDepth);
|
||||||
formatter.add("1*");
|
formatter.add("1*");
|
||||||
formatter.add("INC");
|
formatter.add(settings.lengthAndDepth().text());
|
||||||
formatter.add(settings.pressureDrop().text());
|
formatter.add(settings.pressureDrop().text());
|
||||||
|
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
@ -298,16 +298,31 @@ void RicWellPathExportCompletionDataFeature::generateWelsegsTable(RifEclipseOutp
|
|||||||
{
|
{
|
||||||
WellSegmentLocation previousLocation = firstLocation;
|
WellSegmentLocation previousLocation = firstLocation;
|
||||||
formatter.comment("Main stem");
|
formatter.comment("Main stem");
|
||||||
|
|
||||||
|
double depth = 0;
|
||||||
|
double length = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < locations.size(); ++i)
|
for (size_t i = 0; i < locations.size(); ++i)
|
||||||
{
|
{
|
||||||
const WellSegmentLocation& location = locations[i];
|
const WellSegmentLocation& location = locations[i];
|
||||||
|
|
||||||
|
if (settings.lengthAndDepth() == RimExportCompletionDataSettings::INC)
|
||||||
|
{
|
||||||
|
depth = location.trueVerticalDepth - previousLocation.trueVerticalDepth;
|
||||||
|
length = location.fishbonesSubs->locationOfSubs()[location.subIndex] - previousLocation.fishbonesSubs->locationOfSubs()[previousLocation.subIndex];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
depth += location.trueVerticalDepth - previousLocation.trueVerticalDepth;
|
||||||
|
length += location.fishbonesSubs->locationOfSubs()[location.subIndex] - previousLocation.fishbonesSubs->locationOfSubs()[previousLocation.subIndex];
|
||||||
|
}
|
||||||
|
|
||||||
formatter.comment(QString("Segment for sub %1").arg(location.subIndex));
|
formatter.comment(QString("Segment for sub %1").arg(location.subIndex));
|
||||||
formatter.add(location.segmentNumber).add(location.segmentNumber);
|
formatter.add(location.segmentNumber).add(location.segmentNumber);
|
||||||
formatter.add(1); // All segments on main stem are branch 1
|
formatter.add(1); // All segments on main stem are branch 1
|
||||||
formatter.add(location.segmentNumber - 1); // All main stem segments are connected to the segment below them
|
formatter.add(location.segmentNumber - 1); // All main stem segments are connected to the segment below them
|
||||||
formatter.add(location.fishbonesSubs->locationOfSubs()[location.subIndex] - previousLocation.fishbonesSubs->locationOfSubs()[previousLocation.subIndex]);
|
formatter.add(length);
|
||||||
formatter.add(location.trueVerticalDepth - previousLocation.trueVerticalDepth);
|
formatter.add(depth);
|
||||||
formatter.add(-1.0); // FIXME : Diam of main stem?
|
formatter.add(-1.0); // FIXME : Diam of main stem?
|
||||||
formatter.add(-1.0); // FIXME : Rough of main stem?
|
formatter.add(-1.0); // FIXME : Rough of main stem?
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
@ -326,14 +341,27 @@ void RicWellPathExportCompletionDataFeature::generateWelsegsTable(RifEclipseOutp
|
|||||||
{
|
{
|
||||||
formatter.comment(QString("%1 : Sub index %2 - Lateral %3").arg(location.fishbonesSubs->name()).arg(location.subIndex).arg(lateral.lateralIndex));
|
formatter.comment(QString("%1 : Sub index %2 - Lateral %3").arg(location.fishbonesSubs->name()).arg(location.subIndex).arg(lateral.lateralIndex));
|
||||||
|
|
||||||
|
double depth = 0;
|
||||||
|
double length = 0;
|
||||||
|
|
||||||
for (const WellSegmentLateralIntersection& intersection : lateral.intersections)
|
for (const WellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||||
{
|
{
|
||||||
|
if (settings.lengthAndDepth() == RimExportCompletionDataSettings::INC)
|
||||||
|
{
|
||||||
|
depth = intersection.depth;
|
||||||
|
length = intersection.length;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
depth += intersection.depth;
|
||||||
|
length += intersection.length;
|
||||||
|
}
|
||||||
formatter.add(intersection.segmentNumber);
|
formatter.add(intersection.segmentNumber);
|
||||||
formatter.add(intersection.segmentNumber);
|
formatter.add(intersection.segmentNumber);
|
||||||
formatter.add(lateral.branchNumber);
|
formatter.add(lateral.branchNumber);
|
||||||
formatter.add(intersection.attachedSegmentNumber);
|
formatter.add(intersection.attachedSegmentNumber);
|
||||||
formatter.add(intersection.length);
|
formatter.add(length);
|
||||||
formatter.add(intersection.depth);
|
formatter.add(depth);
|
||||||
formatter.add(location.fishbonesSubs->tubingRadius());
|
formatter.add(location.fishbonesSubs->tubingRadius());
|
||||||
formatter.add(location.fishbonesSubs->openHoleRoughnessFactor());
|
formatter.add(location.fishbonesSubs->openHoleRoughnessFactor());
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
|
@ -27,6 +27,14 @@ namespace caf {
|
|||||||
addItem(RimExportCompletionDataSettings::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration");
|
addItem(RimExportCompletionDataSettings::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration");
|
||||||
setDefault(RimExportCompletionDataSettings::HYDROSTATIC);
|
setDefault(RimExportCompletionDataSettings::HYDROSTATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void RimExportCompletionDataSettings::LengthAndDepthEnum::setUp()
|
||||||
|
{
|
||||||
|
addItem(RimExportCompletionDataSettings::INC, "INC", "Incremental");
|
||||||
|
addItem(RimExportCompletionDataSettings::ABS, "ABS", "Absolute");
|
||||||
|
setDefault(RimExportCompletionDataSettings::INC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimExportCompletionDataSettings, "RimExportCompletionDataSettings");
|
CAF_PDM_SOURCE_INIT(RimExportCompletionDataSettings, "RimExportCompletionDataSettings");
|
||||||
@ -41,4 +49,5 @@ RimExportCompletionDataSettings::RimExportCompletionDataSettings()
|
|||||||
CAF_PDM_InitField(&includeWpimult, "IncludeWPIMULT", true, "Include WPIMLUT", "", "", "");
|
CAF_PDM_InitField(&includeWpimult, "IncludeWPIMULT", true, "Include WPIMLUT", "", "", "");
|
||||||
CAF_PDM_InitField(&removeLateralsInMainBoreCells, "RemoveLateralsInMainBoreCells", false, "Remove Laterals in Main Bore Cells", "", "", "");
|
CAF_PDM_InitField(&removeLateralsInMainBoreCells, "RemoveLateralsInMainBoreCells", false, "Remove Laterals in Main Bore Cells", "", "", "");
|
||||||
CAF_PDM_InitFieldNoDefault(&pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
|
||||||
|
CAF_PDM_InitFieldNoDefault(&lengthAndDepth, "LengthAndDepth", "Length and Depth", "", "", "");
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,17 @@ public:
|
|||||||
|
|
||||||
typedef caf::AppEnum<RimExportCompletionDataSettings::PressureDropType> PressureDropEnum;
|
typedef caf::AppEnum<RimExportCompletionDataSettings::PressureDropType> PressureDropEnum;
|
||||||
|
|
||||||
|
enum LengthAndDepthType {
|
||||||
|
ABS,
|
||||||
|
INC
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef caf::AppEnum<RimExportCompletionDataSettings::LengthAndDepthType> LengthAndDepthEnum;
|
||||||
|
|
||||||
RimExportCompletionDataSettings();
|
RimExportCompletionDataSettings();
|
||||||
|
|
||||||
caf::PdmField<bool> includeWpimult;
|
caf::PdmField<bool> includeWpimult;
|
||||||
caf::PdmField<bool> removeLateralsInMainBoreCells;
|
caf::PdmField<bool> removeLateralsInMainBoreCells;
|
||||||
caf::PdmField<PressureDropEnum> pressureDrop;
|
caf::PdmField<PressureDropEnum> pressureDrop;
|
||||||
|
caf::PdmField<LengthAndDepthEnum> lengthAndDepth;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user