IAPWS_IF97水物性计算Fortran90程序Word文档格式.docx
《IAPWS_IF97水物性计算Fortran90程序Word文档格式.docx》由会员分享,可在线阅读,更多相关《IAPWS_IF97水物性计算Fortran90程序Word文档格式.docx(30页珍藏版)》请在冰豆网上搜索。
J/kg*K J/kg*K
J/kg*K
m/s
定压热膨胀率β
等温压缩率κ
导热系数λ
动力粘度μ
表面张力σ
1/K
1/Pa
W/m*K
Pa*s
N/m
输出变量是以一个数组的形式存储,例如数组为prop(12),数组与变量的对应顺序为:
v u h s CpCvw β κ λ μ σ
单位如前所述。
现给出具体的调用方法:
给定压力P(Pa)与温度T(K),计算物性,程序自己判断所属区域:
callh2o(P,T,prop(12))
若想得到给定压力P(Pa)或温度T(K)下的饱和态物性,则可如下调用:
a.给定压力callPsatW(P,T)或给定温度callTsatW(P,T)
b.饱和液态callh2o(P,1.001*T,prop(12))或饱和汽态callh2o(P,0.999*T,prop(12))
当然还有其他方法,读者详细了解程序内容后,请自行发现。
这里给出获得动态链接库的方法:
1.新建一个动态链接库工程
2.加入附录所示源程序文件
3.编译,获得最重要的下面两个文件:
.lib与.dll
4.上面两个文件就可用于其他程序的物性调用
参考文献
WolfgangWagner,Hans-JoachimKretzschmar."
PropertiesofWaterandSteamBasedontheIndustrial formulation IAPWS-IF97"
Second Edition.
附录:
源程序(19个文件)
【1】.const.f90
moduleconstimplicitnone
real*8:
:
Rg=0.461526E3 !
J/kg/Kreal*8:
Tc=647.096 !
Kreal*8:
Pc=22.064E6 !
Pareal*8:
rhoc=322.0 !
kg/m^3endmoduleconst
【2】.reg1.f90
modulereg1implicitnone
integer :
I(34),J(34)real*8:
n(34)
dataI/&
0 ,&
0 ,&
1 ,&
2 ,&
3 ,&
4 ,&
5 ,&
8 ,&
21 ,&
23 ,&
29 ,&
30 ,&
31 ,&
32 &
/
dataJ/&
-2 ,&
-1 ,&
-9 ,&
-7 ,&
-3 ,&
17 ,&
-4 ,&
6 ,&
-5 ,&
10 ,&
-8 ,&
-11,&
-6 ,&
-29,&
-31,&
-38,&
-39,&
-40,&
-41 &
datan/&
0.14632971213167 ,&
-0.84548187169114 ,&
-3.756360367204 ,&
3.3855169168385 ,&
-0.95791963387872 ,&
0.15772038513228 ,&
-0.016616417199501 ,&
8.1214629983568E-04 ,&
2.8319080123804E-04 ,&
-6.0706301565874E-04 ,&
-0.018990068218419 ,&
-0.032529748770505 ,&
-0.021841717175414 ,&
-5.283835796993E-05 ,&
-4.7184321073267E-04 ,&
-3.0001780793026E-04 ,&
4.7661393906987E-05 ,&
-4.4141845330846E-06 ,&
-7.2694996297594E-16 ,&
-3.1679644845054E-05 ,&
-2.8270797985312E-06 ,&
-8.5205128120103E-10 ,&
-2.2425281908E-06 ,&
-6.5171222895601E-07 ,&
-1.4341729937924E-13 ,&
-4.0516996860117E-07 ,&
-1.2734301741641E-09 ,&
-1.7424871230634E-10 ,&
-6.8762131295531E-19 ,&
1.4478307828521E-20 ,&
2.6335781662795E-23 ,&
-1.1947622640071E-23 ,&
1.8228094581404E-24 ,&
-9.3537087292458E-26 &
endmodulereg1
【3】.reg2.f90
modulereg2implicitnone
Jo(9),I(43),J(43)real*8:
no(9),n(43)
dataJo/&
3 &
datano/&
-9.6927686500217 ,&
10.086655968018 ,&
-0.005608791128302,&
0.071452738081455 ,&
-0.40710498223928 ,&
1.4240819171444 ,&
-4.383951131945 ,&
-0.28408632460772 ,&
0.021268463753307 &
1 ,&
7 ,&
9 ,&
16 ,&
18 ,&
20 ,&
22 ,&
24 ,&
24 &
36 ,&
35 ,&
11 ,&
25 ,&
13 ,&
14 ,&
50 ,&
57 ,&
48 ,&
53 ,&
39 ,&
26 ,&
40 ,&
58 &
-1.7731742473213E-03 ,&
-0.017834862292358 ,&
-0.045996013696365 ,&
-0.057581259083432 ,&
-0.05032527872793 ,&
-3.3032641670203E-05 ,&
-1.8948987516315E-04 ,&
-3.9392777243355E-03 ,&
-0.043797295650573 ,&
-2.6674547914087E-05 ,&
2.0481737692309E-08 ,&
4.3870667284435E-07 ,&
-3.227767723857E-05 ,&
-1.5033924542148E-03 ,&
-0.040668253562649 ,&
-7.8847309559367E-10 ,&
1.2790717852285E-08 ,&
4.8225372718507E-07 ,&
2.2922076337661E-06 ,&
-1.6714766451061E-11 ,&
-2.1171472321355E-03 ,&
-23.895741934104 ,&
-5.905956432427E-18 ,&
-1.2621808899101E-06 ,&
-0.038946842435739 ,&
1.1256211360459E-11 ,&
-8.2311340897998 ,&
1.9809712802088E-08 ,&
1.0406965210174E-19 ,&
-1.0234747095929E-13 ,&
-1.0018179379511E-09 ,&
-8.0882908646985E-11 ,&
0.10693031879409 ,&
-0.33662250574171 ,&
8.9185845355421E-25 ,&
3.0629316876232E-13 ,&
-4.2002467698208E-06 ,&
-5.9056029685639E-26 ,&
3.7826947613457E-06 ,&
-1.2768608934681E-15 ,&
7.3087610595061E-29 ,&
5.5414715350778E-17 ,&
-9.436970724121E-07 &
endmodulereg2
【4】.reg3.f90
modulereg3implicitnone
I(40),J(40)real*8:
n(40)