mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7158 Fix water depth calculation for WBS plot.
The first intersection between the well path and the GeoMech model is the correct water depth only when well path starts outside the model. Top of the bounding box is used as an estimated water depth when there is no intersection. WBS curves are now disabled for this case.
This commit is contained in:
committed by
Magne Sjaastad
parent
ee29349d5e
commit
d73bd60825
@@ -61,6 +61,8 @@ RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMech
|
||||
{
|
||||
calculateIntersection();
|
||||
|
||||
m_waterDepth = calculateWaterDepth();
|
||||
|
||||
for ( RigWbsParameter parameter : RigWbsParameter::allParameters() )
|
||||
{
|
||||
m_parameterSources[parameter] = parameter.sources().front();
|
||||
@@ -125,6 +127,13 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd
|
||||
return "";
|
||||
}
|
||||
|
||||
if ( !isValid( m_waterDepth ) )
|
||||
{
|
||||
RiaLogging::error( "Well path does not intersect with sea floor. No well bore "
|
||||
"stability curves created." );
|
||||
return "";
|
||||
}
|
||||
|
||||
if ( resAddr.fieldName == RiaDefines::wbsFGResult().toStdString() )
|
||||
{
|
||||
wellBoreWallCurveData( resAddr, frameIndex, values );
|
||||
@@ -1405,7 +1414,6 @@ double RigGeoMechWellLogExtractor::hydroStaticPorePressureAtDepth( double effect
|
||||
double RigGeoMechWellLogExtractor::wbsCurveValuesAtMsl() const
|
||||
{
|
||||
double waterDensityGCM3 = m_userDefinedValues.at( RigWbsParameter::waterDensity() );
|
||||
double waterDepth = std::abs( m_wellPathGeometry->wellPathPoints().front().z() );
|
||||
|
||||
double rkbDiff = m_wellPathGeometry->rkbDiff();
|
||||
if ( rkbDiff == std::numeric_limits<double>::infinity() )
|
||||
@@ -1413,12 +1421,12 @@ double RigGeoMechWellLogExtractor::wbsCurveValuesAtMsl() const
|
||||
rkbDiff = 0.0;
|
||||
}
|
||||
|
||||
if ( waterDepth + rkbDiff < 1.0e-8 )
|
||||
if ( m_waterDepth + rkbDiff < 1.0e-8 )
|
||||
{
|
||||
return waterDensityGCM3;
|
||||
}
|
||||
|
||||
return waterDensityGCM3 * waterDepth / ( waterDepth + rkbDiff );
|
||||
return waterDensityGCM3 * m_waterDepth / ( m_waterDepth + rkbDiff );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1436,3 +1444,45 @@ bool RigGeoMechWellLogExtractor::isValid( float value )
|
||||
{
|
||||
return value != std::numeric_limits<float>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigGeoMechWellLogExtractor::calculateWaterDepth() const
|
||||
{
|
||||
// Need a well path with intersections to generate a precise water depth
|
||||
if ( m_intersectionTVDs.empty() || m_wellPathGeometry->wellPathPoints().empty() )
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
// Only calculate water depth if the well path starts outside the model.
|
||||
cvf::BoundingBox boundingBox = m_caseData->femParts()->boundingBox();
|
||||
if ( boundingBox.contains( m_wellPathGeometry->wellPathPoints().front() ) )
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
// Water depth is always the first intersection with model for geo mech models.
|
||||
double waterDepth = m_intersectionTVDs.front();
|
||||
return waterDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigGeoMechWellLogExtractor::estimateWaterDepth() const
|
||||
{
|
||||
// Estimate water depth using bounding box. This will be imprecise
|
||||
// for models with a slanting top layer.
|
||||
cvf::BoundingBox boundingBox = m_caseData->femParts()->boundingBox();
|
||||
return std::abs( boundingBox.max().z() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigGeoMechWellLogExtractor::waterDepth() const
|
||||
{
|
||||
return m_waterDepth;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
public:
|
||||
RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName );
|
||||
const std::string& wellCaseErrorMsgName );
|
||||
|
||||
void performCurveDataSmoothing( int frameIndex,
|
||||
std::vector<double>* mds,
|
||||
@@ -87,6 +87,9 @@ public:
|
||||
static double hydroStaticPorePressureAtDepth( double effectiveDepthMeters,
|
||||
double waterDensityGCM3 = PURE_WATER_DENSITY_GCM3 );
|
||||
|
||||
double waterDepth() const;
|
||||
double estimateWaterDepth() const;
|
||||
|
||||
private:
|
||||
enum WellPathTangentCalculation
|
||||
{
|
||||
@@ -167,6 +170,8 @@ private:
|
||||
static bool isValid( double value );
|
||||
static bool isValid( float value );
|
||||
|
||||
double calculateWaterDepth() const;
|
||||
|
||||
private:
|
||||
cvf::ref<RigGeoMechCaseData> m_caseData;
|
||||
|
||||
@@ -174,4 +179,6 @@ private:
|
||||
std::map<RigWbsParameter, QString> m_lasFileInputUnits;
|
||||
std::map<RigWbsParameter, WbsParameterSource> m_parameterSources;
|
||||
std::map<RigWbsParameter, double> m_userDefinedValues;
|
||||
|
||||
double m_waterDepth;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user