Opm::GroupStateHelper< Scalar, IndexTraits > Class Template Reference

#include <GroupStateHelper.hpp>

Inheritance diagram for Opm::GroupStateHelper< Scalar, IndexTraits >:
Inheritance graph

Classes

class  GroupStateGuard
 
class  ScopedLoggerGuard
 RAII guard that owns a DeferredLogger and auto-gathers on destruction. More...
 
class  WellStateGuard
 

Public Types

using GroupTarget = typename SingleWellState< Scalar, IndexTraits >::GroupTarget
 

Public Member Functions

 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 accumulateGroupEfficiencyFactor (const Group &group, Scalar &factor) const
 
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
 
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
 
std::pair< Group::ProductionCMode, Scalar > checkGroupProductionConstraints (const Group &group) const
 
const Parallel::Communicationcomm () const
 
DeferredLoggerdeferredLogger () const
 Get the deferred logger. More...
 
std::vector< Scalar > getGroupRatesAvailableForHigherLevelControl (const Group &group, const bool is_injector) const
 
Scalar getInjectionGroupTarget (const Group &group, const Phase &injection_phase, const std::vector< Scalar > &resv_coeff) const
 
GuideRateModel::Target getInjectionGuideTargetMode (Phase injection_phase) const
 Get the guide rate target mode for an injection phase. More...
 
Scalar getProductionGroupTarget (const Group &group) const
 
Scalar getProductionGroupTargetForMode (const Group &group, const Group::ProductionCMode cmode) const
 Get the production target for a specific control mode (not necessarily the active one). More...
 
GuideRateModel::Target getProductionGuideTargetMode (const Group &group) const
 Get the guide rate target mode for a production group. More...
 
std::pair< Scalar, Group::ProductionCMode > getAutoChokeGroupProductionTargetRate (const Group &bottom_group, const Group &group, const std::vector< Scalar > &resv_coeff, Scalar efficiencyFactor) const
 
GuideRate::RateVector getProductionGroupRateVector (const std::string &group_name) const
 
std::optional< GroupTargetgetWellGroupTargetInjector (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
 
std::optional< GroupTargetgetWellGroupTargetProducer (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
 
GuideRate::RateVector getWellRateVector (const std::string &name) const
 
std::vector< std::string > groupChainTopBot (const std::string &bottom, const std::string &top) const
 
int groupControlledWells (const std::string &group_name, const std::string &always_included_child, const bool is_production_group, const Phase injection_phase) const
 
GroupState< Scalar > & groupState () const
 
const GuideRate & guideRate () const
 
bool isRank0 () const
 
bool isReservoirCouplingMaster () const
 
bool isReservoirCouplingMasterGroup (const Group &group) const
 
bool isReservoirCouplingSlave () const
 
bool isReservoirCouplingSlaveGroup (const Group &group) const
 
constexpr int numPhases () const
 
int phaseToActivePhaseIdx (const Phase phase) const
 
const PhaseUsageInfo< IndexTraits > & phaseUsage () const
 
GroupStateGuard pushGroupState (GroupState< Scalar > &group_state)
 
ScopedLoggerGuard pushLogger (bool do_mpi_gather=true) const
 Push a new logger onto the stack with auto-cleanup on destruction. More...
 
WellStateGuard pushWellState (WellState< Scalar, IndexTraits > &well_state)
 
int reportStepIdx () const
 
const Schedule & schedule () const
 
ReservoirCoupling::Proxy< Scalar > & rescoup ()
 
const ReservoirCoupling::Proxy< Scalar > & rescoup () const
 
ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster ()
 
const ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster () const
 
ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave ()
 
const ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave () const
 
void setCmodeGroup (const Group &group)
 
template<class AverageRegionalPressureType >
void setRegionAveragePressureCalculator (const Group &group, const FieldPropsManager &fp, std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > &regional_average_pressure_calculator) const
 
void setReportStep (int report_step)
 
const SummaryState & summaryState () const
 
Scalar sumSolventRates (const Group &group, const bool is_injector) const
 
Scalar sumWellResRates (const Group &group, const int phase_pos, const bool injector) const
 
Scalar sumWellSurfaceRates (const Group &group, const int phase_pos, const bool injector) const
 
Scalar sumWellPhaseRates (bool res_rates, const Group &group, const int phase_pos, const bool injector, const bool network=false) const
 
bool terminalOutput () const
 
template<class RegionalValues >
void updateGpMaintTargetForGroups (const Group &group, const RegionalValues &regional_values, const double dt)
 
int updateGroupControlledWells (const bool is_production_group, const Phase injection_phase)
 
void updateGroupProductionRates (const Group &group)
 
void updateGroupTargetReduction (const Group &group, const bool is_injector)
 
void updateNetworkLeafNodeProductionRates ()
 
void updateNONEProductionGroups ()
 Set production control to NONE for groups not targeting any well. More...
 
void updateREINForGroups (const Group &group, bool sum_rank)
 
void updateReservoirRatesInjectionGroups (const Group &group)
 
void updateState (WellState< Scalar, IndexTraits > &well_state, GroupState< Scalar > &group_state)
 
void updateSurfaceRatesInjectionGroups (const Group &group)
 
void updateVREPForGroups (const Group &group)
 
void updateWellRates (const Group &group, const WellState< Scalar, IndexTraits > &well_state_nupcol, WellState< Scalar, IndexTraits > &well_state) const
 
const WellState< Scalar, IndexTraits > & wellState () const
 
void updateWellRatesFromGroupTargetScale (const Scalar scale, const Group &group, bool is_injector, WellState< Scalar, IndexTraits > &well_state) const
 
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) More...
 

Member Typedef Documentation

◆ GroupTarget

template<typename Scalar , typename IndexTraits >
using Opm::GroupStateHelper< Scalar, IndexTraits >::GroupTarget = typename SingleWellState<Scalar, IndexTraits>::GroupTarget

Constructor & Destructor Documentation

◆ GroupStateHelper()

template<typename Scalar , typename IndexTraits >
Opm::GroupStateHelper< Scalar, IndexTraits >::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 
)

Member Function Documentation

◆ accumulateGroupEfficiencyFactor()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::accumulateGroupEfficiencyFactor ( const Group &  group,
Scalar &  factor 
) const

◆ checkGroupConstraintsInj()

template<typename Scalar , typename IndexTraits >
std::pair< bool, Scalar > Opm::GroupStateHelper< Scalar, IndexTraits >::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

◆ checkGroupConstraintsProd()

template<typename Scalar , typename IndexTraits >
std::pair< bool, Scalar > Opm::GroupStateHelper< Scalar, IndexTraits >::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

◆ checkGroupProductionConstraints()

template<typename Scalar , typename IndexTraits >
std::pair< Group::ProductionCMode, Scalar > Opm::GroupStateHelper< Scalar, IndexTraits >::checkGroupProductionConstraints ( const Group &  group) const

◆ comm()

template<typename Scalar , typename IndexTraits >
const Parallel::Communication & Opm::GroupStateHelper< Scalar, IndexTraits >::comm ( ) const
inline

◆ deferredLogger()

template<typename Scalar , typename IndexTraits >
DeferredLogger & Opm::GroupStateHelper< Scalar, IndexTraits >::deferredLogger ( ) const
inline

Get the deferred logger.

Exceptions
std::logic_errorif no logger has been set via pushLogger()

Referenced by Opm::MultisegmentWell< TypeTag >::assembleWellEqWithoutIteration(), Opm::StandardWell< TypeTag >::assembleWellEqWithoutIterationImpl(), Opm::MultisegmentWell< TypeTag >::calculateExplicitQuantities(), Opm::MultisegmentWell< TypeTag >::checkOperabilityUnderTHPLimit(), Opm::StandardWell< TypeTag >::checkOperabilityUnderTHPLimit(), Opm::WellInterface< TypeTag >::checkWellOperability(), Opm::MultisegmentWell< TypeTag >::computeBhpAtThpLimitInj(), Opm::StandardWell< TypeTag >::computeBhpAtThpLimitInj(), Opm::StandardWell< TypeTag >::computeBhpAtThpLimitProdWithAlq(), Opm::MultisegmentWell< TypeTag >::computeBhpAtThpLimitProdWithAlq(), Opm::StandardWell< TypeTag >::computeWellConnectionDensitesPressures(), Opm::MultisegmentWell< TypeTag >::computeWellPotentials(), Opm::StandardWell< TypeTag >::computeWellPotentials(), Opm::StandardWell< TypeTag >::computeWellPotentialWithTHP(), Opm::MultisegmentWell< TypeTag >::computeWellPotentialWithTHP(), Opm::StandardWell< TypeTag >::computeWellRatesAndBhpWithThpAlqProd(), Opm::StandardWell< TypeTag >::computeWellRatesWithBhpIterations(), Opm::GroupConstraintCalculator< Scalar, IndexTraits >::deferredLogger(), Opm::MultisegmentWell< TypeTag >::getWellConvergence(), Opm::StandardWell< TypeTag >::getWellConvergence(), Opm::WellInterface< TypeTag >::iterateWellEquations(), Opm::MultisegmentWell< TypeTag >::iterateWellEqWithControl(), Opm::StandardWell< TypeTag >::iterateWellEqWithControl(), Opm::MultisegmentWell< TypeTag >::iterateWellEqWithSwitching(), Opm::StandardWell< TypeTag >::iterateWellEqWithSwitching(), Opm::WellInterface< TypeTag >::prepareWellBeforeAssembling(), Opm::MultisegmentWell< TypeTag >::recoverWellSolutionAndUpdateWellState(), Opm::MultisegmentWell< TypeTag >::solveEqAndUpdateWellState(), Opm::WellInterface< TypeTag >::solveWellEquation(), Opm::WellInterface< TypeTag >::solveWellForTesting(), Opm::WellInterface< TypeTag >::solveWellWithOperabilityCheck(), Opm::MultisegmentWell< TypeTag >::updateIPRImplicit(), Opm::StandardWell< TypeTag >::updateIPRImplicit(), Opm::StandardWell< TypeTag >::updatePrimaryVariables(), Opm::WellInterface< TypeTag >::updateWellControl(), Opm::WellInterface< TypeTag >::updateWellControlAndStatusLocalIteration(), Opm::WellInterface< TypeTag >::updateWellOperability(), Opm::StandardWell< TypeTag >::updateWellState(), Opm::MultisegmentWell< TypeTag >::updateWellState(), Opm::WellInterface< TypeTag >::updateWellStateWithTarget(), Opm::WellInterface< TypeTag >::updateWellStateWithTHPTargetProd(), and Opm::WellInterface< TypeTag >::wellTesting().

◆ getAutoChokeGroupProductionTargetRate()

template<typename Scalar , typename IndexTraits >
std::pair< Scalar, Group::ProductionCMode > Opm::GroupStateHelper< Scalar, IndexTraits >::getAutoChokeGroupProductionTargetRate ( const Group &  bottom_group,
const Group &  group,
const std::vector< Scalar > &  resv_coeff,
Scalar  efficiencyFactor 
) const

◆ getGroupRatesAvailableForHigherLevelControl()

template<typename Scalar , typename IndexTraits >
std::vector< Scalar > Opm::GroupStateHelper< Scalar, IndexTraits >::getGroupRatesAvailableForHigherLevelControl ( const Group &  group,
const bool  is_injector 
) const

◆ getInjectionGroupTarget()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::getInjectionGroupTarget ( const Group &  group,
const Phase &  injection_phase,
const std::vector< Scalar > &  resv_coeff 
) const

◆ getInjectionGuideTargetMode()

template<typename Scalar , typename IndexTraits >
GuideRateModel::Target Opm::GroupStateHelper< Scalar, IndexTraits >::getInjectionGuideTargetMode ( Phase  injection_phase) const

Get the guide rate target mode for an injection phase.

Parameters
injection_phaseThe injection phase (WATER, OIL, or GAS)
Returns
The corresponding GuideRateModel::Target for the injection phase

◆ getProductionGroupRateVector()

template<typename Scalar , typename IndexTraits >
GuideRate::RateVector Opm::GroupStateHelper< Scalar, IndexTraits >::getProductionGroupRateVector ( const std::string &  group_name) const

◆ getProductionGroupTarget()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::getProductionGroupTarget ( const Group &  group) const

◆ getProductionGroupTargetForMode()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::getProductionGroupTargetForMode ( const Group &  group,
const Group::ProductionCMode  cmode 
) const

Get the production target for a specific control mode (not necessarily the active one).

◆ getProductionGuideTargetMode()

template<typename Scalar , typename IndexTraits >
GuideRateModel::Target Opm::GroupStateHelper< Scalar, IndexTraits >::getProductionGuideTargetMode ( const Group &  group) const

Get the guide rate target mode for a production group.

Parameters
groupThe production group
Returns
The GuideRateModel::Target based on the group's production control mode

◆ getWellGroupTargetInjector()

template<typename Scalar , typename IndexTraits >
std::optional< GroupTarget > Opm::GroupStateHelper< Scalar, IndexTraits >::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

◆ getWellGroupTargetProducer()

template<typename Scalar , typename IndexTraits >
std::optional< GroupTarget > Opm::GroupStateHelper< Scalar, IndexTraits >::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 
) const

◆ getWellRateVector()

template<typename Scalar , typename IndexTraits >
GuideRate::RateVector Opm::GroupStateHelper< Scalar, IndexTraits >::getWellRateVector ( const std::string &  name) const

◆ groupChainTopBot()

template<typename Scalar , typename IndexTraits >
std::vector< std::string > Opm::GroupStateHelper< Scalar, IndexTraits >::groupChainTopBot ( const std::string &  bottom,
const std::string &  top 
) const

◆ groupControlledWells()

template<typename Scalar , typename IndexTraits >
int Opm::GroupStateHelper< Scalar, IndexTraits >::groupControlledWells ( const std::string &  group_name,
const std::string &  always_included_child,
const bool  is_production_group,
const Phase  injection_phase 
) const

returns the number of wells that are actively under group control for a given group with name given by group_name

◆ groupState()

template<typename Scalar , typename IndexTraits >
GroupState< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::groupState ( ) const
inline

◆ guideRate()

template<typename Scalar , typename IndexTraits >
const GuideRate & Opm::GroupStateHelper< Scalar, IndexTraits >::guideRate ( ) const
inline

◆ isRank0()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::isRank0 ( ) const
inline

◆ isReservoirCouplingMaster()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::isReservoirCouplingMaster ( ) const
inline

◆ isReservoirCouplingMasterGroup()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::isReservoirCouplingMasterGroup ( const Group &  group) const
inline

◆ isReservoirCouplingSlave()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::isReservoirCouplingSlave ( ) const
inline

◆ isReservoirCouplingSlaveGroup()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::isReservoirCouplingSlaveGroup ( const Group &  group) const
inline

◆ numPhases()

template<typename Scalar , typename IndexTraits >
constexpr int Opm::GroupStateHelper< Scalar, IndexTraits >::numPhases ( ) const
inlineconstexpr

◆ phaseToActivePhaseIdx()

template<typename Scalar , typename IndexTraits >
int Opm::GroupStateHelper< Scalar, IndexTraits >::phaseToActivePhaseIdx ( const Phase  phase) const

◆ phaseUsage()

template<typename Scalar , typename IndexTraits >
const PhaseUsageInfo< IndexTraits > & Opm::GroupStateHelper< Scalar, IndexTraits >::phaseUsage ( ) const
inline

◆ pushGroupState()

template<typename Scalar , typename IndexTraits >
GroupStateGuard Opm::GroupStateHelper< Scalar, IndexTraits >::pushGroupState ( GroupState< Scalar > &  group_state)
inline

◆ pushLogger()

template<typename Scalar , typename IndexTraits >
ScopedLoggerGuard Opm::GroupStateHelper< Scalar, IndexTraits >::pushLogger ( bool  do_mpi_gather = true) const
inline

Push a new logger onto the stack with auto-cleanup on destruction.

Creates a new DeferredLogger and pushes it onto the logger stack. When the returned guard goes out of scope:

  1. If do_mpi_gather is true: Messages are gathered across MPI ranks via gatherDeferredLogger() and logged on rank 0 (if terminal_output is enabled)
  2. If do_mpi_gather is false: Messages are logged locally without MPI gather
  3. The previous logger is restored
Parameters
do_mpi_gatherIf true (default), gather messages across MPI ranks on destruction. Set to false when called from contexts where MPI synchronization is not possible (e.g., NLDD domain-local operations called at different times on different ranks).
Returns
RAII guard that owns the logger and handles cleanup

◆ pushWellState()

◆ reportStepIdx()

template<typename Scalar , typename IndexTraits >
int Opm::GroupStateHelper< Scalar, IndexTraits >::reportStepIdx ( ) const
inline

◆ rescoup() [1/2]

template<typename Scalar , typename IndexTraits >
ReservoirCoupling::Proxy< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::rescoup ( )
inline

◆ rescoup() [2/2]

template<typename Scalar , typename IndexTraits >
const ReservoirCoupling::Proxy< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::rescoup ( ) const
inline

◆ reservoirCouplingMaster() [1/2]

template<typename Scalar , typename IndexTraits >
ReservoirCouplingMaster< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::reservoirCouplingMaster ( )
inline

◆ reservoirCouplingMaster() [2/2]

template<typename Scalar , typename IndexTraits >
const ReservoirCouplingMaster< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::reservoirCouplingMaster ( ) const
inline

◆ reservoirCouplingSlave() [1/2]

template<typename Scalar , typename IndexTraits >
ReservoirCouplingSlave< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::reservoirCouplingSlave ( )
inline

◆ reservoirCouplingSlave() [2/2]

template<typename Scalar , typename IndexTraits >
const ReservoirCouplingSlave< Scalar > & Opm::GroupStateHelper< Scalar, IndexTraits >::reservoirCouplingSlave ( ) const
inline

◆ schedule()

template<typename Scalar , typename IndexTraits >
const Schedule & Opm::GroupStateHelper< Scalar, IndexTraits >::schedule ( ) const
inline

◆ setCmodeGroup()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::setCmodeGroup ( const Group &  group)

◆ setRegionAveragePressureCalculator()

template<typename Scalar , typename IndexTraits >
template<class AverageRegionalPressureType >
void Opm::GroupStateHelper< Scalar, IndexTraits >::setRegionAveragePressureCalculator ( const Group &  group,
const FieldPropsManager &  fp,
std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > &  regional_average_pressure_calculator 
) const

◆ setReportStep()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::setReportStep ( int  report_step)
inline

◆ summaryState()

template<typename Scalar , typename IndexTraits >
const SummaryState & Opm::GroupStateHelper< Scalar, IndexTraits >::summaryState ( ) const
inline

◆ sumSolventRates()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::sumSolventRates ( const Group &  group,
const bool  is_injector 
) const

◆ sumWellPhaseRates()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::sumWellPhaseRates ( bool  res_rates,
const Group &  group,
const int  phase_pos,
const bool  injector,
const bool  network = false 
) const

◆ sumWellResRates()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::sumWellResRates ( const Group &  group,
const int  phase_pos,
const bool  injector 
) const

◆ sumWellSurfaceRates()

template<typename Scalar , typename IndexTraits >
Scalar Opm::GroupStateHelper< Scalar, IndexTraits >::sumWellSurfaceRates ( const Group &  group,
const int  phase_pos,
const bool  injector 
) const

◆ terminalOutput()

template<typename Scalar , typename IndexTraits >
bool Opm::GroupStateHelper< Scalar, IndexTraits >::terminalOutput ( ) const
inline

◆ updateGpMaintTargetForGroups()

template<typename Scalar , typename IndexTraits >
template<class RegionalValues >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateGpMaintTargetForGroups ( const Group &  group,
const RegionalValues &  regional_values,
const double  dt 
)

References OPM_DEFLOG_THROW.

◆ updateGroupControlledWells()

template<typename Scalar , typename IndexTraits >
int Opm::GroupStateHelper< Scalar, IndexTraits >::updateGroupControlledWells ( 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 group_name its main usage is to detect cases where there is no wells under group control

◆ updateGroupProductionRates()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateGroupProductionRates ( const Group &  group)

◆ updateGroupTargetReduction()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateGroupTargetReduction ( const Group &  group,
const bool  is_injector 
)

◆ updateNetworkLeafNodeProductionRates()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateNetworkLeafNodeProductionRates ( )

◆ updateNONEProductionGroups()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateNONEProductionGroups ( )

Set production control to NONE for groups not targeting any well.

For each group in the production controls map, checks whether any open producer well has GRUP control with that group as its target. If not, the group's production control is set to NONE. This is needed to get correct summary output for GMCTP/FMCTP, see https://github.com/OPM/opm-simulators/pull/6596 for more details.

Exceptions (groups excluded from the NONE reset):

  • Groups specified for gas lift optimization (GLO)
  • RC master hierarchy groups (master groups + ancestors up to FIELD), which actively distribute targets to slave groups

◆ updateREINForGroups()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateREINForGroups ( const Group &  group,
bool  sum_rank 
)

◆ updateReservoirRatesInjectionGroups()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateReservoirRatesInjectionGroups ( const Group &  group)

◆ updateState()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateState ( WellState< Scalar, IndexTraits > &  well_state,
GroupState< Scalar > &  group_state 
)

◆ updateSurfaceRatesInjectionGroups()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateSurfaceRatesInjectionGroups ( const Group &  group)

◆ updateVREPForGroups()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateVREPForGroups ( const Group &  group)

◆ updateWellRates()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateWellRates ( const Group &  group,
const WellState< Scalar, IndexTraits > &  well_state_nupcol,
WellState< Scalar, IndexTraits > &  well_state 
) const

◆ updateWellRatesFromGroupTargetScale()

template<typename Scalar , typename IndexTraits >
void Opm::GroupStateHelper< Scalar, IndexTraits >::updateWellRatesFromGroupTargetScale ( const Scalar  scale,
const Group &  group,
bool  is_injector,
WellState< Scalar, IndexTraits > &  well_state 
) const

◆ wellState()

◆ worstOffendingWell()

template<typename Scalar , typename IndexTraits >
std::pair< std::optional< std::string >, Scalar > Opm::GroupStateHelper< Scalar, IndexTraits >::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)


The documentation for this class was generated from the following files: