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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 225 - (show annotations) (download) (as text)
Fri Jan 27 14:55:43 2006 UTC (14 years, 10 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1502 byte(s)
Added const-ness to 2nd parameter of slv_set_char_parameter.
Implemented setting of int, real and string parameters via PyGTK interface.
1 REQUIRE "johnpye/ideal_steam.a4c";
2 REQUIRE "johnpye/absorber.a4c";
3 REQUIRE "johnpye/surgetank.a4c";
4 REQUIRE "johnpye/condenser.a4c";
5
6
7
8 (*
9 Open-loop model. given the absorber conditions, what pressure is required
10 in the surge tank in order for the mass to be contained ?
11 *)
12 MODEL loop;
13 A IS_A absorber;
14 C IS_A condenser;
15 S IS_A surgetank;
16
17 (* join absorber and condenser *)
18 A.mdot_gas_out, C.mdot_gas_in ARE_THE_SAME;
19 A.S_out, C.S_in ARE_THE_SAME;
20
21 (* join condenser and surge tank *)
22 C.mdot_water_out, S.mdot_water_in ARE_THE_SAME;
23
24 Q_A ALIASES A.Q;
25 Q_C ALIASES C.Q;
26 mdot_A_in ALIASES A.mdot_water_in;
27 mdot_C_out ALIASES C.mdot_water_out;
28
29 m_A ALIASES A.m_water;
30 m_S ALIASES S.m_water;
31
32 m_water IS_A mass;
33
34 m_A + m_S = m_water;
35
36 p_S ALIASES S.p;
37 p_A ALIASES A.p;
38
39 V_water_S ALIASES S.V_water;
40
41 x_exit_A ALIASES A.x_exit;
42
43 (*A.p = S.p;*)
44 (*A.p = 40 {bar};*)
45
46 METHODS
47 METHOD default_self;
48 RUN reset; RUN values;
49 END default_self;
50
51 METHOD specify;
52 FIX A.V_total, A.mdot_water_in;
53 FIX A.Q, A.p;
54
55 FIX C.h_out;
56
57 FIX S.T, S.rho_water;
58 FIX S.V_vessel, S.m_gas;
59
60 FIX m_water;
61 END specify;
62
63 METHOD values;
64 (* fixed *)
65 m_water := 8000 {kg};
66
67 A.V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;
68 A.mdot_water_in := 0.4 {kg/s};
69 A.Q := 1000 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
70 A.p := 20 {bar};
71
72 C.h_out := 400 {kJ/kg};
73
74 S.rho_water := 997 {kg/m^3};
75 S.T := 400 {K};
76 S.V_vessel := 10000 {L};
77 S.m_gas := 40 {kg};
78
79 (* free *)
80 S.p := A.p;
81
82 END values;
83
84 END loop;

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