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;
|
float b = m_height / 2.0f * m_heightScaleFactor;
|
||||||
|
|
||||||
tesselator.tesselateEllipsis( a, b, triangleIndices, nodeCoords );
|
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> polygon;
|
||||||
|
|
||||||
std::vector<cvf::Vec3f> nodeCoords;
|
std::vector<cvf::Vec3f> nodeCoords;
|
||||||
std::vector<cvf::uint> triangleIndices;
|
std::vector<cvf::uint> triangleIndices;
|
||||||
|
|
||||||
fractureTriangleGeometry( &nodeCoords, &triangleIndices, -1.0 );
|
fractureTriangleGeometry( &nodeCoords, &triangleIndices, wellPathDepthAtFracture );
|
||||||
|
|
||||||
for ( size_t i = 1; i < nodeCoords.size(); i++ )
|
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 X1 = -halfLength + i * cellSizeX;
|
||||||
double X2 = -halfLength + ( i + 1 ) * cellSizeX;
|
double X2 = -halfLength + ( i + 1 ) * cellSizeX;
|
||||||
double Y1 = -height / 2 + j * cellSizeZ;
|
double Y1 = -height / 2 + j * cellSizeZ + wellPathDepthAtFracture;
|
||||||
double Y2 = -height / 2 + ( j + 1 ) * cellSizeZ;
|
double Y2 = -height / 2 + ( j + 1 ) * cellSizeZ + wellPathDepthAtFracture;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> cellPolygon;
|
std::vector<cvf::Vec3d> cellPolygon;
|
||||||
cellPolygon.push_back( cvf::Vec3d( X1, Y1, 0.0 ) );
|
cellPolygon.push_back( cvf::Vec3d( X1, Y1, 0.0 ) );
|
||||||
@ -190,7 +196,7 @@ cvf::cref<RigFractureGrid> RimEllipseFractureTemplate::createFractureGrid( doubl
|
|||||||
|
|
||||||
double cond = conductivity();
|
double cond = conductivity();
|
||||||
|
|
||||||
std::vector<cvf::Vec3f> ellipseFracPolygon = fractureBorderPolygon();
|
std::vector<cvf::Vec3f> ellipseFracPolygon = fractureBorderPolygon( wellPathDepthAtFracture );
|
||||||
std::vector<cvf::Vec3d> ellipseFracPolygonDouble;
|
std::vector<cvf::Vec3d> ellipseFracPolygonDouble;
|
||||||
for ( const auto& v : ellipseFracPolygon )
|
for ( const auto& v : ellipseFracPolygon )
|
||||||
ellipseFracPolygonDouble.push_back( static_cast<cvf::Vec3d>( v ) );
|
ellipseFracPolygonDouble.push_back( static_cast<cvf::Vec3d>( v ) );
|
||||||
@ -471,3 +477,12 @@ void RimEllipseFractureTemplate::defineUiOrdering( QString uiConfigName, caf::Pd
|
|||||||
|
|
||||||
RimFractureTemplate::defineUiOrdering( uiConfigName, uiOrdering );
|
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,
|
std::vector<cvf::uint>* polygonIndices,
|
||||||
double wellPathDepthAtFracture ) const override;
|
double wellPathDepthAtFracture ) const override;
|
||||||
|
|
||||||
|
std::pair<double, double> wellPathDepthAtFractureRange() const override;
|
||||||
|
|
||||||
void changeUnits();
|
void changeUnits();
|
||||||
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
||||||
void setDefaultValuesFromUnit();
|
void setDefaultValuesFromUnit();
|
||||||
@ -74,10 +76,8 @@ private:
|
|||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly ) override;
|
bool* useOptionsOnly ) override;
|
||||||
|
|
||||||
void onLoadDataAndUpdateGeometryHasChanged() override;
|
void onLoadDataAndUpdateGeometryHasChanged() override;
|
||||||
|
std::vector<cvf::Vec3f> fractureBorderPolygon( double wellPathDepthAtFracture ) const;
|
||||||
void createFractureGridAndAssignConductivities();
|
|
||||||
std::vector<cvf::Vec3f> fractureBorderPolygon() const;
|
|
||||||
|
|
||||||
WellFractureIntersectionData wellFractureIntersectionData( const RimFracture* fractureInstance ) const override;
|
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()->setUiHidden( false );
|
||||||
|
|
||||||
m_stimPlanTimeIndexToPlot.uiCapability()->setUiReadOnly( true );
|
m_stimPlanTimeIndexToPlot.uiCapability()->setUiReadOnly( true );
|
||||||
|
|
||||||
m_wellPathDepthAtFracture.uiCapability()->setUiHidden( false );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden( true );
|
m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden( true );
|
||||||
m_wellPathDepthAtFracture.uiCapability()->setUiHidden( true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -784,11 +781,9 @@ void RimFracture::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|||||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
{
|
{
|
||||||
RimStimPlanFractureTemplate* stimPlanFracTemplate =
|
if ( fractureTemplate() )
|
||||||
dynamic_cast<RimStimPlanFractureTemplate*>( fractureTemplate() );
|
|
||||||
if ( stimPlanFracTemplate )
|
|
||||||
{
|
{
|
||||||
auto [minimum, maximum] = stimPlanFracTemplate->wellPathDepthAtFractureRange();
|
auto [minimum, maximum] = fractureTemplate()->wellPathDepthAtFractureRange();
|
||||||
myAttr->m_minimum = minimum;
|
myAttr->m_minimum = minimum;
|
||||||
myAttr->m_maximum = maximum;
|
myAttr->m_maximum = maximum;
|
||||||
}
|
}
|
||||||
@ -865,6 +860,10 @@ void RimFracture::setFractureTemplate( RimFractureTemplate* fractureTemplate )
|
|||||||
m_stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex();
|
m_stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex();
|
||||||
m_wellPathDepthAtFracture = stimPlanFracTemplate->wellPathDepthAtFracture();
|
m_wellPathDepthAtFracture = stimPlanFracTemplate->wellPathDepthAtFracture();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_wellPathDepthAtFracture = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( fractureTemplate->orientationType() == RimFractureTemplate::AZIMUTH )
|
if ( fractureTemplate->orientationType() == RimFractureTemplate::AZIMUTH )
|
||||||
{
|
{
|
||||||
|
@ -136,6 +136,8 @@ public:
|
|||||||
FracConductivityEnum conductivityType() const;
|
FracConductivityEnum conductivityType() const;
|
||||||
double perforationLength() const;
|
double perforationLength() const;
|
||||||
|
|
||||||
|
virtual std::pair<double, double> wellPathDepthAtFractureRange() const = 0;
|
||||||
|
|
||||||
virtual void fractureTriangleGeometry( std::vector<cvf::Vec3f>* nodeCoords,
|
virtual void fractureTriangleGeometry( std::vector<cvf::Vec3f>* nodeCoords,
|
||||||
std::vector<cvf::uint>* triangleIndices,
|
std::vector<cvf::uint>* triangleIndices,
|
||||||
double wellPathDepthAtFracture ) const = 0;
|
double wellPathDepthAtFracture ) const = 0;
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||||
|
|
||||||
double wellPathDepthAtFracture() const;
|
double wellPathDepthAtFracture() const;
|
||||||
std::pair<double, double> wellPathDepthAtFractureRange() const;
|
std::pair<double, double> wellPathDepthAtFractureRange() const override;
|
||||||
|
|
||||||
// Fracture geometry
|
// Fracture geometry
|
||||||
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
||||||
|
Loading…
Reference in New Issue
Block a user