mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-15 01:42:13 -05:00
Fault Reactivation: Improve temperature data access.
New approach: find the top reservoir and compute gradient of temperature change from sea bed. Values from Eclipse grid is used when in reservoir.
This commit is contained in:
1 parent
85753568b6
commit
d8b1e643e0
4 files changed
+86
-39
No files matched your search
+25
-25
@@ -96,23 +96,11 @@ std::pair<double, cvf::Vec3d> RimFaultReactivationDataAccessorWellLogExtraction:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<double, cvf::Vec3d>
|
||||
RimFaultReactivationDataAccessorWellLogExtraction::calculateTemperature( const std::vector<cvf::Vec3d>& intersections,
|
||||
std::vector<double>& values,
|
||||
const cvf::Vec3d& position,
|
||||
double seabedTemperature )
|
||||
double seabedTemperature,
|
||||
double gradient )
|
||||
{
|
||||
// Fill in missing values
|
||||
fillInMissingValuesWithTopValue( intersections, values, seabedTemperature );
|
||||
auto [value, extractionPosition] = findValueAndPosition( intersections, values, position );
|
||||
|
||||
double minDistance = computeMinimumDistance( position, intersections );
|
||||
if ( minDistance < 1.0 )
|
||||
{
|
||||
return { value, extractionPosition };
|
||||
}
|
||||
else
|
||||
{
|
||||
return { value, cvf::Vec3d::UNDEFINED };
|
||||
}
|
||||
return { calculateTemperature( seabedTemperature, intersections[0].z(), std::abs( position.z() ), gradient ), position };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -182,16 +170,6 @@ std::pair<int, int> RimFaultReactivationDataAccessorWellLogExtraction::findInter
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<int, int> RimFaultReactivationDataAccessorWellLogExtraction::findOverburdenAndUnderburdenIndex( const std::vector<double>& values )
|
||||
{
|
||||
auto findLastOverburdenIndex = []( const std::vector<double>& values )
|
||||
{
|
||||
for ( size_t i = 0; i < values.size(); i++ )
|
||||
{
|
||||
if ( !std::isinf( values[i] ) ) return static_cast<int>( i );
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
auto findFirstUnderburdenIndex = []( const std::vector<double>& values )
|
||||
{
|
||||
for ( size_t i = values.size() - 1; i > 0; i-- )
|
||||
@@ -207,6 +185,19 @@ std::pair<int, int> RimFaultReactivationDataAccessorWellLogExtraction::findOverb
|
||||
return { lastOverburdenIndex, firstUnderburdenIndex };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimFaultReactivationDataAccessorWellLogExtraction::findLastOverburdenIndex( const std::vector<double>& values )
|
||||
{
|
||||
for ( size_t i = 0; i < values.size(); i++ )
|
||||
{
|
||||
if ( !std::isinf( values[i] ) ) return static_cast<int>( i );
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -481,3 +472,12 @@ double RimFaultReactivationDataAccessorWellLogExtraction::calculatePorePressure(
|
||||
{
|
||||
return RiaEclipseUnitTools::pascalToBar( gradient * 9.81 * depth * 1000.0 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFaultReactivationDataAccessorWellLogExtraction::calculateTemperature( double topValue, double topDepth, double depth, double gradient )
|
||||
{
|
||||
double tvdDiff = topDepth - depth;
|
||||
return tvdDiff * gradient + topValue;
|
||||
}
|
||||
Reference in new issue
Block a user