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

Contents of /trunk/models/steam/satsteamstream.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1043 - (show annotations) (download) (as text)
Fri Jan 5 06:24:59 2007 UTC (17 years, 5 months ago) by johnpye
File MIME type: text/x-ascend
File size: 578 byte(s)
Fixed PyGTK GUI for case where syntax errors in command-line-specified file are found.
Fixed 'reload' behaviour for above case also.
Fixed satsteam test cases.
1 REQUIRE "iapwssat.a4c";
2
3 MODEL satsteamstream REFINES iapwssat;
4 mdot IS_A mass_rate;
5 Hdot IS_A energy_rate;
6 Hdot = mdot*h;
7 rho IS_A mass_density;
8 rho * v = 1;
9 METHODS
10 METHOD specify;
11 RUN iapwssat::specify;
12 FIX mdot;
13 END specify;
14 METHOD values;
15 RUN iapwssat::values;
16 mdot := 0.1 {kg/s};
17 END values;
18 METHOD on_load;
19 RUN bound_self;
20 RUN reset;
21 RUN values;
22 END on_load;
23 METHOD self_test;
24 ASSERT mdot == 0.1 {kg/s};
25 ASSERT abs(p - 101.325{kPa}) < 0.0005{kPa};
26 ASSERT abs(h - 1547.387{kJ/kg}) < 0.0005{kJ/kg};
27 ASSERT Hdot == h*mdot;
28 END self_test;
29 END satsteamstream;

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