-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong conversion of parameters for water in CPA #256
Comments
|
The same script (that I linked in the initial post) gives different results in version 0.4.0 and 0.5.10, so the defaults must be getting crossed up. I see your point about CPA with CS versus CPA with KG, they have different parameter sets. Related aside: the references for the sources of CPA and sCPA parameters are not provided. |
And 0.5.9 and 0.4.13 give the same results, so the bisection shows that 0.5.10 is the breaking change. |
can you give me an MVE? i can check that and fix the discrepancy that way |
With the script using Clapeyron
using Unitful
using Pkg
println(Pkg.status("Clapeyron"))
water = Clapeyron.CPA(["Water"])
println(volume(water, 1e5u"Pa", 303.15u"K")) I get:
and in the new version:
|
It looks like a small difference, but it turns into an enormous difference in pressure |
i checked, and the only difference was the water parameters. it is fixed in 6a8bb93 |
Thanks for looking into it. I think you fixed the energy, but the volume should also not change, and it was previously 0.0692 and is now 0.0608 |
Did you fix the volume parameters too? Otherwise this issue should not be closed |
Yes, the volume parameter was fixed too |
Previously, the default units for
epsilon_assoc
were J/mol. In 8f3bb4a the default was changed to K, but the coefficients for water were not properly converted.epsilon_assoc
was previously 16655.0 J/mol, and dividing by R of 8.314462618 J/mol/K should yield2003.136073273521 K
, but the value is instead1700.3053894468114 K
. Also the bond volume was changed, but it should not have been.The consequence is different volumes, and very different pressures. See the previous value in #239 (comment) which I believe is the correct answer for volume from the previous version.
The text was updated successfully, but these errors were encountered: