#include <ECLGraph.hpp>

Classes

struct  ECLGeometryGrid
 Raw grid data (geometric grid) for corner-point grids. More...
 

Public Types

typedef double(ECLUnits::UnitSystem::* UnitConvention) () const
 

Public Member Functions

 ECLGraph ()=delete
 Disabled default constructor. More...
 
 ~ECLGraph ()
 Destructor. More...
 
 ECLGraph (ECLGraph &&rhs)
 
 ECLGraph (const ECLGraph &rhs)=delete
 Disabled copy constructor. More...
 
ECLGraphoperator= (ECLGraph &&rhs)
 
ECLGraphoperator= (const ECLGraph &rhs)=delete
 Disabled assignment operator. More...
 
int numGrids () const
 
int activeCell (const std::array< int, 3 > &ijk, const std::string &gridID="") const
 
std::size_t numCells () const
 Retrieve number of active cells in graph. More...
 
std::size_t numCells (const std::string &gridID) const
 Retrieve number of active cells in particular subgrid. More...
 
std::size_t numConnections () const
 Retrieve number of connections in graph. More...
 
std::vector< int > localCellID () const
 Retrieve active cell indices for all global cells in all grids. More...
 
const std::vector< ECLPhaseIndex > & activePhases () const
 
const std::vector< std::string > & activeGrids () const
 
std::vector< int > neighbours () const
 
std::vector< double > poreVolume () const
 
std::vector< double > transmissibility () const
 
std::vector< double > flux (const ECLRestartData &rstrt, const ECLPhaseIndex phase) const
 
template<typename T , class ResultSet >
std::vector< T > rawLinearisedCellData (const ResultSet &rset, const std::string &vector) const
 
template<typename T , class ResultSet >
std::vector< T > rawLinearisedCellData (const ResultSet &rset, const std::string &vector, const std::string &gridID) const
 
std::vector< double > linearisedCellData (const ECLRestartData &rstrt, const std::string &vector, UnitConvention unit) const
 
const ECLGeometryGridgetGeometryGrid () const
 

Static Public Member Functions

static ECLGraph load (const boost::filesystem::path &gridFile, const ECLInitFileData &init)
 
static ECLGraph load (const ecl_grid_type *grid, const ECLInitFileData &init)
 

Detailed Description

Package an ECLIPSE result set (represented as GRID, INIT, and restart files) in form usable with the computational engine represented by class

Opm::FlowDiagnostics::ToolBox

.

Member Typedef Documentation

◆ UnitConvention

typedef double(ECLUnits::UnitSystem::* Opm::ECLGraph::UnitConvention) () const

Convenience type alias for UnitSystem PMFs (pointer to member function).

Constructor & Destructor Documentation

◆ ECLGraph() [1/3]

Opm::ECLGraph::ECLGraph ( )
delete

Disabled default constructor.

◆ ~ECLGraph()

Opm::ECLGraph::~ECLGraph ( )

Destructor.

◆ ECLGraph() [2/3]

Opm::ECLGraph::ECLGraph ( ECLGraph &&  rhs)

Move constructor.

Parameters
[in]rhsGraph from which to appropriate resources. Invalid upon return.

◆ ECLGraph() [3/3]

Opm::ECLGraph::ECLGraph ( const ECLGraph rhs)
delete

Disabled copy constructor.

Member Function Documentation

◆ activeCell()

int Opm::ECLGraph::activeCell ( const std::array< int, 3 > &  ijk,
const std::string gridID = "" 
) const

Retrieve active cell ID from (I,J,K) tuple in particular grid.

Parameters
[in]ijkCartesian index tuple of particular cell.
[in]gridIDIdentity of specific grid to which to relate the (I,J,K) tuple. Use zero (default) for main grid and positive indices for any LGRs. The (I,J,K) indices must be within the ranges implied by the specific grid.
Returns
Active ID (relative to linear, global numbering) of cell (I,J,K) from specified grid. Negative one (-1) if (I,J,K) outside valid range or if the specific cell identified by ijk and gridID is not actually active.

Referenced by example::extractWellFlows().

◆ activeGrids()

const std::vector< std::string > & Opm::ECLGraph::activeGrids ( ) const

Retrieve the simulation scenario's set of active grids.

Mostly for canonical lookup of result data in LGRs.

Referenced by example::Setup::selectReportStep().

◆ activePhases()

const std::vector< ECLPhaseIndex > & Opm::ECLGraph::activePhases ( ) const

Retrieve the simulation scenario's active phases.

Mostly useful to determine the set of PhaseIndex values for which flux() will return non-zero values if data available.

Referenced by example::extractFluxField().

◆ flux()

std::vector< double > Opm::ECLGraph::flux ( const ECLRestartData rstrt,
const ECLPhaseIndex  phase 
) const

Retrieve phase flux on all connections defined by

std::vector< int > neighbours() const

.

Parameters
[in]phaseCanonical phase for which to retrieve flux.
Returns
Flux values corresponding to selected phase. Empty if unavailable in the result set (e.g., when querying the gas flux in an oil/water system or if no flux values at all were output to the restart file). Numerical values in SI units (rm^3/s).

Referenced by example::extractFluxField().

◆ getGeometryGrid()

const ECLGeometryGrid & Opm::ECLGraph::getGeometryGrid ( ) const

Retrieve corner-point grid definition, only for main grid in case of local grid refinement (LGR).

◆ linearisedCellData()

std::vector< double > Opm::ECLGraph::linearisedCellData ( const ECLRestartData rstrt,
const std::string vector,
UnitConvention  unit 
) const

Retrieve floating-point result set vector from current view (e.g., particular report step) linearised on active cells and converted to strict SI unit conventions.

Typical call:

const auto press =
lCD(rstrt, "PRESSURE", &ECLUnits::UnitSystem::pressure);
virtual double pressure() const =0
Parameters
[in]rstrtECL Restart dataset. It is the responsibility of the caller to ensure that the restart data is correctly positioned on a particular report step.
[in]vectorName of result set vector.
[in]unitCall-back hook in UnitSystem implementation that enables converting the raw result data to strict SI unit conventions. Hook is called for each grid in the result set.
Returns
Result set vector linearised on active cells, converted to strict SI unit conventions.

◆ load() [1/2]

static ECLGraph Opm::ECLGraph::load ( const boost::filesystem::path &  gridFile,
const ECLInitFileData init 
)
static

Named constructor.

Parameters
[in]gridName or prefix of ECL grid (i.e., .GRID or .EGRID) file.
[in]initName of ECL INIT file corresponding to grid input. Assumed to provide at least a complete set of pore-volume values (i.e., for all global cells defined in the grid).

If available in the INIT file, the constructor will also leverage the transmissibility data when constructing the active cell neighbourship table.

Returns
Fully formed ECLIPSE connection graph with property associations.

◆ load() [2/2]

static ECLGraph Opm::ECLGraph::load ( const ecl_grid_type grid,
const ECLInitFileData init 
)
static

◆ localCellID()

std::vector< int > Opm::ECLGraph::localCellID ( ) const

Retrieve active cell indices for all global cells in all grids.

◆ neighbours()

std::vector< int > Opm::ECLGraph::neighbours ( ) const

Retrieve neighbourship relations between active cells.

The i-th connection is between active cells

neighbours()[2*i + 0]

and

neighbours()[2*i + 1]

.

Referenced by example::initToolbox().

◆ numCells() [1/2]

std::size_t Opm::ECLGraph::numCells ( ) const

Retrieve number of active cells in graph.

Referenced by example::initToolbox().

◆ numCells() [2/2]

std::size_t Opm::ECLGraph::numCells ( const std::string gridID) const

Retrieve number of active cells in particular subgrid.

◆ numConnections()

std::size_t Opm::ECLGraph::numConnections ( ) const

Retrieve number of connections in graph.

Referenced by example::extractFluxField().

◆ numGrids()

int Opm::ECLGraph::numGrids ( ) const

Retrieve number of grids in model.

Returns
The number of LGR grids plus one (the main grid).

◆ operator=() [1/2]

ECLGraph & Opm::ECLGraph::operator= ( const ECLGraph rhs)
delete

Disabled assignment operator.

◆ operator=() [2/2]

ECLGraph & Opm::ECLGraph::operator= ( ECLGraph &&  rhs)

Move assignment operator.

Parameters
[in]rhsGraph from which to appropriate resources.
Returns
Reference to
*this
.

◆ poreVolume()

std::vector< double > Opm::ECLGraph::poreVolume ( ) const

Retrieve static pore-volume values on active cells only.

Corresponds to the PORV vector in the INIT file, possibly restricted to those active cells for which the pore-volume is strictly positive. Numerical values in SI units (rm^3).

Referenced by example::initToolbox().

◆ rawLinearisedCellData() [1/2]

template<typename T , class ResultSet >
std::vector< T > Opm::ECLGraph::rawLinearisedCellData ( const ResultSet &  rset,
const std::string vector 
) const

Retrieve result set vector from current view (e.g., particular report step) linearised on active cells.

Template Parameters
TElement type of result set vector.
Parameters
[in]vectorName of result set vector.
Returns
Result set vector linearised on active cells.

◆ rawLinearisedCellData() [2/2]

template<typename T , class ResultSet >
std::vector< T > Opm::ECLGraph::rawLinearisedCellData ( const ResultSet &  rset,
const std::string vector,
const std::string gridID 
) const

Retrieve result set vector from current view (e.g., particular report step) linearised on active cells of a particular sub-grid.

Template Parameters
TElement type of result set vector.
Parameters
[in]vectorName of result set vector.
[in]gridIDIdentity of specific grid to which to relate the requested vector. Use empty for main grid and names for any LGRs.
Returns
Result set vector linearised on active cells of sub-grid.

◆ transmissibility()

std::vector< double > Opm::ECLGraph::transmissibility ( ) const

Retrieve static (background) transmissibility values on all connections defined by

.

Specifically,

std::vector< double > transmissibility() const

is the transmissibility of the connection between cells

neighbours()[2*i + 0]

and

neighbours()[2*i + 1]

.


The documentation for this class was generated from the following file: