usnistgov / REFPROP-issues

A repository solely used for reporting issues with NIST REFPROP
26 stars 13 forks source link

use refprop by matlab calculate Q with negative valve #693

Open yplakaka opened 2 weeks ago

yplakaka commented 2 weeks ago

If you have an issue to report, please continue and fill out the applicable sections below. The details provided will help to resolve this issue as quickly as possible.

Prerequisites

NOTE: Be aware that all issues are publicly accessible and viewable. Thus please do not post any code or other content that is protected intellectual property or under copyright.

Before posting an issue, please:

You can also use markdown to format your issue: GitHub guide on Markdown. If you have code snippets, please use a code block to ensure that the formatting remains legible in the web interface. For instance, surround your code in triple backticks:

print('Hello world!')

Description

[Hello , I am using refprop by matlab to calculate some valves, I met some problems when I was trying to calculate mixed refrigerants vapor fraction ,It showed a negative valve. and I also tried use refprop via python, the same negative valve showed]

Steps to Reproduce

  1. [T_1=373.15;%K]
  2. [P_1=19936;%kPa]
  3. [Q_1=refpropm('Q','T',378.15,'P',P_1,'R134a','R245FA',[0.38376, 0.61624]);]

Expected behavior: [It should be 0.424]

Actual behavior: [the result calculate was -998]

Versions

REFPROP Version: [REFPROP 10.0]
Operating System and Version: [windows 10]
Access Method: [matlab]

Additional Information

If possible, please post examples and/or screenshots of the issue.

ianhbell commented 2 weeks ago

If I remember correctly refpropm uses mass fractions? I recommend to only use molar fractions although mass fractions are technically supported, there are a few bugs that are related to the use of mass fractions.

yplakaka commented 2 weeks ago
image

I checked the refprop DLL documentation. The reason of negative valve is that refprop thinks it is a Subcooled liquid, but quality not defined (usually P > Pc) https://refprop-docs.readthedocs.io/en/latest/DLL/high_level.html

ianhbell commented 2 weeks ago

Can you please confirm whether your compositions are mass or molar? Have you enabled the saturation splines? You should; it helps sometimes, but not always.