热电偶电动势参考函数
thermocouples_reference的Python项目详细描述
包含标准的校准数据和查找函数的python模块 thermocouples类型b,c,d,e,g,j,k, ^{s t r 1}$m,n,p,r,s,t,还有一些不太标准的类型。
用法和示例
下面,第一次计算表明K型热电偶 42°C时的电动势,参考结0°C时的电动势为1.694 mV (compare to NIST table);第二个计算显示如何传递 在数组中,以numpy的方式为每个元素应用函数:
>>> from thermocouples_reference import thermocouples >>> typeK = thermocouples['K'] >>> typeK <Type K thermocouple reference (-270.0 to 1372.0 degC)> >>> typeK.emf_mVC(42, Tref=0) 1.6938477049901346 >>> typeK.emf_mVC([-3.14159, 42, 54], Tref=0) array([-0.12369326, 1.6938477 , 2.18822176])
提供了一个反向查找函数,可用于获取温度 超出测量电压,包括冷端补偿效应。 如果我们把我们的K型热电偶放进一个垃圾邮件里,我们读到1.1 mv, 在室温(23摄氏度)下使用我们的电压表,则垃圾邮件处于 50摄氏度[1]
>>> typeK.inverse_CmV(1.1, Tref=23.0) 49.907928030075773 >>> typeK.emf_mVC(49.907928030075773, Tref=23.0) # check result 1.1000000000000001
这些函数被称为emf_mVC和inverse_CmV,只是为了提醒您 关于电压和温度的单位。其他温度单位是 也支持:
Temperature unit | EMF lookup | Inverse lookup |
---|---|---|
degrees Celsius | .emf_mVC | .inverse_CmV |
degrees Fahrenheit | .emf_mVF | .inverse_FmV |
kelvins | .emf_mVK | .inverse_KmV |
degrees Rankine | .emf_mVR | .inverse_RmV |
也可以计算emf函数的导数。这些是功能性的 导数,不是有限差分。chromel的seebeck系数 而在687°C时,明矾的差值为42.00μV/℃:
>>> typeK.emf_mVC(687,derivative=1) 0.041998175982382979
数据源
读者可能熟悉热电偶查找表(example table)。 这些表通常是根据标准参考函数计算的 分段多项式。[2]此模块包含源多项式 直接,因此原则上它比任何查找表都更精确。 查找表还常常包括温度的近似多项式。 基于给定补偿EMF值的查找。这样的反多项式是 不包含在这个模块中;相反,反向查找基于 数值搜索精确电动势函数的解。
对于任何热电偶对象,有关校准和源的信息是 在.func属性的repr()中可用:
>>> typeK.func <piecewise polynomial+gaussian, domain -270.0 to 1372.0 in degC, output in mV; ITS-90 calibrated, from NIST SRD 60, type K>
数据源是:
- B、E、J、K、N、R、S、T型 使用NIST网站上的系数,并进行校准 到ITS-90刻度。[3]
- G、M、P型和非字母型AU/PT、AU/PD、AUFE 0.07, 右侧40/0,右侧5/0.1,右侧40/20 使用ASTM E 1751-00中的系数并校准到its-90。
- 类型C,D[4] 使用欧米茄工程出版物中的系数 和都是按IPTS-68比例校准的。[5]
函数图(如果看不到任何东西,请参见 low temperature types here,intermediate temperature types here,和 high temperature types here):
要求
- numpy
- scipy(可选,仅用于反向查找)
- python2或python3语言
免责声明
本单元是为教育目的而提供的。对于任何现实世界 进程,我强烈建议您检查此模块的输出 与已知的良好标准相违背。
我对本模块的准确性不作任何保证,并且 对因错误或遗漏而造成的任何损害概不负责。
[1] | This is the optimal temperature for spam. Always make sure your spam reads around 1.1 millivolt and you’ll have a tasty treat. |
[2] | A notable exception is NIST’s type K curve which uses a polynomial plus gaussian. The gaussian conveniently captures a wiggle in the Seebeck coefficient of alumel, that happens around 130 °C. |
[3] | The ITS-90 value T90 is believed to track the true thermodynamic temperature T very closely. The error T − T90 is quite small, of order 0.01 K for everyday conditions (up to about 200 °C), rising to around 0.05 K up at 1000 °C, and increasing even further after that. See Supplementary Information for the ITS-90. Generally your thermocouple accuracy will be more limited by manufacturing variations and by degradation of the metals in the thermal gradient region. |
[4] | An extra type G IPTS68 curve from the same source is available in ^{tt8}$. The type G in the main ^{tt9}$ contains the ASTM curve which is ITS-90 calibrated. |
[5] | IPTS-68 reads higher than ITS-90 by about 1 °C at high temperatures around 2000 °C. See Supplementary Information for the ITS-90 (specifically Fig. 5 in the Introduction) for more information about the difference. |