/[ascend]/trunk/models/johnpye/iapws_sat_curves.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/iapws_sat_curves.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 576 - (show annotations) (download) (as text)
Tue May 9 03:42:08 2006 UTC (18 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2135 byte(s)
Changed all cases of *.fixed := {TRUE,FALSE} to 'FIX' and 'FREE' statements.
1 REQUIRE "johnpye/thermo_types.a4c";
2
3 MODEL iapws_sat_pressure;
4
5 p IS_A pressure;
6 T IS_A temperature;
7 pc IS_A pressure_constant;
8 Tc IS_A temperature_constant;
9
10 Tc :== 647.096 {K};
11 pc :== 22.064 {MPa};
12
13 tau IS_A factor;
14 tau_eq: tau = 1 - (T/Tc);
15
16 sat_pressure_curve: ln(p/pc) = (Tc/T)*(
17 a[1]*tau + a[2]*tau^1.5 + a[3]*tau^3 + a[4]*tau^3.5 + a[5]*tau^4 + a[6]*tau^7.5
18 );
19
20 a[1..6] IS_A real_constant;
21 a[1] :== -7.85951783;
22 a[2] :== 1.84408259;
23 a[3] :== -11.7866497;
24 a[4] :== 22.6807411;
25 a[5] :== -15.9618719;
26 a[6] :== 1.80122502;
27
28 METHODS
29 METHOD default_self;
30 RUN reset; RUN values;
31 END default_self;
32 METHOD specify;
33 FIX T;
34 END specify;
35 METHOD values;
36 T := 373.1243 {K};
37 END values;
38 METHOD self_test;
39 ASSERT abs(p - 101.325 {kPa}) < 1 {Pa};
40 END self_test;
41
42 END iapws_sat_pressure;
43
44 MODEL iapws_sat_density;
45
46 rhof IS_A mass_density;
47 rhog IS_A mass_density;
48 rhoc IS_A mass_density_constant;
49 Tc IS_A temperature_constant;
50 T IS_A temperature;
51
52 rhoc :== 322 {kg/m^3};
53 Tc :== 647.096 {K};
54
55 tau IS_A factor;
56
57 tau = 1 - T/Tc;
58
59 rhof / rhoc = 1 + b[1]*tau^(1/3) + b[2]*tau^(2/3) + b[3]*tau^(5/3) + b[4]*tau^(16/3) + b[5] * tau^(43/3) + b[6]*tau^(110/3);
60
61 rhog / rhoc = exp( c[1]*tau^(2/6) + c[2] * tau^(4/6) +c[3]*tau^(8/6) + c[4] *tau^(18/6) + c[5]*tau^(37/6) + c[6]*tau^(71/6) );
62
63 b[1..6] IS_A real_constant;
64 b[1] :== 1.99274064;
65 b[2] :== 1.09965342;
66 b[3] :== -0.510839303;
67 b[4] :== -1.75493479;
68 b[5] :== -45.5170352;
69 b[6] :== -6.74694450e5;
70
71 c[1..6] IS_A real_constant;
72 c[1] :== -2.03150240;
73 c[2] :== -2.68302940;
74 c[3] :== -5.38626492;
75 c[4] :== -17.2991605;
76 c[5] :== -44.7586581;
77 c[6] :== -63.9201063;
78
79 METHODS
80
81 METHOD default_self;
82 RUN test_1;
83 END default_self;
84
85 METHOD specify;
86 FIX T;
87 END specify;
88
89 METHOD values;
90 T := 273.16 {K};
91 END values;
92
93 (* the following methods implement the reference data points from the IAPWS supsat.pdf release. *)
94
95 METHOD test_1;
96 RUN ClearAll;
97 RUN specify;
98 RUN values;
99 END test_1;
100
101 METHOD test_2;
102 RUN ClearAll;
103 RUN specify;
104 T := 373.1243 {K};
105 END test_2;
106
107 METHOD test_3;
108 RUN ClearAll;
109 RUN specify;
110 T := 647.096 {K};
111 END test_3;
112
113 END iapws_sat_density;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22