Honor GEFAC for the top most group when calculating well phase rates.

Previously GEFAC was not applied here.
This commit is contained in:
Markus Blatt 2021-02-25 21:33:42 +01:00
parent 1ce5c59851
commit 1d9f13e310

View File

@ -128,10 +128,10 @@ namespace WellGroupHelpers
double rate = 0.0;
for (const std::string& groupName : group.groups()) {
const Group& groupTmp = schedule.getGroup(groupName, reportStepIdx);
rate += groupTmp.getGroupEfficiencyFactor()
* sumWellPhaseRates(rates, groupTmp, schedule, wellState, reportStepIdx, phasePos, injector);
rate += sumWellPhaseRates(rates, groupTmp, schedule, wellState, reportStepIdx, phasePos, injector);
}
const auto& end = wellState.wellMap().end();
for (const std::string& wellName : group.wells()) {
const auto& it = wellState.wellMap().find(wellName);
if (it == end) // the well is not found
@ -159,7 +159,8 @@ namespace WellGroupHelpers
else
rate -= factor * rates[wellrate_index + phasePos];
}
return rate;
const auto& gefac = group.getGroupEfficiencyFactor();
return gefac * rate;
}
double sumWellRates(const Group& group,