usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Failure to calculate with refprop python wrapper, values that are calculated without issue in Gui #533

Closed veronica-yyc closed 1 year ago

veronica-yyc commented 1 year 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

Description

GUI: Entered int energy and density. Returns T,P and state without issue.

Python wrapper: Entered "ED" as input. T as output. Returns -999999

I understand calling with ED is not advantageous, but they are the only two states that I have! Please point out my issue if I am causing this! Thankyou.

Steps to Reproduce

image image image

  1. set mixture, see image above (mole based)
  2. Gui, enter Int Energy 500000 J/kg and Density 160.75; returns value
  3. enter with input code and output code "ED" and "T"

Expected behavior: [What you expect to happen]

expect python wrapper to return what the gui does. returns near similar values for other requests.

Actual behavior: [What actually happens]

Versions

REFPROP Version: see image output Operating System and Version: Windows Access Method: GUI and python wrapper

Additional Information

mixture:

Mixture name: MixtureNAME Components: Carbon dioxide/Nitrogen/Methane/Ethane/Propane/Isobutane/Butane/Isopentane/Pentane/Hexane/Heptane Mole fraction: 0.02/0.00313/0.92357/0.03978/0.0094/0.0014/0.00148/0.00041/0.00039/0.00028/0.00016 Mass percent: 4.984/0.49649/83.897/6.773/2.347/0.46075/0.48708/0.1675/0.15933/0.13663/0.090781 Molar Mass: 17.66 kg/kmol Critical Point: 207.36 (K), 5996000.0 (Pa), 200.64 (kg/m³) Cricondentherm: 252.39 (K), 3618200.0 (Pa), 35.201 (kg/m³) Cricondenbar: 230.29 (K), 7205800.0 (Pa), 115.68 (kg/m³)

ianhbell commented 1 year ago

Try turning on the isopleth, that is usually helpful with mixtures. That means iFlag=1