From f9af2c5084d10f019c5041239187517e0a9dc09d Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Fri, 30 Nov 2018 09:07:27 +0100 Subject: [PATCH] remove transmissibilities less then 1e-6 in the given unit system --- ebos/ecltransmissibility.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ebos/ecltransmissibility.hh b/ebos/ecltransmissibility.hh index 21062b3df..b4c2087c6 100644 --- a/ebos/ecltransmissibility.hh +++ b/ebos/ecltransmissibility.hh @@ -34,6 +34,8 @@ #include #include #include +#include + #include @@ -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; } } @@ -695,6 +703,7 @@ private: } const Vanguard& vanguard_; + Scalar transmissibility_threshold_; std::vector permeability_; std::unordered_map trans_; std::map, Scalar> transBoundary_;