mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-13 17:02:13 -05:00
#1466 Fishbones MSW : Export of WSEGVALV
This commit is contained in:
1 parent
58bcaf5224
commit
1a36e0334b
6 files changed
+65
-3
No files matched your search
+53
-2
@@ -36,6 +36,8 @@
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
@@ -170,12 +172,16 @@ void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
generateWelsegsTable(formatter, wellPath, settings, locations);
|
||||
generateCompsegsTable(formatter, wellPath, settings, locations);
|
||||
generateWsegvalvTable(formatter, wellPath, settings, locations);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
formatter.keyword("WELSEGS");
|
||||
|
||||
@@ -258,6 +264,16 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
formatter.comment("Rough: MSW - Open Hole Roughness Factor");
|
||||
for (const WellSegmentLocation& location : locations)
|
||||
{
|
||||
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.rowCompleted();
|
||||
|
||||
for (const WellSegmentLateral& lateral : location.laterals)
|
||||
{
|
||||
formatter.comment(QString("%1 : Sub index %2 - Lateral %3").arg(location.fishbonesSubs->name()).arg(location.subIndex).arg(lateral.lateralIndex));
|
||||
@@ -297,7 +313,10 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
RigMainGrid* grid = settings.caseToApply->eclipseCaseData()->mainGrid();
|
||||
formatter.keyword("COMPSEGS");
|
||||
@@ -348,3 +367,35 @@ void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseData
|
||||
|
||||
formatter.tableCompleted();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWsegvalvTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
{
|
||||
formatter.keyword("WSEGVALV");
|
||||
std::vector<RifEclipseOutputTableColumn> header = {
|
||||
RifEclipseOutputTableColumn("Well Name"),
|
||||
RifEclipseOutputTableColumn("Seg No"),
|
||||
RifEclipseOutputTableColumn("Cv"),
|
||||
RifEclipseOutputTableColumn("Ac"),
|
||||
};
|
||||
formatter.header(header);
|
||||
}
|
||||
for (const WellSegmentLocation& location : locations)
|
||||
{
|
||||
formatter.add(wellPath->name());
|
||||
formatter.add(location.icdSegmentNumber);
|
||||
formatter.add(location.fishbonesSubs->icdFlowCoefficient());
|
||||
|
||||
double icdOrificeRadius = location.fishbonesSubs->icdOrificeDiameter() / 2;
|
||||
double icdArea = icdOrificeRadius * icdOrificeRadius * cvf::PI_D;
|
||||
formatter.add(icdArea * static_cast<double>(location.fishbonesSubs->icdCount()));
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
formatter.tableCompleted();
|
||||
}
|
||||
@@ -49,4 +49,5 @@ private:
|
||||
static void exportWellSegments(const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs, const RicExportWellSegmentsSettingsUi& settings);
|
||||
static void generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateWsegvalvTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
};
|
||||
+3
-1
@@ -507,7 +507,7 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
double length = 0;
|
||||
double depth = 0;
|
||||
cvf::Vec3d startPoint = coords[0];
|
||||
int attachedSegmentNumber = location->segmentNumber;
|
||||
int attachedSegmentNumber = location->icdSegmentNumber;
|
||||
|
||||
for (size_t i = 1; i < coords.size() && intersection != intersections.cend(); ++i)
|
||||
{
|
||||
@@ -547,6 +547,8 @@ void RicWellPathExportCompletionDataFeature::assignBranchAndSegmentNumbers(const
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
{
|
||||
location.segmentNumber = ++segmentNumber;
|
||||
location.icdBranchNumber = ++branchNumber;
|
||||
location.icdSegmentNumber = ++segmentNumber;
|
||||
}
|
||||
// Then assign branch and segment numbers to each lateral parts
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
|
||||
@@ -93,6 +93,8 @@ struct WellSegmentLocation {
|
||||
double trueVerticalDepth;
|
||||
size_t subIndex;
|
||||
int segmentNumber;
|
||||
int icdBranchNumber;
|
||||
int icdSegmentNumber;
|
||||
std::vector<WellSegmentLateral> laterals;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user