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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 112 by johnpye, Wed Dec 14 06:25:28 2005 UTC revision 186 by johnpye, Fri Jan 13 03:36:44 2006 UTC
# Line 1  Line 1 
1  REQUIRE "johnpye/thermo_types.a4c";  REQUIRE "johnpye/thermo_types.a4c";
2    
3  MODEL iapws_sat_curves;  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        T.fixed := TRUE;
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;      rhof IS_A mass_density;
47      rhog IS_A mass_density;      rhog IS_A mass_density;
# Line 69  METHOD test_3; Line 110  METHOD test_3;
110      T := 647.096 {K};      T := 647.096 {K};
111  END test_3;  END test_3;
112    
113  END iapws_sat_curves;  END iapws_sat_density;

Legend:
Removed from v.112  
changed lines
  Added in v.186

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