usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Refprop predefined mixture results are different wiht 'MATLAB refpropm' #568

Closed Dohyun8599 closed 6 months ago

Dohyun8599 commented 11 months ago

The results of the refprop predefined mixture loaded from MATLAB are different. In particular, there is a big difference when calculating QUALITY. I am currently using Refprop 10.0v, and errors occur in the values of all predefined mixtures. how can i solve this? please help me matlab_refpropm refprop r513a screenshot

Calculating quality also incorrect. It means big deviation. how can I correct it )The results from pure fluid single and MATLAB results are very consistent.)

ianhbell commented 11 months ago

The way that the reference state is defined by default is not the same between the GUI and the shared library (DLL). You should first check the densities are the same. If they are, it is likely just a different reference state.

Dohyun8599 commented 11 months ago

The density value came out the same(MATLAB-refprop), but when the values for quality were correlated, the error in the entropy value was large.

here's the my reference state and preference reference state preference

ianhbell commented 11 months ago

Best would be to set the DLL and GUI to use the same reference state, perhaps IIR in your case

Dohyun8599 commented 11 months ago

sorry but what is the GUI means...? I'm the beginner sorry sir

ianhbell commented 11 months ago

GUI: graphical user interface.

In this case, the executable you pulled the tables from

Dohyun8599 commented 11 months ago

Thank you for your kind explanation. Since the REFPROP table is the standard, it seems that the REFPROP table should not be modified. When importing from MATLAB, the numbers seem to be transformed, but I don't know what to do.

ianhbell commented 11 months ago

The easiest solution is to not worry about the reference state. This is always my solution and recommendation. Only compare differences in enthalpy and you should be good.

The less easy solution is to use the SETREF function to force both the GUI and the wrapper to give the same values.