From 3e075ec92d704753fadc1f53499e2403296ab463 Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Fri, 3 Nov 2023 15:49:24 +0100 Subject: [PATCH] Ensure flow from fixed-pressure node in standard network is propagated up. --- src/opm/input/eclipse/Schedule/KeywordHandlers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp b/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp index 35e70a17a..e2b92b31b 100644 --- a/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp +++ b/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp @@ -879,13 +879,13 @@ File {} line {}.)", wname, location.keyword, location.filename, location.lineno) if (is_terminal_node) { if (vfp_table > 0) { std::string msg = fmt::format("The group {} is a terminal node of the network and should not have a vfp table assigned to it.", group_name); - throw OpmInputError(msg, handlerContext.keyword.location()); + OpmLog::warning(OpmInputError::format(msg, handlerContext.keyword.location())); } node.terminal_pressure(pressure_item.getSIDouble(0)); nodes.push_back(node); - // Remove the branch upstream if it was part of the network - if (network.has_node(downtree_node) && network.has_node(uptree_node)) - network.drop_branch(uptree_node, downtree_node); + // Need to add the flow further up the network in case of other fixed-pressure nodes + if (!uptree_node.empty()) + network.add_or_replace_branch(Network::Branch(downtree_node, uptree_node, 9999, 0.0)); } else { if (vfp_table <= 0) { // If vfp table is defaulted (or set to <=0) then the group is not part of the network.