mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
Extend reservoir element set to active cells in under/overburden
Fix fault extension if both sides start or end at same depth
This commit is contained in:
1 parent
ad34bbf125
commit
2864ac7466
6 files changed
+82
-3
No files matched your search
@@ -342,6 +342,7 @@ void RimFaultReactivationModel::updateVisualization()
|
|||||||
m_2Dmodel->setPartColors( m_modelPart1Color, m_modelPart2Color );
|
m_2Dmodel->setPartColors( m_modelPart1Color, m_modelPart2Color );
|
||||||
m_2Dmodel->setGenerator( generator );
|
m_2Dmodel->setGenerator( generator );
|
||||||
m_2Dmodel->updateGeometry( m_startCellIndex, (cvf::StructGridInterface::FaceType)m_startCellFace() );
|
m_2Dmodel->updateGeometry( m_startCellIndex, (cvf::StructGridInterface::FaceType)m_startCellFace() );
|
||||||
|
m_2Dmodel->postProcessElementSets( eclipseCase() );
|
||||||
|
|
||||||
view->scheduleCreateDisplayModelAndRedraw();
|
view->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,13 @@
|
|||||||
|
|
||||||
#include "RigFaultReactivationModel.h"
|
#include "RigFaultReactivationModel.h"
|
||||||
|
|
||||||
|
#include "RigActiveCellInfo.h"
|
||||||
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigFaultReactivationModelGenerator.h"
|
#include "RigFaultReactivationModelGenerator.h"
|
||||||
#include "RigGriddedPart3d.h"
|
#include "RigGriddedPart3d.h"
|
||||||
|
|
||||||
|
#include "RimEclipseCase.h"
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -245,3 +249,18 @@ RimFaultReactivation::GridPart RigFaultReactivationModel::normalPointsAt() const
|
|||||||
{
|
{
|
||||||
return m_normalPointsAt;
|
return m_normalPointsAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigFaultReactivationModel::postProcessElementSets( const RimEclipseCase* eCase )
|
||||||
|
{
|
||||||
|
if ( eCase->eclipseCaseData() == nullptr ) return;
|
||||||
|
|
||||||
|
auto cellInfo = eCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||||
|
|
||||||
|
for ( auto part : allGridParts() )
|
||||||
|
{
|
||||||
|
m_3dparts[part]->postProcessElementSets( eCase->mainGrid(), cellInfo );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class RigGriddedPart3d;
|
class RigGriddedPart3d;
|
||||||
class RigMainGrid;
|
|
||||||
class RigFaultReactivationModelGenerator;
|
class RigFaultReactivationModelGenerator;
|
||||||
|
class RimEclipseCase;
|
||||||
|
|
||||||
class RigFRModelPart
|
class RigFRModelPart
|
||||||
{
|
{
|
||||||
@@ -86,6 +86,8 @@ public:
|
|||||||
|
|
||||||
RimFaultReactivation::GridPart normalPointsAt() const;
|
RimFaultReactivation::GridPart normalPointsAt() const;
|
||||||
|
|
||||||
|
void postProcessElementSets( const RimEclipseCase* eCase );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<RigFaultReactivationModelGenerator> m_generator;
|
std::shared_ptr<RigFaultReactivationModelGenerator> m_generator;
|
||||||
|
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t sta
|
|||||||
{
|
{
|
||||||
bottom_point = extrapolatePoint( ( ++layersBack.begin() )->second, layersBack.begin()->second, m_bufferBelowFault );
|
bottom_point = extrapolatePoint( ( ++layersBack.begin() )->second, layersBack.begin()->second, m_bufferBelowFault );
|
||||||
}
|
}
|
||||||
else if ( front_bottom < back_bottom )
|
else if ( m_bufferBelowFault > 0.0 )
|
||||||
{
|
{
|
||||||
bottom_point = extrapolatePoint( ( ++layersFront.begin() )->second, layersFront.begin()->second, m_bufferBelowFault );
|
bottom_point = extrapolatePoint( ( ++layersFront.begin() )->second, layersFront.begin()->second, m_bufferBelowFault );
|
||||||
}
|
}
|
||||||
@@ -578,7 +578,7 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t sta
|
|||||||
{
|
{
|
||||||
top_point = extrapolatePoint( ( ++layersFront.rbegin() )->second, layersFront.rbegin()->second, m_bufferAboveFault );
|
top_point = extrapolatePoint( ( ++layersFront.rbegin() )->second, layersFront.rbegin()->second, m_bufferAboveFault );
|
||||||
}
|
}
|
||||||
else if ( front_top < back_top )
|
else if ( m_bufferAboveFault > 0.0 )
|
||||||
{
|
{
|
||||||
top_point = extrapolatePoint( ( ++layersBack.rbegin() )->second, layersBack.rbegin()->second, m_bufferAboveFault );
|
top_point = extrapolatePoint( ( ++layersBack.rbegin() )->second, layersBack.rbegin()->second, m_bufferAboveFault );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "RigGriddedPart3d.h"
|
#include "RigGriddedPart3d.h"
|
||||||
|
|
||||||
|
#include "RigActiveCellInfo.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
|
|
||||||
#include "RimFaultReactivationDataAccess.h"
|
#include "RimFaultReactivationDataAccess.h"
|
||||||
@@ -727,3 +728,54 @@ void RigGriddedPart3d::generateLocalNodes( const cvf::Mat4d transform )
|
|||||||
m_localNodes.push_back( tn.getTransformedPoint( flipY ) );
|
m_localNodes.push_back( tn.getTransformedPoint( flipY ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
/// Make sure any active cells outside the flat reservoir zone is added to the reservoir element set
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigGriddedPart3d::postProcessElementSets( const RigMainGrid* mainGrid, const RigActiveCellInfo* cellInfo )
|
||||||
|
{
|
||||||
|
std::map<ElementSets, std::vector<unsigned int>> newElementSets;
|
||||||
|
|
||||||
|
for ( auto elSet : { ElementSets::OverBurden, ElementSets::UnderBurden, ElementSets::IntraReservoir } )
|
||||||
|
{
|
||||||
|
newElementSets[elSet] = {};
|
||||||
|
|
||||||
|
for ( auto element : m_elementSets[elSet] )
|
||||||
|
{
|
||||||
|
auto corners = elementCorners( element );
|
||||||
|
int nFound = 0;
|
||||||
|
|
||||||
|
size_t cellIdx = 0;
|
||||||
|
for ( const auto& p : corners )
|
||||||
|
{
|
||||||
|
cellIdx = mainGrid->findReservoirCellIndexFromPoint( p );
|
||||||
|
|
||||||
|
if ( cellIdx != cvf::UNDEFINED_SIZE_T )
|
||||||
|
{
|
||||||
|
if ( cellInfo->isActive( cellIdx ) )
|
||||||
|
{
|
||||||
|
nFound++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( nFound > 0 )
|
||||||
|
{
|
||||||
|
m_elementSets[ElementSets::Reservoir].push_back( element );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newElementSets[elSet].push_back( element );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( auto elSet : { ElementSets::OverBurden, ElementSets::UnderBurden, ElementSets::IntraReservoir } )
|
||||||
|
{
|
||||||
|
m_elementSets[elSet].clear();
|
||||||
|
for ( auto element : newElementSets[elSet] )
|
||||||
|
{
|
||||||
|
m_elementSets[elSet].push_back( element );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,9 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
class RigMainGrid;
|
||||||
|
class RigActiveCellInfo;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
@@ -57,6 +60,8 @@ public:
|
|||||||
void generateLocalNodes( const cvf::Mat4d transform );
|
void generateLocalNodes( const cvf::Mat4d transform );
|
||||||
void setUseLocalCoordinates( bool useLocalCoordinates );
|
void setUseLocalCoordinates( bool useLocalCoordinates );
|
||||||
|
|
||||||
|
void postProcessElementSets( const RigMainGrid* mainGrid, const RigActiveCellInfo* cellInfo );
|
||||||
|
|
||||||
bool useLocalCoordinates() const;
|
bool useLocalCoordinates() const;
|
||||||
double topHeight() const;
|
double topHeight() const;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user