/[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 108 - (show annotations) (download) (as text)
Tue Dec 13 05:53:20 2005 UTC (14 years, 7 months ago) by johnpye
File MIME type: text/x-ascend
File size: 685 byte(s)
Moved some solver error messages to FPRINTF(ASCERR) convention.
Trying to get IAPWS-95 to work two-phase.
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 mdot.fixed := TRUE;
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 mdot.fixed := TRUE; mdot := 0 {kg/s};
38 p.fixed := TRUE; p := 10 {bar};
39 h.fixed := TRUE; 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