|
GroupStateHelper.hpp
Go to the documentation of this file.
273 std::vector<Scalar> getGroupRatesAvailableForHigherLevelControl(const Group& group, const bool is_injector) const;
336 std::vector<std::string> groupChainTopBot(const std::string& bottom, const std::string& top) const;
385 bool isReservoirCouplingMasterGroup(const Group& group) const { return rescoup_.isMasterGroup(group.name()); }
389 bool isReservoirCouplingSlaveGroup(const Group& group) const { return rescoup_.isSlaveGroup(group.name()); }
719 Scalar getProductionGroupTargetForMode_(const Group& group, const Group::ProductionCMode cmode) const;
773 Scalar sumProductionRateForControlMode_(const Group& group, Group::ProductionCMode cmode) const;
872 // NOTE: The deferred logger does not change the object "meaningful" state, so it should be ok to
875 // NOTE: The phase usage info seems to be read-only throughout the simulation, so it should be safe
899 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regional_average_pressure_calculator)
903 this->setRegionAveragePressureCalculator(this->schedule_.getGroup(groupName, this->report_step_),
948 // GPMAINT is not supported for reservoir coupling master groups since master groups do not have
949 // subordinate wells in the master reservoir, so the slaves cannot influence the master reservoir's
951 // Even specifying GPMAINT on a group superior to the master group might not make sense, since if the
953 // the master group's target (that is sent to the slave) could only indirectly influence the master
954 // reservoir's average pressure by affecting the guide rate fractions distributed to actual wells
964 // GPMAINT is not supported for reservoir coupling slave groups since their targets will be overridden
1032 // we only activate gpmaint if pressure is lower than the target regional pressure for injectors
#define OPM_DEFLOG_THROW(Exception, message, deferred_logger) Definition: DeferredLoggingErrorHelpers.hpp:47 Definition: DeferredLogger.hpp:57 void logMessages() Definition: GroupStateHelper.hpp:90 GroupStateGuard(GroupStateGuard &&)=delete GroupStateGuard & operator=(GroupStateGuard &&)=delete GroupStateGuard(GroupStateHelper &group_state_helper, GroupState< Scalar > &group_state) Definition: GroupStateHelper.hpp:92 GroupStateGuard(const GroupStateGuard &)=delete ~GroupStateGuard() Definition: GroupStateHelper.hpp:100 GroupStateGuard & operator=(const GroupStateGuard &)=delete RAII guard that owns a DeferredLogger and auto-gathers on destruction. Definition: GroupStateHelper.hpp:130 ScopedLoggerGuard & operator=(const ScopedLoggerGuard &)=delete ScopedLoggerGuard(ScopedLoggerGuard &&other) noexcept Definition: GroupStateHelper.hpp:175 ScopedLoggerGuard(const ScopedLoggerGuard &)=delete ScopedLoggerGuard(const GroupStateHelper &helper, bool do_mpi_gather=true) Constructor for scoped logger guard. Definition: GroupStateHelper.hpp:137 ~ScopedLoggerGuard() Definition: GroupStateHelper.hpp:145 ScopedLoggerGuard & operator=(ScopedLoggerGuard &&)=delete Definition: GroupStateHelper.hpp:61 WellStateGuard(WellStateGuard &&)=delete WellStateGuard(const WellStateGuard &)=delete ~WellStateGuard() Definition: GroupStateHelper.hpp:71 WellStateGuard & operator=(const WellStateGuard &)=delete WellStateGuard & operator=(WellStateGuard &&)=delete WellStateGuard(GroupStateHelper &groupStateHelper, WellState< Scalar, IndexTraits > &well_state) Definition: GroupStateHelper.hpp:63 Definition: GroupStateHelper.hpp:57 std::optional< Scalar > getProductionGroupRateLimit(const Group &group, const Group::ProductionCMode rate_type) const Get the limit on one production rate type of a group, if any. void updateWellRatesFromGroupTargetScale(const Scalar scale, const Group &group, bool is_injector, WellState< Scalar, IndexTraits > &well_state) const std::pair< Scalar, Group::ProductionCMode > getAutoChokeGroupProductionTargetRate(const Group &bottom_group, const Group &group, const std::vector< Scalar > &resv_coeff, Scalar efficiencyFactor) const GuideRateModel::Target getProductionGuideTargetModeFromControlMode(const Group::ProductionCMode cmode) const Scalar wellRateContributionToGroup(const std::string &well_name, const int phase_pos, const bool res_rates, const bool is_injector, const bool network=false, const WellState< Scalar, IndexTraits > *well_state=nullptr) const The contribution of a single well to a group rate sum. void setRegionAveragePressureCalculator(const Group &group, const FieldPropsManager &fp, std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > ®ional_average_pressure_calculator) const Definition: GroupStateHelper.hpp:896 void setCmodeGroup(const Group &group) Scalar reservoirCouplingMasterGroupGasLiftRate(const Group &group, const bool network) const Lift gas rate the slave reported for a reservoir coupling master group. std::vector< std::string > groupChainTopBot(const std::string &bottom, const std::string &top) const void updateVREPForGroups(const Group &group) void updateWellRates(const Group &group, const WellState< Scalar, IndexTraits > &well_state_nupcol, WellState< Scalar, IndexTraits > &well_state) const ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster() Definition: GroupStateHelper.hpp:452 GroupState< Scalar > & groupState() const Definition: GroupStateHelper.hpp:345 Scalar sumWellResRates(const Group &group, const int phase_pos, const bool injector) const void accumulateGroupEfficiencyFactor(const Group &group, Scalar &factor) const int groupControlledWells(const std::string &group_name, const std::string &always_included_child, const bool is_production_group, const Phase injection_phase) const const PhaseUsageInfo< IndexTraits > & phaseUsage() const Definition: GroupStateHelper.hpp:402 const ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster() const Definition: GroupStateHelper.hpp:456 const SummaryState & summaryState() const Definition: GroupStateHelper.hpp:490 const GuideRate & guideRate() const Definition: GroupStateHelper.hpp:350 std::pair< std::optional< std::string >, Scalar > worstOffendingWell(const Group &group, const Group::ProductionCMode &offended_control) const Returns the name of the worst offending well and its fraction (i.e. violated_phase / preferred_phase) ReservoirCoupling::Proxy< Scalar > & rescoup() Definition: GroupStateHelper.hpp:444 std::pair< std::optional< Scalar >, std::optional< Scalar > > getGasLiftGroupLimits(const Group &group) const Gas lift limits of a group: maximum lift gas and maximum total gas. void updateReservoirRatesInjectionGroups(const Group &group) void updatePreviousGroupProductionRates(const Group &group) bool isReservoirCouplingSlaveGroup(const Group &group) const Definition: GroupStateHelper.hpp:389 const WellState< Scalar, IndexTraits > & wellState() const Definition: GroupStateHelper.hpp:589 GuideRate::RateVector getWellRateVector(const std::string &name) const ScopedLoggerGuard pushLogger(bool do_mpi_gather=true) const Push a new logger onto the stack with auto-cleanup on destruction. Definition: GroupStateHelper.hpp:424 const Parallel::Communication & comm() const Definition: GroupStateHelper.hpp:254 GuideRateModel::Target getInjectionGuideTargetMode(Phase injection_phase) const Get the guide rate target mode for an injection phase. std::pair< Group::ProductionCMode, Scalar > checkGroupProductionConstraints(const Group &group) const Scalar sumSolventRates(const Group &group, const bool is_injector) const const Schedule & schedule() const Definition: GroupStateHelper.hpp:439 void updateGroupTargetReduction(const Group &group, const bool is_injector) bool isMasterGroupEligibleForInjectionGuideRate(const std::string &group_name, Phase injection_phase) const Whether a reservoir-coupling master group is eligible to participate in its parent's injection guide-... std::pair< bool, Scalar > checkGroupConstraintsInj(const std::string &name, const std::string &parent, const Group &group, const Scalar *rates, const Phase injection_phase, const Scalar efficiency_factor, const std::vector< Scalar > &resv_coeff, const bool check_guide_rate, const bool assume_fld_control=false) const Check whether a well or group violates an injection constraint of an ancestor group. Scalar sumWellGasLiftHeadroom(const Group &group) const Sum how much more lift gas the gas lift wells below a group can take. GuideRate::RateVector getProductionGroupRateVector(const std::string &group_name) const void updateGroupProductionRates(const Group &group) bool terminalOutput() const Definition: GroupStateHelper.hpp:525 typename SingleWellState< Scalar, IndexTraits >::GroupTarget GroupTarget Definition: GroupStateHelper.hpp:197 bool isMasterGroupEligibleForGuideRate(const std::string &group_name) const Whether a reservoir-coupling master group is eligible to participate in its parent's guide-rate distr... void updateGpMaintTargetForGroups(const Group &group, const RegionalValues ®ional_values, const double dt) Definition: GroupStateHelper.hpp:931 int phaseToActivePhaseIdx(const Phase phase) const std::pair< bool, Scalar > checkGroupConstraintsProd(const std::string &name, const std::string &parent, const Group &group, const Scalar *rates, const Scalar efficiency_factor, const std::vector< Scalar > &resv_coeff, const bool check_guide_rate) const DeferredLogger & deferredLogger() const Get the deferred logger. Definition: GroupStateHelper.hpp:258 Scalar sumWellSurfaceRates(const Group &group, const int phase_pos, const bool injector) const void updateNetworkLeafNodeRates() Scalar sumWellGasLiftRates(const Group &group, const bool network=false) const Sum the lift gas rates (ALQ) of the open producers below a group. void setReportStep(int report_step) Definition: GroupStateHelper.hpp:485 int updateGroupControlledWells(const bool is_production_group, const Phase injection_phase) void updateState(WellState< Scalar, IndexTraits > &well_state, GroupState< Scalar > &group_state) std::vector< Scalar > getGroupRatesAvailableForHigherLevelControl(const Group &group, const bool is_injector) const bool isReservoirCouplingMasterGroup(const Group &group) const Definition: GroupStateHelper.hpp:385 const ReservoirCoupling::Proxy< Scalar > & rescoup() const Definition: GroupStateHelper.hpp:448 bool isReservoirCouplingMaster() const Definition: GroupStateHelper.hpp:383 const ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave() const Definition: GroupStateHelper.hpp:463 Scalar getProductionGroupTargetForMode(const Group &group, const Group::ProductionCMode cmode) const Get the production target for a specific control mode (not necessarily the active one). WellStateGuard pushWellState(WellState< Scalar, IndexTraits > &well_state) Definition: GroupStateHelper.hpp:429 Scalar getInjectionGroupTarget(const Group &group, const Phase &injection_phase, const std::vector< Scalar > &resv_coeff) const GroupStateGuard pushGroupState(GroupState< Scalar > &group_state) Definition: GroupStateHelper.hpp:406 ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave() Definition: GroupStateHelper.hpp:460 Scalar sumWellPhaseRates(bool res_rates, const Group &group, const int phase_pos, const bool injector, const bool network=false) const std::optional< GroupTarget > getWellGroupTargetProducer(const std::string &name, const std::string &parent, const Group &group, const Scalar *rates, const Scalar efficiency_factor, const std::vector< Scalar > &resv_coeff, std::optional< Group::ProductionCMode > target_cmode=std::nullopt) const void updateREINForGroups(const Group &group, bool sum_rank) bool isReservoirCouplingSlave() const Definition: GroupStateHelper.hpp:387 GuideRateModel::Target getProductionGuideTargetMode(const Group &group) const Get the guide rate target mode for a production group. void updateNONEProductionGroups() Set production control to NONE for groups not targeting any well. Scalar getProductionGroupTarget(const Group &group) const std::optional< GroupTarget > getWellGroupTargetInjector(const std::string &name, const std::string &parent, const Group &group, const Scalar *rates, const Phase injection_phase, const Scalar efficiency_factor, const std::vector< Scalar > &resv_coeff) const GroupStateHelper(WellState< Scalar, IndexTraits > &well_state, GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summary_state, const GuideRate &guide_rate, const PhaseUsageInfo< IndexTraits > &phase_usage_info, const Parallel::Communication &comm, bool terminal_output) void updateSurfaceRatesInjectionGroups(const Group &group) Definition: GroupState.hpp:42 Definition: GasLiftGroupInfo.hpp:40 Thin proxy for reservoir coupling master/slave pointers. Definition: RescoupProxy.hpp:54 Definition: ReservoirCouplingMaster.hpp:43 Definition: ReservoirCouplingSlave.hpp:40 Definition: WellState.hpp:68 Dune::Communication< MPIComm > Communication Definition: ParallelCommunication.hpp:30 RateKind Selects which kind of rate to retrieve from slave group data. Definition: ReservoirCoupling.hpp:196 Phase Phase indices for reservoir coupling, we currently only support black-oil phases (oil,... Definition: ReservoirCoupling.hpp:184 Definition: blackoilbioeffectsmodules.hh:45 Opm::DeferredLogger gatherDeferredLogger(const Opm::DeferredLogger &local_deferredlogger, Parallel::Communication communicator) Create a global log combining local logs. Definition: SingleWellState.hpp:153 |