mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
pre-proto - Some cleanup and adding function for getting access to one RigFractureData
This commit is contained in:
parent
8255a3aaa3
commit
153bc57dfb
@ -202,6 +202,7 @@ void RigCellGeometryTools::findCellLocalXYZ(cvf::Vec3d * hexCorners, cvf::Vec3d
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
//TODO: Suggested rename: polygonLengthWeightedByArea. polygonAverageLengthWeightedByArea
|
||||
double RigCellGeometryTools::polygonAreaWeightedLength(cvf::Vec3d directionOfLength, std::vector<cvf::Vec3d> polygonToCalcLengthOf)
|
||||
{
|
||||
//TODO: Check that polygon is in xy plane
|
||||
|
@ -74,3 +74,20 @@ const std::vector<RigFractureData>& RigFracture::fractureData() const
|
||||
return m_fractureData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFractureData* RigFracture::fractureData(size_t eclipseCellIndex)
|
||||
{
|
||||
for (RigFractureData fracData : m_fractureData)
|
||||
{
|
||||
if (fracData.reservoirCellIndex == eclipseCellIndex)
|
||||
{
|
||||
return &fracData;
|
||||
}
|
||||
}
|
||||
|
||||
RigFractureData newFractureData;
|
||||
return &newFractureData;
|
||||
}
|
||||
|
||||
|
@ -69,9 +69,14 @@ public:
|
||||
void setFractureData(const std::vector<RigFractureData>& data);
|
||||
const std::vector<RigFractureData>& fractureData() const; //Access frac data
|
||||
|
||||
RigFractureData* fractureData(size_t eclipseCellIndex);
|
||||
|
||||
std::vector<RigFractureData> m_fractureData;
|
||||
|
||||
private:
|
||||
std::vector<cvf::uint> m_triangleIndices;
|
||||
std::vector<cvf::Vec3f> m_nodeCoords;
|
||||
std::vector<RigFractureData> m_fractureData;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -71,18 +71,16 @@ RigFractureTransCalc::RigFractureTransCalc(RimEclipseCase* caseToApply, RimFract
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
/// TODO: Document equation
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
//TODO: Make static and move to another class
|
||||
void RigFractureTransCalc::computeTransmissibility()
|
||||
{
|
||||
|
||||
if (m_fracture->attachedFractureDefinition()->fractureConductivity == RimFractureTemplate::FINITE_CONDUCTIVITY)
|
||||
{
|
||||
RiaLogging::warning(QString("Transimssibility for finite conductity in fracture not yet implemented."));
|
||||
@ -316,9 +314,6 @@ bool RigFractureTransCalc::planeCellIntersectionPolygons(size_t cellindex, std::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<double, double> RigFractureTransCalc::flowAcrossLayersUpscaling(QString resultName, QString resultUnit, size_t timeStepIndex, RimDefines::UnitSystem unitSystem, size_t eclipseCellIndex)
|
||||
{
|
||||
|
||||
//TODO: A lot of common code with function for calculating transmissibility...
|
||||
|
||||
RimStimPlanFractureTemplate* fracTemplateStimPlan;
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(m_fracture->attachedFractureDefinition()))
|
||||
{
|
||||
@ -328,13 +323,7 @@ std::pair<double, double> RigFractureTransCalc::flowAcrossLayersUpscaling(QStrin
|
||||
|
||||
std::vector<RigStimPlanCell* > stimPlanCells = fracTemplateStimPlan->getStimPlanCells(resultName, resultUnit, timeStepIndex);
|
||||
|
||||
// RifReaderInterface::PorosityModelResultType porosityModel = RifReaderInterface::MATRIX_RESULTS;
|
||||
// RimReservoirCellResultsStorage* gridCellResults = m_case->results(porosityModel);
|
||||
|
||||
|
||||
cvf::Vec3d localX; //NOt used in this calculation...
|
||||
cvf::Vec3d localY;
|
||||
cvf::Vec3d localZ;
|
||||
cvf::Vec3d localX, localY, localZ; //Not used in calculation here, but needed for function to find planCellPolygons
|
||||
std::vector<std::vector<cvf::Vec3d> > planeCellPolygons;
|
||||
bool isPlanIntersected = planeCellIntersectionPolygons(eclipseCellIndex, planeCellPolygons, localX, localY, localZ);
|
||||
if (!isPlanIntersected || planeCellPolygons.size() == 0) return std::make_pair(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
|
||||
@ -354,11 +343,6 @@ std::pair<double, double> RigFractureTransCalc::flowAcrossLayersUpscaling(QStrin
|
||||
directionAcrossLayers = cvf::Vec3d(0.0, -1.0, 0.0);
|
||||
directionAlongLayers = cvf::Vec3d(1.0, 0.0, 0.0);
|
||||
|
||||
//TODO: Rotate if dip, tilt != 0 Or is this already handled when transforming to frature plane???
|
||||
|
||||
//directionAcrossLayers.transformVector(static_cast<cvf::Mat4d>(invertedTransMatrix));
|
||||
//directionAlongLayers.transformVector(static_cast<cvf::Mat4d>(invertedTransMatrix));
|
||||
|
||||
std::vector<cvf::Vec3f> fracPolygon = m_fracture->attachedFractureDefinition()->fracturePolygon(unitSystem);
|
||||
std::vector<std::vector<cvf::Vec3d> > polygonsDescribingFractureInCell;
|
||||
|
||||
@ -385,7 +369,6 @@ std::pair<double, double> RigFractureTransCalc::flowAcrossLayersUpscaling(QStrin
|
||||
upscaledConductivitiesAH.push_back(condAH);
|
||||
}
|
||||
|
||||
//TODO: Is this the right way of handling getting several values for each cell?
|
||||
return std::make_pair(arithmeticAverage(upscaledConductivitiesHA), arithmeticAverage(upscaledConductivitiesAH));
|
||||
|
||||
}
|
||||
@ -601,6 +584,9 @@ void RigFractureTransCalc::computeUpscaledPropertyFromStimPlan( QString resultNa
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO: Hvis fracture allerede har en sånn vektor, trenger vi vel ikke en til for RigFractureTransCalc...?
|
||||
//Trenger bare funksjoner for å sette / hente ut data for en gitt Eclipse celle...
|
||||
m_fracture->setFractureData(fracDataVec);
|
||||
|
||||
|
||||
|
@ -71,8 +71,5 @@ private:
|
||||
RimFracture* m_fracture;
|
||||
RimDefines::UnitSystem m_unitForCalculation;
|
||||
|
||||
//TODO: Legge til rigFractureData vektor her...
|
||||
//TODO: Funksjoner for å sette / hente data basert på celleindex
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user