usnistgov / REFPROP-issues

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

incorrect quality value in PHFLSH without error #419

Closed siwolga closed 3 years ago

siwolga commented 3 years ago

Description

When calculating the parameters of mixture

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

№ | Compound | Input molar fraction -- | -- | -- 1 | Methane | 0.3468 2 | Ethane | 0.1623 3 | Propane | 0.2671 4 | Isobutane | 0.0399 5 | Butane | 0.1289 6 | Isopentane | 0.0133 7 | Pentane | 0.0126 8 | Hexane | 0.0043 9 | Water | 0.0045 10 | Nitrogen | 0.0092 11 | Carbon dioxide | 0.0111 by pressure (6136632 Pa) and enthalpy (271615 J/kg), the value of quality -998 is returned in REFPROP 10 using the old function PHFLSH, but error 0 is returned. Everything works correctly in REFPROP 9. When checking in Excel, the correct error is also returned, but the new function is used in the Excel add-in. **Expected behavior:** ierr > 0 **Actual behavior:** ierr = 0 ### Versions **REFPROP Version:** [REFPROP 10.0] **Operating System and Version:** [Win10] **Access Method:** [C#] ### Additional Information ![image_2021_06_23T13_10_29_825Z](https://user-images.githubusercontent.com/86594760/123605484-8f440300-d804-11eb-94d1-653c28845ae6.png) Using names: _PHFLSH(ref parameters.Pressure, ref parameters.Enthalpy, molar_fraction, ref parameters.Temperature, ref parameters.Density, ref parameters.DensityLiquid, ref parameters.DensityVapor, molar_fractionL, molar_fractionV, ref parameters.Quality, ref parameters.InternalEnergy, ref parameters.Entropy, ref parameters.CV, ref parameters.CP, ref parameters.SoundSpeed, ref parameters.Error, herr, herr.Capacity);
ianhbell commented 3 years ago

What result do you get for quality in refprop 9? Do the densities differ between REFPROP 9 and REFPROP 10?

siwolga commented 3 years ago

It looks like everything is correct, it's just that in version 9 this state was not calculated, but now it is! Thank you!

REFPROP 911 refprop911-2

REFPROP 10 refprop10-2