Merge pull request #3730 from atgeirr/fix-efficiency-alq-network

Account for efficiency when adding lift gas to network flows.
This commit is contained in:
Atgeirr Flø Rasmussen 2021-12-09 07:49:16 +01:00 committed by GitHub
commit e2cdab208b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -703,7 +703,17 @@ namespace WellGroupHelpers
if (network.node(node).add_gas_lift_gas()) {
const auto& group = schedule.getGroup(node, report_time_step);
for (const std::string& wellname : group.wells()) {
node_inflows[node][BlackoilPhases::Vapour] += well_state.getALQ(wellname);
const Well& well = schedule.getWell(wellname, report_time_step);
// Here we use the efficiency unconditionally, but if WEFAC item 3
// for the well is false (it defaults to true) then we should NOT use
// the efficiency factor. Fixing this requires not only changing the
// code here, but also:
// - Adding a member to the well for this flag, and setting it in Schedule::handleWEFAC().
// - Making the wells' maximum flows (i.e. not time-averaged by using a efficiency factor)
// available and using those (for wells with WEFAC(3) true only) when accumulating group
// rates, but ONLY for network calculations.
const double efficiency = well.getEfficiencyFactor();
node_inflows[node][BlackoilPhases::Vapour] += well_state.getALQ(wellname) * efficiency;
}
}
}