CoolProp icon indicating copy to clipboard operation
CoolProp copied to clipboard

PropSi returns erroneous values for NH3 in Excel

Open bwiencke opened this issue 1 year ago • 2 comments

At certain pressures (below 79000 Pa) erroneous temperature values are returned or no values are returned. This issue is not present when using RefProp. CoolProp Version: 6.6.0 and 6.6.1 Operating system: Microsoft® Excel® 2021 MSO (Version 2401 Build 16.0.17231.20236) 64-bit

For example:

  1. =PropsSI("T","P",57565.979,"Q",1,"AMMONIA") Expected value: 229.15 K Returned value: 337.45 K

  2. =PropsSI("T","P",30086.278,"Q",1,"AMMONIA") Expected value: 218.15 K Returned value: Inputs in Brent [219.766178,223.766178] do not bracket the root. Function values are [180.302048,624.573688] : PropsSI("T","P",30086.27794,"Q",1,"AMMONIA") Screenshot 2024-02-24 103632

bwiencke avatar Feb 24 '24 18:02 bwiencke

There was a problem with the saturated vapor density ancillary function in 6.6.0. It was fixed in https://github.com/CoolProp/CoolProp/commit/443a2fd276112a88ab42c3e74ce2aeb1c7b40764 . Building from source should fix this problem.

ibell avatar Feb 25 '24 14:02 ibell

I had to make another fix to the ancillary (sigh...) but it should be working now. The consistency plots look much better after this fix:

Ammonia.pdf

ibell avatar Feb 25 '24 15:02 ibell