Loading...
Searching...
No Matches
Opm::PvtxTable Class Reference

Base class for PVTG and PVTO tables. More...

`#include <PvtxTable.hpp>`

Inheritance diagram for Opm::PvtxTable:

## Public Member Functions

| PvtxTable ()=default
| Default constructor.
| PvtxTable (const std::string &columnName)
| Constructor.
virtual | ~PvtxTable ()=default
| Virtual destructor.
const SimpleTable & | getSaturatedTable () const
| Retrieve derived table of saturated states.
const SimpleTable & | getUnderSaturatedTable (std::size_t tableNumber) const
| Retrieve sub-table for a single composition or pressure node.
double | getArgValue (std::size_t index) const
| Retrieve composition/pressure node value at input point.
std::size_t | size () const
| Number of sub-tables.
auto | begin () const
| Start of sequence of sub-tables.
auto | cbegin () const
| Start of sequence of sub-tables.
auto | end () const
| End of sequence of sub-tables.
auto | cend () const
| End of sequence of sub-tables.
bool | operator== (const PvtxTable &data) const
| Equality predicate.
template<class Serializer>
void | serializeOp (Serializer &serializer)
| Convert between byte array and object representation.

## Static Public Member Functions

static std::size_t | numTables (const DeckKeyword &keyword)
| Number of complete tables in input PVTx keyword.
static std::vector< std::pair< std::size_t, std::size_t > > | recordRanges (const DeckKeyword &keyword)
| Identify which input records pertain to which PVT regions.
static PvtxTable | serializationTestObject ()
| Create a serialisation test object.

## Protected Member Functions

void | init (const DeckKeyword &keyword, std::size_t tableIdx)
| Populate internal data structures from PVTx input table data.

## Protected Attributes

ColumnSchema | m_outerColumnSchema {}
| Table description of primary lookup key.
TableColumn | m_outerColumn {}
| Primary lookup key values.
TableSchema | m_underSaturatedSchema {}
| Table description of under-saturated states.
TableSchema | m_saturatedSchema {}
| Table description of saturated states.
std::vector< SimpleTable > | m_underSaturatedTables {}
| Under-saturated sub-tables.
SimpleTable | m_saturatedTable {}
| Inferred table of saturated states.

## Detailed Description

Base class for PVTG and PVTO tables.

Maintains an internal representation of FVF/viscosity values versus pressure (PVTO) or composition (Rv, PVTG) for each of a set of composition (Rs, PVTO) or pressure (PVTG) nodes.

PVTO – Rs Pressure Bo Viscosity – (bar) (cP)

[ 20.59 { 50.00 1.10615 1.180 } ] | { 75.00 1.10164 1.247 } | { 100.00 1.09744 1.315 } | { 125.00 1.09351 1.384 } | { 150.00 1.08984 1.453 }/ | | [ 28.19 { 70.00 1.12522 1.066 } ] | { 95.00 1.12047 1.124 } | { 120.00 1.11604 1.182 } |– PVT region 1 { 145.00 1.11191 1.241 } | { 170.00 1.10804 1.300 }/ | | [ 36.01 { 90.00 1.14458 0.964 } ] | { 115.00 1.13959 1.014 } | { 140.00 1.13494 1.064 } | { 165.00 1.13060 1.115 } | { 190.00 1.12653 1.166 }/ | / |

404.60 594.29 1.97527 0.21564 | 619.29 1.96301 0.21981 | 644.29 1.95143 0.22393 |– PVT region 2 669.29 1.94046 0.22801 | 694.29 1.93005 0.23204 / | / |

404.60 594.29 1.97527 0.21564 | 619.29 1.96301 0.21981 | 644.29 1.95143 0.22393 | 669.29 1.94046 0.22801 | 694.29 1.93005 0.23204 / |– PVT region 3 404.60 594.29 1.97527 0.21564 | 619.29 1.96301 0.21981 | 644.29 1.95143 0.22393 | 669.29 1.94046 0.22801 | 694.29 1.93005 0.23204 / | / |

Saturated states are marked with [ ... ], while the corresponding under-saturated tables are marked with { ... }. Thus, for PVT region 1 the table of saturated properties is

Rs Pressure Bo Viscosity 20.59 50.00 1.10615 1.180 28.19 70.00 1.12522 1.066 36.01 90.00 1.14458 0.964

This table is available through member function getSaturatedTable().

For each composition (Rs) value there is a table of under-saturated properties. These tables may be retrieved through member function getUnderSaturatedTable(index) in which 'index' identifies the composition node. In the example above the under-saturated table in PVT region 1 for Rs=28.19 (i.e., index = 1) is

    Pressure     Bo          Viscosity
       70.00     1.12522     1.066
       95.00     1.12047     1.124
      120.00     1.11604     1.182
      145.00     1.11191     1.241
      170.00     1.10804     1.300

## Constructor & Destructor Documentation

## PvtxTable() [1/2]

Opm::PvtxTable::PvtxTable | ( |  | ) |

default

Default constructor.

Resulting object is mostly usable as a target for a deserialisation operation.

## PvtxTable() [2/2]

Opm::PvtxTable::PvtxTable | ( | const std::string & | columnName | ) |

explicit

Constructor.

Forms an empty table object that must be populated in a subsequent call to init().

Parameters

  [in] | columnName | Name of primary ("outer") lookup key. User controlled name for the composition/pressure/etc node.

## ~PvtxTable()

virtual Opm::PvtxTable::~PvtxTable | ( |  | ) |

virtual default

Virtual destructor.

This type is intended to be a base class for others–i.e., those that define the specifics of a particular PVTx table.

## Member Function Documentation

## begin()

auto Opm::PvtxTable::begin | ( |  | ) | const

inline

Start of sequence of sub-tables.

One sub-table for each composition (PVTO) or pressure (PVTG) node.

## cbegin()

auto Opm::PvtxTable::cbegin | ( |  | ) | const

inline

Start of sequence of sub-tables.

One sub-table for each composition (PVTO) or pressure (PVTG) node.

## getArgValue()

double Opm::PvtxTable::getArgValue | ( | std::size_t | index | ) | const

Retrieve composition/pressure node value at input point.

Parameters

  [in] | index | Node index in the range 0..size()-1.

Returns
  Input composition (Rs, PVTO) or pressure (Pg, PVTG) at `index`.

## getSaturatedTable()

const SimpleTable & Opm::PvtxTable::getSaturatedTable | ( |  | ) | const

Retrieve derived table of saturated states.

Generated from first row of each sub-table, along with the associated composition (PVTO) or pressure (PVTG) information.

## getUnderSaturatedTable()

const SimpleTable & Opm::PvtxTable::getUnderSaturatedTable | ( | std::size_t | tableNumber | ) | const

Retrieve sub-table for a single composition or pressure node.

Parameters

  [in] | tableNumber | Node index in the range 0..size()-1.

## init()

void Opm::PvtxTable::init | ( | const DeckKeyword & | keyword,
|  | std::size_t | tableIdx )

protected

Populate internal data structures from PVTx input table data.

Fills the under-saturated sub-tables and generates the inferred "saturated" table for a single PVT region. Clients–i.e., derived classes–must define the table "schema" members (i.e., m_underSaturatedSchema and m_saturatedSchema) prior to calling init().

Parameters

  [in] | keyword | Input PVTx table data. Typically containing PVTO or PVTG (or similar) tables.
  [in] | tableIdx | Zero-based region index for which to internalise table data.

## numTables()

std::size_t Opm::PvtxTable::numTables | ( | const DeckKeyword & | keyword | ) |

static

Number of complete tables in input PVTx keyword.

This is effectively the number of regions for which input PVT data is provided and should typically match the run's number of PVT regions.

Parameters

  [in] | keyword | Input PVTx keyword–typically PVTO or PVTG.

Returns
  Number of complete tables in `keyword`.

## operator==()

bool Opm::PvtxTable::operator== | ( | const PvtxTable & | data | ) | const

Equality predicate.

Parameters

  [in] | data | Object against which will be tested for equality.

Returns
  Whether or not
  is the same as `data`.

## recordRanges()

std::vector< std::pair< std::size_t, std::size_t > > Opm::PvtxTable::recordRanges | ( | const DeckKeyword & | keyword | ) |

static

Identify which input records pertain to which PVT regions.

Parameters

  [in] | keyword | Input PVTx keyword–typically PVTO or PVTG.

Returns
  Keyword index ranges. One range for each PVT region. Each range is defined by a pair of start/end indices into the input `keyword`.

## serializeOp()

template<class Serializer>

void Opm::PvtxTable::serializeOp | ( | Serializer & | serializer | ) |

inline

Convert between byte array and object representation.

Template Parameters

  Serializer | Byte array conversion protocol.

Parameters

  [in,out] | serializer | Byte array conversion object.

## size()

std::size_t Opm::PvtxTable::size | ( |  | ) | const

Number of sub-tables.

Effectively the number of composition (PVTO) or pressure (PVTG) nodes in the input table.

## Member Data Documentation

## m_outerColumnSchema

ColumnSchema Opm::PvtxTable::m_outerColumnSchema {}

protected

Table description of primary lookup key.

Typically the composition (Rs, PVTO) or the pressure (Pg, PVTG).

## m_underSaturatedTables

std::vector<SimpleTable> Opm::PvtxTable::m_underSaturatedTables {}

protected

Under-saturated sub-tables.

One table for each value of the primary lookup key.

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

- opm/input/eclipse/EclipseState/Tables/PvtxTable.hpp
- opm/input/eclipse/EclipseState/Tables/PvtxTable.cpp