CoolProp  6.6.1dev
An open-source fluid property and humid air property database
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CoolProp::ReducingFunction Class Referenceabstract

Detailed Description

Abstract base class for reducing function An abstract base class for the reducing function to allow for Lemmon-Jacobsen, GERG, or other reducing function to yield the reducing parameters \(\rho_r\) and \(T_r\).

Definition at line 31 of file ReducingFunctions.h.

#include <ReducingFunctions.h>

Inheritance diagram for CoolProp::ReducingFunction:
CoolProp::ConstantReducingFunction CoolProp::GERG2008ReducingFunction

Public Member Functions

 ReducingFunction ()
 
virtual ~ReducingFunction ()
 
virtual ReducingFunctioncopy ()=0
 
virtual void set_binary_interaction_double (const std::size_t i, const std::size_t j, const std::string &parameter, double value)=0
 
virtual double get_binary_interaction_double (const std::size_t i, const std::size_t j, const std::string &parameter) const =0
 
virtual CoolPropDbl Tr (const std::vector< CoolPropDbl > &x) const =0
 The reduced temperature. More...
 
virtual CoolPropDbl dTrdxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const =0
 The derivative of reduced temperature with respect to component i mole fraction. More...
 
virtual CoolPropDbl rhormolar (const std::vector< CoolPropDbl > &x) const =0
 The molar reducing density. More...
 
virtual CoolPropDbl drhormolardxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const =0
 Derivative of the molar reducing density with respect to component i mole fraction. More...
 
virtual CoolPropDbl dTr_dgammaT (const std::vector< CoolPropDbl > &x) const
 
virtual CoolPropDbl dTr_dbetaT (const std::vector< CoolPropDbl > &x) const
 
virtual CoolPropDbl drhormolar_dgammaV (const std::vector< CoolPropDbl > &x) const
 
virtual CoolPropDbl drhormolar_dbetaV (const std::vector< CoolPropDbl > &x) const
 
virtual CoolPropDbl d2Tr_dxidgammaT (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2Tr_dxidbetaT (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2rhormolar_dxidgammaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2rhormolar_dxidbetaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2rhormolardxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d2rhormolardxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d3rhormolardxidxjdxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d2Trdxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d2Trdxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d3Trdxidxjdxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const =0
 
virtual CoolPropDbl d_ndTrdni_dxj__constxi (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 GERG 2004 Monograph equation 7.56: More...
 
virtual CoolPropDbl d2_ndTrdni_dxj_dxk__constxi (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d_ndrhorbardni_dxj__constxi (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 GERG 2004 Monograph equation 7.55: If the \(x_i\) are all independent. More...
 
virtual CoolPropDbl d2_ndrhorbardni_dxj_dxk__constxi (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl ndrhorbardni__constnj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl ndTrdni__constnj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl PSI_rho (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d_PSI_rho_dxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2_PSI_rho_dxj_dxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl PSI_T (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d_PSI_T_dxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 
virtual CoolPropDbl d2_PSI_T_dxj_dxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const
 

Static Public Member Functions

static shared_ptr< ReducingFunctionfactory (const std::vector< CoolPropFluid * > &components, STLMatrix &F)
 A factory function to generate the required reducing function. More...
 

Protected Attributes

std::size_t N
 

Constructor & Destructor Documentation

◆ ReducingFunction()

CoolProp::ReducingFunction::ReducingFunction ( )
inline

Definition at line 37 of file ReducingFunctions.h.

◆ ~ReducingFunction()

virtual CoolProp::ReducingFunction::~ReducingFunction ( )
inlinevirtual

Definition at line 38 of file ReducingFunctions.h.

Member Function Documentation

◆ copy()

virtual ReducingFunction* CoolProp::ReducingFunction::copy ( )
pure virtual

◆ d2_ndrhorbardni_dxj_dxk__constxi()

CoolPropDbl CoolProp::ReducingFunction::d2_ndrhorbardni_dxj_dxk__constxi ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
virtual

Definition at line 63 of file ReducingFunctions.cpp.

◆ d2_ndTrdni_dxj_dxk__constxi()

CoolPropDbl CoolProp::ReducingFunction::d2_ndTrdni_dxj_dxk__constxi ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
virtual

Definition at line 30 of file ReducingFunctions.cpp.

◆ d2_PSI_rho_dxj_dxk()

CoolPropDbl CoolProp::ReducingFunction::d2_PSI_rho_dxj_dxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 118 of file ReducingFunctions.cpp.

◆ d2_PSI_T_dxj_dxk()

CoolPropDbl CoolProp::ReducingFunction::d2_PSI_T_dxj_dxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 134 of file ReducingFunctions.cpp.

◆ d2rhormolar_dxidbetaV()

virtual CoolPropDbl CoolProp::ReducingFunction::d2rhormolar_dxidbetaV ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
inlinevirtual

◆ d2rhormolar_dxidgammaV()

virtual CoolPropDbl CoolProp::ReducingFunction::d2rhormolar_dxidgammaV ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
inlinevirtual

◆ d2rhormolardxi2__constxj()

virtual CoolPropDbl CoolProp::ReducingFunction::d2rhormolardxi2__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d2rhormolardxidxj()

virtual CoolPropDbl CoolProp::ReducingFunction::d2rhormolardxidxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d2Tr_dxidbetaT()

virtual CoolPropDbl CoolProp::ReducingFunction::d2Tr_dxidbetaT ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
inlinevirtual

◆ d2Tr_dxidgammaT()

virtual CoolPropDbl CoolProp::ReducingFunction::d2Tr_dxidgammaT ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
inlinevirtual

◆ d2Trdxi2__constxj()

virtual CoolPropDbl CoolProp::ReducingFunction::d2Trdxi2__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d2Trdxidxj()

virtual CoolPropDbl CoolProp::ReducingFunction::d2Trdxidxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d3rhormolardxidxjdxk()

virtual CoolPropDbl CoolProp::ReducingFunction::d3rhormolardxidxjdxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d3Trdxidxjdxk()

virtual CoolPropDbl CoolProp::ReducingFunction::d3Trdxidxjdxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const
pure virtual

◆ d_ndrhorbardni_dxj__constxi()

CoolPropDbl CoolProp::ReducingFunction::d_ndrhorbardni_dxj__constxi ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
virtual

GERG 2004 Monograph equation 7.55: If the \(x_i\) are all independent.

\[ \left(\frac{\partial}{\partial x_j}\left(n\left(\frac{\partial \rho_r}{\partial n_i} \right)_{n_j}\right)\right)_{x_i} = \left(\frac{\partial^2\rho_r}{\partial x_j \partial x_i}\right)-\left(\frac{\partial \rho_r}{\partial x_j}\right)_{x_i}-\sum_{k=0}^{N-1}x_k\left(\frac{\partial^2\rho_r}{\partial x_j \partial x_k}\right) \]

Gernert, JPCRD, 2014, A28 If \(x_N = 1-\sum x_i\):

\[ \left(\frac{\partial}{\partial x_j}\left(n\left(\frac{\partial \rho_r}{\partial n_i} \right)_{n_j}\right)\right)_{x_i} = \left(\frac{\partial^2\rho_r}{\partial x_j \partial x_i}\right)-\left(\frac{\partial \rho_r}{\partial x_j}\right)_{x_i}-\sum_{k=0}^{N-2}x_k\left(\frac{\partial^2\rho_r}{\partial x_j \partial x_k}\right) \]

Definition at line 55 of file ReducingFunctions.cpp.

◆ d_ndTrdni_dxj__constxi()

CoolPropDbl CoolProp::ReducingFunction::d_ndTrdni_dxj__constxi ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
virtual

GERG 2004 Monograph equation 7.56:

If the \(x_i\) are all independent

\[ \left(\frac{\partial}{\partial x_j}\left(n\left(\frac{\partial T_r}{\partial n_i} \right)_{n_j}\right)\right)_{x_i} = \left(\frac{\partial^2T_r}{\partial x_j \partial x_i}\right)-\left(\frac{\partial T_r}{\partial x_j}\right)_{x_i}-\sum_{k=0}^{N-1}x_k\left(\frac{\partial^2T_r}{\partial x_j \partial x_k}\right) \]

If \(x_N = 1-\sum x_i\):

\[ \left(\frac{\partial}{\partial x_j}\left(n\left(\frac{\partial T_r}{\partial n_i} \right)_{n_j}\right)\right)_{x_i} = \left(\frac{\partial^2T_r}{\partial x_j \partial x_i}\right)-\left(\frac{\partial T_r}{\partial x_j}\right)_{x_i}-\sum_{k=0}^{N-1}x_k\left(\frac{\partial^2T_r}{\partial x_j \partial x_k}\right) \]

Definition at line 5 of file ReducingFunctions.cpp.

◆ d_PSI_rho_dxj()

CoolPropDbl CoolProp::ReducingFunction::d_PSI_rho_dxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 115 of file ReducingFunctions.cpp.

◆ d_PSI_T_dxj()

CoolPropDbl CoolProp::ReducingFunction::d_PSI_T_dxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 131 of file ReducingFunctions.cpp.

◆ drhormolar_dbetaV()

virtual CoolPropDbl CoolProp::ReducingFunction::drhormolar_dbetaV ( const std::vector< CoolPropDbl > &  x) const
inlinevirtual

◆ drhormolar_dgammaV()

virtual CoolPropDbl CoolProp::ReducingFunction::drhormolar_dgammaV ( const std::vector< CoolPropDbl > &  x) const
inlinevirtual

◆ drhormolardxi__constxj()

virtual CoolPropDbl CoolProp::ReducingFunction::drhormolardxi__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
pure virtual

Derivative of the molar reducing density with respect to component i mole fraction.

Implemented in CoolProp::ConstantReducingFunction, and CoolProp::GERG2008ReducingFunction.

◆ dTr_dbetaT()

virtual CoolPropDbl CoolProp::ReducingFunction::dTr_dbetaT ( const std::vector< CoolPropDbl > &  x) const
inlinevirtual

◆ dTr_dgammaT()

virtual CoolPropDbl CoolProp::ReducingFunction::dTr_dgammaT ( const std::vector< CoolPropDbl > &  x) const
inlinevirtual

◆ dTrdxi__constxj()

virtual CoolPropDbl CoolProp::ReducingFunction::dTrdxi__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
pure virtual

The derivative of reduced temperature with respect to component i mole fraction.

Implemented in CoolProp::ConstantReducingFunction, and CoolProp::GERG2008ReducingFunction.

◆ factory()

static shared_ptr<ReducingFunction> CoolProp::ReducingFunction::factory ( const std::vector< CoolPropFluid * > &  components,
STLMatrix F 
)
static

A factory function to generate the required reducing function.

◆ get_binary_interaction_double()

virtual double CoolProp::ReducingFunction::get_binary_interaction_double ( const std::size_t  i,
const std::size_t  j,
const std::string &  parameter 
) const
pure virtual

◆ ndrhorbardni__constnj()

CoolPropDbl CoolProp::ReducingFunction::ndrhorbardni__constnj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
virtual

Definition at line 71 of file ReducingFunctions.cpp.

◆ ndTrdni__constnj()

CoolPropDbl CoolProp::ReducingFunction::ndTrdni__constnj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
virtual

Definition at line 91 of file ReducingFunctions.cpp.

◆ PSI_rho()

CoolPropDbl CoolProp::ReducingFunction::PSI_rho ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 112 of file ReducingFunctions.cpp.

◆ PSI_T()

CoolPropDbl CoolProp::ReducingFunction::PSI_T ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const
virtual

Reimplemented in CoolProp::ConstantReducingFunction.

Definition at line 128 of file ReducingFunctions.cpp.

◆ rhormolar()

virtual CoolPropDbl CoolProp::ReducingFunction::rhormolar ( const std::vector< CoolPropDbl > &  x) const
pure virtual

The molar reducing density.

Implemented in CoolProp::ConstantReducingFunction, and CoolProp::GERG2008ReducingFunction.

◆ set_binary_interaction_double()

virtual void CoolProp::ReducingFunction::set_binary_interaction_double ( const std::size_t  i,
const std::size_t  j,
const std::string &  parameter,
double  value 
)
pure virtual

◆ Tr()

virtual CoolPropDbl CoolProp::ReducingFunction::Tr ( const std::vector< CoolPropDbl > &  x) const
pure virtual

The reduced temperature.

Implemented in CoolProp::ConstantReducingFunction, and CoolProp::GERG2008ReducingFunction.

Member Data Documentation

◆ N

std::size_t CoolProp::ReducingFunction::N
protected

Definition at line 34 of file ReducingFunctions.h.


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