CoolProp
Public Member Functions | Protected Attributes | List of all members
CoolProp::GERG2008ReducingFunction Class Reference

Detailed Description

The reducing function model of GERG-2008.

Used by the GERG-2008 formulation to yield the reducing parameters \( \rho_r \) and \( T_r \) and derivatives thereof

#include <ReducingFunctions.h>

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

Public Member Functions

 GERG2008ReducingFunction (const std::vector< CoolPropFluid > &pFluids, const STLMatrix &beta_v, const STLMatrix &gamma_v, STLMatrix beta_T, const STLMatrix &gamma_T)
 
ReducingFunctioncopy ()
 
 ~GERG2008ReducingFunction ()
 Default destructor.
 
void set_binary_interaction_double (const std::size_t i, const std::size_t j, double betaT, double gammaT, double betaV, double gammaV)
 Set all beta and gamma values in one shot.
 
virtual void set_binary_interaction_double (const std::size_t i, const std::size_t j, const std::string &parameter, double value)
 Set a parameter.
 
virtual double get_binary_interaction_double (const std::size_t i, const std::size_t j, const std::string &parameter) const
 Get a parameter.
 
CoolPropDbl Tr (const std::vector< CoolPropDbl > &x) const
 The reducing temperature Calculated from Yr with \(T = Y\).
 
CoolPropDbl dTr_dgammaT (const std::vector< CoolPropDbl > &x) const
 The derivative of reducing temperature with respect to gammaT Calculated from dYr_gamma with \(T = Y\).
 
CoolPropDbl dTr_dbetaT (const std::vector< CoolPropDbl > &x) const
 The derivative of reducing temperature with respect to betaT Calculated from dYr_beta with \(T = Y\).
 
CoolPropDbl d2Tr_dxidgammaT (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing temperature with respect to gammaT and composition.
 
CoolPropDbl d2Tr_dxidbetaT (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing temperature with respect to betaT and composition.
 
CoolPropDbl dTrdxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing temperature with respect to component i mole fraction. More...
 
CoolPropDbl d2Trdxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The second derivative of reducing temperature with respect to component i mole fraction. More...
 
CoolPropDbl d2Trdxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 The second derivative of reducing temperature with respect to component i and j mole fractions. More...
 
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
 The third derivative of reducing temperature with respect to component i, j and k mole fractions. More...
 
CoolPropDbl dvrmolardxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing molar volume with respect to component i mole fraction. More...
 
CoolPropDbl d2vrmolardxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The second derivative of reducing molar volume with respect to component i mole fraction. More...
 
CoolPropDbl d2vrmolardxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 The second derivative of reducing molar volume with respect to component i and j mole fractions. More...
 
CoolPropDbl d3vrmolardxidxjdxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, x_N_dependency_flag xN_flag) const
 The third derivative of reducing molar volume with respect to component i, j and k mole fractions. More...
 
CoolPropDbl rhormolar (const std::vector< CoolPropDbl > &x) const
 The molar reducing density. More...
 
CoolPropDbl drhormolar_dgammaV (const std::vector< CoolPropDbl > &x) const
 The derivative of reducing density with respect to gammaV Calculated from dYr_gamma with \(v = Y\).
 
CoolPropDbl drhormolar_dbetaV (const std::vector< CoolPropDbl > &x) const
 The derivative of reducing density with respect to betaV Calculated from dYr_beta with \(v = Y\).
 
CoolPropDbl d2vrmolar_dxidgammaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing volume with respect to gammaV and composition.
 
CoolPropDbl d2vrmolar_dxidbetaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing volume with respect to betaV and composition.
 
CoolPropDbl d2rhormolar_dxidbetaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing density with respect to betaV and composition.
 
CoolPropDbl d2rhormolar_dxidgammaV (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 The derivative of reducing density with respect to gammaV and composition.
 
CoolPropDbl drhormolardxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 Derivative of the molar reducing density with respect to component i mole fraction. More...
 
CoolPropDbl d2rhormolardxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, x_N_dependency_flag xN_flag) const
 Derivative of the molar reducing density with respect to component i mole fraction. More...
 
CoolPropDbl d2rhormolardxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, x_N_dependency_flag xN_flag) const
 Derivative of the molar reducing density with respect to component i and j mole fractions. More...
 
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
 Derivative of the molar reducing density with respect to component i, j, and k mole fractions. More...
 
CoolPropDbl Yr (const std::vector< CoolPropDbl > &x, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc) const
 Generalized reducing term \(Y_r\). More...
 
CoolPropDbl dYr_dgamma (const std::vector< CoolPropDbl > &x, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc) const
 Derivative of reducing term \(Y_r\) with respect to \(\gamma\). More...
 
CoolPropDbl dYr_dbeta (const std::vector< CoolPropDbl > &x, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc) const
 Derivative of reducing term \(Y_r\) with respect to \(\beta\).
 
CoolPropDbl dYrdxi__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 First composition derivative of \(Y_r\) with \(x_i\). More...
 
CoolPropDbl d2Yrdxidgamma (const std::vector< CoolPropDbl > &x, std::size_t i, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 Derivative of derivative of reducing term \(\frac{\partial Y_r}{\partial x_i}\) with respect to \(\beta\).
 
CoolPropDbl d2Yrdxidbeta (const std::vector< CoolPropDbl > &x, std::size_t i, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 Derivative of derivative of reducing term \(\frac{\partial Y_r}{\partial x_i}\) with respect to \(\gamma\).
 
CoolPropDbl d2Yrdxi2__constxj (const std::vector< CoolPropDbl > &x, std::size_t i, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 Second composition derivative of \(Y_r\) with \(x_i\). More...
 
CoolPropDbl d2Yrdxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 Second mixed composition derivative of \(Y_r\) with \(x_i\) and \(x_j\). More...
 
CoolPropDbl d3Yrdxidxjdxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, std::size_t k, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c_ij, const std::vector< CoolPropDbl > &Yc, x_N_dependency_flag xN_flag) const
 Third mixed composition derivative of \(Y_r\) with \(x_i\) and \(x_j\) and \(x_k\). More...
 
const CoolPropDbl c_Y_ij (const std::size_t i, const std::size_t j, const STLMatrix &beta, const STLMatrix &gamma, const STLMatrix &Y_c) const
 The coefficient \( c_{Y,ij} \). More...
 
CoolPropDbl f_Y_ij (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, const STLMatrix &beta) const
 The function \( f_{Y,ij}(x_i,x_j) \). More...
 
CoolPropDbl dfYkidxi__constxk (const std::vector< CoolPropDbl > &x, std::size_t k, std::size_t i, const STLMatrix &beta) const
 

\[ \left(\frac{\partial f_{Y,ki}(x_k, x_i)}{\partial x_i}\right)_{x_{k\neq i}} = x_k\frac{x_k+x_i}{\beta_{Y,ki}^2x_k+x_i} + \frac{x_kx_i}{\beta_{Y,ki}^2x_k+x_i}\left(1-\frac{x_k+x_i}{\beta_{Y,ki}^2x_k+x_i}\right) \]


 
CoolPropDbl dfYikdxi__constxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t k, const STLMatrix &beta) const
 

\[ \left(\frac{\partial f_{Y,ik}(x_i, x_k)}{\partial x_i}\right)_{x_k} = x_k\frac{x_i+x_k}{\beta_{Y,ik}^2x_i+x_k} + \frac{x_ix_k}{\beta_{Y,ik}^2x_i+x_k}\left(1-\beta_{Y,ik}^2\frac{x_i+x_k}{\beta_{Y,ik}^2x_i+x_k}\right) \]


 
CoolPropDbl d2fYkidxi2__constxk (const std::vector< CoolPropDbl > &x, std::size_t k, std::size_t i, const STLMatrix &beta) const
 

\[ \left(\frac{\partial^2 f_{Y,ki}(x_k, x_i)}{\partial x_i^2}\right)_{x_{k\neq i}} = \frac{1}{\beta_{Y,ki}^2x_k+x_i}\left(1-\frac{x_k+x_i}{\beta_{Y,ki}^2x_k+x_i}\right)\left(2x_k-\frac{2x_kx_i}{\beta_{Y,ki}^2x_k+x_i}\right) \]


 
CoolPropDbl d2fYikdxi2__constxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t k, const STLMatrix &beta) const
 

\[ \left(\frac{\partial^2 f_{Y,ik}(x_i, x_k)}{\partial x_i^2}\right)_{x_{k}} = \frac{1}{\beta_{Y,ik}^2x_i+x_k}\left(1-\beta_{Y,ik}^2\frac{x_i+x_k}{\beta_{Y,ik}^2x_i+x_k}\right)\left(2x_k-\frac{2x_ix_k\beta_{Y,ik}^2}{\beta_{Y,ik}^2x_i+x_k}\right) \]


 
CoolPropDbl d2fYijdxidxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t k, const STLMatrix &beta) const
 

\begin{eqnarray*} \left(\frac{\partial^2 f_{Y,ki}(x_k, x_i)}{\partial x_i\partial x_j}\right)_{x_{k\neq j\neq i}} &=& \frac{x_i+x_j}{\beta_{Y,ij}^2x_i+x_j} + \frac{x_j}{\beta_{Y,ij}^2x_i+x_j}\left(1-\frac{x_i+x_j}{\beta_{Y,ij}^2x_i+x_j}\right) \\ &+& \frac{x_i}{\beta_{Y,ij}^2x_i+x_j}\left(1-\beta_{Y,ij}^2\frac{x_i+x_j}{\beta_{Y,ij}^2x_i+x_j}\right) - \frac{x_ix_j}{(\beta_{Y,ij}^2x_i+x_j)^2}\left(1+\beta_{Y,ij}^2-2\beta_{Y,ij}^2\frac{x_i+x_j}{\beta_{Y,ij}^2x_i+x_j}\right) \end{eqnarray*}


 
CoolPropDbl d3fYijdxi2dxj (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, const STLMatrix &beta) const
 
CoolPropDbl d3fYijdxidxj2 (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t j, const STLMatrix &beta) const
 
CoolPropDbl d3fYkidxi3__constxk (const std::vector< CoolPropDbl > &x, std::size_t k, std::size_t i, const STLMatrix &beta) const
 
CoolPropDbl d3fYikdxi3__constxk (const std::vector< CoolPropDbl > &x, std::size_t i, std::size_t k, const STLMatrix &beta) const
 
- Public Member Functions inherited from CoolProp::ReducingFunction
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

\[ \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) \]

.

 
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
 

Protected Attributes

STLMatrix v_c
 \( v_{c,ij} = \frac{1}{8}\left(v_{c,i}^{1/3}+v_{c,j}^{1/3}\right)^{3}\) from GERG-2008
 
STLMatrix T_c
 \( T_{c,ij} = \sqrt{T_{c,i}T_{c,j}} \) from GERG=2008
 
STLMatrix beta_v
 \( \beta_{v,ij} \) from GERG-2008
 
STLMatrix gamma_v
 \( \gamma_{v,ij} \) from GERG-2008
 
STLMatrix beta_T
 \( \beta_{T,ij} \) from GERG-2008
 
STLMatrix gamma_T
 \( \gamma_{T,ij} \) from GERG-2008
 
std::vector< CoolPropDbl > Yc_T
 Vector of critical temperatures for all components.
 
std::vector< CoolPropDbl > Yc_v
 Vector of critical molar volumes for all components.
 
std::vector< CoolPropFluidpFluids
 List of fluids.
 
- Protected Attributes inherited from CoolProp::ReducingFunction
std::size_t N
 

Additional Inherited Members

- Static Public Member Functions inherited from CoolProp::ReducingFunction
static shared_ptr< ReducingFunctionfactory (const std::vector< CoolPropFluid *> &components, STLMatrix &F)
 A factory function to generate the required reducing function.
 

Member Function Documentation

§ c_Y_ij()

const CoolPropDbl CoolProp::GERG2008ReducingFunction::c_Y_ij ( const std::size_t  i,
const std::size_t  j,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c 
) const

The coefficient \( c_{Y,ij} \).

\[ c_{Y,ij} = 2\beta_{Y,ij}\gamma_{Y,ij}Y_{c,ij} \]

§ d2rhormolardxi2__constxj()

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

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

See also GERG 2004, Eqn. 7.58

\[ \left(\frac{\partial^2 \rho_r}{\partial x_i^2}\right)_{x_{i\neq j}} = 2\rho_r^3\left(\left(\frac{\partial v_r}{\partial x_i}\right)_{x_{i\neq j}}\right)^2-\rho_r\left(\left(\frac{\partial^2 v_r}{\partial x_i^2}\right)_{x_{i\neq j}}\right) \]

Implements CoolProp::ReducingFunction.

§ d2rhormolardxidxj()

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

Derivative of the molar reducing density with respect to component i and j mole fractions.

See also GERG 2004, Eqn. 7.59

\[ \left(\frac{\partial^2 \rho_r}{\partial x_i\partial x_j}\right) = 2\rho_r^3\left(\left(\frac{\partial v_r}{\partial x_i}\right)_{x_{i\neq j}}\right)\left(\left(\frac{\partial v_r}{\partial x_j}\right)_{x_{i\neq j}}\right)-\rho_r^2\left(\left(\frac{\partial v_r}{\partial x_i\partial x_j}\right)\right) \]

Implements CoolProp::ReducingFunction.

§ d2Trdxi2__constxj()

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

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

Calculated from d2Yrdxi2__constxj with \(T = Y\)

Implements CoolProp::ReducingFunction.

§ d2Trdxidxj()

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

The second derivative of reducing temperature with respect to component i and j mole fractions.

Calculated from d2Yrdxidxj with \(T = Y\)

Implements CoolProp::ReducingFunction.

§ d2vrmolardxi2__constxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d2vrmolardxi2__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const

The second derivative of reducing molar volume with respect to component i mole fraction.

Calculated from d2Yrdxi2__constxj with \(v = Y\)

§ d2vrmolardxidxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d2vrmolardxidxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
x_N_dependency_flag  xN_flag 
) const

The second derivative of reducing molar volume with respect to component i and j mole fractions.

Calculated from d2Yrdxidxj with \(v = Y\)

§ d2Yrdxi2__constxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d2Yrdxi2__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc,
x_N_dependency_flag  xN_flag 
) const

Second composition derivative of \(Y_r\) with \(x_i\).

If \(x_N\) is given by \( x_N = 1-\sum_{i=1}^{N-1}x_i\) (Gernert, FPE, 2014, Table S1):

\begin{eqnarray*} \left(\frac{\partial^2 Y_r}{\partial x_i^2}\right)_{\substack{x_{j\neq i} \\ i<N}} &=& 2(Y_{c,i}+Y_{c,N}) + \sum_{k=1}^{i-1}c_{Y,ki}\frac{\partial^2 f_{Y,ki}(x_k, x_i)}{\partial x_i^2}+\sum_{k=i+1}^{N-1}c_{Y,ik}\frac{\partial^2 f_{Y,ik}(x_i, x_k)}{\partial x_i^2} \\ &&+2c_{Y,iN}\left(-\frac{x_i+x_N}{\beta_{Y,iN}^2x_i+x_N}+(1-\beta_{Y,iN}^2)\left( \frac{x_N^2}{(\beta_{Y,iN}^2x_i+x_N)^2} + \frac{(1-\beta_{Y,iN}^2)x_ix_{N}^2-\beta_{Y,iN}^2x_i^2x_N}{(\beta_{Y,iN}^2x_i+x_N)^3}\right)\right) \\ &&+\sum_{k=1}^{N-1}2c_{Y,kN}x_k^2\frac{1-\beta_{Y,kN}^2}{(\beta_{Y,kN}^2x_k+x_N)^2} \left(\frac{x_N}{\beta_{Y,kN}^2 x_k+x_N}-1\right) \end{eqnarray*}

Otherwise, if \(x_i\) are all independent:

\[ \left(\frac{\partial^2 Y_r}{\partial x_i^2}\right)_{x_{j\neq i}} = 2Y_{c,i} + \sum_{k=1}^{i-1}c_{Y,ki}\frac{\partial^2 f_{Y,ki}(x_k,x_i)}{\partial x_i^2} + \sum_{k=i+1}^{N}c_{Y,ik}\frac{\partial^2 f_{Y,ik}(x_i,x_k)}{\partial x_i^2} \]

§ d2Yrdxidxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d2Yrdxidxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc,
x_N_dependency_flag  xN_flag 
) const

Second mixed composition derivative of \(Y_r\) with \(x_i\) and \(x_j\).

If \(x_N\) is given by \( x_N = 1-\sum_{i=1}^{N-1}x_i\) (Gernert, FPE, 2014, Table S1):

\begin{eqnarray*} \left(\frac{\partial^2 Y_r}{\partial x_i\partial x_j}\right)_{\substack{x_{k\neq j\neq i} \\ i<N \\ j < N}} &=& 2Y_{c,N} + c_{Y,ij}\frac{\partial^2 f_{Y,ij}(x_i, x_j)}{\partial x_i\partial x_j}+\sum_{k=1}^{N-1}2c_{Y,kN}x_k^2 \frac{1-\beta_{Y,kN}^2}{(\beta_{Y,kN}^2x_k+x_N)^2} \left(\frac{x_N}{\beta_{Y,kN}^2 x_k+x_N}-1\right) \\ &&+c_{Y,iN}\left((1-\beta_{Y,iN}^2)\left(\frac{2x_ix_N^2}{(\beta_{Y,iN}^2x_i+x_N)^3}-\frac{x_ix_N}{(\beta_{Y,iN}^2x_i+x_N)^2}\right) - \frac{x_i+x_N}{\beta_{Y,iN}^2x_i+x_N} \right) \\ &&-c_{Y,jN}\left((1-\beta_{Y,jN}^2)\left(\frac{2x_j^2x_N\beta_{Y,jN}^2}{(\beta_{Y,jN}^2x_j+x_N)^3}-\frac{x_jx_N}{(\beta_{Y,jN}^2x_j+x_N)^2}\right) + \frac{x_j+x_N}{\beta_{Y,jN}^2x_j+x_N} \right) \end{eqnarray*}

Otherwise, if \(x_i\) are all independent:

\[ \left(\frac{\partial^2 Y_r}{\partial x_i\partial x_j}\right)_{\substack{x_{k\neq j\neq i}}} = c_{Y,ij}\frac{\partial^2f_{Y,ij}(x_i,x_j)}{\partial x_i\partial x_j} \]

§ d3rhormolardxidxjdxk()

CoolPropDbl CoolProp::GERG2008ReducingFunction::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
virtual

Derivative of the molar reducing density with respect to component i, j, and k mole fractions.

Implements CoolProp::ReducingFunction.

§ d3Trdxidxjdxk()

CoolPropDbl CoolProp::GERG2008ReducingFunction::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
virtual

The third derivative of reducing temperature with respect to component i, j and k mole fractions.

Calculated from d3Yrdxidxjdxk with \(T = Y\)

Implements CoolProp::ReducingFunction.

§ d3vrmolardxidxjdxk()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d3vrmolardxidxjdxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
x_N_dependency_flag  xN_flag 
) const

The third derivative of reducing molar volume with respect to component i, j and k mole fractions.

Calculated from d3Yrdxidxjdxk with \(v = Y\)

§ d3Yrdxidxjdxk()

CoolPropDbl CoolProp::GERG2008ReducingFunction::d3Yrdxidxjdxk ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
std::size_t  k,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc,
x_N_dependency_flag  xN_flag 
) const

Third mixed composition derivative of \(Y_r\) with \(x_i\) and \(x_j\) and \(x_k\).

§ drhormolardxi__constxj()

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

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

See also GERG 2004, Eqn. 7.57

\[ \left(\frac{\partial \rho_r}{\partial x_i}\right)_{x_{i\neq j}} = -\rho_r^2\left(\frac{\partial v_r}{\partial x_i}\right)_{x_{i\neq j}} \]

Implements CoolProp::ReducingFunction.

§ dTrdxi__constxj()

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

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

Calculated from dYrdxi__constxj with \(T = Y\)

Implements CoolProp::ReducingFunction.

§ dvrmolardxi__constxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::dvrmolardxi__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
x_N_dependency_flag  xN_flag 
) const

The derivative of reducing molar volume with respect to component i mole fraction.

Calculated from dYrdxi__constxj with \(v = Y\)

§ dYr_dgamma()

CoolPropDbl CoolProp::GERG2008ReducingFunction::dYr_dgamma ( const std::vector< CoolPropDbl > &  x,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc 
) const

Derivative of reducing term \(Y_r\) with respect to \(\gamma\).

\[ \frac{\partial Y_r}{\partial \gamma} = \sum_{i=1}^{N-1}\sum_{j=i+1}^{N} 2\beta_{ij}Y_{c,ij}f_{Y,ij}(x_i,x_j) \]

§ dYrdxi__constxj()

CoolPropDbl CoolProp::GERG2008ReducingFunction::dYrdxi__constxj ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc,
x_N_dependency_flag  xN_flag 
) const

First composition derivative of \(Y_r\) with \(x_i\).

If \(x_N\) is given by \( x_N = 1-\sum_{i=1}^{N-1}x_i\) (Gernert, FPE, 2014, Table S1):

\begin{eqnarray*} \left(\frac{\partial Y_r}{\partial x_i}\right)_{\substack{x_{j\neq i} \\ i<N}} &=& 2x_iY_{c,j}-2x_NY_{c,N} + \sum_{k=1}^{i-1}c_{Y,ki}\frac{\partial f_{Y,ki}(x_k, x_i)}{\partial x_i}+\sum_{k=i+1}^{N-1}c_{Y,ik}\frac{\partial f_{Y,ik}(x_i, x_k)}{\partial x_i} \\ &&+c_{Y,iN}\left(\frac{x_{N}(x_i+x_{N})}{\beta_{Y,iN}^2x_i+x_{N}}+(1-\beta_{Y,iN}^2)\frac{x_ix_{N}^2}{(\beta_{Y,i(N)}^2x_i+x_{N})^2}\right) \\ &&+\sum_{k=0}^{N-2}c_{Y,kN}\left(-\frac{x_k(x_k+x_N)}{\beta_{Y,kN}^2 x_k+x_N}+(1-\beta_{Y,kN}^2)\frac{x_Nx_k^2}{(\beta_{Y,kN}^2x_k+x_N)^2}\right) \end{eqnarray*}

Otherwise, if \(x_i\) are all independent:

\[ \left(\frac{\partial Y_r}{\partial x_i}\right)_{\substack{x_{j\neq i}}} = 2x_iY_{c,i} + \sum_{k=1}^{i-1}c_{Y,ki}\frac{\partial f_{Y,ki}(x_k,x_i)}{\partial x_i} + \sum_{k=i+1}^{N}c_{Y,ik}\frac{\partial f_{Y,ik}(x_i,x_k)}{\partial x_i} \]

§ f_Y_ij()

CoolPropDbl CoolProp::GERG2008ReducingFunction::f_Y_ij ( const std::vector< CoolPropDbl > &  x,
std::size_t  i,
std::size_t  j,
const STLMatrix &  beta 
) const

The function \( f_{Y,ij}(x_i,x_j) \).

\[ f_{Y,ij}(x_i,x_j) = x_ix_j\frac{x_i+x_j}{\beta_{Y,ij}^2x_i+x_j} \]

§ rhormolar()

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

The molar reducing density.

Given by \( \rho_r = 1/v_r \)

Implements CoolProp::ReducingFunction.

§ Yr()

CoolPropDbl CoolProp::GERG2008ReducingFunction::Yr ( const std::vector< CoolPropDbl > &  x,
const STLMatrix &  beta,
const STLMatrix &  gamma,
const STLMatrix &  Y_c_ij,
const std::vector< CoolPropDbl > &  Yc 
) const

Generalized reducing term \(Y_r\).

\[ Y_r = \sum_{i=1}^{N}x_iY_{c,i}^2+\sum_{i=1}^{N-1}\sum_{j=i+1}^{N} c_{Y,ij}f_{Y,ij}(x_i,x_j) \]


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