#5063 Improve auto name for well log plots and use it for well allocation plots

This commit is contained in:
Gaute Lindkvist
2019-11-25 12:40:51 +01:00
parent 95f8c44f0f
commit d44775aba6
8 changed files with 78 additions and 5 deletions

View File

@@ -40,6 +40,7 @@
#include "RimTotalWellAllocationPlot.h" #include "RimTotalWellAllocationPlot.h"
#include "RimWellAllocationPlotLegend.h" #include "RimWellAllocationPlotLegend.h"
#include "RimWellFlowRateCurve.h" #include "RimWellFlowRateCurve.h"
#include "RimWellLogCurveCommonDataSource.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
#include "RimWellLogTrack.h" #include "RimWellLogTrack.h"
@@ -210,7 +211,11 @@ void RimWellAllocationPlot::updateFromWell()
if ( m_flowType() == ACCUMULATED ) description = "Accumulated Flow"; if ( m_flowType() == ACCUMULATED ) description = "Accumulated Flow";
if ( m_flowType() == INFLOW ) description = "Inflow Rates"; if ( m_flowType() == INFLOW ) description = "Inflow Rates";
accumulatedWellFlowPlot()->setDescription( description + " (" + m_wellName + ")" ); RimWellLogPlotNameConfig* nameConfig = accumulatedWellFlowPlot()->nameConfig();
nameConfig->setCustomName( description );
nameConfig->setAutoNameTags( false, true, false, false, false );
nameConfig->setFieldVisibility( true, true, true, false, false );
accumulatedWellFlowPlot()->updateAutoName();
if ( !m_case ) return; if ( !m_case ) return;
@@ -356,7 +361,6 @@ void RimWellAllocationPlot::updateFromWell()
m_totalWellAllocationPlot->updateConnectedEditors(); m_totalWellAllocationPlot->updateConnectedEditors();
accumulatedWellFlowPlot()->updateConnectedEditors(); accumulatedWellFlowPlot()->updateConnectedEditors();
m_tofAccumulatedPhaseFractionsPlot->reloadFromWell(); m_tofAccumulatedPhaseFractionsPlot->reloadFromWell();
m_tofAccumulatedPhaseFractionsPlot->updateConnectedEditors(); m_tofAccumulatedPhaseFractionsPlot->updateConnectedEditors();

View File

@@ -56,6 +56,33 @@ RimWellFlowRateCurve::RimWellFlowRateCurve()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellFlowRateCurve::~RimWellFlowRateCurve() {} RimWellFlowRateCurve::~RimWellFlowRateCurve() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseResultCase* RimWellFlowRateCurve::rimCase()
{
RimWellAllocationPlot* wap = wellAllocationPlot();
if ( wap )
{
return wap->rimCase();
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimWellFlowRateCurve::timeStep()
{
RimWellAllocationPlot* wap = wellAllocationPlot();
if ( wap )
{
return wap->timeStep();
}
return -1;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -44,8 +44,10 @@ public:
const std::vector<double>& flowRates ); const std::vector<double>& flowRates );
void updateStackedPlotData(); void updateStackedPlotData();
QString wellName() const override; RimEclipseResultCase* rimCase();
QString wellLogChannelName() const override; int timeStep();
QString wellName() const override;
QString wellLogChannelName() const override;
void setGroupId( int groupId ); void setGroupId( int groupId );
int groupId() const; int groupId() const;

View File

@@ -21,10 +21,12 @@
#include "RimCase.h" #include "RimCase.h"
#include "RimDataSourceSteppingTools.h" #include "RimDataSourceSteppingTools.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimEclipseResultCase.h"
#include "RimGeoMechCase.h" #include "RimGeoMechCase.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellFlowRateCurve.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileCurve.h" #include "RimWellLogFileCurve.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
@@ -285,6 +287,7 @@ void RimWellLogCurveCommonDataSource::updateDefaultOptions( const std::vector<Ri
} }
RimWellLogExtractionCurve* extractionCurve = dynamic_cast<RimWellLogExtractionCurve*>( curve ); RimWellLogExtractionCurve* extractionCurve = dynamic_cast<RimWellLogExtractionCurve*>( curve );
RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( curve ); RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( curve );
RimWellFlowRateCurve* flowRateCurve = dynamic_cast<RimWellFlowRateCurve*>( curve );
if ( extractionCurve ) if ( extractionCurve )
{ {
RimWellLogWbsCurve* wbsCurve = dynamic_cast<RimWellLogWbsCurve*>( extractionCurve ); RimWellLogWbsCurve* wbsCurve = dynamic_cast<RimWellLogWbsCurve*>( extractionCurve );
@@ -322,6 +325,13 @@ void RimWellLogCurveCommonDataSource::updateDefaultOptions( const std::vector<Ri
m_uniqueWellPaths.insert( fileCurve->wellPath() ); m_uniqueWellPaths.insert( fileCurve->wellPath() );
m_uniqueWellNames.insert( fileCurve->wellName() ); m_uniqueWellNames.insert( fileCurve->wellName() );
} }
else if ( flowRateCurve )
{
m_uniqueTrajectoryTypes.insert( RimWellLogExtractionCurve::SIMULATION_WELL );
m_uniqueWellNames.insert( flowRateCurve->wellName() );
m_uniqueCases.insert( flowRateCurve->rimCase() );
m_uniqueTimeSteps.insert( flowRateCurve->timeStep() );
}
} }
for ( RimWellLogTrack* track : tracks ) for ( RimWellLogTrack* track : tracks )
{ {

View File

@@ -400,6 +400,14 @@ QString RimWellLogPlot::createAutoName() const
return generatedCurveName.join( ": " ); return generatedCurveName.join( ": " );
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogPlotNameConfig* RimWellLogPlot::nameConfig() const
{
return m_nameConfig;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -92,7 +92,8 @@ public:
void uiOrderingForDepthAxis( caf::PdmUiOrdering& uiOrdering ); void uiOrderingForDepthAxis( caf::PdmUiOrdering& uiOrdering );
void uiOrderingForPlotLayout( caf::PdmUiOrdering& uiOrdering ) override; void uiOrderingForPlotLayout( caf::PdmUiOrdering& uiOrdering ) override;
QString createAutoName() const override; QString createAutoName() const override;
RimWellLogPlotNameConfig* nameConfig() const;
RimWellLogCurveCommonDataSource* commonDataSource() const; RimWellLogCurveCommonDataSource* commonDataSource() const;
void updateCommonDataSource(); void updateCommonDataSource();

View File

@@ -96,6 +96,22 @@ void RimWellLogPlotNameConfig::setAutoNameTags( bool addCaseName,
m_addWaterDepth = addWaterDepth; m_addWaterDepth = addWaterDepth;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotNameConfig::setFieldVisibility( bool caseNameVisible,
bool wellNameVisible,
bool timeStepVisible,
bool airGapVisible,
bool waterDepthVisible )
{
m_addCaseName.uiCapability()->setUiHidden( !caseNameVisible );
m_addWellName.uiCapability()->setUiHidden( !wellNameVisible );
m_addTimestep.uiCapability()->setUiHidden( !timeStepVisible );
m_addAirGap.uiCapability()->setUiHidden( !airGapVisible );
m_addWaterDepth.uiCapability()->setUiHidden( !waterDepthVisible );
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -38,6 +38,11 @@ public:
bool addWaterDepth() const; bool addWaterDepth() const;
void setAutoNameTags( bool addCaseName, bool addWellName, bool addTimeStep, bool addAirGap, bool addWaterDepth ); void setAutoNameTags( bool addCaseName, bool addWellName, bool addTimeStep, bool addAirGap, bool addWaterDepth );
void setFieldVisibility( bool caseNameVisible,
bool wellNameVisible,
bool timeStepVisible,
bool airGapVisible,
bool waterDepthVisible );
protected: protected:
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;