mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1320 - pre-proto - Performing artithmetric upscaling of stimPlan values.
This commit is contained in:
@@ -98,44 +98,9 @@ bool RifEclipseExportTools::writeFracturesToTextFile(const QString& fileName, c
|
||||
if (caseUnit == RigEclipseCaseData::UNITS_FIELD) out << "-- Using field unit system" << "\n";
|
||||
out << "\n";
|
||||
|
||||
|
||||
for (RimFracture* fracture : fractures) //For testing upscaling...
|
||||
{
|
||||
fracture->computeUpscaledPropertyFromStimPlan(caseToApply);
|
||||
std::vector<RigFractureData> fracDataVector = fracture->attachedRigFracture()->fractureData();
|
||||
|
||||
for (RigFractureData fracData : fracDataVector)
|
||||
{
|
||||
out << qSetFieldWidth(4);
|
||||
out << "-- ";
|
||||
|
||||
out << qSetFieldWidth(12);
|
||||
wellPath, simWell = nullptr;
|
||||
fracture->firstAncestorOrThisOfType(simWell);
|
||||
if (simWell) out << simWell->name + " "; // 1. Well name
|
||||
fracture->firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath) out << wellPath->name + " "; // 1. Well name
|
||||
|
||||
out << qSetFieldWidth(16);
|
||||
out << fracture->name().left(15) + " ";
|
||||
|
||||
|
||||
out << qSetFieldWidth(5);
|
||||
size_t i, j, k;
|
||||
mainGrid->ijkFromCellIndex(fracData.reservoirCellIndex, &i, &j, &k);
|
||||
out << i + 1; // 2. I location grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
out << j + 1; // 3. J location grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
out << k + 1; // 4. K location of upper connecting grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
|
||||
out << qSetFieldWidth(10);
|
||||
out << QString::number(fracData.upscaledStimPlanValue, 'f', 3);
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Included for debug / prototyping only
|
||||
performStimPlanUpscalingAndPrintResults(fractures, caseToApply, out, wellPath, simWell, mainGrid);
|
||||
|
||||
|
||||
printBackgroundDataHeaderLine(out);
|
||||
|
||||
@@ -182,6 +147,49 @@ bool RifEclipseExportTools::writeFracturesToTextFile(const QString& fileName, c
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseExportTools::performStimPlanUpscalingAndPrintResults(const std::vector<RimFracture *>& fractures, RimEclipseCase* caseToApply, QTextStream &out, RimWellPath* wellPath, RimEclipseWell* simWell, const RigMainGrid* mainGrid)
|
||||
{
|
||||
for (RimFracture* fracture : fractures) //For testing upscaling...
|
||||
{
|
||||
fracture->computeUpscaledPropertyFromStimPlan(caseToApply);
|
||||
std::vector<RigFractureData> fracDataVector = fracture->attachedRigFracture()->fractureData();
|
||||
|
||||
for (RigFractureData fracData : fracDataVector)
|
||||
{
|
||||
out << qSetFieldWidth(4);
|
||||
out << "-- ";
|
||||
|
||||
out << qSetFieldWidth(12);
|
||||
wellPath, simWell = nullptr;
|
||||
fracture->firstAncestorOrThisOfType(simWell);
|
||||
if (simWell) out << simWell->name + " "; // 1. Well name
|
||||
fracture->firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath) out << wellPath->name + " "; // 1. Well name
|
||||
|
||||
out << qSetFieldWidth(16);
|
||||
out << fracture->name().left(15) + " ";
|
||||
|
||||
|
||||
out << qSetFieldWidth(5);
|
||||
size_t i, j, k;
|
||||
mainGrid->ijkFromCellIndex(fracData.reservoirCellIndex, &i, &j, &k);
|
||||
out << i + 1; // 2. I location grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
out << j + 1; // 3. J location grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
out << k + 1; // 4. K location of upper connecting grid block, adding 1 to go to eclipse 1-based grid definition
|
||||
|
||||
out << qSetFieldWidth(10);
|
||||
out << fracData.cellIndex;
|
||||
out << QString::number(fracData.upscaledStimPlanValue, 'f', 3);
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -51,6 +51,8 @@ public:
|
||||
|
||||
static bool writeFracturesToTextFile(const QString& fileName, const std::vector<RimFracture*>& fractures, RimEclipseCase* caseToApply);
|
||||
|
||||
static void performStimPlanUpscalingAndPrintResults(const std::vector<RimFracture *>& fractures, RimEclipseCase* caseToApply, QTextStream &out, RimWellPath* wellPath, RimEclipseWell* simWell, const RigMainGrid* mainGrid);
|
||||
|
||||
static void printCOMPDATvalues(QTextStream & out, RigFractureData &fracData, RimFracture* fracture, RimWellPath* wellPath, RimEclipseWell* simWell, const RigMainGrid* mainGrid);
|
||||
|
||||
static void printBackgroundDataHeaderLine(QTextStream & out);
|
||||
|
||||
Reference in New Issue
Block a user