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:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user