23#ifndef OPM_BLACKOILWELLMODEL_CONSTRAINTS_HEADER_INCLUDED
24#define OPM_BLACKOILWELLMODEL_CONSTRAINTS_HEADER_INCLUDED
26#include <opm/input/eclipse/Schedule/Group/Group.hpp>
36template<
typename Scalar,
typename IndexTraits>
class WellState;
40template<
typename Scalar,
typename IndexTraits>
45 constexpr static int waterPhaseIdx = IndexTraits::waterPhaseIdx;
46 constexpr static int oilPhaseIdx = IndexTraits::oilPhaseIdx;
47 constexpr static int gasPhaseIdx = IndexTraits::gasPhaseIdx;
53 : wellModel_(wellModel)
58 const Group::InjectionCMode& newControl,
59 const Phase& controlPhase,
65 const Group::GroupLimitAction group_limit_action,
66 const Group::ProductionCMode& newControl,
67 std::optional<std::string>& worst_offending_well,
73 const int reportStepIdx,
74 const int max_number_of_group_switch,
75 const bool update_group_switching_log,
76 std::map<std::string, std::array<std::vector<Group::InjectionCMode>, 3>>& switched_inj,
77 std::map<std::string, std::vector<Group::ProductionCMode>>& switched_prod,
78 std::map<std::string, std::pair<std::string, std::string>>& closed_offending_wells,
85 std::pair<Group::InjectionCMode, Scalar>
86 checkGroupInjectionConstraints(
const Group& group,
87 const int reportStepIdx,
88 const Phase& phase)
const;
91 std::pair<Group::ProductionCMode, Scalar>
92 checkGroupProductionConstraints(
const Group& group)
const;
94 const GroupStateHelperType& groupStateHelper()
const {
return wellModel_.groupStateHelper(); }
95 const BlackoilWellModelGeneric<Scalar, IndexTraits>& wellModel_;
BlackoilWellModelConstraints(const BlackoilWellModelGeneric< Scalar, IndexTraits > &wellModel)
Constructor initializes reference to the well model.
Definition BlackoilWellModelConstraints.hpp:52
void actionOnBrokenConstraints(const Group &group, const Group::InjectionCMode &newControl, const Phase &controlPhase, GroupState< Scalar > &group_state, DeferredLogger &deferred_logger) const
Execute action for broken constraint for an injection well group.
Definition BlackoilWellModelConstraints.cpp:189
bool updateGroupIndividualControl(const Group &group, const int reportStepIdx, const int max_number_of_group_switch, const bool update_group_switching_log, std::map< std::string, std::array< std::vector< Group::InjectionCMode >, 3 > > &switched_inj, std::map< std::string, std::vector< Group::ProductionCMode > > &switched_prod, std::map< std::string, std::pair< std::string, std::string > > &closed_offending_wells, GroupState< Scalar > &group_state, WellState< Scalar, IndexTraits > &well_state, DeferredLogger &deferred_logger) const
Update the individual controls for wells in a group. Return true if a group control is changed.
Definition BlackoilWellModelConstraints.cpp:315
Class for handling the blackoil well model.
Definition BlackoilWellModelGeneric.hpp:97
Definition DeferredLogger.hpp:57
Definition GroupStateHelper.hpp:57
Definition GroupState.hpp:41
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:45