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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 335 - (hide annotations) (download) (as text)
Tue Feb 28 11:38:33 2006 UTC (18 years, 4 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2284 byte(s)
Messing
1 johnpye 186 REQUIRE "johnpye/absorber.a4c";
2     REQUIRE "johnpye/surgetank.a4c";
3     REQUIRE "johnpye/condenser.a4c";
4 johnpye 265 REQUIRE "johnpye/separator.a4c";
5 johnpye 296 REQUIRE "johnpye/mixer.a4c";
6    
7 johnpye 217 (*
8     Open-loop model. given the absorber conditions, what pressure is required
9     in the surge tank in order for the mass to be contained ?
10     *)
11 johnpye 218 MODEL loop;
12 johnpye 296
13     A IS_A absorber;
14    
15 johnpye 265 S IS_A separator;
16 johnpye 320 A.S_out, S.S_in ARE_THE_SAME;
17     A.mdot_out, S.mdot_in ARE_THE_SAME;
18 johnpye 217
19 johnpye 296 C IS_A condenser_lmtd_sat(S.S_v, S_cond_out); (* in, out *)
20 johnpye 320 S.S_v, C.S_in ARE_THE_SAME;
21     S_cond_out IS_A iapws95_2phase;
22 johnpye 265
23 johnpye 320
24 johnpye 296 M IS_A mixer;
25     M.S_in_1, S.S_l ARE_THE_SAME; (* connect separated liquid to mixer *)
26     M.S_in_2, C.S_out ARE_THE_SAME; (* connect condenser outlet to mixer *)
27 johnpye 293 M.mdot_in_1, S.mdot_l ARE_THE_SAME;
28     M.mdot_in_2, C.mdot_out ARE_THE_SAME;
29    
30 johnpye 320 (* T IS_A surgetank;
31     C.mdot_out, T.mdot_water_in ARE_THE_SAME;
32     S_tank_in IS_A thermo_state; *)
33     (* M.S_out, S_tank_in ARE_THE_SAME; *)(* connect mixed outlet to surge tank *)
34     (* m_T ALIASES T.m_water; *)
35     (* p_T ALIASES T.p; *)
36     (* V_water_T ALIASES T.V_water; *)
37 johnpye 293
38 johnpye 320 m_water IS_A mass;
39     m_A (* + m_T *) = m_water;
40 johnpye 217
41 johnpye 320 (* some aliases, for usability *)
42 johnpye 217
43     Q_A ALIASES A.Q;
44 johnpye 292 Q_C ALIASES C.q;
45 johnpye 217 mdot_A_in ALIASES A.mdot_water_in;
46 johnpye 265 mdot_C_out ALIASES C.mdot_out;
47 johnpye 217
48     m_A ALIASES A.m_water;
49    
50 johnpye 218 p_A ALIASES A.p;
51    
52 johnpye 225 x_exit_A ALIASES A.x_exit;
53 johnpye 218
54 johnpye 265 (*A.p = T.p;*)
55     (* A.p = 40 {bar};*)
56 johnpye 218
57 johnpye 217 METHODS
58     METHOD default_self;
59 johnpye 292 RUN reset; RUN values; RUN bound_self;
60 johnpye 217 END default_self;
61    
62     METHOD specify;
63 johnpye 335 FIX A.V_total (*, A.mdot_water_in*);
64 johnpye 243 FIX A.Q;
65 johnpye 292 FIX A.T;
66 johnpye 218
67 johnpye 292 FIX C.T_ci;
68     FIX C.T_co;
69     FIX C.cp_c;
70 johnpye 217
71 johnpye 320 (* FIX T.rho_water;
72     FIX T.V_vessel, T.m_gas; *)
73 johnpye 218
74 johnpye 335 (* without surgetank, can't... FIX m_water; *)
75 johnpye 217 END specify;
76    
77     METHOD values;
78 johnpye 218 (* fixed *)
79 johnpye 217 m_water := 8000 {kg};
80    
81 johnpye 293 A.V_total := 300{m} * 16 * 1{PI}/4*( 40{mm} )^2;
82 johnpye 218 A.mdot_water_in := 0.4 {kg/s};
83     A.Q := 1000 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
84 johnpye 292 A.T := 500 {K};
85 johnpye 218
86 johnpye 292 C.cp_c := 4.2 {kJ/kg/K};
87     C.T_ci := 473.15 {K};
88     C.T_co := 490.15 {K};
89 johnpye 217
90 johnpye 320 (* T.T := C.T_co;
91 johnpye 265 T.rho_water := 997 {kg/m^3};
92     T.V_vessel := 10000 {L};
93 johnpye 320 T.m_gas := 40 {kg}; *)
94 johnpye 244
95     (* free *)
96     m_A := 1000 {kg};
97 johnpye 320 (* m_T := 7000 {kg}; *)
98 johnpye 292 C.mdot_c := 10 {kg/s};
99 johnpye 218 END values;
100 johnpye 112
101 johnpye 292 METHOD bound_self;
102     RUN C.bound_self;
103 johnpye 335 S_cond_out.h.lower_bound := -500 {kJ/kg}; (* aids convergence *)
104 johnpye 292 END bound_self;
105    
106 johnpye 218 END loop;
107 johnpye 112
108    

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