/[ascend]/trunk/models/steam/iapwssat.a4c
ViewVC logotype

Annotation of /trunk/models/steam/iapwssat.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1052 - (hide annotations) (download) (as text)
Sat Jan 6 04:28:44 2007 UTC (15 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 838 byte(s)
Changed TestSteam.testiapwssat to use bounds check instead of ASSERT x == 1.01;
1 johnpye 1051 REQUIRE "steam/iapwssatprops.a4c";
2 johnpye 1042
3     MODEL iapwssat REFINES iapwssatprops;
4 johnpye 1043 x IS_A fraction; (* ensures we stay in the required region *)
5 johnpye 1042 h IS_A specific_enthalpy;
6     u IS_A specific_energy;
7     v IS_A specific_volume;
8    
9     h_expr: h = (h_g - h_f)*x + h_f;
10     u_expr: u = (u_g - u_f)*x + u_f;
11     v_expr: v = (rho_g + (rho_f - rho_g)*x ) / ( rho_f * rho_g );
12     METHODS
13     METHOD specify;
14     RUN iapwssatprops::specify;
15     FIX x;
16     END specify;
17     METHOD values;
18     RUN iapwssatprops::values;
19     x := 0.5;
20     END values;
21     METHOD on_load;
22     RUN reset; RUN values;
23     RUN bound_self;
24     END on_load;
25     END iapwssat;
26 johnpye 1043
27     MODEL testiapwssat1 REFINES iapwssat;
28     METHODS
29     METHOD values;
30     RUN iapwssatprops::values;
31     x := 1.01;
32 johnpye 1052 x.upper_bound := 1.0;
33     x.lower_bound := 0.0;
34 johnpye 1043 END values;
35 johnpye 1051 METHOD self_test;
36 johnpye 1052 ASSERT x <= x.upper_bound;
37     ASSERT x >= x.lower_bound;
38 johnpye 1051 END self_test;
39 johnpye 1043 END testiapwssat1;

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