mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-27 11:40:17 -06:00
fix the calculation of which ROCK region is to be used
the mistake was that I assumed that this was specified by the ROCKTAB keyword; It is not! (It's specified via PVTNUM or SATNUM depending on the value of the third item of the ROCKOPTS keyword. for now, let's only use the PVTNUM.)
This commit is contained in:
parent
8c843dd05b
commit
48f889d980
@ -664,6 +664,7 @@ private:
|
||||
{
|
||||
auto deck = this->simulator().gridManager().deck();
|
||||
auto eclState = this->simulator().gridManager().eclState();
|
||||
const auto& gridManager = this->simulator().gridManager();
|
||||
|
||||
// the ROCK keyword has not been specified, so we don't need
|
||||
// to read rock parameters
|
||||
@ -680,16 +681,20 @@ private:
|
||||
rockRecord->getItem("COMPRESSIBILITY")->getSIDouble(0);
|
||||
}
|
||||
|
||||
// ROCKTAB has not been specified, so everything is in the
|
||||
// first region and we don't need to care...
|
||||
if (!eclState->hasIntGridProperty("ROCKTAB"))
|
||||
// PVTNUM has not been specified, so everything is in the first region and we
|
||||
// don't need to care...
|
||||
if (!eclState->hasIntGridProperty("PVTNUM"))
|
||||
return;
|
||||
|
||||
const std::vector<int>& rocktabData =
|
||||
eclState->getIntGridProperty("ROCKTAB")->getData();
|
||||
for (size_t elemIdx = 0; elemIdx < rocktabData.size(); ++ elemIdx)
|
||||
// reminder: Eclipse uses FORTRAN indices
|
||||
rockTableIdx_[elemIdx] = rocktabData[elemIdx] - 1;
|
||||
const std::vector<int>& pvtnumData =
|
||||
eclState->getIntGridProperty("PVTNUM")->getData();
|
||||
rockTableIdx_.resize(gridManager.gridView().size(/*codim=*/0));
|
||||
for (size_t elemIdx = 0; elemIdx < rockTableIdx_.size(); ++ elemIdx) {
|
||||
int cartElemIdx = gridManager.cartesianCellId(elemIdx);
|
||||
|
||||
// reminder: Eclipse uses FORTRAN-style indices
|
||||
rockTableIdx_[elemIdx] = pvtnumData[cartElemIdx] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
void readMaterialParameters_()
|
||||
|
Loading…
Reference in New Issue
Block a user