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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 265 - (show annotations) (download) (as text)
Fri Feb 3 04:27:15 2006 UTC (14 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1662 byte(s)
More progress with loop/condenser. But also a crash, see bug #217
1 REQUIRE "johnpye/ideal_steam.a4c";
2 REQUIRE "johnpye/absorber.a4c";
3 REQUIRE "johnpye/surgetank.a4c";
4 REQUIRE "johnpye/condenser.a4c";
5 REQUIRE "johnpye/separator.a4c";
6 (*
7 Open-loop model. given the absorber conditions, what pressure is required
8 in the surge tank in order for the mass to be contained ?
9 *)
10 MODEL loop;
11 S1 IS_A thermo_state;
12
13 A IS_A absorber;
14 S IS_A separator;
15
16 C IS_A condenser_lmtd_sat(S.S_v, S1); (* in, out *)
17 T IS_A surgetank;
18
19 (* join absorber and condenser *)
20 A.mdot_gas_out, C.mdot_in ARE_THE_SAME;
21 A.S_out, S.S_in ARE_THE_SAME;
22 S.S_v, C.S_in ARE_THE_SAME;
23
24 (* join condenser and surge tank *)
25 C.mdot_out, T.mdot_water_in ARE_THE_SAME;
26
27 Q_A ALIASES A.Q;
28 Q_C ALIASES C.q_fg;
29 mdot_A_in ALIASES A.mdot_water_in;
30 mdot_C_out ALIASES C.mdot_out;
31
32 m_A ALIASES A.m_water;
33 m_T ALIASES T.m_water;
34
35 m_water IS_A mass;
36
37 m_A + m_T = m_water;
38
39 p_T ALIASES T.p;
40 p_A ALIASES A.p;
41
42
43 V_water_T ALIASES T.V_water;
44
45 x_exit_A ALIASES A.x_exit;
46
47 (*A.p = T.p;*)
48 (* A.p = 40 {bar};*)
49
50 METHODS
51 METHOD default_self;
52 RUN reset; RUN values;
53 END default_self;
54
55 METHOD specify;
56 FIX A.V_total, A.mdot_water_in;
57 FIX A.Q;
58 FIX A.p;
59
60 FIX C.S_out.h;
61
62 FIX T.T, T.rho_water;
63 FIX T.V_vessel, T.m_gas;
64
65 FIX m_water;
66 END specify;
67
68 METHOD values;
69 (* fixed *)
70 m_water := 8000 {kg};
71
72 A.V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;
73 A.mdot_water_in := 0.4 {kg/s};
74 A.Q := 1000 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
75 A.p := 40 {bar};
76
77 C.S_out.h := 400 {kJ/kg};
78
79 T.rho_water := 997 {kg/m^3};
80 T.T := 400 {K};
81 T.V_vessel := 10000 {L};
82 T.m_gas := 40 {kg};
83
84 (* free *)
85 m_A := 1000 {kg};
86 m_T := 7000 {kg};
87
88 END values;
89
90 END loop;

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