#include <PvtLiveGas.hpp>

Inheritance diagram for Opm::PvtLiveGas:
Inheritance graph

Public Types

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

Public Member Functions

 PvtLiveGas (const std::vector< Opm::PvtgTable > &pvtgTables)
 
virtual ~PvtLiveGas ()
 
virtual void mu (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_mu) const
 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
 
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
 
virtual void B (const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_B) const
 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
 Formation volume factor and p-derivative as functions of p, T 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_dbdr) const
 
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_dbdr) const
 
virtual void rsSat (const int n, const int *pvtRegionIdx, const double *p, double *output_rsSat, double *output_drsSatdp) const
 Solution gas/oil ratio and its derivatives at saturated conditions as a function of p, T. More...
 
virtual void rvSat (const int n, const int *pvtRegionIdx, const double *p, double *output_rvSat, double *output_drvSatdp) const
 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
 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
 Solution factor and p-derivative as functions of p and z. More...
 
void setPhaseConfiguration (const int num_phases, const int *phase_pos)
 

Static Public Attributes

static const int MaxNumPhases = 3
 

Protected Member Functions

int getTableIndex_ (const int *pvtTableIdx, int cellIdx) const
 
double evalB (double press, const double *surfvol, int pvtTableIdx) const
 
void evalBDeriv (double press, const double *surfvol, int pvtTableIdx, double &B, double &dBdp) const
 
double evalR (double press, const double *surfvol, int pvtTableIdx) const
 
void evalRDeriv (double press, const double *surfvol, int pvtTableIdx, double &R, double &dRdp) const
 
double miscible_gas (const double press, const double *surfvol, const int pvtTableIdx, const int item, const bool deriv=false) const
 
double miscible_gas (const double press, const double r, const PhasePresence &cond, const int pvtTableIdx, const int item, const int deriv=0) const
 

Protected Attributes

std::vector< std::vector
< std::vector< double > > > 
saturated_gas_table_
 
std::vector< std::vector
< std::vector< std::vector
< double > > > > 
undersat_gas_tables_
 
int num_phases_
 
int phase_pos_ [MaxNumPhases]
 

Detailed Description

Class for miscible wet gas (with vaporized oil in vapour phase). 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: 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.

Member Enumeration Documentation

Enumerator
Aqua 
Liquid 
Vapour 

Constructor & Destructor Documentation

Opm::PvtLiveGas::PvtLiveGas ( const std::vector< Opm::PvtgTable > &  pvtgTables)
virtual Opm::PvtLiveGas::~PvtLiveGas ( )
virtual

Member Function Documentation

virtual void Opm::PvtLiveGas::B ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_B 
) const
virtual

Formation volume factor as a function of p, T and z.

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::b ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  r,
double *  output_b,
double *  output_dbdp,
double *  output_dbdr 
) const
virtual

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

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::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_dbdr 
) const
virtual

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

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::dBdp ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_B,
double *  output_dBdp 
) const
virtual

Formation volume factor and p-derivative as functions of p, T and z.

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::dRdp ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  z,
double *  output_R,
double *  output_dRdp 
) const
virtual

Solution factor and p-derivative as functions of p and z.

Implements Opm::PvtInterface.

double Opm::PvtLiveGas::evalB ( double  press,
const double *  surfvol,
int  pvtTableIdx 
) const
protected
void Opm::PvtLiveGas::evalBDeriv ( double  press,
const double *  surfvol,
int  pvtTableIdx,
double &  B,
double &  dBdp 
) const
protected
double Opm::PvtLiveGas::evalR ( double  press,
const double *  surfvol,
int  pvtTableIdx 
) const
protected
void Opm::PvtLiveGas::evalRDeriv ( double  press,
const double *  surfvol,
int  pvtTableIdx,
double &  R,
double &  dRdp 
) const
protected
int Opm::PvtLiveGas::getTableIndex_ ( const int *  pvtTableIdx,
int  cellIdx 
) const
inlineprotected
double Opm::PvtLiveGas::miscible_gas ( const double  press,
const double *  surfvol,
const int  pvtTableIdx,
const int  item,
const bool  deriv = false 
) const
protected
double Opm::PvtLiveGas::miscible_gas ( const double  press,
const double  r,
const PhasePresence cond,
const int  pvtTableIdx,
const int  item,
const int  deriv = 0 
) const
protected
virtual void Opm::PvtLiveGas::mu ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  T,
const double *  z,
double *  output_mu 
) const
virtual

Viscosity as a function of p, T and z.

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::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
virtual

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

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::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
virtual

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

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::R ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
const double *  z,
double *  output_R 
) const
virtual

Solution factor as a function of p and z.

Implements Opm::PvtInterface.

virtual void Opm::PvtLiveGas::rsSat ( const int  n,
const int *  pvtRegionIdx,
const double *  p,
double *  output_rsSat,
double *  output_drsSatdp 
) const
virtual

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

Implements Opm::PvtInterface.

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

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

Implements Opm::PvtInterface.

void Opm::PvtInterface::setPhaseConfiguration ( const int  num_phases,
const int *  phase_pos 
)
inherited
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_
protectedinherited
int Opm::PvtInterface::phase_pos_[MaxNumPhases]
protectedinherited
std::vector< std::vector<std::vector<double> > > Opm::PvtLiveGas::saturated_gas_table_
protected
std::vector< std::vector<std::vector<std::vector<double> > > > Opm::PvtLiveGas::undersat_gas_tables_
protected

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