mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update grid part naming (#10879)
* Rename parts * Make sure well extraction goes along model, not fault * Match part naming with parts
This commit is contained in:
parent
da6757e9fa
commit
52259a69f3
@ -50,16 +50,16 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::exportToStream(
|
|||||||
|
|
||||||
// The two parts are "mirrored", so face number 4 of the two parts should face eachother.
|
// The two parts are "mirrored", so face number 4 of the two parts should face eachother.
|
||||||
using FaultGridPart = RimFaultReactivation::GridPart;
|
using FaultGridPart = RimFaultReactivation::GridPart;
|
||||||
std::map<std::pair<FaultGridPart, PartBorderSurface>, int> faces = { { { FaultGridPart::PART1, PartBorderSurface::FaultSurface }, 4 },
|
std::map<std::pair<FaultGridPart, PartBorderSurface>, int> faces = { { { FaultGridPart::FW, PartBorderSurface::FaultSurface }, 4 },
|
||||||
{ { FaultGridPart::PART1, PartBorderSurface::UpperSurface }, 4 },
|
{ { FaultGridPart::FW, PartBorderSurface::UpperSurface }, 4 },
|
||||||
{ { FaultGridPart::PART1, PartBorderSurface::LowerSurface }, 4 },
|
{ { FaultGridPart::FW, PartBorderSurface::LowerSurface }, 4 },
|
||||||
{ { FaultGridPart::PART2, PartBorderSurface::FaultSurface }, 4 },
|
{ { FaultGridPart::HW, PartBorderSurface::FaultSurface }, 4 },
|
||||||
{ { FaultGridPart::PART2, PartBorderSurface::UpperSurface }, 4 },
|
{ { FaultGridPart::HW, PartBorderSurface::UpperSurface }, 4 },
|
||||||
{ { FaultGridPart::PART2, PartBorderSurface::LowerSurface }, 4 } };
|
{ { FaultGridPart::HW, PartBorderSurface::LowerSurface }, 4 } };
|
||||||
|
|
||||||
std::map<FaultGridPart, std::string> partNames = {
|
std::map<FaultGridPart, std::string> partNames = {
|
||||||
{ FaultGridPart::PART1, "LEFT_PART" },
|
{ FaultGridPart::FW, "FW" },
|
||||||
{ FaultGridPart::PART2, "RIGHT_PART" },
|
{ FaultGridPart::HW, "HW" },
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<RimFaultReactivation::Boundary, std::string> boundaries = {
|
std::map<RimFaultReactivation::Boundary, std::string> boundaries = {
|
||||||
@ -750,8 +750,8 @@ std::pair<bool, std::string>
|
|||||||
RifInpExportTools::printHeading( stream,
|
RifInpExportTools::printHeading( stream,
|
||||||
"Contact Pair, interaction=" + interactionName + ", small sliding, type=SURFACE TO SURFACE" + extra );
|
"Contact Pair, interaction=" + interactionName + ", small sliding, type=SURFACE TO SURFACE" + extra );
|
||||||
|
|
||||||
std::string part1Name = partNames.find( RimFaultReactivation::GridPart::PART1 )->second;
|
std::string part1Name = partNames.find( RimFaultReactivation::GridPart::FW )->second;
|
||||||
std::string part2Name = partNames.find( RimFaultReactivation::GridPart::PART2 )->second;
|
std::string part2Name = partNames.find( RimFaultReactivation::GridPart::HW )->second;
|
||||||
RifInpExportTools::printLine( stream, part1Name + "." + borderName + ", " + part2Name + "." + borderName );
|
RifInpExportTools::printLine( stream, part1Name + "." + borderName + ", " + part2Name + "." + borderName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ namespace RimFaultReactivation
|
|||||||
|
|
||||||
enum class GridPart
|
enum class GridPart
|
||||||
{
|
{
|
||||||
PART1,
|
FW, // footwall
|
||||||
PART2
|
HW // hanging wall
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class BorderSurface
|
enum class BorderSurface
|
||||||
|
@ -670,9 +670,10 @@ bool RimFaultReactivationModel::exportModelSettings()
|
|||||||
auto [topPosition, bottomPosition] = m_2Dmodel->faultTopBottom();
|
auto [topPosition, bottomPosition] = m_2Dmodel->faultTopBottom();
|
||||||
auto faultNormal = m_2Dmodel->faultNormal();
|
auto faultNormal = m_2Dmodel->faultNormal();
|
||||||
|
|
||||||
// make sure we move horizontally
|
// make sure we move horizontally, and along the 2D model
|
||||||
faultNormal.z() = 0.0;
|
faultNormal.z() = 0.0;
|
||||||
faultNormal.normalize();
|
faultNormal.normalize();
|
||||||
|
faultNormal = faultNormal ^ cvf::Vec3d::Z_AXIS;
|
||||||
|
|
||||||
RimFaultReactivationTools::addSettingsToMap( settings, faultNormal, topPosition, bottomPosition );
|
RimFaultReactivationTools::addSettingsToMap( settings, faultNormal, topPosition, bottomPosition );
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ RigFaultReactivationModel::RigFaultReactivationModel()
|
|||||||
|
|
||||||
for ( auto part : allGridParts() )
|
for ( auto part : allGridParts() )
|
||||||
{
|
{
|
||||||
m_3dparts[part] = std::make_shared<RigGriddedPart3d>();
|
m_3dparts[part] = new RigGriddedPart3d();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +58,11 @@ RigFaultReactivationModel::RigFaultReactivationModel()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigFaultReactivationModel::~RigFaultReactivationModel()
|
RigFaultReactivationModel::~RigFaultReactivationModel()
|
||||||
{
|
{
|
||||||
|
for ( auto part : allGridParts() )
|
||||||
|
{
|
||||||
|
if ( m_3dparts[part] != nullptr ) delete m_3dparts[part];
|
||||||
|
m_3dparts[part] = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -65,7 +70,7 @@ RigFaultReactivationModel::~RigFaultReactivationModel()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RimFaultReactivation::GridPart> RigFaultReactivationModel::allGridParts() const
|
std::vector<RimFaultReactivation::GridPart> RigFaultReactivationModel::allGridParts() const
|
||||||
{
|
{
|
||||||
return { GridPart::PART1, GridPart::PART2 };
|
return { GridPart::FW, GridPart::HW };
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -139,7 +144,17 @@ std::pair<cvf::Vec3d, cvf::Vec3d> RigFaultReactivationModel::modelLocalNormalsXY
|
|||||||
void RigFaultReactivationModel::updateGeometry( size_t startCell, cvf::StructGridInterface::FaceType startFace )
|
void RigFaultReactivationModel::updateGeometry( size_t startCell, cvf::StructGridInterface::FaceType startFace )
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
m_generator->generateGeometry( startCell, startFace, m_3dparts[GridPart::PART1].get(), m_3dparts[GridPart::PART2].get() );
|
|
||||||
|
auto frontPart = m_3dparts[GridPart::FW];
|
||||||
|
auto backPart = m_3dparts[GridPart::HW];
|
||||||
|
|
||||||
|
m_generator->generateGeometry( startCell, startFace, frontPart, backPart );
|
||||||
|
|
||||||
|
if ( backPart->topHeight() > frontPart->topHeight() )
|
||||||
|
{
|
||||||
|
m_3dparts[GridPart::HW] = frontPart;
|
||||||
|
m_3dparts[GridPart::FW] = backPart;
|
||||||
|
}
|
||||||
|
|
||||||
auto& frontPoints = m_generator->frontPoints();
|
auto& frontPoints = m_generator->frontPoints();
|
||||||
auto& backPoints = m_generator->backPoints();
|
auto& backPoints = m_generator->backPoints();
|
||||||
@ -191,7 +206,7 @@ const std::vector<std::vector<cvf::Vec3d>>& RigFaultReactivationModel::meshLines
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::shared_ptr<RigGriddedPart3d> RigFaultReactivationModel::grid( RimFaultReactivation::GridPart part ) const
|
const RigGriddedPart3d* RigFaultReactivationModel::grid( RimFaultReactivation::GridPart part ) const
|
||||||
{
|
{
|
||||||
return m_3dparts.at( part );
|
return m_3dparts.at( part );
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
|
|
||||||
const std::vector<std::vector<cvf::Vec3d>>& meshLines( GridPart part ) const;
|
const std::vector<std::vector<cvf::Vec3d>>& meshLines( GridPart part ) const;
|
||||||
|
|
||||||
std::shared_ptr<RigGriddedPart3d> grid( GridPart part ) const;
|
const RigGriddedPart3d* grid( GridPart part ) const;
|
||||||
|
|
||||||
const cvf::Vec3d faultNormal() const;
|
const cvf::Vec3d faultNormal() const;
|
||||||
const std::pair<cvf::Vec3d, cvf::Vec3d> faultTopBottom() const;
|
const std::pair<cvf::Vec3d, cvf::Vec3d> faultTopBottom() const;
|
||||||
@ -93,5 +93,5 @@ private:
|
|||||||
|
|
||||||
bool m_isValid;
|
bool m_isValid;
|
||||||
|
|
||||||
std::map<GridPart, std::shared_ptr<RigGriddedPart3d>> m_3dparts;
|
std::map<GridPart, RigGriddedPart3d*> m_3dparts;
|
||||||
};
|
};
|
||||||
|
@ -477,14 +477,16 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t
|
|||||||
m_maxCellHeight,
|
m_maxCellHeight,
|
||||||
m_cellSizeHeightFactor,
|
m_cellSizeHeightFactor,
|
||||||
m_horizontalPartition,
|
m_horizontalPartition,
|
||||||
m_modelThickness );
|
m_modelThickness,
|
||||||
|
m_topReservoirFront.z() );
|
||||||
backPart->generateGeometry( m_backPoints,
|
backPart->generateGeometry( m_backPoints,
|
||||||
backReservoirLayers,
|
backReservoirLayers,
|
||||||
kLayersBack,
|
kLayersBack,
|
||||||
m_maxCellHeight,
|
m_maxCellHeight,
|
||||||
m_cellSizeHeightFactor,
|
m_cellSizeHeightFactor,
|
||||||
m_horizontalPartition,
|
m_horizontalPartition,
|
||||||
m_modelThickness );
|
m_modelThickness,
|
||||||
|
m_topReservoirBack.z() );
|
||||||
|
|
||||||
frontPart->generateLocalNodes( m_localCoordTransform );
|
frontPart->generateLocalNodes( m_localCoordTransform );
|
||||||
backPart->generateLocalNodes( m_localCoordTransform );
|
backPart->generateLocalNodes( m_localCoordTransform );
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGriddedPart3d::RigGriddedPart3d()
|
RigGriddedPart3d::RigGriddedPart3d()
|
||||||
: m_useLocalCoordinates( false )
|
: m_useLocalCoordinates( false )
|
||||||
|
, m_topHeight( 0.0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,10 +194,13 @@ void RigGriddedPart3d::generateGeometry( const std::array<cvf::Vec3d, 12>& input
|
|||||||
const double maxCellHeight,
|
const double maxCellHeight,
|
||||||
double cellSizeFactor,
|
double cellSizeFactor,
|
||||||
const std::vector<double>& horizontalPartition,
|
const std::vector<double>& horizontalPartition,
|
||||||
double modelThickness )
|
double modelThickness,
|
||||||
|
double topHeight )
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
m_topHeight = topHeight;
|
||||||
|
|
||||||
std::map<Regions, std::vector<double>> layersPerRegion;
|
std::map<Regions, std::vector<double>> layersPerRegion;
|
||||||
|
|
||||||
layersPerRegion[Regions::LowerUnderburden] = generateGrowingLayers( inputPoints[1].z(), inputPoints[0].z(), maxCellHeight, cellSizeFactor );
|
layersPerRegion[Regions::LowerUnderburden] = generateGrowingLayers( inputPoints[1].z(), inputPoints[0].z(), maxCellHeight, cellSizeFactor );
|
||||||
@ -481,6 +485,14 @@ bool RigGriddedPart3d::useLocalCoordinates() const
|
|||||||
return m_useLocalCoordinates;
|
return m_useLocalCoordinates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RigGriddedPart3d::topHeight() const
|
||||||
|
{
|
||||||
|
return m_topHeight;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Output elements will be of type HEX8
|
/// Output elements will be of type HEX8
|
||||||
///
|
///
|
||||||
|
@ -49,14 +49,17 @@ public:
|
|||||||
double maxCellHeight,
|
double maxCellHeight,
|
||||||
double cellSizeFactor,
|
double cellSizeFactor,
|
||||||
const std::vector<double>& horizontalPartition,
|
const std::vector<double>& horizontalPartition,
|
||||||
double modelThickness );
|
double modelThickness,
|
||||||
|
double topHeight );
|
||||||
|
|
||||||
void generateLocalNodes( const cvf::Mat4d transform );
|
void generateLocalNodes( const cvf::Mat4d transform );
|
||||||
|
void setUseLocalCoordinates( bool useLocalCoordinates );
|
||||||
|
|
||||||
|
bool useLocalCoordinates() const;
|
||||||
|
double topHeight() const;
|
||||||
|
|
||||||
const std::vector<cvf::Vec3d>& nodes() const;
|
const std::vector<cvf::Vec3d>& nodes() const;
|
||||||
const std::vector<cvf::Vec3d>& globalNodes() const;
|
const std::vector<cvf::Vec3d>& globalNodes() const;
|
||||||
void setUseLocalCoordinates( bool useLocalCoordinates );
|
|
||||||
bool useLocalCoordinates() const;
|
|
||||||
|
|
||||||
const std::vector<std::vector<unsigned int>>& elementIndices() const;
|
const std::vector<std::vector<unsigned int>>& elementIndices() const;
|
||||||
const std::map<RimFaultReactivation::BorderSurface, std::vector<unsigned int>>& borderSurfaceElements() const;
|
const std::map<RimFaultReactivation::BorderSurface, std::vector<unsigned int>>& borderSurfaceElements() const;
|
||||||
@ -91,6 +94,8 @@ private:
|
|||||||
private:
|
private:
|
||||||
bool m_useLocalCoordinates;
|
bool m_useLocalCoordinates;
|
||||||
|
|
||||||
|
double m_topHeight;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> m_nodes;
|
std::vector<cvf::Vec3d> m_nodes;
|
||||||
std::vector<cvf::Vec3d> m_localNodes;
|
std::vector<cvf::Vec3d> m_localNodes;
|
||||||
std::vector<std::vector<unsigned int>> m_elementIndices;
|
std::vector<std::vector<unsigned int>> m_elementIndices;
|
||||||
|
Loading…
Reference in New Issue
Block a user