#6185 Fracture Model Plot: compute stress at bottom of zone using gradient.

This commit is contained in:
Kristian Bendiksen 2020-07-06 19:23:35 +02:00
parent 6cdb341295
commit 3b662904e2
2 changed files with 37 additions and 1 deletions

View File

@ -121,13 +121,15 @@ void RimFractureModelStressCurve::performDataExtraction( bool* isUsingPseudoLeng
tvDepthValues.push_back( RiaEclipseUnitTools::feetToMeter( f ) );
}
std::vector<double> stressGradients = fractureModelPlot->calculateStressGradient();
if ( m_curveProperty() == RiaDefines::CurveProperty::STRESS )
{
values = fractureModelPlot->calculateStress();
addDatapointsForBottomOfLayers( tvDepthValues, values, stressGradients );
}
else
{
values = fractureModelPlot->calculateStressGradient();
values = stressGradients;
}
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case.value() );
@ -188,3 +190,33 @@ QString RimFractureModelStressCurve::createCurveAutoName()
{
return caf::AppEnum<RiaDefines::CurveProperty>::uiText( m_curveProperty() );
}
void RimFractureModelStressCurve::addDatapointsForBottomOfLayers( std::vector<double>& tvDepthValues,
std::vector<double>& stress,
const std::vector<double>& stressGradients )
{
std::vector<double> tvdWithBottomLayers;
std::vector<double> valuesWithBottomLayers;
for ( size_t i = 0; i < stress.size(); i++ )
{
// Add the data point at top of the layer
double topLayerDepth = tvDepthValues[i];
double stressValue = stress[i];
tvdWithBottomLayers.push_back( topLayerDepth );
valuesWithBottomLayers.push_back( stressValue );
// Add extra data points for bottom part of the layer
if ( i < stress.size() - 1 )
{
double bottomLayerDepth = tvDepthValues[i + 1];
double diffDepthFeet = RiaEclipseUnitTools::meterToFeet( bottomLayerDepth - topLayerDepth );
double bottomStress = stressValue + diffDepthFeet * stressGradients[i];
tvdWithBottomLayers.push_back( bottomLayerDepth );
valuesWithBottomLayers.push_back( bottomStress );
}
}
stress = valuesWithBottomLayers;
tvDepthValues = tvdWithBottomLayers;
}

View File

@ -60,6 +60,10 @@ protected:
void performDataExtraction( bool* isUsingPseudoLength ) override;
static void addDatapointsForBottomOfLayers( std::vector<double>& tvDepthValues,
std::vector<double>& stress,
const std::vector<double>& stressGradients );
caf::PdmPtrField<RimFractureModel*> m_fractureModel;
caf::PdmField<caf::AppEnum<RiaDefines::CurveProperty>> m_curveProperty;
};