Transmissibiliy Equations : Move function to private section

This commit is contained in:
Magne Sjaastad 2018-09-28 09:03:14 +02:00
parent fe6de813f4
commit c21655f2b4
2 changed files with 56 additions and 66 deletions

View File

@ -23,27 +23,6 @@
#include <cmath>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigTransmissibilityEquations::peacemanRadius(double permeabilityNormalDirection1,
double permeabilityNormalDirection2,
double cellSizeNormalDirection1,
double cellSizeNormalDirection2)
{
double numerator = cvf::Math::sqrt(
pow(cellSizeNormalDirection2, 2.0) * pow(permeabilityNormalDirection1 / permeabilityNormalDirection2, 0.5)
+ pow(cellSizeNormalDirection1, 2.0) * pow(permeabilityNormalDirection2 / permeabilityNormalDirection1, 0.5) );
double denominator = pow((permeabilityNormalDirection1 / permeabilityNormalDirection2), 0.25 )
+ pow((permeabilityNormalDirection2 / permeabilityNormalDirection1), 0.25 );
double r0 = 0.28 * numerator / denominator;
return r0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -60,10 +39,8 @@ double RigTransmissibilityEquations::wellBoreTransmissibilityComponent(double ce
double nominator = cDarcyForRelevantUnit * 2 * cvf::PI_D * K * cellPerforationVectorComponent;
double peaceManRad = peacemanRadius(permeabilityNormalDirection1,
permeabilityNormalDirection2,
cellSizeNormalDirection1,
cellSizeNormalDirection2);
double peaceManRad = peacemanRadius(
permeabilityNormalDirection1, permeabilityNormalDirection2, cellSizeNormalDirection1, cellSizeNormalDirection2);
double denominator = log(peaceManRad / wellRadius) + skinFactor;
@ -76,7 +53,25 @@ double RigTransmissibilityEquations::wellBoreTransmissibilityComponent(double ce
//--------------------------------------------------------------------------------------------------
double RigTransmissibilityEquations::totalConnectionFactor(double transX, double transY, double transZ)
{
return cvf::Math::sqrt(
pow(transX, 2.0) + pow(transY, 2.0) + pow(transZ, 2.0));
return cvf::Math::sqrt(pow(transX, 2.0) + pow(transY, 2.0) + pow(transZ, 2.0));
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigTransmissibilityEquations::peacemanRadius(double permeabilityNormalDirection1,
double permeabilityNormalDirection2,
double cellSizeNormalDirection1,
double cellSizeNormalDirection2)
{
double numerator = cvf::Math::sqrt(
pow(cellSizeNormalDirection2, 2.0) * pow(permeabilityNormalDirection1 / permeabilityNormalDirection2, 0.5) +
pow(cellSizeNormalDirection1, 2.0) * pow(permeabilityNormalDirection2 / permeabilityNormalDirection1, 0.5));
double denominator = pow((permeabilityNormalDirection1 / permeabilityNormalDirection2), 0.25) +
pow((permeabilityNormalDirection2 / permeabilityNormalDirection1), 0.25);
double r0 = 0.28 * numerator / denominator;
return r0;
}

View File

@ -18,23 +18,11 @@
#pragma once
class RigTransmissibilityEquations
{
public:
// Calculations are assuming an orthogonal coordinate system
// 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
// permeability and cell size for Z and Y are to be specified as "normal directions" 1 and 2
// but normal directions 1 and 2 are interchangeable (so Z=1, Y=2 and Z=2, Y=1 gives same result)
static double peacemanRadius(double permeabilityNormalDirection1,
double permeabilityNormalDirection2,
double cellSizeNormalDirection1,
double cellSizeNormalDirection2);
static double wellBoreTransmissibilityComponent(double cellPerforationVectorComponent,
double permeabilityNormalDirection1,
double permeabilityNormalDirection2,
@ -44,9 +32,16 @@ public:
double skinFactor,
double cDarcyForRelevantUnit);
static double totalConnectionFactor(double transX,
double transY,
double transZ);
static double totalConnectionFactor(double transX, double transY, double transZ);
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
// permeability and cell size for Z and Y are to be specified as "normal directions" 1 and 2
// but normal directions 1 and 2 are interchangeable (so Z=1, Y=2 and Z=2, Y=1 gives same result)
static double peacemanRadius(double permeabilityNormalDirection1,
double permeabilityNormalDirection2,
double cellSizeNormalDirection1,
double cellSizeNormalDirection2);
};