mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve RFT reader performance
* #9963 Rft reader: Search for DATA file when required WSEGLINK is used to establish the branch topology for MSW wells. Search and read WSEGLINK data when segment data is requested by the user. This can be a time consuming operation. Avoid doing this search for standard RFT plots. * Make sure that single summary curves are displayed correctly * Make sure single summary curves are visible in the plot
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "RifReaderOpmRft.h"
|
||||
|
||||
#include "RimFileSummaryCase.h"
|
||||
#include "RimRftCase.h"
|
||||
#include "RimRftTopologyCurve.h"
|
||||
#include "RimSummaryCase.h"
|
||||
@@ -58,10 +59,12 @@ bool RicNewMultiPhaseRftSegmentPlotFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewMultiPhaseRftSegmentPlotFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimSummaryCase* summaryCase = RicNewRftSegmentWellLogPlotFeature::getSelectedOrFirstRftCase();
|
||||
if ( !summaryCase ) return;
|
||||
auto fileSummaryCase = dynamic_cast<RimFileSummaryCase*>( RicNewRftSegmentWellLogPlotFeature::getSelectedOrFirstRftCase() );
|
||||
if ( !fileSummaryCase ) return;
|
||||
|
||||
auto rftReader = summaryCase->rftReader();
|
||||
fileSummaryCase->searchForWseglinkAndRecreateRftReader();
|
||||
|
||||
auto rftReader = fileSummaryCase->rftReader();
|
||||
if ( !rftReader )
|
||||
{
|
||||
RiaLogging::error( "Could not open RFT file or no RFT file present. " );
|
||||
@@ -82,7 +85,7 @@ void RicNewMultiPhaseRftSegmentPlotFeature::onActionTriggered( bool isChecked )
|
||||
for ( auto branchType : allBranchTypes )
|
||||
{
|
||||
QString trackName = "Reservoir Rates - " + caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
|
||||
appendTrackAndCurveForBranchType( plot, trackName, { "CONGRAT", "CONORAT", "CONWRAT" }, wellName, branchType, summaryCase );
|
||||
appendTrackAndCurveForBranchType( plot, trackName, { "CONGRAT", "CONORAT", "CONWRAT" }, wellName, branchType, fileSummaryCase );
|
||||
}
|
||||
|
||||
for ( auto branchType : allBranchTypes )
|
||||
@@ -90,12 +93,12 @@ void RicNewMultiPhaseRftSegmentPlotFeature::onActionTriggered( bool isChecked )
|
||||
QString trackName = caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
|
||||
trackName += " Rates";
|
||||
|
||||
appendTrackAndCurveForBranchType( plot, trackName, { "SEGGRAT", "SEGORAT", "SEGWRAT" }, wellName, branchType, summaryCase );
|
||||
appendTrackAndCurveForBranchType( plot, trackName, { "SEGGRAT", "SEGORAT", "SEGWRAT" }, wellName, branchType, fileSummaryCase );
|
||||
}
|
||||
|
||||
RicNewRftSegmentWellLogPlotFeature::appendPressureTrack( plot, wellName, summaryCase );
|
||||
RicNewRftSegmentWellLogPlotFeature::appendConnectionFactorTrack( plot, wellName, summaryCase );
|
||||
RicNewRftSegmentWellLogPlotFeature::appendTopologyTrack( plot, wellName, summaryCase );
|
||||
RicNewRftSegmentWellLogPlotFeature::appendPressureTrack( plot, wellName, fileSummaryCase );
|
||||
RicNewRftSegmentWellLogPlotFeature::appendConnectionFactorTrack( plot, wellName, fileSummaryCase );
|
||||
RicNewRftSegmentWellLogPlotFeature::appendTopologyTrack( plot, wellName, fileSummaryCase );
|
||||
|
||||
plot->loadDataAndUpdate();
|
||||
plot->updateTrackVisibility();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "RifReaderOpmRft.h"
|
||||
|
||||
#include "RimFileSummaryCase.h"
|
||||
#include "RimRftCase.h"
|
||||
#include "RimRftTopologyCurve.h"
|
||||
#include "RimSummaryCase.h"
|
||||
@@ -59,10 +60,12 @@ bool RicNewRftSegmentWellLogPlotFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewRftSegmentWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimSummaryCase* summaryCase = RicNewRftSegmentWellLogPlotFeature::getSelectedOrFirstRftCase();
|
||||
if ( !summaryCase ) return;
|
||||
auto fileSummaryCase = dynamic_cast<RimFileSummaryCase*>( RicNewRftSegmentWellLogPlotFeature::getSelectedOrFirstRftCase() );
|
||||
if ( !fileSummaryCase ) return;
|
||||
|
||||
auto rftReader = summaryCase->rftReader();
|
||||
fileSummaryCase->searchForWseglinkAndRecreateRftReader();
|
||||
|
||||
auto rftReader = fileSummaryCase->rftReader();
|
||||
if ( !rftReader )
|
||||
{
|
||||
RiaLogging::error( "Could not open RFT file or no RFT file present. " );
|
||||
@@ -87,7 +90,7 @@ void RicNewRftSegmentWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||
plot->addPlot( plotTrack );
|
||||
plotTrack->setDescription( trackName );
|
||||
|
||||
auto curve = createAndAddCurve( plotTrack, "CONGRAT", wellName, branchType, summaryCase );
|
||||
auto curve = createAndAddCurve( plotTrack, "CONGRAT", wellName, branchType, fileSummaryCase );
|
||||
curve->setScaleFactor( 1e-3 );
|
||||
curve->setFillStyle( Qt::SolidPattern );
|
||||
}
|
||||
@@ -97,14 +100,14 @@ void RicNewRftSegmentWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||
QString resultName = "SEGGRAT";
|
||||
QString trackName = caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
|
||||
trackName += " Rates";
|
||||
auto curve = appendTrackAndCurveForBranchType( plot, trackName, resultName, wellName, branchType, summaryCase );
|
||||
auto curve = appendTrackAndCurveForBranchType( plot, trackName, resultName, wellName, branchType, fileSummaryCase );
|
||||
curve->setScaleFactor( 1e-3 );
|
||||
curve->setFillStyle( Qt::SolidPattern );
|
||||
}
|
||||
|
||||
appendPressureTrack( plot, wellName, summaryCase );
|
||||
appendConnectionFactorTrack( plot, wellName, summaryCase );
|
||||
appendTopologyTrack( plot, wellName, summaryCase );
|
||||
appendPressureTrack( plot, wellName, fileSummaryCase );
|
||||
appendConnectionFactorTrack( plot, wellName, fileSummaryCase );
|
||||
appendTopologyTrack( plot, wellName, fileSummaryCase );
|
||||
|
||||
plot->loadDataAndUpdate();
|
||||
plot->updateTrackVisibility();
|
||||
|
||||
Reference in New Issue
Block a user