IAPWS-IF97高速共享库(Windows64/32,Linux64),ANSI C,Python API
seuif97的Python项目详细描述
内容
What is seuif97?
seuif97包是高速iapws-if97共享库的python api。
通过高速库,IAPWS-IF97的计算结果以比快速计算大正整数幂的重复平方法快3倍左右的计算速度精确产生。
共享库是用ansi c编写的,以便从不同的编程语言访问dll/so时更快、更小的二进制文件和更好的兼容性。
对于Windows和Linux用户,提供了方便的二进制库和API
- Windows64/32动态库:libseuif97.dll
- linux64共享库:libseuif97.so
- API:Python、C/C++、Excel VBA、Matlab、Java、FORTRAN、C语言等。
有关共享库和api的详细信息,请访问https://github.com/PySEE/SEUIF97。
Installation
如果您安装了带有pip的python,请使用:
Windows64/32
>;python-m pip安装seuif97
Linux64
$sudo-h python3-m pip安装seuif97
Python API
汽轮机的水和蒸汽特性、热力过程的功能见seuif97包
Functions of Water and Steam Properties
使用seuif97,您可以使用各种已知属性对来设置蒸汽的状态,以获得您希望知道的任何输出属性, 包括30属性(propertyIDs in seuif97)
实现了以下输入对:
(p,t) (p,h) (p,s) (p,v) (p,x)
(t,h) (t,s) (t,v) (t,x)
(h,s)
seuif97包中提供了两种类型的功能:
- 是吗??(in1,in2,财产)。例如,h=p t(p,t,4),性质为4)
- 是吗??2个?(in1,in2)。例如,h=pt2h(p,t)
??(in1,in2,propertyID)
- 计算属性(int,0-29)的propertyID,有关详细信息,请参见propertyIDs in seuif97
pt(pressure,temperature,propertyID)ph(pressure,enthalpy,propertyID)ps(pressure,entropy,propertyID)pv(pressure,volume,propertyID)th(temperature,enthalpy,propertyID)ts(temperature,entropy,propertyID)tv(temperature,volume,propertyID)hs(enthalpy,entropy,propertyID)px(pressure,quality,propertyID)tx(temperature,quality,propertyID)
- P(压力):兆帕;
- T(温度):℃
- V(体积):m^3/kg
- H(焓):kJ/kg
- s(熵):kj/(kg·k)
- X(质量):
??2?(in1,in2)
pt2h(pressure,temperature)pt2s(pressure,temperature)pt2v(pressure,temperature)pt2x(pressure,temperature)ph2t(pressure,enthalpy)ph2s(pressure,enthalpy)ph2v(pressure,enthalpy)ph2x(pressure,enthalpy)ps2t(pressure,entropy)ps2h(pressure,entropy)ps2v(pressure,entropy)ps2x(pressure,entropy)pv2t(pressure,volume)pv2h(pressure,volume)pv2s(pressure,volume)pv2x(pressure,volume)th2p(temperature,enthalpy)th2s(temperature,enthalpy)th2v(temperature,enthalpy)th2x(temperature,enthalpy)ts2p(temperature,entropy)ts2h(temperature,entropy)ts2v(temperature,entropy)ts2x(temperature,entropy)tv2p(temperature,volume)tv2h(temperature,volume)tv2s(temperature,volume)tv2x(temperature,volume)hs2p(enthalpy,entropy)hs2t(enthalpy,entropy)hs2v(enthalpy,entropy)hs2x(enthalpy,entropy)px2t(pressure,quality)px2h(pressure,quality)px2s(pressure,quality)px2v(pressure,quality)tx2p(temperature,quality)tx2h(temperature,quality)tx2s(temperature,quality)tx2v(temperature,quality)
Examples
importseuif97p,t=16.10,535.10# ??2?(in1,in2)h=seuif97.pt2h(p,t)s=seuif97.pt2s(p,t)v=seuif97.pt2v(p,t)print("(p,t),h,s,v:","{:>.2f}\t {:>.2f}\t {:>.2f}\t {:>.3f}\t {:>.4f}".format(p,t,h,s,v))# ??(in1,in2,propertyid)t=seuif97.ph(p,h,1)s=seuif97.ph(p,h,5)v=seuif97.ph(p,h,3)print("(p,h),t,s,v:","{:>.2f}\t {:>.2f}\t {:>.2f}\t {:>.3f}\t {:>.4f}".format(p,h,t,s,v))
propertyIDs in seuif97
Properties | Unit | symbol | propertyID |
---|---|---|---|
Pressure | MPa | p | 0 |
Temperature | °C | t | 1 |
Density | kg/m^3 | d | 2 |
Specific Volume | m^3/kg | v | 3 |
Specific enthalpy | kJ/kg | h | 4 |
Specific entropy | kJ/(kg·K) | s | 5 |
Specific exergy | kJ/kg | e | 6 |
Specific internal energy | kJ/kg | u | 7 |
Specific isobaric heat capacity | kJ/(kg·K) | cp | 8 |
Specific isochoric heat capacity | kJ/(kg·K) | cv | 9 |
Speed of sound | m/s | w | 10 |
Isentropic exponent | ks | 11 | |
Specific Helmholtz free energy | kJ/kg | f | 12 |
Specific Gibbs free energy | kJ/kg | g | 13 |
Compressibility factor | z | 14 | |
Steam quality | x | 15 | |
Region | r | 16 | |
Isobaric volume expansion coefficient | 1/K | ec | 17 |
Isothermal compressibility | 1/MPa | kt | 18 |
Partial derivative (dV/dT)p | m3/(kg·K) | dvdt | 19 |
Partial derivative (dV/dP)T | m3/(kg·MPa) | dvdp | 20 |
Partial derivative (dP/dT)v | MPa/K | dpdt | 21 |
Isothermal Joule-Thomson coefficient | kJ/(kg·MPa) | iJTC | 22 |
Joule-Thomson coefficient | K/MPa | JTC | 23 |
Dynamic viscosity | kg/(m·s) | dv | 24 |
Kinematic viscosity | m^2/s | kv | 25 |
Thermal conductivity | W/(m.K) | tc | 26 |
Thermal diffusivity | um^2/s | td | 27 |
Prandtl number | pr | 28 | |
Surface tension | mN/m | st | 29 |