teqp 0.22.0
Loading...
Searching...
No Matches
teqp::AdvancedPRaEres< NumType, AlphaFunctions > Class Template Reference

#include <cubics.hpp>

Public Member Functions

 AdvancedPRaEres (const std::valarray< NumType > &Tc_K, const std::valarray< NumType > &pc_Pa, const AlphaFunctions &alphas, const ResidualHelmholtzOverRTVariant &ares, const Eigen::ArrayXXd &lmat, const AdvancedPRaEOptions &options={})
 
void set_meta (const nlohmann::json &j)
 
auto get_meta () const
 
auto get_lmat () const
 
auto get_Tc_K () const
 
auto get_pc_Pa () const
 
auto superanc_rhoLV (double T, std::optional< std::size_t > ifluid=std::nullopt) const
 
template<class VecType >
auto R (const VecType &) const
 
template<typename TType , typename CompType >
auto get_a (TType T, const CompType &molefracs) const
 
template<typename TType , typename CompType >
auto get_am_over_bm (TType T, const CompType &molefracs) const
 
template<typename TType , typename CompType >
auto get_b (TType T, const CompType &molefracs) const
 
template<typename TType , typename RhoType , typename MoleFracType >
auto alphar (const TType &T, const RhoType &rho, const MoleFracType &molefrac) const
 

Static Public Member Functions

static double get_bi (double Tc_K, double pc_Pa)
 

Public Attributes

const NumType Delta1 = 1+sqrt(2.0)
 
const NumType Delta2 = 1-sqrt(2.0)
 
const NumType OmegaA = 0.45723552892138218938
 
const NumType OmegaB = 0.077796073903888455972
 
const int superanc_code = CubicSuperAncillary::PR_CODE
 

Protected Member Functions

template<typename TType , typename IndexType >
auto get_ai (TType &T, IndexType i) const
 
template<typename TType , typename IndexType >
auto get_bi (TType &, IndexType i) const
 
template<typename IndexType >
void check_lmat (IndexType N)
 

Protected Attributes

std::valarray< NumType > Tc_K
 
std::valarray< NumType > pc_Pa
 
std::valarray< NumType > ai
 
std::valarray< NumType > bi
 
const AlphaFunctions alphas
 
const ResidualHelmholtzOverRTVariant ares
 
Eigen::ArrayXXd lmat
 
const AdvancedPRaEMixingRules brule
 
const double s
 
const double CEoS
 
const double R_JmolK
 
nlohmann::json meta
 

Detailed Description

template<typename NumType, typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
class teqp::AdvancedPRaEres< NumType, AlphaFunctions >

Cubic EOS with advanced mixing rules, the EoS/aE method of Jaubert and co-workers

Definition at line 470 of file cubics.hpp.

Constructor & Destructor Documentation

◆ AdvancedPRaEres()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
teqp::AdvancedPRaEres< NumType, AlphaFunctions >::AdvancedPRaEres ( const std::valarray< NumType > & Tc_K,
const std::valarray< NumType > & pc_Pa,
const AlphaFunctions & alphas,
const ResidualHelmholtzOverRTVariant & ares,
const Eigen::ArrayXXd & lmat,
const AdvancedPRaEOptions & options = {} )
inline

Definition at line 521 of file cubics.hpp.

Member Function Documentation

◆ alphar()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename RhoType , typename MoleFracType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::alphar ( const TType & T,
const RhoType & rho,
const MoleFracType & molefrac ) const
inline

Definition at line 622 of file cubics.hpp.

◆ check_lmat()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename IndexType >
void teqp::AdvancedPRaEres< NumType, AlphaFunctions >::check_lmat ( IndexType N)
inlineprotected

Definition at line 508 of file cubics.hpp.

◆ get_a()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename CompType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_a ( TType T,
const CompType & molefracs ) const
inline

Definition at line 580 of file cubics.hpp.

◆ get_ai()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename IndexType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_ai ( TType & T,
IndexType i ) const
inlineprotected

Definition at line 499 of file cubics.hpp.

◆ get_am_over_bm()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename CompType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_am_over_bm ( TType T,
const CompType & molefracs ) const
inline

Definition at line 585 of file cubics.hpp.

◆ get_b()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename CompType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_b ( TType T,
const CompType & molefracs ) const
inline

Definition at line 595 of file cubics.hpp.

◆ get_bi() [1/2]

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
static double teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_bi ( double Tc_K,
double pc_Pa )
inlinestatic

Definition at line 539 of file cubics.hpp.

◆ get_bi() [2/2]

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<typename TType , typename IndexType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_bi ( TType & ,
IndexType i ) const
inlineprotected

Definition at line 505 of file cubics.hpp.

◆ get_lmat()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_lmat ( ) const
inline

Definition at line 535 of file cubics.hpp.

◆ get_meta()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_meta ( ) const
inline

Definition at line 534 of file cubics.hpp.

◆ get_pc_Pa()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_pc_Pa ( ) const
inline

Definition at line 537 of file cubics.hpp.

◆ get_Tc_K()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::get_Tc_K ( ) const
inline

Definition at line 536 of file cubics.hpp.

◆ R()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
template<class VecType >
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::R ( const VecType & ) const
inline

Definition at line 575 of file cubics.hpp.

◆ set_meta()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
void teqp::AdvancedPRaEres< NumType, AlphaFunctions >::set_meta ( const nlohmann::json & j)
inline

Definition at line 533 of file cubics.hpp.

◆ superanc_rhoLV()

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
auto teqp::AdvancedPRaEres< NumType, AlphaFunctions >::superanc_rhoLV ( double T,
std::optional< std::size_t > ifluid = std::nullopt ) const
inline

Return a tuple of saturated liquid and vapor densities for the EOS given the temperature Uses the superancillary equations from Bell and Deiters:

Parameters
TTemperature
ifluidMust be provided in the case of mixtures

Definition at line 549 of file cubics.hpp.

Member Data Documentation

◆ ai

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
std::valarray<NumType> teqp::AdvancedPRaEres< NumType, AlphaFunctions >::ai
protected

Definition at line 485 of file cubics.hpp.

◆ alphas

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const AlphaFunctions teqp::AdvancedPRaEres< NumType, AlphaFunctions >::alphas
protected

Definition at line 487 of file cubics.hpp.

◆ ares

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const ResidualHelmholtzOverRTVariant teqp::AdvancedPRaEres< NumType, AlphaFunctions >::ares
protected

Definition at line 488 of file cubics.hpp.

◆ bi

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
std::valarray<NumType> teqp::AdvancedPRaEres< NumType, AlphaFunctions >::bi
protected

Definition at line 485 of file cubics.hpp.

◆ brule

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const AdvancedPRaEMixingRules teqp::AdvancedPRaEres< NumType, AlphaFunctions >::brule
protected

Definition at line 491 of file cubics.hpp.

◆ CEoS

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const double teqp::AdvancedPRaEres< NumType, AlphaFunctions >::CEoS
protected

Definition at line 493 of file cubics.hpp.

◆ Delta1

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const NumType teqp::AdvancedPRaEres< NumType, AlphaFunctions >::Delta1 = 1+sqrt(2.0)

Definition at line 473 of file cubics.hpp.

◆ Delta2

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const NumType teqp::AdvancedPRaEres< NumType, AlphaFunctions >::Delta2 = 1-sqrt(2.0)

Definition at line 474 of file cubics.hpp.

◆ lmat

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
Eigen::ArrayXXd teqp::AdvancedPRaEres< NumType, AlphaFunctions >::lmat
protected

Definition at line 489 of file cubics.hpp.

◆ meta

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
nlohmann::json teqp::AdvancedPRaEres< NumType, AlphaFunctions >::meta
protected

Definition at line 496 of file cubics.hpp.

◆ OmegaA

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const NumType teqp::AdvancedPRaEres< NumType, AlphaFunctions >::OmegaA = 0.45723552892138218938

Definition at line 476 of file cubics.hpp.

◆ OmegaB

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const NumType teqp::AdvancedPRaEres< NumType, AlphaFunctions >::OmegaB = 0.077796073903888455972

Definition at line 477 of file cubics.hpp.

◆ pc_Pa

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
std::valarray<NumType> teqp::AdvancedPRaEres< NumType, AlphaFunctions >::pc_Pa
protected

Definition at line 483 of file cubics.hpp.

◆ R_JmolK

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const double teqp::AdvancedPRaEres< NumType, AlphaFunctions >::R_JmolK
protected

Definition at line 494 of file cubics.hpp.

◆ s

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const double teqp::AdvancedPRaEres< NumType, AlphaFunctions >::s
protected

Definition at line 492 of file cubics.hpp.

◆ superanc_code

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
const int teqp::AdvancedPRaEres< NumType, AlphaFunctions >::superanc_code = CubicSuperAncillary::PR_CODE

Definition at line 478 of file cubics.hpp.

◆ Tc_K

template<typename NumType , typename AlphaFunctions = std::vector<AlphaFunctionOptions>>
std::valarray<NumType> teqp::AdvancedPRaEres< NumType, AlphaFunctions >::Tc_K
protected

Definition at line 483 of file cubics.hpp.


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