Comments (3)
Hi, can you share your AGA8 Fortran code? Are you sure its giving you the residual properties?
from phasepy.
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.
- In phasepy the thermal derivatives of the Helmholtz free energy are computed numerically (I tried different steps at your code and this didn't changed the results)
- Could you please confirm that the reported values from the Entropy and Enthalpy from AGA8 are computed in the (T,P,N) ensemble and that the reported value is the residual one.
- For the heat capacities it is my belief that the AGA8 package might be returning the total heat capacities (residual + ideal). Consider that the ideal contribution takes the values reported for methane (
CpId = 35.315 # J / mol K
andCvId = 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. - For the speed of sound calculation, the result can change considerably by means of the ideal gas contribution (CvId, CpId). Better results of this contribution can be obtained from the DIPPR 801 correlation. For example, as your mixture is mostly methane its reported value could be used (
CpId = 35.315 # J / mol K
andCvId = 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!
from phasepy.
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:
https://github.com/usnistgov/AGA8
from phasepy.
Related Issues (16)
- Mixture not working HOT 2
- mix.unifac() HOT 2
- Can't install it on Arch Linux HOT 2
- Does the order in which mixture components are defined is important? HOT 1
- Division Zero Error Zfactor HOT 1
- Add new features HOT 6
- Cannot install phasepy in 3.10 on Windows Environment: Getting Requirements to build wheel did not run successfully HOT 2
- Installing with “pip install phasepy” not working HOT 10
- Help with calculating LLEs HOT 1
- Difficulty Installing PhasePy HOT 6
- Thank You for Phasepy and Seeking Guidance HOT 5
- Fit VL-coexistence curve from experimental data HOT 3
- Successful Compilation under Android Termux HOT 5
- Bug due to Numpy (>1.20) deprecating " np.int" HOT 2
- Phase diagrams? HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phasepy.