Skip to content
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

Modernisation of pyXSteam #13

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open

Modernisation of pyXSteam #13

wants to merge 50 commits into from

Conversation

drunsinn
Copy link
Owner

@drunsinn drunsinn commented May 23, 2022

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

  • Add type hints to all functions
  • extract mode values to enums
  • autogenerate docstrings from function signature
  • rename modules, functions and classes to conform with python recommendations
  • update documentation with new examples
  • add imports of all major components to init.py
  • improve logging https://docs.python.org/3/howto/logging.html#optimization

@fam007e
Copy link

fam007e commented Mar 30, 2023

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
Copy link
Owner Author

@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.

this implementation only works with the switch for industrial use the scientific use functions require a derivative that has not been implemented
@drunsinn
Copy link
Owner Author

@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
Copy link

fam007e commented Apr 2, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants