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

#include <WellGroupHelpers.hpp>

Public Types

using WellStateType = WellState< Scalar, IndexTraits >
 

Static Public Member Functions

static Scalar sumWellPhaseRates (bool res_rates, const Opm::Group &group, const Opm::Schedule &schedule, const WellStateType &wellState, const SummaryState &summaryState, const int reportStepIdx, const int phasePos, const bool injector, const bool network=false)
 
static Scalar satelliteInjectionRate (const ScheduleState &sched, const Group &group, const PhaseUsageInfo< IndexTraits > &pu, const int phase_pos, bool res_rates)
 
static Scalar satelliteProductionRate (const SummaryState &summaryState, const ScheduleState &sched, const Group &group, const GSatProd::GSatProdGroupProp::Rate rateComp, bool res_rates)
 
static std::optional< GSatProd::GSatProdGroupProp::Rate > selectRateComponent (const PhaseUsageInfo< IndexTraits > &pu, const int phasePos)
 
static void setCmodeGroup (const Group &group, const Schedule &schedule, const SummaryState &summaryState, const int reportStepIdx, GroupState< Scalar > &group_state)
 
static void accumulateGroupEfficiencyFactor (const Group &group, const Schedule &schedule, const int reportStepIdx, Scalar &factor)
 
static Scalar sumWellSurfaceRates (const Group &group, const Schedule &schedule, const WellStateType &wellState, const int reportStepIdx, const int phasePos, const bool injector, const SummaryState &summaryState)
 
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) More...
 
static Scalar sumWellResRates (const Group &group, const Schedule &schedule, const WellStateType &wellState, const int reportStepIdx, const int phasePos, const bool injector, const SummaryState &summaryState)
 
static Scalar sumSolventRates (const Group &group, const Schedule &schedule, const WellStateType &wellState, const int reportStepIdx, const bool injector)
 
static void updateGroupTargetReduction (const Group &group, const Schedule &schedule, const int reportStepIdx, const bool isInjector, const GuideRate &guide_rate, const WellStateType &wellState, const SummaryState &summaryState, GroupState< Scalar > &group_state, std::vector< Scalar > &groupTargetReduction)
 
static void updateVREPForGroups (const Group &group, const Schedule &schedule, const int reportStepIdx, const WellStateType &wellState, GroupState< Scalar > &group_state, const SummaryState &summaryState)
 
template<class RegionalValues >
static void updateGpMaintTargetForGroups (const Group &group, const Schedule &schedule, const RegionalValues &regional_values, const int reportStepIdx, const double dt, const WellStateType &well_state, GroupState< Scalar > &group_state)
 
static void updateReservoirRatesInjectionGroups (const Group &group, const Schedule &schedule, const int reportStepIdx, const WellStateType &wellState, GroupState< Scalar > &group_state, const SummaryState &summaryState)
 
static void updateSurfaceRatesInjectionGroups (const Group &group, const Schedule &schedule, const int reportStepIdx, const WellStateType &wellState, GroupState< Scalar > &group_state, const SummaryState &summaryState)
 
static void updateWellRates (const Group &group, const Schedule &schedule, const int reportStepIdx, const WellStateType &wellStateNupcol, WellStateType &wellState)
 
static void updateGroupProductionRates (const Group &group, const Schedule &schedule, const int reportStepIdx, const WellStateType &wellState, GroupState< Scalar > &group_state, const SummaryState &summaryState)
 
static void updateNetworkLeafNodeProductionRates (const Schedule &schedule, const int reportStepIdx, const WellStateType &wellState, GroupState< Scalar > &group_state, const SummaryState &summaryState)
 
static void updateWellRatesFromGroupTargetScale (const Scalar scale, const Group &group, const Schedule &schedule, const int reportStepIdx, bool isInjector, const GroupState< Scalar > &group_state, WellStateType &wellState)
 
static void updateREINForGroups (const Group &group, const Schedule &schedule, const int reportStepIdx, const SummaryState &st, const WellStateType &wellState, GroupState< Scalar > &group_state, bool sum_rank)
 
static std::map< std::string, Scalar > computeNetworkPressures (const Network::ExtNetwork &network, const WellStateType &well_state, const GroupState< Scalar > &group_state, const VFPProdProperties< Scalar > &vfp_prod_props, const Schedule &schedule, const Parallel::Communication &comm, const int report_time_step)
 
static GuideRate::RateVector getWellRateVector (const WellStateType &well_state, const std::string &name)
 
static GuideRate::RateVector getProductionGroupRateVector (const GroupState< Scalar > &group_state, const PhaseUsageInfo< IndexTraits > &pu, const std::string &group_name)
 
static Scalar getGuideRate (const std::string &name, const Schedule &schedule, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const GuideRateModel::Target target)
 
static Scalar getGuideRateInj (const std::string &name, const Schedule &schedule, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const GuideRateModel::Target target, const Phase &injectionPhase)
 
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)
 
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 by group_name More...
 
static std::pair< bool, Scalar > checkGroupConstraintsInj (const std::string &name, const std::string &parent, const Group &group, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const Scalar *rates, Phase injectionPhase, const Scalar efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, const std::vector< Scalar > &resv_coeff, const bool check_guide_rate, DeferredLogger &deferred_logger)
 
static Scalar getWellGroupTargetInjector (const std::string &name, const std::string &parent, const Group &group, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const Scalar *rates, Phase injectionPhase, const Scalar efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, const std::vector< Scalar > &resv_coeff, DeferredLogger &deferred_logger)
 
static std::vector< std::string > groupChainTopBot (const std::string &bottom, const std::string &top, const Schedule &schedule, const int report_step)
 
static bool isInGroupChainTopBot (const std::string &bottom, const std::string &top, const Schedule &schedule, const int report_step)
 
static std::string control_group (const Group &group, const GroupState< Scalar > &group_state, const int reportStepIdx, const Schedule &schedule)
 
static std::pair< bool, Scalar > checkGroupConstraintsProd (const std::string &name, const std::string &parent, const Group &group, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const Scalar *rates, const Scalar efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, const std::vector< Scalar > &resv_coeff, const bool check_guide_rate, DeferredLogger &deferred_logger)
 
static Scalar getWellGroupTargetProducer (const std::string &name, const std::string &parent, const Group &group, const WellStateType &wellState, const GroupState< Scalar > &group_state, const int reportStepIdx, const GuideRate *guideRate, const Scalar *rates, const Scalar efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, const std::vector< Scalar > &resv_coeff, DeferredLogger &deferred_logger)
 
template<class AverageRegionalPressureType >
static void setRegionAveragePressureCalculator (const Group &group, const Schedule &schedule, const int reportStepIdx, const FieldPropsManager &fp, std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > &regionalAveragePressureCalculator)
 

Member Typedef Documentation

◆ WellStateType

template<typename Scalar , typename IndexTraits >
using Opm::WellGroupHelpers< Scalar, IndexTraits >::WellStateType = WellState<Scalar, IndexTraits>

Member Function Documentation

◆ accumulateGroupEfficiencyFactor()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::accumulateGroupEfficiencyFactor ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
Scalar &  factor 
)
static

◆ checkGroupConstraintsInj()

template<typename Scalar , typename IndexTraits >
static std::pair< bool, Scalar > Opm::WellGroupHelpers< Scalar, IndexTraits >::checkGroupConstraintsInj ( const std::string &  name,
const std::string &  parent,
const Group &  group,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const Scalar *  rates,
Phase  injectionPhase,
const Scalar  efficiencyFactor,
const Schedule &  schedule,
const SummaryState &  summaryState,
const std::vector< Scalar > &  resv_coeff,
const bool  check_guide_rate,
DeferredLogger deferred_logger 
)
static

◆ checkGroupConstraintsProd()

template<typename Scalar , typename IndexTraits >
static std::pair< bool, Scalar > Opm::WellGroupHelpers< Scalar, IndexTraits >::checkGroupConstraintsProd ( const std::string &  name,
const std::string &  parent,
const Group &  group,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const Scalar *  rates,
const Scalar  efficiencyFactor,
const Schedule &  schedule,
const SummaryState &  summaryState,
const std::vector< Scalar > &  resv_coeff,
const bool  check_guide_rate,
DeferredLogger deferred_logger 
)
static

◆ computeNetworkPressures()

template<typename Scalar , typename IndexTraits >
static std::map< std::string, Scalar > Opm::WellGroupHelpers< Scalar, IndexTraits >::computeNetworkPressures ( const Network::ExtNetwork &  network,
const WellStateType well_state,
const GroupState< Scalar > &  group_state,
const VFPProdProperties< Scalar > &  vfp_prod_props,
const Schedule &  schedule,
const Parallel::Communication comm,
const int  report_time_step 
)
static

◆ control_group()

template<typename Scalar , typename IndexTraits >
static std::string Opm::WellGroupHelpers< Scalar, IndexTraits >::control_group ( const Group &  group,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const Schedule &  schedule 
)
static

◆ getGuideRate()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::getGuideRate ( const std::string &  name,
const Schedule &  schedule,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const GuideRateModel::Target  target 
)
static

◆ getGuideRateInj()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::getGuideRateInj ( const std::string &  name,
const Schedule &  schedule,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const GuideRateModel::Target  target,
const Phase &  injectionPhase 
)
static

◆ getProductionGroupRateVector()

template<typename Scalar , typename IndexTraits >
static GuideRate::RateVector Opm::WellGroupHelpers< Scalar, IndexTraits >::getProductionGroupRateVector ( const GroupState< Scalar > &  group_state,
const PhaseUsageInfo< IndexTraits > &  pu,
const std::string &  group_name 
)
static

◆ getWellGroupTargetInjector()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::getWellGroupTargetInjector ( const std::string &  name,
const std::string &  parent,
const Group &  group,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const Scalar *  rates,
Phase  injectionPhase,
const Scalar  efficiencyFactor,
const Schedule &  schedule,
const SummaryState &  summaryState,
const std::vector< Scalar > &  resv_coeff,
DeferredLogger deferred_logger 
)
static

◆ getWellGroupTargetProducer()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::getWellGroupTargetProducer ( const std::string &  name,
const std::string &  parent,
const Group &  group,
const WellStateType wellState,
const GroupState< Scalar > &  group_state,
const int  reportStepIdx,
const GuideRate *  guideRate,
const Scalar *  rates,
const Scalar  efficiencyFactor,
const Schedule &  schedule,
const SummaryState &  summaryState,
const std::vector< Scalar > &  resv_coeff,
DeferredLogger deferred_logger 
)
static

◆ getWellRateVector()

template<typename Scalar , typename IndexTraits >
static GuideRate::RateVector Opm::WellGroupHelpers< Scalar, IndexTraits >::getWellRateVector ( const WellStateType well_state,
const std::string &  name 
)
static

◆ groupChainTopBot()

template<typename Scalar , typename IndexTraits >
static std::vector< std::string > Opm::WellGroupHelpers< Scalar, IndexTraits >::groupChainTopBot ( const std::string &  bottom,
const std::string &  top,
const Schedule &  schedule,
const int  report_step 
)
static

◆ groupControlledWells()

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

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

◆ isInGroupChainTopBot()

template<typename Scalar , typename IndexTraits >
static bool Opm::WellGroupHelpers< Scalar, IndexTraits >::isInGroupChainTopBot ( const std::string &  bottom,
const std::string &  top,
const Schedule &  schedule,
const int  report_step 
)
static

◆ satelliteInjectionRate()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::satelliteInjectionRate ( const ScheduleState &  sched,
const Group &  group,
const PhaseUsageInfo< IndexTraits > &  pu,
const int  phase_pos,
bool  res_rates 
)
static

◆ satelliteProductionRate()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::satelliteProductionRate ( const SummaryState &  summaryState,
const ScheduleState &  sched,
const Group &  group,
const GSatProd::GSatProdGroupProp::Rate  rateComp,
bool  res_rates 
)
static

◆ selectRateComponent()

template<typename Scalar , typename IndexTraits >
static std::optional< GSatProd::GSatProdGroupProp::Rate > Opm::WellGroupHelpers< Scalar, IndexTraits >::selectRateComponent ( const PhaseUsageInfo< IndexTraits > &  pu,
const int  phasePos 
)
static

◆ setCmodeGroup()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::setCmodeGroup ( const Group &  group,
const Schedule &  schedule,
const SummaryState &  summaryState,
const int  reportStepIdx,
GroupState< Scalar > &  group_state 
)
static

◆ setRegionAveragePressureCalculator()

template<typename Scalar , typename IndexTraits >
template<class AverageRegionalPressureType >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::setRegionAveragePressureCalculator ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const FieldPropsManager &  fp,
std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > &  regionalAveragePressureCalculator 
)
static

◆ sumSolventRates()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::sumSolventRates ( const Group &  group,
const Schedule &  schedule,
const WellStateType wellState,
const int  reportStepIdx,
const bool  injector 
)
static

◆ sumWellPhaseRates()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::sumWellPhaseRates ( bool  res_rates,
const Opm::Group &  group,
const Opm::Schedule &  schedule,
const WellStateType wellState,
const SummaryState &  summaryState,
const int  reportStepIdx,
const int  phasePos,
const bool  injector,
const bool  network = false 
)
static

◆ sumWellResRates()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::sumWellResRates ( const Group &  group,
const Schedule &  schedule,
const WellStateType wellState,
const int  reportStepIdx,
const int  phasePos,
const bool  injector,
const SummaryState &  summaryState 
)
static

◆ sumWellSurfaceRates()

template<typename Scalar , typename IndexTraits >
static Scalar Opm::WellGroupHelpers< Scalar, IndexTraits >::sumWellSurfaceRates ( const Group &  group,
const Schedule &  schedule,
const WellStateType wellState,
const int  reportStepIdx,
const int  phasePos,
const bool  injector,
const SummaryState &  summaryState 
)
static

◆ updateGpMaintTargetForGroups()

template<typename Scalar , typename IndexTraits >
template<class RegionalValues >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateGpMaintTargetForGroups ( const Group &  group,
const Schedule &  schedule,
const RegionalValues &  regional_values,
const int  reportStepIdx,
const double  dt,
const WellStateType well_state,
GroupState< Scalar > &  group_state 
)
static

◆ updateGroupControlledWells()

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

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 >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateGroupProductionRates ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
const SummaryState &  summaryState 
)
static

◆ updateGroupTargetReduction()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateGroupTargetReduction ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const bool  isInjector,
const GuideRate &  guide_rate,
const WellStateType wellState,
const SummaryState &  summaryState,
GroupState< Scalar > &  group_state,
std::vector< Scalar > &  groupTargetReduction 
)
static

◆ updateNetworkLeafNodeProductionRates()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateNetworkLeafNodeProductionRates ( const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
const SummaryState &  summaryState 
)
static

◆ updateREINForGroups()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateREINForGroups ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const SummaryState &  st,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
bool  sum_rank 
)
static

◆ updateReservoirRatesInjectionGroups()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateReservoirRatesInjectionGroups ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
const SummaryState &  summaryState 
)
static

◆ updateSurfaceRatesInjectionGroups()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateSurfaceRatesInjectionGroups ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
const SummaryState &  summaryState 
)
static

◆ updateVREPForGroups()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateVREPForGroups ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellState,
GroupState< Scalar > &  group_state,
const SummaryState &  summaryState 
)
static

◆ updateWellRates()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateWellRates ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const WellStateType wellStateNupcol,
WellStateType wellState 
)
static

◆ updateWellRatesFromGroupTargetScale()

template<typename Scalar , typename IndexTraits >
static void Opm::WellGroupHelpers< Scalar, IndexTraits >::updateWellRatesFromGroupTargetScale ( const Scalar  scale,
const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
bool  isInjector,
const GroupState< Scalar > &  group_state,
WellStateType wellState 
)
static

◆ worstOffendingWell()

template<typename Scalar , typename IndexTraits >
static std::pair< std::optional< std::string >, Scalar > Opm::WellGroupHelpers< Scalar, IndexTraits >::worstOffendingWell ( const Group &  group,
const Schedule &  schedule,
const int  reportStepIdx,
const Group::ProductionCMode &  offendedControl,
const Parallel::Communication comm,
const WellStateType wellState,
DeferredLogger deferred_logger 
)
static

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: