mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6284 Mud Weight Window: Improve handling of non-reservoir elements.
This commit is contained in:
parent
e93c4e75f2
commit
02013f4816
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() )
|
||||
|
@ -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;
|
||||
|
@ -92,7 +92,7 @@ void caf::AppEnum<RimMudWeightWindowParameters::FractureGradientCalculationType>
|
||||
template <>
|
||||
void caf::AppEnum<RimMudWeightWindowParameters::NonReservoirPorePressureType>::setUp()
|
||||
{
|
||||
addItem( RimMudWeightWindowParameters::NonReservoirPorePressureType::HYDROSTATIC, "PORE_PRESSURE", "Pore Pressure" );
|
||||
addItem( RimMudWeightWindowParameters::NonReservoirPorePressureType::HYDROSTATIC, "HYDROSTATIC", "Hydrostatic" );
|
||||
addItem( RimMudWeightWindowParameters::NonReservoirPorePressureType::PER_ELEMENT,
|
||||
"PER_ELEMENT",
|
||||
"From element properties" );
|
||||
@ -189,6 +189,8 @@ RimMudWeightWindowParameters::RimMudWeightWindowParameters( void )
|
||||
"Data source for Non-Reservoir Pore Pressure",
|
||||
"" );
|
||||
CAF_PDM_InitField( &m_userDefinedPPNonReservoir, "UserPPNonReservoir", 1.0, " Multiplier of hydrostatic PP", "", "", "" );
|
||||
CAF_PDM_InitField( &m_porePressureNonReservoirAddress, "PPNonReservoirAddress", QString( "" ), "Value", "", "", "" );
|
||||
m_porePressureNonReservoirAddress.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_referenceLayer, "ReferenceLayer", -1, "Reference Layer", "", "", "" );
|
||||
}
|
||||
@ -385,7 +387,7 @@ void RimMudWeightWindowParameters::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
else if ( changedField == &m_airGap || changedField == &m_upperLimitType || changedField == &m_lowerLimitType ||
|
||||
changedField == &m_referenceLayer || changedField == &m_fractureGradientCalculationType ||
|
||||
changedField == &m_shMultiplier || changedField == &m_porePressureNonReservoirSource ||
|
||||
changedField == &m_userDefinedPPNonReservoir )
|
||||
changedField == &m_userDefinedPPNonReservoir || changedField == &m_porePressureNonReservoirAddress )
|
||||
{
|
||||
RigGeoMechCaseData* rigCaseData = geoMechCase->geoMechData();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
@ -397,7 +399,8 @@ void RimMudWeightWindowParameters::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
m_fractureGradientCalculationType.value(),
|
||||
m_shMultiplier,
|
||||
m_porePressureNonReservoirSource.value(),
|
||||
m_userDefinedPPNonReservoir );
|
||||
m_userDefinedPPNonReservoir,
|
||||
m_porePressureNonReservoirAddress );
|
||||
geoMechCase->updateConnectedViews();
|
||||
}
|
||||
}
|
||||
@ -504,6 +507,11 @@ void RimMudWeightWindowParameters::defineUiOrdering( QString uiConfigName, caf::
|
||||
m_obg0Fixed.uiCapability()->setUiHidden( true );
|
||||
m_obg0Address.uiCapability()->setUiHidden(
|
||||
!( isDerivedFromK0_FG && m_obg0Type == RimMudWeightWindowParameters::SourceType::PER_ELEMENT ) );
|
||||
|
||||
bool ppNonResPerElement =
|
||||
( m_porePressureNonReservoirSource == RimMudWeightWindowParameters::NonReservoirPorePressureType::PER_ELEMENT );
|
||||
m_userDefinedPPNonReservoir.uiCapability()->setUiHidden( ppNonResPerElement );
|
||||
m_porePressureNonReservoirAddress.uiCapability()->setUiHidden( !ppNonResPerElement );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -574,7 +582,8 @@ QList<caf::PdmOptionItemInfo>
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_wellDeviationAddress || fieldNeedingOptions == &m_wellAzimuthAddress ||
|
||||
fieldNeedingOptions == &m_UCSAddress || fieldNeedingOptions == &m_poissonsRatioAddress ||
|
||||
fieldNeedingOptions == &m_K0_FGAddress || fieldNeedingOptions == &m_obg0Address )
|
||||
fieldNeedingOptions == &m_K0_FGAddress || fieldNeedingOptions == &m_obg0Address ||
|
||||
fieldNeedingOptions == &m_porePressureNonReservoirAddress )
|
||||
{
|
||||
std::vector<std::string> elementProperties = geoMechCase->possibleElementPropertyFieldNames();
|
||||
|
||||
|
@ -154,5 +154,7 @@ private:
|
||||
caf::PdmField<caf::AppEnum<FractureGradientCalculationType>> m_fractureGradientCalculationType;
|
||||
caf::PdmField<caf::AppEnum<NonReservoirPorePressureType>> m_porePressureNonReservoirSource;
|
||||
|
||||
caf::PdmField<QString> m_porePressureNonReservoirAddress;
|
||||
|
||||
caf::PdmField<int> m_referenceLayer;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user