警告。使用Coolprop 6.4.1生成ph图时发出警告

2024-06-16 14:12:33 发布

您现在位置:Python中文网/ 问答频道 /正文

运行脚本时,我显示:

using PyCall
pyimport("sys").executable
@pyimport CoolProp.CoolProp as CP
@pyimport CoolProp.Plots as CPP 
#=UNIT_SYSTEMS = {'EUR': <CoolProp.Plots.Common.EURunits object>, 
'KSI': <CoolProp.Plots.Common.KSIunits object>, 
'SI'
=#

plot = CPP.PropertyPlot("R410A", "ph", unit_system="KSI")
plot.title("R410A log p-h Diagramm")
plot.set_axis_limits([90, 550, 0, 15000])
plot.xlabel("h kJ/kg]")
plot.ylabel("P [kPa]")
plot.calc_isolines(num=15)
plot.show()

我收到很多警报;其中一些示例:

       ...
C:\Users\hermesr\AppData\Local\Programs\Python\Python38\lib\site-packages\CoolProp\Plots\Common.py:596: UserWarning: An error occurred for inputs 0.928571, 264.413011 with index (111,): For pseudo-pure fluid, quality must be equal to 0 or 1.  Two-phase quality is not defined
  warnings.warn(
C:\Users\hermesr\AppData\Local\Programs\Python\Python38\lib\site-packages\CoolProp\Plots\Common.py:596: UserWarning: An error occurred for inputs 0.928571, 264.993308 with index (112,): For pseudo-pure fluid, quality must be equal to 0 or 1.  Two-phase quality is not defined
  warnings.warn(
C:\Users\hermesr\AppData\Local\Programs\Python\Python38\lib\site-packages\CoolProp\Plots\Common.py:596: UserWarning: An error occurred for inputs 0.928571, 265.573604 with index (113,): For pseudo-pure fluid, quality must be equal to 0 or 1.  Two-phase quality is not defined
  warnings.warn(
C:\Users\hermesr\AppData\Local\Programs\Python\Python38\lib\site-packages\CoolProp\Plots\Common.py:596: UserWarning: An error occurred for inputs 0.928571, 266.153901 with index (114,): For pseudo-pure fluid, quality must be equal to 0 or 1.  Two-phase quality is not defined
 ...

您能告诉我为什么要发出此警报以及如何解决此问题吗

warnings.warn


Tags: pyplotlibpackageslocalsitecommonusers