mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6090 Fracture Model: export pressure at top of zone to frk file.
This commit is contained in:
parent
56cbf6b5df
commit
30dea50392
@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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
|
||||
{
|
||||
return findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty::PRESSURE );
|
||||
return findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty::PRESSURE );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
protected:
|
||||
std::vector<double> findCurveAndComputeLayeredAverage( 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,
|
||||
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,
|
||||
const std::vector<double>& inputVector,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user