In ThermoCycle, the computation of the working fluid thermophysical properties is achieved by a strong coupling with the open-source thermodynamic properties database Coolprop.
However, the computation of these properties usually involve multiparameter equations of state explicit in temperature and density, whereas the usual state variable in ThermoCycle are pressure and enthalpy. As a consequence, it is very common that most of the computational effort required to solve a model is dedicated to the computation of the thermophysical properties, which dramatically reduces the computation speed.
In order to enhance fluid property calculation speed, two interpolation methods, the tabular Taylor series expansion (TTSE) and the bicubic interpolation method, have been developed and integrated into the CoolProp main source code. The interpolation tables (the working fluid properties computed on a 200×200 grid over the whole are of states) are built at the beginning of the simulation (at the first property call) and stored
in memory for further use. This process requires between 2 s and 10 s. All subsequent property calls are performed using the selected interpolation method. It should be noted that, contrary to the bicubic method, the TTSE method generates discontinuities in the computation of the fluid properties. This discontinuity is however very small and does not constitute an issue numerical and an interpolation method is activated
during simulation.
Experience has shown that these interpolation methods can significantly decrease the computational time a property call (about 20 times faster) and the computational time of a complex model (e.g. a heat pump) involving numerous property calls (about 5 to 10 times faster).
Activating the interpolation methods.
The interpolation methods can be activated by a simple flag in when passing the working fluid name to the library.
In the following example, the working fluid R245fa isĀ defined without transport properties calculation, with a debug level of 1 (maximum is 10) and with density smoothing. the |enable_TTSE=1 flag indicates that the TTSE interpolation method should be used by CoolProp.
Accuracy of the interpolation methods.
Interpolating the properties constitutes an approximation and therefore brings an error to the results. The figure below however shows that this error is negligible for most of the T-s diagram plane.