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

running the rankine.py demo #16

Closed
neuraldude opened this issue Sep 17, 2021 · 4 comments
Closed

running the rankine.py demo #16

neuraldude opened this issue Sep 17, 2021 · 4 comments

Comments

@neuraldude
Copy link

I've pip installed PYroMat 2.1.3, but can't get to run the rankine cycle demo at http://www.pyromat.org/src/rankine.py . I get the error

'pyromat.utility.PMParamError: Saturation temperature and pressure cannot be simultaneously specified'

and it seems to have something to do with the line

h1,h5 = steam.hs(p=p1,T=T1) # these are faster with T and p

in the file.

@chmarti1
Copy link
Owner

chmarti1 commented Sep 17, 2021 via email

@chmarti1
Copy link
Owner

Now let me give a more detailed reply...

The old "if97" multi-phase steam class used a piecewise temperature-pressure formulation for properties. Of course, specifying either temperature OR pressure along the saturation line is enough to specify the state, but the property methods required both, so the saturation property methods would have to calculate whichever of the two was missing. That meant it was faster to supply both at a time if you happened to already know them.

That all changed with the migration to the "mp1" class, back in version 2.0.7. Now, the back-end uses a much more robust (if lest convenient for engineering purposes) temperature, pressure formulation. Now, specifying either temperature or pressure will do. Specifying both does not help at all. In either case, density will need to be calculated, but that is computationally cheap, so it is no longer worth it to worry about it.

@chmarti1
Copy link
Owner

This is not technically an issue with the software, but I'm going to leave the issue open until the website has been updated. That is scheduled for the coming weeks. It won't be ready until I've validated some other aspects of the update. Thanks again for raising the issue!

@chmarti1
Copy link
Owner

The new website includes updated example codes. These out-dated lines have been fixed.

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

No branches or pull requests

2 participants