mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash when time step the initial time step.
This commit is contained in:
parent
182b7f546c
commit
271191b199
@ -342,6 +342,14 @@ bool RimFractureModelCalculator::calculateStressWithGradients( std::vector<doubl
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( biotData.size() < layerBoundaryIndexes.size() || k0Data.size() < layerBoundaryIndexes.size() ||
|
||||
timeStepPressureData.size() < layerBoundaryIndexes.size() ||
|
||||
initialPressureData.size() < layerBoundaryIndexes.size() ||
|
||||
poissonsRatioData.size() < layerBoundaryIndexes.size() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> stressForGradients;
|
||||
std::vector<double> pressureForGradients;
|
||||
std::vector<double> depthForGradients;
|
||||
|
@ -272,6 +272,7 @@ bool RimFractureModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
.arg( fieldName )
|
||||
.arg( formationName )
|
||||
.arg( faciesName ) );
|
||||
values.clear();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -108,16 +108,19 @@ void RimFractureModelStressCurve::performDataExtraction( bool* isUsingPseudoLeng
|
||||
|
||||
*isUsingPseudoLength = false;
|
||||
|
||||
bool isOk = m_fractureModel->calculator()
|
||||
->extractCurveData( curveProperty(), m_timeStep, values, measuredDepthValues, tvDepthValues, rkbDiff );
|
||||
bool isOk = m_fractureModel->calculator()->extractCurveData( curveProperty(),
|
||||
m_fractureModel->timeStep(),
|
||||
values,
|
||||
measuredDepthValues,
|
||||
tvDepthValues,
|
||||
rkbDiff );
|
||||
if ( !isOk )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case.value() );
|
||||
RiaEclipseUnitTools::UnitSystem eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType();
|
||||
if ( eclipseUnitsType == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
RimEclipseCase* eclipseCase = m_fractureModel->eclipseCase();
|
||||
if ( eclipseCase && eclipseCase->eclipseCaseData()->unitsType() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
{
|
||||
// See https://github.com/OPM/ResInsight/issues/538
|
||||
|
||||
|
@ -111,8 +111,8 @@ bool RimFractureModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
|
||||
eclipseResultDefinition.loadResult();
|
||||
|
||||
// TODO: improve this..
|
||||
if ( curveProperty == RiaDefines::CurveProperty::INITIAL_PRESSURE )
|
||||
if ( fractureModel->eclipseResultCategory( curveProperty ) != RiaDefines::ResultCatType::DYNAMIC_NATIVE ||
|
||||
curveProperty == RiaDefines::CurveProperty::INITIAL_PRESSURE )
|
||||
{
|
||||
timeStep = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user