mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3160 Use cell centre depth for well bore stability curves
This commit is contained in:
parent
06e3ca238a
commit
be63eb5aef
@ -165,6 +165,7 @@ void RigGeoMechWellLogExtractor::wellPathScaledCurveData(const RigFemResultAddre
|
||||
CVF_ASSERT(values);
|
||||
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part(0);
|
||||
const RigFemPartGrid* femPartGrid = femPart->structGrid();
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||
|
||||
@ -199,7 +200,11 @@ void RigGeoMechWellLogExtractor::wellPathScaledCurveData(const RigFemResultAddre
|
||||
|
||||
if (!(elmType == HEX8 || elmType == HEX8P)) continue;
|
||||
|
||||
double trueVerticalDepth = -m_intersections[intersectionIdx].z();
|
||||
const int* elmNodeIndices = femPart->connectivities(elmIdx);
|
||||
cvf::Vec3f centroid = cellCentroid(elmNodeIndices, nodeCoords);
|
||||
|
||||
double trueVerticalDepth = -centroid.z();
|
||||
|
||||
double effectiveDepth = trueVerticalDepth + m_rkbDiff;
|
||||
double hydroStaticPorePressure = effectiveDepth * 9.81 / 100.0;
|
||||
|
||||
@ -259,7 +264,10 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
||||
|
||||
if (!(elmType == HEX8 || elmType == HEX8P)) continue;
|
||||
|
||||
double trueVerticalDepth = -m_intersections[intersectionIdx].z();
|
||||
const int* elmNodeIndices = femPart->connectivities(elmIdx);
|
||||
cvf::Vec3f centroid = cellCentroid(elmNodeIndices, nodeCoords);
|
||||
|
||||
double trueVerticalDepth = -centroid.z();
|
||||
double porePressure = trueVerticalDepth * 9.81 / 100.0;
|
||||
if (!porePressures.empty())
|
||||
{
|
||||
@ -287,7 +295,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
||||
CVF_ASSERT(resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString());
|
||||
resultValue = sigmaCalculator.solveStassiDalia();
|
||||
}
|
||||
double effectiveDepth = -m_intersections[intersectionIdx].z() + m_rkbDiff;
|
||||
double effectiveDepth = trueVerticalDepth + m_rkbDiff;
|
||||
if (effectiveDepth > 1.0e-8)
|
||||
{
|
||||
resultValue *= 100.0 / (effectiveDepth * 9.81);
|
||||
@ -545,3 +553,16 @@ caf::Ten3d RigGeoMechWellLogExtractor::transformTensorToWellPathOrientation(cons
|
||||
return tensor.rotated(rotationMatrix.toMatrix3());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid(const int* elmNodeIndices, const std::vector<cvf::Vec3f>& nodeCoords)
|
||||
{
|
||||
cvf::Vec3f centroid(0.0, 0.0, 0.0);
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
centroid += nodeCoords[elmNodeIndices[i]];
|
||||
}
|
||||
return centroid / 8.0;
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ private:
|
||||
static caf::Ten3d transformTensorToWellPathOrientation(const cvf::Vec3d& wellPathTangent,
|
||||
const caf::Ten3d& wellPathTensor);
|
||||
|
||||
static cvf::Vec3f cellCentroid(const int* elmNodeIndices, const std::vector<cvf::Vec3f>& nodeCoords);
|
||||
cvf::ref<RigGeoMechCaseData> m_caseData;
|
||||
double m_rkbDiff;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user