opm-common
Opm::CompvdTable Class Reference

Table representation of the E300 COMPVD keyword. More...

#include <CompvdTable.hpp>

Inheritance diagram for Opm::CompvdTable:
Opm::SimpleTable

Public Types

enum  Phase { Vapor, Liquid }
 

Public Member Functions

 CompvdTable (const DeckItem &item, const int tableID, const int numComponents, const UnitSystem &unitSystem, const KeywordLocation &location)
 
const TableColumngetDepthColumn () const
 
const TableColumngetMoleFractionColumn (int componentIdx) const
 
const TableColumngetSaturationPressureColumn () const
 Observed saturation pressure, in SI units (Pa).
 
Phase phaseFlag (std::size_t rowIdx) const
 Vapor or liquid for the given row.
 
const std::vector< Phase > & phaseFlags () const
 
int numComponents () const
 
- Public Member Functions inherited from Opm::SimpleTable
 SimpleTable (TableSchema, const std::string &tableName, const DeckItem &deckItem, const int tableID)
 
 SimpleTable (TableSchema)
 
void addColumns ()
 
void init (const std::string &tableName, const DeckItem &deckItem, const int tableID, double scaling_factor=0.0)
 Initialize deck item. More...
 
std::size_t numColumns () const
 
std::size_t numRows () const
 
void addRow (const std::vector< double > &row, const std::string &tableName)
 
const TableColumngetColumn (const std::string &name) const
 
const TableColumngetColumn (std::size_t colIdx) const
 
bool hasColumn (const std::string &name) const
 
TableColumngetColumn (const std::string &name)
 
TableColumngetColumn (std::size_t colIdx)
 
double get (const std::string &column, std::size_t row) const
 
double get (std::size_t column, std::size_t row) const
 
double evaluate (const std::string &columnName, double xPos) const
 Evaluate a column of the table at a given position. More...
 
void assertJFuncPressure (const bool jf) const
 throws std::invalid_argument if jf != m_jfunc
 
bool operator== (const SimpleTable &data) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Additional Inherited Members

- Static Public Member Functions inherited from Opm::SimpleTable
static SimpleTable serializationTestObject ()
 
- Protected Attributes inherited from Opm::SimpleTable
TableSchema m_schema
 
OrderedMap< TableColumnm_columns
 
bool m_jfunc = false
 

Detailed Description

Table representation of the E300 COMPVD keyword.

Each row of the input contains, in order:

  • Depth (Length)
  • NCOMPS total mole fractions z_i (dimensionless)
  • Phase flag: 0 = vapor (above GOC), 1 = liquid (below GOC) (int)
  • Observed saturation pressure Psat (Pressure)

Internally only the depth, mole-fraction, and Psat columns are stored in the underlying SimpleTable (since SimpleTable is hard-coded to operate on doubles). The phase flag is a discrete label and is therefore stored separately as a std::vector<int> exposed via phaseFlag(row) / phaseFlags().

Mole fractions on each row are checked to sum to 1, and the phase flag is checked to be either 0 or 1.


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