mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 20:30:55 -06:00
Allow empty non-group leaf nodes
This commit is contained in:
1 parent
a1facc4598
commit
0a36678709
1 file changed
+6
-5
@@ -755,12 +755,13 @@ updateNetworkLeafNodeProductionRates(const Schedule& schedule,
|
||||
if (network.active()) {
|
||||
const int np = wellState.numPhases();
|
||||
for (const auto& group_name : network.leaf_nodes()) {
|
||||
assert(schedule[reportStepIdx].groups.has(group_name));
|
||||
const auto& group = schedule[reportStepIdx].groups.get(group_name);
|
||||
std::vector<Scalar> network_rates(np, 0.0);
|
||||
if (group.numWells() > 0) {
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
network_rates[phase] = sumWellPhaseRates(false, group, schedule, wellState, reportStepIdx, phase, /*isInjector*/ false, /*network*/ true);
|
||||
if (schedule[reportStepIdx].groups.has(group_name)) { // Allow empty leaf nodes that are not groups
|
||||
const auto& group = schedule[reportStepIdx].groups.get(group_name);
|
||||
if (group.numWells() > 0) {
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
network_rates[phase] = sumWellPhaseRates(false, group, schedule, wellState, reportStepIdx, phase, /*isInjector*/ false, /*network*/ true);
|
||||
}
|
||||
}
|
||||
}
|
||||
group_state.update_network_leaf_node_production_rates(group_name, network_rates);
|
||||
|
||||
Reference in new issue
Block a user