mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Change function removeSmallNonCartesianTransmissibilities_ to removeNonCartesianTransmissibilities_(bool removeAll)
This commit is contained in:
parent
e346315fa2
commit
cc64576a79
@ -153,7 +153,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void updateFromEclState_(bool global);
|
void updateFromEclState_(bool global);
|
||||||
|
|
||||||
void removeSmallNonCartesianTransmissibilities_();
|
void removeNonCartesianTransmissibilities_(bool removeAll);
|
||||||
|
|
||||||
/// \brief Apply the Multipliers for the case PINCH(4)==TOPBOT
|
/// \brief Apply the Multipliers for the case PINCH(4)==TOPBOT
|
||||||
///
|
///
|
||||||
|
@ -175,6 +175,8 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
|
|||||||
const bool updateDiffusivity = eclState_.getSimulationConfig().isDiffusive();
|
const bool updateDiffusivity = eclState_.getSimulationConfig().isDiffusive();
|
||||||
const bool updateDispersivity = eclState_.getSimulationConfig().rock_config().dispersion();
|
const bool updateDispersivity = eclState_.getSimulationConfig().rock_config().dispersion();
|
||||||
|
|
||||||
|
const bool disableNNC = eclState_.getSimulationConfig().useNONNC();
|
||||||
|
|
||||||
if (map)
|
if (map)
|
||||||
extractPermeability_(map);
|
extractPermeability_(map);
|
||||||
else
|
else
|
||||||
@ -571,16 +573,18 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
|
|||||||
globalToLocal[cartElemIdx] = elemIdx;
|
globalToLocal[cartElemIdx] = elemIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->applyEditNncToGridTrans_(globalToLocal);
|
if (!disableNNC) {
|
||||||
this->applyNncToGridTrans_(globalToLocal);
|
this->applyEditNncToGridTrans_(globalToLocal);
|
||||||
this->applyEditNncrToGridTrans_(globalToLocal);
|
this->applyNncToGridTrans_(globalToLocal);
|
||||||
|
this->applyEditNncrToGridTrans_(globalToLocal);
|
||||||
if (applyNncMultregT) {
|
if (applyNncMultregT) {
|
||||||
this->applyNncMultreg_(globalToLocal);
|
this->applyNncMultreg_(globalToLocal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove very small non-neighbouring transmissibilities.
|
// If disableNNC == true, remove all non-neighbouring transmissibilities.
|
||||||
this->removeSmallNonCartesianTransmissibilities_();
|
// If disableNNC == false, remove very small non-neighbouring transmissibilities.
|
||||||
|
this->removeNonCartesianTransmissibilities_(disableNNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Grid, class GridView, class ElementMapper, class CartesianIndexMapper, class Scalar>
|
template<class Grid, class GridView, class ElementMapper, class CartesianIndexMapper, class Scalar>
|
||||||
@ -699,11 +703,12 @@ extractDispersion_()
|
|||||||
|
|
||||||
template<class Grid, class GridView, class ElementMapper, class CartesianIndexMapper, class Scalar>
|
template<class Grid, class GridView, class ElementMapper, class CartesianIndexMapper, class Scalar>
|
||||||
void EclTransmissibility<Grid,GridView,ElementMapper,CartesianIndexMapper,Scalar>::
|
void EclTransmissibility<Grid,GridView,ElementMapper,CartesianIndexMapper,Scalar>::
|
||||||
removeSmallNonCartesianTransmissibilities_()
|
removeNonCartesianTransmissibilities_(bool removeAll)
|
||||||
{
|
{
|
||||||
const auto& cartDims = cartMapper_.cartesianDimensions();
|
const auto& cartDims = cartMapper_.cartesianDimensions();
|
||||||
for (auto&& trans: trans_) {
|
for (auto&& trans: trans_) {
|
||||||
if (trans.second < transmissibilityThreshold_) {
|
//either remove all NNC transmissibilities or those less than the threshold (by default 1e-6 in the deck's unit system)
|
||||||
|
if (removeAll or trans.second < transmissibilityThreshold_) {
|
||||||
const auto& id = trans.first;
|
const auto& id = trans.first;
|
||||||
const auto& elements = isIdReverse(id);
|
const auto& elements = isIdReverse(id);
|
||||||
int gc1 = std::min(cartMapper_.cartesianIndex(elements.first), cartMapper_.cartesianIndex(elements.second));
|
int gc1 = std::min(cartMapper_.cartesianIndex(elements.first), cartMapper_.cartesianIndex(elements.second));
|
||||||
@ -715,7 +720,6 @@ removeSmallNonCartesianTransmissibilities_()
|
|||||||
if (gc2 - gc1 == 1 || gc2 - gc1 == cartDims[0] || gc2 - gc1 == cartDims[0]*cartDims[1] || gc2 - gc1 == 0)
|
if (gc2 - gc1 == 1 || gc2 - gc1 == cartDims[0] || gc2 - gc1 == cartDims[0]*cartDims[1] || gc2 - gc1 == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//remove transmissibilities less than the threshold (by default 1e-6 in the deck's unit system)
|
|
||||||
trans.second = 0.0;
|
trans.second = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user