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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1132 - (hide annotations) (download) (as text)
Sun Jan 14 10:40:58 2007 UTC (15 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 828 byte(s)
Converted slv3 (QRSlv) to new slv_param_bool (etc) parameter code.
Adding a testcase for dsgsat with LSODE as well as IDA.
Fixed some remaining external function calls (needing userdata ptr).
Adding LSODE parameters 'METH' and 'MITER' for setting AM and BDF methods.
Rerranged v_expr in iapwssat.a4c.
Removed lower bound on mdot in satsteamstream.a4c.
1 johnpye 1051 REQUIRE "steam/iapwssat.a4c";
2 johnpye 1042
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 johnpye 1125 METHOD default_self;
11     RUN iapwssat::default_self;
12     rho := 200 {kg/m^3};
13     Hdot := 0.1 {kg/s} * 3000 {kJ/kg};
14     END default_self;
15 johnpye 1042 METHOD specify;
16     RUN iapwssat::specify;
17     FIX mdot;
18     END specify;
19     METHOD values;
20     RUN iapwssat::values;
21 johnpye 1056 T := 373.15 {K};
22 johnpye 1042 mdot := 0.1 {kg/s};
23     END values;
24 johnpye 1055 METHOD bound_self;
25     RUN iapwssat::bound_self;
26 johnpye 1132 (* mdot.lower_bound := 0 {kg/s}; *)
27 johnpye 1055 END bound_self;
28 johnpye 1042 METHOD on_load;
29     RUN bound_self;
30     RUN reset;
31     RUN values;
32     END on_load;
33 johnpye 1043 METHOD self_test;
34     ASSERT mdot == 0.1 {kg/s};
35 johnpye 1056 ASSERT abs(p - 101.418{kPa}) < 0.0005{kPa};
36     ASSERT abs(h - 1547.4616{kJ/kg}) < 0.0005{kJ/kg};
37 johnpye 1043 ASSERT Hdot == h*mdot;
38     END self_test;
39 johnpye 1042 END satsteamstream;

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