Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations > Class Template Reference

The mixing rule for the oil and the gas phases of the SPE5 problem. More...

#include <PengRobinsonParamsMixture.hpp>

Inheritance diagram for Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >:
Inheritance graph

Public Member Functions

Scalar getaCache (unsigned compIIdx, unsigned compJIdx) const
 TODO. More...
 
template<class FluidState >
void updatePure (const FluidState &fluidState)
 Update Peng-Robinson parameters for the pure components. More...
 
void updatePure (Scalar temperature, Scalar pressure)
 Peng-Robinson parameters for the pure components. More...
 
template<class FluidState >
void updateMix (const FluidState &fs)
 Calculates the "a" and "b" Peng-Robinson parameters for the mixture. More...
 
template<class FluidState >
void updateSingleMoleFraction (const FluidState &fs, unsigned)
 Calculates the "a" and "b" Peng-Robinson parameters for the mixture provided that only a single mole fraction was changed. More...
 
const PureParamspureParams (unsigned compIdx) const
 Return the Peng-Robinson parameters of a pure substance,. More...
 
const PureParamsoperator[] (unsigned compIdx) const
 Returns the Peng-Robinson parameters for a pure component. More...
 
void checkDefined () const
 If run under valgrind, this method produces an warning if the parameters where not determined correctly. More...
 
Scalar a () const
 Returns the attractive parameter 'a' of the Peng-Robinson fluid. More...
 
Scalar b () const
 Returns the repulsive parameter 'b' of the Peng-Robinson fluid. More...
 
void setA (Scalar value)
 Set the attractive parameter 'a' of the Peng-Robinson fluid. More...
 
void setB (Scalar value)
 Set the repulsive parameter 'b' of the Peng-Robinson fluid. More...
 

Protected Attributes

PureParams pureParams_ [numComponents]
 
Scalar a_
 
Scalar b_
 

Detailed Description

template<class Scalar, class FluidSystem, unsigned phaseIdx, bool useSpe5Relations = false>
class Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >

The mixing rule for the oil and the gas phases of the SPE5 problem.

This problem comprises $H_2O$, $C_1$, $C_3$, $C_6$, $C_10$, $C_15$ and $C_20$ as components.

See:

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

and

J.E. Killough, et al.: Fifth Comparative Solution Project: Evaluation of Miscible Flood Simulators, Ninth SPE Symposium on Reservoir Simulation, 1987

Member Function Documentation

◆ a()

◆ b()

◆ checkDefined()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
void Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::checkDefined ( ) const
inline

◆ getaCache()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
Scalar Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::getaCache ( unsigned  compIIdx,
unsigned  compJIdx 
) const
inline

◆ operator[]()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
const PureParams & Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::operator[] ( unsigned  compIdx) const
inline

Returns the Peng-Robinson parameters for a pure component.

References Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::pureParams_.

◆ pureParams()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
const PureParams & Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::pureParams ( unsigned  compIdx) const
inline

◆ setA()

template<class Scalar >
void Opm::PengRobinsonParams< Scalar >::setA ( Scalar  value)
inlineinherited

◆ setB()

template<class Scalar >
void Opm::PengRobinsonParams< Scalar >::setB ( Scalar  value)
inlineinherited

◆ updateMix()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
template<class FluidState >
void Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::updateMix ( const FluidState &  fs)
inline

◆ updatePure() [1/2]

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
template<class FluidState >
void Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::updatePure ( const FluidState &  fluidState)
inline

◆ updatePure() [2/2]

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
void Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::updatePure ( Scalar  temperature,
Scalar  pressure 
)
inline

◆ updateSingleMoleFraction()

template<class Scalar , class FluidSystem , unsigned phaseIdx, bool useSpe5Relations = false>
template<class FluidState >
void Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::updateSingleMoleFraction ( const FluidState &  fs,
unsigned   
)
inline

Calculates the "a" and "b" Peng-Robinson parameters for the mixture provided that only a single mole fraction was changed.

The updatePure() method needs to be called before calling this method!

References Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, phaseIdx, useSpe5Relations >::updateMix().

Referenced by Opm::PTFlashParameterCache< Scalar, FluidSystem >::updateSingleMoleFraction(), and Opm::Spe5ParameterCache< Scalar, FluidSystem >::updateSingleMoleFraction().

Member Data Documentation

◆ a_

◆ b_

◆ pureParams_


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