#3753 : Non-Darcy perforations : Use effectiveK and effectiveH

This commit is contained in:
Magne Sjaastad 2018-11-26 09:42:48 +01:00
parent 268fc4f368
commit 243633137a
3 changed files with 94 additions and 34 deletions

View File

@ -131,7 +131,7 @@ std::vector<RigCompletionData>
{ {
// No change in transmissibility for main bore // No change in transmissibility for main bore
auto transmissibilityAndPermeability = auto transmissibilityAndPermeability =
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh( RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityData(
settings.caseToApply, settings.caseToApply,
wellPath, wellPath,
wellBorePart.lengthsInCell, wellBorePart.lengthsInCell,
@ -140,13 +140,13 @@ std::vector<RigCompletionData>
globalCellIndex, globalCellIndex,
settings.useLateralNTG); settings.useLateralNTG);
transmissibility = transmissibilityAndPermeability.first; transmissibility = transmissibilityAndPermeability.connectionFactor();
} }
else else
{ {
// Adjust transmissibility for fishbone laterals // Adjust transmissibility for fishbone laterals
auto transmissibilityAndPermeability = auto transmissibilityAndPermeability =
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh( RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityData(
settings.caseToApply, settings.caseToApply,
wellPath, wellPath,
wellBorePart.lengthsInCell, wellBorePart.lengthsInCell,
@ -157,7 +157,7 @@ std::vector<RigCompletionData>
numberOfLaterals, numberOfLaterals,
mainBoreDirection); mainBoreDirection);
transmissibility = transmissibilityAndPermeability.first; transmissibility = transmissibilityAndPermeability.connectionFactor();
} }
CellDirection direction = RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirection( CellDirection direction = RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirection(

View File

@ -1682,30 +1682,32 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
double dFactor = RigCompletionData::defaultValue(); double dFactor = RigCompletionData::defaultValue();
{ {
auto transmissibilityAndKh = calculateTransmissibilityAndKh(settings.caseToApply, auto transmissibilityData = calculateTransmissibilityData(settings.caseToApply,
wellPath, wellPath,
cell.intersectionLengthsInCellCS, cell.intersectionLengthsInCellCS,
interval->skinFactor(), interval->skinFactor(),
interval->diameter(unitSystem) / 2, interval->diameter(unitSystem) / 2,
cell.globCellIndex, cell.globCellIndex,
settings.useLateralNTG); settings.useLateralNTG);
transmissibility = transmissibilityAndKh.first; transmissibility = transmissibilityData.connectionFactor();
if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED) if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED)
{ {
kh = transmissibilityAndKh.second; kh = transmissibilityData.kh();
dFactor = nonDarcyParameters->userDefinedDFactor(); dFactor = nonDarcyParameters->userDefinedDFactor();
} }
else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED) else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED)
{ {
kh = transmissibilityAndKh.second; kh = transmissibilityData.kh();
const double effectiveH = transmissibilityData.effectiveH();
const double effectivePermeability = const double effectivePermeability =
kh * nonDarcyParameters->gridPermeabilityScalingFactor() / cell.intersectionLengthsInCellCS.length(); nonDarcyParameters->gridPermeabilityScalingFactor() * transmissibilityData.effectiveK();
dFactor = calculateDFactor(settings.caseToApply, dFactor = calculateDFactor(settings.caseToApply,
cell.intersectionLengthsInCellCS, effectiveH,
cell.globCellIndex, cell.globCellIndex,
wellPath->perforationIntervalCollection()->nonDarcyParameters(), wellPath->perforationIntervalCollection()->nonDarcyParameters(),
effectivePermeability); effectivePermeability);
@ -2318,16 +2320,16 @@ CellDirection RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirec
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::pair<double, double> TransmissibilityData
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(RimEclipseCase* eclipseCase, RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityData(RimEclipseCase* eclipseCase,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const cvf::Vec3d& internalCellLengths, const cvf::Vec3d& internalCellLengths,
double skinFactor, double skinFactor,
double wellRadius, double wellRadius,
size_t globalCellIndex, size_t globalCellIndex,
bool useLateralNTG, bool useLateralNTG,
size_t volumeScaleConstant, size_t volumeScaleConstant,
CellDirection directionForVolumeScaling) CellDirection directionForVolumeScaling)
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
@ -2354,7 +2356,7 @@ std::pair<double, double>
if (dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() || permxAccessObject.isNull() || if (dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() || permxAccessObject.isNull() ||
permyAccessObject.isNull() || permzAccessObject.isNull()) permyAccessObject.isNull() || permzAccessObject.isNull())
{ {
return std::make_pair(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity()); return TransmissibilityData();
} }
double ntg = 1.0; double ntg = 1.0;
@ -2379,7 +2381,10 @@ std::pair<double, double>
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex); double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex); double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex);
const double totalKh = RigTransmissibilityEquations::totalPermeability(permx, permy, permz, internalCellLengths, latNtg, ntg); const double totalKh = RigTransmissibilityEquations::totalKh(permx, permy, permz, internalCellLengths, latNtg, ntg);
const double effectiveK = RigTransmissibilityEquations::effectiveK(permx, permy, permz, internalCellLengths, latNtg, ntg);
const double effectiveH = RigTransmissibilityEquations::effectiveH(internalCellLengths, latNtg, ntg);
double darcy = RiaEclipseUnitTools::darcysConstant(wellPath->unitSystem()); double darcy = RiaEclipseUnitTools::darcysConstant(wellPath->unitSystem());
@ -2399,14 +2404,16 @@ std::pair<double, double>
const double totalConnectionFactor = RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz); const double totalConnectionFactor = RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz);
return std::make_pair(totalConnectionFactor, totalKh); TransmissibilityData trData;
trData.setData(effectiveH, effectiveK, totalConnectionFactor, totalKh);
return trData;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCase* eclipseCase, double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCase* eclipseCase,
const cvf::Vec3d& internalCellLengths, double effectiveH,
size_t globalCellIndex, size_t globalCellIndex,
const RimNonDarcyPerforationParameters* nonDarcyParameters, const RimNonDarcyPerforationParameters* nonDarcyParameters,
const double effectivePermeability) const double effectivePermeability)
@ -2443,7 +2450,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
return EQ::dFactor(alpha, return EQ::dFactor(alpha,
betaFactor, betaFactor,
effectivePermeability, effectivePermeability,
internalCellLengths.length(), effectiveH,
nonDarcyParameters->wellRadius(), nonDarcyParameters->wellRadius(),
nonDarcyParameters->relativeGasDensity(), nonDarcyParameters->relativeGasDensity(),
nonDarcyParameters->gasViscosity()); nonDarcyParameters->gasViscosity());

View File

@ -51,6 +51,59 @@ class SubSegmentIntersectionInfo;
//================================================================================================== //==================================================================================================
typedef std::shared_ptr<QFile> QFilePtr; typedef std::shared_ptr<QFile> QFilePtr;
class TransmissibilityData
{
public:
TransmissibilityData()
: m_isValid(false)
, m_effectiveH(0.0)
, m_effectiveK(0.0)
, m_connectionFactor(0.0)
, m_kh(0.0)
{
}
bool isValid() const
{
return m_isValid;
}
void setData(double effectiveH, double effectiveK, double connectionFactor, double kh)
{
m_isValid = true;
m_effectiveH = effectiveH;
m_effectiveK = effectiveK;
m_connectionFactor = connectionFactor;
m_kh = kh;
}
double effectiveH() const
{
return m_effectiveH;
}
double effectiveK() const
{
return m_effectiveK;
}
double connectionFactor() const
{
return m_connectionFactor;
}
double kh() const
{
return m_kh;
}
private:
bool m_isValid;
double m_effectiveH;
double m_effectiveK;
double m_connectionFactor;
double m_kh;
};
//================================================================================================== //==================================================================================================
/// ///
//================================================================================================== //==================================================================================================
@ -82,8 +135,8 @@ public:
size_t globalCellIndex, size_t globalCellIndex,
const cvf::Vec3d& lengthsInCell); const cvf::Vec3d& lengthsInCell);
static std::pair<double, double> static TransmissibilityData
calculateTransmissibilityAndKh(RimEclipseCase* eclipseCase, calculateTransmissibilityData(RimEclipseCase* eclipseCase,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const cvf::Vec3d& internalCellLengths, const cvf::Vec3d& internalCellLengths,
double skinFactor, double skinFactor,
@ -94,7 +147,7 @@ public:
CellDirection directionForVolumeScaling = CellDirection::DIR_I); CellDirection directionForVolumeScaling = CellDirection::DIR_I);
static double calculateDFactor(RimEclipseCase* eclipseCase, static double calculateDFactor(RimEclipseCase* eclipseCase,
const cvf::Vec3d& internalCellLengths, double effectiveH,
size_t globalCellIndex, size_t globalCellIndex,
const RimNonDarcyPerforationParameters* nonDarcyParameters, const RimNonDarcyPerforationParameters* nonDarcyParameters,
const double effectivePermeability); const double effectivePermeability);