teqp 0.19.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
teqp::vdWEOS< NumType > Class Template Reference

A slightly more involved implementation of van der Waals, this time with mixture properties. More...

#include <vdW.hpp>

Public Member Functions

 vdWEOS (const std::valarray< NumType > &Tc_K, const std::valarray< NumType > &pc_Pa)
 Initializer, taking the arrays of critical temperatures and pressures.
 
template<typename TType , typename CompType >
auto a (TType, const CompType &molefracs) const
 Calculate the a parameter, based on quadratic mixing rules.
 
template<typename CompType >
auto b (const CompType &molefracs) const
 Calculate the b parameter, based on linear mixing rules.
 
template<class VecType >
auto R (const VecType &) const
 Get the universal gas constant Here the real universal gas constant, with no composition dependence.
 
template<typename TType , typename RhoType , typename MoleFracType >
auto alphar (const TType &T, const RhoType &rho, const MoleFracType &molefrac) const
 The evaluation of \( \alpha^{\rm r}=a/(RT) \).
 

Public Attributes

const NumType Ru = get_R_gas<double>()
 Universal gas constant, exact number.
 

Protected Member Functions

template<typename TType , typename IndexType >
auto get_ai (TType, IndexType i) const
 
template<typename TType , typename IndexType >
auto get_bi (TType, IndexType i) const
 

Protected Attributes

std::valarray< NumType > ai
 
std::valarray< NumType > bi
 
std::valarray< std::valarray< NumType > > k
 

Detailed Description

template<typename NumType>
class teqp::vdWEOS< NumType >

A slightly more involved implementation of van der Waals, this time with mixture properties.

Definition at line 45 of file vdW.hpp.

Constructor & Destructor Documentation

◆ vdWEOS()

template<typename NumType >
teqp::vdWEOS< NumType >::vdWEOS ( const std::valarray< NumType > & Tc_K,
const std::valarray< NumType > & pc_Pa )
inline

Initializer, taking the arrays of critical temperatures and pressures.

Parameters
Tc_KArray of critical temperatures in Kelvin
pc_PaArray of critical pressures in Pascal
Note
All interaction parameters are set to default value of zero and cannot currently be tuned

Definition at line 62 of file vdW.hpp.

Member Function Documentation

◆ a()

template<typename NumType >
template<typename TType , typename CompType >
auto teqp::vdWEOS< NumType >::a ( TType ,
const CompType & molefracs ) const
inline

Calculate the a parameter, based on quadratic mixing rules.

Parameters
molefracsArray of mole fractions

Definition at line 79 of file vdW.hpp.

◆ alphar()

template<typename NumType >
template<typename TType , typename RhoType , typename MoleFracType >
auto teqp::vdWEOS< NumType >::alphar ( const TType & T,
const RhoType & rho,
const MoleFracType & molefrac ) const
inline

The evaluation of \( \alpha^{\rm r}=a/(RT) \).

Parameters
TThe temperature
rhoThe molar density
molefracThe mole fractions of each component

Definition at line 116 of file vdW.hpp.

◆ b()

template<typename NumType >
template<typename CompType >
auto teqp::vdWEOS< NumType >::b ( const CompType & molefracs) const
inline

Calculate the b parameter, based on linear mixing rules.

Parameters
molefracsArray of mole fractions

Definition at line 93 of file vdW.hpp.

◆ get_ai()

template<typename NumType >
template<typename TType , typename IndexType >
auto teqp::vdWEOS< NumType >::get_ai ( TType ,
IndexType i ) const
inlineprotected

Definition at line 51 of file vdW.hpp.

◆ get_bi()

template<typename NumType >
template<typename TType , typename IndexType >
auto teqp::vdWEOS< NumType >::get_bi ( TType ,
IndexType i ) const
inlineprotected

Definition at line 54 of file vdW.hpp.

◆ R()

template<typename NumType >
template<class VecType >
auto teqp::vdWEOS< NumType >::R ( const VecType & ) const
inline

Get the universal gas constant Here the real universal gas constant, with no composition dependence.

Note
The array of mole fractions are ignored, but required to match other function calls

Definition at line 107 of file vdW.hpp.

Member Data Documentation

◆ ai

template<typename NumType >
std::valarray<NumType> teqp::vdWEOS< NumType >::ai
protected

Definition at line 47 of file vdW.hpp.

◆ bi

template<typename NumType >
std::valarray<NumType> teqp::vdWEOS< NumType >::bi
protected

Definition at line 47 of file vdW.hpp.

◆ k

template<typename NumType >
std::valarray<std::valarray<NumType> > teqp::vdWEOS< NumType >::k
protected

Definition at line 48 of file vdW.hpp.

◆ Ru

template<typename NumType >
const NumType teqp::vdWEOS< NumType >::Ru = get_R_gas<double>()

Universal gas constant, exact number.

Definition at line 101 of file vdW.hpp.


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