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


Python CoolProp.rhosatV_anc方法代码示例

本文整理汇总了Python中CoolProp.CoolProp.rhosatV_anc方法的典型用法代码示例。如果您正苦于以下问题:Python CoolProp.rhosatV_anc方法的具体用法?Python CoolProp.rhosatV_anc怎么用?Python CoolProp.rhosatV_anc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CoolProp.CoolProp的用法示例。


在下文中一共展示了CoolProp.rhosatV_anc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: or

# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import rhosatV_anc [as 别名]
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:
                print ar - ar_REF, Z - Z_REF
            TTT << T
            RHO << rho
            TTT0 << T0
            RHO0 << rho0

tau = Tcrit / np.array(TTT.vec)
delta = np.array(RHO.vec) / rhocrit
THETA = np.array(TTT.vec) / np.array(TTT0.vec) * Tcrit_REF / Tcrit
PHI = (
开发者ID:bru32,项目名称:CoolProp,代码行数:32,代码来源:fit_shape_factor.py

示例2: Collector

# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import rhosatV_anc [as 别名]
m = 3
NP = 1
Nb = 0
N = (n - 1) * (m + 1) + 3 + Nb

mu, mu_dilute, RHO, TTT = 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 + 30, 400):
    for rho in np.linspace(1e-10, rhomax, 400):
        muval = CP.Props("V", "T", T, "D", rho, Rfluid)
        mudilute = CP.viscosity_dilute(fluid, T, rho, e_k, sigma)

        # Want positive value, and single-phase
        if muval > 0 and T > Tcrit or rho > CP.rhosatL_anc(fluid, T) or rho < CP.rhosatV_anc(fluid, T):
            mu << muval
            mu_dilute << mudilute
            TTT << T
            RHO << rho

from CoolProp.Plots.Plots import Trho

Trho(fluid)
plt.plot(RHO.vec, TTT.vec, ".")
plt.show()

# tau = np.array(TTT.vec)/Tcrit
tau = np.array(TTT.vec) / Tcrit
delta = np.array(RHO.vec) / rhocrit
Tstar = np.array(TTT.vec) / e_k
开发者ID:EVT1982,项目名称:coolprop,代码行数:33,代码来源:fit_avoid_ECS.py

示例3: Collector

# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import rhosatV_anc [as 别名]
from PDSim.misc.datatypes import Collector
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

fluid = 'R245fa'
Ttriple = CP.Props(fluid, 'Ttriple')
Tcrit = CP.Props(fluid, 'Tcrit')

RHO, TTT, RHO0, TTT0, ERR = Collector(), Collector(), Collector(), Collector(), Collector()

rhomax = CP.Props('D', 'T', Ttriple, 'Q', 0, 'R245fa')
# Build a database of "experimental" data
for T in np.linspace(Ttriple, Tcrit + 50, 80):
    for rho in np.linspace(1e-10, rhomax, 80):
        if (T > Tcrit or rho > CP.rhosatL_anc(fluid, T) or rho < CP.rhosatV_anc(fluid, T)):
            h = CP.Props('H', 'T', T, 'D', rho, 'R245fa')
            p = CP.Props('P', 'T', T, 'D', rho, 'R245fa')

            RHO << rho
            TTT << T
            ERR << h
            TTT0 << p

fig = plt.figure()
ax1 = fig.add_subplot(121, projection='3d')
ax1.scatter(np.array(RHO.vec), np.array(TTT.vec), ERR.vec)
ax2 = fig.add_subplot(122, projection='3d')
ax2.scatter(np.array(RHO.vec), np.array(TTT.vec), TTT0.vec)
plt.show()
开发者ID:CoolProp,项目名称:CoolProp,代码行数:32,代码来源:test_R245_fit.py


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