RFT Curves: Add more segment curves

- add CONGRAT
- add pressure track
- add CONFAC
- fix some plot layout issues
- Fix bug for first segment MD location
- Add default scale factor 1e-3 for gas curves
- Avoid inf values in some curves, seen in PRESSURE and CONFAC
- Use assignment in statements instead of std::get
This commit is contained in:
Magne Sjaastad
2022-10-27 11:17:41 +02:00
parent f6bde92d81
commit 4c3e1c3fe8
19 changed files with 455 additions and 188 deletions

View File

@@ -482,6 +482,14 @@ void RimWellLogRftCurve::assignColorFromResultName( const QString& resultName )
setFillColor( fillColor );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogRftCurve::setScaleFactor( double factor )
{
m_scaleFactor = factor;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -539,7 +547,14 @@ std::map<QString, QString> RimWellLogRftCurve::createCurveNameKeyValueMap() cons
variableValueMap[RiaDefines::namingVariableWellBranch()] = branchText;
variableValueMap[RiaDefines::namingVariableResultType()] = m_segmentBranchType().uiText();
if ( isSegmentResult( m_segmentResultName() ) )
{
variableValueMap[RiaDefines::namingVariableResultType()] = m_segmentBranchType().uiText();
}
else
{
variableValueMap[RiaDefines::namingVariableResultType()] = "Reservoir";
}
}
if ( !m_timeStep().isNull() )
@@ -707,8 +722,9 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
m_plotCurve->setPerPointLabels( perPointLabels );
auto propertyValues = this->curveData()->propertyValues();
auto depthValues = this->curveData()->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
auto propertyValues = this->curveData()->propertyValuesByIntervals();
auto depthValues =
this->curveData()->depthValuesByIntervals( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
if ( !errors.empty() )
{
@@ -719,6 +735,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
setPropertyAndDepthValuesToPlotCurve( propertyValues, depthValues );
}
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
RimWellLogTrack* wellLogTrack;
firstAncestorOrThisOfType( wellLogTrack );
CVF_ASSERT( wellLogTrack );
@@ -814,7 +832,10 @@ void RimWellLogRftCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrder
else
{
curveDataGroup->add( &m_segmentResultName );
curveDataGroup->add( &m_segmentBranchType );
if ( isSegmentResult( m_segmentResultName() ) )
{
curveDataGroup->add( &m_segmentBranchType );
}
curveDataGroup->add( &m_segmentBranchIndex );
curveDataGroup->add( &m_curveColorByPhase );
}
@@ -936,7 +957,7 @@ void RimWellLogRftCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
loadData = true;
}
else if ( changedField == &m_timeStep || changedField == &m_segmentResultName || changedField == &m_segmentBranchIndex ||
changedField == &m_rftDataType || changedField == &m_segmentBranchType )
changedField == &m_rftDataType || changedField == &m_segmentBranchType || m_scaleFactor )
{
loadData = true;
}
@@ -1239,27 +1260,12 @@ std::vector<double> RimWellLogRftCurve::measuredDepthValues()
{
if ( m_rftDataType() == RftDataType::RFT_SEGMENT_DATA )
{
std::vector<double> values;
RifReaderRftInterface* reader = rftReader();
if ( reader )
{
auto depthAddress =
RifEclipseRftAddress::createBranchSegmentAddress( m_wellName(),
m_timeStep,
RiaDefines::segmentStartDepthResultName(),
segmentBranchIndex(),
m_segmentBranchType() );
reader->values( depthAddress, &values );
// Special handling of first segment
if ( values.size() > 2 && values.front() < 0.001 )
{
values[0] = values[1];
}
return RimRftTools::seglenstValues( reader, m_wellName(), m_timeStep, segmentBranchIndex(), m_segmentBranchType() );
}
return values;
return {};
}
if ( m_observedFmuRftData && !m_ensemble && !m_summaryCase )
@@ -1378,3 +1384,11 @@ int RimWellLogRftCurve::segmentBranchIndex() const
{
return m_segmentBranchIndex();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogRftCurve::isSegmentResult( const QString& resultName )
{
return resultName.startsWith( "SEG" );
}