Closed infinity77 closed 3 years ago
Hi, can you share your AGA8 Fortran code? Are you sure its giving you the residual properties?
Hi!
Thanks for you interest in Phasepy.
The thermal derivatives properties (Entropy, Enthalpy, Cv, Cp and speed of sound) were just added recently to the package. After this enquiry I checked the functions and there is no bug in the functions (the relations are correctly coded). I used the following expressions:
There are several reasons that could explain the differences between the AGA8 package.
CpId = 35.315 # J / mol K
and CvId = CpId - r # J / mol K
, obtained from DIPPR 801), then the computed total isochoric and isobaric heat capacities are 27.01 and 35.46 J/mol K , respectively. Way closer to the reported values by AGA8. To complement this point, the reported isochoric and isobaric heat capacities on NIST for methane at 288K and 1 bar are 27.050 and 35.448 J / mol K.CpId = 35.315 # J / mol K
and CvId = CpId - r # J / mol K
). With those values the computed speed of sound is 387.097 m/s. This result is closer to the reported by AGA8.It would be interesting to compare the source codes of both implementations!
I hope this help!
Hi,
you are indeed correct and the AGA8 code is not reporting residual properties, I completely missed it from looking at the code.
the AGA8 implementation (at least for simple stuff) is public domain and you can find it here in 4 different languages:
Hi,
I have tried using phasepy to analyze the behavior of a mixture of 11 components - as a gas - and comparing the results with the AGA8 code (https://pages.nist.gov/AGA8/). I have been looking specifically at density, Z, entropy, enthalpy, heat capacities and speed of sound.
Quite curiously, I get very similar results for density and Z between phasepy and AGA8, but all the other properties are very far off from one another. This is what I get:
I have verified the AGA8 results with the Excel interface and the Fortran interface. The code I have used for phasepy is below:
I am sure I am missing something obvious - could you please explain what that would be?
Thank you in advance.