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

Contents of /trunk/models/johnpye/heater.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: 679 byte(s)
Moved some solver error messages to FPRINTF(ASCERR) convention.
Trying to get IAPWS-95 to work two-phase.
1 REQUIRE "johnpye/steam_equipment.a4c";
2
3 (** An abstract model for a steam equipment item *)
4
5 MODEL heater REFINES steam_equipment;
6
7 Qdot IS_A energy_rate;
8
9 (* first law of thermo *)
10 ((out.mdot*out.h) - (in.mdot*in.h)) = Qdot;
11
12 (* no mass holdup *)
13 out.mdot, in.mdot ARE_THE_SAME;
14 out.p, in.p ARE_THE_SAME;
15 METHODS
16 METHOD default_self;
17 RUN ClearAll;
18 RUN specify;
19 RUN values;
20 END default_self;
21
22 METHOD specify;
23 in.p.fixed := TRUE;
24 in.h.fixed := TRUE;
25 Qdot.fixed := TRUE;
26 END specify;
27
28 METHOD values;
29 (* fixed values *)
30 in.p := 1 {bar};
31 in.h := 2500 {kJ/kg};
32 Qdot := 1 {kW};
33 (* initial guesses *)
34 out.h := 2600 {kJ/kg};
35 out.p := 1 {bar};
36 END values;
37
38 END heater;

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