Adapt test cases and vfpprint

This commit is contained in:
Tor Harald Sandve
2022-03-11 11:03:34 +01:00
parent b1b23a57de
commit e875849497
3 changed files with 31 additions and 8 deletions

View File

@@ -661,10 +661,14 @@ computeBhpAtThpLimitProdCommon(const std::function<std::vector<double>(const dou
const double vfp_ref_depth = table.getDatumDepth();
const double thp_limit = this->getTHPConstraint(summary_state);
const double dp = wellhelpers::computeHydrostaticCorrection(this->refDepth(), vfp_ref_depth, rho, this->gravity());
auto fbhp = [this, &controls, thp_limit, dp, alq_value](const std::vector<double>& rates) {
assert(rates.size() == 3);
const auto& wfr = this->vfpProperties()->getExplicitWFR(controls.vfp_table_number, this->indexOfWell());
const auto& gfr = this->vfpProperties()->getExplicitGFR(controls.vfp_table_number, this->indexOfWell());
const bool vfpexp = this->vfpExplicit();
return this->vfpProperties()->getProd()
->bhp(controls.vfp_table_number, rates[Water], rates[Oil], rates[Gas], thp_limit, alq_value) - dp;
->bhp(controls.vfp_table_number, rates[Water], rates[Oil], rates[Gas], thp_limit, alq_value, wfr, gfr, vfpexp) - dp;
};
// Make the flo() function.