Create a shared library from the Fortran sources provided by Refprop from NIST. This project provides an alternative to the refprop.dll that comes with the software. Please use the official instructions if possible
I tried to use v0.2 to compile the refprop 9.0 in ubuntu 14.04 server.
gcc 4.8.2 and gfotran 4.8.2 were used.
The output is the same as Link to a former ISSUE
According to the error message, I added the -fPIC option to the compiler by modifying the line of OPTFLAGS in the Makefile as:
OPTFLAGS =-fPIC -O3 -ffast-math -ffloat-store # optimisation, remove for debugging
And I successfully compiled the files into a .so file, though there were a lot of warnings.
This is the test result:
vagrant@vagrant-ubuntu-trusty-64:~/refprop/librefprop.so-0.2/python$ python example.py
Point Temperature, Pressure, Enthalpy, Entropy,
C bar kJ/kg kJ/kg-K
========================================================================
Point 1 20.000 1.638 105.738 0.612
Point 2 24.117 40.000 118.551 0.633
Point 3 250.000 39.500 912.754 2.558
Point 4 177.568 2.138 791.765 2.649
Parameter Value Unit
=====================================
subcooling 5.000 K
HX pressure drop 0.500 bar
eta pump 50.000 %
eta expander 75.000 %
Pump work 12.813 kJ/kg
added heat 794.203 kJ/kg
expander work -120.989 kJ/kg
thermal efficiency 13.621 %
power, 50 g/s 5.409 kW
I tried to use v0.2 to compile the refprop 9.0 in ubuntu 14.04 server. gcc 4.8.2 and gfotran 4.8.2 were used. The output is the same as Link to a former ISSUE According to the error message, I added the -fPIC option to the compiler by modifying the line of OPTFLAGS in the Makefile as:
And I successfully compiled the files into a .so file, though there were a lot of warnings. This is the test result: