1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: boiler.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: caldeira |
---|
7 | *--------------------------------------------------------------------*# |
---|
8 | |
---|
9 | #*------------------------------------------------------------------- |
---|
10 | * |
---|
11 | * Versao 2.2 |
---|
12 | * Data: 03/2016 |
---|
13 | * Autores: Anderson R. A. Lino e Gabriel C. Fonseca |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | *Descricao: modelo da caldeira que sera empregada na biorrefinaria |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | |
---|
19 | *-------------------------------------------------------------------- |
---|
20 | *Hipoteses assumidas: 1 - equilibrio termico |
---|
21 | * 2 - equilibrio mecanico |
---|
22 | * 3 - geracao somente de CO2 e H2O |
---|
23 | *-------------------------------------------------------------------- |
---|
24 | |
---|
25 | *-------------------------------------------------------------------- |
---|
26 | *Notas: Foram feitos 2 flowsheets para averiguar os modelos |
---|
27 | *--------------------------------------------------------------------*# |
---|
28 | |
---|
29 | using "main_stream"; |
---|
30 | using "water_stream"; |
---|
31 | using "energy_stream"; |
---|
32 | using "assumptions"; |
---|
33 | |
---|
34 | Model boiler |
---|
35 | |
---|
36 | ATTRIBUTES |
---|
37 | Pallete = true; |
---|
38 | Icon = "icon/boiler"; |
---|
39 | Brief = "Simplified Boiler Model"; |
---|
40 | Info = |
---|
41 | "== GENERAL == |
---|
42 | Modeling of a boiler based on a stoichiometric approach. |
---|
43 | The conversion of the reactions should be specified based on the |
---|
44 | liminting compound. Also, the limiting compound should have a |
---|
45 | stoichiometric coefficient equal to minus one. The model also |
---|
46 | regards some process variables such as the excess of air, the |
---|
47 | lower and the higher heating values, the boiler efficiency related |
---|
48 | to both of them, the specific steam production and the heat lost to |
---|
49 | the surroundings (based on the higher heating value). |
---|
50 | |
---|
51 | Note that the higher heating value (HHV) is defined here as the heat |
---|
52 | of combustion at 298.15 K, as defined by the American Petroleum |
---|
53 | Institute. The lower heating value (LHV), on the other hand, is |
---|
54 | defined here as commonly used in the sugar and ethanol industry. This |
---|
55 | definition assumes that all combustion products (water and carbon |
---|
56 | dioxide) are present as gases at 298.15 K. It is impontant to note |
---|
57 | that this definition considers not only the water produced by the |
---|
58 | combustion but also the one present in the inlet streams (Fuel and |
---|
59 | Air streams). |
---|
60 | |
---|
61 | == ASSUMPTIONS == |
---|
62 | * All three-phases can be involved; |
---|
63 | * Steady-state; |
---|
64 | * Only carbon dioxide and water are produced in the combustion. |
---|
65 | |
---|
66 | == SPECIFY == |
---|
67 | * The Fuel and Air stream; |
---|
68 | flow rate |
---|
69 | temperature |
---|
70 | pressure |
---|
71 | stream composition; |
---|
72 | * The water steam stream: |
---|
73 | temperature |
---|
74 | pressure; |
---|
75 | * Conversion for each reaction based on the limiting compound; |
---|
76 | * Temperature of the outlet steam; |
---|
77 | * The boiler HHV or LHV efficiency; |
---|
78 | * The excess of air; |
---|
79 | * The pressure drop in the water/steam side; |
---|
80 | * The fraction of heat that is lost to the surroundings. |
---|
81 | |
---|
82 | == SET == |
---|
83 | * Number of stream components(Ncomp/NcompS); |
---|
84 | * Phase of the stream feed; |
---|
85 | * Number of reactions; |
---|
86 | * Stoichiometric matrix; |
---|
87 | * Limiting compound for each reaction; |
---|
88 | * Heat of reaction; |
---|
89 | * The position in the compound vector of the water (NWater) and |
---|
90 | the oxygen (NO2). |
---|
91 | |
---|
92 | == ADITIONAL INFORMATION == |
---|
93 | * Specific steam production (based on inlet fuel mass); |
---|
94 | * Dry and wet higher heating values; |
---|
95 | * Lower heating value; |
---|
96 | * Air humidity; |
---|
97 | * Boiler efficiency (based on both HHV and LHV). |
---|
98 | "; |
---|
99 | |
---|
100 | #*------------------------------------------------------------------- |
---|
101 | #Parametros |
---|
102 | *--------------------------------------------------------------------*# |
---|
103 | |
---|
104 | PARAMETERS |
---|
105 | |
---|
106 | propterm as Plugin (Brief = "IAPWS 97 properties of water",Type = "water"); |
---|
107 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
108 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
109 | outer NComp as Integer (Brief = "Number Of Chemical Components"); |
---|
110 | outer NCompS as Integer (Brief = "Number Of Chemical Components for the Solid Phase"); |
---|
111 | NReac as Integer (Brief = "Number Of Reactions", Default = 1); |
---|
112 | stoic(NComp + NCompS, NReac) as Real (Brief = "Stoichiometric Matrix, Matrix Size = NComp+NCompS, NReac"); |
---|
113 | limit(NReac) as Integer (Brief = "Limiting Component Index Number, Vector Size = NReac", Lower = 1); |
---|
114 | h(NReac) as heat_reaction (Brief = "Molar Heat of Reaction Based on Limiting Component, Vector Size = NReac"); |
---|
115 | M(NComp) as molweight (Brief = "Component Mol Weight", Protected=true); |
---|
116 | MS(NCompS) as molweight (Brief = "Component Mol Weight", Protected=true); |
---|
117 | outer flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
118 | |
---|
119 | #*------------------------------------------------------------------- |
---|
120 | * Define o valor dos parametros declarados no modelo |
---|
121 | *--------------------------------------------------------------------*# |
---|
122 | |
---|
123 | SET |
---|
124 | |
---|
125 | M = PP.MolecularWeight(); |
---|
126 | MS = PPS.MolecularWeight(); |
---|
127 | |
---|
128 | #*------------------------------------------------------------------- |
---|
129 | * Declaracao de variaveis |
---|
130 | *--------------------------------------------------------------------*# |
---|
131 | |
---|
132 | VARIABLES |
---|
133 | in Fuel as main_stream (Brief = "Inlet Mass Flow", PosX=0, PosY=0.65, Symbol="_{Fuel}", Protected = false); |
---|
134 | in Air as main_stream (Brief = "Inlet Air Flow", PosX=0, PosY=0.5, Symbol="_{Air}", Protected = false); |
---|
135 | in Water as water_stream (Brief = "Inlet Water Mass Flow", PosX=0, PosY=0.02, Symbol="_{Water}", Protected = false); |
---|
136 | in Inlet_q as heat_stream (Brief = "Imported Energy", PosX=0, PosY=0.81, Protected =true,Symbol="_{in}"); |
---|
137 | out Steam as water_stream_vapfrac (Brief = "Vapour Outlet Flow", PosX=0.833, PosY=0.0, Symbol="_{Steam}", Protected = false); |
---|
138 | out Gas as main_stream_eq (Brief = "Outlet Gas", PosX=0.95, PosY=0, Symbol="_{Gas}", Protected = false); |
---|
139 | out Ash as main_stream_eq (Brief = "Outlet Ash", PosX=1, PosY=0.5, Symbol="_{Ash}", Protected = false); |
---|
140 | |
---|
141 | FGas as flow_mol (Brief = "Stoichiometric Oxygen Molar Flow", Hidden = true, Symbol = "F_{stoichGas}"); |
---|
142 | zGas(NComp) as fraction (Brief = "Stoichiometric Oxygen Molar Fraction, Vector Size = NComp", Hidden = true, Symbol = "z_{stoichGas}"); |
---|
143 | F as flow_mol (Brief = "Total Inlet Stream Flow", Hidden = true); |
---|
144 | z(NComp + NCompS) as fraction (Brief = "Total Inlet Composition, Vector Size = NComp+NCompS", Hidden = true); |
---|
145 | Pdrop as press_delta (Brief = "Pressure Drop in the Water/Steam Side", Symbol = "\Delta P"); |
---|
146 | T as temperature (Brief = "Outlet Steam Temperature"); |
---|
147 | Efficiency_HHV as fraction (Brief = "Heat Transfer Efficiency (Higher Heating Value)", Symbol = "\eta_{HHV}"); |
---|
148 | Efficiency_LHV as fraction (Brief = "Heat Transfer Efficiency (Lower Heating Value)", Symbol = "\eta_{LHV}"); |
---|
149 | q_losses as heat_rate (Brief = "Heat Losses", Symbol = "q_{loss}"); |
---|
150 | f_losses as fraction (Brief = "Heat Fraction Losses", Symbol = "f_{loss}"); |
---|
151 | q_ex as heat_rate (Brief = "Heat Exchanged", Symbol = "q_{ex}"); |
---|
152 | q_HHV as heat_rate (Brief = "Higher Heating Value (Heat)", Symbol = "q_{HHV}", Hidden = true); |
---|
153 | q_LHV as heat_rate (Brief = "Lower Heating Value (Heat)", Symbol = "q_{LHV}", Hidden = true); |
---|
154 | q_comb as heat_rate (Brief = "Heat of Combustion at the Operational Temperature", Symbol = "q_{comb}", Hidden = true); |
---|
155 | v_specific as Real (Brief = "Specific Production of Kilogram of Steam/Kilogram of Wet Bagasse", Symbol = "v_{specific}", Unit = 'kg/kg', Protected = true); |
---|
156 | HHV_dry as Real (Brief = "Higher Heating Value - Dry Basis", Symbol = "HHV_{dry}", Default=500, Lower=-1e8, Upper=1e8, final Unit = 'kJ/kg'); |
---|
157 | HHV_wet as Real (Brief = "Higher Heating Value - Wet Basis", Symbol = "HHV_{wet}", Default=500, Lower=-1e8, Upper=1e8, final Unit = 'kJ/kg'); |
---|
158 | LHV as Real (Brief = "Lower Heating Value - Wet Basis", Default=500, Lower=-1e8, Upper=1e8, final Unit = 'kJ/kg'); |
---|
159 | r(NComp + NCompS, NReac) as Real (Brief = "Ratio between component (i) production/consumption for the limiting component, Matrix Size = NComp+NCompS, NReac"); |
---|
160 | conv(NReac) as fraction (Brief = "Reaction Conversion Based on Limiting Component, Vector Size = NReac"); |
---|
161 | Ex_Air as fraction (Brief = "Excess Air fraction", Symbol = "Ex_{Air}"); |
---|
162 | humidity as fraction (Brief = "Fraction of Water in Air", Protected = true); |
---|
163 | h_gas as enth_mol (Brief = "Molar Enthalpy of Gas", Symbol = "h_{gas}", Hidden = true); |
---|
164 | h_ash as enth_mol (Brief = "Molar Enthalpy of Ash", Symbol = "h_{ash}", Hidden = true); |
---|
165 | h_air as enth_mol (Brief = "Molar Enthalpy of Air", Symbol = "h_{air}", Hidden = true); |
---|
166 | h_bag_sol as enth_mol (Brief = "Molar Enthalpy of Bagasse (Solid)", Symbol = "h_{bagsol}", Hidden = true); |
---|
167 | h_bag_fluid as enth_mol (Brief = "Molar Enthalpy of Bagasse (Fluid)",Symbol = "h_{bagfluid}", Hidden = true); |
---|
168 | x_gas_1(NComp) as fraction (Brief = "Fraction of Liquids in Gas", Symbol = "x_{gas1}", Hidden = true); |
---|
169 | y_gas_1(NComp) as fraction (Brief = "Fraction of Vapour in Gas", Symbol = "y_{gas1}", Hidden = true); |
---|
170 | v_gas_1 as fraction (Brief = "Fraction of Vapour in Mixture_Gas", Symbol = "v_{gas1}", Hidden = true); |
---|
171 | x_gas_2(NComp) as fraction (Brief = "Fraction of Liquids in Gas", Symbol = "x_{gas2}", Hidden = true); |
---|
172 | y_gas_2(NComp) as fraction (Brief = "Fraction of Vapour in Gas", Symbol = "y_{gas2}", Hidden = true); |
---|
173 | v_gas_2 as fraction (Brief = "Fraction of Vapour in Mixture_Gas", Symbol = "v_{gas2}", Hidden = true); |
---|
174 | x_air_1(NComp) as fraction (Brief = "Fraction of Liquids in Air", Symbol = "x_{air1}", Hidden = true); |
---|
175 | y_air_1(NComp) as fraction (Brief = "Fraction of Vapour in Air", Symbol = "y_{air1}", Hidden = true); |
---|
176 | v_air_1 as fraction (Brief = "Fraction of Vapour in Mixture_Air", Symbol = "v_{air1}", Hidden = true); |
---|
177 | x_air_2(NComp) as fraction (Brief = "Fraction of Liquids in Air", Symbol = "x_{air2}", Hidden = true); |
---|
178 | y_air_2(NComp) as fraction (Brief = "Fraction of Vapour in Air", Symbol = "y_{air2}", Hidden = true); |
---|
179 | v_air_2 as fraction (Brief = "Fraction of Vapour in Mixture_Air", Symbol = "v_{air2}", Hidden = true); |
---|
180 | |
---|
181 | SET |
---|
182 | Gas.Phase = "Vapour"; |
---|
183 | Ash.Phase = "Vapour"; |
---|
184 | |
---|
185 | #*------------------------------------------------------------------- |
---|
186 | * Equacoes do modelo |
---|
187 | *--------------------------------------------------------------------*# |
---|
188 | |
---|
189 | EQUATIONS |
---|
190 | |
---|
191 | "Global Molar Balance for Water/Steam Side" |
---|
192 | Water.Fw = Steam.Fw; |
---|
193 | |
---|
194 | "Steam Outlet Temperature" |
---|
195 | Steam.T = T; |
---|
196 | |
---|
197 | "Thermal Equilibrium Fuel Side" |
---|
198 | Gas.T = Ash.T; |
---|
199 | |
---|
200 | "Mechanical Equilibrium Water/Steam Side" |
---|
201 | Steam.P = Water.P - Pdrop; |
---|
202 | |
---|
203 | "Mechanical Equilibrium Fuel Side 1, array = [Air.P, Fuel.P]" |
---|
204 | Gas.P = min([Air.P, Fuel.P]); |
---|
205 | |
---|
206 | "Mechanical Equilibrium Fuel Side 2" |
---|
207 | Gas.P = Ash.P; |
---|
208 | |
---|
209 | "Enthalpy of Steam , array = [Steam.S, Steam.H]" |
---|
210 | [Steam.S, Steam.H] = propterm.propPTv(Steam.P, Steam.T); |
---|
211 | |
---|
212 | "Heat Exchanged" |
---|
213 | (Steam.H - Water.H) * Water.Fw = q_ex + Inlet_q.Q; |
---|
214 | |
---|
215 | "Ratio between component (i) production/consumption for the limiting component" |
---|
216 | r(1:NComp+NCompS,:) = stoic(1:NComp+NCompS,:) * conv * z(limit); |
---|
217 | |
---|
218 | if (NReac equal 1) then |
---|
219 | "Component Molar Balance (Fluid Phase)" |
---|
220 | Gas.Fluid.F * Gas.Fluid.z(1:NComp) = Fuel.Fluid.F * Fuel.Fluid.z(1:NComp) + Air.Fluid.F * Air.Fluid.z(1:NComp) + F * r(1:NComp,1); |
---|
221 | |
---|
222 | "Component Molar Balance (Stoichiometric oxygen)" |
---|
223 | FGas * zGas(1:NComp) = Fuel.Fluid.F * Fuel.Fluid.z(1:NComp) + Air.Fluid.F *Air.Fluid.z(1:NComp) / (1+Ex_Air) + F * r(1:NComp,1); |
---|
224 | |
---|
225 | "Component Molar Balance (Solid Phase)" |
---|
226 | Ash.Solid.F * Ash.Solid.z(1:NCompS) = Fuel.Solid.F * Fuel.Solid.z(1:NCompS) + Air.Solid.F * Air.Solid.z(1:NCompS) + F * r(NComp+1:NComp+NCompS,1); |
---|
227 | else |
---|
228 | "Component Molar Balance (Fluid Phase)" |
---|
229 | Gas.Fluid.F * Gas.Fluid.z(1:NComp) = Fuel.Fluid.F * Fuel.Fluid.z(1:NComp) + Air.Fluid.F * Air.Fluid.z(1:NComp) + F * sumt(r(1:NComp,:)); |
---|
230 | |
---|
231 | "Component Molar Balance (Stoichiometric oxygen)" |
---|
232 | FGas * zGas(1:NComp) = Fuel.Fluid.F * Fuel.Fluid.z(1:NComp) + Air.Fluid.F * Air.Fluid.z(1:NComp) / (1+Ex_Air) + F * sumt(r(1:NComp,:)); |
---|
233 | |
---|
234 | "Component Molar Balance (Solid Phase)" |
---|
235 | Ash.Solid.F * Ash.Solid.z(1:NCompS) = Fuel.Solid.F * Fuel.Solid.z(1:NCompS) + Air.Solid.F * Air.Solid.z(1:NCompS) + F * sumt(r(NComp+1:NComp+NCompS, :)); |
---|
236 | end |
---|
237 | |
---|
238 | "Sum of Molar Fractions for the Outlet Gas" |
---|
239 | sum(Gas.Fluid.z) = 1; |
---|
240 | |
---|
241 | "Sum of Molar Fractions for the Outlet Ash" |
---|
242 | sum(Ash.Solid.z) = 1; |
---|
243 | |
---|
244 | "Sum of Molar Fractions (Stoichiometric oxygen)" |
---|
245 | sum(zGas) = 1; |
---|
246 | |
---|
247 | "Stoichiometric oxygen" |
---|
248 | zGas(flu.O2) = 0; |
---|
249 | |
---|
250 | "Molar Enthalpy of Gas at 298.15 K" |
---|
251 | [v_gas_1, x_gas_1, y_gas_1] = PP.Flash(298.15 * 'K', 1 * 'atm', Gas.Fluid.z); |
---|
252 | |
---|
253 | "Molar Enthalpy of Gas at Outlet Gas Temperature" |
---|
254 | [v_gas_2, x_gas_2, y_gas_2] = PP.Flash(Gas.T, Gas.P, Gas.Fluid.z); |
---|
255 | |
---|
256 | "Molar Enthalpy Delta for the Gas Between 298.15 K and the Outlet Gas Temperature" |
---|
257 | h_gas = (v_gas_2 * PP.VapourEnthalpy(Gas.T, Gas.P, y_gas_2) + (1 - v_gas_2) * PP.LiquidEnthalpy(Gas.T, Gas.P, x_gas_2)) |
---|
258 | - (v_gas_1 * PP.VapourEnthalpy(298.15 * 'K', 1 * 'atm', y_gas_1) + (1 - v_gas_1) * PP.LiquidEnthalpy(298.15 * 'K', 1 * 'atm', x_gas_1)) |
---|
259 | ; |
---|
260 | |
---|
261 | "Molar Enthalpy of Air at 298.15 K" |
---|
262 | [v_air_1, x_air_1, y_air_1] = PP.Flash(298.15 * 'K', 1 * 'atm', Air.Fluid.z); |
---|
263 | |
---|
264 | "Molar Enthalpy of Gas at Inlet Air Temperature" |
---|
265 | [v_air_2, x_air_2, y_air_2] = PP.Flash(Air.T, Air.P, Air.Fluid.z); |
---|
266 | |
---|
267 | "Molar Enthalpy Delta for the Air Between 298.15 K and the Inlet Air Temperature" |
---|
268 | h_air = (v_air_1 * PP.VapourEnthalpy(298.15 * 'K', 1 * 'atm', y_air_1) + (1 - v_air_1) * PP.LiquidEnthalpy(298.15 * 'K', 1 * 'atm', x_air_1)) |
---|
269 | - (v_air_2 * PP.VapourEnthalpy(Air.T, Air.P, y_air_2) + (1 - v_air_2) * PP.LiquidEnthalpy(Air.T, Air.P, x_air_2)) |
---|
270 | ; |
---|
271 | |
---|
272 | "Molar Enthalpy Delta for the Ash Between 298.15 K and the Outlet Ash Temperature" |
---|
273 | h_ash = PPS.VapourEnthalpy(Ash.T, Ash.P, Ash.Solid.z) - PPS.VapourEnthalpy(298.15 * 'K', Ash.P, Ash.Solid.z); |
---|
274 | |
---|
275 | "Molar Enthalpy Delta for the Fuel Between 298.15 K and the Inlet Fuel Temperature (Solid Phase)" |
---|
276 | h_bag_sol = PPS.VapourEnthalpy(298.15 * 'K', Fuel.P, Fuel.Solid.z) - PPS.VapourEnthalpy(Fuel.T, Fuel.P, Fuel.Solid.z); |
---|
277 | |
---|
278 | "Molar Enthalpy Delta for the Fuel Between 298.15 K and the Inlet Fuel Temperature (Fluid Phase)" |
---|
279 | h_bag_fluid = PP.LiquidEnthalpy(298.15 * 'K', Fuel.P, Fuel.Fluid.z) - PP.LiquidEnthalpy(Fuel.T, Fuel.P, Fuel.Fluid.z); |
---|
280 | |
---|
281 | "Energy Balance" |
---|
282 | q_comb = q_ex + q_losses; |
---|
283 | |
---|
284 | "Heat Losses" |
---|
285 | q_losses = q_HHV * f_losses; |
---|
286 | |
---|
287 | "Heat of Combustion at the Operational Temperature" |
---|
288 | -q_comb = Air.Fluid.F * h_air + Fuel.Solid.F * h_bag_sol + F * sum(h *conv * z(limit)) + Fuel.Fluid.F * h_bag_fluid |
---|
289 | + Gas.Fluid.F * h_gas + Ash.Solid.F * h_ash; |
---|
290 | |
---|
291 | "Higher Heating Value (Heat)" |
---|
292 | -q_HHV = F * sum(h *conv * z(limit)); |
---|
293 | |
---|
294 | "Lower Heating Value (Heat)" |
---|
295 | #q_LHV = q_HHV - (Outlet_Gas.F * Outlet_Gas.z(1) * M(1) - Inlet_Mass.F * Inlet_Mass.z(1) * M(1)) * 2464.67 * 'kJ/kg';#(API) |
---|
296 | #q_LHV = q_HHV - Outlet_Gas.F * Outlet_Gas.z(1) * M(1) * 2464.67 * 'kJ/kg'; #(calor de vaporizacao a 15.15 graus celsius) |
---|
297 | q_LHV = q_HHV - Gas.Fluid.Fw * Gas.Fluid.zw(flu.Water) * 2442.1 * 'kJ/kg'; #(calor de vaporizacao a 25 graus celsius) |
---|
298 | |
---|
299 | "Higher Heating Value - Wet Basis" |
---|
300 | HHV_wet * Fuel.Total.Fw = q_HHV; |
---|
301 | |
---|
302 | "Higher Heating Value - Dry Basis" |
---|
303 | HHV_dry * (Fuel.Total.Fw - Fuel.Fluid.Fw * Fuel.Fluid.z(flu.Water))= q_HHV; |
---|
304 | |
---|
305 | "Lower Heating Value - Wet Basis" |
---|
306 | LHV * Fuel.Total.Fw = q_LHV; |
---|
307 | |
---|
308 | "Specific Production of Steam" |
---|
309 | v_specific * Fuel.Total.Fw = Steam.Fw; |
---|
310 | |
---|
311 | "Heat Transfer Efficiency (Lower Heating Value)" |
---|
312 | Efficiency_LHV * q_LHV = q_ex; |
---|
313 | |
---|
314 | "Heat Transfer Efficiency (Higher Heating Value)" |
---|
315 | Efficiency_HHV * q_HHV = q_ex; |
---|
316 | |
---|
317 | "Air Humidity" |
---|
318 | humidity * (Air.Fluid.Fw - Air.Fluid.Fw * Air.Fluid.zw(flu.Water)) = Air.Fluid.Fw * Air.Fluid.zw(flu.Water); |
---|
319 | |
---|
320 | "Total Inlet Composition (Fluid Phase)" |
---|
321 | F * z(1:NComp) = Fuel.Fluid.F * Fuel.Fluid.z + Air.Fluid.F * Air.Fluid.z; |
---|
322 | |
---|
323 | "Total Inlet Composition (Solid Phase)" |
---|
324 | F * z(NComp + 1: NComp + NCompS) = Fuel.Solid.F * Fuel.Solid.z + Air.Solid.F * Air.Solid.z; |
---|
325 | |
---|
326 | "Total Inlet Stream Flow" |
---|
327 | F = Fuel.Fluid.F + Fuel.Solid.F + Air.Fluid.F + Air.Solid.F; |
---|
328 | |
---|
329 | "Outlet Composition (Fluid Phase)" |
---|
330 | Gas.Fluid.z = Ash.Fluid.z; |
---|
331 | |
---|
332 | "Outlet Composition (Solid Phase)" |
---|
333 | Gas.Solid.z = Ash.Solid.z; |
---|
334 | |
---|
335 | "Solids in Gas Outlet" |
---|
336 | Gas.Solid.F = 1e-6 * 'kmol/h'; |
---|
337 | |
---|
338 | "Gases in Solid Outlet" |
---|
339 | Ash.Fluid.F = 1e-6 * 'kmol/h'; |
---|
340 | |
---|
341 | end |
---|
342 | |
---|
343 | |
---|
344 | FlowSheet teste_boiler |
---|
345 | |
---|
346 | #*------------------------------------------------------------------- |
---|
347 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
348 | *--------------------------------------------------------------------*# |
---|
349 | |
---|
350 | DEVICES |
---|
351 | S101 as main_sourceR; |
---|
352 | S102 as water_sourceR; |
---|
353 | S103 as main_sourceR; |
---|
354 | B101 as boiler; |
---|
355 | E101 as heat_sourceR; |
---|
356 | |
---|
357 | #*------------------------------------------------------------------- |
---|
358 | * Especifica as conexoes entre os modelos |
---|
359 | *--------------------------------------------------------------------*# |
---|
360 | |
---|
361 | CONNECTIONS |
---|
362 | S103.Outlet to B101.Air; |
---|
363 | S101.Outlet to B101.Fuel; |
---|
364 | S102.Outlet to B101.Water; |
---|
365 | E101.Outlet_q to B101.Inlet_q; |
---|
366 | |
---|
367 | #*------------------------------------------------------------------- |
---|
368 | * Define o valor dos parametros declarados no modelo |
---|
369 | *--------------------------------------------------------------------*# |
---|
370 | |
---|
371 | SET |
---|
372 | S101.ValidPhases = "Liquid-Only"; |
---|
373 | S102.ValidPhases = "Liquid-Only"; |
---|
374 | S103.ValidPhases = "Vapour-Only"; |
---|
375 | NComp = PP.NumberOfComponents(); |
---|
376 | NCompS = PPS.NumberOfComponents(); |
---|
377 | B101.NReac = 3; |
---|
378 | |
---|
379 | B101.stoic (:,1) = [5, 0, 0, 0, 0, 6, 0, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0]; # Reaction 1:cellulose(C6H10O5) + 6O2 --> 5H2O + 6CO2 |
---|
380 | B101.stoic (:,2) = [4, 0, 0, 0, 0, 5, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0]; # Reaction 2:hemicellulose(C5H8O4) + 5O2 --> 4H2O + 5CO2 |
---|
381 | B101.stoic (:,3) = [5.8, 0, 0, 0, 0, 10, 0, -10.95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0]; # Reaction 3:lignina(C10H11.6O3.9) + 10.95O2 --> 5.8H2O + 10CO2 |
---|
382 | B101.h = [-2575, -1954, -4401] * 'kJ/mol'; |
---|
383 | B101.limit = [NComp+sol.Cellulose,NComp+sol.Hemicell, NComp+sol.Lignin]; |
---|
384 | |
---|
385 | |
---|
386 | #*------------------------------------------------------------------- |
---|
387 | * Especifica variaveis definidas no modelo |
---|
388 | *--------------------------------------------------------------------*# |
---|
389 | |
---|
390 | SPECIFY |
---|
391 | S101.Fluid.Fw = 50000 * 'kg/h'; |
---|
392 | S101.Solid.Fw = 50000 * 'kg/h'; |
---|
393 | S101.T = 338.15 * 'K'; |
---|
394 | S101.P = 1 * 'atm'; |
---|
395 | S101.CompositionOfSolid = [0.4385, 0.2564, 0.233, 0.0285, 0, 0, 0, 0.043, 0]; |
---|
396 | S101.CompositionOfFluid = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
397 | |
---|
398 | S102.T = 383.15 * 'K'; |
---|
399 | S102.P = 67 * 'bar'; |
---|
400 | |
---|
401 | S103.Solid.F = 1e-6 * 'kmol/h'; |
---|
402 | S103.T = 303.15 * 'K'; |
---|
403 | S103.P = 1 * 'atm'; |
---|
404 | S103.CompositionOfSolid = [0.25, 0.20, 0.55, 0, 0, 0, 0, 0, 0]; |
---|
405 | S103.CompositionOfFluid = [0.013, 0, 0, 0, 0, 0, 0, 0.31, 0.677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];#(massico-ar umido) |
---|
406 | |
---|
407 | B101.Efficiency_LHV = 0.85; |
---|
408 | B101.Gas.T = 423.15 * 'K'; #150C |
---|
409 | B101.T = 763.15 * 'K'; |
---|
410 | B101.Pdrop = 0 * 'bar'; |
---|
411 | B101.conv = [1, 1, 1]; |
---|
412 | B101.Ex_Air = 0.5; |
---|
413 | B101.Inlet_q.Q = 0 * 'kW'; |
---|
414 | |
---|
415 | #*------------------------------------------------------------------- |
---|
416 | #Parametros |
---|
417 | *--------------------------------------------------------------------*# |
---|
418 | |
---|
419 | PARAMETERS |
---|
420 | PP as Plugin (Brief = "External Physical Properties", |
---|
421 | Type="PP", |
---|
422 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
423 | ); |
---|
424 | PPS as Plugin (Brief = "External Physical Properties", |
---|
425 | Type="PP", |
---|
426 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
427 | ); |
---|
428 | |
---|
429 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
430 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
431 | flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
432 | sol as ConstituentSolid(Symbol = " ", Protected = true); |
---|
433 | #*------------------------------------------------------------------- |
---|
434 | * Define o valor dos parametros declarados no modelo |
---|
435 | *--------------------------------------------------------------------*# |
---|
436 | |
---|
437 | SET |
---|
438 | NComp = PP.NumberOfComponents(); |
---|
439 | NCompS = PPS.NumberOfComponents(); |
---|
440 | S101.CompositionBasis = "Mass"; |
---|
441 | S103.CompositionBasis = "Mass"; |
---|
442 | |
---|
443 | #*------------------------------------------------------------------- |
---|
444 | * Condicoes iniciais e opcoes de Solver |
---|
445 | *--------------------------------------------------------------------*# |
---|
446 | |
---|
447 | OPTIONS |
---|
448 | Dynamic = false; |
---|
449 | Integration = "original"; |
---|
450 | NLASolver( |
---|
451 | File = "sundials", |
---|
452 | RelativeAccuracy = 1e-3, |
---|
453 | AbsoluteAccuracy = 1e-6, |
---|
454 | MaxIterations = 100 |
---|
455 | ); |
---|
456 | DAESolver( |
---|
457 | File = "dassl", |
---|
458 | RelativeAccuracy = 1e-3, |
---|
459 | AbsoluteAccuracy = 1e-6, |
---|
460 | EventAccuracy = 1e-2 |
---|
461 | ); |
---|
462 | end |
---|
463 | |
---|