Opm::PengRobinson< Scalar > Class Template Reference

Implements the Peng-Robinson equation of state for liquids and gases. More...

#include <PengRobinson.hpp>

Static Public Member Functions

static void init (Scalar, Scalar, unsigned, Scalar, Scalar, unsigned)
 
template<class Params >
static Scalar computeVaporPressure (const Params &params, Scalar T)
 Predicts the vapor pressure for the temperature given in setTP(). More...
 
template<class FluidState , class Params >
static Scalar computeMolarVolume (const FluidState &fs, Params &params, unsigned phaseIdx, bool isGasPhase)
 Computes molar volumes where the Peng-Robinson EOS is true. More...
 
template<class Params >
static Scalar computeFugacityCoeffient (const Params &params)
 Returns the fugacity coefficient for a given pressure and molar volume. More...
 
template<class Params >
static Scalar computeFugacity (const Params &params)
 Returns the fugacity coefficient for a given pressure and molar volume. More...
 

Static Protected Member Functions

template<class FluidState , class Params >
static void handleCriticalFluid_ (Scalar &Vm, const FluidState &, const Params &params, unsigned phaseIdx, bool isGasPhase)
 
static void findCriticalPoint_ (Scalar &Tcrit, Scalar &pcrit, Scalar &Vcrit, Scalar a, Scalar b)
 
static bool findExtrema_ (Scalar &Vmin, Scalar &Vmax, Scalar &, Scalar &, Scalar a, Scalar b, Scalar T)
 
template<class Params >
static Scalar ambroseWalton_ (const Params &, Scalar T)
 The Ambrose-Walton method to estimate the vapor pressure. More...
 
template<class Params >
static Scalar fugacityDifference_ (const Params &params, Scalar T, Scalar p, Scalar VmLiquid, Scalar VmGas)
 Returns the difference between the liquid and the gas phase fugacities in [bar]. More...
 

Detailed Description

template<class Scalar>
class Opm::PengRobinson< Scalar >

Implements the Peng-Robinson equation of state for liquids and gases.

See:

D.-Y. Peng, D.B. Robinson: A new two-constant equation of state, Industrial & Engineering Chemistry Fundamentals, 1976, 15 (1), pp. 59–64

R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, McGraw-Hill, 1987, pp. 42-44, 82

Member Function Documentation

template<class Scalar >
template<class Params >
static Scalar Opm::PengRobinson< Scalar >::ambroseWalton_ ( const Params &  ,
Scalar  T 
)
inlinestaticprotected

The Ambrose-Walton method to estimate the vapor pressure.

Returns
Vapor pressure estimate in bar

See:

D. Ambrose, J. Walton: "Vapor Pressures up to Their Critical Temperatures of Normal Alkanes and 1-Alkanols", Pure Appl. Chem., 61, 1395-1403, 1989

References Opm::Component< ScalarT, Implementation >::criticalPressure(), Opm::Component< ScalarT, Implementation >::criticalTemperature(), Opm::LocalAd::exp(), Opm::LocalAd::pow(), and Opm::LocalAd::sqrt().

Referenced by Opm::PengRobinson< Scalar >::computeVaporPressure().

template<class Scalar >
template<class Params >
static Scalar Opm::PengRobinson< Scalar >::computeFugacity ( const Params &  params)
inlinestatic

Returns the fugacity coefficient for a given pressure and molar volume.

This is the fugacity coefficient times the pressure. The mole fraction of a component in a pure fluid is obviously always 100%, so it is not required.

Parameters
paramsParameters
template<class Scalar >
template<class Params >
static Scalar Opm::PengRobinson< Scalar >::computeFugacityCoeffient ( const Params &  params)
inlinestatic

Returns the fugacity coefficient for a given pressure and molar volume.

This is the same value as computeFugacity() because the mole fraction of a component in a pure fluid is obviously always 100%.

Parameters
paramsParameters

References Opm::LocalAd::exp(), Opm::LocalAd::pow(), and Opm::LocalAd::sqrt().

template<class Scalar >
template<class FluidState , class Params >
static Scalar Opm::PengRobinson< Scalar >::computeMolarVolume ( const FluidState &  fs,
Params &  params,
unsigned  phaseIdx,
bool  isGasPhase 
)
inlinestatic
template<class Scalar >
template<class Params >
static Scalar Opm::PengRobinson< Scalar >::computeVaporPressure ( const Params &  params,
Scalar  T 
)
inlinestatic

Predicts the vapor pressure for the temperature given in setTP().

Initially, the vapor pressure is roughly estimated by using the Ambrose-Walton method, then the Newton method is used to make difference between the gas and liquid phase fugacity zero.

References Opm::LocalAd::abs(), Opm::PengRobinson< Scalar >::ambroseWalton_(), Opm::Component< ScalarT, Implementation >::criticalPressure(), Opm::Component< ScalarT, Implementation >::criticalTemperature(), Opm::PengRobinson< Scalar >::fugacityDifference_(), and OPM_OPTIM_UNUSED.

template<class Scalar >
static void Opm::PengRobinson< Scalar >::findCriticalPoint_ ( Scalar &  Tcrit,
Scalar &  pcrit,
Scalar &  Vcrit,
Scalar  a,
Scalar  b 
)
inlinestaticprotected
template<class Scalar >
static bool Opm::PengRobinson< Scalar >::findExtrema_ ( Scalar &  Vmin,
Scalar &  Vmax,
Scalar &  ,
Scalar &  ,
Scalar  a,
Scalar  b,
Scalar  T 
)
inlinestaticprotected
template<class Scalar >
template<class Params >
static Scalar Opm::PengRobinson< Scalar >::fugacityDifference_ ( const Params &  params,
Scalar  T,
Scalar  p,
Scalar  VmLiquid,
Scalar  VmGas 
)
inlinestaticprotected

Returns the difference between the liquid and the gas phase fugacities in [bar].

Parameters
paramsParameters
TTemperature [K]
pPressure [bar]
VmLiquidMolar volume of the liquid phase [cm^3/mol]
VmGasMolar volume of the gas phase [cm^3/mol]

Referenced by Opm::PengRobinson< Scalar >::computeVaporPressure().

template<class Scalar >
template<class FluidState , class Params >
static void Opm::PengRobinson< Scalar >::handleCriticalFluid_ ( Scalar &  Vm,
const FluidState &  ,
const Params &  params,
unsigned  phaseIdx,
bool  isGasPhase 
)
inlinestaticprotected
template<class Scalar >
static void Opm::PengRobinson< Scalar >::init ( Scalar  ,
Scalar  ,
unsigned  ,
Scalar  ,
Scalar  ,
unsigned   
)
inlinestatic

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