Fault Reactivation Grid Update (#10866)

* Fix gridding error
* Add part name to element set filter
* Use sea bottom from geomech case model, if selected
This commit is contained in:
jonjenssen 2023-11-23 19:01:42 +01:00 committed by GitHub
parent e98f399574
commit 039aee8d53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 14 deletions

View File

@ -161,13 +161,11 @@ void RimCellIndexFilter::updateCells()
auto part = parts->part( m_gridIndex() );
auto setNames = part->elementSetNames();
m_name = QString::fromStdString( part->name() );
if ( m_setId() < (int)setNames.size() )
{
m_name = QString::fromStdString( part->elementSetNames()[m_setId] );
}
else
{
m_name = QString::fromStdString( part->name() );
m_name = m_name + " : " + QString::fromStdString( part->elementSetNames()[m_setId] );
}
auto cells = part->elementSet( m_setId() );

View File

@ -423,6 +423,16 @@ void RimFaultReactivationModel::defineUiOrdering( QString uiConfigName, caf::Pdm
sizeModelGrp->add( &m_modelMinZ );
sizeModelGrp->add( &m_modelBelowSize );
if ( m_geomechCase() != nullptr )
{
m_modelMinZ.setValue( std::abs( m_geomechCase->allCellsBoundingBox().max().z() ) );
m_modelMinZ.uiCapability()->setUiReadOnly( true );
}
else
{
m_modelMinZ.uiCapability()->setUiReadOnly( false );
}
auto faultGrp = modelGrp->addNewGroup( "Fault" );
faultGrp->add( &m_faultExtendUpwards );
faultGrp->add( &m_faultExtendDownwards );
@ -473,6 +483,14 @@ void RimFaultReactivationModel::fieldChangedByUi( const caf::PdmFieldHandle* cha
}
else
{
if ( changedField == &m_geomechCase )
{
if ( m_geomechCase() != nullptr )
{
m_modelMinZ.setValue( std::abs( m_geomechCase()->allCellsBoundingBox().max().z() ) );
}
}
updateVisualization();
}
}

View File

@ -29,8 +29,10 @@
#include "cvfTextureImage.h"
#include "cvfVector3.h"
#include <array>
#include <map>
#include <memory>
#include <utility>
#include <vector>
class RigGriddedPart3d;

View File

@ -396,13 +396,13 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t
cvf::Vec3d bottom_point = m_bottomReservoirFront;
if ( front_bottom < back_bottom )
if ( front_bottom > back_bottom )
{
bottom_point = extrapolatePoint( zPositionsBack.begin()->second, ( ++zPositionsBack.begin() )->second, m_bufferBelowFault );
bottom_point = extrapolatePoint( ( ++zPositionsBack.begin() )->second, zPositionsBack.begin()->second, m_bufferBelowFault );
}
else if ( back_bottom < front_bottom )
else if ( front_bottom < back_bottom )
{
bottom_point = extrapolatePoint( zPositionsFront.begin()->second, ( ++zPositionsFront.begin() )->second, m_bufferBelowFault );
bottom_point = extrapolatePoint( ( ++zPositionsFront.begin() )->second, zPositionsFront.begin()->second, m_bufferBelowFault );
}
m_bottomFault = bottom_point;
@ -415,13 +415,13 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t
m_topReservoirBack = zPositionsBack.rbegin()->second;
cvf::Vec3d top_point = m_topReservoirFront;
if ( front_top < back_top )
if ( front_top > back_top )
{
top_point = extrapolatePoint( zPositionsFront.rbegin()->second, ( ++zPositionsFront.rbegin() )->second, m_bufferAboveFault );
top_point = extrapolatePoint( ( ++zPositionsFront.rbegin() )->second, zPositionsFront.rbegin()->second, m_bufferAboveFault );
}
else if ( back_top < front_top )
else if ( front_top < back_top )
{
top_point = extrapolatePoint( zPositionsBack.rbegin()->second, ( ++zPositionsBack.rbegin() )->second, m_bufferAboveFault );
top_point = extrapolatePoint( ( ++zPositionsBack.rbegin() )->second, zPositionsBack.rbegin()->second, m_bufferAboveFault );
}
m_topFault = top_point;
@ -489,7 +489,7 @@ std::map<double, cvf::Vec3d> RigFaultReactivationModelGenerator::elementLayers(
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RigFaultReactivationModelGenerator::extrapolatePoint( cvf::Vec3d startPoint, cvf::Vec3d endPoint, double buffer )
{
cvf::Vec3d direction = startPoint - endPoint;
cvf::Vec3d direction = endPoint - startPoint;
direction.normalize();
return endPoint + ( buffer * direction );

View File

@ -24,6 +24,7 @@
#include "cvfVector3.h"
#include <array>
#include <utility>
#include <vector>
#include <QString>

View File

@ -24,6 +24,7 @@
#include "cvfObject.h"
#include "cvfVector3.h"
#include <array>
#include <map>
#include <vector>