mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass table argument to getGFR() and getWFR()
This commit is contained in:
parent
fda1d65494
commit
471a19e851
@ -127,7 +127,8 @@ static T getFlo(const VFPInjTable& table, const T& aqua, const T& liquid, const
|
||||
* @return Production rate of oil, gas or liquid.
|
||||
*/
|
||||
template <typename T>
|
||||
static T getWFR(const T& aqua, const T& liquid, const T& vapour, VFPProdTable::WFR_TYPE type) {
|
||||
static T getWFR(const VFPProdTable& table, const T& aqua, const T& liquid, const T& vapour) {
|
||||
auto type = table.getWFRType();
|
||||
switch(type) {
|
||||
case VFPProdTable::WFR_TYPE::WFR_WOR:
|
||||
//Water-oil ratio = water / oil
|
||||
@ -156,7 +157,8 @@ static T getWFR(const T& aqua, const T& liquid, const T& vapour, VFPProdTable::W
|
||||
* @return Production rate of oil, gas or liquid.
|
||||
*/
|
||||
template <typename T>
|
||||
static T getGFR(const T& aqua, const T& liquid, const T& vapour, VFPProdTable::GFR_TYPE type) {
|
||||
static T getGFR(const VFPProdTable& table, const T& aqua, const T& liquid, const T& vapour) {
|
||||
auto type = table.getGFRType();
|
||||
switch(type) {
|
||||
case VFPProdTable::GFR_TYPE::GFR_GOR:
|
||||
// Gas-oil ratio = gas / oil
|
||||
@ -506,8 +508,8 @@ inline VFPEvaluation bhp(const VFPProdTable& table,
|
||||
const double& alq) {
|
||||
//Find interpolation variables
|
||||
double flo = detail::getFlo(table, aqua, liquid, vapour);
|
||||
double wfr = detail::getWFR(aqua, liquid, vapour, table.getWFRType());
|
||||
double gfr = detail::getGFR(aqua, liquid, vapour, table.getGFRType());
|
||||
double wfr = detail::getWFR(table, aqua, liquid, vapour);
|
||||
double gfr = detail::getGFR(table, aqua, liquid, vapour);
|
||||
|
||||
//First, find the values to interpolate between
|
||||
//Recall that flo is negative in Opm, so switch sign.
|
||||
|
@ -54,8 +54,8 @@ double VFPProdProperties::thp(int table_id,
|
||||
// The usual case.
|
||||
// Recall that production rate is negative in Opm, so switch the sign.
|
||||
flo = -detail::getFlo(table, aqua, liquid, vapour);
|
||||
wfr = detail::getWFR(aqua, liquid, vapour, table.getWFRType());
|
||||
gfr = detail::getGFR(aqua, liquid, vapour, table.getGFRType());
|
||||
wfr = detail::getWFR(table, aqua, liquid, vapour);
|
||||
gfr = detail::getGFR(table, aqua, liquid, vapour);
|
||||
}
|
||||
|
||||
const std::vector<double> thp_array = table.getTHPAxis();
|
||||
@ -189,8 +189,8 @@ calculateBhpWithTHPTarget(const std::vector<double>& ipr_a,
|
||||
const double flo_bhp_middle = detail::getFlo(table, aqua_bhp_middle, liquid_bhp_middle, vapour_bhp_middle );
|
||||
|
||||
// we use the ratios based on the middle value of bhp_limit and bhp_safe_limit
|
||||
const double wfr = detail::getWFR(aqua_bhp_middle, liquid_bhp_middle, vapour_bhp_middle, table.getWFRType());
|
||||
const double gfr = detail::getGFR(aqua_bhp_middle, liquid_bhp_middle, vapour_bhp_middle, table.getGFRType());
|
||||
const double wfr = detail::getWFR(table, aqua_bhp_middle, liquid_bhp_middle, vapour_bhp_middle);
|
||||
const double gfr = detail::getGFR(table, aqua_bhp_middle, liquid_bhp_middle, vapour_bhp_middle);
|
||||
|
||||
// we get the flo sampling points from the table,
|
||||
// then extend it with zero and rate under bhp_limit for extrapolation
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
|
||||
//Find interpolation variables
|
||||
EvalWell flo = detail::getFlo(table, aqua, liquid, vapour);
|
||||
EvalWell wfr = detail::getWFR(aqua, liquid, vapour, table.getWFRType());
|
||||
EvalWell gfr = detail::getGFR(aqua, liquid, vapour, table.getGFRType());
|
||||
EvalWell wfr = detail::getWFR(table, aqua, liquid, vapour);
|
||||
EvalWell gfr = detail::getGFR(table, aqua, liquid, vapour);
|
||||
|
||||
//First, find the values to interpolate between
|
||||
//Value of FLO is negative in OPM for producers, but positive in VFP table
|
||||
|
Loading…
Reference in New Issue
Block a user