mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1092 - pre-proto - Reading in Dx, Dy, Dz and permeabilities before calculation of transmissibilities.
This commit is contained in:
@@ -237,7 +237,13 @@ void RifEclipseExportTools::printBackgroundDataHeaderLine(QTextStream & out)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseExportTools::printBackgroundData(QTextStream & out, RimWellPath* wellPath, RimEclipseWell* simWell, RimFracture* fracture, const RigMainGrid* mainGrid, RigFractureData &fracData)
|
||||
{
|
||||
if (fracData.transmissibility > 0)
|
||||
if (!fracData.cellIsActive)
|
||||
{
|
||||
out << qSetFieldWidth(20);
|
||||
out << "-- INACTIVE CELL ";
|
||||
}
|
||||
|
||||
else if (fracData.cellIsActive && fracData.transmissibility > 0)
|
||||
{
|
||||
out << qSetFieldWidth(4);
|
||||
out << "--";
|
||||
@@ -245,7 +251,7 @@ void RifEclipseExportTools::printBackgroundData(QTextStream & out, RimWellPath*
|
||||
else
|
||||
{
|
||||
out << qSetFieldWidth(20);
|
||||
out << "-- INVALID DATA --";
|
||||
out << "-- INVALID DATA ";
|
||||
}
|
||||
out << qSetFieldWidth(12);
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
|
||||
#include "clipper/clipper.hpp"
|
||||
#include <math.h>
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
|
||||
|
||||
|
||||
@@ -280,18 +282,32 @@ void RimFracture::computeTransmissibility()
|
||||
objHandle->firstAncestorOrThisOfType(eclipseCase);
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->reservoirData();
|
||||
RimEclipseCellColors* resultColors = activeRiv->cellResult();
|
||||
|
||||
RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults();
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel());
|
||||
|
||||
size_t scalarSetIndex;
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "DX");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDx = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DX"); //assuming 0 time step and main grid (so grid index =0)
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "DY");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDy = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DY"); //assuming 0 time step and main grid (so grid index =0)
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "DZ");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDz = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DZ"); //assuming 0 time step and main grid (so grid index =0)
|
||||
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "PERMX");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectPermX = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "PERMX"); //assuming 0 time step and main grid (so grid index =0)
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "PERMY");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectPermY = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "PERMY"); //assuming 0 time step and main grid (so grid index =0)
|
||||
scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "PERMZ");
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectPermZ = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "PERMZ"); //assuming 0 time step and main grid (so grid index =0)
|
||||
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCaseData->activeCellInfo(porosityModel);
|
||||
bool cellIsActive = activeCellInfo->isActive(fracCell);
|
||||
|
||||
double permX = dataAccessObjectPermX->cellScalarGlobIdx(fracCell);
|
||||
double permY = dataAccessObjectPermY->cellScalarGlobIdx(fracCell);
|
||||
double permZ = dataAccessObjectPermZ->cellScalarGlobIdx(fracCell);
|
||||
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDx = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DX"); //assuming 0 time step and main grid (so grid index =0)
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDy = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DY"); //assuming 0 time step and main grid (so grid index =0)
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectDz = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, porosityModel, 0, "DZ"); //assuming 0 time step and main grid (so grid index =0)
|
||||
double dx = dataAccessObjectDx->cellScalarGlobIdx(fracCell);
|
||||
double dy = dataAccessObjectDy->cellScalarGlobIdx(fracCell);
|
||||
double dz = dataAccessObjectDz->cellScalarGlobIdx(fracCell);
|
||||
@@ -420,9 +436,10 @@ void RimFracture::computeTransmissibility()
|
||||
fracData.permeabilities = cvf::Vec3d(permX, permY, permZ);
|
||||
fracData.NTG = NTG;
|
||||
fracData.skinFactor = skinfactor;
|
||||
fracData.cellIsActive = cellIsActive;
|
||||
|
||||
//Since we loop over all potentially fractured cells, we only keep FractureData for cells where fracture have an non-zero area.
|
||||
if (!fractureArea < 1e-5)
|
||||
if (fractureArea > 1e-5)
|
||||
{
|
||||
fracDataVec.push_back(fracData);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
double NTG;
|
||||
double skinFactor;
|
||||
|
||||
bool cellIsActive;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user