20#ifndef OPM_WELLS_HEADER_INCLUDED
21#define OPM_WELLS_HEADER_INCLUDED
23#include <opm/common/ErrorMacros.hpp>
24#include <opm/core/utility/SparseTable.hpp>
25#include <opm/parser/eclipse/Deck/Deck.hpp>
26#include <dune/common/fvector.hh>
40 void init(Opm::DeckConstPtr deck);
48 double target(
int wellnum)
const;
51 int wellCell(
int wellnum,
int perfnum)
const;
52 double wellIndex(
int wellnum,
int perfnum)
const;
57 const std::vector<double>& well_pressures,
58 const std::vector<double>& well_fluxes);
67 std::vector<WellData> well_data_;
68 struct PerfData {
int cell;
double well_index;
double pdelta; };
69 Opm::SparseTable<PerfData> perf_data_;
81 return well_data_.size();
86 return well_data_[wellnum].type;
91 return well_data_[wellnum].control;
96 return well_data_[wellnum].target;
101 return well_data_[wellnum].reference_bhp_depth;
106 return perf_data_[wellnum].size();
111 return perf_data_[wellnum][perfnum].cell;
116 return perf_data_[wellnum][perfnum].well_index;
121 return perf_data_[wellnum][perfnum].pdelta;
125 const std::vector<double>& ,
126 const std::vector<double>& )
132 OPM_THROW(std::runtime_error,
"Not implemented");
143 OPM_THROW(std::runtime_error,
"Not implemented");
144 return Dune::FieldVector<double, 3>(0.0);
double wellIndex(int wellnum, int perfnum) const
Definition: Wells.hpp:114
double pressureDelta(int wellnum, int perfnum) const
Definition: Wells.hpp:119
WellType
Definition: Wells.hpp:44
@ Producer
Definition: Wells.hpp:44
@ Injector
Definition: Wells.hpp:44
double target(int wellnum) const
Definition: Wells.hpp:94
double referenceDepth(int wellnum) const
Definition: Wells.hpp:99
Dune::FieldVector< double, 3 > injectionMixture(int cell) const
Definition: Wells.hpp:141
WellType type(int wellnum) const
Definition: Wells.hpp:84
WellControl control(int wellnum) const
Definition: Wells.hpp:89
int numWells() const
Definition: Wells.hpp:79
void update(int num_cells, const std::vector< double > &well_pressures, const std::vector< double > &well_fluxes)
Definition: Wells.hpp:124
WellControl
Definition: Wells.hpp:46
@ Rate
Definition: Wells.hpp:46
@ Pressure
Definition: Wells.hpp:46
int numPerforations(int wellnum) const
Definition: Wells.hpp:104
void init(Opm::DeckConstPtr deck)
Definition: Wells.hpp:75
int wellCell(int wellnum, int perfnum) const
Definition: Wells.hpp:109
double perforationPressure(int cell) const
Definition: Wells.hpp:130
double wellToReservoirFlux(int cell) const
Definition: Wells.hpp:136
Definition: BlackoilFluid.hpp:32