19 #ifndef OPM_WELLCOLLECTION_HPP 20 #define OPM_WELLCOLLECTION_HPP 25 #include <opm/core/wells/WellsGroup.hpp> 26 #include <opm/core/grid.h> 27 #include <opm/core/props/phaseUsageFromDeck.hpp> 29 #include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp> 30 #include <opm/parser/eclipse/EclipseState/Schedule/Group.hpp> 39 void addField(
const Group& fieldGroup,
size_t timeStep,
const PhaseUsage& phaseUsage);
41 void addWell(
const Well* wellChild,
size_t timeStep,
const PhaseUsage& phaseUsage);
43 void addGroup(
const Group& groupChild, std::string parent_name,
44 size_t timeStep,
const PhaseUsage& phaseUsage);
50 void addChild(std::shared_ptr<WellsGroupInterface>& child_node,
51 const std::string& parent);
54 void addChild(std::shared_ptr<WellsGroupInterface>& child_node);
79 const std::vector<double>& well_reservoirrates_phase,
80 const std::vector<double>& well_surfacerates_phase);
99 WellNode& findWellNode(
const std::string& name)
const;
115 const std::vector<double>& well_surfacerates_phase);
120 const std::vector<double>& conversion_coeffs);
156 const std::vector<double>& well_potentials)
const;
159 bool requireWellPotentials()
const;
163 std::vector<std::shared_ptr<WellsGroupInterface> > roots_;
166 std::vector<WellNode*> leaf_nodes_;
168 bool having_vrep_groups_ =
false;
170 bool group_control_active_ =
false;
173 bool group_control_applied_ =
false;
bool havingVREPGroups() const
When we have VREP group, we need to update the targets based on the updated production voidage rates ...
Definition: WellCollection.cpp:321
void setGuideRatesWithPotentials(const Wells *wells, const PhaseUsage &phase_usage, const std::vector< double > &well_potentials) const
Setting the guide rates with well potentials.
Definition: WellCollection.cpp:355
bool groupTargetConverged(const std::vector< double > &well_rates) const
Whether the group target is converged.
Definition: WellCollection.cpp:340
Definition: WellsGroup.hpp:396
void applyExplicitReinjectionControls(const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase)
Applies explicit reinjection controls.
Definition: WellCollection.cpp:211
WellsGroupInterface * findNode(const std::string &name)
Finds the group with the given name.
Definition: WellCollection.cpp:99
Definition: AnisotropicEikonal.cpp:446
Data structure aggregating static information about all wells in a scenario.
Definition: wells.h:50
Definition: WellsGroup.hpp:54
bool conditionsMet(const std::vector< double > &well_bhp, const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase)
Checks if each condition is met, applies well controls where needed (that is, it either changes the a...
Definition: WellCollection.cpp:169
bool groupControlActive() const
Whether we have active group control.
Definition: WellCollection.cpp:327
void addChild(std::shared_ptr< WellsGroupInterface > &child_node, const std::string &parent)
Adds the child to the collection and appends it to parent's children.
Definition: WellCollection.cpp:144
void applyGroupControls()
Applies all group controls (injection and production)
Definition: WellCollection.cpp:191
Definition: BlackoilPhases.hpp:36
bool needUpdateWellTargets() const
Checking whether need to update the targets of the wells / or the groups later True need to update we...
Definition: WellCollection.cpp:230
Definition: WellCollection.hpp:35
void applyVREPGroupControls(const std::vector< double > &well_voidage_rates, const std::vector< double > &conversion_coeffs)
applying VREP group control based on calculated voidage rates
Definition: WellCollection.cpp:220
bool groupControlApplied() const
Whether we have applied the group control.
Definition: WellCollection.cpp:334
const std::vector< WellNode * > & getLeafNodes() const
Definition: WellCollection.cpp:95
bool needUpdateProductionTargets() const
Checking whehter need to update the targets for the production wells.
Definition: WellCollection.cpp:261
void setWellsPointer(Wells *wells)
Adds the well pointer to each leaf node (does not take ownership).
Definition: WellCollection.cpp:185
void updateWellTargets(const std::vector< double > &well_rates)
Updating the well targets based on the well rates.
Definition: WellCollection.cpp:285
bool needUpdateInjectionTargets() const
Checking whether need to update the targets for the injection wells.
Definition: WellCollection.cpp:236