mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
This commit is contained in:
parent
7db48f1712
commit
51434dd304
@ -111,8 +111,15 @@ void RigGeoMechWellLogExtractor::curveData(const RigFemResultAddress& resAddr, i
|
|||||||
float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t intersectionIdx, float averageSegmentPorePressureBars, double hydroStaticPorePressureBars, double effectiveDepthMeters, const std::vector<float>& poreElementPressuresPascal) const
|
float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t intersectionIdx, float averageSegmentPorePressureBars, double hydroStaticPorePressureBars, double effectiveDepthMeters, const std::vector<float>& poreElementPressuresPascal) const
|
||||||
{
|
{
|
||||||
double porePressure = hydroStaticPorePressureBars;
|
double porePressure = hydroStaticPorePressureBars;
|
||||||
// 1: Try mud weight from LAS-file to generate pore pressure
|
|
||||||
if (!m_wellLogMdAndMudWeightKgPerM3.empty())
|
// 1: Try pore pressure from the grid
|
||||||
|
if (porePressure == hydroStaticPorePressureBars && averageSegmentPorePressureBars != std::numeric_limits<float>::infinity())
|
||||||
|
{
|
||||||
|
porePressure = averageSegmentPorePressureBars;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2: Try mud weight from LAS-file to generate pore pressure
|
||||||
|
if (porePressure == hydroStaticPorePressureBars && !m_wellLogMdAndMudWeightKgPerM3.empty())
|
||||||
{
|
{
|
||||||
double lasMudWeightKgPerM3 = getWellLogSegmentValue(intersectionIdx, m_wellLogMdAndMudWeightKgPerM3);
|
double lasMudWeightKgPerM3 = getWellLogSegmentValue(intersectionIdx, m_wellLogMdAndMudWeightKgPerM3);
|
||||||
if (lasMudWeightKgPerM3 != std::numeric_limits<double>::infinity())
|
if (lasMudWeightKgPerM3 != std::numeric_limits<double>::infinity())
|
||||||
@ -123,17 +130,12 @@ float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t interse
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
size_t elmIdx = m_intersectedCellsGlobIdx[intersectionIdx];
|
size_t elmIdx = m_intersectedCellsGlobIdx[intersectionIdx];
|
||||||
// 2: Try pore pressure from element property tables
|
// 3: Try pore pressure from element property tables
|
||||||
if (porePressure == hydroStaticPorePressureBars && elmIdx < poreElementPressuresPascal.size())
|
if (porePressure == hydroStaticPorePressureBars && elmIdx < poreElementPressuresPascal.size())
|
||||||
{
|
{
|
||||||
// Pore pressure from element property tables are in pascal.
|
// Pore pressure from element property tables are in pascal.
|
||||||
porePressure = pascalToBar(poreElementPressuresPascal[elmIdx]);
|
porePressure = pascalToBar(poreElementPressuresPascal[elmIdx]);
|
||||||
}
|
}
|
||||||
// 3: Try pore pressure from the grid
|
|
||||||
if (porePressure == hydroStaticPorePressureBars && averageSegmentPorePressureBars != std::numeric_limits<float>::infinity())
|
|
||||||
{
|
|
||||||
porePressure = averageSegmentPorePressureBars;
|
|
||||||
}
|
|
||||||
// 4: If no pore-pressure was found, the default value of hydrostatic pore pressure is used.
|
// 4: If no pore-pressure was found, the default value of hydrostatic pore pressure is used.
|
||||||
return porePressure;
|
return porePressure;
|
||||||
}
|
}
|
||||||
@ -398,7 +400,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
|||||||
double hydroStaticPorePressureBars = pascalToBar(effectiveDepthMeters * UNIT_WEIGHT_OF_WATER);
|
double hydroStaticPorePressureBars = pascalToBar(effectiveDepthMeters * UNIT_WEIGHT_OF_WATER);
|
||||||
|
|
||||||
float averageUnscaledPP = std::numeric_limits<float>::infinity();
|
float averageUnscaledPP = std::numeric_limits<float>::infinity();
|
||||||
averageIntersectionValuesToSegmentValue(intersectionIdx, interpolatedInterfacePP, std::numeric_limits<float>::infinity(), &averageUnscaledPP);
|
bool validGridPP = averageIntersectionValuesToSegmentValue(intersectionIdx, interpolatedInterfacePP, std::numeric_limits<float>::infinity(), &averageUnscaledPP);
|
||||||
|
|
||||||
double porePressureBars = calculatePorePressureInSegment(intersectionIdx, averageUnscaledPP, hydroStaticPorePressureBars, effectiveDepthMeters, poreElementPressuresPascal);
|
double porePressureBars = calculatePorePressureInSegment(intersectionIdx, averageUnscaledPP, hydroStaticPorePressureBars, effectiveDepthMeters, poreElementPressuresPascal);
|
||||||
double poissonRatio = calculatePoissonRatio(intersectionIdx, poissonRatios);
|
double poissonRatio = calculatePoissonRatio(intersectionIdx, poissonRatios);
|
||||||
@ -412,16 +414,24 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
|||||||
caf::Ten3d wellPathStressDouble(wellPathStressFloat);
|
caf::Ten3d wellPathStressDouble(wellPathStressFloat);
|
||||||
|
|
||||||
RigGeoMechBoreHoleStressCalculator sigmaCalculator(wellPathStressDouble, porePressureBars, poissonRatio, ucsBars, 32);
|
RigGeoMechBoreHoleStressCalculator sigmaCalculator(wellPathStressDouble, porePressureBars, poissonRatio, ucsBars, 32);
|
||||||
double resultValue = 0.0;
|
double resultValue = std::numeric_limits<double>::infinity();
|
||||||
if (resAddr.fieldName == RiaDefines::wellPathFGResultName().toStdString())
|
if (resAddr.fieldName == RiaDefines::wellPathFGResultName().toStdString())
|
||||||
|
{
|
||||||
|
if (validGridPP)
|
||||||
{
|
{
|
||||||
resultValue = sigmaCalculator.solveFractureGradient();
|
resultValue = sigmaCalculator.solveFractureGradient();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CVF_ASSERT(resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString());
|
CVF_ASSERT(resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString());
|
||||||
|
if (!validGridPP)
|
||||||
|
{
|
||||||
resultValue = sigmaCalculator.solveStassiDalia();
|
resultValue = sigmaCalculator.solveStassiDalia();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (resultValue != std::numeric_limits<double>::infinity())
|
||||||
|
{
|
||||||
if (hydroStaticPorePressureBars > 1.0e-8)
|
if (hydroStaticPorePressureBars > 1.0e-8)
|
||||||
{
|
{
|
||||||
resultValue /= hydroStaticPorePressureBars;
|
resultValue /= hydroStaticPorePressureBars;
|
||||||
@ -430,7 +440,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
|||||||
{
|
{
|
||||||
resultValue = std::numeric_limits<double>::infinity();
|
resultValue = std::numeric_limits<double>::infinity();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
(*values)[intersectionIdx] = resultValue;
|
(*values)[intersectionIdx] = resultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user