mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7026 Ellipse Fracture Template : Add well/template intersection depth
This commit is contained in:
parent
3affa41830
commit
18f9007a06
@ -114,19 +114,25 @@ void RimEllipseFractureTemplate::fractureTriangleGeometry( std::vector<cvf::Vec3
|
||||
float b = m_height / 2.0f * m_heightScaleFactor;
|
||||
|
||||
tesselator.tesselateEllipsis( a, b, triangleIndices, nodeCoords );
|
||||
|
||||
for ( cvf::Vec3f& v : *nodeCoords )
|
||||
{
|
||||
// Y is depth in fracture coordinate system
|
||||
v.y() += wellPathDepthAtFracture;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon() const
|
||||
std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon( double wellPathDepthAtFracture ) const
|
||||
{
|
||||
std::vector<cvf::Vec3f> polygon;
|
||||
|
||||
std::vector<cvf::Vec3f> nodeCoords;
|
||||
std::vector<cvf::uint> triangleIndices;
|
||||
|
||||
fractureTriangleGeometry( &nodeCoords, &triangleIndices, -1.0 );
|
||||
fractureTriangleGeometry( &nodeCoords, &triangleIndices, wellPathDepthAtFracture );
|
||||
|
||||
for ( size_t i = 1; i < nodeCoords.size(); i++ )
|
||||
{
|
||||
@ -179,8 +185,8 @@ cvf::cref<RigFractureGrid> RimEllipseFractureTemplate::createFractureGrid( doubl
|
||||
{
|
||||
double X1 = -halfLength + i * cellSizeX;
|
||||
double X2 = -halfLength + ( i + 1 ) * cellSizeX;
|
||||
double Y1 = -height / 2 + j * cellSizeZ;
|
||||
double Y2 = -height / 2 + ( j + 1 ) * cellSizeZ;
|
||||
double Y1 = -height / 2 + j * cellSizeZ + wellPathDepthAtFracture;
|
||||
double Y2 = -height / 2 + ( j + 1 ) * cellSizeZ + wellPathDepthAtFracture;
|
||||
|
||||
std::vector<cvf::Vec3d> cellPolygon;
|
||||
cellPolygon.push_back( cvf::Vec3d( X1, Y1, 0.0 ) );
|
||||
@ -190,7 +196,7 @@ cvf::cref<RigFractureGrid> RimEllipseFractureTemplate::createFractureGrid( doubl
|
||||
|
||||
double cond = conductivity();
|
||||
|
||||
std::vector<cvf::Vec3f> ellipseFracPolygon = fractureBorderPolygon();
|
||||
std::vector<cvf::Vec3f> ellipseFracPolygon = fractureBorderPolygon( wellPathDepthAtFracture );
|
||||
std::vector<cvf::Vec3d> ellipseFracPolygonDouble;
|
||||
for ( const auto& v : ellipseFracPolygon )
|
||||
ellipseFracPolygonDouble.push_back( static_cast<cvf::Vec3d>( v ) );
|
||||
@ -471,3 +477,12 @@ void RimEllipseFractureTemplate::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
|
||||
RimFractureTemplate::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<double, double> RimEllipseFractureTemplate::wellPathDepthAtFractureRange() const
|
||||
{
|
||||
double scaledHalfHeight = height() * m_heightScaleFactor / 2.0;
|
||||
return std::make_pair( -scaledHalfHeight, scaledHalfHeight );
|
||||
}
|
||||
|
@ -49,6 +49,8 @@ public:
|
||||
std::vector<cvf::uint>* polygonIndices,
|
||||
double wellPathDepthAtFracture ) const override;
|
||||
|
||||
std::pair<double, double> wellPathDepthAtFractureRange() const override;
|
||||
|
||||
void changeUnits();
|
||||
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
||||
void setDefaultValuesFromUnit();
|
||||
@ -74,10 +76,8 @@ private:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
void onLoadDataAndUpdateGeometryHasChanged() override;
|
||||
|
||||
void createFractureGridAndAssignConductivities();
|
||||
std::vector<cvf::Vec3f> fractureBorderPolygon() const;
|
||||
void onLoadDataAndUpdateGeometryHasChanged() override;
|
||||
std::vector<cvf::Vec3f> fractureBorderPolygon( double wellPathDepthAtFracture ) const;
|
||||
|
||||
WellFractureIntersectionData wellFractureIntersectionData( const RimFracture* fractureInstance ) const override;
|
||||
|
||||
|
@ -737,13 +737,10 @@ void RimFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& ui
|
||||
m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden( false );
|
||||
|
||||
m_stimPlanTimeIndexToPlot.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
m_wellPathDepthAtFracture.uiCapability()->setUiHidden( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden( true );
|
||||
m_wellPathDepthAtFracture.uiCapability()->setUiHidden( true );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -784,11 +781,9 @@ void RimFracture::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
RimStimPlanFractureTemplate* stimPlanFracTemplate =
|
||||
dynamic_cast<RimStimPlanFractureTemplate*>( fractureTemplate() );
|
||||
if ( stimPlanFracTemplate )
|
||||
if ( fractureTemplate() )
|
||||
{
|
||||
auto [minimum, maximum] = stimPlanFracTemplate->wellPathDepthAtFractureRange();
|
||||
auto [minimum, maximum] = fractureTemplate()->wellPathDepthAtFractureRange();
|
||||
myAttr->m_minimum = minimum;
|
||||
myAttr->m_maximum = maximum;
|
||||
}
|
||||
@ -865,6 +860,10 @@ void RimFracture::setFractureTemplate( RimFractureTemplate* fractureTemplate )
|
||||
m_stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex();
|
||||
m_wellPathDepthAtFracture = stimPlanFracTemplate->wellPathDepthAtFracture();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_wellPathDepthAtFracture = 0.0;
|
||||
}
|
||||
|
||||
if ( fractureTemplate->orientationType() == RimFractureTemplate::AZIMUTH )
|
||||
{
|
||||
|
@ -136,6 +136,8 @@ public:
|
||||
FracConductivityEnum conductivityType() const;
|
||||
double perforationLength() const;
|
||||
|
||||
virtual std::pair<double, double> wellPathDepthAtFractureRange() const = 0;
|
||||
|
||||
virtual void fractureTriangleGeometry( std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices,
|
||||
double wellPathDepthAtFracture ) const = 0;
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
|
||||
double wellPathDepthAtFracture() const;
|
||||
std::pair<double, double> wellPathDepthAtFractureRange() const;
|
||||
std::pair<double, double> wellPathDepthAtFractureRange() const override;
|
||||
|
||||
// Fracture geometry
|
||||
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user