20#ifndef OPM_WELLSMANAGER_HEADER_INCLUDED
21#define OPM_WELLSMANAGER_HEADER_INCLUDED
23#include <unordered_set>
25#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
30#include <opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp>
32#include <opm/core/utility/CompressedPropertyAccess.hpp>
35struct UnstructuredGrid;
86 template<
class F2C,
class FC>
88 const Opm::Schedule& schedule,
89 const size_t timeStep,
91 const int* global_cell,
95 FC begin_face_centroids,
97 bool is_parallel_run=
false,
98 const std::unordered_set<std::string>& deactivated_wells = std::unordered_set<std::string> ());
101 const Opm::Schedule& schedule,
102 const size_t timeStep,
103 const UnstructuredGrid& grid);
140 const std::vector<double>& well_reservoirrates_phase,
141 const std::vector<double>& well_surfacerates_phase);
153 const std::vector<double>& well_surfacerates_phase);
157 template<
class C2F,
class FC>
158 void init(
const Opm::EclipseState& eclipseState,
159 const Opm::Schedule& schedule,
160 const size_t timeStep,
162 const int* global_cell,
163 const int* cart_dims,
165 const C2F& cell_to_faces,
166 FC begin_face_centroids,
168 const std::unordered_set<std::string>& deactivated_wells);
172 static void setupCompressedToCartesian(
const int* global_cell,
int number_of_cells, std::map<int,int>& cartesian_to_compressed );
173 void setupWellControls(std::vector<const Well*>& wells,
size_t timeStep,
174 std::vector<std::string>& well_names,
const PhaseUsage& phaseUsage,
175 const std::vector<int>& wells_on_proc,
178 template<
class C2F,
class FC,
class NTG>
179 void createWellsFromSpecs( std::vector<const Well*>& wells,
size_t timeStep,
180 const C2F& cell_to_faces,
181 const int* cart_dims,
182 FC begin_face_centroids,
184 std::vector<double>& dz,
185 std::vector<std::string>& well_names,
186 std::vector<WellData>& well_data,
187 std::map<std::string, int> & well_names_to_index,
189 const std::map<int,int>& cartesian_to_compressed,
190 const double* permeability,
192 std::vector<int>& wells_on_proc,
193 const std::unordered_set<std::string>& deactivated_wells,
196 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);
202 bool is_parallel_run_;
to handle the wells and connections violating economic limits.
Definition: DynamicListEconLimited.hpp:33
Definition: WellCollection.hpp:36
Definition: WellsManager.hpp:66
WellsManager(const Opm::EclipseState &eclipseState, const Opm::Schedule &schedule, const size_t timeStep, int num_cells, const int *global_cell, const int *cart_dims, int dimensions, const F2C &f2c, FC begin_face_centroids, const DynamicListEconLimited &list_econ_limited, bool is_parallel_run=false, const std::unordered_set< std::string > &deactivated_wells=std::unordered_set< std::string >())
const WellCollection & wellCollection() const
Access the well group hierarchy.
bool empty() const
Does the "deck" define any wells?
void applyExplicitReinjectionControls(const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase)
bool conditionsMet(const std::vector< double > &well_bhp, const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase)
const Wells * c_wells() const
WellsManager(struct Wells *W)
~WellsManager()
Destructor.
WellsManager(const Opm::EclipseState &eclipseState, const Opm::Schedule &schedule, const size_t timeStep, const UnstructuredGrid &grid)
WellsManager()
Default constructor – no wells.
WellCollection & wellCollection()
Definition: AnisotropicEikonal.hpp:44
Definition: WellsManager.hpp:56
int cell
Definition: WellsManager.hpp:57
double well_index
Definition: WellsManager.hpp:58
int satnumid
Definition: WellsManager.hpp:59
Definition: BlackoilPhases.hpp:44
Definition: WellsManager.hpp:44
int welspecsline
Definition: WellsManager.hpp:51
WellType type
Definition: WellsManager.hpp:45
double reference_bhp_depth
Definition: WellsManager.hpp:49
bool allowCrossFlow
Definition: WellsManager.hpp:46
WellType
Definition: wells.h:41