国际水和蒸汽特性协会标准的python实现
iapws的Python项目详细描述
iapws
来自iapws(http://www.iapws.org/release.html)的标准的python实现。该模块实现了一整套标准,包括:
IAPWS-IF97 IAPWS-95 IAPWS-06 for Ice IAPWS-08 for seawater IAPWS-17 for Heavy water ...
家属
支持两个python分支:
* python 2.7 * python 3.4 or later
numpy scipy:带有数学和科学工具的库
安装
在debian中,您可以在jessie、testing和sid的官方存储库中找到。在ubuntu中,它位于ubuntu saucy(13.10)的官方存储库中。在其他系统中,您可以使用pip安装:
pip install iapws
或者直接克隆github存储库:
git clone https://github.com/jjgomera/iapws.git
并将文件夹添加到python路径。建议选择此选项以获得最新版本。
文件
要查看包的完整文档,请参见readthedocs
有关快速使用演示,请参见以下示例
iapws-if97(see full documentation)
fromiapwsimportIAPWS97sat_steam=IAPWS97(P=1,x=1)#saturated steam with known Psat_liquid=IAPWS97(T=370,x=0)#saturated liquid with known Tsteam=IAPWS97(P=2.5,T=500)#steam with known P and Tprint(sat_steam.h,sat_liquid.h,steam.h)#calculated enthalpies
iapws-95(see full documentation)
fromiapwsimportIAPWS95sat_steam=IAPWS95(P=1,x=1)#saturated steam with known Psat_liquid=IAPWS95(T=370,x=0)#saturated liquid with known Tsteam=IAPWS95(P=2.5,T=500)#steam with known P and Tprint(sat_steam.h,sat_liquid.h,steam.h)#calculated enthalpies
iapws-17适用于重水(see full documentation)
fromiapwsimportD2Osat_liquid=D2O(T=370,x=0)#saturated liquid with known Tprint(sat_liquid.h)#calculated enthalpy
IAPWS-06用于ICE IH(see full documentation)
fromiapwsimport_Iceice=_Ice(273.15,0.101325)#Ice at normal melting pointprint(ice["rho"])#Calculated density
iapws-08适用于海水(see full documentation)
fromiapwsimportSeaWaterstate=SeaWater(T=300,P=0.101325,S=0.001)#Seawater with 0.1% Salinityprint(state.cp)# Get cp
待办事项
- 固定:电解导电性
- TOdo:改善IAPWS95和D2O类在两相区的收敛性
- TOdo:实现快速计算的sbtl方法
- TOdo:实现快速计算的TTSE方法
氨水混合物:
- 修正:氨水混合物残留赫尔姆霍兹。数值是好的,差1%
- TOdo:添加平衡程序
我试过测试所有代码,并使用标准给出的所有值进行计算机验证,但无论如何,代码可能有隐藏的问题。 对于任何建议、评论、bug…您可以使用github issue section,或者直接通过email与我联系。