mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1466 Fishbones MSW : Export of WSEGVALV
This commit is contained in:
parent
58bcaf5224
commit
1a36e0334b
@ -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);
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -76,6 +76,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
|
||||
CAF_PDM_InitField(&m_icdCount, "IcdCount", size_t(2), "ICDs per Sub", "", "", "");
|
||||
CAF_PDM_InitField(&m_icdOrificeDiameter, "IcdOrificeDiameter", 7.0, "ICD Orifice Diameter [mm]", "", "", "");
|
||||
CAF_PDM_InitField(&m_icdFlowCoefficient, "IcdFlowCoeficcient", -1.0, "ICD Flow Coefficient", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_locationOfSubs, "LocationOfSubs", "Measured Depths [m]", "", "", "");
|
||||
m_locationOfSubs.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
|
||||
@ -403,6 +404,7 @@ void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
mswGroup->add(&m_lateralTubingRoghnessFactor);
|
||||
mswGroup->add(&m_icdCount);
|
||||
mswGroup->add(&m_icdOrificeDiameter);
|
||||
mswGroup->add(&m_icdFlowCoefficient);
|
||||
}
|
||||
|
||||
// Visibility
|
||||
|
@ -82,6 +82,9 @@ public:
|
||||
double tubingDiameter() const;
|
||||
double holeDiameter() const { return m_pipeProperties()->holeDiameter(); }
|
||||
double openHoleRoughnessFactor() const { return m_lateralOpenHoleRoghnessFactor(); }
|
||||
double icdOrificeDiameter() const { return m_icdOrificeDiameter(); }
|
||||
double icdFlowCoefficient() const { return m_icdFlowCoefficient(); }
|
||||
size_t icdCount() const { return m_icdCount(); }
|
||||
std::vector<double> lateralLengths() const;
|
||||
|
||||
const std::vector<SubLateralIndex>& installedLateralIndices() const { return m_subLateralIndices; };
|
||||
@ -126,6 +129,7 @@ private:
|
||||
|
||||
caf::PdmField<size_t> m_icdCount;
|
||||
caf::PdmField<double> m_icdOrificeDiameter;
|
||||
caf::PdmField<double> m_icdFlowCoefficient;
|
||||
|
||||
caf::PdmField<caf::AppEnum<LocationType> > m_subsLocationMode;
|
||||
caf::PdmField<double> m_rangeStart;
|
||||
|
Loading…
Reference in New Issue
Block a user