drunsinn / pyXSteam

Python library for calculating properties of Steam and Water
Other
51 stars 18 forks source link

Modernisation of pyXSteam #13

Open drunsinn opened 2 years ago

drunsinn commented 2 years ago

The goal of this pull request is to clean up some old habits and try to improve the code quality as well as the documentation. These changes will break existing code which will also be indicated by a new major version number. Most likely it will also raise the required version of python to at least 3.7

fam007e commented 1 year ago

Can the dynamic viscosity for both liquid and vapor be added? It was in the IAPWS-IF97, but now the XSteam only provides one dynamic viscosity value.

drunsinn commented 1 year ago

@fam007e please create a separate issue for requests like adding functionality. If you have a working implementation you can send the code as a pull request.

drunsinn commented 1 year ago

@fam007e I have not been able to find anything about dynamic viscosity in IAPWS-IF97. I found and started to implement IAPWS R12-08(2008) but I don't think it is exactly what you are looking for. Can you post a reference of what exactly you are looking for?

fam007e commented 1 year ago

@drunsinn I was looking for it but couldn't find what I wanted. They have only this pdf. Moreover, I could not run their macros MS Excel document (the previous iteration, not the latest one). Therefore, I contacted my course TA who told me to use pyXSteam to get dynamic viscosities like these to get reasonable estimates for inlet and outlet by perturbation of saturation temperature: "mu_l = steam_table.my_pt(p[j], T_sat - 0.01), mu_g = steam_table.my_pt(p[j], T_sat + 0.01)". You can see the thermal-hydraulic calculation from one of my projects for the AP1000 reactor here. However, here, you can find an online XSteam calculator that gives thermal hydraulic values, even the vapor and fluid dynamic viscosity values. I don't know whether they distribute the API keys so we can use them.