本文整理汇总了Python中CoolProp.CoolProp.set_standard_unit_system方法的典型用法代码示例。如果您正苦于以下问题:Python CoolProp.set_standard_unit_system方法的具体用法?Python CoolProp.set_standard_unit_system怎么用?Python CoolProp.set_standard_unit_system使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoolProp.CoolProp
的用法示例。
在下文中一共展示了CoolProp.set_standard_unit_system方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: teest_1phase_first_derivatives
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
def teest_1phase_first_derivatives():
for US in [CoolProp.UNIT_SYSTEM_SI, CoolProp.UNIT_SYSTEM_KSI]:
CP.set_standard_unit_system(US)
S = State("R134a", dict(T=300, D=1))
l = [
(S.get_rho, "T", S.T, "P", S.p, S.PFC.drhodT_constp),
(S.get_rho, "P", S.p, "T", S.T, S.PFC.drhodp_constT),
(S.get_p, "D", S.rho, "T", S.T, S.PFC.dpdrho_constT),
# (S.get_p,'D',S.rho,'H',S.h,S.PFC.dpdrho_consth), #(these inputs not supported)
(S.get_p, "T", S.T, "D", S.rho, S.PFC.dpdT_constrho),
# (S.get_p,'T',S.T,'H',S.h,S.PFC.dpdT_consth), #(these inputs not supported)
(S.get_h, "D", S.rho, "T", S.T, S.PFC.dhdrho_constT),
(S.get_h, "D", S.rho, "P", S.p, S.PFC.dhdrho_constp),
(S.get_h, "T", S.T, "D", S.rho, S.PFC.dhdT_constrho),
(S.get_h, "T", S.T, "P", S.p, S.PFC.dhdT_constp),
(S.get_h, "P", S.p, "T", S.T, S.PFC.dhdp_constT),
(S.get_s, "D", S.rho, "T", S.T, S.PFC.dsdrho_constT),
(S.get_s, "T", S.T, "D", S.rho, S.PFC.dsdT_constrho),
(S.get_s, "D", S.rho, "P", S.p, S.PFC.dsdrho_constp),
(S.get_s, "T", S.T, "P", S.p, S.PFC.dsdT_constp),
(S.get_s, "P", S.p, "T", S.T, S.PFC.dsdp_constT),
]
for args in l:
yield (check_1phase_first_derivatives,) + (S,) + args
示例2: test_State_PROPS
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
def test_State_PROPS():
for parameter, SI_over_kSI in State_Props_listing:
CP.set_standard_unit_system(CoolProp.unit_systems_constants.UNIT_SYSTEM_SI)
val_SI = S.Props(parameter)
CP.set_standard_unit_system(CoolProp.unit_systems_constants.UNIT_SYSTEM_KSI)
val_kSI = S.Props(parameter)
yield check, val_SI, val_kSI, SI_over_kSI
示例3: test_sat_second_derivatives
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
def test_sat_second_derivatives():
for US in [CoolProp.UNIT_SYSTEM_SI, CoolProp.UNIT_SYSTEM_KSI]:
CP.set_standard_unit_system(US)
S = State('R134a',dict(T=300,Q=1))
l = [(S.get_T,'P',S.p,'Q',0,S.PFC.d2Tdp2_along_sat),
(S.get_rho,'P',S.p,'Q',0,S.PFC.d2rhodp2_along_sat_liquid),
(S.get_rho,'P',S.p,'Q',1,S.PFC.d2rhodp2_along_sat_vapor),
(S.get_h,'P',S.p,'Q',0,S.PFC.d2hdp2_along_sat_liquid),
(S.get_h,'P',S.p,'Q',1,S.PFC.d2hdp2_along_sat_vapor),
(S.get_s,'P',S.p,'Q',0,S.PFC.d2sdp2_along_sat_liquid),
(S.get_s,'P',S.p,'Q',1,S.PFC.d2sdp2_along_sat_vapor),
]
for args in l:
yield (check_sat_second_derivatives,)+(S,)+args
示例4: check_Props
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
def check_Props(parameter, SI_over_kSI):
CP.set_standard_unit_system(CoolProp.unit_systems_constants.UNIT_SYSTEM_SI)
val_SI = CP.Props(parameter,'T',300.0,'D',1.0,'R134a')
CP.set_standard_unit_system(CoolProp.unit_systems_constants.UNIT_SYSTEM_KSI)
val_kSI = CP.Props(parameter,'T',300.0,'D',1.0,'R134a')
try:
val_SI = val_SI()
val_kSI = val_kSI()
except:
pass
print val_SI,val_kSI, val_SI/val_kSI - SI_over_kSI
if abs(val_SI/val_kSI - SI_over_kSI) > 1e-12:
raise ValueError(val_SI/val_kSI-SI_over_kSI)
示例5: teest_sat_first_derivatives
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
def teest_sat_first_derivatives():
for US in [CoolProp.UNIT_SYSTEM_SI, CoolProp.UNIT_SYSTEM_KSI]:
CP.set_standard_unit_system(US)
S = State("R134a", dict(T=300, Q=1))
l = [
(S.get_T, "P", S.p, "Q", 0, S.PFC.dTdp_along_sat),
(S.get_rho, "P", S.p, "Q", 0, S.PFC.drhodp_along_sat_liquid),
(S.get_rho, "P", S.p, "Q", 1, S.PFC.drhodp_along_sat_vapor),
(S.get_rho, "T", S.T, "Q", 0, S.PFC.drhodT_along_sat_liquid),
(S.get_rho, "T", S.T, "Q", 1, S.PFC.drhodT_along_sat_vapor),
(S.get_h, "P", S.p, "Q", 0, S.PFC.dhdp_along_sat_liquid),
(S.get_h, "P", S.p, "Q", 1, S.PFC.dhdp_along_sat_vapor),
(S.get_s, "P", S.p, "Q", 0, S.PFC.dsdp_along_sat_liquid),
(S.get_s, "P", S.p, "Q", 1, S.PFC.dsdp_along_sat_vapor),
]
for args in l:
yield (check_sat_first_derivatives,) + (S,) + args
示例6: print
# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import set_standard_unit_system [as 别名]
p = CP.Props('P', 'T', 300, 'D', 1, 'Propane')
h = CP.Props('H', 'T', 300, 'D', 1, 'Propane')
T = CP.Props('T', 'P', p, 'H', h, 'Propane')
D = CP.Props('D', 'P', p, 'H', h, 'Propane')
print('SINGLE PHASE CYCLE (propane)')
print('T,D -> P,H', 300, ',', 1, '-->', p, ',', h)
print('P,H -> T,D', p, ',', h, '-->', T, ',', D)
except:
print(' ')
print('************ CANT USE REFPROP ************')
print(' ')
print(' ')
print('************ CHANGE UNIT SYSTEM (default is kSI) *************')
print(' ')
CP.set_standard_unit_system(CoolProp.UNIT_SYSTEM_SI)
print('Vapor pressure of water at 373.15 K in SI units (Pa):',
CP.Props('P', 'T', 373.15, 'Q', 0, 'Water'))
CP.set_standard_unit_system(CoolProp.UNIT_SYSTEM_KSI)
print('Vapor pressure of water at 373.15 K in kSI units (kPa):',
CP.Props('P', 'T', 373.15, 'Q', 0, 'Water'))
print(' ')
print('************ BRINES AND SECONDARY WORKING FLUIDS *************')
print(' ')
print('Density of 50% (mass) ethylene glycol/water at 300 K, 101.325 kPa:',
CP.Props('D', 'T', 300, 'P', 101.325, 'MEG-50%'), 'kg/m^3')
print('Viscosity of Therminol D12 at 350 K, 101.325 kPa:',
CP.Props('V', 'T', 350, 'P', 101.325, 'TD12'), 'Pa-s')
print(' ')