CoolProp
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

#include <Ancillaries.h>

## Public Member Functions

SaturationAncillaryFunction (rapidjson::Value &json_code)

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

CoolPropDbl get_max_abs_error ()
Get the maximum absolute error for this fit. More...

double evaluate (double T)
Evaluate this ancillary function, yielding for instance the saturated liquid density. More...

double 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. More...

double get_Tmin (void)
Get the minimum temperature in K.

double get_Tmax (void)
Get the maximum temperature in K.

## § evaluate()

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

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

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

## § 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

## § 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
 value The 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

The documentation for this class was generated from the following files:
• include/Ancillaries.h
• src/Backends/Helmholtz/Fluids/Ancillaries.cpp