20 #ifndef OPM_WELLS_H_INCLUDED
21 #define OPM_WELLS_H_INCLUDED
API for managing sets of well controls.
char ** name
Well names.
Definition: wells.h:107
Controls for a single well.
Definition: well_controls.c:72
int append_well_controls(enum WellControlType type, double target, double alq, int vfp, const double *distr, int well_index, struct Wells *W)
Append operational constraint to an existing well.
Definition: wells.c:440
double * wdp
Gravity potentials.
Definition: wells.h:141
int * well_cells
Array of perforation cell indices.
Definition: wells.h:87
void set_current_control(int well_index, int current_control, struct Wells *W)
Set the current/active control for a single well.
double * depth_ref
Array of well reference depths.
Definition: wells.h:63
int number_of_wells
Number of wells.
Definition: wells.h:52
int * allow_cf
Array of flags indicating whether crossflow is allowed or not if allow_cf[w] == 0 (false) then crossf...
Definition: wells.h:113
double * A
Volumes to surface-components matrix, A = RB^{-1}.
Definition: wells.h:146
Data structure aggregating static information about all wells in a scenario.
Definition: wells.h:50
void clear_well_controls(int well_index, struct Wells *W)
Clear all controls from a single well.
bool wells_equal(const struct Wells *W1, const struct Wells *W2, bool verbose)
Compare well structures for equality.
Well is an injector.
Definition: wells.h:42
int * well_connpos
Array of indices into well_cells (and WI).
Definition: wells.h:81
struct Wells * create_wells(int nphases, int nwells, int nperf)
Construct a Wells object initially capable of managing a given number of wells and total number of we...
Data structure aggregating dynamic information about all wells in a scenario.
Definition: wells.h:136
double * comp_frac
Component fractions for each well.
Definition: wells.h:73
void * data
Internal management structure.
Definition: wells.h:118
int * sat_table_id
Saturation table number , same size and structure as well_cells.
Definition: wells.h:97
WellType
Well type indicates desired/expected well behaviour.
Definition: wells.h:41
enum WellType * type
Array of well types.
Definition: wells.h:58
int number_of_phases
Number of phases.
Definition: wells.h:53
WellControlType
Definition: well_controls.h:34
Well is a producer.
Definition: wells.h:43
double * phasemob
Phase mobilities for all perforations, stored consecutively with the phase index cycling the most rap...
Definition: wells.h:152
struct Wells * clone_wells(const struct Wells *W)
Create a deep-copy (i.e., clone) of an existing Wells object, including its controls.
void destroy_wells(struct Wells *W)
Wells object destructor.
struct WellControls ** ctrls
Well controls, one set of controls for each well.
Definition: wells.h:102
double * WI
Well productivity index, same size and structure as well_cells.
Definition: wells.h:92
int add_well(enum WellType type, double depth_ref, int nperf, const double *comp_frac, const int *cells, const double *WI, const int *sat_table_id, const char *name, int allow_cf, struct Wells *W)
Append a new well to an existing Wells object.
Definition: wells.c:365