本文整理汇总了Python中CoolProp.CoolProp.set_TTSE_mode方法的典型用法代码示例。如果您正苦于以下问题:Python CoolProp.set_TTSE_mode方法的具体用法?Python CoolProp.set_TTSE_mode怎么用?Python CoolProp.set_TTSE_mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoolProp.CoolProp
的用法示例。
在下文中一共展示了CoolProp.set_TTSE_mode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getErrors
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_TTSE_mode [as 别名]
def getErrors(p, h, out="D", Ref=""):
"Get the relative errors from table-based interpolation"
errorTTSE = 1e3
errorBICUBIC = 1e3
try:
# Using the EOS
CP.disable_TTSE_LUT(Ref)
EOS = CP.PropsSI(out, "P", p, "H", h, Ref)
# Using the TTSE method
CP.enable_TTSE_LUT(Ref)
CP.set_TTSE_mode(Ref, "TTSE")
TTSE = CP.PropsSI(out, "P", p, "H", h, Ref)
# Using the Bicubic method
CP.enable_TTSE_LUT(Ref)
CP.set_TTSE_mode(Ref, "BICUBIC")
BICUBIC = CP.PropsSI(out, "P", p, "H", h, Ref)
errorTTSE = abs(TTSE / EOS - 1.0) * 100.0
errorBICUBIC = abs(BICUBIC / EOS - 1.0) * 100.0
except ValueError as VE:
print VE
pass
return errorTTSE, errorBICUBIC
示例2: range
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_TTSE_mode [as 别名]
for a_useless_counter in range(40000):
h = random.uniform(100, 590)
p = 10 ** random.uniform(np.log10(100), np.log10(7000))
try:
# Using the EOS
CP.disable_TTSE_LUT(Ref)
rhoEOS = CP.Props("D", "P", p, "H", h, Ref)
TEOS = CP.Props("T", "P", p, "H", h, Ref)
## cpEOS = CP.Props('C','P',p,'H',h,Ref)
# Using the TTSE method
CP.enable_TTSE_LUT(Ref)
CP.set_TTSE_mode(Ref, "TTSE")
rhoTTSE = CP.Props("D", "P", p, "H", h, Ref)
TTTSE = CP.Props("T", "P", p, "H", h, Ref)
## cpTTSE = CP.Props('C','P',p,'H',h,Ref)
# Using the Bicubic method
CP.enable_TTSE_LUT(Ref)
CP.set_TTSE_mode(Ref, "BICUBIC")
rhoBICUBIC = CP.Props("D", "P", p, "H", h, Ref)
TBICUBIC = CP.Props("T", "P", p, "H", h, Ref)
## cpBICUBIC = CP.Props('C','P',p,'H',h,Ref)
## errorTTSE = abs(TTTSE/TEOS-1)*100
## errorBICUBIC = abs(TBICUBIC/TEOS-1)*100
errorTTSE = abs(rhoTTSE / rhoEOS - 1) * 100
errorBICUBIC = abs(rhoBICUBIC / rhoEOS - 1) * 100
示例3: runNumVal
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_TTSE_mode [as 别名]
CP.enable_TTSE_LUT(fluid)
CP.PropsSI('H','T',477.8,'D',31.77945717536664,fluid)
CP.disable_TTSE_LUT(fluid)
val = ['H','T','P']
H = [320683.8718103034, -66337.56629141961, -384680.8070781441]
T = [477.8 , 418.67414597586514, 300]
P = [14.7e+05 , 14.7e+05 , 1.47e+05]
num = [H,T,P]
print
print "Run with EOS"
CP.disable_TTSE_LUT(fluid)
#CP.set_TTSE_mode(fluid, "TTSE")
CP.set_debug_level(0)
runNumVal(val,num)
print
print "And now with TTSE"
CP.enable_TTSE_LUT(fluid)
CP.set_TTSE_mode(fluid, "TTSE")
CP.set_debug_level(4)
runNumVal(val,num)
print
print "And now with BICUBIC"
CP.enable_TTSE_LUT(fluid)
CP.set_TTSE_mode(fluid, "BICUBIC")
CP.set_debug_level(4)
runNumVal(val,num)