diff --git a/opm/simulators/wells/VFPInjProperties.cpp b/opm/simulators/wells/VFPInjProperties.cpp index 3a2b56c75..0899a4088 100644 --- a/opm/simulators/wells/VFPInjProperties.cpp +++ b/opm/simulators/wells/VFPInjProperties.cpp @@ -31,6 +31,8 @@ #include +#include + namespace Opm { double VFPInjProperties::bhp(int table_id, @@ -52,7 +54,10 @@ double VFPInjProperties::thp(int table_id, const VFPInjTable& table = detail::getTable(m_tables, table_id); //Find interpolation variables - double flo = detail::getFlo(table, aqua, liquid, vapour); + const double flo = detail::getFlo(table, aqua, liquid, vapour); + if (std::abs(flo) < std::numeric_limits::epsilon()) { + return 0.; + } const std::vector thp_array = table.getTHPAxis(); int nthp = thp_array.size();