CoolProp
6.6.1dev
An open-source fluid property and humid air property database
|
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... | |
|
inline |
Definition at line 112 of file Ancillaries.h.
CoolProp::SaturationAncillaryFunction::SaturationAncillaryFunction | ( | rapidjson::Value & | json_code | ) |
Definition at line 14 of file Ancillaries.cpp.
|
inline |
Return true if the ancillary is enabled (type is not TYPE_NOT_SET)
Definition at line 120 of file Ancillaries.h.
double CoolProp::SaturationAncillaryFunction::evaluate | ( | double | T | ) |
Evaluate this ancillary function, yielding for instance the saturated liquid density
T | The temperature in K |
Definition at line 45 of file Ancillaries.cpp.
|
inline |
Get the maximum absolute error for this fit
Definition at line 126 of file Ancillaries.h.
|
inline |
Get the maximum temperature in K.
Definition at line 148 of file Ancillaries.h.
|
inline |
Get the minimum temperature in K.
Definition at line 143 of file Ancillaries.h.
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
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 |
Definition at line 71 of file Ancillaries.cpp.
CoolPropDbl CoolProp::SaturationAncillaryFunction::max_abs_error |
For TYPE_RATIONAL_POLYNOMIAL.
Definition at line 92 of file Ancillaries.h.
std::size_t CoolProp::SaturationAncillaryFunction::N |
The number of values in the arrays.
Definition at line 98 of file Ancillaries.h.
CoolPropDbl CoolProp::SaturationAncillaryFunction::reducing_value |
The value used to reduce the output variable.
Definition at line 96 of file Ancillaries.h.
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.
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.