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


Python CoolProp.get_BibTeXKey方法代码示例

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


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

示例1: fluid_header

# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import get_BibTeXKey [as 别名]
def fluid_header(Fluid):
    aliases = CP.get_aliases(str(Fluid))
    aliases = ', '.join(['``'+a.strip()+'``' for a in aliases])
    
    BTC = BibTeXerClass()
    
    EOSkey = CP.get_BibTeXKey(Fluid, "EOS")
    CP0key = CP.get_BibTeXKey(Fluid, "CP0")
    SURFACE_TENSIONkey = CP.get_BibTeXKey(Fluid, "SURFACE_TENSION")
    VISCOSITYkey = CP.get_BibTeXKey(Fluid, "VISCOSITY")
    CONDUCTIVITYkey = CP.get_BibTeXKey(Fluid, "CONDUCTIVITY")
    ECS_LENNARD_JONESkey = CP.get_BibTeXKey(Fluid, "ECS_LENNARD_JONES")
    ECS_FITSkey = CP.get_BibTeXKey(Fluid, "ECS_FITS")
    
    BibInfo = ''
    if EOSkey:
        BibInfo += '**Equation of State**: ' + BTC.entry2rst(EOSkey) + '\n\n'
    if CP0key:
        BibInfo += '**Ideal-Gas Specific Heat**: ' + BTC.entry2rst(CP0key) + '\n\n'
    if SURFACE_TENSIONkey:
        BibInfo += '**Surface Tension**: ' + BTC.entry2rst(SURFACE_TENSIONkey) + '\n\n'
    if VISCOSITYkey:
        BibInfo += '**Viscosity**: ' + BTC.entry2rst(VISCOSITYkey) + '\n\n'
    if CONDUCTIVITYkey:
        BibInfo += '**Conductivity**: ' + BTC.entry2rst(CONDUCTIVITYkey) + '\n\n'
    if ECS_LENNARD_JONESkey:
        BibInfo += '**Lennard-Jones Parameters for ECS**: ' + BTC.entry2rst(ECS_LENNARD_JONESkey) + '\n\n'
    if ECS_FITSkey:
        BibInfo += '**ECS Correction Fit**: ' + BTC.entry2rst(ECS_FITSkey) + '\n\n'
    
    return textwrap.dedent(
"""
********************
{Fluid:s}
********************

Aliases
================================================================================
{Aliases:s}

Bibliographic Information
=========================
{Reference:s}
""".format(Fluid=Fluid,
           Aliases = aliases,
           Reference = BibInfo,
           )
           )
开发者ID:ghobold,项目名称:coolprop,代码行数:50,代码来源:FluidInfoGenerator.py

示例2: open

# 需要导入模块: from CoolProp import CoolProp [as 别名]
# 或者: from CoolProp.CoolProp import get_BibTeXKey [as 别名]
import CoolProp
import CoolProp.CoolProp as CP

print 'Fluid | EOS | CP0 | VISCOSITY | CONDUCTIVITY | ECS_LENNARD_JONES | ECS_FITS | SURFACE_TENSION'

for fluid in CoolProp.__fluids__:
    
    print '{f:20s}'.format(f=fluid),'|',
    for key in ['EOS','CP0','VISCOSITY','CONDUCTIVITY','ECS_LENNARD_JONES','ECS_FITS','SURFACE_TENSION']:
        
        k = CP.get_BibTeXKey(fluid,key)
        if k and not k.startswith('__'):
            print 0,'|',
        elif k and k.startswith('__'):
            print 'X','|',
        else:
            print ' ','|',
    print ''
    
f = open('fitdata.tex','w')
for fluid in CoolProp.__fluids__:
    
    print>>f, '{f:20s}'.format(f=fluid),' & ',
    for i, key in enumerate(['EOS','CP0','VISCOSITY','CONDUCTIVITY','ECS_LENNARD_JONES','ECS_FITS','SURFACE_TENSION']):
        
        k = CP.get_BibTeXKey(fluid,key)
        if k and not k.startswith('__'):
            print>>f, '\cite{{{k:s}}}'.format(k=k),' & ',
        else:
            print>>f, ' ',' & ',
    print>>f, '\\\\'
开发者ID:CoolProp,项目名称:CoolProp-museum,代码行数:33,代码来源:print_bibtexkeys.py


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