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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 264 by johnpye, Thu Feb 2 14:10:05 2006 UTC revision 265 by johnpye, Fri Feb 3 04:27:15 2006 UTC
# Line 2  REQUIRE "johnpye/ideal_steam.a4c"; Line 2  REQUIRE "johnpye/ideal_steam.a4c";
2  REQUIRE "johnpye/absorber.a4c";  REQUIRE "johnpye/absorber.a4c";
3  REQUIRE "johnpye/surgetank.a4c";  REQUIRE "johnpye/surgetank.a4c";
4  REQUIRE "johnpye/condenser.a4c";  REQUIRE "johnpye/condenser.a4c";
5    REQUIRE "johnpye/separator.a4c";
6  (*  (*
7      Open-loop model. given the absorber conditions, what pressure is required      Open-loop model. given the absorber conditions, what pressure is required
8      in the surge tank in order for the mass to be contained ?      in the surge tank in order for the mass to be contained ?
9  *)  *)
10  MODEL loop;  MODEL loop;
11        S1 IS_A thermo_state;
12    
13      A IS_A absorber;      A IS_A absorber;
14      C IS_A condenser;      S IS_A separator;
15      S IS_A surgetank;  
16        C IS_A condenser_lmtd_sat(S.S_v, S1); (* in, out *)
17        T IS_A surgetank;
18    
19      (* join absorber and condenser  *)      (* join absorber and condenser  *)
20      A.mdot_gas_out, C.mdot_gas_in ARE_THE_SAME;      A.mdot_gas_out, C.mdot_in ARE_THE_SAME;
21      A.S_out, C.S_in ARE_THE_SAME;      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 *)      (* join condenser and surge tank *)
25      C.mdot_water_out, S.mdot_water_in ARE_THE_SAME;      C.mdot_out, T.mdot_water_in ARE_THE_SAME;
26    
27      Q_A ALIASES A.Q;      Q_A ALIASES A.Q;
28      Q_C ALIASES C.Q;      Q_C ALIASES C.q_fg;
29      mdot_A_in ALIASES A.mdot_water_in;      mdot_A_in ALIASES A.mdot_water_in;
30      mdot_C_out ALIASES C.mdot_water_out;      mdot_C_out ALIASES C.mdot_out;
31            
32      m_A ALIASES A.m_water;      m_A ALIASES A.m_water;
33      m_S ALIASES S.m_water;      m_T ALIASES T.m_water;
34    
35      m_water IS_A mass;      m_water IS_A mass;
36    
37      m_A + m_S = m_water;      m_A + m_T = m_water;
38    
39      p_S ALIASES S.p;      p_T ALIASES T.p;
40      p_A ALIASES A.p;      p_A ALIASES A.p;
41    
42    
43      V_water_S ALIASES S.V_water;      V_water_T ALIASES T.V_water;
44            
45      x_exit_A ALIASES A.x_exit;      x_exit_A ALIASES A.x_exit;
46    
47      A.p = S.p;      (*A.p = T.p;*)
48      (*A.p = 40 {bar};*)      (* A.p = 40 {bar};*)
49    
50  METHODS  METHODS
51  METHOD default_self;  METHOD default_self;
# Line 50  END default_self; Line 55  END default_self;
55  METHOD specify;  METHOD specify;
56      FIX A.V_total, A.mdot_water_in;      FIX A.V_total, A.mdot_water_in;
57      FIX A.Q;      FIX A.Q;
58        FIX A.p;
59    
60      FIX C.h_out;      FIX C.S_out.h;
61    
62      FIX S.T, S.rho_water;      FIX T.T, T.rho_water;
63      FIX S.V_vessel, S.m_gas;      FIX T.V_vessel, T.m_gas;
64    
65      FIX m_water;      FIX m_water;
66  END specify;  END specify;
# Line 66  METHOD values; Line 72  METHOD values;
72      A.V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;      A.V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;
73      A.mdot_water_in := 0.4 {kg/s};      A.mdot_water_in := 0.4 {kg/s};
74      A.Q := 1000 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};      A.Q := 1000 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
75        A.p := 40 {bar};
76    
77      C.h_out := 400 {kJ/kg};      C.S_out.h := 400 {kJ/kg};
78    
79      S.rho_water := 997 {kg/m^3};      T.rho_water := 997 {kg/m^3};
80      S.T := 400 {K};      T.T := 400 {K};
81      S.V_vessel := 10000 {L};      T.V_vessel := 10000 {L};
82      S.m_gas := 40 {kg};      T.m_gas := 40 {kg};
83    
84      (* free *)      (* free *)
85      m_A := 1000 {kg};      m_A := 1000 {kg};
86      m_S := 7000 {kg};      m_T := 7000 {kg};
87            
88  END values;  END values;
89    

Legend:
Removed from v.264  
changed lines
  Added in v.265

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