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:
@@ -290,7 +290,7 @@ void RimWellFlowRateCurve::updateStackedPlotData()
|
||||
}
|
||||
|
||||
RigWellLogCurveData tempCurveData;
|
||||
tempCurveData.setValuesAndDepths( allStackedValues, allDepthValues, depthType, displayUnit, false );
|
||||
tempCurveData.setValuesAndDepths( allStackedValues, allDepthValues, depthType, 0.0, displayUnit, false );
|
||||
|
||||
depthValues = tempCurveData.depthPlotValues( depthType, displayUnit );
|
||||
stackedValues = tempCurveData.xPlotValues();
|
||||
@@ -340,7 +340,7 @@ void RimWellFlowRateCurve::setFlowValuesPrDepthValue( const QString&
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& flowRates )
|
||||
{
|
||||
this->setValuesAndDepths( flowRates, depthValues, depthType, RiaDefines::UNIT_NONE, false );
|
||||
this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::UNIT_NONE, false );
|
||||
|
||||
m_curveAutoName = curveName;
|
||||
}
|
||||
|
||||
@@ -1006,7 +1006,7 @@ void RimWellPltPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
plotLayoutGroup->setCollapsedByDefault( true );
|
||||
RimWellLogPlot::uiOrderingForAutoName( uiConfigName, *plotLayoutGroup );
|
||||
RimWellLogPlot::uiOrderingForLegendSettings( uiConfigName, *plotLayoutGroup );
|
||||
RimWellLogPlot::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -979,7 +979,7 @@ void RimWellRftPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
plotLayoutGroup->setCollapsedByDefault( true );
|
||||
RimWellLogPlot::uiOrderingForAutoName( uiConfigName, *plotLayoutGroup );
|
||||
RimWellLogPlot::uiOrderingForLegendSettings( uiConfigName, *plotLayoutGroup );
|
||||
RimWellLogPlot::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ void RimGridCrossPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
|
||||
if ( isMdiWindow() )
|
||||
{
|
||||
RimPlotWindow::uiOrderingForLegendSettings( uiConfigName, *generalGroup );
|
||||
RimPlotWindow::uiOrderingForPlotLayout( uiConfigName, *generalGroup );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -227,7 +227,6 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
||||
RimWellLogExtractionCurve::findAndLoadWbsParametersFromLasFiles( wellPath, geomExtractor.p() );
|
||||
|
||||
m_geomResultDefinition->loadResult();
|
||||
geomExtractor->setRkbDiff( rkbDiff() );
|
||||
geomExtractor->curveData( m_geomResultDefinition->resultAddress(), timeStep, values );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,18 +555,18 @@ void RimMultiPlotWindow::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
|
||||
void RimMultiPlotWindow::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* titleAndLegendsGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
uiOrderingForPlotLayout( uiConfigName, *titleAndLegendsGroup );
|
||||
uiOrderingForMultiPlotLayout( uiConfigName, *titleAndLegendsGroup );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMultiPlotWindow::uiOrderingForPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
void RimMultiPlotWindow::uiOrderingForMultiPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_showPlotWindowTitle );
|
||||
uiOrdering.add( &m_plotWindowTitle );
|
||||
uiOrdering.add( &m_showIndividualPlotTitles );
|
||||
RimPlotWindow::uiOrderingForLegendSettings( uiConfigName, uiOrdering );
|
||||
RimPlotWindow::uiOrderingForPlotLayout( uiConfigName, uiOrdering );
|
||||
uiOrdering.add( &m_columnCount );
|
||||
uiOrdering.add( &m_rowsPerPage );
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ protected:
|
||||
const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
void uiOrderingForPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForMultiPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
@@ -235,7 +235,7 @@ QList<caf::PdmOptionItemInfo> RimPlotWindow::calculateValueOptions( const caf::P
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotWindow::uiOrderingForLegendSettings( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
void RimPlotWindow::uiOrderingForPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_showPlotLegends );
|
||||
uiOrdering.add( &m_plotLegendsHorizontal );
|
||||
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
void uiOrderingForLegendSettings( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForPlotLayout( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
private:
|
||||
virtual void doUpdateLayout() {}
|
||||
|
||||
@@ -82,7 +82,7 @@ RimWellBoreStabilityPlot::RimWellBoreStabilityPlot()
|
||||
"FG in shale = K0_FG * (OBG0-PP0)\nK0_FG = (FG-PP)/(OBG-PP)",
|
||||
"" );
|
||||
|
||||
CAF_PDM_InitField( &m_userDefinedPPShale, "UserPPShale", 1.05, "User Defined Pore Pressure, Shale [bar]", "", "", "" );
|
||||
CAF_PDM_InitField( &m_userDefinedPPShale, "UserPPShale", 1.05, "Multiplier of hydrostatic PP", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_userDefinedPoissionRatio,
|
||||
"UserPoissionRatio",
|
||||
@@ -226,10 +226,14 @@ void RimWellBoreStabilityPlot::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
parameterSources->add( &m_userDefinedK0FG );
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* titleLegendAndAxisGroup = uiOrdering.addNewGroup( "Title, Legend and Axis" );
|
||||
RimWellLogPlot::uiOrderingForAutoName( uiConfigName, *titleLegendAndAxisGroup );
|
||||
RimWellLogPlot::uiOrderingForLegendSettings( uiConfigName, *titleLegendAndAxisGroup );
|
||||
uiOrderingForDepthAxis( uiConfigName, *titleLegendAndAxisGroup );
|
||||
caf::PdmUiGroup* depthGroup = uiOrdering.addNewGroup( "Depth Axis" );
|
||||
RimWellLogPlot::uiOrderingForDepthAxis( uiConfigName, *depthGroup );
|
||||
|
||||
caf::PdmUiGroup* titleGroup = uiOrdering.addNewGroup( "Plot Title" );
|
||||
RimWellLogPlot::uiOrderingForAutoName( uiConfigName, *titleGroup );
|
||||
|
||||
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
RimPlotWindow::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
@@ -252,7 +256,8 @@ QList<caf::PdmOptionItemInfo>
|
||||
std::vector<ParameterSource> sources = supportedSources( parameter );
|
||||
for ( int i = 0; i < (int)sources.size(); ++i )
|
||||
{
|
||||
if ( parameter.exclusiveOptions() || i == (int)sources.size() - 1 )
|
||||
if ( parameter.exclusiveOptions() || i == (int)sources.size() - 1 ||
|
||||
sources[i] == RigWbsParameter::HYDROSTATIC )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( sources[i] ), sources[i] ) );
|
||||
}
|
||||
|
||||
@@ -109,12 +109,13 @@ bool RimWellLogCurve::yValueRangeInData( double* minimumValue, double* maximumVa
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::vector<double>& measuredDepths,
|
||||
const std::vector<double>& depths,
|
||||
RiaDefines::DepthTypeEnum depthType,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
{
|
||||
m_curveData->setValuesAndDepths( xValues, measuredDepths, depthType, depthUnit, isExtractionCurve );
|
||||
m_curveData->setValuesAndDepths( xValues, depths, depthType, rkbDiff, depthUnit, isExtractionCurve );
|
||||
calculateCurveDataXRange();
|
||||
}
|
||||
|
||||
@@ -123,25 +124,27 @@ void RimWellLogCurve::setValuesAndDepths( const std::vector<double>& xValues,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
{
|
||||
m_curveData->setValuesAndDepths( xValues, depths, depthUnit, isExtractionCurve );
|
||||
m_curveData->setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve );
|
||||
calculateCurveDataXRange();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setValuesWithTVD( const std::vector<double>& xValues,
|
||||
const std::vector<double>& measuredDepths,
|
||||
const std::vector<double>& tvDepths,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
void RimWellLogCurve::setValuesWithMdAndTVD( const std::vector<double>& xValues,
|
||||
const std::vector<double>& measuredDepths,
|
||||
const std::vector<double>& tvdMSL,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve )
|
||||
{
|
||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> depths = {{RiaDefines::MEASURED_DEPTH, measuredDepths},
|
||||
{RiaDefines::TRUE_VERTICAL_DEPTH, tvDepths}};
|
||||
setValuesAndDepths( xValues, depths, depthUnit, isExtractionCurve );
|
||||
{RiaDefines::TRUE_VERTICAL_DEPTH, tvdMSL}};
|
||||
setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,15 +45,18 @@ public:
|
||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
||||
const std::vector<double>& depths,
|
||||
RiaDefines::DepthTypeEnum depthType,
|
||||
double rkbDiff,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve );
|
||||
void setValuesWithTVD( const std::vector<double>& xValues,
|
||||
const std::vector<double>& measuredDepths,
|
||||
const std::vector<double>& tvDepths,
|
||||
RiaDefines::DepthUnitType depthUnit,
|
||||
bool isExtractionCurve );
|
||||
void setValuesWithMdAndTVD( const std::vector<double>& xValues,
|
||||
const std::vector<double>& measuredDepths,
|
||||
const std::vector<double>& tvDepths,
|
||||
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 );
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
RiaDefines::DepthTypeEnum depthType = wellLogPlot->depthType();
|
||||
RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit();
|
||||
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
|
||||
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
|
||||
{
|
||||
isUsingPseudoLength = false;
|
||||
}
|
||||
@@ -447,6 +447,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
std::vector<double> values;
|
||||
std::vector<double> measuredDepthValues;
|
||||
std::vector<double> tvDepthValues;
|
||||
double rkbDiff = 0.0;
|
||||
|
||||
RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER;
|
||||
|
||||
@@ -454,6 +455,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
{
|
||||
measuredDepthValues = eclExtractor->cellIntersectionMDs();
|
||||
tvDepthValues = eclExtractor->cellIntersectionTVDs();
|
||||
rkbDiff = eclExtractor->wellPathData()->rkbDiff();
|
||||
|
||||
m_eclipseResultDefinition->loadResult();
|
||||
|
||||
@@ -480,6 +482,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
{
|
||||
measuredDepthValues = geomExtractor->cellIntersectionMDs();
|
||||
tvDepthValues = geomExtractor->cellIntersectionTVDs();
|
||||
rkbDiff = geomExtractor->wellPathData()->rkbDiff();
|
||||
|
||||
if ( measuredDepthValues.empty() )
|
||||
{
|
||||
@@ -494,8 +497,6 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
wbsPlot->applyWbsParametersToExtractor( geomExtractor.p() );
|
||||
}
|
||||
|
||||
geomExtractor->setRkbDiff( rkbDiff() );
|
||||
|
||||
m_geomResultDefinition->loadResult();
|
||||
geomExtractor->curveData( m_geomResultDefinition->resultAddress(), m_timeStep, &values );
|
||||
if ( performDataSmoothing )
|
||||
@@ -515,12 +516,18 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
this->setValuesAndDepths( values,
|
||||
measuredDepthValues,
|
||||
RiaDefines::MEASURED_DEPTH,
|
||||
0.0,
|
||||
depthUnit,
|
||||
!performDataSmoothing );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setValuesWithTVD( values, measuredDepthValues, tvDepthValues, depthUnit, !performDataSmoothing );
|
||||
this->setValuesWithMdAndTVD( values,
|
||||
measuredDepthValues,
|
||||
tvDepthValues,
|
||||
rkbDiff,
|
||||
depthUnit,
|
||||
!performDataSmoothing );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1036,18 +1043,6 @@ QString RimWellLogExtractionCurve::caseName() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellLogExtractionCurve::rkbDiff() const
|
||||
{
|
||||
if ( m_wellPath && m_wellPath->wellPathGeometry() )
|
||||
{
|
||||
return m_wellPath->wellPathGeometry()->rkbDiff();
|
||||
}
|
||||
return HUGE_VAL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,7 +71,6 @@ public:
|
||||
|
||||
bool isEclipseCurve() const;
|
||||
QString caseName() const;
|
||||
double rkbDiff() const;
|
||||
|
||||
int currentTimeStep() const;
|
||||
void setCurrentTimeStep( int timeStep );
|
||||
|
||||
@@ -89,7 +89,8 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
std::vector<double> values = wellLogFile->values( m_wellLogChannnelName );
|
||||
std::vector<double> measuredDepthValues = wellLogFile->depthValues();
|
||||
|
||||
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH )
|
||||
if ( wellLogPlot && ( wellLogPlot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH ||
|
||||
wellLogPlot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) )
|
||||
{
|
||||
bool canUseTvd = false;
|
||||
if ( wellLogFile->hasTvdChannel() )
|
||||
@@ -98,11 +99,12 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( values.size() == measuredDepthValues.size() && values.size() == tvdMslValues.size() )
|
||||
{
|
||||
this->setValuesWithTVD( values,
|
||||
measuredDepthValues,
|
||||
tvdMslValues,
|
||||
wellLogFile->depthUnit(),
|
||||
false );
|
||||
this->setValuesWithMdAndTVD( values,
|
||||
measuredDepthValues,
|
||||
tvdMslValues,
|
||||
m_wellPath->wellPathGeometry()->rkbDiff(),
|
||||
wellLogFile->depthUnit(),
|
||||
false );
|
||||
canUseTvd = true;
|
||||
}
|
||||
}
|
||||
@@ -122,11 +124,12 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
if ( values.size() == trueVerticalDepthValues.size() &&
|
||||
values.size() == measuredDepthValues.size() )
|
||||
{
|
||||
this->setValuesWithTVD( values,
|
||||
measuredDepthValues,
|
||||
trueVerticalDepthValues,
|
||||
wellLogFile->depthUnit(),
|
||||
false );
|
||||
this->setValuesWithMdAndTVD( values,
|
||||
measuredDepthValues,
|
||||
trueVerticalDepthValues,
|
||||
m_wellPath->wellPathGeometry()->rkbDiff(),
|
||||
wellLogFile->depthUnit(),
|
||||
false );
|
||||
canUseTvd = true;
|
||||
}
|
||||
}
|
||||
@@ -153,6 +156,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
this->setValuesAndDepths( values,
|
||||
measuredDepthValues,
|
||||
RiaDefines::MEASURED_DEPTH,
|
||||
0.0,
|
||||
wellLogFile->depthUnit(),
|
||||
false );
|
||||
}
|
||||
@@ -170,20 +174,16 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
displayUnit = wellLogPlot->depthUnit();
|
||||
}
|
||||
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH &&
|
||||
this->curveData()->availableDepthTypes().count( RiaDefines::TRUE_VERTICAL_DEPTH ) )
|
||||
|
||||
RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH;
|
||||
if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
|
||||
{
|
||||
m_qwtPlotCurve
|
||||
->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()->depthPlotValues( RiaDefines::TRUE_VERTICAL_DEPTH, displayUnit ).data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()->depthPlotValues( RiaDefines::MEASURED_DEPTH, displayUnit ).data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
depthType = wellLogPlot->depthType();
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()->depthPlotValues( depthType, displayUnit ).data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||
|
||||
if ( updateParentPlot )
|
||||
|
||||
@@ -99,7 +99,9 @@ RimWellLogPlot::RimWellLogPlot()
|
||||
m_nameConfig = new RimWellLogPlotNameConfig();
|
||||
|
||||
m_availableDepthUnits = {RiaDefines::UNIT_METER, RiaDefines::UNIT_FEET};
|
||||
m_availableDepthTypes = {RiaDefines::MEASURED_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH};
|
||||
m_availableDepthTypes = {RiaDefines::MEASURED_DEPTH,
|
||||
RiaDefines::TRUE_VERTICAL_DEPTH,
|
||||
RiaDefines::TRUE_VERTICAL_DEPTH_RKB};
|
||||
|
||||
m_minAvailableDepth = HUGE_VAL;
|
||||
m_maxAvailableDepth = -HUGE_VAL;
|
||||
@@ -278,14 +280,6 @@ void RimWellLogPlot::visibleDepthRange( double* minimumDepth, double* maximumDep
|
||||
*maximumDepth = m_maxVisibleDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::enableAllAutoNameTags( bool enable )
|
||||
{
|
||||
m_nameConfig->enableAllAutoNameTags( enable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -313,7 +307,6 @@ void RimWellLogPlot::uiOrderingForAutoName( QString uiConfigName, caf::PdmUiOrde
|
||||
{
|
||||
uiOrdering.add( &m_showPlotWindowTitle );
|
||||
m_nameConfig->uiOrdering( uiConfigName, uiOrdering );
|
||||
uiOrdering.add( &m_showIndividualPlotTitles );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -579,7 +572,15 @@ void RimWellLogPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
else if ( changedField == &m_depthType )
|
||||
{
|
||||
m_isAutoScaleDepthEnabled = true;
|
||||
m_isAutoScaleDepthEnabled = true;
|
||||
|
||||
bool isTVDRKB = m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB;
|
||||
m_nameConfig->setAutoNameTags( m_nameConfig->addCaseName(),
|
||||
m_nameConfig->addWellName(),
|
||||
m_nameConfig->addTimeStep(),
|
||||
isTVDRKB,
|
||||
m_nameConfig->addWaterDepth() );
|
||||
|
||||
RimWellAllocationPlot* parentWellAllocation = nullptr;
|
||||
this->firstAncestorOrThisOfType( parentWellAllocation );
|
||||
if ( parentWellAllocation )
|
||||
@@ -613,10 +614,12 @@ void RimWellLogPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "Depth Axis" );
|
||||
uiOrderingForDepthAxis( uiConfigName, *gridGroup );
|
||||
|
||||
caf::PdmUiGroup* titleAndLegendsGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
uiOrderingForAutoName( uiConfigName, *titleAndLegendsGroup );
|
||||
RimPlotWindow::uiOrderingForLegendSettings( uiConfigName, *titleAndLegendsGroup );
|
||||
titleAndLegendsGroup->add( &m_columnCount );
|
||||
caf::PdmUiGroup* titleGroup = uiOrdering.addNewGroup( "Plot Title" );
|
||||
uiOrderingForAutoName( uiConfigName, *titleGroup );
|
||||
|
||||
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
|
||||
RimPlotWindow::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );
|
||||
plotLayoutGroup->add( &m_columnCount );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
@@ -741,6 +744,10 @@ QString RimWellLogPlot::depthAxisTitle() const
|
||||
case RiaDefines::CONNECTION_NUMBER:
|
||||
depthTitle = "Connection";
|
||||
break;
|
||||
|
||||
case RiaDefines::TRUE_VERTICAL_DEPTH_RKB:
|
||||
depthTitle = "TVDRKB";
|
||||
break;
|
||||
}
|
||||
|
||||
if ( m_depthType() == RiaDefines::CONNECTION_NUMBER ) return depthTitle;
|
||||
|
||||
@@ -86,8 +86,6 @@ public:
|
||||
void availableDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
void visibleDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
|
||||
void enableAllAutoNameTags( bool enable );
|
||||
|
||||
void uiOrderingForDepthAxis( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForAutoName( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ RimWellLogPlotNameConfig::RimWellLogPlotNameConfig()
|
||||
{
|
||||
CAF_PDM_InitObject( "Well Log Plot Name Generator", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_addCaseName, "AddCaseName", false, "Add Case Name", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addWellName, "AddWellName", false, "Add Well Name", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addTimestep, "AddTimeStep", false, "Add Time Step", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addAirGap, "AddAirGap", false, "Add Air Gap", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addWaterDepth, "AddWaterDepth", false, "Add Water Depth", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addCaseName, "AddCaseName", false, "Show Case Name", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addWellName, "AddWellName", false, "Show Well Name", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addTimestep, "AddTimeStep", false, "Show Time Step", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addAirGap, "AddAirGap", false, "Show Air Gap", "", "", "" );
|
||||
CAF_PDM_InitField( &m_addWaterDepth, "AddWaterDepth", false, "Show Water Depth", "", "", "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -435,11 +435,21 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
measuredDepthVector = tvDepthVector;
|
||||
}
|
||||
|
||||
this->setValuesWithTVD( values,
|
||||
measuredDepthVector,
|
||||
tvDepthVector,
|
||||
RiaEclipseUnitTools::depthUnit( unitSystem ),
|
||||
false );
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimWellPath* wellPath = proj->wellPathByName( m_wellName );
|
||||
|
||||
double rkbDiff = 0.0;
|
||||
if ( wellPath )
|
||||
{
|
||||
rkbDiff = wellPath->wellPathGeometry()->rkbDiff();
|
||||
}
|
||||
|
||||
this->setValuesWithMdAndTVD( values,
|
||||
measuredDepthVector,
|
||||
tvDepthVector,
|
||||
rkbDiff,
|
||||
RiaEclipseUnitTools::depthUnit( unitSystem ),
|
||||
false );
|
||||
|
||||
RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER;
|
||||
if ( wellLogPlot )
|
||||
|
||||
@@ -795,7 +795,10 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
|
||||
else if ( depthType == RiaDefines::PSEUDO_LENGTH )
|
||||
out += "PL ";
|
||||
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
|
||||
out += "TVD ";
|
||||
out += "TVDMSL ";
|
||||
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
|
||||
out += "TVDRKB ";
|
||||
|
||||
for ( QString name : curveNames )
|
||||
out += " \t" + name;
|
||||
out += "\n";
|
||||
@@ -1925,8 +1928,9 @@ CurveSamplingPointData RimWellLogTrack::curveSamplingPointData( RigEclipseWellLo
|
||||
{
|
||||
CurveSamplingPointData curveData;
|
||||
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.rkbDiff = extractor->wellPathData()->rkbDiff();
|
||||
|
||||
extractor->curveData( resultAccessor, &curveData.data );
|
||||
|
||||
@@ -1941,8 +1945,9 @@ CurveSamplingPointData RimWellLogTrack::curveSamplingPointData( RigGeoMechWellLo
|
||||
{
|
||||
CurveSamplingPointData curveData;
|
||||
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.rkbDiff = extractor->wellPathData()->rkbDiff();
|
||||
|
||||
extractor->curveData( resultAddress, 0, &curveData.data );
|
||||
return curveData;
|
||||
@@ -1981,9 +1986,16 @@ void RimWellLogTrack::findRegionNamesToPlot( const CurveSamplingPointData&
|
||||
{
|
||||
depthVector = curveData.md;
|
||||
}
|
||||
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
|
||||
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
|
||||
{
|
||||
depthVector = curveData.tvd;
|
||||
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
|
||||
{
|
||||
for ( double& depthValue : depthVector )
|
||||
{
|
||||
depthValue += curveData.rkbDiff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( depthVector.empty() ) return;
|
||||
@@ -2171,7 +2183,8 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
{
|
||||
if ( m_formationWellPathForSourceWellPath == nullptr ) return;
|
||||
|
||||
if ( !( plot->depthType() == RiaDefines::MEASURED_DEPTH || plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH ) )
|
||||
if ( !( plot->depthType() == RiaDefines::MEASURED_DEPTH || plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH ||
|
||||
plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2187,6 +2200,14 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
m_showformationFluids(),
|
||||
plot->depthType() );
|
||||
|
||||
if ( plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
|
||||
{
|
||||
for ( double& depthValue : yValues )
|
||||
{
|
||||
depthValue += m_formationWellPathForSourceWellPath->wellPathGeometry()->rkbDiff();
|
||||
}
|
||||
}
|
||||
|
||||
m_annotationTool->attachWellPicks( m_plotWidget, formationNamesToPlot, yValues );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ struct CurveSamplingPointData
|
||||
std::vector<double> data;
|
||||
std::vector<double> md;
|
||||
std::vector<double> tvd;
|
||||
|
||||
double rkbDiff;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
@@ -110,12 +110,6 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( values.size() == measuredDepthValues.size() )
|
||||
{
|
||||
this->setValuesAndDepths( values,
|
||||
measuredDepthValues,
|
||||
RiaDefines::MEASURED_DEPTH,
|
||||
RiaDefines::UNIT_METER,
|
||||
false );
|
||||
|
||||
RigWellPath* rigWellPath = m_wellPath->wellPathGeometry();
|
||||
if ( rigWellPath )
|
||||
{
|
||||
@@ -129,6 +123,16 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
this->setValuesAndDepths( values,
|
||||
measuredDepthValues,
|
||||
RiaDefines::TRUE_VERTICAL_DEPTH,
|
||||
rigWellPath->rkbDiff(),
|
||||
RiaDefines::UNIT_METER,
|
||||
false );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setValuesAndDepths( values,
|
||||
measuredDepthValues,
|
||||
RiaDefines::MEASURED_DEPTH,
|
||||
0.0,
|
||||
RiaDefines::UNIT_METER,
|
||||
false );
|
||||
}
|
||||
@@ -148,22 +152,16 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
displayUnit = wellLogPlot->depthUnit();
|
||||
}
|
||||
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH &&
|
||||
this->curveData()->availableDepthTypes().count( RiaDefines::TRUE_VERTICAL_DEPTH ) )
|
||||
|
||||
RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH;
|
||||
if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
|
||||
{
|
||||
m_qwtPlotCurve->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()
|
||||
->depthPlotValues( RiaDefines::TRUE_VERTICAL_DEPTH, displayUnit )
|
||||
.data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve
|
||||
->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()->depthPlotValues( RiaDefines::MEASURED_DEPTH, displayUnit ).data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
depthType = wellLogPlot->depthType();
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setSamples( this->curveData()->xPlotValues().data(),
|
||||
this->curveData()->depthPlotValues( depthType, displayUnit ).data(),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user