mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-21 22:42:57 -06:00
Merge pull request #2141 from totto82/fixGroupFraction
fix group fraction bug
This commit is contained in:
commit
20f767555e
@ -287,11 +287,11 @@ namespace Opm {
|
|||||||
|
|
||||||
// only count group under group control from its parent
|
// only count group under group control from its parent
|
||||||
if (isInjector) {
|
if (isInjector) {
|
||||||
const Group2::InjectionCMode& currentGroupControl = wellState.currentInjectionGroupControl(group.name());
|
const Group2::InjectionCMode& currentGroupControl = wellState.currentInjectionGroupControl(groupName);
|
||||||
if (currentGroupControl != Group2::InjectionCMode::FLD)
|
if (currentGroupControl != Group2::InjectionCMode::FLD)
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
const Group2::ProductionCMode& currentGroupControl = wellState.currentProductionGroupControl(group.name());
|
const Group2::ProductionCMode& currentGroupControl = wellState.currentProductionGroupControl(groupName);
|
||||||
if (currentGroupControl != Group2::ProductionCMode::FLD)
|
if (currentGroupControl != Group2::ProductionCMode::FLD)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -303,13 +303,13 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (groupTotalGuideRate == 0.0)
|
if (groupTotalGuideRate == 0.0)
|
||||||
return 0.0;
|
return 1.0;
|
||||||
|
|
||||||
double groupGuideRate = guideRate->get(group.name(), groupTarget);
|
double groupGuideRate = guideRate->get(group.name(), groupTarget);
|
||||||
return groupGuideRate / groupTotalGuideRate;
|
return groupGuideRate / groupTotalGuideRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void accumulateGroupFractions(const std::string& groupName, const std::string& controlGroupName, const Schedule& schedule, const WellStateFullyImplicitBlackoil& wellState,const int reportStepIdx, const GuideRate* guideRate, const Group2::GuideRateTarget& groupTarget, const bool isInjector, double fraction) {
|
inline void accumulateGroupFractions(const std::string& groupName, const std::string& controlGroupName, const Schedule& schedule, const WellStateFullyImplicitBlackoil& wellState,const int reportStepIdx, const GuideRate* guideRate, const Group2::GuideRateTarget& groupTarget, const bool isInjector, double& fraction) {
|
||||||
|
|
||||||
const Group2& group = schedule.getGroup2(groupName, reportStepIdx);
|
const Group2& group = schedule.getGroup2(groupName, reportStepIdx);
|
||||||
if (groupName != controlGroupName) {
|
if (groupName != controlGroupName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user