mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3712 Non-Darcy Perforations : Adjust computation of 'kh'
This commit is contained in:
@@ -131,7 +131,7 @@ std::vector<RigCompletionData>
|
||||
{
|
||||
// No change in transmissibility for main bore
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
@@ -146,7 +146,7 @@ std::vector<RigCompletionData>
|
||||
{
|
||||
// Adjust transmissibility for fishbone laterals
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
|
||||
@@ -1658,46 +1658,39 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters =
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters();
|
||||
|
||||
double transmissibility = 0.0;
|
||||
double effectivePermeability = 0.0;
|
||||
double transmissibility = 0.0;
|
||||
double kh = RigCompletionData::defaultValue();
|
||||
double dFactor = RigCompletionData::defaultValue();
|
||||
|
||||
{
|
||||
auto transmissibilityAndPermeability =
|
||||
calculateTransmissibilityAndPermeability(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
auto transmissibilityAndKh = calculateTransmissibilityAndKh(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
|
||||
transmissibility = transmissibilityAndPermeability.first;
|
||||
transmissibility = transmissibilityAndKh.first;
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED)
|
||||
{
|
||||
effectivePermeability =
|
||||
transmissibilityAndPermeability.second * nonDarcyParameters->gridPermeabilityScalingFactor();
|
||||
kh = transmissibilityAndKh.second;
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
}
|
||||
else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED)
|
||||
{
|
||||
kh = transmissibilityAndKh.second;
|
||||
|
||||
double dFactor = RigCompletionData::defaultValue();
|
||||
double kh = RigCompletionData::defaultValue();
|
||||
const double effectivePermeability =
|
||||
kh * nonDarcyParameters->gridPermeabilityScalingFactor() / cell.intersectionLengthsInCellCS.length();
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED)
|
||||
{
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED)
|
||||
{
|
||||
dFactor = calculateDFactor(settings.caseToApply,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
cell.globCellIndex,
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters(),
|
||||
effectivePermeability);
|
||||
}
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
{
|
||||
kh = effectivePermeability * cell.intersectionLengthsInCellCS.length();
|
||||
dFactor = calculateDFactor(settings.caseToApply,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
cell.globCellIndex,
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters(),
|
||||
effectivePermeability);
|
||||
}
|
||||
}
|
||||
|
||||
completion.setTransAndWPImultBackgroundDataFromPerforation(
|
||||
@@ -2307,15 +2300,15 @@ CellDirection RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirec
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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)
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(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();
|
||||
|
||||
@@ -2367,7 +2360,7 @@ std::pair<double, double>
|
||||
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
|
||||
const double totalPermeabilityForCell = RigTransmissibilityEquations::totalPermeability(permx, permy, permz);
|
||||
const double totalKh = RigTransmissibilityEquations::totalPermeability(permx, permy, permz, internalCellLengths, latNtg, ntg);
|
||||
|
||||
double darcy = RiaEclipseUnitTools::darcysConstant(wellPath->unitSystem());
|
||||
|
||||
@@ -2387,7 +2380,7 @@ std::pair<double, double>
|
||||
|
||||
const double totalConnectionFactor = RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz);
|
||||
|
||||
return std::make_pair(totalConnectionFactor, totalPermeabilityForCell);
|
||||
return std::make_pair(totalConnectionFactor, totalKh);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
static std::pair<double, double>
|
||||
calculateTransmissibilityAndPermeability(RimEclipseCase* eclipseCase,
|
||||
calculateTransmissibilityAndKh(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
|
||||
#include "RigTransmissibilityEquations.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
@@ -60,19 +57,26 @@ double RigTransmissibilityEquations::totalConnectionFactor(double transX, double
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigTransmissibilityEquations::totalPermeability(const double permx, const double permy, const double permz)
|
||||
double RigTransmissibilityEquations::totalPermeability(double cellPermX,
|
||||
double cellPermY,
|
||||
double cellPermZ,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double lateralNtg,
|
||||
double ntg)
|
||||
{
|
||||
const double kx = cvf::Math::sqrt(permy * permz);
|
||||
const double ky = cvf::Math::sqrt(permx * permz);
|
||||
const double kz = cvf::Math::sqrt(permy * permx);
|
||||
// Compute kh for each local grid cell axis
|
||||
// Use permeability values for the two other axis
|
||||
double khx = sqrt(cellPermY * cellPermZ) * internalCellLengths.x() * lateralNtg;
|
||||
double khy = sqrt(cellPermX * cellPermZ) * internalCellLengths.y() * lateralNtg;
|
||||
double khz = sqrt(cellPermX * cellPermY) * internalCellLengths.z() * ntg;
|
||||
|
||||
const double totalPerm = cvf::Math::sqrt(kx * kx + ky * ky + kz * kz);
|
||||
const double totalKh = cvf::Math::sqrt(khx * khx + khy * khy + khz * khz);
|
||||
|
||||
return totalPerm;
|
||||
return totalKh;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigTransmissibilityEquations::permeability(const double conductivity, const double width)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
class RigTransmissibilityEquations
|
||||
{
|
||||
public:
|
||||
@@ -34,7 +38,12 @@ public:
|
||||
|
||||
static double totalConnectionFactor(double transX, double transY, double transZ);
|
||||
|
||||
static double totalPermeability(const double permx, const double permy, const double permz);
|
||||
static double totalPermeability(double cellPermX,
|
||||
double cellPermY,
|
||||
double cellPermZ,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double lateralNtg,
|
||||
double ntg);
|
||||
|
||||
static double permeability(const double conductivity, const double width);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user