20 #ifndef OPM_WELLSMANAGER_HEADER_INCLUDED 21 #define OPM_WELLSMANAGER_HEADER_INCLUDED 23 #include <unordered_set> 25 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp> 27 #include <opm/core/wells/WellCollection.hpp> 28 #include <opm/core/wells/WellsGroup.hpp> 29 #include <opm/core/wells/DynamicListEconLimited.hpp> 30 #include <opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp> 35 struct UnstructuredGrid;
49 double reference_bhp_depth;
86 template<
class F2C,
class FC>
88 const size_t timeStep,
90 const int* global_cell,
94 FC begin_face_centroids,
96 bool is_parallel_run=
false,
97 const std::unordered_set<std::string>& deactivated_wells = std::unordered_set<std::string> ());
100 const size_t timeStep,
101 const UnstructuredGrid& grid);
138 const std::vector<double>& well_reservoirrates_phase,
139 const std::vector<double>& well_surfacerates_phase);
151 const std::vector<double>& well_surfacerates_phase);
155 template<
class C2F,
class FC>
156 void init(
const Opm::EclipseState& eclipseState,
157 const size_t timeStep,
159 const int* global_cell,
160 const int* cart_dims,
162 const C2F& cell_to_faces,
163 FC begin_face_centroids,
165 const std::unordered_set<std::string>& deactivated_wells);
169 static void setupCompressedToCartesian(
const int* global_cell,
int number_of_cells, std::map<int,int>& cartesian_to_compressed );
170 void setupWellControls(std::vector<const Well*>& wells,
size_t timeStep,
171 std::vector<std::string>& well_names,
const PhaseUsage& phaseUsage,
172 const std::vector<int>& wells_on_proc,
175 template<
class C2F,
class FC,
class NTG>
176 void createWellsFromSpecs( std::vector<const Well*>& wells,
size_t timeStep,
177 const C2F& cell_to_faces,
178 const int* cart_dims,
179 FC begin_face_centroids,
181 std::vector<double>& dz,
182 std::vector<std::string>& well_names,
183 std::vector<WellData>& well_data,
184 std::map<std::string, int> & well_names_to_index,
186 const std::map<int,int>& cartesian_to_compressed,
187 const double* permeability,
189 std::vector<int>& wells_on_proc,
190 const std::unordered_set<std::string>& deactivated_wells,
193 void setupGuideRates(std::vector<const Well*>& wells,
const size_t timeStep, std::vector<WellData>& well_data, std::map<std::string, int>& well_names_to_index);
199 bool is_parallel_run_;
204 #include "WellsManager_impl.hpp" 205 #endif // OPM_WELLSMANAGER_HEADER_INCLUDED Facility for accessing active subset of data arrays defined for all global cells. ...
void applyExplicitReinjectionControls(const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase)
Applies explicit reinjection controls.
Definition: WellsManager.cpp:399
Definition: WellsManager.hpp:43
~WellsManager()
Destructor.
Definition: WellsManager.cpp:347
const Wells * c_wells() const
Access the managed Wells.
Definition: WellsManager.cpp:364
Definition: AnisotropicEikonal.cpp:446
Definition: WellsManager.hpp:55
Data structure aggregating static information about all wells in a scenario.
Definition: wells.h:50
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: WellsManager.cpp:380
to handle the wells and connections violating economic limits.
Definition: DynamicListEconLimited.hpp:32
WellsManager()
Default constructor – no wells.
Definition: WellsManager.cpp:317
WellType
Well type indicates desired/expected well behaviour.
Definition: wells.h:41
bool empty() const
Does the "deck" define any wells?
Definition: WellsManager.cpp:354
Definition: BlackoilPhases.hpp:36
This class manages a Wells struct in the sense that it encapsulates creation and destruction of the w...
Definition: WellsManager.hpp:65
Definition: WellCollection.hpp:35
const WellCollection & wellCollection() const
Access the well group hierarchy.
Definition: WellsManager.cpp:369