OutlookΒΆ

The code works pretty well. The iteration approach is quite fast and reliable.

There are some outstanding items:

  • Look into the memory used by the K-D trees, see if it can be further optimized because some copies of data are being made and some of these copies can in theory at least be avoided

  • Resolve issues where the bounding polygon of a region is not simple (has self-intersection). This happens especially in the case of water at low temperatures. Such self-intersection does not happen in \(T\), \(\rho\) coordinates, but does happen in other coordinate sets. The C++ method (https://libgeos.org/doxygen/MakeValid_8h_source.html) is exposed as Geometry.make_valid. It has not been fully implemented into the flashing code.

  • Automate generation of the bounding polygons in C++. Currently the bounding polygon is generated in Python and passed into C++. To do so will require to implement the melting line models, and additional conversions might be required in REFPROP-interop

  • See if there is a better way to define the bounding edges of the regions. Perhaps splines or something like that might be better, enabling a more efficient representation, not requiring as many points to remap into other coordinates more smoothly.