jjgomera / iapws

python libray for IAPWS standard calculation of water and steam properties
GNU General Public License v3.0
170 stars 64 forks source link

Problem with specific heat at constant pressure value for heavy water #32

Closed khurrumsaleem closed 6 years ago

khurrumsaleem commented 6 years ago

Hi!

First of all, I would like to thank you very much for your awesome effort of maintaining this repository. Secondly, I think there is some problem with specific heat at constant pressure value for heavy water. I was checking it against the steam table by Hill (http://www.iaea.org/inis/collection/NCLCollectionStore/_Public/14/730/14730979.pdf?r=1) and its values are good upto 6 MPa but after that at 8 MPa pressure and 290 Celsius, it gives a value of 2.784817 although the value quoted in document is 5.218.

Thanks once again and looking forward to your feedback.

jjgomera commented 6 years ago

Hi, I get the correct value:

>>> from iapws import D2O
>>> D2O(T=290+273.15, P=8).cp
5.20603115473

Check your code, be careful with units (temperature in Kelvin, pressure in MPa). Furthermore the new standard for heavy water changed in 2017: http://iapws.org/relguide/Heavy.html, so the tables from Hill and outdated.

Thanks for feedback

khurrumsaleem commented 6 years ago

@jjgomera thank you very much for your response. Please take a look at the screenshot. I am exactly writing the same thing but I am still getting the incorrect answer

image

Can you suggest what might be the problem at my end?

jjgomera commented 6 years ago

Ummm, are you using the last version?

khurrumsaleem commented 6 years ago

after getting the erroneous value, I downloaded and installed the latest version but no betterment in results for my case.

khurrumsaleem commented 6 years ago

@jjgomera I reinstalled by deleting the earlier installation and it works fine now. Thank you very much for all the help.

You can go ahead and close the issue now so as not to clutter the repository with non-existent issues.