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

Different result using substance.p() and substance.ps() in multiphase substance #89

Open
juanjpnv opened this issue May 13, 2024 · 0 comments

Comments

@juanjpnv
Copy link

Hello! While working with multi-phase water, I observed that the saturated pressure methods substance.ps() yield different results compared to the regular pressure method substance.p() when the quality is set to zero or one.

Exemple:

water = pm.get('mp.H2O')

water.ps(T=400)       # return 2.457652635418225 bar
water.p(T=400, x=0) # return 2.45743614 bar

The discrepancy is quite small, appearing in the 4th decimal place. However, other thermodynamic properties do not exhibit similar divergence.

Regarding the pressure case, is this variation expected? Could it be related to floating-point arithmetic or Pyromat's internal calculations?

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

No branches or pull requests

1 participant