mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
return zero thp value for extremely small injection rate
it is a finding from one of the test case.
This commit is contained in:
parent
ea8a631ee0
commit
913ad21733
@ -31,6 +31,8 @@
|
||||
|
||||
#include <opm/simulators/wells/VFPHelpers.hpp>
|
||||
|
||||
#include <limits>
|
||||
|
||||
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<double>::epsilon()) {
|
||||
return 0.;
|
||||
}
|
||||
|
||||
const std::vector<double> thp_array = table.getTHPAxis();
|
||||
int nthp = thp_array.size();
|
||||
|
Loading…
Reference in New Issue
Block a user