New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabular ammonia calc yields very different results using TTSE vs. bicubic, including non-physical and NaN quantities #914
Comments
How close are you to the 2-phase region? Please note that the tables become somewhat unreliable in the vicinity of the phase boundaries. See also: #882 |
I'm familiar with #882, but didn't realize that the vapor side hasn't had the "bump" implemented yet. This could explain what I'm seeing here. However, it would seem that I'm adequately above the dew temperature to avoid these issues: t=259.22 and t_dew=258.89°C > dt = 0.33°C. |
The grid is quite coarse and your dt might not be large enough. We currently use 200 cells in log p, h and T direction (https://github.com/CoolProp/CoolProp/blob/master/src/Backends/Tabular/TabularBackends.h#L366). from CoolProp.CoolProp import PropsSI
fluid = "NH3"
Tmax = 1.5*PropsSI("Tmax","T",0,"D",0,fluid)
Tmin = PropsSI("Tmin","T",0,"D",0,fluid)
dT = (Tmax-Tmin)/200.0
4.272525 |
OK. I'll revisit this issue once the "bump" functionality is implemented on the vapor side. |
Commit aeb05b0 fixed this issue, so long as the phase is specified. Thanks, Ian! New results from running same code as above:
|
Go ahead and close then
|
This is another case where tabular results using PT inputs can be unpredictable near the melting line. The "bump" work done in early December seems to have gone some distance toward fixing these issues, but I have another example. Here, I'm calculating ammonia at about 0.3°C above its saturation temperature--it should be a superheated vapor--with no phase specification, liquid phase specification and gas phase specification.
Using the January 4th nightly build and C#.
This yields the following. Of particular note are the results from bicubic with no phase specification and gas phase specification. Cp is problematic, and should speed_sound ever be returning NaN?
The text was updated successfully, but these errors were encountered: