From 2922a00fd622af02dc45a7b89f1c397d022a4411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Grip=20Fj=C3=A6r?= Date: Fri, 9 Jun 2017 12:27:21 +0200 Subject: [PATCH] #1586 Compute diameter and roughness for main bore and ICDs --- .../RicExportFishbonesWellSegmentsFeature.cpp | 13 ++++++++----- .../Completions/RimFishbonesCollection.cpp | 1 + .../Completions/RimFishbonesCollection.h | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/Commands/CompletionCommands/RicExportFishbonesWellSegmentsFeature.cpp b/ApplicationCode/Commands/CompletionCommands/RicExportFishbonesWellSegmentsFeature.cpp index 982ed62517..34ca9fa51c 100644 --- a/ApplicationCode/Commands/CompletionCommands/RicExportFishbonesWellSegmentsFeature.cpp +++ b/ApplicationCode/Commands/CompletionCommands/RicExportFishbonesWellSegmentsFeature.cpp @@ -244,6 +244,8 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT depth += location.trueVerticalDepth - previousTVD; length += location.fishbonesSubs->measuredDepth(location.subIndex) - previousMD; } + + double diameter = computeEffectiveDiameter(wellPath->fishbonesCollection()->linerDiameter(), wellPath->fishbonesCollection()->mainBoreDiameter()); formatter.comment(QString("Segment for sub %1").arg(location.subIndex)); formatter.add(location.segmentNumber).add(location.segmentNumber); @@ -251,8 +253,8 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT formatter.add(location.segmentNumber - 1); // All main stem segments are connected to the segment below them formatter.add(length); formatter.add(depth); - formatter.add(-1.0); // FIXME : Diam of main stem? - formatter.add(-1.0); // FIXME : Rough of main stem? + formatter.add(diameter); + formatter.add(wellPath->fishbonesCollection()->roughnessFactor()); formatter.rowCompleted(); previousMD = location.measuredDepth; @@ -266,14 +268,15 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT formatter.comment("Rough: MSW - Open Hole Roughness Factor"); for (const WellSegmentLocation& location : locations) { + double diameter = computeEffectiveDiameter(wellPath->fishbonesCollection()->linerDiameter(), wellPath->fishbonesCollection()->mainBoreDiameter()); formatter.comment("ICD"); formatter.add(location.icdSegmentNumber).add(location.icdSegmentNumber); formatter.add(location.icdBranchNumber); formatter.add(location.segmentNumber); formatter.add(0.1); // ICDs have 0.1 length formatter.add(0); // Depth change - formatter.add(-1.0); // Diam? - formatter.add(-1.0); // Rough? + formatter.add(diameter); + formatter.add(wellPath->fishbonesCollection()->roughnessFactor()); formatter.rowCompleted(); for (const WellSegmentLateral& lateral : location.laterals) @@ -416,7 +419,7 @@ double RicExportFishbonesWellSegmentsFeature::computeEffectiveDiameter(double in double effectiveArea = outerArea - innerArea; - double effectiveRadius = cvf::Math::sqrt(effectiveArea / cvf::PI_D * 2); + double effectiveRadius = cvf::Math::sqrt(effectiveArea / cvf::PI_D); return effectiveRadius * 2; } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp index 3ff377e377..3916c879f6 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp @@ -54,6 +54,7 @@ RimFishbonesCollection::RimFishbonesCollection() CAF_PDM_InitField(&m_startMD, "StartMD", HUGE_VAL, "Start MD", "", "", ""); CAF_PDM_InitField(&m_mainBoreDiameter, "MainBoreDiameter", 0.0, "Main Bore Diameter", "", "", ""); CAF_PDM_InitField(&m_linerDiameter, "LinerDiameter", 0.0, "Liner Diameter", "", "", ""); + CAF_PDM_InitField(&m_roughnessFactor, "RoughnessFactor", 0.0, "Roughness Factor", "", "", ""); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.h b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.h index f8b560e9b1..6e428d760e 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesCollection.h @@ -48,6 +48,9 @@ public: void recalculateStartMD(); double startMD() const { return m_startMD(); } + double mainBoreDiameter() const { return m_mainBoreDiameter(); } + double linerDiameter() const { return m_linerDiameter(); } + double roughnessFactor() const { return m_roughnessFactor(); } protected: virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; @@ -61,4 +64,5 @@ private: caf::PdmField m_startMD; caf::PdmField m_mainBoreDiameter; caf::PdmField m_linerDiameter; + caf::PdmField m_roughnessFactor; };