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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1055 - (show annotations) (download) (as text)
Sat Jan 6 14:47:13 2007 UTC (17 years, 3 months ago) by johnpye
File MIME type: text/x-ascend
File size: 677 byte(s)
simplified slv_check_bounds call.
1 REQUIRE "steam/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 bound_self;
19 RUN iapwssat::bound_self;
20 mdot.lower_bound := 0 {kg/s};
21 END bound_self;
22 METHOD on_load;
23 RUN bound_self;
24 RUN reset;
25 RUN values;
26 END on_load;
27 METHOD self_test;
28 ASSERT mdot == 0.1 {kg/s};
29 ASSERT abs(p - 101.325{kPa}) < 0.0005{kPa};
30 ASSERT abs(h - 1547.387{kJ/kg}) < 0.0005{kJ/kg};
31 ASSERT Hdot == h*mdot;
32 END self_test;
33 END satsteamstream;

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