Janitor : Add SOIL SGAS SWAT to RiaResultNames

wip
This commit is contained in:
Magne Sjaastad 2022-01-06 08:55:55 +01:00
parent 3d5c3134b2
commit 1e17da2926
18 changed files with 120 additions and 79 deletions

View File

@ -350,6 +350,30 @@ QString RiaResultNames::indexKResultName()
return "INDEX_K";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaResultNames::soil()
{
return "SOIL";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaResultNames::sgas()
{
return "SGAS";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaResultNames::swat()
{
return "SWAT";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -69,6 +69,10 @@ QString indexIResultName();
QString indexJResultName();
QString indexKResultName();
QString soil();
QString sgas();
QString swat();
// Well path derived results
QString wbsAzimuthResult();
QString wbsInclinationResult();

View File

@ -62,19 +62,19 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( const RimEclipse
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SOIL" ) );
RigEclipseResultAddress( RiaResultNames::soil() ) );
cvf::ref<RigResultAccessor> sgas =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SGAS" ) );
RigEclipseResultAddress( RiaResultNames::sgas() ) );
cvf::ref<RigResultAccessor> swat =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SWAT" ) );
RigEclipseResultAddress( RiaResultNames::swat() ) );
m_resultAccessor = new RigTernaryResultAccessor();
m_resultAccessor->setTernaryResultAccessors( soil.p(), sgas.p(), swat.p() );
@ -111,19 +111,19 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( const RimEclipse
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SOIL" ) );
RigEclipseResultAddress( RiaResultNames::soil() ) );
cvf::ref<RigResultAccessor> sgas =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SGAS" ) );
RigEclipseResultAddress( RiaResultNames::sgas() ) );
cvf::ref<RigResultAccessor> swat =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
resTimeStepIdx,
RigEclipseResultAddress( "SWAT" ) );
RigEclipseResultAddress( RiaResultNames::swat() ) );
m_resultAccessor = new RigTernaryResultAccessor();
m_resultAccessor->setTernaryResultAccessors( soil.p(), sgas.p(), swat.p() );

View File

@ -298,7 +298,7 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView()
auto prefs = RiaPreferences::current();
if ( prefs->loadAndShowSoil )
{
rimEclipseView->cellResult()->setResultVariable( "SOIL" );
rimEclipseView->cellResult()->setResultVariable( RiaResultNames::soil() );
}
rimEclipseView->faultCollection()->showFaultCollection = prefs->enableFaultsByDefault();

View File

@ -188,7 +188,7 @@ RimRegularLegendConfig* RimEclipseCellColors::createLegendForResult( const QStri
{
colorRangeType = RimRegularLegendConfig::ColorRangesType::CATEGORY;
}
else if ( resultName == "SWAT" )
else if ( resultName == RiaResultNames::swat() )
{
colorRangeType = RimRegularLegendConfig::ColorRangesType::OPPOSITE_NORMAL;
}

View File

@ -210,12 +210,12 @@ std::vector<double> RimEclipseContourMapProjection::generateResults( int timeSte
if ( m_resultAggregation == RESULTS_OIL_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN )
{
gridCellResult->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) );
}
if ( m_resultAggregation == RESULTS_GAS_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN )
{
gridCellResult->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
}
gridResultValues = calculateColumnResult( m_resultAggregation() );
}
@ -304,7 +304,8 @@ std::vector<double> RimEclipseContourMapProjection::calculateColumnResult( Resul
if ( resultAggregation == RESULTS_OIL_COLUMN || resultAggregation == RESULTS_HC_COLUMN )
{
const std::vector<double>& soilResults =
resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ),
resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::soil() ),
timeStep );
for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx )
{
@ -314,12 +315,13 @@ std::vector<double> RimEclipseContourMapProjection::calculateColumnResult( Resul
if ( resultAggregation == RESULTS_GAS_COLUMN || resultAggregation == RESULTS_HC_COLUMN )
{
bool hasGasResult =
resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
bool hasGasResult = resultData->hasResultEntry(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
if ( hasGasResult )
{
const std::vector<double>& sgasResults =
resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ),
resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::sgas() ),
timeStep );
for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx )
{

View File

@ -342,7 +342,7 @@ void RimEclipseResultCase::loadAndUpdateSourSimData()
if ( eclipseView->cellResult()->resultType() == RiaDefines::ResultCatType::SOURSIMRL )
{
eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
eclipseView->cellResult()->setResultVariable( "SOIL" );
eclipseView->cellResult()->setResultVariable( RiaResultNames::soil() );
eclipseView->loadDataAndUpdate();
}
}

View File

@ -1817,11 +1817,11 @@ QList<caf::PdmOptionItemInfo>
if ( ternaryEnabled )
{
bool hasAtLeastOneTernaryComponent = false;
if ( cellCenterResultNames.contains( "SOIL" ) )
if ( cellCenterResultNames.contains( RiaResultNames::soil() ) )
hasAtLeastOneTernaryComponent = true;
else if ( cellCenterResultNames.contains( "SGAS" ) )
else if ( cellCenterResultNames.contains( RiaResultNames::sgas() ) )
hasAtLeastOneTernaryComponent = true;
else if ( cellCenterResultNames.contains( "SWAT" ) )
else if ( cellCenterResultNames.contains( RiaResultNames::swat() ) )
hasAtLeastOneTernaryComponent = true;
if ( resultCatType == RiaDefines::ResultCatType::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent )
@ -2208,7 +2208,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
{
RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
{
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" );
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() );
if ( gridCellResults->ensureKnownResultLoaded( resAddr ) )
{
@ -2229,7 +2229,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
}
{
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" );
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() );
if ( gridCellResults->ensureKnownResultLoaded( resAddr ) )
{
@ -2250,7 +2250,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
}
{
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" );
RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() );
if ( gridCellResults->ensureKnownResultLoaded( resAddr ) )
{

View File

@ -821,7 +821,8 @@ void RimEclipseStatisticsCase::populateResultSelection()
{
QStringList varList = caseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL )
->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
if ( varList.contains( "SOIL" ) ) m_selectedDynamicProperties.v().push_back( "SOIL" );
if ( varList.contains( RiaResultNames::soil() ) )
m_selectedDynamicProperties.v().push_back( RiaResultNames::soil() );
if ( varList.contains( "PRESSURE" ) ) m_selectedDynamicProperties.v().push_back( "PRESSURE" );
}
@ -837,7 +838,8 @@ void RimEclipseStatisticsCase::populateResultSelection()
{
QStringList varList = caseData->results( RiaDefines::PorosityModelType::FRACTURE_MODEL )
->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
if ( varList.contains( "SOIL" ) ) m_selectedFractureDynamicProperties.v().push_back( "SOIL" );
if ( varList.contains( RiaResultNames::soil() ) )
m_selectedFractureDynamicProperties.v().push_back( RiaResultNames::soil() );
if ( varList.contains( "PRESSURE" ) ) m_selectedFractureDynamicProperties.v().push_back( "PRESSURE" );
}

View File

@ -301,19 +301,19 @@ void RimTernaryLegendConfig::defineUiOrdering( QString uiConfigName, caf::PdmUiO
{
caf::PdmUiOrdering* ternaryGroupContainer = uiOrdering.addNewGroup( "Ternary " );
{
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( "SGAS" );
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( RiaResultNames::sgas() );
ternaryGroup->add( &userDefinedMinValueSgas );
ternaryGroup->add( &userDefinedMaxValueSgas );
}
{
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( "SWAT" );
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( RiaResultNames::swat() );
ternaryGroup->add( &userDefinedMinValueSwat );
ternaryGroup->add( &userDefinedMaxValueSwat );
}
{
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( "SOIL" );
caf::PdmUiOrdering* ternaryGroup = ternaryGroupContainer->addNewGroup( RiaResultNames::soil() );
ternaryGroup->add( &userDefinedMinValueSoil );
ternaryGroup->add( &userDefinedMaxValueSoil );
}

View File

@ -71,9 +71,9 @@ void caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::setUp()
addItem( RifEclipseRftAddress::NONE, "NONE", "None" );
addItem( RifEclipseRftAddress::TVD, "DEPTH", "Depth" );
addItem( RifEclipseRftAddress::PRESSURE, "PRESSURE", "Pressure" );
addItem( RifEclipseRftAddress::SWAT, "SWAT", "Water Saturation" );
addItem( RifEclipseRftAddress::SOIL, "SOIL", "Oil Saturation" );
addItem( RifEclipseRftAddress::SGAS, "SGAS", "Gas Saturation" );
addItem( RifEclipseRftAddress::SWAT, RiaResultNames::swat(), "Water Saturation" );
addItem( RifEclipseRftAddress::SOIL, RiaResultNames::soil(), "Oil Saturation" );
addItem( RifEclipseRftAddress::SGAS, RiaResultNames::sgas(), "Gas Saturation" );
addItem( RifEclipseRftAddress::WRAT, "WRAT", "Water Flow" );
addItem( RifEclipseRftAddress::ORAT, "ORAT", "Oil Flow" );
addItem( RifEclipseRftAddress::GRAT, "GRAT", "Gas flow" );

View File

@ -914,14 +914,16 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
{
// SOIL
{
if ( !hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ) )
if ( !hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) ) )
{
if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) ) ||
hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ) )
if ( hasResultEntry(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) ) ||
hasResultEntry(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) ) )
{
size_t soilIndex =
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SOIL" ),
RiaResultNames::soil() ),
false );
this->setMustBeCalculated( soilIndex );
}
@ -931,7 +933,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
// Oil Volume
if ( RiaApplication::enableDevelopmentFeatures() )
{
if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ) )
if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) ) )
{
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::riOilVolumeResultName() ),
@ -1348,14 +1350,16 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
return scalarResultIndex;
}
if ( resultName == "SOIL" )
if ( resultName == RiaResultNames::soil() )
{
if ( this->mustBeCalculated( scalarResultIndex ) )
{
// Trigger loading of SWAT, SGAS to establish time step count if no data has been loaded from file at
// this point
findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
findOrLoadKnownScalarResult(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
findOrLoadKnownScalarResult(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
m_cellScalarResults[scalarResultIndex].resize( this->maxTimeStepCount() );
for ( size_t timeStepIdx = 0; timeStepIdx < this->maxTimeStepCount(); timeStepIdx++ )
@ -1548,7 +1552,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
QString resultName = resVarAddr.resultName();
// Special handling for SOIL
if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName.toUpper() == "SOIL" )
if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName.toUpper() == RiaResultNames::soil() )
{
size_t soilScalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
@ -1648,15 +1652,17 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex )
// Compute SGAS based on SWAT if the simulation contains no oil
testAndComputeSgasForTimeStep( timeStepIndex );
RigEclipseResultAddress SWATAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" );
RigEclipseResultAddress SGASAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" );
RigEclipseResultAddress SWATAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() );
RigEclipseResultAddress SGASAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() );
RigEclipseResultAddress SSOLAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SSOL" );
size_t scalarIndexSWAT =
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ),
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::swat() ),
timeStepIndex );
size_t scalarIndexSGAS =
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ),
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::sgas() ),
timeStepIndex );
size_t scalarIndexSSOL =
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SSOL" ),
@ -1694,7 +1700,7 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex )
}
// Make sure memory is allocated for the new SOIL results
RigEclipseResultAddress SOILAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" );
RigEclipseResultAddress SOILAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() );
size_t soilResultScalarIndex = this->findScalarResultIndexFromAddress( SOILAddr );
m_cellScalarResults[soilResultScalarIndex].resize( soilTimeStepCount );
@ -1768,7 +1774,8 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex )
void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex )
{
size_t scalarIndexSWAT =
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ),
findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::swat() ),
timeStepIndex );
if ( scalarIndexSWAT == cvf::UNDEFINED_SIZE_T )
{
@ -1784,7 +1791,8 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex
// Simulation type is gas and water. No SGAS is present, compute SGAS based on SWAT
size_t scalarIndexSGAS =
this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ),
this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::sgas() ),
false );
if ( m_cellScalarResults[scalarIndexSGAS].size() > timeStepIndex )
{
@ -2930,8 +2938,8 @@ void RigCaseCellResultsData::computeOilVolumes()
false );
const std::vector<double>& cellVolumeResults = m_cellScalarResults[cellVolIdx][0];
size_t soilIdx =
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
size_t soilIdx = this->findOrLoadKnownScalarResult(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) );
size_t oilVolIdx =
this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::riOilVolumeResultName() ),

View File

@ -563,19 +563,19 @@ void RigFlowDiagSolverInterface::assignPhaseCorrecedPORV( RigFlowDiagResultAddre
case RigFlowDiagResultAddress::PHASE_OIL:
phaseSaturation = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SOIL",
RiaResultNames::soil(),
timeStepIdx );
break;
case RigFlowDiagResultAddress::PHASE_GAS:
phaseSaturation = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SGAS",
RiaResultNames::sgas(),
timeStepIdx );
break;
case RigFlowDiagResultAddress::PHASE_WAT:
phaseSaturation = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SWAT",
RiaResultNames::swat(),
timeStepIdx );
break;
default:

View File

@ -46,15 +46,15 @@ RigTofAccumulatedPhaseFractionsCalculator::RigTofAccumulatedPhaseFractionsCalcul
const std::vector<double>* swatResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SWAT",
RiaResultNames::swat(),
timestep );
const std::vector<double>* soilResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SOIL",
RiaResultNames::soil(),
timestep );
const std::vector<double>* sgasResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SGAS",
RiaResultNames::sgas(),
timestep );
const std::vector<double>* porvResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::STATIC_NATIVE,

View File

@ -71,11 +71,11 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe
QString phaseResultName;
if ( phase == RiaDefines::PhaseType::WATER_PHASE )
phaseResultName = "SWAT";
phaseResultName = RiaResultNames::swat();
else if ( phase == RiaDefines::PhaseType::OIL_PHASE )
phaseResultName = "SOIL";
phaseResultName = RiaResultNames::soil();
else if ( phase == RiaDefines::PhaseType::GAS_PHASE )
phaseResultName = "SGAS";
phaseResultName = RiaResultNames::sgas();
const std::vector<double>* phaseResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,
phaseResultName,

View File

@ -18,6 +18,12 @@
#include "RiuRelativePermeabilityPlotPanel.h"
#include "RiaCurveDataTools.h"
#include "RiaEclipseUnitTools.h"
#include "RiaResultNames.h"
#include "RigFlowDiagSolverInterface.h"
#include "RiuDockedQwtPlot.h"
#include "RiuGuiTheme.h"
#include "RiuQwtPlotCurve.h"
@ -25,11 +31,6 @@
#include "RiuRelativePermeabilityPlotUpdater.h"
#include "RiuTextDialog.h"
#include "RiaCurveDataTools.h"
#include "RiaEclipseUnitTools.h"
#include "RigFlowDiagSolverInterface.h"
#include "cvfAssert.h"
#include "cvfTrace.h"
@ -466,11 +467,11 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS
// Add vertical marker lines to indicate cell SWAT and/or SGAS saturations
if ( swat != HUGE_VAL )
{
addVerticalSaturationMarkerLine( swat, "SWAT", waterColor, plot, myPlotMarkers );
addVerticalSaturationMarkerLine( swat, RiaResultNames::swat(), waterColor, plot, myPlotMarkers );
}
if ( sgas != HUGE_VAL )
{
addVerticalSaturationMarkerLine( sgas, "SGAS", gasColor, plot, myPlotMarkers );
addVerticalSaturationMarkerLine( sgas, RiaResultNames::sgas(), gasColor, plot, myPlotMarkers );
}
if ( logScaleLeftAxis )

View File

@ -172,9 +172,9 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
RigCaseCellResultsData* cellResultsData =
eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "SATNUM" ) );
@ -185,14 +185,14 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
RiaDefines::PorosityModelType::MATRIX_MODEL,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SWAT" ) );
RiaResultNames::swat() ) );
cvf::ref<RigResultAccessor> sgasAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,
RiaDefines::PorosityModelType::MATRIX_MODEL,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SGAS" ) );
RiaResultNames::sgas() ) );
cvf::ref<RigResultAccessor> satnumAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,

View File

@ -544,11 +544,11 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
if ( gridCellResults )
{
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) );
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
cvf::ref<RigResultAccessor> dataAccessObjectX =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
@ -556,21 +556,21 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SOIL" ) );
RiaResultNames::soil() ) );
cvf::ref<RigResultAccessor> dataAccessObjectY =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SGAS" ) );
RiaResultNames::sgas() ) );
cvf::ref<RigResultAccessor> dataAccessObjectZ =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SWAT" ) );
RiaResultNames::swat() ) );
double scalarValue = 0.0;
@ -900,11 +900,11 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
if ( gridCellResults )
{
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) );
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
gridCellResults->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
RiaDefines::PorosityModelType porosityModel = eclResDef->porosityModel();
@ -914,21 +914,21 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
porosityModel,
m_timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SOIL" ) );
RiaResultNames::soil() ) );
cvf::ref<RigResultAccessor> dataAccessObjectY =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
m_gridIndex,
porosityModel,
m_timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SGAS" ) );
RiaResultNames::sgas() ) );
cvf::ref<RigResultAccessor> dataAccessObjectZ =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
m_gridIndex,
porosityModel,
m_timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"SWAT" ) );
RiaResultNames::swat() ) );
double scalarValue = 0.0;