Merge pull request #3924 from totto82/steeringBHPtoHighestRate

Steer bhp towards the solution with the highest production rate
This commit is contained in:
Tor Harald Sandve authored and GitHub committed 2022-06-07 10:35:53 +02:00
commit cec8e7c724
1 file changed
+2 -1
+2 -1
View File
@@ -166,7 +166,8 @@ EvalWell VFPProdProperties::bhp(const int table_id,
detail::VFPEvaluation bhp_val = detail::interpolate(table, flo_i, thp_i, wfr_i, gfr_i, alq_i); detail::VFPEvaluation bhp_val = detail::interpolate(table, flo_i, thp_i, wfr_i, gfr_i, alq_i);
bhp = (bhp_val.dwfr * wfr) + (bhp_val.dgfr * gfr) - (bhp_val.dflo * flo); bhp = (bhp_val.dwfr * wfr) + (bhp_val.dgfr * gfr) - (std::max(0.0, bhp_val.dflo) * flo);
bhp.setValue(bhp_val.value); bhp.setValue(bhp_val.value);
return bhp; return bhp;
} }