|
opm-common
|
Base class for PVTG and PVTO tables. More...
#include <PvtxTable.hpp>
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. | |
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
|
default |
Default constructor.
Resulting object is mostly usable as a target for a deserialisation operation.
|
explicit |
Constructor.
Forms an empty table object that must be populated in a subsequent call to init().
| [in] | columnName | Name of primary ("outer") lookup key. User controlled name for the composition/pressure/etc node. |
|
virtualdefault |
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.
|
inline |
Start of sequence of sub-tables.
One sub-table for each composition (PVTO) or pressure (PVTG) node.
|
inline |
Start of sequence of sub-tables.
One sub-table for each composition (PVTO) or pressure (PVTG) node.
| double Opm::PvtxTable::getArgValue | ( | std::size_t | index | ) | const |
Retrieve composition/pressure node value at input point.
| [in] | index | Node index in the range 0..size()-1. |
index. | 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.
| const SimpleTable & Opm::PvtxTable::getUnderSaturatedTable | ( | std::size_t | tableNumber | ) | const |
Retrieve sub-table for a single composition or pressure node.
| [in] | tableNumber | Node index in the range 0..size()-1. |
|
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().
| [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. |
|
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.
| [in] | keyword | Input PVTx keyword–typically PVTO or PVTG. |
keyword. | bool Opm::PvtxTable::operator== | ( | const PvtxTable & | data | ) | const |
Equality predicate.
| [in] | data | Object against which will be tested for equality. |
data.
|
static |
Identify which input records pertain to which PVT regions.
| [in] | keyword | Input PVTx keyword–typically PVTO or PVTG. |
keyword.
|
inline |
Convert between byte array and object representation.
| Serializer | Byte array conversion protocol. |
| [in,out] | serializer | Byte array conversion object. |
| 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.
|
protected |
Table description of primary lookup key.
Typically the composition (Rs, PVTO) or the pressure (Pg, PVTG).
|
protected |
Under-saturated sub-tables.
One table for each value of the primary lookup key.