mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6038 Add support for overburden and underburden.
This commit is contained in:
parent
d93ce90a1e
commit
9f0a6c6223
@ -215,6 +215,8 @@ void RicNewFractureModelPlotFeature::createFormationTrack( RimFractureModelPlot*
|
||||
formationTrack->setFormationCase( eclipseCase );
|
||||
formationTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
||||
formationTrack->setVisibleXRange( 0.0, 0.0 );
|
||||
formationTrack->setOverburdenHeight( fractureModel->overburdenHeight() );
|
||||
formationTrack->setUnderburdenHeight( fractureModel->underburdenHeight() );
|
||||
formationTrack->setColSpan( RimPlot::ONE );
|
||||
}
|
||||
|
||||
@ -232,6 +234,8 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
||||
faciesTrack->setFormationCase( eclipseCase );
|
||||
faciesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::RESULT_PROPERTY_ANNOTATIONS );
|
||||
faciesTrack->setRegionPropertyResultType( RiaDefines::ResultCatType::INPUT_PROPERTY, defaultProperty );
|
||||
faciesTrack->setOverburdenHeight( fractureModel->overburdenHeight() );
|
||||
faciesTrack->setUnderburdenHeight( fractureModel->underburdenHeight() );
|
||||
|
||||
RimColorLegend* faciesColors =
|
||||
RimProject::current()->colorLegendCollection()->findByName( RiaDefines::faciesColorLegendName() );
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -115,6 +118,18 @@ RimFractureModel::RimFractureModel()
|
||||
CAF_PDM_InitField( &m_verticalStressGradient, "VerticalStressGradient", 0.238, "Vertical Stress Gradient", "", "", "" );
|
||||
CAF_PDM_InitField( &m_stressDepth, "StressDepth", 1000.0, "Stress Depth", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_overburdenHeight, "OverburdenHeight", 50.0, "Overburden Height", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_overburdenFormation, "OverburdenFormation", "Overburden Formation", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_overburdenFacies, "OverburdenFacies", "Overburden Facies", "", "", "" );
|
||||
CAF_PDM_InitField( &m_overburdenPorosity, "OverburdenPorosity", 0.0, "Overburden Porosity", "", "", "" );
|
||||
CAF_PDM_InitField( &m_overburdenPermeability, "OverburdenPermeability", 10.0e-6, "Overburden Permeability", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_underburdenHeight, "UnderburdenHeight", 50.0, "Underburden Height", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_underburdenFormation, "UnderburdenFormation", "Underburden Formation", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_underburdenFacies, "UnderburdenFacies", "Underburden Facies", "", "", "" );
|
||||
CAF_PDM_InitField( &m_underburdenPorosity, "UnderburdenPorosity", 0.0, "Underburden Porosity", "", "", "" );
|
||||
CAF_PDM_InitField( &m_underburdenPermeability, "UnderburdenPermeability", 10.0e-6, "Underburden Permeability", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_elasticProperties, "ElasticProperties", "Elastic Properties", "", "", "" );
|
||||
m_elasticProperties.uiCapability()->setUiHidden( true );
|
||||
m_elasticProperties.uiCapability()->setUiTreeHidden( true );
|
||||
@ -176,6 +191,45 @@ void RimFractureModel::fieldChangedByUi( const caf::PdmFieldHandle* changedField
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimFractureModel::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if ( fieldNeedingOptions == &m_overburdenFormation || fieldNeedingOptions == &m_underburdenFormation )
|
||||
{
|
||||
// Find an eclipse case
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj->eclipseCases().empty() ) return options;
|
||||
|
||||
RimEclipseCase* eclipseCase = proj->eclipseCases()[0];
|
||||
if ( !eclipseCase ) return options;
|
||||
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
if ( !eclipseCaseData ) return options;
|
||||
|
||||
std::vector<QString> formationNames = eclipseCase->eclipseCaseData()->formationNames();
|
||||
for ( const QString& formationName : formationNames )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( formationName, formationName ) );
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_overburdenFacies || fieldNeedingOptions == &m_underburdenFacies )
|
||||
{
|
||||
RimColorLegend* faciesColors = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" );
|
||||
|
||||
for ( RimColorLegendItem* item : faciesColors->colorLegendItems() )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( item->categoryName(), item->categoryName() ) );
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -530,6 +584,46 @@ double RimFractureModel::getDefaultForMissingValue( const QString& keyword ) con
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::getDefaultForMissingOverburdenValue( const QString& keyword ) const
|
||||
{
|
||||
if ( keyword == QString( "PORO" ) )
|
||||
{
|
||||
return defaultOverburdenPorosity();
|
||||
}
|
||||
else if ( keyword == QString( "PERMX" ) || keyword == QString( "PERMZ" ) )
|
||||
{
|
||||
return defaultOverburdenPermeability();
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Missing default overburden value for %1." ).arg( keyword ) );
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::getDefaultForMissingUnderburdenValue( const QString& keyword ) const
|
||||
{
|
||||
if ( keyword == QString( "PORO" ) )
|
||||
{
|
||||
return defaultUnderburdenPorosity();
|
||||
}
|
||||
else if ( keyword == QString( "PERMX" ) || keyword == QString( "PERMZ" ) )
|
||||
{
|
||||
return defaultUnderburdenPermeability();
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Missing default underburden value for %1." ).arg( keyword ) );
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -553,3 +647,83 @@ double RimFractureModel::stressDepth() const
|
||||
{
|
||||
return m_stressDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::overburdenHeight() const
|
||||
{
|
||||
return m_overburdenHeight;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::underburdenHeight() const
|
||||
{
|
||||
return m_underburdenHeight;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::defaultOverburdenPorosity() const
|
||||
{
|
||||
return m_overburdenPorosity;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::defaultUnderburdenPorosity() const
|
||||
{
|
||||
return m_underburdenPorosity;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::defaultOverburdenPermeability() const
|
||||
{
|
||||
return m_overburdenPermeability;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureModel::defaultUnderburdenPermeability() const
|
||||
{
|
||||
return m_underburdenPermeability;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureModel::overburdenFormation() const
|
||||
{
|
||||
return m_overburdenFormation;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureModel::overburdenFacies() const
|
||||
{
|
||||
return m_overburdenFacies;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureModel::underburdenFormation() const
|
||||
{
|
||||
return m_underburdenFormation;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureModel::underburdenFacies() const
|
||||
{
|
||||
return m_underburdenFacies;
|
||||
}
|
||||
|
@ -67,6 +67,21 @@ public:
|
||||
double verticalStressGradient() const;
|
||||
double stressDepth() const;
|
||||
|
||||
double overburdenHeight() const;
|
||||
double underburdenHeight() const;
|
||||
|
||||
double defaultOverburdenPorosity() const;
|
||||
double defaultUnderburdenPorosity() const;
|
||||
|
||||
double defaultOverburdenPermeability() const;
|
||||
double defaultUnderburdenPermeability() const;
|
||||
|
||||
QString overburdenFormation() const;
|
||||
QString overburdenFacies() const;
|
||||
|
||||
QString underburdenFormation() const;
|
||||
QString underburdenFacies() const;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
@ -85,10 +100,14 @@ public:
|
||||
void setElasticProperties( RimElasticProperties* elasticProperties );
|
||||
RimElasticProperties* elasticProperties() const;
|
||||
|
||||
double getDefaultForMissingOverburdenValue( const QString& keyword ) const;
|
||||
double getDefaultForMissingUnderburdenValue( const QString& keyword ) const;
|
||||
double getDefaultForMissingValue( const QString& keyword ) const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
private:
|
||||
void updatePositionFromMeasuredDepth();
|
||||
@ -112,4 +131,14 @@ protected:
|
||||
caf::PdmField<double> m_verticalStress;
|
||||
caf::PdmField<double> m_verticalStressGradient;
|
||||
caf::PdmField<double> m_stressDepth;
|
||||
caf::PdmField<double> m_overburdenHeight;
|
||||
caf::PdmField<double> m_overburdenPorosity;
|
||||
caf::PdmField<double> m_overburdenPermeability;
|
||||
caf::PdmField<QString> m_overburdenFormation;
|
||||
caf::PdmField<QString> m_overburdenFacies;
|
||||
caf::PdmField<double> m_underburdenHeight;
|
||||
caf::PdmField<double> m_underburdenPorosity;
|
||||
caf::PdmField<double> m_underburdenPermeability;
|
||||
caf::PdmField<QString> m_underburdenFormation;
|
||||
caf::PdmField<QString> m_underburdenFacies;
|
||||
};
|
||||
|
@ -169,16 +169,11 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
CurveSamplingPointData curveData =
|
||||
RimWellLogTrack::curveSamplingPointData( &eclExtractor, formationResultAccessor.p() );
|
||||
|
||||
std::vector<double> formationValues = curveData.data;
|
||||
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
||||
|
||||
std::vector<QString> formationNamesToPlot;
|
||||
RimWellLogTrack::findRegionNamesToPlot( curveData,
|
||||
formationNamesVector,
|
||||
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
|
||||
&formationNamesToPlot,
|
||||
&yValues );
|
||||
|
||||
// Extract facies data
|
||||
m_eclipseResultDefinition->setResultVariable( "OPERNUM_1" );
|
||||
m_eclipseResultDefinition->setResultType( RiaDefines::ResultCatType::INPUT_PROPERTY );
|
||||
@ -229,12 +224,49 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
return;
|
||||
}
|
||||
|
||||
double overburdenHeight = m_fractureModel->overburdenHeight();
|
||||
if ( overburdenHeight > 0.0 )
|
||||
{
|
||||
double defaultPoroValue = m_fractureModel->defaultOverburdenPorosity();
|
||||
QString overburdenFormation = m_fractureModel->overburdenFormation();
|
||||
QString overburdenFacies = m_fractureModel->overburdenFacies();
|
||||
|
||||
addOverburden( formationNamesVector,
|
||||
formationValues,
|
||||
faciesValues,
|
||||
tvDepthValues,
|
||||
measuredDepthValues,
|
||||
overburdenHeight,
|
||||
defaultPoroValue,
|
||||
overburdenFormation,
|
||||
findFaciesValue( *colorLegend, overburdenFacies ) );
|
||||
}
|
||||
|
||||
double underburdenHeight = m_fractureModel->underburdenHeight();
|
||||
if ( underburdenHeight > 0.0 )
|
||||
{
|
||||
double defaultPoroValue = m_fractureModel->defaultUnderburdenPorosity();
|
||||
QString underburdenFormation = m_fractureModel->underburdenFormation();
|
||||
QString underburdenFacies = m_fractureModel->underburdenFacies();
|
||||
|
||||
addUnderburden( formationNamesVector,
|
||||
formationValues,
|
||||
faciesValues,
|
||||
tvDepthValues,
|
||||
measuredDepthValues,
|
||||
underburdenHeight,
|
||||
defaultPoroValue,
|
||||
underburdenFormation,
|
||||
findFaciesValue( *colorLegend, underburdenFacies ) );
|
||||
}
|
||||
|
||||
for ( size_t i = 0; i < tvDepthValues.size(); i++ )
|
||||
{
|
||||
// TODO: get from somewhere??
|
||||
QString fieldName = "Norne";
|
||||
QString faciesName = findFaciesName( *colorLegend, faciesValues[i] );
|
||||
QString formationName = findFormationNameForDepth( formationNamesToPlot, yValues, tvDepthValues[i] );
|
||||
int idx = static_cast<int>( formationValues[i] );
|
||||
QString formationName = formationNamesVector[idx];
|
||||
double porosity = poroValues[i];
|
||||
|
||||
FaciesKey faciesKey = std::make_tuple( fieldName, formationName, faciesName );
|
||||
@ -344,22 +376,14 @@ QString RimElasticPropertiesCurve::findFaciesName( const RimColorLegend& colorLe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimElasticPropertiesCurve::findFormationNameForDepth( const std::vector<QString>& formationNames,
|
||||
const std::vector<std::pair<double, double>>& depthRanges,
|
||||
double depth )
|
||||
double RimElasticPropertiesCurve::findFaciesValue( const RimColorLegend& colorLegend, const QString& name )
|
||||
{
|
||||
// assert(formationNames.size() == depthRanges.size());
|
||||
for ( size_t i = 0; i < formationNames.size(); i++ )
|
||||
for ( auto item : colorLegend.colorLegendItems() )
|
||||
{
|
||||
double high = depthRanges[i].second;
|
||||
double low = depthRanges[i].first;
|
||||
if ( depth >= low && depth <= high )
|
||||
{
|
||||
return formationNames[i];
|
||||
}
|
||||
if ( item->categoryName() == name ) return item->categoryValue();
|
||||
}
|
||||
|
||||
return "not found";
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -369,3 +393,74 @@ QString RimElasticPropertiesCurve::createCurveAutoName()
|
||||
{
|
||||
return caf::AppEnum<RimElasticPropertiesCurve::PropertyType>::uiText( m_propertyType() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticPropertiesCurve::addOverburden( std::vector<QString>& formationNames,
|
||||
std::vector<double>& formationValues,
|
||||
std::vector<double>& faciesValues,
|
||||
std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
double overburdenHeight,
|
||||
double defaultPoroValue,
|
||||
const QString& formationName,
|
||||
double faciesValue )
|
||||
{
|
||||
if ( !faciesValues.empty() )
|
||||
{
|
||||
// Prepend the new "fake" depth for start of overburden
|
||||
double tvdTop = tvDepthValues[0];
|
||||
tvDepthValues.insert( tvDepthValues.begin(), tvdTop );
|
||||
tvDepthValues.insert( tvDepthValues.begin(), tvdTop - overburdenHeight );
|
||||
|
||||
// TODO: this is not always correct
|
||||
double mdTop = measuredDepthValues[0];
|
||||
measuredDepthValues.insert( measuredDepthValues.begin(), mdTop );
|
||||
measuredDepthValues.insert( measuredDepthValues.begin(), mdTop - overburdenHeight );
|
||||
|
||||
formationNames.push_back( formationName );
|
||||
|
||||
formationValues.insert( formationValues.begin(), formationNames.size() - 1 );
|
||||
formationValues.insert( formationValues.begin(), formationNames.size() - 1 );
|
||||
|
||||
faciesValues.insert( faciesValues.begin(), faciesValue );
|
||||
faciesValues.insert( faciesValues.begin(), faciesValue );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticPropertiesCurve::addUnderburden( std::vector<QString>& formationNames,
|
||||
std::vector<double>& formationValues,
|
||||
std::vector<double>& faciesValues,
|
||||
std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
double underburdenHeight,
|
||||
double defaultPoroValue,
|
||||
const QString& formationName,
|
||||
double faciesValue )
|
||||
{
|
||||
if ( !faciesValues.empty() )
|
||||
{
|
||||
size_t lastIndex = tvDepthValues.size() - 1;
|
||||
|
||||
double tvdBottom = tvDepthValues[lastIndex];
|
||||
tvDepthValues.push_back( tvdBottom );
|
||||
tvDepthValues.push_back( tvdBottom + underburdenHeight );
|
||||
|
||||
// TODO: this is not always correct
|
||||
double mdBottom = measuredDepthValues[lastIndex];
|
||||
measuredDepthValues.push_back( mdBottom );
|
||||
measuredDepthValues.push_back( mdBottom + underburdenHeight );
|
||||
|
||||
formationNames.push_back( formationName );
|
||||
|
||||
formationValues.push_back( formationNames.size() - 1 );
|
||||
formationValues.push_back( formationNames.size() - 1 );
|
||||
|
||||
faciesValues.push_back( faciesValue );
|
||||
faciesValues.push_back( faciesValue );
|
||||
}
|
||||
}
|
||||
|
@ -67,9 +67,27 @@ protected:
|
||||
void performDataExtraction( bool* isUsingPseudoLength ) override;
|
||||
|
||||
static QString findFaciesName( const RimColorLegend& colorLegend, double value );
|
||||
static QString findFormationNameForDepth( const std::vector<QString>& formationNames,
|
||||
const std::vector<std::pair<double, double>>& depthRanges,
|
||||
double depth );
|
||||
static double findFaciesValue( const RimColorLegend& colorLegend, const QString& name );
|
||||
|
||||
static void addOverburden( std::vector<QString>& formationNames,
|
||||
std::vector<double>& formationValues,
|
||||
std::vector<double>& faciesValues,
|
||||
std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
double overburdenHeight,
|
||||
double defaultPoroValue,
|
||||
const QString& formationName,
|
||||
double faciesValue );
|
||||
|
||||
static void addUnderburden( std::vector<QString>& formationNames,
|
||||
std::vector<double>& formationValues,
|
||||
std::vector<double>& faciesValues,
|
||||
std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
double overburdenHeight,
|
||||
double defaultPoroValue,
|
||||
const QString& formationName,
|
||||
double faciesValue );
|
||||
|
||||
caf::PdmPtrField<RimFractureModel*> m_fractureModel;
|
||||
caf::PdmField<caf::AppEnum<PropertyType>> m_propertyType;
|
||||
|
@ -154,6 +154,32 @@ void RimFractureModelCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
std::cerr << "RESULT ACCESSOR IS NULL" << std::endl;
|
||||
}
|
||||
|
||||
double overburdenHeight = m_fractureModel->overburdenHeight();
|
||||
if ( overburdenHeight > 0.0 )
|
||||
{
|
||||
double defaultOverburdenValue = std::numeric_limits<double>::infinity();
|
||||
if ( m_missingValueStrategy() == RimFractureModelCurve::MissingValueStrategy::DEFAULT_VALUE )
|
||||
{
|
||||
defaultOverburdenValue =
|
||||
m_fractureModel->getDefaultForMissingOverburdenValue( m_eclipseResultDefinition()->resultVariable() );
|
||||
}
|
||||
|
||||
addOverburden( tvDepthValues, measuredDepthValues, values, overburdenHeight, defaultOverburdenValue );
|
||||
}
|
||||
|
||||
double underburdenHeight = m_fractureModel->underburdenHeight();
|
||||
if ( underburdenHeight > 0.0 )
|
||||
{
|
||||
double defaultUnderburdenValue = std::numeric_limits<double>::infinity();
|
||||
if ( m_missingValueStrategy() == RimFractureModelCurve::MissingValueStrategy::DEFAULT_VALUE )
|
||||
{
|
||||
defaultUnderburdenValue =
|
||||
m_fractureModel->getDefaultForMissingUnderburdenValue( m_eclipseResultDefinition()->resultVariable() );
|
||||
}
|
||||
|
||||
addUnderburden( tvDepthValues, measuredDepthValues, values, underburdenHeight, defaultUnderburdenValue );
|
||||
}
|
||||
|
||||
if ( hasMissingValues( values ) )
|
||||
{
|
||||
if ( m_missingValueStrategy() == RimFractureModelCurve::MissingValueStrategy::DEFAULT_VALUE )
|
||||
@ -319,3 +345,58 @@ cvf::ref<RigResultAccessor>
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModelCurve::addOverburden( std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& values,
|
||||
double overburdenHeight,
|
||||
double defaultOverburdenValue )
|
||||
{
|
||||
if ( !values.empty() )
|
||||
{
|
||||
// Prepend the new "fake" depth for start of overburden
|
||||
double tvdTop = tvDepthValues[0];
|
||||
tvDepthValues.insert( tvDepthValues.begin(), tvdTop );
|
||||
tvDepthValues.insert( tvDepthValues.begin(), tvdTop - overburdenHeight );
|
||||
|
||||
// TODO: this is not always correct
|
||||
double mdTop = measuredDepthValues[0];
|
||||
measuredDepthValues.insert( measuredDepthValues.begin(), mdTop );
|
||||
measuredDepthValues.insert( measuredDepthValues.begin(), mdTop - overburdenHeight );
|
||||
|
||||
values.insert( values.begin(), defaultOverburdenValue );
|
||||
values.insert( values.begin(), defaultOverburdenValue );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModelCurve::addUnderburden( std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& values,
|
||||
double underburdenHeight,
|
||||
double defaultUnderburdenValue )
|
||||
{
|
||||
if ( !values.empty() )
|
||||
{
|
||||
size_t lastIndex = tvDepthValues.size() - 1;
|
||||
|
||||
// Append the new "fake" depth for start of underburden
|
||||
double tvdBottom = tvDepthValues[lastIndex];
|
||||
tvDepthValues.push_back( tvdBottom );
|
||||
tvDepthValues.push_back( tvdBottom + underburdenHeight );
|
||||
|
||||
// Append the new "fake" md
|
||||
// TODO: check if this is correct???
|
||||
double mdBottom = measuredDepthValues[lastIndex];
|
||||
measuredDepthValues.push_back( mdBottom );
|
||||
measuredDepthValues.push_back( mdBottom + underburdenHeight );
|
||||
|
||||
values.push_back( defaultUnderburdenValue );
|
||||
values.push_back( defaultUnderburdenValue );
|
||||
}
|
||||
}
|
||||
|
@ -69,6 +69,18 @@ protected:
|
||||
int timeStepIndex,
|
||||
RimEclipseResultDefinition* eclipseResultDefinition );
|
||||
|
||||
static void addOverburden( std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& values,
|
||||
double overburdenHeight,
|
||||
double defaultOverburdenValue );
|
||||
|
||||
static void addUnderburden( std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& values,
|
||||
double underburdenHeight,
|
||||
double defaultUnderburdenValue );
|
||||
|
||||
caf::PdmPtrField<RimFractureModel*> m_fractureModel;
|
||||
caf::PdmField<caf::AppEnum<MissingValueStrategy>> m_missingValueStrategy;
|
||||
};
|
||||
|
@ -126,9 +126,7 @@ void RimLayerCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
m_fractureModel->thicknessDirectionWellPath()->wellPathGeometry(),
|
||||
"fracture model" );
|
||||
|
||||
measuredDepthValues = eclExtractor.cellIntersectionMDs();
|
||||
tvDepthValues = eclExtractor.cellIntersectionTVDs();
|
||||
rkbDiff = eclExtractor.wellPathData()->rkbDiff();
|
||||
rkbDiff = eclExtractor.wellPathData()->rkbDiff();
|
||||
|
||||
// Extract formation data
|
||||
cvf::ref<RigResultAccessor> formationResultAccessor = RigResultAccessorFactory::
|
||||
@ -150,6 +148,21 @@ void RimLayerCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
||||
|
||||
double overburdenHeight = m_fractureModel->overburdenHeight();
|
||||
if ( overburdenHeight > 0.0 )
|
||||
{
|
||||
RimWellLogTrack::addOverburden( formationNamesVector, curveData, overburdenHeight );
|
||||
}
|
||||
|
||||
double underburdenHeight = m_fractureModel->underburdenHeight();
|
||||
if ( underburdenHeight > 0.0 )
|
||||
{
|
||||
RimWellLogTrack::addUnderburden( formationNamesVector, curveData, underburdenHeight );
|
||||
}
|
||||
|
||||
measuredDepthValues = curveData.md;
|
||||
tvDepthValues = curveData.tvd;
|
||||
|
||||
std::vector<QString> formationNamesToPlot;
|
||||
RimWellLogTrack::findRegionNamesToPlot( curveData,
|
||||
formationNamesVector,
|
||||
@ -177,23 +190,35 @@ void RimLayerCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
|
||||
std::vector<double> faciesValues;
|
||||
eclExtractor.curveData( faciesResultAccessor.p(), &faciesValues );
|
||||
if ( overburdenHeight > 0.0 )
|
||||
{
|
||||
faciesValues.insert( faciesValues.begin(), std::numeric_limits<double>::infinity() );
|
||||
faciesValues.insert( faciesValues.begin(), std::numeric_limits<double>::infinity() );
|
||||
}
|
||||
|
||||
if ( underburdenHeight > 0.0 )
|
||||
{
|
||||
faciesValues.push_back( std::numeric_limits<double>::infinity() );
|
||||
faciesValues.push_back( std::numeric_limits<double>::infinity() );
|
||||
}
|
||||
|
||||
assert( faciesValues.size() == curveData.data.size() );
|
||||
|
||||
values.resize( faciesValues.size() );
|
||||
|
||||
int layerNo = 0;
|
||||
QString previousFormationName = "";
|
||||
double previousFacies = -1.0;
|
||||
int layerNo = 0;
|
||||
double previousFormation = -1.0;
|
||||
double previousFacies = -1.0;
|
||||
for ( size_t i = 0; i < faciesValues.size(); i++ )
|
||||
{
|
||||
QString formationName = findFormationNameForDepth( formationNamesToPlot, yValues, tvDepthValues[i] );
|
||||
if ( previousFormationName != formationName || previousFacies != faciesValues[i] )
|
||||
if ( previousFormation != curveData.data[i] || previousFacies != faciesValues[i] )
|
||||
{
|
||||
layerNo++;
|
||||
}
|
||||
|
||||
values[i] = layerNo;
|
||||
previousFormationName = formationName;
|
||||
previousFacies = faciesValues[i];
|
||||
values[i] = layerNo;
|
||||
previousFormation = curveData.data[i];
|
||||
previousFacies = faciesValues[i];
|
||||
}
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType();
|
||||
|
@ -259,6 +259,11 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellPathComponentSource, "AttributesWellPathSource", "Well Path", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellPathAttributeCollection, "AttributesCollection", "Well Attributes", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_overburdenHeight, "OverburdenHeight", 0.0, "Overburden Height", "", "", "" );
|
||||
m_overburdenHeight.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitField( &m_underburdenHeight, "UnderburdenHeight", 0.0, "Underburden Height", "", "", "" );
|
||||
m_underburdenHeight.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "Result Definition", "", "", "" );
|
||||
m_resultDefinition.uiCapability()->setUiHidden( true );
|
||||
m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
@ -2393,11 +2398,11 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
extractor = geoMechWellLogExtractor;
|
||||
}
|
||||
|
||||
// Attach water and rock base formations
|
||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
||||
|
||||
if ( geoMechWellLogExtractor )
|
||||
{
|
||||
// Attach water and rock base formations
|
||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
||||
|
||||
const caf::ColorTable waterAndRockColors = RiaColorTables::waterAndRockPaletteColors();
|
||||
const std::vector<std::pair<double, double>> waterAndRockIntervals =
|
||||
waterAndRockRegions( plot->depthType(), extractor );
|
||||
@ -2419,9 +2424,21 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
m_formationCase == nullptr )
|
||||
return;
|
||||
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( m_formationCase );
|
||||
|
||||
std::cout << "Burden: over=" << m_overburdenHeight() << " under=" << m_underburdenHeight() << std::endl;
|
||||
if ( m_overburdenHeight > 0.0 )
|
||||
{
|
||||
addOverburden( formationNamesVector, curveData, m_overburdenHeight );
|
||||
}
|
||||
|
||||
if ( m_underburdenHeight > 0.0 )
|
||||
{
|
||||
addUnderburden( formationNamesVector, curveData, m_underburdenHeight );
|
||||
}
|
||||
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
|
||||
std::vector<QString> formationNamesToPlot;
|
||||
RimWellLogTrack::findRegionNamesToPlot( curveData,
|
||||
formationNamesVector,
|
||||
@ -2429,6 +2446,18 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
&formationNamesToPlot,
|
||||
&yValues );
|
||||
|
||||
for ( auto n : formationNamesToPlot )
|
||||
{
|
||||
std::cout << "Formation names: " << n.toStdString() << std::endl;
|
||||
}
|
||||
|
||||
for ( size_t i = 0; i < curveData.data.size(); i++ )
|
||||
{
|
||||
std::cout << "Curve data[" << i << "]: " << curveData.tvd[i] << " " << curveData.data[i] << std::endl;
|
||||
}
|
||||
|
||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
||||
|
||||
caf::ColorTable colorTable( m_colorShadingLegend->colorArray() );
|
||||
m_annotationTool->attachNamedRegions( m_plotWidget,
|
||||
formationNamesToPlot,
|
||||
@ -2492,6 +2521,16 @@ void RimWellLogTrack::updateResultPropertyNamesOnPlot()
|
||||
namesVector.push_back( legendItem->categoryName() );
|
||||
}
|
||||
|
||||
if ( m_overburdenHeight > 0.0 )
|
||||
{
|
||||
addOverburden( namesVector, curveData, m_overburdenHeight );
|
||||
}
|
||||
|
||||
if ( m_underburdenHeight > 0.0 )
|
||||
{
|
||||
addUnderburden( namesVector, curveData, m_underburdenHeight );
|
||||
}
|
||||
|
||||
std::vector<QString> namesToPlot;
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
RimWellLogTrack::findRegionNamesToPlot( curveData, namesVector, plot->depthType(), &namesToPlot, &yValues );
|
||||
@ -2767,3 +2806,69 @@ void RimWellLogTrack::onChildDeleted( caf::PdmChildArrayFieldHandle* childA
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setOverburdenHeight( double overburdenHeight )
|
||||
{
|
||||
m_overburdenHeight = overburdenHeight;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setUnderburdenHeight( double underburdenHeight )
|
||||
{
|
||||
m_underburdenHeight = underburdenHeight;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::addOverburden( std::vector<QString>& namesVector, CurveSamplingPointData& curveData, double height )
|
||||
{
|
||||
if ( !curveData.data.empty() )
|
||||
{
|
||||
namesVector.push_back( "Overburden" );
|
||||
|
||||
// Prepend the new "fake" depth for start of overburden
|
||||
double tvdTop = curveData.tvd[0];
|
||||
curveData.tvd.insert( curveData.tvd.begin(), tvdTop );
|
||||
curveData.tvd.insert( curveData.tvd.begin(), tvdTop - height );
|
||||
|
||||
// TODO: this is not always correct
|
||||
double mdTop = curveData.md[0];
|
||||
curveData.md.insert( curveData.md.begin(), mdTop );
|
||||
curveData.md.insert( curveData.md.begin(), mdTop - height );
|
||||
|
||||
curveData.data.insert( curveData.data.begin(), namesVector.size() - 1 );
|
||||
curveData.data.insert( curveData.data.begin(), namesVector.size() - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::addUnderburden( std::vector<QString>& namesVector, CurveSamplingPointData& curveData, double height )
|
||||
{
|
||||
if ( !curveData.data.empty() )
|
||||
{
|
||||
namesVector.push_back( "Underburden" );
|
||||
|
||||
size_t lastIndex = curveData.tvd.size() - 1;
|
||||
|
||||
// Append the new "fake" depth for start of underburden
|
||||
double tvdBottom = curveData.tvd[lastIndex];
|
||||
curveData.tvd.push_back( tvdBottom );
|
||||
curveData.tvd.push_back( tvdBottom + height );
|
||||
|
||||
// TODO: this is not always correct
|
||||
double mdBottom = curveData.md[lastIndex];
|
||||
curveData.md.push_back( mdBottom );
|
||||
curveData.md.push_back( mdBottom + height );
|
||||
|
||||
curveData.data.push_back( namesVector.size() - 1 );
|
||||
curveData.data.push_back( namesVector.size() - 1 );
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +182,9 @@ public:
|
||||
void setShowBothSidesOfWell( bool on );
|
||||
void setWellPathAttributesSource( RimWellPath* wellPath );
|
||||
|
||||
void setOverburdenHeight( double overburdenHeight );
|
||||
void setUnderburdenHeight( double underburdenHeight );
|
||||
|
||||
RimWellPath* wellPathAttributeSource() const;
|
||||
|
||||
caf::PdmObject* findPdmObjectFromQwtCurve( const QwtPlotCurve* curve ) const override;
|
||||
@ -222,6 +225,9 @@ public:
|
||||
|
||||
static std::vector<QString> formationNamesVector( RimCase* rimCase );
|
||||
|
||||
static void addOverburden( std::vector<QString>& namesVector, CurveSamplingPointData& curveData, double height );
|
||||
static void addUnderburden( std::vector<QString>& namesVector, CurveSamplingPointData& curveData, double height );
|
||||
|
||||
protected:
|
||||
// RimViewWindow overrides
|
||||
void deleteViewWidget() override;
|
||||
@ -331,6 +337,8 @@ private:
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPathComponentSource;
|
||||
caf::PdmPtrField<RimWellPathAttributeCollection*> m_wellPathAttributeCollection;
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_resultDefinition;
|
||||
caf::PdmField<double> m_overburdenHeight;
|
||||
caf::PdmField<double> m_underburdenHeight;
|
||||
|
||||
caf::PdmField<bool> m_showFormations_OBSOLETE;
|
||||
caf::PdmField<bool> m_show_OBSOLETE;
|
||||
|
Loading…
Reference in New Issue
Block a user