Skip to content

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

@juanjpnv

Description

@juanjpnv

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA suggestion to improve the packagepriorityThis is planned to be fixed in the next release.questionAn issue that needs clarification and not necessarily a fix.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions