CoolProp  6.6.1dev
An open-source fluid property and humid air property database
Public Member Functions | List of all members
CoolProp::SaturationAncillaryFunction Class Reference

Detailed Description

This is generalized class that can be used to manage an ancillary curve, here they are ancillary curves for saturation pressure, density, enthalpy, entropy.

The form of the ancillary equation can take one of a number of forms:

a) So-called "exponential" form (type = TYPE_EXPONENTIAL) that has a form like

\[ y = y_c\exp\left(\frac{T_c}{T}\sum(n_i \theta^{t_i})\right) \]

or

\[ y = y_c\exp\left(\sum(n_i \theta^{t_i})\right) \]

b) A non-exponential form (type = TYPE_NOT_EXPONENTIAL) that has a form of

\[ y = y_c\left(1+\sum_i(n_i\theta^t_i)\right) \]

with

\[ \theta = \left(1-\frac{T}{T_c}\right) \]

which is conveniently equal to zero at the critical point

c) Rational polynomial form (type = TYPE_RATIONAL_POLYNOMIAL) that has a form of

\[ y = \frac{\sum_iA_iT^i}{\sum_iB_iT^i}\]

where i is an integer, and the coefficients are in increasing order in both numerator and denominator

Definition at line 84 of file Ancillaries.h.

#include <Ancillaries.h>

Public Member Functions

 SaturationAncillaryFunction ()
 
 SaturationAncillaryFunction (rapidjson::Value &json_code)
 
bool enabled (void)
 Return true if the ancillary is enabled (type is not TYPE_NOT_SET) More...
 
CoolPropDbl get_max_abs_error ()
 
double evaluate (double T)
 
double invert (double value, double min_bound=-1, double max_bound=-1)
 
double get_Tmin (void)
 Get the minimum temperature in K. More...
 
double get_Tmax (void)
 Get the maximum temperature in K. More...
 

Constructor & Destructor Documentation

◆ SaturationAncillaryFunction() [1/2]

CoolProp::SaturationAncillaryFunction::SaturationAncillaryFunction ( )
inline

Definition at line 112 of file Ancillaries.h.

◆ SaturationAncillaryFunction() [2/2]

CoolProp::SaturationAncillaryFunction::SaturationAncillaryFunction ( rapidjson::Value &  json_code)

Definition at line 14 of file Ancillaries.cpp.

Member Function Documentation

◆ enabled()

bool CoolProp::SaturationAncillaryFunction::enabled ( void  )
inline

Return true if the ancillary is enabled (type is not TYPE_NOT_SET)

Definition at line 120 of file Ancillaries.h.

◆ evaluate()

double CoolProp::SaturationAncillaryFunction::evaluate ( double  T)

Evaluate this ancillary function, yielding for instance the saturated liquid density

Parameters
TThe temperature in K
Returns
y the value of the ancillary function at temperature T

Definition at line 45 of file Ancillaries.cpp.

◆ get_max_abs_error()

CoolPropDbl CoolProp::SaturationAncillaryFunction::get_max_abs_error ( )
inline

Get the maximum absolute error for this fit

Returns
max_abs_error the maximum absolute error for ancillaries that are characterized by maximum absolute error

Definition at line 126 of file Ancillaries.h.

◆ get_Tmax()

double CoolProp::SaturationAncillaryFunction::get_Tmax ( void  )
inline

Get the maximum temperature in K.

Definition at line 148 of file Ancillaries.h.

◆ get_Tmin()

double CoolProp::SaturationAncillaryFunction::get_Tmin ( void  )
inline

Get the minimum temperature in K.

Definition at line 143 of file Ancillaries.h.

◆ invert()

double CoolProp::SaturationAncillaryFunction::invert ( double  value,
double  min_bound = -1,
double  max_bound = -1 
)

Invert this ancillary function, and calculate the temperature given the output the value of the function

Parameters
valueThe value of the output
min_bound(optional) The minimum value for T; ignored if < 0
max_bound(optional) The maximum value for T; ignored if < 0
Returns
T The temperature in K

Definition at line 71 of file Ancillaries.cpp.

Member Data Documentation

◆ max_abs_error

CoolPropDbl CoolProp::SaturationAncillaryFunction::max_abs_error

For TYPE_RATIONAL_POLYNOMIAL.

Definition at line 92 of file Ancillaries.h.

◆ N

std::size_t CoolProp::SaturationAncillaryFunction::N

The number of values in the arrays.

Definition at line 98 of file Ancillaries.h.

◆ reducing_value

CoolPropDbl CoolProp::SaturationAncillaryFunction::reducing_value

The value used to reduce the output variable.

Definition at line 96 of file Ancillaries.h.

◆ T_r

CoolPropDbl CoolProp::SaturationAncillaryFunction::T_r

The temperature in K used to reduce the temperature (usually the critical temperature)

Definition at line 97 of file Ancillaries.h.

◆ using_tau_r

bool CoolProp::SaturationAncillaryFunction::using_tau_r

Whether the term \( \frac{T_c}{T} \) is included in the.

Definition at line 95 of file Ancillaries.h.


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