|
CoolProp 8.0.0
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 90 of file Ancillaries.h.
#include <Ancillaries.h>
Classes | |
| struct | Values |
Public Types | |
| enum | ancillaryfunctiontypes { TYPE_NOT_SET = 0 , TYPE_NOT_EXPONENTIAL , TYPE_EXPONENTIAL , TYPE_RATIONAL_POLYNOMIAL } |
Public Member Functions | |
| SaturationAncillaryFunction () | |
| SaturationAncillaryFunction (const Values &v) | |
| bool | enabled () |
| 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 () |
| Get the minimum temperature in K. More... | |
| double | get_Tmax () |
| Get the maximum temperature in K. More... | |
Definition at line 93 of file Ancillaries.h.
|
inline |
Definition at line 137 of file Ancillaries.h.
|
explicit |
Build from a plain-typed Values bundle (defined out-of-line in Ancillaries.cpp). All JSON parsing happens in the non-installed factory.
Definition at line 26 of file Ancillaries.cpp.
|
inline |
Return true if the ancillary is enabled (type is not TYPE_NOT_SET)
Definition at line 147 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 43 of file Ancillaries.cpp.
|
inline |
Get the maximum absolute error for this fit
Definition at line 153 of file Ancillaries.h.
|
inline |
Get the maximum temperature in K.
Definition at line 175 of file Ancillaries.h.
|
inline |
Get the minimum temperature in K.
Definition at line 170 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 82 of file Ancillaries.cpp.
| CoolPropDbl CoolProp::SaturationAncillaryFunction::max_abs_error |
For TYPE_RATIONAL_POLYNOMIAL.
Definition at line 123 of file Ancillaries.h.
| std::size_t CoolProp::SaturationAncillaryFunction::N |
The number of values in the arrays.
Definition at line 129 of file Ancillaries.h.
| CoolPropDbl CoolProp::SaturationAncillaryFunction::reducing_value |
The value used to reduce the output variable.
Definition at line 127 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 128 of file Ancillaries.h.
| bool CoolProp::SaturationAncillaryFunction::using_tau_r |
Whether the term \( \frac{T_c}{T} \) is included in the.
Definition at line 126 of file Ancillaries.h.