mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1364 - pre-proto - Fixing bugs in calculation of upscaled cond values
This commit is contained in:
parent
228e39880f
commit
4f645758b3
@ -187,8 +187,8 @@ void RifEclipseExportTools::performStimPlanUpscalingAndPrintResults(const std::v
|
|||||||
|
|
||||||
out << qSetFieldWidth(10);
|
out << qSetFieldWidth(10);
|
||||||
out << "cellIndex";
|
out << "cellIndex";
|
||||||
out << "Aritm. ";
|
out << "condHA. ";
|
||||||
out << "Harm. ";
|
out << "condAH. ";
|
||||||
|
|
||||||
out << "\n";
|
out << "\n";
|
||||||
|
|
||||||
@ -218,8 +218,8 @@ void RifEclipseExportTools::performStimPlanUpscalingAndPrintResults(const std::v
|
|||||||
|
|
||||||
out << qSetFieldWidth(10);
|
out << qSetFieldWidth(10);
|
||||||
out << fracData.reservoirCellIndex;
|
out << fracData.reservoirCellIndex;
|
||||||
out << QString::number(fracData.upscaledAritmStimPlanValue, 'f', 3);
|
out << QString::number(fracData.upscaledStimPlanValueHA, 'f', 3);
|
||||||
out << QString::number(fracData.upscaledHarmStimPlanValue, 'f', 3);
|
out << QString::number(fracData.upscaledStimPlanValueAH, 'f', 3);
|
||||||
|
|
||||||
out << "\n";
|
out << "\n";
|
||||||
}
|
}
|
||||||
|
@ -801,17 +801,17 @@ std::vector<RigStimPlanCell*> RimStimPlanFractureTemplate::getStimPlanCells(cons
|
|||||||
std::vector<double> depthCoords;
|
std::vector<double> depthCoords;
|
||||||
for (int i = 0; i < depthCoordsAtNodes.size() - 1; i++) depthCoords.push_back((depthCoordsAtNodes[i] + depthCoordsAtNodes[i + 1]) / 2);
|
for (int i = 0; i < depthCoordsAtNodes.size() - 1; i++) depthCoords.push_back((depthCoordsAtNodes[i] + depthCoordsAtNodes[i + 1]) / 2);
|
||||||
|
|
||||||
for (int i = 0; i < xCoords.size() - 1; i++)
|
for (int j = 0; j < xCoords.size() - 1; j++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < depthCoords.size() - 1; j++)
|
for (int i = 0; i < depthCoords.size() - 1; i++)
|
||||||
{
|
{
|
||||||
std::vector<cvf::Vec3d> cellPolygon;
|
std::vector<cvf::Vec3d> cellPolygon;
|
||||||
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[i]), static_cast<float>(depthCoords[j]), 0.0));
|
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[j]), static_cast<float>(depthCoords[i]), 0.0));
|
||||||
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[i + 1]), static_cast<float>(depthCoords[j]), 0.0));
|
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[j + 1]), static_cast<float>(depthCoords[i]), 0.0));
|
||||||
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[i + 1]), static_cast<float>(depthCoords[j + 1]), 0.0));
|
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[j + 1]), static_cast<float>(depthCoords[i + 1]), 0.0));
|
||||||
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[i]), static_cast<float>(depthCoords[j + 1]), 0.0));
|
cellPolygon.push_back(cvf::Vec3d(static_cast<float>(xCoords[j]), static_cast<float>(depthCoords[i + 1]), 0.0));
|
||||||
|
|
||||||
RigStimPlanCell* stimPlanCell = new RigStimPlanCell(cellPolygon, propertyValuesAtTimeStep[j + 1][i + 1], i, j);
|
RigStimPlanCell* stimPlanCell = new RigStimPlanCell(cellPolygon, propertyValuesAtTimeStep[i + 1][j + 1], i, j);
|
||||||
stimPlanCells.push_back(stimPlanCell);
|
stimPlanCells.push_back(stimPlanCell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,8 @@ public:
|
|||||||
bool cellIsActive;
|
bool cellIsActive;
|
||||||
|
|
||||||
//TODO: Used for upscaling - should be moved?
|
//TODO: Used for upscaling - should be moved?
|
||||||
double upscaledAritmStimPlanValue;
|
double upscaledStimPlanValueHA;
|
||||||
double upscaledHarmStimPlanValue;
|
double upscaledStimPlanValueAH;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -351,12 +351,13 @@ std::pair<double, double> RigFractureTransCalc::flowAcrossLayersUpscaling(QStrin
|
|||||||
|
|
||||||
cvf::Vec3d directionAcrossLayers;
|
cvf::Vec3d directionAcrossLayers;
|
||||||
cvf::Vec3d directionAlongLayers;
|
cvf::Vec3d directionAlongLayers;
|
||||||
//TODO: Get these vectors properly...
|
directionAcrossLayers = cvf::Vec3d(0.0, -1.0, 0.0);
|
||||||
directionAcrossLayers = cvf::Vec3d(0, -1, 0);
|
directionAlongLayers = cvf::Vec3d(1.0, 0.0, 0.0);
|
||||||
directionAlongLayers = cvf::Vec3d(1, 0, 0);
|
|
||||||
|
|
||||||
directionAcrossLayers.transformVector(static_cast<cvf::Mat4d>(invertedTransMatrix));
|
//TODO: Rotate if dip, tilt != 0 Or is this already handled when transforming to frature plane???
|
||||||
directionAlongLayers.transformVector(static_cast<cvf::Mat4d>(invertedTransMatrix));
|
|
||||||
|
//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<cvf::Vec3f> fracPolygon = m_fracture->attachedFractureDefinition()->fracturePolygon(unitSystem);
|
||||||
std::vector<std::vector<cvf::Vec3d> > polygonsDescribingFractureInCell;
|
std::vector<std::vector<cvf::Vec3d> > polygonsDescribingFractureInCell;
|
||||||
@ -427,7 +428,8 @@ double RigFractureTransCalc::computeHAupscale(RimStimPlanFractureTemplate* fracT
|
|||||||
DcolSum.push_back(sumDi);
|
DcolSum.push_back(sumDi);
|
||||||
double lAvgValue = sumLiDi / sumDi;
|
double lAvgValue = sumLiDi / sumDi;
|
||||||
lavgCol.push_back(lAvgValue);
|
lavgCol.push_back(lAvgValue);
|
||||||
CondHarmCol.push_back(1 / (sumLiDi*sumDiDivCondLi));
|
double harmMeanForCol = (sumDi / lAvgValue) * (1 / sumDiDivCondLi);
|
||||||
|
CondHarmCol.push_back(harmMeanForCol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -577,13 +579,13 @@ void RigFractureTransCalc::computeUpscaledPropertyFromStimPlan( QString resultNa
|
|||||||
|
|
||||||
std::pair<double, double> upscaledCondFlowAcrossLayers = flowAcrossLayersUpscaling(resultName, resultUnit, timeStepIndex, m_unitForCalculation, fracCell);
|
std::pair<double, double> upscaledCondFlowAcrossLayers = flowAcrossLayersUpscaling(resultName, resultUnit, timeStepIndex, m_unitForCalculation, fracCell);
|
||||||
|
|
||||||
double upscaledAritmStimPlanValue = upscaledCondFlowAcrossLayers.first;
|
double upscaledStimPlanValueHA = upscaledCondFlowAcrossLayers.first;
|
||||||
double upscaledHarmStimPlanValue = upscaledCondFlowAcrossLayers.second;
|
double upscaledStimPlanValueAH = upscaledCondFlowAcrossLayers.second;
|
||||||
|
|
||||||
if (upscaledAritmStimPlanValue != cvf::UNDEFINED_DOUBLE)
|
if (upscaledStimPlanValueHA != cvf::UNDEFINED_DOUBLE)
|
||||||
{
|
{
|
||||||
fracData.upscaledAritmStimPlanValue = upscaledAritmStimPlanValue;
|
fracData.upscaledStimPlanValueHA = upscaledStimPlanValueHA;
|
||||||
fracData.upscaledHarmStimPlanValue = upscaledHarmStimPlanValue;
|
fracData.upscaledStimPlanValueAH = upscaledStimPlanValueAH;
|
||||||
|
|
||||||
fracDataVec.push_back(fracData);
|
fracDataVec.push_back(fracData);
|
||||||
}
|
}
|
||||||
|
@ -63,12 +63,16 @@ public:
|
|||||||
static std::vector<RigStimPlanCell*> getRowOfStimPlanCells(std::vector<RigStimPlanCell*> allStimPlanCells, size_t i);
|
static std::vector<RigStimPlanCell*> getRowOfStimPlanCells(std::vector<RigStimPlanCell*> allStimPlanCells, size_t i);
|
||||||
static std::vector<RigStimPlanCell*> getColOfStimPlanCells(std::vector<RigStimPlanCell*> allStimPlanCells, size_t j);
|
static std::vector<RigStimPlanCell*> getColOfStimPlanCells(std::vector<RigStimPlanCell*> allStimPlanCells, size_t j);
|
||||||
|
|
||||||
|
private:
|
||||||
|
double convertConductivtyValue(double Kw, RimDefines::UnitSystem fromUnit, RimDefines::UnitSystem toUnit);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RimEclipseCase* m_case;
|
RimEclipseCase* m_case;
|
||||||
RimFracture* m_fracture;
|
RimFracture* m_fracture;
|
||||||
RimDefines::UnitSystem m_unitForCalculation;
|
RimDefines::UnitSystem m_unitForCalculation;
|
||||||
|
|
||||||
double convertConductivtyValue(double Kw, RimDefines::UnitSystem fromUnit, RimDefines::UnitSystem toUnit);
|
//TODO: Legge til rigFractureData vektor her...
|
||||||
|
//TODO: Funksjoner for å sette / hente data basert på celleindex
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user