mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add support for PLMIXNUM
also fix some issues with the MISCNUM
This commit is contained in:
parent
ecae9d3a78
commit
195209982e
@ -840,6 +840,24 @@ public:
|
||||
return miscnum_[elemIdx];
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the index of the relevant region for thermodynmic properties
|
||||
*/
|
||||
template <class Context>
|
||||
unsigned plmixnumRegionIndex(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
{ return plmixnumRegionIndex(context.globalSpaceIndex(spaceIdx, timeIdx)); }
|
||||
|
||||
/*!
|
||||
* \brief Returns the index the relevant PLMIXNUM ( for polymer module) region given a cell index
|
||||
*/
|
||||
unsigned plmixnumRegionIndex(unsigned elemIdx) const
|
||||
{
|
||||
if (plmixnum_.empty())
|
||||
return 0;
|
||||
|
||||
return plmixnum_[elemIdx];
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the max polymer adsorption value
|
||||
*/
|
||||
@ -1141,6 +1159,11 @@ private:
|
||||
updatePvtnum_();
|
||||
updateSatnum_();
|
||||
|
||||
// the MISC region numbers (solvent model)
|
||||
updateMiscnum_();
|
||||
// the PLMIX region numbers (polymer model)
|
||||
updatePlmixnum_();
|
||||
|
||||
////////////////////////////////
|
||||
// porosity
|
||||
updatePorosity_();
|
||||
@ -1582,6 +1605,25 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void updatePlmixnum_()
|
||||
{
|
||||
const auto& eclState = this->simulator().gridManager().eclState();
|
||||
const auto& eclProps = eclState.get3DProperties();
|
||||
|
||||
if (!eclProps.hasDeckIntGridProperty("PLMIXNUM"))
|
||||
return;
|
||||
|
||||
const auto& plmixnumData = eclProps.getIntGridProperty("PLMIXNUM").getData();
|
||||
const auto& gridManager = this->simulator().gridManager();
|
||||
|
||||
unsigned numElems = gridManager.gridView().size(/*codim=*/0);
|
||||
plmixnum_.resize(numElems);
|
||||
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||
unsigned cartElemIdx = gridManager.cartesianIndex(elemIdx);
|
||||
plmixnum_[elemIdx] = plmixnumData[cartElemIdx] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
struct PffDofData_
|
||||
{
|
||||
Scalar transmissibility;
|
||||
@ -1628,6 +1670,8 @@ private:
|
||||
std::vector<int> pvtnum_;
|
||||
std::vector<unsigned short> satnum_;
|
||||
std::vector<unsigned short> miscnum_;
|
||||
std::vector<unsigned short> plmixnum_;
|
||||
|
||||
std::vector<unsigned short> rockTableIdx_;
|
||||
std::vector<RockParams> rockParams_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user