Loading...
Searching...
No Matches
Opm::PengRobinson< Scalar, UseLegacy > 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().
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.
template<class Evaluation, class Params>
static Evaluation | computeFugacityCoeffient (const Params &params)
| Returns the fugacity coefficient for a given pressure and molar volume.
template<class Evaluation, class Params>
static Evaluation | computeFugacity (const Params &params)
| Returns the fugacity coefficient for a given pressure and molar volume.

## 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.
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].

## Detailed Description

template<class Scalar, bool UseLegacy = true>
class Opm::PengRobinson< Scalar, UseLegacy >

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, bool UseLegacy = true>
template<class Evaluation, class Params>

Evaluation Opm::PengRobinson< Scalar, UseLegacy >::ambroseWalton_ | ( | const Params & | ,
|  | const Evaluation & | T )

inline static protected

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

## computeFugacity()

template<class Scalar, bool UseLegacy = true>
template<class Evaluation, class Params>

Evaluation Opm::PengRobinson< Scalar, UseLegacy >::computeFugacity | ( | const Params & | params | ) |

inline static

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

  params | Parameters

## computeFugacityCoeffient()

template<class Scalar, bool UseLegacy = true>
template<class Evaluation, class Params>

Evaluation Opm::PengRobinson< Scalar, UseLegacy >::computeFugacityCoeffient | ( | const Params & | params | ) |

inline static

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

  params | Parameters

## computeVaporPressure()

template<class Scalar, bool UseLegacy = true>
template<class Evaluation, class Params>

Evaluation Opm::PengRobinson< Scalar, UseLegacy >::computeVaporPressure | ( | const Params & | params,
|  | const Evaluation & | T )

inline static

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.

## fugacityDifference_()

template<class Scalar, bool UseLegacy = true>
template<class Evaluation, class Params>

Evaluation Opm::PengRobinson< Scalar, UseLegacy >::fugacityDifference_ | ( | const Params & | params,
|  | const Evaluation & | T,
|  | const Evaluation & | p,
|  | const Evaluation & | VmLiquid,
|  | const Evaluation & | VmGas )

inline static protected

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

Parameters

  params | Parameters
  T | Temperature [K]
  p | Pressure [bar]
  VmLiquid | Molar volume of the liquid phase [cm^3/mol]
  VmGas | Molar volume of the gas phase [cm^3/mol]

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

- opm/material/eos/PengRobinson.hpp