#include <WellsManager.hpp>
|
| WellsManager () |
| Default constructor – no wells. More...
|
|
| WellsManager (struct Wells *W) |
|
template<class F2C , class FC > |
| WellsManager (const Opm::EclipseStateConstPtr eclipseState, 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 double *permeability, bool is_parallel_run=false) |
|
| WellsManager (const Opm::EclipseStateConstPtr eclipseState, const size_t timeStep, const UnstructuredGrid &grid, const double *permeability) |
|
| ~WellsManager () |
| Destructor. More...
|
|
bool | empty () const |
| Does the "deck" define any wells? More...
|
|
const Wells * | c_wells () const |
|
const WellCollection & | wellCollection () const |
| Access the well group hierarchy. More...
|
|
bool | conditionsMet (const std::vector< double > &well_bhp, const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase) |
|
void | applyExplicitReinjectionControls (const std::vector< double > &well_reservoirrates_phase, const std::vector< double > &well_surfacerates_phase) |
|
template<class C2F , class FC > |
| WellsManager (const Opm::EclipseStateConstPtr eclipseState, const size_t timeStep, int number_of_cells, const int *global_cell, const int *cart_dims, int dimensions, const C2F &cell_to_faces, FC begin_face_centroids, const double *permeability, bool is_parallel_run) |
|
This class manages a Wells struct in the sense that it encapsulates creation and destruction of the wells data structure. The resulting Wells is available through the c_wells() method.
Opm::WellsManager::WellsManager |
( |
| ) |
|
Default constructor – no wells.
Opm::WellsManager::WellsManager |
( |
struct Wells * |
W | ) |
|
|
explicit |
Construct from existing wells object. WellsManager is not properly initialised in the sense that the logic to manage control switching does not exist.
- Parameters
-
[in] | W | Existing wells object. |
template<class F2C , class FC >
Opm::WellsManager::WellsManager |
( |
const Opm::EclipseStateConstPtr |
eclipseState, |
|
|
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 double * |
permeability, |
|
|
bool |
is_parallel_run = false |
|
) |
| |
Construct from input deck and grid. The permeability argument may be zero if the input contain well productivity indices, otherwise it must be given in order to approximate these by the Peaceman formula.
Opm::WellsManager::WellsManager |
( |
const Opm::EclipseStateConstPtr |
eclipseState, |
|
|
const size_t |
timeStep, |
|
|
const UnstructuredGrid & |
grid, |
|
|
const double * |
permeability |
|
) |
| |
Opm::WellsManager::~WellsManager |
( |
| ) |
|
template<class C2F , class FC >
Opm::WellsManager::WellsManager |
( |
const Opm::EclipseStateConstPtr |
eclipseState, |
|
|
const size_t |
timeStep, |
|
|
int |
number_of_cells, |
|
|
const int * |
global_cell, |
|
|
const int * |
cart_dims, |
|
|
int |
dimensions, |
|
|
const C2F & |
cell_to_faces, |
|
|
FC |
begin_face_centroids, |
|
|
const double * |
permeability, |
|
|
bool |
is_parallel_run |
|
) |
| |
void Opm::WellsManager::applyExplicitReinjectionControls |
( |
const std::vector< double > & |
well_reservoirrates_phase, |
|
|
const std::vector< double > & |
well_surfacerates_phase |
|
) |
| |
Applies explicit reinjection controls. This must be called at each timestep to be correct. - Parameters
-
[in] | well_reservoirrates_phase | A vector containing reservoir rates by phase for each well. Is assumed to be ordered the same way as the related Wells-struct, with all phase rates of a single well adjacent in the array. |
[in] | well_surfacerates_phase | A vector containing surface rates by phase for each well. Is assumed to be ordered the same way as the related Wells-struct, with all phase rates of a single well adjacent in the array. |
const Wells* Opm::WellsManager::c_wells |
( |
| ) |
const |
Access the managed Wells. The method is named similarly to c_str() in std::string, to make it clear that we are returning a C-compatible struct.
bool Opm::WellsManager::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 active control of violating wells, or shuts down wells). Only one change is applied per invocation. Typical use will be solve_pressure();
while(!wells.conditionsMet(...)) {
solve_pressure();
}
- Parameters
-
[in] | well_bhp | A vector containing the bhp for each well. Is assumed to be ordered the same way as the related Wells-struct. |
[in] | well_reservoirrates_phase | A vector containing reservoir rates by phase for each well. Is assumed to be ordered the same way as the related Wells-struct, with all phase rates of a single well adjacent in the array. |
[in] | well_surfacerates_phase | A vector containing surface rates by phase for each well. Is assumed to be ordered the same way as the related Wells-struct, with all phase rates of a single well adjacent in the array. |
- Returns
- true if no violations were found, false otherwise (false also implies a change).
bool Opm::WellsManager::empty |
( |
| ) |
const |
Does the "deck" define any wells?
Access the well group hierarchy.
The documentation for this class was generated from the following files:
|