#include <PvtInterface.hpp>

Inheritance diagram for Opm::PvtInterface:
Inheritance graph

Public Types

enum  PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2 }
 

Public Member Functions

 PvtInterface ()
 
virtual ~PvtInterface ()
 
void setPhaseConfiguration (const int num_phases, const int *phase_pos)
 
virtual void mu (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_mu) const =0
 Viscosity as a function of p, T and z. More...
 
virtual void mu (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *r, double *output_mu, double *output_dmudp, double *output_dmudr) const =0
 
virtual void mu (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *r, const PhasePresence *cond, double *output_mu, double *output_dmudp, double *output_dmudr) const =0
 
virtual void B (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_B) const =0
 Formation volume factor as a function of p, T and z. More...
 
virtual void dBdp (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_B, double *output_dBdp) const =0
 Formation volume factor and p-derivative as functions of p and z. More...
 
virtual void b (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *r, double *output_b, double *output_dbdp, double *output_dpdr) const =0
 
virtual void b (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *r, const PhasePresence *cond, double *output_b, double *output_dbdp, double *output_dpdr) const =0
 
virtual void rsSat (const int n, const int *pvtRegionIdx, const double *p, double *output_rsSat, double *output_drsSatdp) const =0
 Solution gas/oil ratio and its derivatives at saturated conditions as a function of p. More...
 
virtual void rvSat (const int n, const int *pvtRegionIdx, const double *p, double *output_rvSat, double *output_drvSatdp) const =0
 Vapor oil/gas ratio and its derivatives at saturated conditions as a function of p. More...
 
virtual void R (const int n, const int *pvtRegionIdx, const double *p, const double *z, double *output_R) const =0
 Solution factor as a function of p and z. More...
 
virtual void dRdp (const int n, const int *pvtRegionIdx, const double *p, const double *z, double *output_R, double *output_dRdp) const =0
 Solution factor and p-derivative as functions of p and z. More...
 

Static Public Attributes

static const int MaxNumPhases = 3
 

Protected Attributes

int num_phases_
 
int phase_pos_ [MaxNumPhases]
 

Member Enumeration Documentation

Enumerator
Aqua 
Liquid 
Vapour 

Constructor & Destructor Documentation

Opm::PvtInterface::PvtInterface ( )
virtual Opm::PvtInterface::~PvtInterface ( )
virtual

Member Function Documentation

virtual void Opm::PvtInterface::B ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_B 
) const
pure virtual
virtual void Opm::PvtInterface::b ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  r,
double *  output_b,
double *  output_dbdp,
double *  output_dpdr 
) const
pure virtual

The inverse of the volume factor b = 1 / B as a function of p, T and r. The fluid is considered saturated if r >= rsSat(p).

Implemented in Opm::ThermalOilPvtWrapper, Opm::ThermalWaterPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtConstCompr, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveOil, and Opm::PvtLiveGas.

virtual void Opm::PvtInterface::b ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  r,
const PhasePresence cond,
double *  output_b,
double *  output_dbdp,
double *  output_dpdr 
) const
pure virtual

The inverse of the volume factor b = 1 / B as a function of p, T and r. State condition determined by 'cond'.

Implemented in Opm::ThermalWaterPvtWrapper, Opm::ThermalOilPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtConstCompr, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveOil, and Opm::PvtLiveGas.

virtual void Opm::PvtInterface::dBdp ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_B,
double *  output_dBdp 
) const
pure virtual
virtual void Opm::PvtInterface::dRdp ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  z,
double *  output_R,
double *  output_dRdp 
) const
pure virtual
virtual void Opm::PvtInterface::mu ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_mu 
) const
pure virtual

Viscosity as a function of p, T and z.

The PVT properties can either be given as a function of pressure (p), temperature (T) and surface volume (z) or pressure (p), temperature (T) and gas resolution factor (r). For all the virtual methods, the following apply:

  • pvtRegionIdx is an array of size n and represents the index of the PVT table which should be used to calculate the output. NULL can also be passed and is interpreted such that the first table should be used for the output
  • p, r and z are expected to be of size n, size n and n*num_phases, respectively.
  • Output arrays shall be of size n, and must be valid before calling the method.

Implemented in Opm::PvtConstCompr, Opm::ThermalOilPvtWrapper, Opm::ThermalWaterPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveOil, and Opm::PvtLiveGas.

virtual void Opm::PvtInterface::mu ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  r,
double *  output_mu,
double *  output_dmudp,
double *  output_dmudr 
) const
pure virtual

Viscosity as a function of p, T and r. The fluid is considered saturated if r >= rsSat(p).

Implemented in Opm::PvtConstCompr, Opm::ThermalOilPvtWrapper, Opm::ThermalWaterPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveOil, and Opm::PvtLiveGas.

virtual void Opm::PvtInterface::mu ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  r,
const PhasePresence cond,
double *  output_mu,
double *  output_dmudp,
double *  output_dmudr 
) const
pure virtual

Viscosity as a function of p, T and r. State condition determined by 'cond'.

Implemented in Opm::ThermalOilPvtWrapper, Opm::ThermalWaterPvtWrapper, Opm::PvtConstCompr, Opm::ThermalGasPvtWrapper, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveOil, and Opm::PvtLiveGas.

virtual void Opm::PvtInterface::R ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  z,
double *  output_R 
) const
pure virtual
virtual void Opm::PvtInterface::rsSat ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
double *  output_rsSat,
double *  output_drsSatdp 
) const
pure virtual

Solution gas/oil ratio and its derivatives at saturated conditions as a function of p.

Implemented in Opm::ThermalWaterPvtWrapper, Opm::ThermalOilPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtConstCompr, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveGas, and Opm::PvtLiveOil.

virtual void Opm::PvtInterface::rvSat ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
double *  output_rvSat,
double *  output_drvSatdp 
) const
pure virtual

Vapor oil/gas ratio and its derivatives at saturated conditions as a function of p.

Implemented in Opm::ThermalWaterPvtWrapper, Opm::ThermalOilPvtWrapper, Opm::ThermalGasPvtWrapper, Opm::PvtConstCompr, Opm::PvtDead, Opm::PvtDeadSpline, Opm::PvtLiveGas, and Opm::PvtLiveOil.

void Opm::PvtInterface::setPhaseConfiguration ( const int  num_phases,
const int *  phase_pos 
)
Parameters
[in]num_phasesThe number of active phases.
[in]phase_posArray of BlackpoilPhases::MaxNumPhases integers, giving the relative positions of the three canonical phases A, L, V in order to handle arbitrary two-phase and three-phase situations.

Member Data Documentation

int Opm::PvtInterface::num_phases_
protected
int Opm::PvtInterface::phase_pos_[MaxNumPhases]
protected

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