Closed sykde closed 5 months ago
You are very near the saturation curves. Try calling SATSPLN first before calling ABFLSH. The GUI calls SATSPLN by default to set the splines through the saturation curves. I get the correct answer with the Mathcad wrapper, and it calls SATSPLN by default also when the mixture is set.
Thank you for the prompt response!
The problem was indeed that the python wrapper does not seem to call SATSPLN. Calling it manually fixed the problem.
Good to hear! Thanks @henningjp for the fix
Description
Hello,
I noticed an inconsistency between the Python wrapper's REFPROPdll and ABFLSHdll routines compared to the output of the dekstop application. The mixture I'm working with is a pseudo-LNG: methane, ethane, propane, butane, and nitrogen, with molar fractions of 0.9400, 0.0470, 0.0080, 0.0020 and 0.0030 respectively. In the desktop application, if I request the calculation of all properties at T = 120.15 K and P = 0.2 MPa, I get a specific enthalpy of 11.676 kJ/kg, which corresponds to 198.98 J/mol. If I do the same for P = 0.2 MPa and H = 11.676 kJ/kg, I get the expected temperature value of 120.15 K. Using the python wrapper, that is not the case.
In the examples below, only ABFLSHdll is showcased, but the behaviour is the same when REFPROPdll is used.
Am I doing something wrong? Thanks in advance
Versions
REFPROP Version: 10.0 Operating System and Version: Windows 11 (22H2, 22621.3737) Access Method: Python, Desktop program
Additional Information
A screenshot of the REFPROP desktop environment (results are the same if T, P or P, H are provided as input):
A screenshot of the Python code above, showcasing the problem:
Edit: Added some information for conciseness, fixed a typo