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

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

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

revision 2304 by jpye, Sun Aug 1 23:18:55 2010 UTC revision 2305 by jpye, Sun Aug 22 11:22:34 2010 UTC
# Line 28  REQUIRE "johnpye/thermo_types.a4c"; Line 28  REQUIRE "johnpye/thermo_types.a4c";
28  REQUIRE "johnpye/airprops.a4c";  REQUIRE "johnpye/airprops.a4c";
29  IMPORT "sensitivity/solve";  IMPORT "sensitivity/solve";
30    
31    IMPORT "johnpye/extpy/extpy";
32    IMPORT "johnpye/fprops/cycle_plot";
33    
34  (* first some models of air as an ideal gas *)  (* first some models of air as an ideal gas *)
35    
36  MODEL ideal_gas_base;  MODEL ideal_gas_base;
# Line 158  END ideal_air_table; Line 161  END ideal_air_table;
161  (*  (*
162      Thermo properties      Thermo properties
163  *)  *)
164  MODEL state;  MODEL air_state;
165      air IS_A ideal_air_poly;      air IS_A ideal_air_poly;
166      p ALIASES air.p;      p ALIASES air.p;
167      T ALIASES air.T;      T ALIASES air.T;
# Line 182  METHODS Line 185  METHODS
185          RUN default_all;          RUN default_all;
186          FIX p, h;          FIX p, h;
187      END on_load;      END on_load;
188  END state;  END air_state;
189    
190    
191  (* a simple connector that includes calculation of steam properties *)  (* a simple connector that includes calculation of steam properties *)
192  MODEL node;  MODEL air_node;
193      state IS_A state;      state IS_A air_state;
194      p ALIASES state.p;      p ALIASES state.p;
195      h ALIASES state.h;      h ALIASES state.h;
196      v ALIASES state.v;      v ALIASES state.v;
# Line 205  METHODS Line 208  METHODS
208          RUN default; RUN reset; RUN values;          RUN default; RUN reset; RUN values;
209          FIX p,h;          FIX p,h;
210      END on_load;      END on_load;
211  END node;  END air_node;
212    
213  MODEL air_equipment;  MODEL air_equipment;
214      inlet "in: inlet air stream" IS_A node;      inlet "in: inlet air stream" IS_A air_node;
215      outlet "out: outlet air stream" IS_A node;      outlet "out: outlet air stream" IS_A air_node;
216    
217      inlet.mdot, outlet.mdot ARE_THE_SAME;      inlet.mdot, outlet.mdot ARE_THE_SAME;
218      mdot ALIASES inlet.mdot;      mdot ALIASES inlet.mdot;
# Line 224  MODEL compressor REFINES air_equipment; Line 227  MODEL compressor REFINES air_equipment;
227      dp IS_A delta_pressure;      dp IS_A delta_pressure;
228      inlet.p + dp = outlet.p;      inlet.p + dp = outlet.p;
229    
230      outlet_is IS_A state;      outlet_is IS_A air_state;
231      outlet_is.p, outlet.p ARE_THE_SAME;      outlet_is.p, outlet.p ARE_THE_SAME;
232    
233      outlet_is.s, inlet.s ARE_THE_SAME;      outlet_is.s, inlet.s ARE_THE_SAME;
# Line 274  MODEL gas_turbine REFINES air_equipment; Line 277  MODEL gas_turbine REFINES air_equipment;
277      dp IS_A delta_pressure;      dp IS_A delta_pressure;
278      inlet.p + dp = outlet.p;      inlet.p + dp = outlet.p;
279            
280      outlet_is IS_A state;      outlet_is IS_A air_state;
281      outlet_is.p, outlet.p ARE_THE_SAME;      outlet_is.p, outlet.p ARE_THE_SAME;
282      outlet_is.s, inlet.s ARE_THE_SAME;      outlet_is.s, inlet.s ARE_THE_SAME;
283    
# Line 409  MODEL brayton; Line 412  MODEL brayton;
412      BU.outlet, TU.inlet ARE_THE_SAME;      BU.outlet, TU.inlet ARE_THE_SAME;
413      TU.outlet, DI.inlet ARE_THE_SAME;      TU.outlet, DI.inlet ARE_THE_SAME;
414      DI.outlet, CO.inlet ARE_THE_SAME;      DI.outlet, CO.inlet ARE_THE_SAME;
415        braytonpressureratio IS_A positive_factor;
416        braytonpressureratio * CO.inlet.p = TU.outlet.p;
417    
418      Wdot_CO ALIASES CO.Wdot;      Wdot_CO ALIASES CO.Wdot;
419      Wdot_TU ALIASES TU.Wdot;      Wdot_TU ALIASES TU.Wdot;
# Line 430  MODEL brayton; Line 435  MODEL brayton;
435      r_bw IS_A factor;      r_bw IS_A factor;
436      r_bw = -Wdot_CO / Wdot_TU;      r_bw = -Wdot_CO / Wdot_TU;
437    
438      state[1..4] IS_A node;      state[1..4] IS_A air_node;
439      state[1], CO.inlet ARE_THE_SAME;      state[1], CO.inlet ARE_THE_SAME;
440      state[2], BU.inlet ARE_THE_SAME;      state[2], BU.inlet ARE_THE_SAME;
441      state[3], TU.inlet ARE_THE_SAME;      state[3], TU.inlet ARE_THE_SAME;
# Line 465  END brayton; Line 470  END brayton;
470      Assumption: fluid on both sides have the same c_p.      Assumption: fluid on both sides have the same c_p.
471  *)  *)
472  MODEL regenerator REFINES air_equipment;  MODEL regenerator REFINES air_equipment;
473      inlet_hot, outlet_hot IS_A node;      inlet_hot, outlet_hot IS_A air_node;
474            
475      inlet.p, outlet.p ARE_THE_SAME;      inlet.p, outlet.p ARE_THE_SAME;
476      inlet_hot.p, outlet_hot.p ARE_THE_SAME;      inlet_hot.p, outlet_hot.p ARE_THE_SAME;
# Line 555  MODEL brayton_regenerative; Line 560  MODEL brayton_regenerative;
560      eta_TU ALIASES TU.eta;      eta_TU ALIASES TU.eta;
561      eta_CO ALIASES CO.eta;      eta_CO ALIASES CO.eta;
562      epsilon_RE ALIASES RE.epsilon;      epsilon_RE ALIASES RE.epsilon;
563    
564        braytonpressureratio ALIASES CO.r;
565  METHODS  METHODS
566  METHOD on_load;  METHOD on_load;
567      FIX CO.eta, TU.eta;      FIX CO.eta, TU.eta;
568      CO.eta := 0.8;      CO.eta := 0.88;
569      TU.eta := 0.85;      TU.eta := 0.85;
570      FIX CO.inlet.T, TU.inlet.T;      FIX CO.inlet.T, TU.inlet.T;
571      CO.inlet.T := 300 {K};      CO.inlet.T := 300 {K};
572      TU.inlet.T := 1300 {K};      TU.inlet.T := 1300 {K};
573      FIX CO.r;      FIX CO.r;
574      CO.r := 8;      CO.r := 4.5;
575      FIX CO.inlet.p;      FIX CO.inlet.p;
576      CO.inlet.p := 1 {bar};      CO.inlet.p := 1 {bar};
577      FIX CO.inlet.mdot;      FIX CO.inlet.mdot;
# Line 574  METHOD on_load; Line 581  METHOD on_load;
581      FIX RE.epsilon;      FIX RE.epsilon;
582      RE.epsilon := 0.8;      RE.epsilon := 0.8;
583  END on_load;  END on_load;
584    METHOD cycle_plot;
585        EXTERNAL cycle_plot_brayton_regen(SELF);
586    END cycle_plot;
587  END brayton_regenerative;  END brayton_regenerative;
588    
589    

Legend:
Removed from v.2304  
changed lines
  Added in v.2305

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