CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
ReducingFunction Class Referenceabstract

#include <Mixtures.h>

Inheritance diagram for ReducingFunction:
GERG2008ReducingFunction LemmonAirHFCReducingFunction

Public Member Functions

 ReducingFunction ()
 
virtual ~ReducingFunction ()
 
virtual double Tr (const std::vector< double > &x)=0
 The reduced temperature. More...
 
virtual double dTrdxi__constxj (const std::vector< double > &x, int i)=0
 The derivative of reduced temperature with respect to component i mole fraction. More...
 
virtual double rhorbar (const std::vector< double > &x)=0
 The molar reducing density. More...
 
virtual double drhorbardxi__constxj (const std::vector< double > &x, int i)=0
 Derivative of the molar reducing density with respect to component i mole fraction. More...
 
virtual void set_coeffs_from_map (int i, int j, std::map< std::string, double >)=0
 Set the coefficients based on reducing parameters loaded from JSON. More...
 
virtual double d2rhorbardxi2__constxj (const std::vector< double > &x, int i)=0
 
virtual double d2rhorbardxidxj (const std::vector< double > &x, int i, int j)=0
 
virtual double d2Trdxi2__constxj (const std::vector< double > &x, int i)=0
 
virtual double d2Trdxidxj (const std::vector< double > &x, int i, int j)=0
 
double d_ndTrdni_dxj__constxi (const std::vector< double > &x, int i, int j)
 
double d_ndrhorbardni_dxj__constxi (const std::vector< double > &x, int i, int j)
 
double ndrhorbardni__constnj (const std::vector< double > &x, int i)
 
double ndTrdni__constnj (const std::vector< double > &x, int i)
 

Protected Attributes

unsigned int N
 

Detailed Description

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

Definition at line 17 of file Mixtures.h.

Constructor & Destructor Documentation

ReducingFunction::ReducingFunction ( )
inline

Definition at line 22 of file Mixtures.h.

virtual ReducingFunction::~ReducingFunction ( )
inlinevirtual

Definition at line 23 of file Mixtures.h.

Member Function Documentation

virtual double ReducingFunction::d2rhorbardxi2__constxj ( const std::vector< double > &  x,
int  i 
)
pure virtual

Implemented in GERG2008ReducingFunction.

virtual double ReducingFunction::d2rhorbardxidxj ( const std::vector< double > &  x,
int  i,
int  j 
)
pure virtual

Implemented in GERG2008ReducingFunction.

virtual double ReducingFunction::d2Trdxi2__constxj ( const std::vector< double > &  x,
int  i 
)
pure virtual

Implemented in GERG2008ReducingFunction.

virtual double ReducingFunction::d2Trdxidxj ( const std::vector< double > &  x,
int  i,
int  j 
)
pure virtual

Implemented in GERG2008ReducingFunction.

double ReducingFunction::d_ndrhorbardni_dxj__constxi ( const std::vector< double > &  x,
int  i,
int  j 
)

GERG 2004 Monograph equation 7.55:

\[ \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=1}^Nx_k\left(\frac{\partial^2\rho_r}{\partial x_j \partial x_k}\right) \]

Definition at line 2287 of file Mixtures.cpp.

double ReducingFunction::d_ndTrdni_dxj__constxi ( const std::vector< double > &  x,
int  i,
int  j 
)

GERG 2004 Monograph equation 7.56:

\[ \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=1}^Nx_k\left(\frac{\partial^2T_r}{\partial x_j \partial x_k}\right) \]

Definition at line 2278 of file Mixtures.cpp.

virtual double ReducingFunction::drhorbardxi__constxj ( const std::vector< double > &  x,
int  i 
)
pure virtual

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

Implemented in GERG2008ReducingFunction.

virtual double ReducingFunction::dTrdxi__constxj ( const std::vector< double > &  x,
int  i 
)
pure virtual

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

Implemented in GERG2008ReducingFunction.

double ReducingFunction::ndrhorbardni__constnj ( const std::vector< double > &  x,
int  i 
)

Definition at line 2296 of file Mixtures.cpp.

double ReducingFunction::ndTrdni__constnj ( const std::vector< double > &  x,
int  i 
)

Definition at line 2305 of file Mixtures.cpp.

virtual double ReducingFunction::rhorbar ( const std::vector< double > &  x)
pure virtual

The molar reducing density.

Implemented in GERG2008ReducingFunction.

virtual void ReducingFunction::set_coeffs_from_map ( int  i,
int  j,
std::map< std::string, double >   
)
pure virtual

Set the coefficients based on reducing parameters loaded from JSON.

Implemented in LemmonAirHFCReducingFunction, and GERG2008ReducingFunction.

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

The reduced temperature.

Implemented in GERG2008ReducingFunction.

Member Data Documentation

unsigned int ReducingFunction::N
protected

Definition at line 20 of file Mixtures.h.


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