mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #6220 from OPM/fracture-model-plot-improvements
Fracture model plot improvements
This commit is contained in:
commit
7d7840bb5f
@ -478,6 +478,10 @@ void RicNewFractureModelPlotFeature::createStressTrack( RimFractureModelPlot*
|
|||||||
curve->setLineThickness( 2 );
|
curve->setLineThickness( 2 );
|
||||||
curve->setUiName( trackName );
|
curve->setUiName( trackName );
|
||||||
curve->setAutoNameComponents( false, false, false, false, false );
|
curve->setAutoNameComponents( false, false, false, false, false );
|
||||||
|
if ( propertyType == RiaDefines::CurveProperty::STRESS_GRADIENT )
|
||||||
|
{
|
||||||
|
curve->setInterpolation( RiuQwtPlotCurve::INTERPOLATION_STEP_LEFT );
|
||||||
|
}
|
||||||
|
|
||||||
plotTrack->addCurve( curve );
|
plotTrack->addCurve( curve );
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScaleXEnabled( true );
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimElasticProperties.h"
|
#include "RimElasticProperties.h"
|
||||||
#include "RimEllipseFractureTemplate.h"
|
#include "RimEllipseFractureTemplate.h"
|
||||||
|
#include "RimFractureModelPlot.h"
|
||||||
#include "RimModeledWellPath.h"
|
#include "RimModeledWellPath.h"
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
@ -189,6 +190,8 @@ void RimFractureModel::fieldChangedByUi( const caf::PdmFieldHandle* changedField
|
|||||||
}
|
}
|
||||||
|
|
||||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
|
|
||||||
|
updateReferringPlots();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -731,3 +734,18 @@ QString RimFractureModel::underburdenFacies() const
|
|||||||
{
|
{
|
||||||
return m_underburdenFacies;
|
return m_underburdenFacies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureModel::updateReferringPlots()
|
||||||
|
{
|
||||||
|
// Update plots referring to this fracture model
|
||||||
|
std::vector<RimFractureModelPlot*> referringObjects;
|
||||||
|
objectsWithReferringPtrFieldsOfType( referringObjects );
|
||||||
|
|
||||||
|
for ( auto modelPlot : referringObjects )
|
||||||
|
{
|
||||||
|
if ( modelPlot ) modelPlot->loadDataAndUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -103,6 +103,7 @@ public:
|
|||||||
double getDefaultForMissingOverburdenValue( const QString& keyword ) const;
|
double getDefaultForMissingOverburdenValue( const QString& keyword ) const;
|
||||||
double getDefaultForMissingUnderburdenValue( const QString& keyword ) const;
|
double getDefaultForMissingUnderburdenValue( const QString& keyword ) const;
|
||||||
double getDefaultForMissingValue( const QString& keyword ) const;
|
double getDefaultForMissingValue( const QString& keyword ) const;
|
||||||
|
void updateReferringPlots();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
@ -196,6 +196,11 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
|||||||
|
|
||||||
std::vector<double> poroValues;
|
std::vector<double> poroValues;
|
||||||
fractureModelPlot->getPorosityValues( poroValues );
|
fractureModelPlot->getPorosityValues( poroValues );
|
||||||
|
if ( poroValues.empty() )
|
||||||
|
{
|
||||||
|
RiaLogging::error( QString( "Empty porosity data found when extracting elastic properties." ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: make this settable??
|
// TODO: make this settable??
|
||||||
QString colorLegendName = RiaDefines::faciesColorLegendName();
|
QString colorLegendName = RiaDefines::faciesColorLegendName();
|
||||||
|
@ -128,6 +128,23 @@ RiaDefines::CurveProperty RimFractureModelCurve::curveProperty() const
|
|||||||
return m_curveProperty();
|
return m_curveProperty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureModelCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
|
{
|
||||||
|
RimWellLogExtractionCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
RimFractureModelPlot* fractureModelPlot;
|
||||||
|
firstAncestorOrThisOfTypeAsserted( fractureModelPlot );
|
||||||
|
|
||||||
|
if ( fractureModelPlot )
|
||||||
|
{
|
||||||
|
fractureModelPlot->loadDataAndUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -62,6 +62,8 @@ public:
|
|||||||
RiaDefines::CurveProperty curveProperty() const override;
|
RiaDefines::CurveProperty curveProperty() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||||
|
|
||||||
void performDataExtraction( bool* isUsingPseudoLength ) override;
|
void performDataExtraction( bool* isUsingPseudoLength ) override;
|
||||||
|
|
||||||
static bool hasMissingValues( const std::vector<double>& values );
|
static bool hasMissingValues( const std::vector<double>& values );
|
||||||
|
@ -156,7 +156,7 @@ double RimFractureModelPlot::findValueAtTopOfLayer( const std::vector<double>&
|
|||||||
const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
||||||
size_t layerNo )
|
size_t layerNo )
|
||||||
{
|
{
|
||||||
int index = layerBoundaryIndexes[layerNo].first;
|
size_t index = layerBoundaryIndexes[layerNo].first;
|
||||||
return values.at( index );
|
return values.at( index );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ double RimFractureModelPlot::findValueAtBottomOfLayer( const std::vector<double>
|
|||||||
const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
||||||
size_t layerNo )
|
size_t layerNo )
|
||||||
{
|
{
|
||||||
int index = layerBoundaryIndexes[layerNo].second;
|
size_t index = layerBoundaryIndexes[layerNo].second;
|
||||||
return values.at( index );
|
return values.at( index );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,6 +191,19 @@ void RimFractureModelPlot::computeAverageByLayer( const std::vector<std::pair<si
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureModelPlot::extractTopOfLayerValues( const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
||||||
|
const std::vector<double>& inputVector,
|
||||||
|
std::vector<double>& result )
|
||||||
|
{
|
||||||
|
for ( size_t i = 0; i < layerBoundaryIndexes.size(); i++ )
|
||||||
|
{
|
||||||
|
result.push_back( findValueAtTopOfLayer( inputVector, layerBoundaryIndexes, i ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -254,6 +267,30 @@ std::vector<double> RimFractureModelPlot::findCurveAndComputeLayeredAverage( Ria
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty curveProperty ) const
|
||||||
|
{
|
||||||
|
RimWellLogExtractionCurve* curve = findCurveByProperty( curveProperty );
|
||||||
|
if ( !curve )
|
||||||
|
{
|
||||||
|
QString curveName = caf::AppEnum<RiaDefines::CurveProperty>::uiText( curveProperty );
|
||||||
|
RiaLogging::error( QString( "No curve for '%1' found" ).arg( curveName ) );
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::pair<double, double>> layerBoundaryDepths;
|
||||||
|
std::vector<std::pair<size_t, size_t>> layerBoundaryIndexes;
|
||||||
|
calculateLayers( layerBoundaryDepths, layerBoundaryIndexes );
|
||||||
|
|
||||||
|
const RigWellLogCurveData* curveData = curve->curveData();
|
||||||
|
std::vector<double> values = curveData->xValues();
|
||||||
|
std::vector<double> result;
|
||||||
|
extractTopOfLayerValues( layerBoundaryIndexes, values, result );
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -267,7 +304,7 @@ std::vector<double> RimFractureModelPlot::calculatePorosity() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RimFractureModelPlot::calculateReservoirPressure() const
|
std::vector<double> RimFractureModelPlot::calculateReservoirPressure() const
|
||||||
{
|
{
|
||||||
return findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty::PRESSURE );
|
return findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty::PRESSURE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -438,7 +475,7 @@ std::vector<double> RimFractureModelPlot::calculateYoungsModulus() const
|
|||||||
std::vector<double> valuesMMpsi;
|
std::vector<double> valuesMMpsi;
|
||||||
for ( auto value : valuesGPa )
|
for ( auto value : valuesGPa )
|
||||||
{
|
{
|
||||||
valuesMMpsi.push_back( value * 0.000145037737 );
|
valuesMMpsi.push_back( value * 0.14503773773 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return valuesMMpsi;
|
return valuesMMpsi;
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
std::vector<double> findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty curveProperty ) const;
|
std::vector<double> findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty curveProperty ) const;
|
||||||
std::vector<double> findCurveXValuesByProperty( RiaDefines::CurveProperty curveProperty ) const;
|
std::vector<double> findCurveXValuesByProperty( RiaDefines::CurveProperty curveProperty ) const;
|
||||||
|
std::vector<double> findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty curveProperty ) const;
|
||||||
|
|
||||||
void calculateLayers( std::vector<std::pair<double, double>>& layerBoundaryDepths,
|
void calculateLayers( std::vector<std::pair<double, double>>& layerBoundaryDepths,
|
||||||
std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes ) const;
|
std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes ) const;
|
||||||
@ -93,6 +94,9 @@ protected:
|
|||||||
static void computeAverageByLayer( const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
static void computeAverageByLayer( const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
||||||
const std::vector<double>& inputVector,
|
const std::vector<double>& inputVector,
|
||||||
std::vector<double>& result );
|
std::vector<double>& result );
|
||||||
|
static void extractTopOfLayerValues( const std::vector<std::pair<size_t, size_t>>& layerBoundaryIndexes,
|
||||||
|
const std::vector<double>& inputVector,
|
||||||
|
std::vector<double>& result );
|
||||||
|
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
|
||||||
|
@ -160,6 +160,11 @@ void RimLayerCurve::performDataExtraction( bool* isUsingPseudoLength )
|
|||||||
|
|
||||||
std::vector<double> faciesValues;
|
std::vector<double> faciesValues;
|
||||||
fractureModelPlot->getFaciesValues( faciesValues );
|
fractureModelPlot->getFaciesValues( faciesValues );
|
||||||
|
if ( faciesValues.empty() )
|
||||||
|
{
|
||||||
|
RiaLogging::error( QString( "Empty facies data found for layer curve." ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert( faciesValues.size() == curveData.data.size() );
|
assert( faciesValues.size() == curveData.data.size() );
|
||||||
|
|
||||||
|
@ -890,6 +890,14 @@ void RimPlotCurve::setSymbol( RiuQwtSymbol::PointSymbolEnum symbolStyle )
|
|||||||
m_pointSymbol = symbolStyle;
|
m_pointSymbol = symbolStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimPlotCurve::setInterpolation( RiuQwtPlotCurve::CurveInterpolationEnum curveInterpolation )
|
||||||
|
{
|
||||||
|
m_curveInterpolation = curveInterpolation;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -69,6 +69,7 @@ public:
|
|||||||
cvf::Color3f color() const { return m_curveColor; }
|
cvf::Color3f color() const { return m_curveColor; }
|
||||||
void setLineStyle( RiuQwtPlotCurve::LineStyleEnum lineStyle );
|
void setLineStyle( RiuQwtPlotCurve::LineStyleEnum lineStyle );
|
||||||
void setSymbol( RiuQwtSymbol::PointSymbolEnum symbolStyle );
|
void setSymbol( RiuQwtSymbol::PointSymbolEnum symbolStyle );
|
||||||
|
void setInterpolation( RiuQwtPlotCurve::CurveInterpolationEnum );
|
||||||
RiuQwtSymbol::PointSymbolEnum symbol();
|
RiuQwtSymbol::PointSymbolEnum symbol();
|
||||||
int symbolSize() const;
|
int symbolSize() const;
|
||||||
cvf::Color3f symbolEdgeColor() const;
|
cvf::Color3f symbolEdgeColor() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user