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 Evaluation , class Params >
static Evaluation computeVaporPressure (const Params &params, const Evaluation &T)
 Predicts the vapor pressure for the temperature given in setTP(). More...
 
template<class FluidState , class Params >
static FluidState::Scalar computeMolarVolume (const FluidState &fs, Params &params, unsigned phaseIdx, bool isGasPhase)
 Computes molar volumes where the Peng-Robinson EOS is true. More...
 
template<class Evaluation , class Params >
static Evaluation computeFugacityCoeffient (const Params &params)
 Returns the fugacity coefficient for a given pressure and molar volume. More...
 
template<class Evaluation , class Params >
static Evaluation 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 , class Evaluation = typename FluidState::Scalar>
static void handleCriticalFluid_ (Evaluation &Vm, const FluidState &, const Params &params, unsigned phaseIdx, bool isGasPhase)
 
template<class Evaluation >
static void findCriticalPoint_ (Evaluation &Tcrit, Evaluation &pcrit, Evaluation &Vcrit, const Evaluation &a, const Evaluation &b)
 
template<class Evaluation >
static bool findExtrema_ (Evaluation &Vmin, Evaluation &Vmax, Evaluation &, Evaluation &, const Evaluation &a, const Evaluation &b, const Evaluation &T)
 
template<class Evaluation , class Params >
static Evaluation ambroseWalton_ (const Params &, const Evaluation &T)
 The Ambrose-Walton method to estimate the vapor pressure. More...
 
template<class Evaluation , class Params >
static Evaluation fugacityDifference_ (const Params &params, const Evaluation &T, const Evaluation &p, const Evaluation &VmLiquid, const Evaluation &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

◆ ambroseWalton_()

template<class Scalar >
template<class Evaluation , class Params >
static Evaluation Opm::PengRobinson< Scalar >::ambroseWalton_ ( const Params &  ,
const Evaluation &  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 >::acentricFactor(), Opm::Component< ScalarT, Implementation >::criticalPressure(), Opm::Component< ScalarT, Implementation >::criticalTemperature(), Opm::exp(), Opm::pow(), and Opm::sqrt().

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

◆ computeFugacity()

template<class Scalar >
template<class Evaluation , class Params >
static Evaluation 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

◆ computeFugacityCoeffient()

template<class Scalar >
template<class Evaluation , class Params >
static Evaluation 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::exp(), Opm::pow(), and Opm::sqrt().

◆ computeMolarVolume()

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

◆ computeVaporPressure()

template<class Scalar >
template<class Evaluation , class Params >
static Evaluation Opm::PengRobinson< Scalar >::computeVaporPressure ( const Params &  params,
const Evaluation &  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::abs(), Opm::PengRobinson< Scalar >::ambroseWalton_(), Opm::Component< ScalarT, Implementation >::criticalPressure(), Opm::Component< ScalarT, Implementation >::criticalTemperature(), Opm::PengRobinson< Scalar >::fugacityDifference_(), and Opm::scalarValue().

◆ findCriticalPoint_()

template<class Scalar >
template<class Evaluation >
static void Opm::PengRobinson< Scalar >::findCriticalPoint_ ( Evaluation &  Tcrit,
Evaluation &  pcrit,
Evaluation &  Vcrit,
const Evaluation &  a,
const Evaluation &  b 
)
inlinestaticprotected

◆ findExtrema_()

template<class Scalar >
template<class Evaluation >
static bool Opm::PengRobinson< Scalar >::findExtrema_ ( Evaluation &  Vmin,
Evaluation &  Vmax,
Evaluation &  ,
Evaluation &  ,
const Evaluation &  a,
const Evaluation &  b,
const Evaluation &  T 
)
inlinestaticprotected

◆ fugacityDifference_()

template<class Scalar >
template<class Evaluation , class Params >
static Evaluation Opm::PengRobinson< Scalar >::fugacityDifference_ ( const Params &  params,
const Evaluation &  T,
const Evaluation &  p,
const Evaluation &  VmLiquid,
const Evaluation &  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().

◆ handleCriticalFluid_()

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

◆ init()

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: