mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#6854 Fix asserts/crashes when layer extraction fails.
This commit is contained in:
parent
935a2d11d7
commit
3e291e0c6b
@ -102,9 +102,19 @@ bool RimFractureModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(),
|
||||
fractureModel->thicknessDirectionWellPath()->wellPathGeometry(),
|
||||
"fracture model" );
|
||||
if ( !fractureModel->thicknessDirectionWellPath() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RigWellPath* wellPathGeometry = fractureModel->thicknessDirectionWellPath()->wellPathGeometry();
|
||||
if ( !wellPathGeometry )
|
||||
{
|
||||
RiaLogging::error( "No well path geometry found for layer data exctration." );
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" );
|
||||
|
||||
measuredDepthValues = eclExtractor.cellIntersectionMDs();
|
||||
tvDepthValues = eclExtractor.cellIntersectionTVDs();
|
||||
@ -161,6 +171,13 @@ bool RimFractureModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
|
||||
std::vector<double> faciesValues =
|
||||
m_fractureModelCalculator->extractValues( RiaDefines::CurveProperty::FACIES, timeStep );
|
||||
|
||||
if ( faciesValues.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies values found." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> poroValues =
|
||||
m_fractureModelCalculator->extractValues( RiaDefines::CurveProperty::POROSITY, timeStep );
|
||||
|
||||
|
@ -74,9 +74,19 @@ bool RimFractureModelLayerCalculator::calculate( RiaDefines::CurveProperty curve
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(),
|
||||
fractureModel->thicknessDirectionWellPath()->wellPathGeometry(),
|
||||
"fracture model" );
|
||||
if ( !fractureModel->thicknessDirectionWellPath() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RigWellPath* wellPathGeometry = fractureModel->thicknessDirectionWellPath()->wellPathGeometry();
|
||||
if ( !wellPathGeometry )
|
||||
{
|
||||
RiaLogging::error( "No well path geometry found for layer data exctration." );
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" );
|
||||
|
||||
rkbDiff = eclExtractor.wellPathGeometry()->rkbDiff();
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaFractureModelDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
@ -70,6 +71,18 @@ bool RimFractureModelStressCalculator::calculate( RiaDefines::CurveProperty curv
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !fractureModel->thicknessDirectionWellPath() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RigWellPath* wellPathGeometry = fractureModel->thicknessDirectionWellPath()->wellPathGeometry();
|
||||
if ( !wellPathGeometry )
|
||||
{
|
||||
RiaLogging::error( "No well path geometry found for stress data exctration." );
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> tvDepthInFeet = m_fractureModelCalculator->calculateTrueVerticalDepth();
|
||||
for ( double f : tvDepthInFeet )
|
||||
{
|
||||
@ -99,7 +112,6 @@ bool RimFractureModelStressCalculator::calculate( RiaDefines::CurveProperty curv
|
||||
|
||||
if ( eclipseCase )
|
||||
{
|
||||
RigWellPath* wellPathGeometry = fractureModel->thicknessDirectionWellPath()->wellPathGeometry();
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" );
|
||||
|
||||
rkbDiff = wellPathGeometry->rkbDiff();
|
||||
|
@ -85,15 +85,19 @@ bool RimFractureModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: improve this..
|
||||
if ( curveProperty == RiaDefines::CurveProperty::INITIAL_PRESSURE )
|
||||
if ( !fractureModel->thicknessDirectionWellPath() )
|
||||
{
|
||||
timeStep = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(),
|
||||
fractureModel->thicknessDirectionWellPath()->wellPathGeometry(),
|
||||
"fracture model" );
|
||||
RigWellPath* wellPathGeometry = fractureModel->thicknessDirectionWellPath()->wellPathGeometry();
|
||||
if ( !wellPathGeometry )
|
||||
{
|
||||
RiaLogging::error( "No well path geometry found for well log exctration" );
|
||||
return false;
|
||||
}
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" );
|
||||
|
||||
measuredDepthValues = eclExtractor.cellIntersectionMDs();
|
||||
tvDepthValues = eclExtractor.cellIntersectionTVDs();
|
||||
@ -107,6 +111,12 @@ bool RimFractureModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
|
||||
eclipseResultDefinition.loadResult();
|
||||
|
||||
// TODO: improve this..
|
||||
if ( curveProperty == RiaDefines::CurveProperty::INITIAL_PRESSURE )
|
||||
{
|
||||
timeStep = 0;
|
||||
}
|
||||
|
||||
cvf::ref<RigResultAccessor> resAcc =
|
||||
RigResultAccessorFactory::createFromResultDefinition( eclipseCase->eclipseCaseData(),
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user