mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#1787 Correcting which timestep is used for calculation of total flow into cell
This commit is contained in:
parent
0ab95bc1f2
commit
f0f189b311
@ -61,20 +61,19 @@ void RicCalculateNumberOfFloodedPoreVolumes::onActionTriggered(bool isChecked)
|
||||
std::vector<std::vector<double>> numberOfFloodedPorevolumes = calc.numberOfFloodedPorevolumes();
|
||||
std::vector<std::vector<double>> cumInflow = calc.cumInflow();
|
||||
|
||||
|
||||
//Test Norne
|
||||
size_t cellIndex = mainGrid->reservoirCellIndex(mainGrid->cellIndexFromIJK(4, 1, 4));
|
||||
RigActiveCellInfo* actCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||
size_t cellResultIndex = actCellInfo->cellResultIndex(cellIndex);
|
||||
|
||||
std::vector<double> numberOfFloodedPorevolumesForSingleCell;
|
||||
std::vector<double> cumInflowForSingleCell;
|
||||
|
||||
for (size_t timeStep = 0; timeStep < numberOfFloodedPorevolumes.size(); timeStep++)
|
||||
{
|
||||
numberOfFloodedPorevolumesForSingleCell.push_back(numberOfFloodedPorevolumes[timeStep][cellResultIndex]);
|
||||
cumInflowForSingleCell.push_back(cumInflow[timeStep][cellResultIndex]);
|
||||
}
|
||||
//Test
|
||||
// size_t cellIndex = mainGrid->reservoirCellIndex(mainGrid->cellIndexFromIJK(19, 34, 9));
|
||||
// RigActiveCellInfo* actCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||
// size_t cellResultIndex = actCellInfo->cellResultIndex(cellIndex);
|
||||
//
|
||||
// std::vector<double> numberOfFloodedPorevolumesForSingleCell;
|
||||
// std::vector<double> cumInflowForSingleCell;
|
||||
//
|
||||
// for (size_t timeStep = 0; timeStep < numberOfFloodedPorevolumes.size(); timeStep++)
|
||||
// {
|
||||
// numberOfFloodedPorevolumesForSingleCell.push_back(numberOfFloodedPorevolumes[timeStep][cellResultIndex]);
|
||||
// cumInflowForSingleCell.push_back(cumInflow[timeStep][cellResultIndex]);
|
||||
// }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -183,31 +183,38 @@ void RigNumberOfFloodedPoreVolumesCalculator::calculate(RigMainGrid* mainGrid,
|
||||
{
|
||||
std::vector<double> totoalFlowrateIntoCell(numberOfActiveCells); //brukt result celle index / active antall i stedet
|
||||
|
||||
if (flowrateIatAllTimeSteps[timeStep] != nullptr
|
||||
&& flowrateJatAllTimeSteps[timeStep] != nullptr
|
||||
&& flowrateKatAllTimeSteps[timeStep] != nullptr)
|
||||
if (flowrateIatAllTimeSteps[timeStep-1] != nullptr
|
||||
&& flowrateJatAllTimeSteps[timeStep-1] != nullptr
|
||||
&& flowrateKatAllTimeSteps[timeStep-1] != nullptr)
|
||||
|
||||
{
|
||||
const std::vector<double>* flowrateI = flowrateIatAllTimeSteps[timeStep];
|
||||
const std::vector<double>* flowrateJ = flowrateJatAllTimeSteps[timeStep];
|
||||
const std::vector<double>* flowrateK = flowrateKatAllTimeSteps[timeStep];
|
||||
const std::vector<double>* flowrateI = flowrateIatAllTimeSteps[timeStep-1];
|
||||
const std::vector<double>* flowrateJ = flowrateJatAllTimeSteps[timeStep-1];
|
||||
const std::vector<double>* flowrateK = flowrateKatAllTimeSteps[timeStep-1];
|
||||
|
||||
if (flowrateI->size() > 0 && flowrateJ->size() > 0 && flowrateK->size() > 0)
|
||||
{
|
||||
distributeNeighbourCellFlow(mainGrid,
|
||||
caseToApply,
|
||||
summedTracersAtAllTimesteps[timeStep-1],
|
||||
flowrateI,
|
||||
flowrateJ,
|
||||
flowrateK,
|
||||
totoalFlowrateIntoCell);
|
||||
}
|
||||
|
||||
distributeNeighbourCellFlow(mainGrid,
|
||||
caseToApply,
|
||||
summedTracersAtAllTimesteps[timeStep],
|
||||
flowrateI,
|
||||
flowrateJ,
|
||||
flowrateK,
|
||||
totoalFlowrateIntoCell);
|
||||
}
|
||||
|
||||
const std::vector<double>* flowrateNNC = flowrateNNCatAllTimeSteps[timeStep];
|
||||
const std::vector<double>* flowrateNNC = flowrateNNCatAllTimeSteps[timeStep-1];
|
||||
|
||||
distributeNNCflow(connections,
|
||||
caseToApply,
|
||||
summedTracersAtAllTimesteps[timeStep],
|
||||
flowrateNNC,
|
||||
totoalFlowrateIntoCell);
|
||||
if (flowrateNNC->size() > 0)
|
||||
{
|
||||
distributeNNCflow(connections,
|
||||
caseToApply,
|
||||
summedTracersAtAllTimesteps[timeStep-1],
|
||||
flowrateNNC,
|
||||
totoalFlowrateIntoCell);
|
||||
}
|
||||
|
||||
std::vector<double> CellQwIn(numberOfActiveCells);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user