Xsteam tables NaN answer
4 views (last 30 days)
Show older comments
Hi,
I am trying to use the Xsteam tables from MATLAB to calculate some values. When I try to calculate the viscosity at the phase change I get error, but all my other parameters work. For instance:
XSteam('T_ph',p_cool,h_nodhc(1,6))
ans =
340.4889
Which is the temperature of the phase change at 146.8 or so bar. However when I do the same with my viscosity:
XSteam('my_ph',p_cool,h_nodhc(1,6))
ans =
NaN
Thx in advance for any suggestions.
2 Comments
Sulaymon Eshkabilov
on 11 Nov 2023
Pl., show your whole code and share your data. So community can see the whole picture.
dpb
on 11 Nov 2023
Edited: dpb
on 13 Nov 2023
Undoubtedly the input values you've provided are outside the range of the correlation; we, of course, cannot know what those values are just from the variables.
XSteam is somewhat out of date; the viscosity correlation it uses is the 2003 version, <there is a later 2018 update> and <an online calculator> that you might consider to compare for the particular inputs you've chosen.
But, for the most part, XSteam should give you reasonable results if you keep within the boundaries of the original correlation; I would attribute issues to inputs rather than the code itself. It would be more user-friendly if it had more error-checking builtin to warn the user of out-of-range inputs, perhaps.
Obviously when you get close to phase change boundaries, things get dicey.
Answers (0)
See Also
Categories
Find more on Language Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!