#2680. First reasonable Fracture Gradient and Shear Failure Gradient estimation.

Caveats:
* Hard coded poissonRatio = 0.25
* Hard coded UCS to 100 bar (fairly close to average value for shale in literature).
This commit is contained in:
Gaute Lindkvist
2018-06-05 11:56:47 +02:00
parent 11aeda63d9
commit 4ddacad385
19 changed files with 728 additions and 94 deletions

View File

@@ -28,6 +28,7 @@
#include "RigResultAccessorFactory.h"
#include "RigCaseCellResultsData.h"
#include "RigFemPartResultsCollection.h"
#include "RigWellPath.h"
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
#include "Rim3dView.h"
@@ -79,6 +80,7 @@ Rim3dWellLogExtractionCurve::Rim3dWellLogExtractionCurve()
m_geomResultDefinition.uiCapability()->setUiHidden(true);
m_geomResultDefinition.uiCapability()->setUiTreeChildrenHidden(true);
m_geomResultDefinition = new RimGeoMechResultDefinition;
m_geomResultDefinition->setAddWellPathDerivedResults(true);
CAF_PDM_InitFieldNoDefault(&m_nameConfig, "NameConfig", "", "", "", "");
m_nameConfig = new RimWellLogExtractionCurveNameConfig(this);
@@ -199,10 +201,9 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMds(std::vector<double>* values,
else if (geomExtractor.notNull())
{
*measuredDepthValues = geomExtractor->measuredDepth();
m_geomResultDefinition->loadResult();
geomExtractor->curveData(m_geomResultDefinition->resultAddress(), m_timeStep, values);
geomExtractor->setRkbDiff(rkbDiff());
geomExtractor->curveData(m_geomResultDefinition->resultAddress(), m_timeStep, values);
}
}
@@ -280,6 +281,41 @@ QString Rim3dWellLogExtractionCurve::createCurveAutoName() const
return generatedCurveName.join(", ");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double Rim3dWellLogExtractionCurve::rkbDiff() const
{
RimWellPath* wellPath;
firstAncestorOrThisOfType(wellPath);
if (wellPath && wellPath->wellPathGeometry())
{
RigWellPath* geo = wellPath->wellPathGeometry();
if (geo->hasDatumElevation())
{
return geo->datumElevation();
}
// If measured depth is zero, use the z-value of the well path points
if (geo->m_wellPathPoints.size() > 0 && geo->m_measuredDepths.size() > 0)
{
double epsilon = 1e-3;
if (cvf::Math::abs(geo->m_measuredDepths[0]) < epsilon)
{
double diff = geo->m_measuredDepths[0] - (-geo->wellPathPoints()[0].z());
return diff;
}
}
}
return HUGE_VAL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -293,7 +329,7 @@ caf::PdmFieldHandle* Rim3dWellLogExtractionCurve::userDescriptionField()
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
if (changedField == &m_timeStep || changedField == &m_case)
if (changedField == &m_case)
{
this->resetMinMaxValuesAndUpdateUI();
}

View File

@@ -48,6 +48,7 @@ public:
virtual QString name() const override;
virtual QString createCurveAutoName() const override;
double rkbDiff() const;
protected:
virtual caf::PdmFieldHandle* userDescriptionField() override;
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;

View File

@@ -51,6 +51,7 @@ void caf::AppEnum< RigFemResultPosEnum >::setUp()
addItem(RIG_ELEMENT_NODAL_FACE, "ELEMENT_NODAL_FACE", "Element Nodal On Face");
addItem(RIG_FORMATION_NAMES, "FORMATION_NAMES", "Formation Names");
addItem(RIG_ELEMENT, "ELEMENT", "Element");
addItem(RIG_WELLPATH_DERIVED, "WELLPATH_DERIVED", "Well Path Derived");
setDefault(RIG_NODAL);
}
}
@@ -108,6 +109,7 @@ RimGeoMechResultDefinition::RimGeoMechResultDefinition(void)
m_compactionRefLayerUiField.xmlCapability()->setIOReadable(false);
m_isChangedByField = false;
m_addWellPathDerivedResults = false;
}
//--------------------------------------------------------------------------------------------------
@@ -169,7 +171,19 @@ QList<caf::PdmOptionItemInfo> RimGeoMechResultDefinition::calculateValueOptions(
if (m_geomCase)
{
if (&m_resultVariableUiField == fieldNeedingOptions)
if (&m_resultPositionTypeUiField == fieldNeedingOptions)
{
std::vector<RigFemResultPosEnum> optionItems = { RIG_NODAL, RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT, RIG_ELEMENT_NODAL_FACE, RIG_FORMATION_NAMES, RIG_ELEMENT };
if (true || m_addWellPathDerivedResults)
{
optionItems.push_back(RIG_WELLPATH_DERIVED);
}
for (RigFemResultPosEnum value : optionItems)
{
options.push_back(caf::PdmOptionItemInfo(caf::AppEnum<RigFemResultPosEnum>::uiText(value), QVariant(value)));
}
}
else if (&m_resultVariableUiField == fieldNeedingOptions)
{
std::map<std::string, std::vector<std::string> > fieldCompNames = getResultMetaDataForUIFieldSetting();
@@ -439,10 +453,29 @@ void RimGeoMechResultDefinition::loadResult()
{
if (m_geomCase && m_geomCase->geoMechData())
{
m_geomCase->geoMechData()->femPartResults()->assertResultsLoaded(this->resultAddress());
if (this->resultAddress().fieldName == "FractureGradient" ||
this->resultAddress().fieldName == "ShearFailureGradient")
{
RigFemResultAddress stressResAddr(RIG_ELEMENT_NODAL, std::string("ST"), "");
RigFemResultAddress porBarResAddr(RIG_ELEMENT_NODAL, std::string("POR-Bar"), "");
m_geomCase->geoMechData()->femPartResults()->assertResultsLoaded(stressResAddr);
m_geomCase->geoMechData()->femPartResults()->assertResultsLoaded(porBarResAddr);
}
else
{
m_geomCase->geoMechData()->femPartResults()->assertResultsLoaded(this->resultAddress());
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechResultDefinition::setAddWellPathDerivedResults(bool addWellPathDerivedResults)
{
m_addWellPathDerivedResults = addWellPathDerivedResults;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -48,6 +48,7 @@ public:
RigGeoMechCaseData* ownerCaseData();
bool hasResult();
void loadResult();
void setAddWellPathDerivedResults(bool addWellPathDerivedResults);
RigFemResultAddress resultAddress();
@@ -117,4 +118,5 @@ private:
caf::PdmPointer<RimGeoMechCase> m_geomCase;
bool m_isChangedByField;
bool m_addWellPathDerivedResults;
};

View File

@@ -111,6 +111,7 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve()
m_geomResultDefinition.uiCapability()->setUiHidden(true);
m_geomResultDefinition.uiCapability()->setUiTreeChildrenHidden(true);
m_geomResultDefinition = new RimGeoMechResultDefinition;
m_geomResultDefinition->setAddWellPathDerivedResults(true);
CAF_PDM_InitField(&m_timeStep, "CurveTimeStep", 0,"Time Step", "", "", "");
@@ -388,7 +389,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
tvDepthValues = geomExtractor->trueVerticalDepth();
m_geomResultDefinition->loadResult();
geomExtractor->setRkbDiff(rkbDiff());
geomExtractor->curveData(m_geomResultDefinition->resultAddress(), m_timeStep, &values);
}