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

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

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

revision 288 by johnpye, Mon Feb 6 00:07:58 2006 UTC revision 289 by johnpye, Fri Feb 10 01:11:29 2006 UTC
# Line 147  MODEL condenser_lmtd_sat( Line 147  MODEL condenser_lmtd_sat(
147    
148      z_T_const: S_in.T = Sf.T;      z_T_const: S_in.T = Sf.T;
149    
150      z_q_c: q = mdot_in * (S_in.h - Sf.h);      C_c IS_A heat_capacity;
151        cp_c IS_A specific_heat_capacity;
152        mdot_c IS_A mass_rate;
153        C_c = cp_c * mdot_c;
154        z_Q_h: q = mdot_in * (S_in.h - Sf.h);
155        z_Q_c: q = C_c * (T_co - T_ci);
156    
157  METHODS  METHODS
158  METHOD specify;  METHOD specify;
159      FIX UA;      FIX UA;
160      FIX T_ci;      FIX T_ci;
161      FIX mdot_in;      FIX mdot_in;
162        FIX cp_c;
163  END specify;  END specify;
164  METHOD values;  METHOD values;
165      UA := 4000 {W/m^2/K} * 4 {m} * 900 * 2*3.1415926* (0.01 {m})/2;      UA := 4000 {W/m^2/K} * 4 {m} * 900 * 2*3.1415926* (0.01 {m})/2;
166      T_ci := 273.15{K} + 200 {K};      T_ci := 273.15{K} + 200 {K};
167      mdot_in := 10 {kg/s};      mdot_in := 10 {kg/s};
168        cp_c := 4.2 {kJ/kg/K};
169      (* free values *)      (* free values *)
170      T_co := 273.15{K} + 240 {K};      T_co := 273.15{K} + 240 {K};
171        C_c := 200 {kJ/K};
172        q := 15000 {kW};
173        LMTD := 34 {K};
174  END values;  END values;
175  METHOD bound_self;  METHOD bound_self;
176      Sf.tau.lower_bound := 1;      Sf.tau.lower_bound := 1;
# Line 167  METHOD bound_self; Line 178  METHOD bound_self;
178      DT_1.lower_bound := 0{K};      DT_1.lower_bound := 0{K};
179      DT_2.lower_bound := 0{K};      DT_2.lower_bound := 0{K};
180      Sf.rho.lower_bound := Sf.rhoc;      Sf.rho.lower_bound := Sf.rhoc;
181        mdot_c.upper_bound := 1000 {kg/s};
182        mdot_c.lower_bound := 0.1 {kg/s};
183  END bound_self;  END bound_self;
184  END condenser_lmtd_sat;  END condenser_lmtd_sat;
185    
# Line 191  MODEL condenser_lmtd_sat_test; Line 204  MODEL condenser_lmtd_sat_test;
204      mdot ALIASES C.mdot_in;      mdot ALIASES C.mdot_in;
205    
206      Q ALIASES C.q;      Q ALIASES C.q;
207        C_c ALIASES C.C_c;
208        mdot_c ALIASES C.mdot_c;
209    
210  METHODS  METHODS
211  METHOD default_self;      METHOD default_self;    
# Line 212  METHOD self_test; Line 227  METHOD self_test;
227  END self_test;  END self_test;
228  END condenser_lmtd_sat_test;  END condenser_lmtd_sat_test;
229    
 (*-----------------------------*)  
   
 MODEL condenser;  
     (* assumptions:  
         inlet is ideal-gas steam at specified temperature and pressure.  
         output is water of fixed enthalpy.  
         whatever energy is required to be taken away to acheive that is what will be taken away.  
   
         we don't need to enforce saturation inlet conditions. we will just query the enthalpy for the ideal-gas steam  
         and that's it.  
     *)  
     S_in IS_A ideal_steam;  
   
     mdot_gas_in IS_A mass_rate;  
     mdot_water_out IS_A mass_rate;  
     Q IS_A energy_rate; (* heat taken away by condenser *)  
   
     h_in ALIASES S_in.h;  
     p_in ALIASES S_in.p;  
     T_in ALIASES S_in.T;  
   
     (*  
         h2 will be the enthalpy of the condensed water. because we are  
         ignoring pressure effects, we have to assume a constant fixed  
         value for the enthalpy of water at x=0.  
     *)  
     h_out IS_A specific_enthalpy;  
   
     Q = mdot_gas_in * h_in - mdot_water_out * h_out;  
     mdot_water_out = mdot_gas_in;  
   
     (*  
         we will assume there is NO water in the condenser for now; the  
         surge tank will play the role of the mass holdup in this case.  
     *)  
 METHODS  
 METHOD default_self;  
     RUN reset;  
     RUN values;  
 END default_self;  
 METHOD specify;  
     FIX mdot_gas_in;  
     FIX S_in.p, S_in.T;  
     FIX h_out;  
 END specify;  
 METHOD values;  
     mdot_gas_in := 1 {kg/s};  
     S_in.p := 5 {bar};  
     S_in.T := 473.15 {K};  
     h_out := 400{kJ/kg};  
 END values;  
 END condenser;  

Legend:
Removed from v.288  
changed lines
  Added in v.289

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