Coolprop mentioned by Imke Krüger is one of the best ways to get the refrigerant properties in Modelica. It is implemented through ExternalMedia package. However if you wish to improve the speed of your program you can write your own external C code to call the refrigerant properties as OpenModelica supports calling external functions written in C and Fortran.
You can build your REFPROP shared library (see the link below)
https://github.com/aaditya3015/REFPROP-cmake
The advantage is that your can call specific Fortran subroutines depending on the your requirement and also get the required thermodynamic partial derivatives rather than using the symbolic differentiation employed in Modelica.