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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2003 - (hide annotations) (download) (as text)
Fri Mar 13 05:30:00 2009 UTC (11 years, 7 months ago) by jpye
File MIME type: text/x-ascend
File size: 16047 byte(s)
Update to current freesteam.
1 jpye 1663 REQUIRE "atoms.a4l";
2     REQUIRE "johnpye/thermo_types.a4c";
3    
4     IMPORT "freesteam";
5    
6     (* Model of simple Rankine cycle with boiler, turbine, condenser, pump *)
7    
8     (*------------------------------------------------------------------------------
9     BACKGROUND STUFF
10     *)
11    
12     (*
13     Thermo properties -- IAPWS-IF97
14     *)
15     MODEL steam_state;
16     p IS_A pressure;
17     h IS_A specific_enthalpy;
18 jpye 2003
19     T IS_A temperature;
20 jpye 1663 v IS_A specific_volume;
21 jpye 2003 s IS_A specific_entropy;
22 jpye 1663 x IS_A fraction;
23    
24 jpye 2003 props: freesteam_Tvsx_ph(
25 jpye 1663 p,h : INPUT;
26 jpye 2003 T,v,s,x : OUTPUT
27 jpye 1663 );
28     METHODS
29     METHOD default;
30     p := 10{bar};
31     p.nominal := 42 {bar};
32 jpye 2003 h := 2000 {kJ/kg};
33    
34     T := 400 {K};
35 jpye 1663 v.nominal := 10 {L/kg};
36 jpye 2003 s := 4 {kJ/kg/K};
37 jpye 1663 x := 0.8;
38     END default;
39     METHOD solve;
40     EXTERNAL do_solve(SELF);
41     END solve;
42     METHOD on_load;
43     RUN default_all;
44     FIX p, h;
45     END on_load;
46     END steam_state;
47    
48     (* a simple connector that includes calculation of steam properties *)
49     MODEL steam_node;
50     state IS_A steam_state;
51     p ALIASES state.p;
52     h ALIASES state.h;
53     v ALIASES state.v;
54     T ALIASES state.T;
55 jpye 2003 s ALIASES state.s;
56 jpye 1663 x ALIASES state.x;
57     mdot IS_A mass_rate;
58     METHODS
59     METHOD default;
60     mdot.nominal := 2 {kg/s};
61     END default;
62     METHOD solve;
63     EXTERNAL do_solve(SELF);
64     END solve;
65     METHOD on_load;
66     RUN default_all; RUN reset; RUN values;
67     FIX p,h;
68     END on_load;
69     END steam_node;
70    
71     MODEL steam_equipment;
72 jpye 1925 inlet "in: inlet steam stream" IS_A steam_node;
73     outlet "out: outlet steam stream" IS_A steam_node;
74 jpye 1663
75     inlet.mdot, outlet.mdot ARE_THE_SAME;
76     mdot ALIASES inlet.mdot;
77     END steam_equipment;
78    
79     (*------------------------------------------------------------------------------
80     PUMP COMPONENT
81     *)
82    
83     MODEL pump_simple REFINES steam_equipment;
84 jpye 1925 NOTES
85     'block' SELF {Simple model of a pump using isentropic efficiency}
86     END NOTES;
87 jpye 1663
88     dp IS_A delta_pressure;
89     inlet.p + dp = outlet.p;
90    
91     outlet_is IS_A steam_state;
92     outlet_is.p, outlet.p ARE_THE_SAME;
93    
94     outlet_is.s, inlet.s ARE_THE_SAME;
95     eta IS_A fraction;
96    
97 jpye 1676 eta_eq:eta * (inlet.h - outlet.h) = (inlet.h - outlet_is.h);
98 jpye 1663
99     (* work done on the environment, will be negative *)
100     Wdot IS_A energy_rate;
101 jpye 1676 Wdot_eq:Wdot = eta * mdot * (inlet.h - outlet.h);
102 jpye 1663
103 jpye 1667 w IS_A specific_energy;
104 jpye 1676 w_eq:w = eta * (outlet.h - inlet.h);
105 jpye 1667
106 jpye 1800 (*
107     NOTES
108     'inline' inlet {in:}
109     'inline' outlet {out:}
110     END NOTES;
111     *)
112 jpye 1663 END pump_simple;
113     MODEL pump_simple_test REFINES pump_simple;
114     (* no equations here *)
115     METHODS
116     METHOD on_load;
117     FIX inlet.p;
118     FIX inlet.h;
119     FIX outlet.p;
120     FIX eta;
121     FIX mdot;
122    
123     inlet.p := 5 {bar};
124     inlet.h := 400 {kJ/kg};
125     outlet.p := 100 {bar};
126     eta := 0.65;
127     mdot := 900 {t/d};
128     END on_load;
129     END pump_simple_test;
130    
131     (*------------------------------------------------------------------------------
132     TURBINE COMPONENT
133     *)
134    
135     MODEL turbine_simple REFINES steam_equipment;
136 jpye 1925 NOTES
137     'block' SELF {Simple turbine model}
138     END NOTES;
139 jpye 1663
140     dp IS_A delta_pressure;
141     inlet.p + dp = outlet.p;
142    
143     outlet_is IS_A steam_state;
144     outlet_is.p, outlet.p ARE_THE_SAME;
145     outlet_is.s, inlet.s ARE_THE_SAME;
146    
147     eta IS_A fraction;
148 jpye 1676 eta_eq:eta * (inlet.h - outlet_is.h) = (inlet.h - outlet.h);
149 jpye 1663
150     (* work done on the environment, will be positive *)
151     Wdot IS_A energy_rate;
152 jpye 1798 Wedot_eq:Wdot = mdot * (inlet.h - outlet.h);
153 jpye 1663
154 jpye 1667 w IS_A specific_energy;
155 jpye 1676 w_eq:w = inlet.h - outlet.h;
156 jpye 1667
157 jpye 1663 END turbine_simple;
158    
159     MODEL turbine_simple_test REFINES turbine_simple;
160     (* no equations here *)
161     METHODS
162     METHOD on_load;
163     FIX inlet.p;
164     FIX inlet.h;
165     FIX outlet.p;
166     FIX eta;
167     FIX mdot;
168    
169     inlet.p := 100 {bar};
170     inlet.h := 3000 {kJ/kg};
171     outlet.p := 5 {bar};
172     eta := 0.85;
173     mdot := 900 {t/d};
174     END on_load;
175     END turbine_simple_test;
176    
177     (*------------------------------------------------------------------------------
178     BOILER COMPONENT
179     *)
180    
181     (*
182     simple model assumes no pressure drop, but heating losses due to
183     flue gas temperature
184     *)
185     MODEL boiler_simple REFINES steam_equipment;
186 jpye 1925 NOTES
187     'block' SELF {Simple boiler model}
188     END NOTES;
189 jpye 1663
190     inlet.p, outlet.p ARE_THE_SAME;
191     Qdot_fuel IS_A energy_rate;
192     Qdot IS_A energy_rate;
193    
194     Qdot = mdot * (outlet.h - inlet.h);
195    
196     eta IS_A fraction;
197     Qdot = eta * Qdot_fuel;
198     END boiler_simple;
199    
200     MODEL boiler_simple_test REFINES boiler_simple;
201     (* nothing here *)
202     METHODS
203     METHOD on_load;
204     FIX inlet.p;
205     FIX inlet.h;
206     FIX eta;
207     FIX outlet.h;
208     FIX mdot;
209    
210     inlet.p := 100 {bar};
211     inlet.h := 500 {kJ/kg};
212    
213     eta := 0.8;
214     outlet.h := 3000 {kJ/kg};
215     mdot := 900 {t/d};
216     END on_load;
217     END boiler_simple_test;
218    
219     (*------------------------------------------------------------------------------
220     CONDENSER COMPONENT
221     *)
222    
223     (*
224     this is really simple (fluid props permitting): just work out the heat
225     that must be expelled to get the water down to a certain state
226     *)
227     MODEL condenser_simple REFINES steam_equipment;
228 jpye 1925 NOTES
229     'block' SELF {Simple condenser model}
230 jpye 1926 'inline' inlet {in: yahoooo}
231 jpye 1925 END NOTES;
232 jpye 1663
233     inlet.p, outlet.p ARE_THE_SAME;
234     Qdot IS_A energy_rate;
235    
236     Qdot = mdot * (outlet.h - inlet.h);
237    
238     END condenser_simple;
239    
240     MODEL condenser_simple_test REFINES condenser_simple;
241     (* nothing here *)
242     METHODS
243     METHOD on_load;
244     FIX inlet.p, inlet.x;
245     FIX outlet.h;
246     FIX mdot;
247    
248     inlet.p := 5 {bar};
249     inlet.x := 0.95;
250     outlet.h := 500 {kJ/kg};
251     mdot := 900 {t/d};
252     END on_load;
253     END condenser_simple_test;
254    
255     (*------------------------------------------------------------------------------
256 jpye 1664 FEEDWATER HEATER
257     *)
258    
259     (*
260     open heater does not have inlet.mdot==outlet.mdot, so not a refinement
261     of 'steam_equipment'.
262     *)
263     MODEL heater_open;
264 jpye 1925 NOTES
265     'block' SELF {Simple open feedwater heater model}
266     END NOTES;
267 jpye 1664
268 jpye 1925 inlet "in:" IS_A steam_node;
269     inlet_heat "in:" IS_A steam_node;
270     outlet "out:" IS_A steam_node;
271 jpye 1664
272     inlet_heat.p, inlet.p, outlet.p ARE_THE_SAME;
273    
274     (* cons. mass *)
275     cons_mass: inlet.mdot + inlet_heat.mdot = outlet.mdot;
276    
277     (* cons. energy *)
278     cons_en: inlet.mdot * inlet.h + inlet_heat.mdot * inlet_heat.h = outlet.mdot * outlet.h;
279    
280     END heater_open;
281    
282     MODEL heater_open_test REFINES heater_open;
283     (* nothing here *)
284     METHODS
285     METHOD on_load;
286     FIX inlet.p, inlet.h;
287     inlet.p := 40 {bar};
288     inlet.h := 634 {kJ/kg};
289     FIX inlet_heat.h;
290     inlet_heat.h := 2960 {kJ/kg};
291    
292     FIX outlet.mdot;
293     outlet.mdot := 900 {t/d};
294    
295     FIX inlet.mdot;
296     inlet.mdot := 700 {t/d};
297     END on_load;
298     END heater_open_test;
299    
300     (*------------------------------------------------------------------------------
301     TEE PIECE
302     *)
303    
304     (*
305     it's not a car :-)
306     *)
307     MODEL tee;
308 jpye 1925 NOTES
309     'block' SELF {Model of a branching of two flow streams}
310     END NOTES;
311    
312 jpye 1926 inlet "in:" IS_A steam_node;
313     outlet "out:" IS_A steam_node;
314     outlet_branch "out:" IS_A steam_node;
315 jpye 1664
316     inlet.p, outlet.p, outlet_branch.p ARE_THE_SAME;
317     inlet.h, outlet.h, outlet_branch.h ARE_THE_SAME;
318    
319     (* cons. mass *)
320     cons_mass: inlet.mdot = outlet.mdot + outlet_branch.mdot;
321    
322     phi IS_A fraction;
323 jpye 1676 phi_eq: phi * inlet.mdot = outlet_branch.mdot;
324 jpye 1664
325     END tee;
326    
327     (*------------------------------------------------------------------------------
328 jpye 1663 OVERALL CYCLE
329     *)
330    
331 jpye 1664 (*
332     simplest possible rankine cycle
333     *)
334 jpye 1663 MODEL rankine;
335    
336     BO IS_A boiler_simple;
337     TU IS_A turbine_simple;
338     CO IS_A condenser_simple;
339     PU IS_A pump_simple;
340    
341     BO.outlet, TU.inlet ARE_THE_SAME;
342     TU.outlet, CO.inlet ARE_THE_SAME;
343     CO.outlet, PU.inlet ARE_THE_SAME;
344     PU.outlet, BO.inlet ARE_THE_SAME;
345    
346 jpye 1664 Qdot_loss ALIASES CO.Qdot;
347    
348     T_H ALIASES BO.outlet.T;
349     T_C ALIASES CO.outlet.T;
350    
351 jpye 1663 eta IS_A fraction;
352 jpye 1664 eta * (BO.Qdot_fuel - PU.Wdot) = TU.Wdot;
353 jpye 1663
354 jpye 1664 eta_carnot IS_A fraction;
355     eta_carnot = 1 - T_C / T_H;
356    
357 jpye 1663 mdot ALIASES TU.mdot;
358 jpye 1667 x_turb_out ALIASES TU.outlet.x;
359 jpye 1663 METHODS
360 jpye 1667 (* first test case: just some plausible values *)
361     METHOD specify_1;
362     RUN ClearAll;
363 jpye 1663 FIX PU.inlet.p;
364     FIX PU.inlet.h;
365     FIX PU.outlet.p;
366     FIX BO.outlet.h;
367     FIX TU.eta;
368     FIX PU.eta;
369     FIX BO.eta;
370 jpye 1667 FIX mdot;
371     END specify_1;
372     METHOD values_1;
373     PU.inlet.p := 1 {bar};
374     PU.inlet.h := 104.9 {kJ/kg};
375     PU.outlet.p := 250 {bar};
376     BO.outlet.h := 3772 {kJ/kg};
377 jpye 1663 TU.eta := 0.85;
378     PU.eta := 0.65;
379 jpye 1664 BO.eta := 0.9;
380 jpye 1667 mdot := 900 {t/d};
381     END values_1;
382     (*
383     second test case: numbers from Example 2.1, K Weston, 'Energy Conversion',
384     1992, http://www.personal.utulsa.edu/~kenneth-weston/
385     *)
386     METHOD specify;
387     RUN ClearAll;
388     FIX PU.outlet.p;
389     FIX BO.outlet.T;
390     FIX PU.inlet.p;
391     FIX PU.inlet.h;
392     FIX TU.eta;
393     FIX PU.eta;
394     FIX BO.eta;
395 jpye 1663 FIX mdot;
396 jpye 1667 END specify;
397     METHOD values;
398     PU.outlet.p := 2000 {psi};
399     BO.outlet.T := 1460 {R}; BO.outlet.h := 3400 {kJ/kg};
400     PU.inlet.p := 1 {psi};
401     PU.inlet.h := 69.73 {btu/lbm};
402     TU.eta := 1.0;
403     PU.eta := 1.0;
404     BO.eta := 1.0;
405     mdot := 900 {t/d};
406     END values;
407     METHOD on_load;
408     RUN specify;
409     RUN values;
410 jpye 1663 END on_load;
411 jpye 1667 METHOD self_test;
412     (* check the results against those from K Weston's book *)
413     (* note that we have NOT neglected pump work in this case! *)
414     ASSERT abs(eta - 0.4294) < 0.0005;
415     ASSERT abs(eta_carnot - 0.6152) < 0.0005;
416     ASSERT abs(TU.outlet.x - 0.7736) < 0.0005;
417 jpye 1802 ASSERT abs(TU.w - 603.1 {btu/lbm}) < 0.7 {btu/lbm};
418 jpye 1667 END self_test;
419 jpye 1663 END rankine;
420    
421 jpye 1667 (*------------------------------------------------------------------------------
422     REHEAT RANKINE CYCLE
423     *)
424     MODEL rankine_reheat;
425    
426     BO1 IS_A boiler_simple;
427     BO2 IS_A boiler_simple;
428     TU1 IS_A turbine_simple;
429     TU2 IS_A turbine_simple;
430     CO IS_A condenser_simple;
431     PU IS_A pump_simple;
432    
433     BO1.outlet, TU1.inlet ARE_THE_SAME;
434     TU1.outlet, BO2.inlet ARE_THE_SAME;
435     BO2.outlet, TU2.inlet ARE_THE_SAME;
436     TU2.outlet, CO.inlet ARE_THE_SAME;
437     CO.outlet, PU.inlet ARE_THE_SAME;
438     PU.outlet, BO1.inlet ARE_THE_SAME;
439    
440     BO1.eta, BO2.eta ARE_THE_SAME;
441    
442     (* boiler peak temperature is reached for both main and reheat... *)
443     BO1.outlet.T, BO2.outlet.T ARE_THE_SAME;
444    
445     mdot ALIASES PU.mdot;
446    
447     T_H ALIASES BO1.outlet.T;
448     T_C ALIASES CO.outlet.T;
449    
450     eta IS_A fraction;
451     eta * (BO1.Qdot_fuel + BO2.Qdot_fuel - PU.Wdot) = TU1.Wdot + TU2.Wdot;
452    
453     eta_carnot IS_A fraction;
454     eta_carnot = 1 - T_C / T_H;
455    
456     METHODS
457 jpye 1670 (*
458     The on_load scenario reproduces the same calculation from
459     K Weston, op. cit., Example 2.5, p. 51.
460     *)
461 jpye 1667 METHOD on_load;
462     FIX BO1.eta;
463     BO1.eta := 1.0;
464     FIX TU1.eta, TU2.eta;
465     TU1.eta := 1.0;
466     TU2.eta := 1.0;
467     FIX PU.eta;
468     PU.eta := 1.0;
469     FIX PU.inlet.p;
470     PU.inlet.p := 1 {psi};
471     FIX PU.inlet.h;
472     PU.inlet.h := 69.73 {btu/lbm};
473     FIX BO1.outlet.T;
474     BO1.outlet.T := 1460 {R};
475     BO1.outlet.h := 3000 {kJ/kg}; (* guess *)
476 jpye 1670 TU1.outlet.h := 3000 {kJ/kg}; (* guess *)
477 jpye 1667 FIX PU.outlet.p;
478     PU.outlet.p := 2000 {psi};
479     FIX mdot;
480     mdot := 900 {t/d};
481    
482     (* this value here is what defines the intermediate pressure *)
483 jpye 1670 FIX TU1.outlet.T;
484     TU1.outlet.T := 860 {R};
485 jpye 1667
486     TU2.inlet.h := 3000 {kJ/kg}; (* guess *)
487     END on_load;
488 jpye 1669 METHOD self_test;
489     ASSERT abs(eta - 0.443) < 0.0005;
490 jpye 1670 ASSERT abs(TU2.outlet.x - 0.926) < 0.0015;
491     ASSERT abs(TU1.w + TU2.w) - 763.1 {btu/lbm} < 1 {btu/lbm};
492 jpye 1669 END self_test;
493 jpye 1667 END rankine_reheat;
494    
495     (*------------------------------------------------------------------------------
496     REGENERATIVE RANKINE CYCLE
497     *)
498 jpye 1664 (*
499     Add a boiler feedwater heater and two-stage turbine
500     *)
501     MODEL rankine_regen;
502    
503     BO IS_A boiler_simple;
504     TU1 IS_A turbine_simple;
505     BL IS_A tee; (* bleed *)
506     TU2 IS_A turbine_simple;
507     CO IS_A condenser_simple;
508     HE IS_A heater_open;
509     PU1 IS_A pump_simple;
510     PU2 IS_A pump_simple;
511    
512     (* main loop *)
513     BO.outlet, TU1.inlet ARE_THE_SAME;
514     TU1.outlet, BL.inlet ARE_THE_SAME;
515     BL.outlet, TU2.inlet ARE_THE_SAME;
516     TU2.outlet, CO.inlet ARE_THE_SAME;
517     CO.outlet, PU1.inlet ARE_THE_SAME;
518     PU1.outlet, HE.inlet ARE_THE_SAME;
519     HE.outlet, PU2.inlet ARE_THE_SAME;
520     PU2.outlet, BO.inlet ARE_THE_SAME;
521    
522     (* bleed stream *)
523     BL.outlet_branch, HE.inlet_heat ARE_THE_SAME;
524     phi ALIASES BL.phi;
525     p_bleed ALIASES TU1.outlet.p;
526    
527     mdot ALIASES BO.mdot;
528    
529     T_H ALIASES BO.outlet.T;
530     T_C ALIASES CO.outlet.T;
531    
532     eta IS_A fraction;
533 jpye 1676 eta_eq:eta * (BO.Qdot_fuel) = TU1.Wdot + TU2.Wdot + PU1.Wdot + PU2.Wdot;
534 jpye 1664
535 jpye 1671 Wdot_TU1 ALIASES TU1.Wdot;
536     Wdot_TU2 ALIASES TU2.Wdot;
537 jpye 1675 Wdot_PU1 ALIASES PU1.Wdot;
538     Wdot_PU2 ALIASES PU2.Wdot;
539     Qdot_fuel ALIASES BO.Qdot_fuel;
540 jpye 1671
541 jpye 1664 eta_carnot IS_A fraction;
542     eta_carnot = 1 - T_C / T_H;
543    
544 jpye 1675 (* some checking output... *)
545    
546     phi_weston IS_A fraction;
547 jpye 1676 phi_weston_eq:phi_weston * (TU1.outlet.h - PU1.outlet.h) = (PU2.inlet.h - PU1.outlet.h);
548     phi_eq:phi_weston = phi;
549 jpye 1675
550     w_net IS_A specific_energy;
551 jpye 1676 w_net_eq: TU1.mdot * w_net = TU1.mdot * (TU1.inlet.h - TU1.outlet.h) + TU2.mdot * (TU2.inlet.h - TU2.outlet.h);
552 jpye 1675
553     q_a IS_A specific_energy;
554     q_a = TU1.inlet.h - PU2.outlet.h;
555 jpye 1676
556 jpye 1775 Wdot IS_A energy_rate;
557     Wdot = TU1.Wdot + TU2.Wdot + PU1.Wdot + PU2.Wdot;
558    
559 jpye 1676 cons_en: HE.inlet.mdot * HE.inlet.h + HE.inlet_heat.mdot * HE.inlet_heat.h = HE.outlet.mdot * HE.outlet.h;
560    
561 jpye 1664 METHODS
562 jpye 1775 METHOD moran_ex_8_5;
563     (*
564     This is Example 8.5 from Moran and Shapiro, 'Fundamentals of
565     Engineering Thermodynamics', 4th Ed.
566     *)
567 jpye 1667 RUN ClearAll;
568 jpye 1775 (* component efficiencies *)
569     FIX BO.eta; BO.eta := 1.0;
570     FIX TU1.eta; TU1.eta := 0.85;
571     FIX TU2.eta; TU2.eta := 0.85;
572     FIX PU1.eta; PU1.eta := 1.0;
573     FIX PU2.eta; PU2.eta := 1.0;
574     (* turbine conditions *)
575     FIX TU1.inlet.p; TU1.inlet.p := 8. {MPa};
576     FIX TU1.inlet.T; TU1.inlet.T := 480 {K} + 273.15 {K};
577     FIX TU1.outlet.p; TU1.outlet.p := 0.7 {MPa};
578     FIX TU2.outlet.p; TU2.outlet.p := 0.008 {MPa};
579     (* heater conditions *)
580     FIX HE.outlet.p; HE.outlet.p := 0.7 {MPa};
581     FIX HE.outlet.x; HE.outlet.x := 0.001;
582     FIX Wdot; Wdot := 100 {MW};
583     END moran_ex_8_5;
584     METHOD weston_ex_2_6;
585     (*
586     The scenario here is example 2.6 from K Weston (op. cit.), p. 55.
587     *)
588     RUN ClearAll;
589 jpye 1664
590 jpye 1671 (* all ideal components *)
591     FIX BO.eta; BO.eta := 1.0;
592     FIX TU1.eta; TU1.eta := 1.0;
593     FIX TU2.eta; TU2.eta := 1.0;
594 jpye 1664 FIX PU1.eta; PU1.eta := 1.0;
595     FIX PU2.eta; PU2.eta := 1.0;
596    
597 jpye 1671 (* mass flow rate is arbitrary *)
598 jpye 1664 FIX mdot;
599 jpye 1675 mdot := 10 {kg/s};
600 jpye 1671
601     (* max pressure constraint *)
602 jpye 1664 FIX PU2.outlet.p;
603 jpye 1671 PU2.outlet.p := 2000 {psi};
604     PU2.outlet.h := 1400 {btu/lbm}; (* guess *)
605 jpye 1664
606 jpye 1671 (* boiler max temp *)
607     FIX BO.outlet.T;
608     BO.outlet.T := 1460 {R};
609     BO.outlet.h := 1400 {btu/lbm}; (* guess *)
610 jpye 1663
611 jpye 1671 (* intermediate temperature setting *)
612 jpye 1675 FIX TU1.outlet.p;
613     TU1.outlet.p := 200 {psi};
614     (* FIX TU1.outlet.T;
615 jpye 1671 TU1.outlet.T := 860 {R}; (* 400 °F *)
616 jpye 1675 TU1.outlet.h := 3000 {kJ/kg}; (* guess *) *)
617 jpye 1663
618 jpye 1671 (* minimum pressure constraint *)
619     FIX CO.outlet.p;
620     CO.outlet.p := 1 {psi};
621 jpye 1663
622 jpye 1671 (* condenser outlet is saturated liquid *)
623 jpye 1664 FIX CO.outlet.h;
624 jpye 1671 CO.outlet.h := 69.73 {btu/lbm};
625 jpye 1664
626 jpye 1671 (* remove the redundant balance equations *)
627 jpye 1676 HE.cons_mass.included := TRUE;
628     HE.cons_en.included := TRUE;
629     BL.cons_mass.included := FALSE;
630     phi_weston_eq.included := TRUE;
631     phi_eq.included := FALSE;
632     cons_en.included := FALSE;
633 jpye 1671
634     (* fix the bleed ratio *)
635     FIX BL.phi;
636 jpye 1675 BL.phi := 0.251;
637    
638     (* FIX BL.outlet.h;
639     BL.outlet.h := 355.5 {btu/lbm}; *)
640 jpye 1663
641 jpye 1775 END weston_ex_2_6;
642 jpye 1675 METHOD self_test;
643     ASSERT abs(TU1.inlet.s - 1.5603 {btu/lbm/R}) < 0.01 {btu/lbm/R};
644     ASSERT abs(TU1.outlet.s - 1.5603 {btu/lbm/R}) < 0.01 {btu/lbm/R};
645     ASSERT abs(TU2.outlet.s - 1.5603 {btu/lbm/R}) < 0.01 {btu/lbm/R};
646     ASSERT abs(PU1.inlet.s - 0.1326 {btu/lbm/R}) < 0.001 {btu/lbm/R};
647     ASSERT abs(PU1.outlet.s - 0.1326 {btu/lbm/R}) < 0.002 {btu/lbm/R};
648     ASSERT abs(PU2.inlet.s - 0.5438 {btu/lbm/R}) < 0.002 {btu/lbm/R};
649     ASSERT abs(PU2.outlet.s - 0.5438 {btu/lbm/R}) < 0.002 {btu/lbm/R};
650    
651     ASSERT abs(TU1.inlet.h - 1474.1 {btu/lbm}) < 1.5 {btu/lbm};
652     ASSERT abs(TU1.outlet.h - 1210.0 {btu/lbm}) < 1.5 {btu/lbm};
653     ASSERT abs(TU2.outlet.h - 871.0 {btu/lbm}) < 1.5 {btu/lbm};
654     ASSERT abs(PU1.inlet.h - 69.73 {btu/lbm}) < 0.001 {btu/lbm};
655     ASSERT abs(PU1.outlet.h - 69.73 {btu/lbm}) < 1.0 {btu/lbm};
656     ASSERT abs(PU2.inlet.h - 355.5 {btu/lbm}) < 1.5 {btu/lbm};
657     ASSERT abs(PU2.outlet.h - 355.5 {btu/lbm}) < 8 {btu/lbm};
658    
659     ASSERT abs(w_net - 518.1 {btu/lbm}) < 0.3 {btu/lbm};
660    
661     ASSERT abs(w_net * mdot - (TU1.Wdot + TU2.Wdot)) < 1 {W};
662    
663     ASSERT abs(q_a - 1118.6 {btu/lbm}) < 7 {btu/lbm};
664    
665     ASSERT abs(eta - 0.463) < 0.003;
666 jpye 1676
667     ASSERT abs(phi - 0.251) < 0.001;
668 jpye 1675 END self_test;
669 jpye 1667 END rankine_regen;
670 jpye 1664
671 jpye 1667 MODEL rankine_compare;
672     simple IS_A rankine;
673     regen IS_A rankine_regen;
674     simple.BO.inlet.p, regen.BO.inlet.p ARE_THE_SAME;
675     simple.BO.inlet.h, regen.BO.inlet.h ARE_THE_SAME;
676     simple.BO.Qdot_fuel, regen.BO.Qdot_fuel ARE_THE_SAME;
677     simple.CO.outlet.T, regen.CO.outlet.T ARE_THE_SAME;
678     simple.BO.eta, regen.BO.eta ARE_THE_SAME;
679     simple.TU.eta, regen.TU1.eta, regen.TU2.eta ARE_THE_SAME;
680     simple.PU.eta, regen.PU1.eta, regen.PU2.eta ARE_THE_SAME;
681     simple.mdot, regen.mdot ARE_THE_SAME;
682     METHODS
683     METHOD on_load;
684     RUN ClearAll;
685     RUN regen.on_load;
686     END on_load;
687     END rankine_compare;
688 jpye 1664
689    

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