mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3038 Fracture Completion Summary : Add transmissibility, conn count and area
This commit is contained in:
parent
3afca71095
commit
3aaadde5c0
@ -75,6 +75,25 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
|||||||
outputStreamForIntermediateResultsText);
|
outputStreamForIntermediateResultsText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForWellPathSingleFracture(
|
||||||
|
RimWellPath* wellPath,
|
||||||
|
RimEclipseCase* caseToApply,
|
||||||
|
RimFracture* fracture,
|
||||||
|
QTextStream* outputStreamForIntermediateResultsText)
|
||||||
|
{
|
||||||
|
std::vector<RimFracture*> fracturesAlongWellPath;
|
||||||
|
fracturesAlongWellPath.push_back(fracture);
|
||||||
|
|
||||||
|
return generateCompdatValues(caseToApply,
|
||||||
|
wellPath->completions()->wellNameForExport(),
|
||||||
|
wellPath->wellPathGeometry(),
|
||||||
|
fracturesAlongWellPath,
|
||||||
|
outputStreamForIntermediateResultsText);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -41,6 +41,12 @@ public:
|
|||||||
RimEclipseCase* caseToApply,
|
RimEclipseCase* caseToApply,
|
||||||
QTextStream* outputStreamForIntermediateResultsText);
|
QTextStream* outputStreamForIntermediateResultsText);
|
||||||
|
|
||||||
|
static std::vector<RigCompletionData>
|
||||||
|
generateCompdatValuesForWellPathSingleFracture(RimWellPath* wellPath,
|
||||||
|
RimEclipseCase* caseToApply,
|
||||||
|
RimFracture* fracture,
|
||||||
|
QTextStream* outputStreamForIntermediateResultsText);
|
||||||
|
|
||||||
static std::vector<RigCompletionData> generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,
|
static std::vector<RigCompletionData> generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,
|
||||||
const RimSimWellInView* well,
|
const RimSimWellInView* well,
|
||||||
QTextStream* outputStreamForIntermediateResultsText);
|
QTextStream* outputStreamForIntermediateResultsText);
|
||||||
|
@ -20,8 +20,12 @@
|
|||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RicExportFractureCompletionsImpl.h"
|
||||||
|
|
||||||
#include "RifEclipseDataTableFormatter.h"
|
#include "RifEclipseDataTableFormatter.h"
|
||||||
|
|
||||||
|
#include "RigCompletionData.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEllipseFractureTemplate.h"
|
#include "RimEllipseFractureTemplate.h"
|
||||||
#include "RimFileWellPath.h"
|
#include "RimFileWellPath.h"
|
||||||
@ -36,6 +40,8 @@
|
|||||||
#include "RimWellPathFracture.h"
|
#include "RimWellPathFracture.h"
|
||||||
#include "RimWellPathFractureCollection.h"
|
#include "RimWellPathFractureCollection.h"
|
||||||
|
|
||||||
|
#include "cvfGeometryTools.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -63,7 +69,7 @@ RifEclipseOutputTableColumn floatNumberColumn(const QString& text)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(const RimEclipseCase* sourceCase,
|
QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(RimEclipseCase* sourceCase,
|
||||||
const std::vector<RimWellPath*>& wellPaths)
|
const std::vector<RimWellPath*>& wellPaths)
|
||||||
{
|
{
|
||||||
if (!sourceCase || wellPaths.empty())
|
if (!sourceCase || wellPaths.empty())
|
||||||
@ -151,9 +157,17 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(const R
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString tableText = createFractureInstancesText(wellPathFractures);
|
{
|
||||||
textStream << tableText;
|
QString tableText = createFractureInstancesText(wellPathFractures);
|
||||||
textStream << lineStart << "\n";
|
textStream << tableText;
|
||||||
|
textStream << lineStart << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QString tableText = createFractureCompletionSummaryText(sourceCase, wellPathFractures);
|
||||||
|
textStream << tableText;
|
||||||
|
textStream << lineStart << "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
@ -551,6 +565,143 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
|
|||||||
return tableText;
|
return tableText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummaryText(
|
||||||
|
RimEclipseCase* sourceCase,
|
||||||
|
const std::vector<RimWellPathFracture*>& wellPathFractures) const
|
||||||
|
{
|
||||||
|
QString tableText;
|
||||||
|
|
||||||
|
QTextStream stream(&tableText);
|
||||||
|
RifEclipseDataTableFormatter formatter(stream);
|
||||||
|
configureFormatter(&formatter);
|
||||||
|
|
||||||
|
std::vector<RifEclipseOutputTableColumn> header = {
|
||||||
|
RifEclipseOutputTableColumn(""),
|
||||||
|
RifEclipseOutputTableColumn(""),
|
||||||
|
RifEclipseOutputTableColumn(""),
|
||||||
|
floatNumberColumn("Tr"),
|
||||||
|
floatNumberColumn("#con"),
|
||||||
|
floatNumberColumn("Fcd"),
|
||||||
|
floatNumberColumn("Area"),
|
||||||
|
floatNumberColumn("KfWf"),
|
||||||
|
floatNumberColumn("Kf"),
|
||||||
|
floatNumberColumn("wf"),
|
||||||
|
floatNumberColumn("Xf"),
|
||||||
|
floatNumberColumn("H"),
|
||||||
|
floatNumberColumn("Km"),
|
||||||
|
};
|
||||||
|
|
||||||
|
formatter.header(header);
|
||||||
|
|
||||||
|
// Second header line
|
||||||
|
{
|
||||||
|
formatter.add("Well");
|
||||||
|
formatter.add("Fracture");
|
||||||
|
formatter.add("Template");
|
||||||
|
formatter.add("[Sm3/d/bar]"); // Tr
|
||||||
|
formatter.add(""); // #con
|
||||||
|
formatter.add("[]"); // Fcd
|
||||||
|
formatter.add("[m2]"); // Area
|
||||||
|
formatter.add("[mDm]"); // KfWf
|
||||||
|
formatter.add("[Md]"); // Kf
|
||||||
|
formatter.add("[m]"); // wf
|
||||||
|
formatter.add("[m]"); // Xf
|
||||||
|
formatter.add("[m]"); // H
|
||||||
|
formatter.add("[mD]"); // Km
|
||||||
|
formatter.rowCompleted();
|
||||||
|
}
|
||||||
|
|
||||||
|
formatter.addHorizontalLine('-');
|
||||||
|
|
||||||
|
// Cache the fracture template area, as this is a heavy operation
|
||||||
|
std::map<RimFractureTemplate*, double> templateAreaMap;
|
||||||
|
|
||||||
|
for (auto& fracture : wellPathFractures)
|
||||||
|
{
|
||||||
|
QString wellName;
|
||||||
|
|
||||||
|
RimWellPath* wellPath = nullptr;
|
||||||
|
fracture->firstAncestorOrThisOfType(wellPath);
|
||||||
|
if (wellPath)
|
||||||
|
{
|
||||||
|
wellName = wellPath->name();
|
||||||
|
}
|
||||||
|
|
||||||
|
formatter.add(wellName);
|
||||||
|
formatter.add(fracture->name());
|
||||||
|
|
||||||
|
if (fracture->fractureTemplate())
|
||||||
|
{
|
||||||
|
formatter.add(fracture->fractureTemplate()->name());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
formatter.add("NA");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<RigCompletionData> completionDataOneFracture =
|
||||||
|
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPathSingleFracture(
|
||||||
|
wellPath, sourceCase, fracture, nullptr);
|
||||||
|
|
||||||
|
double aggregatedTransmissibility = 0.0;
|
||||||
|
for (const auto& c : completionDataOneFracture)
|
||||||
|
{
|
||||||
|
aggregatedTransmissibility += c.transmissibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
double fractureArea = 0.0;
|
||||||
|
|
||||||
|
if (fracture->fractureTemplate())
|
||||||
|
{
|
||||||
|
auto it = templateAreaMap.find(fracture->fractureTemplate());
|
||||||
|
if (it != templateAreaMap.end())
|
||||||
|
{
|
||||||
|
fractureArea = it->second;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::vector<cvf::Vec3f> nodeCoords;
|
||||||
|
std::vector<cvf::uint> triangleIndices;
|
||||||
|
|
||||||
|
fracture->fractureTemplate()->fractureTriangleGeometry(&nodeCoords, &triangleIndices);
|
||||||
|
|
||||||
|
for (size_t triangleIndex = 0; triangleIndex < triangleIndices.size(); triangleIndex += 3)
|
||||||
|
{
|
||||||
|
std::vector<cvf::Vec3d> polygon;
|
||||||
|
polygon.push_back(cvf::Vec3d(nodeCoords[triangleIndices[triangleIndex + 0]]));
|
||||||
|
polygon.push_back(cvf::Vec3d(nodeCoords[triangleIndices[triangleIndex + 1]]));
|
||||||
|
polygon.push_back(cvf::Vec3d(nodeCoords[triangleIndices[triangleIndex + 2]]));
|
||||||
|
|
||||||
|
auto areaVector = cvf::GeometryTools::polygonAreaNormal3D(polygon);
|
||||||
|
double polygonArea = areaVector.length();
|
||||||
|
fractureArea += polygonArea;
|
||||||
|
}
|
||||||
|
templateAreaMap[fracture->fractureTemplate()] = fractureArea;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
formatter.add(aggregatedTransmissibility); // Tr
|
||||||
|
formatter.add(completionDataOneFracture.size()); // #con
|
||||||
|
formatter.add(1.0); // Fcd
|
||||||
|
formatter.add(fractureArea); // Area
|
||||||
|
formatter.add(3.0); // KfWf
|
||||||
|
formatter.add(4.0); // Kf
|
||||||
|
formatter.add(5.0); // wf
|
||||||
|
formatter.add(6.0); // Xf
|
||||||
|
formatter.add(7.0); // H
|
||||||
|
formatter.add(8.0); // Km
|
||||||
|
|
||||||
|
formatter.rowCompleted();
|
||||||
|
}
|
||||||
|
|
||||||
|
formatter.tableCompleted();
|
||||||
|
|
||||||
|
return tableText;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include "cafCmdFeature.h"
|
#include "cafCmdFeature.h"
|
||||||
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
class RimWellPath;
|
class RimWellPath;
|
||||||
class RimWellPathFracture;
|
class RimWellPathFracture;
|
||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
@ -36,7 +34,7 @@ class RifEclipseDataTableFormatter;
|
|||||||
class RicWellPathFractureTextReportFeatureImpl
|
class RicWellPathFractureTextReportFeatureImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString wellPathFractureReport(const RimEclipseCase* sourceCase, const std::vector<RimWellPath*>& wellPaths);
|
QString wellPathFractureReport(RimEclipseCase* sourceCase, const std::vector<RimWellPath*>& wellPaths);
|
||||||
|
|
||||||
static std::vector<RimWellPath*> wellPathsWithFractures();
|
static std::vector<RimWellPath*> wellPathsWithFractures();
|
||||||
|
|
||||||
@ -48,5 +46,8 @@ private:
|
|||||||
QString createFractureText(const std::vector<RimFractureTemplate*>& fractureTemplates) const;
|
QString createFractureText(const std::vector<RimFractureTemplate*>& fractureTemplates) const;
|
||||||
QString createFractureInstancesText(const std::vector<RimWellPathFracture*>& fractureTemplates) const;
|
QString createFractureInstancesText(const std::vector<RimWellPathFracture*>& fractureTemplates) const;
|
||||||
|
|
||||||
|
QString createFractureCompletionSummaryText(RimEclipseCase* sourceCase,
|
||||||
|
const std::vector<RimWellPathFracture*>& wellPathFractures) const;
|
||||||
|
|
||||||
void configureFormatter(RifEclipseDataTableFormatter* formatter) const;
|
void configureFormatter(RifEclipseDataTableFormatter* formatter) const;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user