mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move hard coded parameter names to RiaDefines
This commit is contained in:
parent
0d9f810718
commit
0a0cb584b5
@ -353,6 +353,88 @@ QString RiaDefines::activeFormationNamesResultName()
|
|||||||
return "Active Formation Names";
|
return "Active Formation Names";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathAzimuthResultName()
|
||||||
|
{
|
||||||
|
return "Azimuth";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathInclinationResultName()
|
||||||
|
{
|
||||||
|
return "Inclination";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathPPResultName()
|
||||||
|
{
|
||||||
|
return "PP";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathSHResultName()
|
||||||
|
{
|
||||||
|
return "SH";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathOBGResultName()
|
||||||
|
{
|
||||||
|
return "OBG";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathFGResultName()
|
||||||
|
{
|
||||||
|
return "FG";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathSFGResultName()
|
||||||
|
{
|
||||||
|
return "SFG";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaDefines::wellPathCasingShoeSizeChannelName()
|
||||||
|
{
|
||||||
|
return "CASING_SIZE";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<QString> RiaDefines::wellPathAngleResultNames()
|
||||||
|
{
|
||||||
|
return { RiaDefines::wellPathAzimuthResultName(), RiaDefines::wellPathInclinationResultName() };
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<QString> RiaDefines::wellPathStabilityResultNames()
|
||||||
|
{
|
||||||
|
return { RiaDefines::wellPathFGResultName(), RiaDefines::wellPathOBGResultName(),
|
||||||
|
RiaDefines::wellPathPPResultName(), RiaDefines::wellPathSFGResultName(),
|
||||||
|
RiaDefines::wellPathSHResultName() };
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace RiaDefines
|
namespace RiaDefines
|
||||||
{
|
{
|
||||||
@ -85,6 +86,22 @@ namespace RiaDefines
|
|||||||
|
|
||||||
QString activeFormationNamesResultName();
|
QString activeFormationNamesResultName();
|
||||||
|
|
||||||
|
// Well path derived results
|
||||||
|
QString wellPathAzimuthResultName();
|
||||||
|
QString wellPathInclinationResultName();
|
||||||
|
QString wellPathPPResultName();
|
||||||
|
QString wellPathSHResultName();
|
||||||
|
QString wellPathOBGResultName();
|
||||||
|
QString wellPathFGResultName();
|
||||||
|
QString wellPathSFGResultName();
|
||||||
|
|
||||||
|
// Well path casing shoe size
|
||||||
|
QString wellPathCasingShoeSizeChannelName();
|
||||||
|
|
||||||
|
// List of well path derived results
|
||||||
|
std::vector<QString> wellPathAngleResultNames();
|
||||||
|
std::vector<QString> wellPathStabilityResultNames();
|
||||||
|
|
||||||
//Units and conversions
|
//Units and conversions
|
||||||
enum DepthUnitType
|
enum DepthUnitType
|
||||||
{
|
{
|
||||||
|
@ -193,15 +193,15 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack(RimWellLogPl
|
|||||||
stabilityCurvesTrack->setAutoScaleXEnabled(true);
|
stabilityCurvesTrack->setAutoScaleXEnabled(true);
|
||||||
stabilityCurvesTrack->setTickIntervals(0.5, 0.05);
|
stabilityCurvesTrack->setTickIntervals(0.5, 0.05);
|
||||||
stabilityCurvesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
stabilityCurvesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
||||||
std::vector<std::string> resultNames = { "PP", "SH", "OGB", "FractureGradient", "ShearFailureGradient" };
|
std::vector<QString> resultNames = RiaDefines::wellPathStabilityResultNames();
|
||||||
|
|
||||||
for (std::string& resultName : resultNames)
|
for (const QString& resultName : resultNames)
|
||||||
{
|
{
|
||||||
RigFemResultAddress resAddr(RIG_WELLPATH_DERIVED, resultName, "");
|
RigFemResultAddress resAddr(RIG_WELLPATH_DERIVED, resultName.toStdString(), "");
|
||||||
RimWellLogExtractionCurve* curve = RicWellLogTools::addExtractionCurve(stabilityCurvesTrack, geoMechView, wellPath, nullptr, 0, false, false);
|
RimWellLogExtractionCurve* curve = RicWellLogTools::addExtractionCurve(stabilityCurvesTrack, geoMechView, wellPath, nullptr, 0, false, false);
|
||||||
curve->setGeoMechResultAddress(resAddr);
|
curve->setGeoMechResultAddress(resAddr);
|
||||||
curve->setCurrentTimeStep(geoMechView->currentTimeStep());
|
curve->setCurrentTimeStep(geoMechView->currentTimeStep());
|
||||||
curve->setCustomName(QString::fromStdString(resultName));
|
curve->setCustomName(resultName);
|
||||||
curve->loadDataAndUpdate(false);
|
curve->loadDataAndUpdate(false);
|
||||||
}
|
}
|
||||||
stabilityCurvesTrack->calculateXZoomRangeAndUpdateQwt();
|
stabilityCurvesTrack->calculateXZoomRangeAndUpdateQwt();
|
||||||
@ -216,15 +216,15 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack(RimWellLogPlot* plot,
|
|||||||
double minValue = 360.0, maxValue = 0.0;
|
double minValue = 360.0, maxValue = 0.0;
|
||||||
const double epsilon = 1.0e-3;
|
const double epsilon = 1.0e-3;
|
||||||
const double angleIncrement = 90.0;
|
const double angleIncrement = 90.0;
|
||||||
std::vector<std::string> resultNames = { "Azimuth", "Inclination" };
|
std::vector<QString> resultNames = RiaDefines::wellPathAngleResultNames();
|
||||||
|
|
||||||
for (std::string& resultName : resultNames)
|
for (const QString& resultName : resultNames)
|
||||||
{
|
{
|
||||||
RigFemResultAddress resAddr(RIG_WELLPATH_DERIVED, resultName, "");
|
RigFemResultAddress resAddr(RIG_WELLPATH_DERIVED, resultName.toStdString(), "");
|
||||||
RimWellLogExtractionCurve* curve = RicWellLogTools::addExtractionCurve(wellPathAnglesTrack, geoMechView, wellPath, nullptr, 0, false, false);
|
RimWellLogExtractionCurve* curve = RicWellLogTools::addExtractionCurve(wellPathAnglesTrack, geoMechView, wellPath, nullptr, 0, false, false);
|
||||||
curve->setGeoMechResultAddress(resAddr);
|
curve->setGeoMechResultAddress(resAddr);
|
||||||
curve->setCurrentTimeStep(geoMechView->currentTimeStep());
|
curve->setCurrentTimeStep(geoMechView->currentTimeStep());
|
||||||
curve->setCustomName(QString::fromStdString(resultName));
|
curve->setCustomName(resultName);
|
||||||
curve->loadDataAndUpdate(false);
|
curve->loadDataAndUpdate(false);
|
||||||
|
|
||||||
double actualMinValue = minValue, actualMaxValue = maxValue;
|
double actualMinValue = minValue, actualMaxValue = maxValue;
|
||||||
|
@ -484,13 +484,16 @@ std::map<std::string, std::vector<std::string> > RigFemPartResultsCollection::sc
|
|||||||
}
|
}
|
||||||
else if (resPos == RIG_WELLPATH_DERIVED)
|
else if (resPos == RIG_WELLPATH_DERIVED)
|
||||||
{
|
{
|
||||||
fieldCompNames["Azimuth"];
|
std::vector<QString> angles = RiaDefines::wellPathAngleResultNames();
|
||||||
fieldCompNames["FractureGradient"];
|
for (QString angle : angles)
|
||||||
fieldCompNames["Inclination"];
|
{
|
||||||
fieldCompNames["PP"];
|
fieldCompNames[angle.toStdString()];
|
||||||
fieldCompNames["OBG"];
|
}
|
||||||
fieldCompNames["SH"];
|
std::vector<QString> derivedResults = RiaDefines::wellPathStabilityResultNames();
|
||||||
fieldCompNames["ShearFailureGradient"];
|
for (QString result : derivedResults)
|
||||||
|
{
|
||||||
|
fieldCompNames[result.toStdString()];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,8 +483,8 @@ void RimGeoMechResultDefinition::loadResult()
|
|||||||
{
|
{
|
||||||
if (m_geomCase && m_geomCase->geoMechData())
|
if (m_geomCase && m_geomCase->geoMechData())
|
||||||
{
|
{
|
||||||
if (this->resultAddress().fieldName == "FractureGradient" ||
|
if (this->resultAddress().fieldName == RiaDefines::wellPathFGResultName().toStdString() ||
|
||||||
this->resultAddress().fieldName == "ShearFailureGradient")
|
this->resultAddress().fieldName == RiaDefines::wellPathSFGResultName().toStdString())
|
||||||
{
|
{
|
||||||
RigFemResultAddress stressResAddr(RIG_ELEMENT_NODAL, std::string("ST"), "");
|
RigFemResultAddress stressResAddr(RIG_ELEMENT_NODAL, std::string("ST"), "");
|
||||||
RigFemResultAddress porBarResAddr(RIG_ELEMENT_NODAL, std::string("POR-Bar"), "");
|
RigFemResultAddress porBarResAddr(RIG_ELEMENT_NODAL, std::string("POR-Bar"), "");
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
#include "RigGeoMechWellLogExtractor.h"
|
#include "RigGeoMechWellLogExtractor.h"
|
||||||
|
|
||||||
|
#include "RiaDefines.h"
|
||||||
#include "RigFemTypes.h"
|
#include "RigFemTypes.h"
|
||||||
#include "RigGeoMechBoreHoleStressCalculator.h"
|
#include "RigGeoMechBoreHoleStressCalculator.h"
|
||||||
#include "RigFemPart.h"
|
#include "RigFemPart.h"
|
||||||
@ -60,7 +61,7 @@ void RigGeoMechWellLogExtractor::curveData(const RigFemResultAddress& resAddr, i
|
|||||||
|
|
||||||
if (resAddr.resultPosType == RIG_WELLPATH_DERIVED)
|
if (resAddr.resultPosType == RIG_WELLPATH_DERIVED)
|
||||||
{
|
{
|
||||||
if (resAddr.fieldName == "FractureGradient" || resAddr.fieldName == "ShearFailureGradient")
|
if (resAddr.fieldName == RiaDefines::wellPathFGResultName().toStdString() || resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString())
|
||||||
{
|
{
|
||||||
wellBoreWallCurveData(resAddr, frameIndex, values);
|
wellBoreWallCurveData(resAddr, frameIndex, values);
|
||||||
return;
|
return;
|
||||||
@ -214,7 +215,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
|||||||
const double uniaxialStrengthInBars = 100.0;
|
const double uniaxialStrengthInBars = 100.0;
|
||||||
|
|
||||||
CVF_ASSERT(values);
|
CVF_ASSERT(values);
|
||||||
CVF_ASSERT(resAddr.fieldName == "FractureGradient" || resAddr.fieldName == "ShearFailureGradient");
|
CVF_ASSERT(resAddr.fieldName == RiaDefines::wellPathFGResultName().toStdString() || resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString());
|
||||||
|
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part(0);
|
const RigFemPart* femPart = m_caseData->femParts()->part(0);
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||||
@ -266,13 +267,13 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
|
|||||||
|
|
||||||
RigGeoMechBoreHoleStressCalculator sigmaCalculator(wellPathStressDouble, porePressure, poissonRatio, uniaxialStrengthInBars, 32);
|
RigGeoMechBoreHoleStressCalculator sigmaCalculator(wellPathStressDouble, porePressure, poissonRatio, uniaxialStrengthInBars, 32);
|
||||||
double resultValue = 0.0;
|
double resultValue = 0.0;
|
||||||
if (resAddr.fieldName == "FractureGradient")
|
if (resAddr.fieldName == RiaDefines::wellPathFGResultName().toStdString())
|
||||||
{
|
{
|
||||||
resultValue = sigmaCalculator.solveFractureGradient();
|
resultValue = sigmaCalculator.solveFractureGradient();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CVF_ASSERT(resAddr.fieldName == "ShearFailureGradient");
|
CVF_ASSERT(resAddr.fieldName == RiaDefines::wellPathSFGResultName().toStdString());
|
||||||
resultValue = sigmaCalculator.solveStassiDalia();
|
resultValue = sigmaCalculator.solveStassiDalia();
|
||||||
}
|
}
|
||||||
double effectiveDepth = -m_intersections[intersectionIdx].z() + m_rkbDiff;
|
double effectiveDepth = -m_intersections[intersectionIdx].z() + m_rkbDiff;
|
||||||
|
Loading…
Reference in New Issue
Block a user