Account for efficiency when adding lift gas to network flows.

This commit is contained in:
Atgeirr Flø Rasmussen 2021-12-08 15:54:12 +01:00
parent 43c0931cd3
commit 819d88a1a7

View File

@ -703,7 +703,17 @@ namespace WellGroupHelpers
if (network.node(node).add_gas_lift_gas()) { if (network.node(node).add_gas_lift_gas()) {
const auto& group = schedule.getGroup(node, report_time_step); const auto& group = schedule.getGroup(node, report_time_step);
for (const std::string& wellname : group.wells()) { 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;
} }
} }
} }