mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 23:53:04 -06:00
#3412 Non-Darcy Perf intervals : Separate calculation of transmissibility and permeability
This commit is contained in:
parent
683979f6f9
commit
8464d19696
@ -124,28 +124,34 @@ std::vector<RigCompletionData>
|
||||
if (wellBorePart.isMainBore)
|
||||
{
|
||||
// No change in transmissibility for main bore
|
||||
transmissibility =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
wellBorePart.skinFactor,
|
||||
wellBorePart.wellRadius,
|
||||
globalCellIndex,
|
||||
settings.useLateralNTG);
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
wellBorePart.skinFactor,
|
||||
wellBorePart.wellRadius,
|
||||
globalCellIndex,
|
||||
settings.useLateralNTG);
|
||||
|
||||
transmissibility = transmissibilityAndPermeability.first;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Adjust transmissibility for fishbone laterals
|
||||
transmissibility =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
wellBorePart.skinFactor,
|
||||
wellBorePart.wellRadius,
|
||||
globalCellIndex,
|
||||
settings.useLateralNTG,
|
||||
numberOfLaterals,
|
||||
mainBoreDirection);
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
wellBorePart.skinFactor,
|
||||
wellBorePart.wellRadius,
|
||||
globalCellIndex,
|
||||
settings.useLateralNTG,
|
||||
numberOfLaterals,
|
||||
mainBoreDirection);
|
||||
|
||||
transmissibility = transmissibilityAndPermeability.first;
|
||||
}
|
||||
|
||||
CellDirection direction = RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirection(
|
||||
@ -224,14 +230,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
startMD -= 0.5;
|
||||
endMD += 0.5;
|
||||
}
|
||||
|
||||
appendMainWellBoreParts(wellBorePartsInCells,
|
||||
wellPath,
|
||||
settings,
|
||||
skinFactor,
|
||||
holeRadius,
|
||||
startMD,
|
||||
endMD);
|
||||
|
||||
appendMainWellBoreParts(wellBorePartsInCells, wellPath, settings, skinFactor, holeRadius, startMD, endMD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1661,24 +1661,24 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters =
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters();
|
||||
|
||||
double effectiveTransmissibilityForCell = 0.0;
|
||||
double transmissibility = 0.0;
|
||||
double effectivePermeability = 0.0;
|
||||
{
|
||||
const double transmissibilityForCell = calculateTransmissibility(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
auto transmissibilityAndPermeability =
|
||||
calculateTransmissibilityAndPermeability(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
|
||||
transmissibility = transmissibilityAndPermeability.first;
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
{
|
||||
effectiveTransmissibilityForCell =
|
||||
transmissibilityForCell * nonDarcyParameters->gridPermeabilityScalingFactor();
|
||||
}
|
||||
else
|
||||
{
|
||||
effectiveTransmissibilityForCell = transmissibilityForCell;
|
||||
effectivePermeability =
|
||||
transmissibilityAndPermeability.second * nonDarcyParameters->gridPermeabilityScalingFactor();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1695,23 +1695,19 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
cell.intersectionLengthsInCellCS,
|
||||
cell.globCellIndex,
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters(),
|
||||
effectiveTransmissibilityForCell);
|
||||
effectivePermeability);
|
||||
}
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
{
|
||||
kh = effectiveTransmissibilityForCell * cell.intersectionLengthsInCellCS.length();
|
||||
kh = effectivePermeability * cell.intersectionLengthsInCellCS.length();
|
||||
}
|
||||
|
||||
completion.setTransAndWPImultBackgroundDataFromPerforation(effectiveTransmissibilityForCell,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem),
|
||||
dFactor,
|
||||
kh,
|
||||
direction);
|
||||
completion.setTransAndWPImultBackgroundDataFromPerforation(
|
||||
transmissibility, interval->skinFactor(), interval->diameter(unitSystem), dFactor, kh, direction);
|
||||
completion.addMetadata("Perforation Completion",
|
||||
QString("MD In: %1 - MD Out: %2").arg(cell.startMD).arg(cell.endMD) +
|
||||
QString(" Transmissibility: ") + QString::number(effectiveTransmissibilityForCell));
|
||||
QString(" Transmissibility: ") + QString::number(transmissibility));
|
||||
completionData.push_back(completion);
|
||||
}
|
||||
}
|
||||
@ -2311,15 +2307,16 @@ CellDirection RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirec
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant,
|
||||
CellDirection directionForVolumeScaling)
|
||||
std::pair<double, double>
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant,
|
||||
CellDirection directionForVolumeScaling)
|
||||
{
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
|
||||
@ -2345,7 +2342,9 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(Rim
|
||||
|
||||
if (dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() || permxAccessObject.isNull() ||
|
||||
permyAccessObject.isNull() || permzAccessObject.isNull())
|
||||
return std::numeric_limits<double>::infinity();
|
||||
{
|
||||
return std::make_pair(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity());
|
||||
}
|
||||
|
||||
double ntg = 1.0;
|
||||
{
|
||||
@ -2369,6 +2368,8 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(Rim
|
||||
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
|
||||
const double totalPermeabilityForCell = RigTransmissibilityEquations::totalPermeability(permx, permy, permz);
|
||||
|
||||
double darcy = RiaEclipseUnitTools::darcysConstant(wellPath->unitSystem());
|
||||
|
||||
if (volumeScaleConstant != 1)
|
||||
@ -2378,14 +2379,16 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(Rim
|
||||
if (directionForVolumeScaling == CellDirection::DIR_K) dz = dz / volumeScaleConstant;
|
||||
}
|
||||
|
||||
double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
internalCellLengths.x() * latNtg, permy, permz, dy, dz, wellRadius, skinFactor, darcy);
|
||||
double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
internalCellLengths.y() * latNtg, permx, permz, dx, dz, wellRadius, skinFactor, darcy);
|
||||
double transz = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
const double transz = RigTransmissibilityEquations::wellBoreTransmissibilityComponent(
|
||||
internalCellLengths.z() * ntg, permy, permx, dy, dx, wellRadius, skinFactor, darcy);
|
||||
|
||||
return RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz);
|
||||
const double totalConnectionFactor = RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz);
|
||||
|
||||
return std::make_pair(totalConnectionFactor, totalPermeabilityForCell);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2395,7 +2398,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
size_t globalCellIndex,
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters,
|
||||
const double effectiveTransmissibilityForCell)
|
||||
const double effectivePermeability)
|
||||
{
|
||||
using EQ = RigPerforationTransmissibilityEquations;
|
||||
|
||||
@ -2414,14 +2417,14 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
|
||||
}
|
||||
|
||||
const double betaFactor = EQ::betaFactor(nonDarcyParameters->inertialCoefficientBeta0(),
|
||||
effectiveTransmissibilityForCell,
|
||||
effectivePermeability,
|
||||
nonDarcyParameters->permeabilityScalingFactor(),
|
||||
porosity,
|
||||
nonDarcyParameters->porosityScalingFactor());
|
||||
|
||||
return EQ::dFactor(nonDarcyParameters->unitConstant(),
|
||||
betaFactor,
|
||||
effectiveTransmissibilityForCell,
|
||||
effectivePermeability,
|
||||
internalCellLengths.length(),
|
||||
nonDarcyParameters->wellRadius(),
|
||||
nonDarcyParameters->relativeGasDensity(),
|
||||
|
@ -81,22 +81,23 @@ public:
|
||||
static CellDirection calculateCellMainDirection(RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
static double calculateTransmissibility(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant = 1,
|
||||
CellDirection directionForVolumeScaling = CellDirection::DIR_I);
|
||||
|
||||
static std::pair<double, double>
|
||||
calculateTransmissibilityAndPermeability(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant = 1,
|
||||
CellDirection directionForVolumeScaling = CellDirection::DIR_I);
|
||||
|
||||
static double calculateDFactor(RimEclipseCase* eclipseCase,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
size_t globalCellIndex,
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters,
|
||||
const double effectiveTransmissibilityForCell);
|
||||
const double effectivePermeability);
|
||||
|
||||
static void exportCompletions(const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells,
|
||||
|
@ -56,6 +56,20 @@ double RigTransmissibilityEquations::totalConnectionFactor(double transX, double
|
||||
return cvf::Math::sqrt(pow(transX, 2.0) + pow(transY, 2.0) + pow(transZ, 2.0));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigTransmissibilityEquations::totalPermeability(const double permx, const double permy, const double permz)
|
||||
{
|
||||
const double kx = cvf::Math::sqrt(permy * permz);
|
||||
const double ky = cvf::Math::sqrt(permx * permz);
|
||||
const double kz = cvf::Math::sqrt(permy * permx);
|
||||
|
||||
const double totalPerm = cvf::Math::sqrt(kx * kx + ky * ky + kz * kz);
|
||||
|
||||
return totalPerm;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -34,6 +34,8 @@ public:
|
||||
|
||||
static double totalConnectionFactor(double transX, double transY, double transZ);
|
||||
|
||||
static double totalPermeability(const double permx, const double permy, const double permz);
|
||||
|
||||
private:
|
||||
// If using wellBoreTransmissibilityComponent to calculate Tx (transmissibility in x direction),
|
||||
// perforationVectorComponent is the x component (in the cell local coordinate system) of the perforation vector
|
||||
|
Loading…
Reference in New Issue
Block a user