Ensure flow from fixed-pressure node in standard network is propagated up.
This commit is contained in:
parent
97b5bc6209
commit
3e075ec92d
@ -879,13 +879,13 @@ File {} line {}.)", wname, location.keyword, location.filename, location.lineno)
|
|||||||
if (is_terminal_node) {
|
if (is_terminal_node) {
|
||||||
if (vfp_table > 0) {
|
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);
|
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));
|
node.terminal_pressure(pressure_item.getSIDouble(0));
|
||||||
nodes.push_back(node);
|
nodes.push_back(node);
|
||||||
// Remove the branch upstream if it was part of the network
|
// Need to add the flow further up the network in case of other fixed-pressure nodes
|
||||||
if (network.has_node(downtree_node) && network.has_node(uptree_node))
|
if (!uptree_node.empty())
|
||||||
network.drop_branch(uptree_node, downtree_node);
|
network.add_or_replace_branch(Network::Branch(downtree_node, uptree_node, 9999, 0.0));
|
||||||
} else {
|
} else {
|
||||||
if (vfp_table <= 0) {
|
if (vfp_table <= 0) {
|
||||||
// If vfp table is defaulted (or set to <=0) then the group is not part of the network.
|
// If vfp table is defaulted (or set to <=0) then the group is not part of the network.
|
||||||
|
Loading…
Reference in New Issue
Block a user