Automatic choke

This commit is contained in:
Paul
2023-10-03 13:28:23 +02:00
parent 0137bd566c
commit 30e1f5178c
9 changed files with 175 additions and 31 deletions

View File

@@ -41,6 +41,7 @@
#include <opm/simulators/wells/TargetCalculator.hpp>
#include <opm/simulators/wells/VFPProdProperties.hpp>
#include <opm/simulators/wells/WellState.hpp>
#include <opm/simulators/wells/GroupState.hpp>
#include <algorithm>
#include <cassert>
@@ -935,7 +936,15 @@ computeNetworkPressures(const Network::ExtNetwork& network,
#endif
} else {
// Table number specified as 9999 in the deck, no pressure loss.
node_pressures[node] = up_press;
if (network.node(node).as_choke()){
// Node pressure is set to the common THP of the wells.
// The choke pressure must be non-negative therefore the node pressure of
// the auto-choke node must be larger or equal to the pressure of the uptree node of its branch
const auto group_thp = group_state.well_group_thp(node);
node_pressures[node] = group_thp >= up_press ? group_thp : up_press;
} else {
node_pressures[node] = up_press;
}
}
}
}