21#ifndef OPM_WELLGROUPHELPERS_HEADER_INCLUDED
22#define OPM_WELLGROUPHELPERS_HEADER_INCLUDED
24#include "opm/material/fluidsystems/PhaseUsageInfo.hpp"
26#include <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
27#include <opm/input/eclipse/Schedule/Group/GSatProd.hpp>
28#include <opm/input/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
29#include <opm/simulators/utils/ParallelCommunication.hpp>
30#include <opm/input/eclipse/Schedule/ScheduleState.hpp>
40template<
class Scalar>
class GroupState;
43template<
class Scalar>
class VFPProdProperties;
44template<
typename Scalar,
typename IndexTraits>
class WellState;
45class FieldPropsManager;
49template<
typename Scalar,
typename IndexTraits>
56 static Scalar sumWellPhaseRates(
bool res_rates,
57 const Opm::Group& group,
72 static Scalar satelliteProductionRate(
const SummaryState& summaryState,
75 const GSatProd::GSatProdGroupProp::Rate
rateComp,
78 static std::optional<GSatProd::GSatProdGroupProp::Rate>
81 static void setCmodeGroup(
const Group& group,
87 static void accumulateGroupEfficiencyFactor(
const Group& group,
92 static Scalar sumWellSurfaceRates(
const Group& group,
101 static std::pair<std::optional<std::string>, Scalar>
106 const Parallel::Communication& comm,
110 static Scalar sumWellResRates(
const Group& group,
118 static Scalar sumSolventRates(
const Group& group,
122 const bool injector);
124 static void updateGroupTargetReduction(
const Group& group,
127 const bool isInjector,
134 static void updateVREPForGroups(
const Group& group,
141 template <
class RegionalValues>
142 static void updateGpMaintTargetForGroups(
const Group& group,
150 static void updateReservoirRatesInjectionGroups(
const Group& group,
157 static void updateSurfaceRatesInjectionGroups(
const Group& group,
164 static void updateWellRates(
const Group& group,
170 static void updateGroupProductionRates(
const Group& group,
177 static void updateNetworkLeafNodeProductionRates(
const Schedule& schedule,
184 static void updateWellRatesFromGroupTargetScale(
const Scalar scale,
192 static void updateREINForGroups(
const Group& group,
201 static std::map<std::string, Scalar>
202 computeNetworkPressures(
const Network::ExtNetwork&
network,
207 const Parallel::Communication& comm,
210 static GuideRate::RateVector
212 const std::string& name);
214 static GuideRate::RateVector
219 static Scalar getGuideRate(
const std::string& name,
225 const GuideRateModel::Target
target);
227 static Scalar getGuideRateInj(
const std::string& name,
233 const GuideRateModel::Target
target,
243 const int report_step,
252 const int report_step,
258 static std::pair<bool, Scalar>
259 checkGroupConstraintsInj(
const std::string& name,
260 const std::string& parent,
276 getWellGroupTargetInjector(
const std::string& name,
277 const std::string& parent,
291 static std::vector<std::string>
292 groupChainTopBot(
const std::string&
bottom,
293 const std::string&
top,
295 const int report_step);
300 isInGroupChainTopBot(
const std::string&
bottom,
301 const std::string&
top,
303 const int report_step);
306 control_group(
const Group& group,
311 static std::pair<bool, Scalar>
312 checkGroupConstraintsProd(
const std::string& name,
313 const std::string& parent,
327 getWellGroupTargetProducer(
const std::string& name,
328 const std::string& parent,
341 template <
class AverageRegionalPressureType>
342 static void setRegionAveragePressureCalculator(
const Group& group,
345 const FieldPropsManager&
fp,
Definition DeferredLogger.hpp:57
Definition GroupState.hpp:41
Definition GasLiftGroupInfo.hpp:37
Class which linearly interpolates BHP as a function of rate, tubing head pressure,...
Definition VFPProdProperties.hpp:38
Definition WellGroupHelpers.hpp:51
static int updateGroupControlledWells(const Schedule &schedule, const WellStateType &well_state, GroupState< Scalar > &group_state, const SummaryState &summary_state, const GuideRate *guideRate, const int report_step, const std::string &group_name, const bool is_production_group, const Phase injection_phase)
update the number of wells that are actively under group control for a given group with name given by...
Definition WellGroupHelpers.cpp:1214
static int groupControlledWells(const Schedule &schedule, const WellStateType &well_state, const GroupState< Scalar > &group_state, const int report_step, const std::string &group_name, const std::string &always_included_child, const bool is_production_group, const Phase injection_phase)
returns the number of wells that are actively under group control for a given group with name given b...
Definition WellGroupHelpers.cpp:1341
static std::pair< std::optional< std::string >, Scalar > worstOffendingWell(const Group &group, const Schedule &schedule, const int reportStepIdx, const Group::ProductionCMode &offendedControl, const Parallel::Communication &comm, const WellStateType &wellState, DeferredLogger &deferred_logger)
Returns the name of the worst offending well and its fraction (i.e. violated_phase / preferred_phase)
Definition WellGroupHelpers.cpp:2124
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition WellState.hpp:66
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240