Merge pull request #436 from totto82/remove_small_trans

remove transmissibilities less then 1e-6 in the given unit system
This commit is contained in:
Atgeirr Flø Rasmussen 2018-12-11 11:26:35 +01:00 committed by GitHub
commit c26aed1d42

View File

@ -34,6 +34,8 @@
#include <opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
#include <opm/parser/eclipse/Units/Units.hpp>
#include <opm/grid/CpGrid.hpp>
@ -90,7 +92,10 @@ class EclTransmissibility
public:
EclTransmissibility(const Vanguard& vanguard)
: vanguard_(vanguard)
{}
{
const Opm::UnitSystem& unitSystem = vanguard_.deck().getActiveUnitSystem();
transmissibility_threshold_ = unitSystem.parse("Transmissibility").getSIScaling() * 1e-6;
}
/*!
* \brief Actually compute the transmissibilty over a face as a pre-compute step.
@ -345,6 +350,9 @@ public:
outsideCartElemIdx,
faceDir);
if (trans < transmissibility_threshold_) //remove trans less than 1e-6 in given unit
trans = 0.0;
trans_[isId_(elemIdx, outsideElemIdx)] = trans;
}
}
@ -752,6 +760,7 @@ private:
}
const Vanguard& vanguard_;
Scalar transmissibility_threshold_;
std::vector<DimMatrix> permeability_;
std::unordered_map<std::uint64_t, Scalar> trans_;
std::map<std::pair<unsigned, unsigned>, Scalar> transBoundary_;