diff --git a/ApplicationCode/FileInterface/RifFractureExportTools.cpp b/ApplicationCode/FileInterface/RifFractureExportTools.cpp index 50477b190d..7cb14d1871 100644 --- a/ApplicationCode/FileInterface/RifFractureExportTools.cpp +++ b/ApplicationCode/FileInterface/RifFractureExportTools.cpp @@ -169,6 +169,7 @@ bool RifFractureExportTools::exportFracturesToEclipseDataInputFile(const QString return true; } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -291,8 +292,7 @@ void RifFractureExportTools::printStimPlanCellsMatrixTransContributions(const st } else continue; - RigFractureTransCalc transmissibilityCalculator(caseToApply, fracture); - double cDarcyInCorrectUnit = transmissibilityCalculator.cDarcy(); + double cDarcyInCorrectUnit = caseToApply->eclipseCaseData()->darchysValue(); std::vector stimPlanCells = fracTemplateStimPlan->getStimPlanCells(); @@ -678,15 +678,14 @@ void RifFractureExportTools::printTransmissibilityFractureToWell(const std::vect //RigStimPlanCell* stimPlanCell = fracTemplateStimPlan->getStimPlanCellAtIJ(wellCenterStimPlanCellIJ.first, wellCenterStimPlanCellIJ.second); const RigStimPlanFracTemplateCell& stimPlanCell = fracTemplateStimPlan->stimPlanCellFromIndex(fracTemplateStimPlan->getGlobalIndexFromIJ(wellCenterStimPlanCellIJ.first, wellCenterStimPlanCellIJ.second)); - RigFractureTransCalc transmissibilityCalculator(caseToApply, fracture); double linTransInStimPlanCell = RigFractureTransmissibilityEquations::computeLinearTransmissibilityToWellinStimPlanCell(stimPlanCell.getConductivtyValue(), - stimPlanCell.cellSizeX(), - stimPlanCell.cellSizeZ(), - perforationLengthVert, - perforationLengthHor, - fracture->perforationEfficiency, - fracture->attachedFractureDefinition()->skinFactor(), - transmissibilityCalculator.cDarcy()); + stimPlanCell.cellSizeX(), + stimPlanCell.cellSizeZ(), + perforationLengthVert, + perforationLengthHor, + fracture->perforationEfficiency, + fracture->attachedFractureDefinition()->skinFactor(), + caseToApply->eclipseCaseData()->darchysValue()); out << qSetFieldWidth(10); out << QString::number(linTransInStimPlanCell, 'f', 2); @@ -713,15 +712,14 @@ void RifFractureExportTools::printTransmissibilityFractureToWell(const std::vect const RigStimPlanFracTemplateCell& stimPlanCell = fracTemplateStimPlan->stimPlanCellFromIndex(fracTemplateStimPlan->getGlobalIndexFromIJ(wellCenterStimPlanCellIJ.first, wellCenterStimPlanCellIJ.second)); - RigFractureTransCalc transmissibilityCalculator(caseToApply, fracture); double radTransInStimPlanCell = RigFractureTransmissibilityEquations::computeRadialTransmissibilityToWellinStimPlanCell(stimPlanCell.getConductivtyValue(), - stimPlanCell.cellSizeX(), - stimPlanCell.cellSizeZ(), - fracture->wellRadius(), - fracture->attachedFractureDefinition()->skinFactor(), - fracture->azimuth, - fracture->wellAzimuthAtFracturePosition(), - transmissibilityCalculator.cDarcy()); + stimPlanCell.cellSizeX(), + stimPlanCell.cellSizeZ(), + fracture->wellRadius(), + fracture->attachedFractureDefinition()->skinFactor(), + fracture->azimuth, + fracture->wellAzimuthAtFracturePosition(), + caseToApply->eclipseCaseData()->darchysValue()); out << qSetFieldWidth(10); out << QString::number(radTransInStimPlanCell, 'f', 2); diff --git a/ApplicationCode/FileInterface/RifFractureExportTools.h b/ApplicationCode/FileInterface/RifFractureExportTools.h index 82480df5f3..36baf9eab6 100644 --- a/ApplicationCode/FileInterface/RifFractureExportTools.h +++ b/ApplicationCode/FileInterface/RifFractureExportTools.h @@ -54,6 +54,7 @@ public: RimEclipseCase* caseToApply); private: + static void performStimPlanUpscalingAndPrintResults(const std::vector& fractures, RimEclipseCase* caseToApply, QTextStream &out, diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp index 055ae3e4a5..eb7f377c94 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp @@ -1504,13 +1504,6 @@ bool RimReservoirCellResultsStorage::isDataPresent(size_t scalarResultIndex) con //-------------------------------------------------------------------------------------------------- double RimReservoirCellResultsStorage::darchysValue() { - // See "Cartesian transmissibility calculations" in the "Eclipse Technical Description" - // CDARCY Darcys constant - // = 0.00852702 (E300); 0.008527 (ECLIPSE 100) (METRIC) - // = 0.00112712 (E300); 0.001127 (ECLIPSE 100) (FIELD) - // = 3.6 (LAB) - // = 0.00864 (PVT - M) - double darchy = 0.008527; // (ECLIPSE 100) (METRIC) RimEclipseCase* rimCase = NULL; @@ -1518,25 +1511,7 @@ double RimReservoirCellResultsStorage::darchysValue() if (rimCase && rimCase->eclipseCaseData()) { - RigEclipseCaseData::UnitsType unitsType = rimCase->eclipseCaseData()->unitsType(); - - if (unitsType == RigEclipseCaseData::UNITS_FIELD) - { - darchy = 0.001127; - } - else if (unitsType == RigEclipseCaseData::UNITS_METRIC) - { - darchy = 0.008527; - } - else if (unitsType == RigEclipseCaseData::UNITS_LAB) - { - darchy = 3.6; - } - else - { - darchy = 0.00864; // Assuming (PVT - M) - CVF_TIGHT_ASSERT(false); // The enum and doc does not state that the PVT-M actually exists, so to trap this in debug - } + darchy = rimCase->eclipseCaseData()->darchysValue(); } return darchy; diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp index ebb0c5f7f8..0b890dd2ad 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp @@ -431,6 +431,43 @@ void RigEclipseCaseData::computeActiveCellBoundingBoxes() computeActiveCellsGeometryBoundingBox(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigEclipseCaseData::darchysValue() +{ + // See "Cartesian transmissibility calculations" in the "Eclipse Technical Description" + // CDARCY Darcys constant + // = 0.00852702 (E300); 0.008527 (ECLIPSE 100) (METRIC) + // = 0.00112712 (E300); 0.001127 (ECLIPSE 100) (FIELD) + // = 3.6 (LAB) + // = 0.00864 (PVT - M) + + double darchy = 0.008527; // (ECLIPSE 100) (METRIC) + + RigEclipseCaseData::UnitsType unitsType = this->unitsType(); + + if ( unitsType == RigEclipseCaseData::UNITS_FIELD ) + { + darchy = 0.001127; + } + else if ( unitsType == RigEclipseCaseData::UNITS_METRIC ) + { + darchy = 0.008527; + } + else if ( unitsType == RigEclipseCaseData::UNITS_LAB ) + { + darchy = 3.6; + } + else + { + darchy = 0.00864; // Assuming (PVT - M) + CVF_TIGHT_ASSERT(false); // The enum and doc does not state that the PVT-M actually exists, so to trap this in debug + } + + return darchy; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h index ac363ab2d7..99bd5054c5 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h @@ -94,6 +94,7 @@ public: UnitsType unitsType() const { return m_unitsType; } void setUnitsType(UnitsType unitsType) { m_unitsType = unitsType; } + double darchysValue(); private: void computeActiveCellIJKBBox();