本文整理汇总了Python中CoolProp.CoolProp.conformal_Trho方法的典型用法代码示例。如果您正苦于以下问题:Python CoolProp.conformal_Trho方法的具体用法?Python CoolProp.conformal_Trho怎么用?Python CoolProp.conformal_Trho使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoolProp.CoolProp
的用法示例。
在下文中一共展示了CoolProp.conformal_Trho方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Collector
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import conformal_Trho [as 别名]
Ttriple = CP.Props(fluid, "Ttriple")
Tcrit = CP.Props(fluid, "Tcrit")
omega = CP.Props(fluid, "accentric")
rhocrit = CP.Props(fluid, "rhocrit")
pcrit = CP.Props(fluid, "pcrit")
Zcrit = CP.DerivTerms("Z", Tcrit, rhocrit, fluid)
N = 12
RHO, TTT, RHO0, TTT0 = Collector(), Collector(), Collector(), Collector()
rhomax = CP.Props("D", "T", Ttriple, "Q", 0, fluid)
# Build a database of "experimental" data
for T in np.linspace(Ttriple, Tcrit + 50, 80):
for rho in np.linspace(1e-10, rhomax, 80):
T0, rho0 = CP.conformal_Trho(fluid, fluid_REF, T, rho)
p = CP.Props("P", "T", T, "D", rho, fluid)
ar = CP.DerivTerms("phir", T, rho, fluid)
ar_REF = CP.DerivTerms("phir", T0, rho0, fluid_REF)
Z = CP.DerivTerms("Z", T, rho, fluid)
Z_REF = CP.DerivTerms("Z", T0, rho0, fluid_REF)
# goodstate = ((T > Tcrit and p > pcrit) or (T<Tcrit and rho > CP.rhosatL_anc(fluid,T) ))
goodstate = T > Tcrit or rho > CP.rhosatL_anc(fluid, T) or rho < CP.rhosatV_anc(fluid, T)
# goodstate = True
# Want positive value, and single-phase
if (T0 / T) > 0.1 and T / T0 * Tcrit_REF / Tcrit < 3 and T0 / T < 1e6 and goodstate:
if abs((ar - ar_REF) * 2 + (Z - Z_REF) ** 2) > 1e-5: