#1487 Move darchy constant into RigEclipseCaseData, where it belongs

This commit is contained in:
Jacob Støren 2017-05-19 11:07:53 +02:00
parent d1b3d619d3
commit 7e847361d1
5 changed files with 56 additions and 44 deletions

View File

@ -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<RigStimPlanFracTemplateCell> 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);

View File

@ -54,6 +54,7 @@ public:
RimEclipseCase* caseToApply);
private:
static void performStimPlanUpscalingAndPrintResults(const std::vector<RimFracture *>& fractures,
RimEclipseCase* caseToApply,
QTextStream &out,

View File

@ -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;

View File

@ -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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -94,6 +94,7 @@ public:
UnitsType unitsType() const { return m_unitsType; }
void setUnitsType(UnitsType unitsType) { m_unitsType = unitsType; }
double darchysValue();
private:
void computeActiveCellIJKBBox();