Add the option to include gas lift for network calculations.

This commit is contained in:
Atgeirr Flø Rasmussen
2020-11-09 15:04:45 +01:00
parent 307315a03d
commit 8716dbfcfd
3 changed files with 15 additions and 3 deletions

View File

@@ -1284,7 +1284,8 @@ namespace Opm {
if (!network.active()) {
return;
}
node_pressures_ = WellGroupHelpers::computeNetworkPressures(network, well_state_, *(vfp_properties_->getProd()));
node_pressures_ = WellGroupHelpers::computeNetworkPressures(
network, well_state_, *(vfp_properties_->getProd()), schedule(), reportStepIdx);
// Set the thp limits of wells
for (auto& well : well_container_) {

View File

@@ -592,7 +592,9 @@ namespace WellGroupHelpers
std::map<std::string, double>
computeNetworkPressures(const Opm::Network::ExtNetwork& network,
const WellStateFullyImplicitBlackoil& well_state,
const VFPProdProperties& vfp_prod_props)
const VFPProdProperties& vfp_prod_props,
const Schedule& schedule,
const int report_time_step)
{
// TODO: Only dealing with production networks for now.
@@ -628,6 +630,13 @@ namespace WellGroupHelpers
std::map<std::string, std::vector<double>> node_inflows;
for (const auto& node : leaf_nodes) {
node_inflows[node] = well_state.currentProductionGroupRates(node);
// Add the ALQ amounts to the gas rates if requested.
if (network.node(node).add_gas_lift_gas()) {
const auto& group = schedule.getGroup(node, report_time_step);
for (const std::string& wellname : group.wells()) {
node_inflows[node][BlackoilPhases::Vapour] += well_state.getALQ(wellname);
}
}
}
// Accumulate in the network, towards the roots. Note that a

View File

@@ -264,7 +264,9 @@ namespace WellGroupHelpers
std::map<std::string, double>
computeNetworkPressures(const Opm::Network::ExtNetwork& network,
const WellStateFullyImplicitBlackoil& well_state,
const VFPProdProperties& vfp_prod_props);
const VFPProdProperties& vfp_prod_props,
const Schedule& schedule,
const int report_time_step);
GuideRate::RateVector
getRateVector(const WellStateFullyImplicitBlackoil& well_state, const PhaseUsage& pu, const std::string& name);