adding function operabilityCheckingUnderTHP to VFPProdProperties

To test the operability under THP limit.
This commit is contained in:
Kai Bao
2018-11-15 14:30:32 +01:00
parent b27dc3ec2e
commit dbe047a8a5
2 changed files with 41 additions and 0 deletions

View File

@@ -253,4 +253,35 @@ calculateBhpWithTHPTarget(const std::vector<double>& ipr_a,
void VFPProdProperties::
operabilityCheckingUnderTHP(const std::vector<double>& ipr_a,
const std::vector<double>& ipr_b,
const double bhp_limit,
const double thp_table_id,
const double thp_limit,
const double alq,
const double dp,
bool& obtain_solution_with_thp_limit,
bool& violate_bhp_limit_with_thp_limit) const
{
const double obtain_bhp = calculateBhpWithTHPTarget(ipr_a, ipr_b, bhp_limit, thp_table_id, thp_limit, alq, dp);
if (obtain_bhp > 0.) {
obtain_solution_with_thp_limit = true;
violate_bhp_limit_with_thp_limit = (obtain_bhp < bhp_limit);
if (obtain_bhp < thp_limit) {
std::cout << " obtain_bhp " << obtain_bhp / 1.e5 << " is SMALLER than thp limit " << thp_limit / 1.e5 << std::endl;
}
} else {
obtain_solution_with_thp_limit = false;
std::cout << " COULD NOT find an Intersection point, the well might need to be closed " << std::endl;
violate_bhp_limit_with_thp_limit = false;
}
}
}

View File

@@ -184,6 +184,16 @@ public:
const double alq,
const double dp) const;
void operabilityCheckingUnderTHP(const std::vector<double>& ipr_a,
const std::vector<double>& ipr_b,
const double bhp_limit,
const double thp_table_id,
const double thp_limit,
const double alq,
const double dp,
bool& obtain_solution_with_thp_limit,
bool& voilate_bhp_limit_with_thp_limit) const;
protected:
// calculate a group bhp values with a group of flo rate values
std::vector<double> bhpwithflo(const std::vector<double>& flos,