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

Contents of /trunk/models/johnpye/combinedcycle.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2210 - (show annotations) (download) (as text)
Mon May 31 08:16:27 2010 UTC (14 years ago) by jpye
File MIME type: text/x-ascend
File size: 4736 byte(s)
Fixed problem with moran_9_13 model, solves OK now although not exactly matching M&S values.
1 (* ASCEND modelling environment
2 Copyright (C) 2010 Carnegie Mellon University
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
18 *)(*
19 This file contains a model of a combined-cycle power station, with
20 a gas turbine (Brayton) cycle running as the 'topping' cycle and a steam
21 turbine (Rankine) cycle running as the 'bottoming' cycle. Initially the
22 model is being based on Example 9.13 from Moran & Shapiro, 'Fundamentals of
23 Engineering Thermodynamics', 4th Ed, Wiley, 2000.
24
25 See also Example 10-9 from the book Çengel & Boles
26 'Thermodynamcs: An Engineering Approach, 6th Ed, McGraw-Hill, 2008.
27
28 At the current revision (12 Apr 2010), this model seems to be working OK.
29 The Cengel model needs convopt=RELNOM_SCALE with the QRSlv solver. The
30 Moran example just works.
31
32 TODO: add exergy accounting to the model.
33
34 Author: John Pye
35 *)
36
37 REQUIRE "johnpye/rankine.a4c";
38 REQUIRE "johnpye/brayton.a4c";
39
40 MODEL air_steam_heat_exchanger REFINES air_equipment;
41 inlet_cold, outlet_cold IS_A steam_node;
42
43 inlet.p, outlet.p ARE_THE_SAME;
44 inlet_cold.p, outlet_cold.p ARE_THE_SAME;
45
46 inlet_cold.mdot, outlet_cold.mdot ARE_THE_SAME;
47 mdot_cold ALIASES inlet_cold.mdot;
48
49 (* we don't have epsilon worked out or specified here, so the heat exchanged
50 will depend on values specified outside this model. *)
51
52 Qdot IS_A energy_rate;
53 outlet.h = inlet.h + Qdot/inlet.mdot;
54 outlet_cold.h = inlet_cold.h - Qdot/inlet_cold.mdot;
55 END air_steam_heat_exchanger;
56
57 MODEL combinedcycle;
58 (* define the blocks *)
59 GC IS_A compressor;
60 BU IS_A combustor;
61 GT IS_A gas_turbine;
62 HE IS_A air_steam_heat_exchanger;
63 DI IS_A dissipator;
64 TU IS_A turbine_simple;
65 CO IS_A condenser_simple;
66 PU IS_A pump_simple;
67
68 (* wire up the model *)
69 GC.outlet, BU.inlet ARE_THE_SAME;
70 BU.outlet, GT.inlet ARE_THE_SAME;
71 GT.outlet, HE.inlet ARE_THE_SAME;
72 HE.outlet, DI.inlet ARE_THE_SAME;
73 DI.outlet, GC.inlet ARE_THE_SAME;
74
75 HE.outlet_cold, TU.inlet ARE_THE_SAME;
76 TU.outlet, CO.inlet ARE_THE_SAME;
77 CO.outlet, PU.inlet ARE_THE_SAME;
78 PU.outlet, HE.inlet_cold ARE_THE_SAME;
79
80 Wdot, Wdot_gas, Wdot_vap IS_A energy_rate;
81 Wdot_gas = GC.Wdot + GT.Wdot;
82 Wdot_vap = TU.Wdot + PU.Wdot;
83 Wdot = Wdot_gas + Wdot_vap;
84
85 Qdot_H ALIASES BU.Qdot;
86
87 eta IS_A fraction;
88 eta = Wdot / Qdot_H;
89
90 massflowratio IS_A factor;
91 massflowratio = TU.mdot / GT.mdot;
92
93 braytonpressureratio IS_A positive_factor;
94 braytonpressureratio * GC.inlet.p = GC.outlet.p;
95
96 METHODS
97 METHOD on_load;
98 RUN cengel_ex_10_9;
99 SOLVER QRSlv;
100 OPTION convopt 'RELNOM_SCALE';
101 END on_load;
102
103 METHOD moran_ex_9_13;
104 RUN ClearAll;
105 FIX Wdot; Wdot := 45 {MW};
106
107 FIX GC.inlet.T, GC.inlet.p;
108 GC.inlet.T := 300 {K};
109 GC.inlet.p := 100 {kPa};
110
111 FIX GC.outlet.p;
112 GC.outlet.p := 1200 {kPa};
113
114 FIX GC.eta; GC.eta := 0.84;
115
116 FIX BU.outlet.T; BU.outlet.T := 1400 {K};
117
118 FIX GT.eta; GT.eta := 0.88;
119
120 (* GT.outlet.p := 100 {kPa};*)
121 FIX HE.outlet.T; HE.outlet.T := 400 {K};
122
123 FIX TU.inlet.T, TU.inlet.p;
124 TU.inlet.T := 400 {K} + 273.15 {K};
125 TU.inlet.p := 8 {MPa};
126 FIX TU.outlet.p; TU.outlet.p := 8 {kPa};
127
128 FIX PU.inlet.x;
129 PU.inlet.x := 0.0001;
130
131 FIX TU.eta; TU.eta := 0.90;
132 FIX PU.eta; PU.eta := 0.8;
133
134 HE.outlet_cold.h := 3000 {kJ/kg};
135
136 (* assumed *)
137 FIX BU.eta;
138 BU.eta := 1;
139
140 (* starting guess, for easy solving *)
141 HE.outlet_cold.h := 3000 {kJ/kg};
142 END moran_ex_9_13;
143
144 METHOD cengel_ex_10_9;
145 RUN ClearAll;
146 FIX Wdot; Wdot := 100 {MW};
147
148 FIX GC.inlet.p; GC.inlet.p := 1 {atm}; (* assumed *)
149
150 FIX braytonpressureratio; braytonpressureratio := 8;
151
152 FIX GC.inlet.T; GC.inlet.T := 300 {K};
153 FIX GT.inlet.T; GT.inlet.T := 1300 {K};
154
155 FIX GC.eta; GC.eta := 0.8;
156 FIX GT.eta; GT.eta := 0.85;
157
158 FIX TU.inlet.p; TU.inlet.p := 7 {MPa};
159 FIX CO.outlet.p; CO.outlet.p := 5 {kPa};
160
161 FIX TU.inlet.T; TU.inlet.T := 500 {K} + 273.15 {K};
162 FIX DI.inlet.T; DI.inlet.T := 450 {K};
163
164 (* 'complete' condensation... bit of a hack *)
165 FIX CO.outlet.x; CO.outlet.x := 0.0001;
166
167 (* 'simple ideal Rankine cycle *)
168 FIX TU.eta; TU.eta := 1;
169 FIX BU.eta; BU.eta := 1;
170 FIX PU.eta; PU.eta := 1;
171
172 (* first guess, for easy solving *)
173 HE.outlet_cold.h := 3000 {kJ/kg};
174 END cengel_ex_10_9;
175
176 END combinedcycle;

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