当前位置: 首页>>代码示例>>Python>>正文


Python CoolProp.set_TTSE_mode方法代码示例

本文整理汇总了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
开发者ID:bru32,项目名称:CoolProp,代码行数:25,代码来源:check_TTSE_v4.py

示例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
开发者ID:EdwinSoft,项目名称:coolprop,代码行数:32,代码来源:check_TTSE.py

示例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)
开发者ID:EVT1982,项目名称:coolprop,代码行数:33,代码来源:205.py


注:本文中的CoolProp.CoolProp.set_TTSE_mode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。