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

Contents of /trunk/models/johnpye/steam_stream.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 576 - (show annotations) (download) (as text)
Tue May 9 03:42:08 2006 UTC (18 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 645 byte(s)
Changed all cases of *.fixed := {TRUE,FALSE} to 'FIX' and 'FREE' statements.
1 REQUIRE "johnpye/iapws95.a4c";
2
3 (** A simple mass-based stream model *)
4 MODEL steam_stream;
5 S IS_A iapws95_1phase;
6 mdot IS_A mass_rate;
7
8 rho ALIASES S.rho;
9 T ALIASES S.T;
10 p ALIASES S.p;
11 u ALIASES S.u;
12 h ALIASES S.h;
13 s ALIASES S.s;
14 cp ALIASES S.cp;
15 cv ALIASES S.cv;
16 w ALIASES S.w;
17
18 METHODS
19 METHOD default_self;
20 RUN ClearAll;
21 RUN specify;
22 RUN values;
23 END default_self;
24
25 METHOD specify;
26 FIX mdot;
27 RUN S.specify;
28 END specify;
29
30 METHOD values;
31 mdot := 1 {kg/s};
32 RUN S.values;
33 END values;
34
35 METHOD test_ph;
36 RUN ClearAll;
37 FIX mdot; mdot := 0 {kg/s};
38 FIX p; p := 10 {bar};
39 FIX h; h := 419.7 {kJ/kg};
40 END test_ph;
41
42 END steam_stream;

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