mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7027 Stim Plan Model: add unit to legend text for relevant curves
This commit is contained in:
parent
53f102ee55
commit
5ad7bfac77
@ -232,6 +232,7 @@ void RicNewStimPlanModelPlotFeature::createFormationTrack( RimStimPlanModelPlot*
|
||||
formationTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
||||
formationTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
||||
formationTrack->setColSpan( RimPlot::ONE );
|
||||
formationTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FORMATIONS ) );
|
||||
formationTrack->setLegendsVisible( true );
|
||||
}
|
||||
|
||||
@ -259,6 +260,7 @@ void RicNewStimPlanModelPlotFeature::createFaciesTrack( RimStimPlanModelPlot* pl
|
||||
faciesTrack->setAnnotationDisplay( RiuPlotAnnotationTool::COLOR_SHADING );
|
||||
faciesTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
||||
faciesTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
||||
faciesTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FACIES ) );
|
||||
faciesTrack->setLegendsVisible( false );
|
||||
faciesTrack->setPlotTitleVisible( true );
|
||||
|
||||
@ -334,6 +336,8 @@ void RicNewStimPlanModelPlotFeature::createLayersTrack( RimStimPlanModelPlot* pl
|
||||
|
||||
faciesTrack->addCurve( curve );
|
||||
faciesTrack->setAutoScaleXEnabled( true );
|
||||
faciesTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::LAYERS ) );
|
||||
|
||||
curve->loadDataAndUpdate( true );
|
||||
|
||||
curve->updateConnectedEditors();
|
||||
@ -423,6 +427,7 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot
|
||||
plotTrack->setLogarithmicScale( isPlotLogarithmic );
|
||||
plotTrack->setAutoScaleXEnabled( true );
|
||||
plotTrack->setMinAndMaxTicksOnly( useMinMaxTicksOnly( propertyTypes[0] ) );
|
||||
plotTrack->setXAxisTitle( stimPlanModel->unitForProperty( propertyTypes[0] ) );
|
||||
|
||||
plotTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
@ -1840,3 +1840,32 @@ RimEclipseCase* RimStimPlanModel::eclipseCaseForType( RimExtractionConfiguration
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimStimPlanModel::unitForProperty( RiaDefines::CurveProperty curveProperty ) const
|
||||
{
|
||||
std::map<RiaDefines::CurveProperty, QString> propertyToUnitMapping;
|
||||
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::PERMEABILITY_X] = "mD";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::PERMEABILITY_Z] = "mD";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::YOUNGS_MODULUS] = "MMpsi";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::K_IC] = "<html>psi * √in</html>";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::PROPPANT_EMBEDMENT] = "<html>lb / ft";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::SPURT_LOSS] = "<html>gal / 100ft²</html>";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::FLUID_LOSS_COEFFICIENT] = "<html>ft / √min</html>";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::THERMAL_EXPANSION_COEFFICIENT] = "<html>1 / °C</html>";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::TEMPERATURE] = "<html>°C</html>";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::STRESS] = "Psi";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::INITIAL_STRESS] = "Psi";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::STRESS_GRADIENT] = "Psi / ft";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::PRESSURE] = "Bar";
|
||||
propertyToUnitMapping[RiaDefines::CurveProperty::INITIAL_PRESSURE] = "Bar";
|
||||
|
||||
auto hit = propertyToUnitMapping.find( curveProperty );
|
||||
if ( hit != propertyToUnitMapping.end() )
|
||||
return hit->second;
|
||||
else
|
||||
return " ";
|
||||
}
|
||||
|
@ -190,6 +190,8 @@ public:
|
||||
|
||||
QString pressureDate() const;
|
||||
|
||||
QString unitForProperty( RiaDefines::CurveProperty curveProperty ) const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
Loading…
Reference in New Issue
Block a user