#6284 Mud Weight Window: Improve handling of non-reservoir elements.

This commit is contained in:
Kristian Bendiksen
2020-08-11 11:14:58 +02:00
parent e93c4e75f2
commit 02013f4816
5 changed files with 79 additions and 13 deletions

View File

@@ -141,6 +141,22 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
const bool OBG0FromGrid =
m_resultCollection->getCalculationParameterAddress( RimMudWeightWindowParameters::ParameterType::OBG0 ).isEmpty();
RimMudWeightWindowParameters::NonReservoirPorePressureType PP_NonReservoirType =
m_resultCollection->nonReservoirPorePressureTypeMudWeightWindow();
double hydrostaticMultiplier = m_resultCollection->hydrostaticMultiplierPPNonRes();
const QString& nonReservoirAddress = m_resultCollection->nonReservoirPorePressureAddressMudWeightWindow();
RigFemScalarResultFrames* nonReservoirResultFrames = nullptr;
if ( PP_NonReservoirType != RimMudWeightWindowParameters::NonReservoirPorePressureType::HYDROSTATIC &&
!nonReservoirAddress.isEmpty() )
{
nonReservoirResultFrames =
m_resultCollection->findOrLoadScalarResult( partIndex,
RigFemResultAddress( RIG_ELEMENT,
nonReservoirAddress.toStdString(),
"" ) );
}
float inf = std::numeric_limits<float>::infinity();
frameCountProgress.setNextProgressIncrement( 1u );
@@ -173,6 +189,12 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
parameterFrameData[parameterType] = loadDataForFrame( parameterType, parameterFrames, fIdx );
}
std::vector<float> nonReservoirPP;
if ( nonReservoirResultFrames )
{
nonReservoirPP = nonReservoirResultFrames->frameData( 0 );
}
// Load stress
RigFemResultAddress stressResAddr( RIG_ELEMENT_NODAL, "ST", "" );
std::vector<caf::Ten3f> vertexStressesFloat = m_resultCollection->tensors( stressResAddr, partIndex, fIdx );
@@ -225,7 +247,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
if ( elmType == HEX8P )
if ( elmType == HEX8P || elmType == HEX8 )
{
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
{
@@ -242,8 +264,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
// Pore pressure (unit: Bar)
double porePressureBar = porFrameData[nodeIdx];
double initialPorePressureBar = initialPorFrameData[nodeIdx];
float porePressureBar = porFrameData[nodeIdx];
float initialPorePressureBar = initialPorFrameData[nodeIdx];
// Initial overburden gradient
if ( OBG0FromGrid )
@@ -254,6 +276,24 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
// FG is for sands, SFG for shale. Sands has valid PP, shale does not.
bool isSand = ( porePressureBar != inf );
//
if ( porePressureBar == inf )
{
//
if ( PP_NonReservoirType ==
RimMudWeightWindowParameters::NonReservoirPorePressureType::HYDROSTATIC )
{
porePressureBar = cellCenterHydroStaticPressure * hydrostaticMultiplier;
initialPorePressureBar = cellCenterHydroStaticPressure * hydrostaticMultiplier;
}
else if ( !nonReservoirPP.empty() )
{
// Get from element table
porePressureBar = nonReservoirPP[elmIdx];
initialPorePressureBar = nonReservoirPP[elmIdx];
}
}
caf::Ten3d segmentStress = caf::Ten3d( vertexStressesFloat[nodeIdx] );
cvf::Vec3d wellPathTangent = calculateWellPathTangent( wellPathAzimuth, wellPathDeviation );
@@ -309,7 +349,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
else
{
double SFG = sigmaCalculator.solveStassiDalia();
lowerLimit = std::max( porePressureBar, SFG );
lowerLimit = std::max( porePressureBar, static_cast<float>( SFG ) );
}
}

View File

@@ -120,9 +120,11 @@ RigFemPartResultsCollection::RigFemPartResultsCollection( RifGeoMechReaderInterf
m_initialPermeabilityResultAddress = "";
m_permeabilityExponent = 1.0;
m_airGapMudWeightWindow = 0.0;
m_referenceLayerMudWeightWindow = 0;
m_shMultiplierMudWeightWindow = 1.05;
m_airGapMudWeightWindow = 0.0;
m_referenceLayerMudWeightWindow = 0;
m_shMultiplierMudWeightWindow = 1.05;
m_nonReservoirPorePressureAddressMudWeightWindow = "";
m_hydrostaticMultiplierPPNonResMudWeightWindow = 1.0;
m_resultCalculators.push_back(
std::unique_ptr<RigFemPartResultCalculator>( new RigFemPartResultCalculatorTimeLapse( *this ) ) );
@@ -1722,6 +1724,14 @@ RimMudWeightWindowParameters::NonReservoirPorePressureType
return m_nonReservoirPorePressureTypeMudWeightWindow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const QString& RigFemPartResultsCollection::nonReservoirPorePressureAddressMudWeightWindow() const
{
return m_nonReservoirPorePressureAddressMudWeightWindow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1757,7 +1767,8 @@ void RigFemPartResultsCollection::setMudWeightWindowParameters(
RimMudWeightWindowParameters::FractureGradientCalculationType fgCalculationType,
double shMultiplier,
RimMudWeightWindowParameters::NonReservoirPorePressureType nonReservoirPorePressureType,
double hydrostaticMultiplierPPNonRes )
double hydrostaticMultiplierPPNonRes,
const QString& nonReservoirPorePressureAddress )
{
m_airGapMudWeightWindow = airGap;
m_upperLimitParameterMudWeightWindow = upperLimit;
@@ -1767,6 +1778,7 @@ void RigFemPartResultsCollection::setMudWeightWindowParameters(
m_shMultiplierMudWeightWindow = shMultiplier;
m_nonReservoirPorePressureTypeMudWeightWindow = nonReservoirPorePressureType;
m_hydrostaticMultiplierPPNonResMudWeightWindow = hydrostaticMultiplierPPNonRes;
m_nonReservoirPorePressureAddressMudWeightWindow = nonReservoirPorePressureAddress;
// Invalidate dependent results
for ( auto result : mudWeightWindowResults() )

View File

@@ -95,13 +95,15 @@ public:
RimMudWeightWindowParameters::FractureGradientCalculationType fgCalculationType,
double shMultiplier,
RimMudWeightWindowParameters::NonReservoirPorePressureType nonReservoirPorePressureType,
double hydroStaticMultiplierPPNonRes );
double hydroStaticMultiplierPPNonRes,
const QString& nonReservoirPorePressureAddress );
double airGapMudWeightWindow() const;
double shMultiplierMudWeightWindow() const;
double hydrostaticMultiplierPPNonRes() const;
RimMudWeightWindowParameters::NonReservoirPorePressureType nonReservoirPorePressureTypeMudWeightWindow() const;
const QString& nonReservoirPorePressureAddressMudWeightWindow() const;
RimMudWeightWindowParameters::UpperLimitType upperLimitParameterMudWeightWindow() const;
RimMudWeightWindowParameters::LowerLimitType lowerLimitParameterMudWeightWindow() const;
@@ -217,6 +219,7 @@ private:
RimMudWeightWindowParameters::NonReservoirPorePressureType m_nonReservoirPorePressureTypeMudWeightWindow;
double m_hydrostaticMultiplierPPNonResMudWeightWindow;
QString m_nonReservoirPorePressureAddressMudWeightWindow;
std::map<RimMudWeightWindowParameters::ParameterType, QString> parameterAddresses;
std::map<RimMudWeightWindowParameters::ParameterType, double> parameterValues;