mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace changes
This commit is contained in:
parent
022aac3682
commit
b32a3f229f
@ -24,9 +24,9 @@
|
|||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigFractureCell.h"
|
#include "RigFractureCell.h"
|
||||||
#include "RigFractureTransmissibilityEquations.h"
|
#include "RigFractureTransmissibilityEquations.h"
|
||||||
|
#include "RigHexIntersectionTools.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
#include "RigResultAccessorFactory.h"
|
#include "RigResultAccessorFactory.h"
|
||||||
#include "RigHexIntersectionTools.h"
|
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
|
|
||||||
@ -35,16 +35,17 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigEclipseToStimPlanCellTransmissibilityCalculator::RigEclipseToStimPlanCellTransmissibilityCalculator(RimEclipseCase* caseToApply,
|
RigEclipseToStimPlanCellTransmissibilityCalculator::RigEclipseToStimPlanCellTransmissibilityCalculator(
|
||||||
|
RimEclipseCase* caseToApply,
|
||||||
cvf::Mat4d fractureTransform,
|
cvf::Mat4d fractureTransform,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
double cDarcy,
|
double cDarcy,
|
||||||
const RigFractureCell& stimPlanCell)
|
const RigFractureCell& stimPlanCell)
|
||||||
: m_case(caseToApply),
|
: m_case(caseToApply)
|
||||||
m_fractureTransform(fractureTransform),
|
, m_fractureTransform(fractureTransform)
|
||||||
m_fractureSkinFactor(skinFactor),
|
, m_fractureSkinFactor(skinFactor)
|
||||||
m_cDarcy(cDarcy),
|
, m_cDarcy(cDarcy)
|
||||||
m_stimPlanCell(stimPlanCell)
|
, m_stimPlanCell(stimPlanCell)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,8 +128,9 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
std::array<cvf::Vec3d, 8> hexCorners;
|
std::array<cvf::Vec3d, 8> hexCorners;
|
||||||
mainGrid->cellCornerVertices(fracCell, hexCorners.data());
|
mainGrid->cellCornerVertices(fracCell, hexCorners.data());
|
||||||
|
|
||||||
std::vector<std::vector<cvf::Vec3d> > planeCellPolygons;
|
std::vector<std::vector<cvf::Vec3d>> planeCellPolygons;
|
||||||
bool isPlanIntersected = RigHexIntersectionTools::planeHexIntersectionPolygons(hexCorners, m_fractureTransform, planeCellPolygons);
|
bool isPlanIntersected =
|
||||||
|
RigHexIntersectionTools::planeHexIntersectionPolygons(hexCorners, m_fractureTransform, planeCellPolygons);
|
||||||
if (!isPlanIntersected || planeCellPolygons.size() == 0) continue;
|
if (!isPlanIntersected || planeCellPolygons.size() == 0) continue;
|
||||||
|
|
||||||
cvf::Vec3d localX;
|
cvf::Vec3d localX;
|
||||||
@ -136,9 +138,9 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
cvf::Vec3d localZ;
|
cvf::Vec3d localZ;
|
||||||
RigCellGeometryTools::findCellLocalXYZ(hexCorners, localX, localY, localZ);
|
RigCellGeometryTools::findCellLocalXYZ(hexCorners, localX, localY, localZ);
|
||||||
|
|
||||||
//Transform planCell polygon(s) and averageZdirection to x/y coordinate system (where fracturePolygon already is located)
|
// Transform planCell polygon(s) and averageZdirection to x/y coordinate system (where fracturePolygon already is located)
|
||||||
cvf::Mat4d invertedTransMatrix = m_fractureTransform.getInverted();
|
cvf::Mat4d invertedTransMatrix = m_fractureTransform.getInverted();
|
||||||
for (std::vector<cvf::Vec3d> & planeCellPolygon : planeCellPolygons)
|
for (std::vector<cvf::Vec3d>& planeCellPolygon : planeCellPolygons)
|
||||||
{
|
{
|
||||||
for (cvf::Vec3d& v : planeCellPolygon)
|
for (cvf::Vec3d& v : planeCellPolygon)
|
||||||
{
|
{
|
||||||
@ -146,13 +148,14 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::vector<cvf::Vec3d> > polygonsForStimPlanCellInEclipseCell;
|
std::vector<std::vector<cvf::Vec3d>> polygonsForStimPlanCellInEclipseCell;
|
||||||
cvf::Vec3d areaVector;
|
cvf::Vec3d areaVector;
|
||||||
std::vector<cvf::Vec3d> stimPlanPolygon = m_stimPlanCell.getPolygon();
|
std::vector<cvf::Vec3d> stimPlanPolygon = m_stimPlanCell.getPolygon();
|
||||||
|
|
||||||
for (std::vector<cvf::Vec3d> planeCellPolygon : planeCellPolygons)
|
for (std::vector<cvf::Vec3d> planeCellPolygon : planeCellPolygons)
|
||||||
{
|
{
|
||||||
std::vector<std::vector<cvf::Vec3d> >clippedPolygons = RigCellGeometryTools::intersectPolygons(planeCellPolygon, stimPlanPolygon);
|
std::vector<std::vector<cvf::Vec3d>> clippedPolygons =
|
||||||
|
RigCellGeometryTools::intersectPolygons(planeCellPolygon, stimPlanPolygon);
|
||||||
for (std::vector<cvf::Vec3d> clippedPolygon : clippedPolygons)
|
for (std::vector<cvf::Vec3d> clippedPolygon : clippedPolygons)
|
||||||
{
|
{
|
||||||
polygonsForStimPlanCellInEclipseCell.push_back(clippedPolygon);
|
polygonsForStimPlanCellInEclipseCell.push_back(clippedPolygon);
|
||||||
@ -165,7 +168,9 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
std::vector<double> areaOfFractureParts;
|
std::vector<double> areaOfFractureParts;
|
||||||
double length;
|
double length;
|
||||||
std::vector<double> lengthXareaOfFractureParts;
|
std::vector<double> lengthXareaOfFractureParts;
|
||||||
double Ax = 0.0, Ay = 0.0, Az = 0.0;
|
double Ax = 0.0;
|
||||||
|
double Ay = 0.0;
|
||||||
|
double Az = 0.0;
|
||||||
|
|
||||||
for (std::vector<cvf::Vec3d> fracturePartPolygon : polygonsForStimPlanCellInEclipseCell)
|
for (std::vector<cvf::Vec3d> fracturePartPolygon : polygonsForStimPlanCellInEclipseCell)
|
||||||
{
|
{
|
||||||
@ -180,27 +185,30 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
fracturePlane.setFromPointAndNormal(static_cast<cvf::Vec3d>(m_fractureTransform.translation()),
|
fracturePlane.setFromPointAndNormal(static_cast<cvf::Vec3d>(m_fractureTransform.translation()),
|
||||||
static_cast<cvf::Vec3d>(m_fractureTransform.col(2)));
|
static_cast<cvf::Vec3d>(m_fractureTransform.col(2)));
|
||||||
|
|
||||||
Ax += fabs(area*(fracturePlane.normal().dot(localY)));
|
Ax += fabs(area * (fracturePlane.normal().dot(localY)));
|
||||||
Ay += fabs(area*(fracturePlane.normal().dot(localX)));
|
Ay += fabs(area * (fracturePlane.normal().dot(localX)));
|
||||||
Az += fabs(area*(fracturePlane.normal().dot(localZ)));
|
Az += fabs(area * (fracturePlane.normal().dot(localZ)));
|
||||||
}
|
}
|
||||||
|
|
||||||
double fractureArea = 0.0;
|
double fractureArea = 0.0;
|
||||||
for (double area : areaOfFractureParts) fractureArea += area;
|
for (double area : areaOfFractureParts)
|
||||||
|
fractureArea += area;
|
||||||
|
|
||||||
double totalAreaXLength = 0.0;
|
double totalAreaXLength = 0.0;
|
||||||
for (double lengtXarea : lengthXareaOfFractureParts) totalAreaXLength += lengtXarea;
|
for (double lengtXarea : lengthXareaOfFractureParts)
|
||||||
|
totalAreaXLength += lengtXarea;
|
||||||
|
|
||||||
double fractureAreaWeightedlength = totalAreaXLength / fractureArea;
|
double fractureAreaWeightedlength = totalAreaXLength / fractureArea;
|
||||||
|
|
||||||
double transmissibility_X = RigFractureTransmissibilityEquations::matrixToFractureTrans(permY, NTG, Ay, dx, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
double transmissibility_X = RigFractureTransmissibilityEquations::matrixToFractureTrans(
|
||||||
double transmissibility_Y = RigFractureTransmissibilityEquations::matrixToFractureTrans(permX, NTG, Ax, dy, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
permY, NTG, Ay, dx, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
||||||
double transmissibility_Z = RigFractureTransmissibilityEquations::matrixToFractureTrans(permZ, 1.0, Az, dz, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
double transmissibility_Y = RigFractureTransmissibilityEquations::matrixToFractureTrans(
|
||||||
|
permX, NTG, Ax, dy, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
||||||
double transmissibility = sqrt(transmissibility_X * transmissibility_X
|
double transmissibility_Z = RigFractureTransmissibilityEquations::matrixToFractureTrans(
|
||||||
+ transmissibility_Y * transmissibility_Y
|
permZ, 1.0, Az, dz, m_fractureSkinFactor, fractureAreaWeightedlength, m_cDarcy);
|
||||||
+ transmissibility_Z * transmissibility_Z);
|
|
||||||
|
|
||||||
|
double transmissibility = sqrt(transmissibility_X * transmissibility_X + transmissibility_Y * transmissibility_Y +
|
||||||
|
transmissibility_Z * transmissibility_Z);
|
||||||
|
|
||||||
m_globalIndiciesToContributingEclipseCells.push_back(fracCell);
|
m_globalIndiciesToContributingEclipseCells.push_back(fracCell);
|
||||||
m_contributingEclipseCellTransmissibilities.push_back(transmissibility);
|
m_contributingEclipseCellTransmissibilities.push_back(transmissibility);
|
||||||
@ -210,7 +218,8 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<size_t> RigEclipseToStimPlanCellTransmissibilityCalculator::getPotentiallyFracturedCellsForPolygon(std::vector<cvf::Vec3d> polygon)
|
std::vector<size_t>
|
||||||
|
RigEclipseToStimPlanCellTransmissibilityCalculator::getPotentiallyFracturedCellsForPolygon(std::vector<cvf::Vec3d> polygon)
|
||||||
{
|
{
|
||||||
std::vector<size_t> cellIndices;
|
std::vector<size_t> cellIndices;
|
||||||
|
|
||||||
@ -218,7 +227,10 @@ std::vector<size_t> RigEclipseToStimPlanCellTransmissibilityCalculator::getPoten
|
|||||||
if (!mainGrid) return cellIndices;
|
if (!mainGrid) return cellIndices;
|
||||||
|
|
||||||
cvf::BoundingBox polygonBBox;
|
cvf::BoundingBox polygonBBox;
|
||||||
for (cvf::Vec3d nodeCoord : polygon) polygonBBox.add(nodeCoord);
|
for (cvf::Vec3d nodeCoord : polygon)
|
||||||
|
{
|
||||||
|
polygonBBox.add(nodeCoord);
|
||||||
|
}
|
||||||
|
|
||||||
mainGrid->findIntersectingCells(polygonBBox, &cellIndices);
|
mainGrid->findIntersectingCells(polygonBBox, &cellIndices);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user