mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5919 from vkip/network_empty_leaf_nodes
Allow empty leaf nodes that do not exist in GRUPTREE
This commit is contained in:
commit
ff29f04cdb
@ -920,7 +920,14 @@ computeNetworkPressures(const Network::ExtNetwork& network,
|
||||
// Starting with the leaf nodes of the network, get the flow rates
|
||||
// from the corresponding groups.
|
||||
std::map<std::string, std::vector<Scalar>> node_inflows;
|
||||
const std::vector<Scalar> zero_rates(3, 0.0);
|
||||
for (const auto& node : leaf_nodes) {
|
||||
// Guard against empty leaf nodes (may not be present in GRUPTREE)
|
||||
if (!group_state.has_production_rates(node)) {
|
||||
node_inflows[node] = zero_rates;
|
||||
continue;
|
||||
}
|
||||
|
||||
node_inflows[node] = group_state.production_rates(node);
|
||||
// Add the ALQ amounts to the gas rates if requested.
|
||||
if (network.node(node).add_gas_lift_gas()) {
|
||||
|
Loading…
Reference in New Issue
Block a user