Xsteam tables NaN answer
조회 수: 3 (최근 30일)
이전 댓글 표시
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
Sulaymon Eshkabilov
2023년 11월 11일
Pl., show your whole code and share your data. So community can see the whole picture.
dpb
2023년 11월 11일
편집: dpb
2023년 11월 13일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!