本文整理汇总了Python中CoolProp.CoolProp.set_TTSESinglePhase_LUT_range方法的典型用法代码示例。如果您正苦于以下问题:Python CoolProp.set_TTSESinglePhase_LUT_range方法的具体用法?Python CoolProp.set_TTSESinglePhase_LUT_range怎么用?Python CoolProp.set_TTSESinglePhase_LUT_range使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoolProp.CoolProp
的用法示例。
在下文中一共展示了CoolProp.set_TTSESinglePhase_LUT_range方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_TTSESinglePhase_LUT_range [as 别名]
# Setting the limits for enthalpy and pressure
p_min = CP.PropsSI(Ref, "ptriple")
p_max = 60e5
h_min = CP.PropsSI("H", "T", CP.PropsSI(Ref, "Ttriple") + 0.5, "Q", 0, Ref)
h_max = CP.PropsSI("H", "T", 500 + 273.15, "P", p_max, Ref)
# Creating some isotherms for better illustration of the cycle
isoT = np.array([0, 100, 200, 300, 400]) + 273.15
isoP = np.logspace(np.log10(p_min), np.log10(p_max), base=10)
ones = np.ones(isoP.shape)
isoH = [CP.PropsSI("H", "T", T * ones, "P", isoP, Ref) for T in isoT]
print "Lower left and upper right coordinates: ({0},{1}), ({2},{3})".format(h_min, p_min, h_max, p_max)
CP.set_TTSESinglePhase_LUT_range(Ref, h_min, h_max * 1.05, p_min, p_max * 1.05)
for a_useless_counter in range(40000):
h = random.uniform(h_min, h_max)
p = 10 ** random.uniform(np.log10(p_min), np.log10(p_max))
try:
# Using the EOS
CP.disable_TTSE_LUT(Ref)
rhoEOS = CP.PropsSI("D", "P", p, "H", h, Ref)
TEOS = CP.PropsSI("T", "P", p, "H", h, Ref)
if out == "C":
cpEOS = CP.PropsSI("C", "P", p, "H", h, Ref)
# Using the TTSE method