All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
legacy_well.h File Reference

Deprecated (and obsolescent) well definition. More...

Go to the source code of this file.

Classes

struct  LegacyWellCompletions
 Basic representation of well topology. More...
 
struct  LegacyWellControls
 Basic representation of well controls. More...
 
struct  completion_data
 Dynamic discretisation data relating well to flow in reservoir. More...
 

Typedefs

typedef struct
LegacyWellCompletions 
well_t
 Convenience type alias to preserve backwards compatibility in well topology definitions used by hybridised pressure solver.
 
typedef struct LegacyWellControls well_control_t
 Convenience type alias to preserve backwards compatiblity in well control definitions used by hybridised pressure solver.
 

Enumerations

enum  well_type { INJECTOR, PRODUCER }
 Well taxonomy.
 
enum  well_control { BHP, RATE }
 Control types recognised in system.
 
enum  surface_component { WATER = 0, OIL = 1, GAS = 2 }
 Compositions recognised in injection wells.
 

Functions

int allocate_cell_wells (int nc, well_t *W, int **cwpos, int **cwells)
 Allocate cell-to-well mapping (as a sparse array). More...
 
void deallocate_cell_wells (int *cvpos, int *cwells)
 Dispose of memory resources allocated using function allocate_cell_wells(). More...
 
void derive_cell_wells (int nc, well_t *W, int *cwpos, int *cwells)
 Construct cell-to-well mapping (i.e., transpose the well-to-cell mapping represented by W->well_cells). More...
 

Detailed Description

Deprecated (and obsolescent) well definition.

Still in use by the hybridized pressure solvers.

Function Documentation

int allocate_cell_wells ( int  nc,
well_t W,
int **  cwpos,
int **  cwells 
)

Allocate cell-to-well mapping (as a sparse array).

Parameters
[in]ncTotal number of cells.
[in]WWell topology (well-to-cell mapping).
[out]cwposIndirection array. Points to array of size nc + 1 if successful.
[out]cwellsCell-to-well mapping. Points to array of size W->well_connpos[ W->number_of_wells] if successful.
Returns
Positive number (size of *cwells) if successful. Zero in case of allocation failure.
void deallocate_cell_wells ( int *  cvpos,
int *  cwells 
)

Dispose of memory resources allocated using function allocate_cell_wells().

Following a call to deallocate_cell_wells(), the input pointers are no longer valid.

Parameters
[in,out]cvposCell-to-well start pointers.
[in,out]cwellsCell-to-well mapping.
void derive_cell_wells ( int  nc,
well_t W,
int *  cwpos,
int *  cwells 
)

Construct cell-to-well mapping (i.e., transpose the well-to-cell mapping represented by W->well_cells).

Parameters
[in]ncTotal number of cells.
[in]WWell topology (well-to-cell mapping).
[out]cwposCell-to-well start pointers.
[out]cwellsCell-to-well mapping.