mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
dcdd8cce2a
commit
8afc30d6f8
@ -19,9 +19,9 @@
|
|||||||
#include "RicWellPathExportCompletionDataFeatureImpl.h"
|
#include "RicWellPathExportCompletionDataFeatureImpl.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiaFilePathTools.h"
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
#include "RiaPreferences.h"
|
#include "RiaPreferences.h"
|
||||||
#include "RiaFilePathTools.h"
|
|
||||||
|
|
||||||
#include "RicExportCompletionDataSettingsUi.h"
|
#include "RicExportCompletionDataSettingsUi.h"
|
||||||
#include "RicExportFeatureImpl.h"
|
#include "RicExportFeatureImpl.h"
|
||||||
@ -41,20 +41,20 @@
|
|||||||
#include "RigWellLogExtractor.h"
|
#include "RigWellLogExtractor.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
#include "RigWellPathIntersectionTools.h"
|
#include "RigWellPathIntersectionTools.h"
|
||||||
|
|
||||||
#include "RimFileWellPath.h"
|
#include "RimFileWellPath.h"
|
||||||
#include "RimFishbonesCollection.h"
|
#include "RimFishbonesCollection.h"
|
||||||
#include "RimFishbonesMultipleSubs.h"
|
#include "RimFishbonesMultipleSubs.h"
|
||||||
#include "RimFractureTemplate.h"
|
#include "RimFractureTemplate.h"
|
||||||
#include "RimPerforationCollection.h"
|
#include "RimPerforationCollection.h"
|
||||||
#include "RimPerforationInterval.h"
|
#include "RimPerforationInterval.h"
|
||||||
|
#include "RimProject.h"
|
||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPathCompletions.h"
|
#include "RimWellPathCompletions.h"
|
||||||
#include "RimWellPathFracture.h"
|
#include "RimWellPathFracture.h"
|
||||||
#include "RimWellPathFractureCollection.h"
|
#include "RimWellPathFractureCollection.h"
|
||||||
#include "RimProject.h"
|
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
@ -80,8 +80,11 @@ const RimWellPath* findWellPathFromExportName(const QString& wellNameForExport);
|
|||||||
class OpenFileException
|
class OpenFileException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OpenFileException(const QString &message) : message(message) {}
|
OpenFileException(const QString& message)
|
||||||
QString message;
|
: message(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
QString message;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -110,7 +113,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int caseId = exportSettings.caseToApply->caseId();
|
int caseId = exportSettings.caseToApply->caseId();
|
||||||
QString format = QString("Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"");
|
QString format =
|
||||||
|
QString("Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"");
|
||||||
QString errMsg = format.arg(wellPath->name()).arg(caseId);
|
QString errMsg = format.arg(wellPath->name()).arg(caseId);
|
||||||
RiaLogging::error(errMsg);
|
RiaLogging::error(errMsg);
|
||||||
}
|
}
|
||||||
@ -135,7 +139,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
if (!fractureTransmissibilityExportInformationFile.open(QIODevice::WriteOnly))
|
if (!fractureTransmissibilityExportInformationFile.open(QIODevice::WriteOnly))
|
||||||
{
|
{
|
||||||
RiaLogging::error(QString("Export Completions Data: Could not open the file: %1")
|
RiaLogging::error(QString("Export Completions Data: Could not open the file: %1")
|
||||||
.arg(fractureTransmisibillityExportInformationPath));
|
.arg(fractureTransmisibillityExportInformationPath));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -144,12 +148,13 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t maxProgress = usedWellPaths.size() * 3 + simWells.size() +
|
size_t maxProgress =
|
||||||
|
usedWellPaths.size() * 3 + simWells.size() +
|
||||||
(exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
(exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||||
? usedWellPaths.size()
|
? usedWellPaths.size()
|
||||||
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||||
? usedWellPaths.size() * 3
|
? usedWellPaths.size() * 3
|
||||||
: 1) +
|
: 1) +
|
||||||
simWells.size();
|
simWells.size();
|
||||||
|
|
||||||
caf::ProgressInfo progress(maxProgress, "Export Completions");
|
caf::ProgressInfo progress(maxProgress, "Export Completions");
|
||||||
@ -198,7 +203,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
|
|
||||||
std::vector<RigCompletionData> fractureCompletionData =
|
std::vector<RigCompletionData> fractureCompletionData =
|
||||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(
|
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(
|
||||||
wellPath, exportSettings.caseToApply(), reportItems, fractureTransmissibilityExportInformationStream.get());
|
wellPath,
|
||||||
|
exportSettings.caseToApply(),
|
||||||
|
reportItems,
|
||||||
|
fractureTransmissibilityExportInformationStream.get());
|
||||||
|
|
||||||
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fractureCompletionData);
|
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fractureCompletionData);
|
||||||
appendCompletionData(&completionsPerEclipseCellFracture, fractureCompletionData);
|
appendCompletionData(&completionsPerEclipseCellFracture, fractureCompletionData);
|
||||||
@ -236,8 +244,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
{
|
{
|
||||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCell;
|
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCell;
|
||||||
|
|
||||||
std::vector<RigCompletionData> fractureCompletionData = RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(
|
std::vector<RigCompletionData> fractureCompletionData =
|
||||||
exportSettings.caseToApply(), simWell, fractureTransmissibilityExportInformationStream.get());
|
RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(
|
||||||
|
exportSettings.caseToApply(), simWell, fractureTransmissibilityExportInformationStream.get());
|
||||||
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
|
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
|
||||||
|
|
||||||
for (auto& data : completionsPerEclipseCell)
|
for (auto& data : completionsPerEclipseCell)
|
||||||
@ -359,35 +368,31 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exportSettings.includeMsw)
|
if (exportSettings.includeMsw)
|
||||||
{
|
{
|
||||||
if (exportSettings.includeFractures())
|
if (exportSettings.includeFractures())
|
||||||
{
|
{
|
||||||
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||||
|
|
||||||
for (const auto wellPath : wellPaths)
|
for (const auto wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
auto fractures = wellPath->fractureCollection()->fractures();
|
auto fractures = wellPath->fractureCollection()->fractures();
|
||||||
exportWellSegments(exportSettings.caseToApply,
|
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fractures);
|
||||||
exportFile,
|
|
||||||
wellPath, fractures);
|
|
||||||
}
|
}
|
||||||
exportFile->close();
|
exportFile->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exportSettings.includeFishbones())
|
if (exportSettings.includeFishbones())
|
||||||
{
|
{
|
||||||
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||||
|
|
||||||
for (const auto wellPath : wellPaths)
|
for (const auto wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
||||||
exportWellSegments(exportSettings.caseToApply,
|
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fishbones);
|
||||||
exportFile,
|
|
||||||
wellPath, fishbones);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exportFile->close();
|
exportFile->close();
|
||||||
@ -395,15 +400,13 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
|
|
||||||
if (false && exportSettings.includePerforations())
|
if (false && exportSettings.includePerforations())
|
||||||
{
|
{
|
||||||
QString fileName = QString("%1-Perforation-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
QString fileName = QString("%1-Perforation-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||||
|
|
||||||
for (const auto wellPath : wellPaths)
|
for (const auto wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
auto perforations = wellPath->perforationIntervalCollection()->perforations();
|
auto perforations = wellPath->perforationIntervalCollection()->perforations();
|
||||||
exportWellSegments(exportSettings.caseToApply,
|
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, perforations);
|
||||||
exportFile,
|
|
||||||
wellPath, perforations);
|
|
||||||
}
|
}
|
||||||
exportFile->close();
|
exportFile->close();
|
||||||
}
|
}
|
||||||
@ -740,8 +743,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTable(
|
|||||||
formatter.add(intersection.gridName());
|
formatter.add(intersection.gridName());
|
||||||
}
|
}
|
||||||
cvf::Vec3st ijk = intersection.gridLocalCellIJK();
|
cvf::Vec3st ijk = intersection.gridLocalCellIJK();
|
||||||
formatter.addOneBasedCellIndex(ijk.x()).addOneBasedCellIndex(ijk.y()).addOneBasedCellIndex(
|
formatter.addOneBasedCellIndex(ijk.x()).addOneBasedCellIndex(ijk.y()).addOneBasedCellIndex(ijk.z());
|
||||||
ijk.z());
|
|
||||||
formatter.add(completion.branchNumber());
|
formatter.add(completion.branchNumber());
|
||||||
|
|
||||||
double startLength = segment.startMD();
|
double startLength = segment.startMD();
|
||||||
@ -968,7 +970,7 @@ RigCompletionData
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QString& fullFileName)
|
QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QString& fullFileName)
|
||||||
{
|
{
|
||||||
@ -977,7 +979,7 @@ QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QString& folderName, const QString& fileName)
|
QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QString& folderName, const QString& fileName)
|
||||||
{
|
{
|
||||||
@ -1007,10 +1009,10 @@ QFilePtr RicWellPathExportCompletionDataFeatureImpl::openFileForExport(const QSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RigCompletionData>
|
std::vector<RigCompletionData>
|
||||||
RicWellPathExportCompletionDataFeatureImpl::mainGridCompletions(std::vector<RigCompletionData>& allCompletions)
|
RicWellPathExportCompletionDataFeatureImpl::mainGridCompletions(std::vector<RigCompletionData>& allCompletions)
|
||||||
{
|
{
|
||||||
std::vector<RigCompletionData> completions;
|
std::vector<RigCompletionData> completions;
|
||||||
|
|
||||||
@ -1026,10 +1028,10 @@ RicWellPathExportCompletionDataFeatureImpl::mainGridCompletions(std::vector<RigC
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::map<QString, std::vector<RigCompletionData>>
|
std::map<QString, std::vector<RigCompletionData>>
|
||||||
RicWellPathExportCompletionDataFeatureImpl::subGridsCompletions(std::vector<RigCompletionData>& allCompletions)
|
RicWellPathExportCompletionDataFeatureImpl::subGridsCompletions(std::vector<RigCompletionData>& allCompletions)
|
||||||
{
|
{
|
||||||
std::map<QString, std::vector<RigCompletionData>> completions;
|
std::map<QString, std::vector<RigCompletionData>> completions;
|
||||||
|
|
||||||
@ -1041,8 +1043,7 @@ RicWellPathExportCompletionDataFeatureImpl::subGridsCompletions(std::vector<RigC
|
|||||||
auto it = completions.find(gridName);
|
auto it = completions.find(gridName);
|
||||||
if (it == completions.end())
|
if (it == completions.end())
|
||||||
{
|
{
|
||||||
completions.insert(
|
completions.insert(std::pair<QString, std::vector<RigCompletionData>>(gridName, {completion}));
|
||||||
std::pair<QString, std::vector<RigCompletionData>>(gridName, {completion}));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1054,11 +1055,12 @@ RicWellPathExportCompletionDataFeatureImpl::subGridsCompletions(std::vector<RigC
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWellPathFractureReport(RimEclipseCase* sourceCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWellPathFractureReport(
|
||||||
QFilePtr exportFile,
|
RimEclipseCase* sourceCase,
|
||||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems)
|
QFilePtr exportFile,
|
||||||
|
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems)
|
||||||
{
|
{
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
|
|
||||||
@ -1093,10 +1095,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellPathFractureReport(Ri
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile(RimEclipseCase* gridCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile(RimEclipseCase* gridCase,
|
||||||
QFilePtr exportFile,
|
QFilePtr exportFile,
|
||||||
const std::vector<RigCompletionData>& completions)
|
const std::vector<RigCompletionData>& completions)
|
||||||
{
|
{
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
@ -1104,14 +1106,12 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile(RimEclipse
|
|||||||
RifEclipseDataTableFormatter formatter(stream);
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
formatter.setColumnSpacing(3);
|
formatter.setColumnSpacing(3);
|
||||||
|
|
||||||
std::vector<RifEclipseOutputTableColumn> header = {
|
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Well"),
|
||||||
RifEclipseOutputTableColumn("Well"),
|
RifEclipseOutputTableColumn("Grp"),
|
||||||
RifEclipseOutputTableColumn("Grp"),
|
RifEclipseOutputTableColumn("I"),
|
||||||
RifEclipseOutputTableColumn("I"),
|
RifEclipseOutputTableColumn("J"),
|
||||||
RifEclipseOutputTableColumn("J"),
|
RifEclipseOutputTableColumn("RefDepth"),
|
||||||
RifEclipseOutputTableColumn("RefDepth"),
|
RifEclipseOutputTableColumn("WellType")};
|
||||||
RifEclipseOutputTableColumn("WellType")
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter.keyword("WELSPECS");
|
formatter.keyword("WELSPECS");
|
||||||
formatter.header(header);
|
formatter.header(header);
|
||||||
@ -1131,11 +1131,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile(RimEclipse
|
|||||||
// Export
|
// Export
|
||||||
for (const auto wellPath : wellPathSet)
|
for (const auto wellPath : wellPathSet)
|
||||||
{
|
{
|
||||||
auto completions = wellPath->completions();
|
auto completions = wellPath->completions();
|
||||||
cvf::Vec2i ijIntersection = wellPathUpperGridIntersectionIJ(gridCase, wellPath);
|
cvf::Vec2i ijIntersection = wellPathUpperGridIntersectionIJ(gridCase, wellPath);
|
||||||
|
|
||||||
formatter
|
formatter.add(completions->wellNameForExport())
|
||||||
.add(completions->wellNameForExport())
|
|
||||||
.add(completions->wellGroupNameForExport())
|
.add(completions->wellGroupNameForExport())
|
||||||
.addOneBasedCellIndex(ijIntersection.x())
|
.addOneBasedCellIndex(ijIntersection.x())
|
||||||
.addOneBasedCellIndex(ijIntersection.y())
|
.addOneBasedCellIndex(ijIntersection.y())
|
||||||
@ -1148,26 +1147,25 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile(RimEclipse
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(RimEclipseCase* gridCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||||
QFilePtr exportFile,
|
RimEclipseCase* gridCase,
|
||||||
const std::map<QString, std::vector<RigCompletionData>>& completions)
|
QFilePtr exportFile,
|
||||||
|
const std::map<QString, std::vector<RigCompletionData>>& completions)
|
||||||
{
|
{
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
|
|
||||||
RifEclipseDataTableFormatter formatter(stream);
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
formatter.setColumnSpacing(3);
|
formatter.setColumnSpacing(3);
|
||||||
|
|
||||||
std::vector<RifEclipseOutputTableColumn> header = {
|
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Well"),
|
||||||
RifEclipseOutputTableColumn("Well"),
|
RifEclipseOutputTableColumn("Grp"),
|
||||||
RifEclipseOutputTableColumn("Grp"),
|
RifEclipseOutputTableColumn("LGR"),
|
||||||
RifEclipseOutputTableColumn("LGR"),
|
RifEclipseOutputTableColumn("I"),
|
||||||
RifEclipseOutputTableColumn("I"),
|
RifEclipseOutputTableColumn("J"),
|
||||||
RifEclipseOutputTableColumn("J"),
|
RifEclipseOutputTableColumn("RefDepth"),
|
||||||
RifEclipseOutputTableColumn("RefDepth"),
|
RifEclipseOutputTableColumn("WellType")};
|
||||||
RifEclipseOutputTableColumn("WellType")
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter.keyword("WELSPECL");
|
formatter.keyword("WELSPECL");
|
||||||
formatter.header(header);
|
formatter.header(header);
|
||||||
@ -1196,11 +1194,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(RimEclipse
|
|||||||
// Export
|
// Export
|
||||||
for (const auto wellPath : wellPathsForLgr.second)
|
for (const auto wellPath : wellPathsForLgr.second)
|
||||||
{
|
{
|
||||||
auto completions = wellPath->completions();
|
auto completions = wellPath->completions();
|
||||||
cvf::Vec2i ijIntersection = wellPathUpperGridIntersectionIJ(gridCase, wellPath, lgrName);
|
cvf::Vec2i ijIntersection = wellPathUpperGridIntersectionIJ(gridCase, wellPath, lgrName);
|
||||||
|
|
||||||
formatter
|
formatter.add(completions->wellNameForExport())
|
||||||
.add(completions->wellNameForExport())
|
|
||||||
.add(completions->wellGroupNameForExport())
|
.add(completions->wellGroupNameForExport())
|
||||||
.add(lgrName)
|
.add(lgrName)
|
||||||
.addOneBasedCellIndex(ijIntersection.x())
|
.addOneBasedCellIndex(ijIntersection.x())
|
||||||
@ -1242,23 +1239,25 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
|||||||
exportWelspecsToFile(eclipseCase, exportFile, completionsForMainGrid);
|
exportWelspecsToFile(eclipseCase, exportFile, completionsForMainGrid);
|
||||||
exportCompdatAndWpimultTables(eclipseCase, exportFile, completionsForGrid, exportType);
|
exportCompdatAndWpimultTables(eclipseCase, exportFile, completionsForGrid, exportType);
|
||||||
}
|
}
|
||||||
catch(OpenFileException)
|
catch (OpenFileException)
|
||||||
{ }
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!completionsForSubGrids.empty())
|
if (!completionsForSubGrids.empty())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
QString lgrFileName = fileName + "_LGR";
|
QString lgrFileName = fileName + "_LGR";
|
||||||
QFilePtr exportFile = openFileForExport(folderName, lgrFileName);
|
QFilePtr exportFile = openFileForExport(folderName, lgrFileName);
|
||||||
|
|
||||||
exportWellPathFractureReport(eclipseCase, exportFile, wellPathFractureReportItems);
|
exportWellPathFractureReport(eclipseCase, exportFile, wellPathFractureReportItems);
|
||||||
exportWelspeclToFile(eclipseCase, exportFile, completionsForSubGrids);
|
exportWelspeclToFile(eclipseCase, exportFile, completionsForSubGrids);
|
||||||
exportCompdatAndWpimultTables(eclipseCase, exportFile, completionsForSubGrids, exportType);
|
exportCompdatAndWpimultTables(eclipseCase, exportFile, completionsForSubGrids, exportType);
|
||||||
}
|
}
|
||||||
catch(OpenFileException)
|
catch (OpenFileException)
|
||||||
{ }
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1310,7 +1309,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
|||||||
|
|
||||||
if (gridName.isEmpty())
|
if (gridName.isEmpty())
|
||||||
{
|
{
|
||||||
header = { RifEclipseOutputTableColumn("Well"),
|
header = {RifEclipseOutputTableColumn("Well"),
|
||||||
RifEclipseOutputTableColumn("I"),
|
RifEclipseOutputTableColumn("I"),
|
||||||
RifEclipseOutputTableColumn("J"),
|
RifEclipseOutputTableColumn("J"),
|
||||||
RifEclipseOutputTableColumn("K1"),
|
RifEclipseOutputTableColumn("K1"),
|
||||||
@ -1325,7 +1324,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
|||||||
RifEclipseOutputTableColumn("S"),
|
RifEclipseOutputTableColumn("S"),
|
||||||
RifEclipseOutputTableColumn(
|
RifEclipseOutputTableColumn(
|
||||||
"Df", RifEclipseOutputTableDoubleFormatting(RifEclipseOutputTableDoubleFormat::RIF_SCIENTIFIC)),
|
"Df", RifEclipseOutputTableDoubleFormatting(RifEclipseOutputTableDoubleFormat::RIF_SCIENTIFIC)),
|
||||||
RifEclipseOutputTableColumn("DIR") };
|
RifEclipseOutputTableColumn("DIR")};
|
||||||
|
|
||||||
formatter.keyword("COMPDAT");
|
formatter.keyword("COMPDAT");
|
||||||
}
|
}
|
||||||
@ -1347,7 +1346,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
|||||||
RifEclipseOutputTableColumn("S"),
|
RifEclipseOutputTableColumn("S"),
|
||||||
RifEclipseOutputTableColumn(
|
RifEclipseOutputTableColumn(
|
||||||
"Df", RifEclipseOutputTableDoubleFormatting(RifEclipseOutputTableDoubleFormat::RIF_SCIENTIFIC)),
|
"Df", RifEclipseOutputTableDoubleFormatting(RifEclipseOutputTableDoubleFormat::RIF_SCIENTIFIC)),
|
||||||
RifEclipseOutputTableColumn("DIR") };
|
RifEclipseOutputTableColumn("DIR")};
|
||||||
|
|
||||||
formatter.keyword("COMPDATL");
|
formatter.keyword("COMPDATL");
|
||||||
}
|
}
|
||||||
@ -1661,9 +1660,9 @@ RicMswExportInfo
|
|||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const std::vector<RimWellPathFracture*>& fractures)
|
const std::vector<RimWellPathFracture*>& fractures)
|
||||||
{
|
{
|
||||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||||
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||||
|
|
||||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||||
@ -1759,14 +1758,13 @@ RicMswExportInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generatePerforationsMswExportInfo(RimEclipseCase* caseToApply,
|
RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generatePerforationsMswExportInfo(
|
||||||
const RimWellPath* wellPath,
|
RimEclipseCase* caseToApply,
|
||||||
const std::vector<const RimPerforationInterval*>& perforationIntervals)
|
const RimWellPath* wellPath,
|
||||||
|
const std::vector<const RimPerforationInterval*>& perforationIntervals)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
return RicMswExportInfo(wellPath, RiaEclipseUnitTools::UNITS_METRIC, 0, "LENdep", "pRES");
|
return RicMswExportInfo(wellPath, RiaEclipseUnitTools::UNITS_METRIC, 0, "LENdep", "pRES");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2157,18 +2155,18 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Vec2i RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ(const RimEclipseCase* gridCase,
|
cvf::Vec2i RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ(const RimEclipseCase* gridCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const QString& gridName)
|
const QString& gridName)
|
||||||
{
|
{
|
||||||
const RigEclipseCaseData* caseData = gridCase->eclipseCaseData();
|
const RigEclipseCaseData* caseData = gridCase->eclipseCaseData();
|
||||||
const RigMainGrid* mainGrid = caseData->mainGrid();
|
const RigMainGrid* mainGrid = caseData->mainGrid();
|
||||||
const RigActiveCellInfo* activeCellInfo = caseData->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
const RigActiveCellInfo* activeCellInfo = caseData->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||||
CVF_ASSERT(!coords.empty() && !mds.empty());
|
CVF_ASSERT(!coords.empty() && !mds.empty());
|
||||||
|
|
||||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||||
@ -2202,9 +2200,9 @@ cvf::Vec2i RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersec
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCase* eclipseCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCase* eclipseCase,
|
||||||
QFilePtr exportFile,
|
QFilePtr exportFile,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const std::vector<RimWellPathFracture*>& fractures)
|
const std::vector<RimWellPathFracture*>& fractures)
|
||||||
{
|
{
|
||||||
if (eclipseCase == nullptr)
|
if (eclipseCase == nullptr)
|
||||||
@ -2213,20 +2211,21 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RicMswExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFracturesMswExportInfo(eclipseCase, wellPath, fractures);
|
RicMswExportInfo exportInfo =
|
||||||
|
RicWellPathExportCompletionDataFeatureImpl::generateFracturesMswExportInfo(eclipseCase, wellPath, fractures);
|
||||||
|
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
RifEclipseDataTableFormatter formatter(stream);
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCase* eclipseCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCase* eclipseCase,
|
||||||
QFilePtr exportFile,
|
QFilePtr exportFile,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs)
|
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs)
|
||||||
{
|
{
|
||||||
if (eclipseCase == nullptr)
|
if (eclipseCase == nullptr)
|
||||||
@ -2235,23 +2234,24 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RicMswExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(eclipseCase, wellPath, fishbonesSubs);
|
RicMswExportInfo exportInfo =
|
||||||
|
RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(eclipseCase, wellPath, fishbonesSubs);
|
||||||
|
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
RifEclipseDataTableFormatter formatter(stream);
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateWsegvalvTable(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateWsegvalvTable(formatter, exportInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCase* eclipseCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(
|
||||||
QFilePtr exportFile,
|
RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
QFilePtr exportFile,
|
||||||
const std::vector<const RimPerforationInterval*>& perforationIntervals)
|
const RimWellPath* wellPath,
|
||||||
|
const std::vector<const RimPerforationInterval*>& perforationIntervals)
|
||||||
{
|
{
|
||||||
if (eclipseCase == nullptr)
|
if (eclipseCase == nullptr)
|
||||||
{
|
{
|
||||||
@ -2259,9 +2259,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(RimEclipseCa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RicMswExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generatePerforationsMswExportInfo(eclipseCase, wellPath, perforationIntervals);
|
RicMswExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generatePerforationsMswExportInfo(
|
||||||
|
eclipseCase, wellPath, perforationIntervals);
|
||||||
|
|
||||||
QTextStream stream(exportFile.get());
|
QTextStream stream(exportFile.get());
|
||||||
RifEclipseDataTableFormatter formatter(stream);
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
||||||
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user