Fault reactivation: Improve POR-Bar extraction.

This commit is contained in:
Kristian Bendiksen
2024-02-05 17:52:32 +01:00
parent 5037473f5c
commit 5a3894b804
14 changed files with 163 additions and 108 deletions

View File

@@ -109,24 +109,24 @@ double RimFaultReactivationDataAccessorPorePressure::valueAtPosition( const cvf:
CAF_ASSERT( m_wellPaths.find( gridPart ) != m_wellPaths.end() );
auto wellPath = m_wellPaths.find( gridPart )->second;
auto cellIdx = m_mainGrid->findReservoirCellIndexFromPoint( position );
if ( cellIdx != cvf::UNDEFINED_SIZE_T )
{
double valueFromEclipse = m_resultAccessor->cellScalar( cellIdx );
if ( !std::isinf( valueFromEclipse ) ) return RiaEclipseUnitTools::barToPascal( valueFromEclipse );
}
auto [values, intersections] =
RimFaultReactivationDataAccessorWellLogExtraction::extractValuesAndIntersections( *m_resultAccessor.p(), *extractor.p(), *wellPath );
auto [value, pos] = RimFaultReactivationDataAccessorWellLogExtraction::calculatePorBar( model,
RimFaultReactivation::ElementSets elementSet = RimFaultReactivation::ElementSets::UnderBurden;
auto [value, pos] = RimFaultReactivationDataAccessorWellLogExtraction::calculatePorBar( model,
gridPart,
intersections,
values,
position,
elementSet,
m_defaultPorePressureGradient );
if ( pos.isUndefined() )
{
auto cellIdx = m_mainGrid->findReservoirCellIndexFromPoint( position );
if ( cellIdx != cvf::UNDEFINED_SIZE_T )
{
double valueFromEclipse = m_resultAccessor->cellScalar( cellIdx );
if ( !std::isinf( valueFromEclipse ) ) return RiaEclipseUnitTools::barToPascal( valueFromEclipse );
}
}
return RiaEclipseUnitTools::barToPascal( value );
}