mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5219 Implement support for TVDRKB for well log depth
* Also show air gap in title when TVDRKB is selected and not otherwise
This commit is contained in:
@@ -98,7 +98,7 @@ void RigGeoMechWellLogExtractor::performCurveDataSmoothing( int
|
||||
|
||||
double trueVerticalDepth = -centroid.z();
|
||||
|
||||
double effectiveDepthMeters = trueVerticalDepth + m_rkbDiff;
|
||||
double effectiveDepthMeters = trueVerticalDepth + wellPathData()->rkbDiff();
|
||||
double hydroStaticPorePressureBar = pascalToBar( effectiveDepthMeters * UNIT_WEIGHT_OF_WATER );
|
||||
interfaceShValuesDbl[i] = interfaceShValues[i] / hydroStaticPorePressureBar;
|
||||
interfacePorePressuresDbl[i] = interfacePorePressures[i];
|
||||
@@ -691,14 +691,6 @@ const RigGeoMechCaseData* RigGeoMechWellLogExtractor::caseData()
|
||||
return m_caseData.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGeoMechWellLogExtractor::setRkbDiff( double rkbDiff )
|
||||
{
|
||||
m_rkbDiff = rkbDiff;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1408,7 +1400,7 @@ double RigGeoMechWellLogExtractor::hydroStaticPorePressureForSegment( size_t int
|
||||
{
|
||||
cvf::Vec3f centroid = cellCentroid( intersectionIdx );
|
||||
double trueVerticalDepth = -centroid.z();
|
||||
double effectiveDepthMeters = trueVerticalDepth + m_rkbDiff;
|
||||
double effectiveDepthMeters = trueVerticalDepth + wellPathData()->rkbDiff();
|
||||
double hydroStaticPorePressurePascal = effectiveDepthMeters * UNIT_WEIGHT_OF_WATER;
|
||||
double hydroStaticPorePressureBar = pascalToBar( hydroStaticPorePressurePascal );
|
||||
return hydroStaticPorePressureBar;
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
|
||||
void curveData( const RigFemResultAddress& resAddr, int frameIndex, std::vector<double>* values );
|
||||
const RigGeoMechCaseData* caseData();
|
||||
void setRkbDiff( double rkbDiff );
|
||||
|
||||
void setWbsLasValues( const RigWbsParameter& parameter, const std::vector<std::pair<double, double>>& values );
|
||||
void setWbsParametersSource( RigWbsParameter parameter, WbsParameterSource source );
|
||||
@@ -160,7 +159,6 @@ private:
|
||||
|
||||
private:
|
||||
cvf::ref<RigGeoMechCaseData> m_caseData;
|
||||
double m_rkbDiff;
|
||||
|
||||
std::map<RigWbsParameter, std::vector<std::pair<double, double>>> m_lasFileValues;
|
||||
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RigWellLogCurveData.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogExtractionCurve.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "cafUtils.h"
|
||||
|
||||
@@ -588,9 +590,9 @@ QString RigLasFileExporter::caseNameFromCurve( RimWellLogCurve* curve )
|
||||
double RigLasFileExporter::rkbDiff( RimWellLogCurve* curve )
|
||||
{
|
||||
RimWellLogExtractionCurve* extractionCurve = dynamic_cast<RimWellLogExtractionCurve*>( curve );
|
||||
if ( extractionCurve )
|
||||
if ( extractionCurve && extractionCurve->wellPath() )
|
||||
{
|
||||
return extractionCurve->rkbDiff();
|
||||
return extractionCurve->wellPath()->wellPathGeometry()->rkbDiff();
|
||||
}
|
||||
|
||||
return HUGE_VAL;
|
||||
|
||||
@@ -48,6 +48,7 @@ RigWellLogCurveData::~RigWellLogCurveData() {}
|
||||
void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::vector<double>& depths,
|
||||
RiaDefines::DepthTypeEnum depthType,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
{
|
||||
@@ -56,6 +57,7 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>& xValues
|
||||
m_xValues = xValues;
|
||||
m_depths[depthType] = depths;
|
||||
m_depthUnit = depthUnit;
|
||||
m_rkbDiff = rkbDiff;
|
||||
|
||||
// Disable depth value filtering is intended to be used for
|
||||
// extraction curve data
|
||||
@@ -69,6 +71,7 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>& xValues
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
{
|
||||
@@ -80,6 +83,7 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>&
|
||||
m_xValues = xValues;
|
||||
m_depths = depths;
|
||||
m_depthUnit = depthUnit;
|
||||
m_rkbDiff = rkbDiff;
|
||||
|
||||
// Disable depth value filtering is intended to be used for
|
||||
// extraction curve data
|
||||
@@ -101,8 +105,20 @@ const std::vector<double>& RigWellLogCurveData::xValues() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigWellLogCurveData::depths( RiaDefines::DepthTypeEnum depthType ) const
|
||||
{
|
||||
auto it = m_depths.find( depthType );
|
||||
return it != m_depths.end() ? it->second : std::vector<double>();
|
||||
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB && m_rkbDiff != 0.0 )
|
||||
{
|
||||
std::vector<double> tvds = depths( RiaDefines::TRUE_VERTICAL_DEPTH );
|
||||
for ( double& tvdValue : tvds )
|
||||
{
|
||||
tvdValue += m_rkbDiff;
|
||||
}
|
||||
return tvds;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = m_depths.find( depthType );
|
||||
return it != m_depths.end() ? it->second : std::vector<double>();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -115,6 +131,10 @@ std::set<RiaDefines::DepthTypeEnum> RigWellLogCurveData::availableDepthTypes() c
|
||||
for ( auto depthValuePair : m_depths )
|
||||
{
|
||||
depthTypes.insert( depthValuePair.first );
|
||||
if ( depthValuePair.first == RiaDefines::TRUE_VERTICAL_DEPTH && m_rkbDiff != 0.0 )
|
||||
{
|
||||
depthTypes.insert( RiaDefines::TRUE_VERTICAL_DEPTH_RKB );
|
||||
}
|
||||
}
|
||||
return depthTypes;
|
||||
}
|
||||
@@ -171,13 +191,14 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
||||
std::vector<double> xValues;
|
||||
std::vector<double> measuredDepths;
|
||||
|
||||
bool isTvDepthsAvailable = false;
|
||||
bool isTVDAvailable = false;
|
||||
bool isTVDRKBAvailable = false;
|
||||
std::vector<double> tvDepths;
|
||||
|
||||
auto mdIt = m_depths.find( RiaDefines::MEASURED_DEPTH );
|
||||
auto tvdIt = m_depths.find( RiaDefines::TRUE_VERTICAL_DEPTH );
|
||||
|
||||
if ( tvdIt != m_depths.end() && !tvdIt->second.empty() ) isTvDepthsAvailable = true;
|
||||
if ( tvdIt != m_depths.end() && !tvdIt->second.empty() ) isTVDAvailable = true;
|
||||
|
||||
if ( mdIt != m_depths.end() && !mdIt->second.empty() )
|
||||
{
|
||||
@@ -193,7 +214,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
||||
|
||||
double segmentStartTvd = 0.0;
|
||||
double segmentEndTvd = 0.0;
|
||||
if ( isTvDepthsAvailable )
|
||||
if ( isTVDAvailable )
|
||||
{
|
||||
segmentStartTvd = tvdIt->second[segmentStartIdx];
|
||||
segmentEndTvd = tvdIt->second[segmentStartIdx + 1];
|
||||
@@ -208,7 +229,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
||||
// The tvd calculation is a simplification. We should use the wellpath, as it might have a better
|
||||
// resolution, and have a none-linear shape This is much simpler, and possibly accurate enough ?
|
||||
|
||||
if ( isTvDepthsAvailable )
|
||||
if ( isTVDAvailable )
|
||||
{
|
||||
tvDepths.push_back( ( 1.0 - endWeight ) * segmentStartTvd + endWeight * segmentEndTvd );
|
||||
}
|
||||
@@ -222,17 +243,18 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
||||
|
||||
cvf::ref<RigWellLogCurveData> reSampledData = new RigWellLogCurveData;
|
||||
|
||||
if ( isTvDepthsAvailable )
|
||||
if ( isTVDAvailable )
|
||||
{
|
||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> resampledDepths =
|
||||
{{RiaDefines::TRUE_VERTICAL_DEPTH, tvDepths}, {RiaDefines::MEASURED_DEPTH, measuredDepths}};
|
||||
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_depthUnit, true );
|
||||
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
reSampledData->setValuesAndDepths( xValues,
|
||||
measuredDepths,
|
||||
RiaDefines::MEASURED_DEPTH,
|
||||
0.0,
|
||||
m_depthUnit,
|
||||
m_isExtractionCurve );
|
||||
}
|
||||
|
||||
@@ -41,10 +41,12 @@ public:
|
||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::vector<double>& depths,
|
||||
RiaDefines::DepthTypeEnum depthType,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve );
|
||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve );
|
||||
|
||||
@@ -86,6 +88,7 @@ private:
|
||||
std::vector<double> m_xValues;
|
||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> m_depths;
|
||||
bool m_isExtractionCurve;
|
||||
double m_rkbDiff;
|
||||
|
||||
std::vector<std::pair<size_t, size_t>> m_intervalsOfContinousValidValues;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ const std::vector<size_t>& RigWellLogExtractor::intersectedCellsGlobIdx()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellPath* RigWellLogExtractor::wellPathData()
|
||||
const RigWellPath* RigWellLogExtractor::wellPathData() const
|
||||
{
|
||||
return m_wellPath.p();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
const std::vector<double>& cellIntersectionTVDs();
|
||||
const std::vector<size_t>& intersectedCellsGlobIdx();
|
||||
|
||||
const RigWellPath* wellPathData();
|
||||
const RigWellPath* wellPathData() const;
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> cellIntersectionInfosAlongWellPath() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user