PYroMat
PYroMat copied to clipboard
Different result using substance.p() and substance.ps() in multiphase substance
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?