1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: mixer_and_splitter_m.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: misturador e splitter |
---|
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 do misturador e do splitter de correntes |
---|
17 | *que serao empregados na biorrefinaria |
---|
18 | *-------------------------------------------------------------------- |
---|
19 | |
---|
20 | *-------------------------------------------------------------------- |
---|
21 | *Notas: Foram feitos 4 flowsheets para averiguar o modelo. |
---|
22 | *As siglas R, L, U, D sao indicativos da posisao da corrente de saida |
---|
23 | *sendo R=right, L=legth, U=up e D=down |
---|
24 | *--------------------------------------------------------------------*# |
---|
25 | |
---|
26 | using "main_stream"; |
---|
27 | |
---|
28 | Model mixer_mR |
---|
29 | |
---|
30 | ATTRIBUTES |
---|
31 | Pallete = true; |
---|
32 | Icon = "icon/currentR"; |
---|
33 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is unknown"; |
---|
34 | Info = |
---|
35 | "== ASSUMPTIONS == |
---|
36 | * Static; |
---|
37 | * Adiabatic. |
---|
38 | |
---|
39 | == SPEFICY == |
---|
40 | * The inlet streams: |
---|
41 | flow rate |
---|
42 | temperature |
---|
43 | pressure |
---|
44 | stream composition. |
---|
45 | |
---|
46 | == SET == |
---|
47 | * Number of stream components(Ncomp/NcompS); |
---|
48 | "; |
---|
49 | |
---|
50 | #*------------------------------------------------------------------- |
---|
51 | * Declaracao de variaveis |
---|
52 | *--------------------------------------------------------------------*# |
---|
53 | |
---|
54 | VARIABLES |
---|
55 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.08, Symbol="_{inlet1}", Protected = false); |
---|
56 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.92, Symbol="_{inlet2}", Protected = false); |
---|
57 | out Outlet as main_stream_PH (Brief = "Outlet Stream", PosX=1.0, PosY=0.50, Symbol="_{outlet}"); |
---|
58 | |
---|
59 | #*------------------------------------------------------------------- |
---|
60 | #Parametros |
---|
61 | *--------------------------------------------------------------------*# |
---|
62 | |
---|
63 | PARAMETERS |
---|
64 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
65 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
66 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
67 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
68 | |
---|
69 | |
---|
70 | #*------------------------------------------------------------------- |
---|
71 | * Equacoes do modelo |
---|
72 | *--------------------------------------------------------------------*# |
---|
73 | |
---|
74 | EQUATIONS |
---|
75 | |
---|
76 | "Global Molar Balance (Fluid Phase)" |
---|
77 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
78 | |
---|
79 | "Global Molar Balance (Solid Phase)" |
---|
80 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
81 | |
---|
82 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
83 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
84 | |
---|
85 | "Component Molar Balance (Fluid Phase)" |
---|
86 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
87 | |
---|
88 | if Outlet.Solid.F equal 0*'mol/s' then |
---|
89 | "Composition Outlet.Solid.z" |
---|
90 | Outlet.Solid.z(1) = 1; |
---|
91 | Outlet.Solid.z(2:NCompS) = 0; |
---|
92 | else |
---|
93 | "Component Molar Balance (Solid Phase)" |
---|
94 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
95 | end |
---|
96 | |
---|
97 | "Energy Balance" |
---|
98 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
99 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
100 | |
---|
101 | end |
---|
102 | |
---|
103 | Model mixer_mL |
---|
104 | |
---|
105 | ATTRIBUTES |
---|
106 | Pallete = true; |
---|
107 | Icon = "icon/currentR"; |
---|
108 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is unknown"; |
---|
109 | Info = |
---|
110 | "== ASSUMPTIONS == |
---|
111 | * Static; |
---|
112 | * Adiabatic. |
---|
113 | |
---|
114 | == SPEFICY == |
---|
115 | * The inlet streams: |
---|
116 | flow rate |
---|
117 | temperature |
---|
118 | pressure |
---|
119 | stream composition. |
---|
120 | |
---|
121 | == SET == |
---|
122 | * Number of stream components(Ncomp/NcompS); |
---|
123 | "; |
---|
124 | |
---|
125 | #*------------------------------------------------------------------- |
---|
126 | * Declaracao de variaveis |
---|
127 | *--------------------------------------------------------------------*# |
---|
128 | |
---|
129 | VARIABLES |
---|
130 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=1.0, PosY=0.08, Symbol="_{inlet1}", Protected = false); |
---|
131 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=1.0, PosY=0.92, Symbol="_{inlet2}", Protected = false); |
---|
132 | out Outlet as main_stream_PH (Brief = "Outlet Stream",PosX=0.0, PosY=0.50, Symbol="_{outlet}"); |
---|
133 | |
---|
134 | #*------------------------------------------------------------------- |
---|
135 | #Parametros |
---|
136 | *--------------------------------------------------------------------*# |
---|
137 | |
---|
138 | PARAMETERS |
---|
139 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
140 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
141 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
142 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
143 | |
---|
144 | #*------------------------------------------------------------------- |
---|
145 | * Equacoes do modelo |
---|
146 | *--------------------------------------------------------------------*# |
---|
147 | |
---|
148 | EQUATIONS |
---|
149 | |
---|
150 | "Global Molar Balance (Fluid Phase)" |
---|
151 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
152 | |
---|
153 | "Global Molar Balance (Solid Phase)" |
---|
154 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
155 | |
---|
156 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
157 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
158 | |
---|
159 | "Component Molar Balance (Fluid Phase)" |
---|
160 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
161 | |
---|
162 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
163 | "Composition Outlet.Solid.z" |
---|
164 | Outlet.Solid.z(1) = 1; |
---|
165 | Outlet.Solid.z(2:NCompS) = 0; |
---|
166 | else |
---|
167 | "Component Molar Balance (Solid Phase)" |
---|
168 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
169 | end |
---|
170 | |
---|
171 | "Energy Balance" |
---|
172 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
173 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
174 | |
---|
175 | end |
---|
176 | |
---|
177 | Model mixer_mU |
---|
178 | |
---|
179 | ATTRIBUTES |
---|
180 | Pallete = true; |
---|
181 | Icon = "icon/currentR"; |
---|
182 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is unknown"; |
---|
183 | Info = |
---|
184 | "== ASSUMPTIONS == |
---|
185 | * Static; |
---|
186 | * Adiabatic. |
---|
187 | |
---|
188 | == SPEFICY == |
---|
189 | * The inlet streams |
---|
190 | *The inlet streams: |
---|
191 | flow rate |
---|
192 | temperature |
---|
193 | pressure |
---|
194 | stream composition. |
---|
195 | |
---|
196 | == SET == |
---|
197 | * Number of stream components(Ncomp/NcompS); |
---|
198 | "; |
---|
199 | |
---|
200 | #*------------------------------------------------------------------- |
---|
201 | * Declaracao de variaveis |
---|
202 | *--------------------------------------------------------------------*# |
---|
203 | |
---|
204 | VARIABLES |
---|
205 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.08, PosY=1.0, Symbol="_{inlet1}", Protected = false); |
---|
206 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.92, PosY=1.0, Symbol="_{inlet2}", Protected = false); |
---|
207 | out Outlet as main_stream_PH (Brief = "Outlet Stream", PosX=0.5, PosY=0.0, Symbol="_{outlet}"); |
---|
208 | |
---|
209 | #*------------------------------------------------------------------- |
---|
210 | #Parametros |
---|
211 | *--------------------------------------------------------------------*# |
---|
212 | |
---|
213 | PARAMETERS |
---|
214 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
215 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
216 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
217 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
218 | |
---|
219 | #*------------------------------------------------------------------- |
---|
220 | * Equacoes do modelo |
---|
221 | *--------------------------------------------------------------------*# |
---|
222 | |
---|
223 | EQUATIONS |
---|
224 | |
---|
225 | "Global Molar Balance (Fluid Phase)" |
---|
226 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
227 | |
---|
228 | "Global Molar Balance (Solid Phase)" |
---|
229 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
230 | |
---|
231 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
232 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
233 | |
---|
234 | "Component Molar Balance (Fluid Phase)" |
---|
235 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
236 | |
---|
237 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
238 | "Composition Outlet.Solid.z" |
---|
239 | Outlet.Solid.z(1) = 1; |
---|
240 | Outlet.Solid.z(2:NCompS) = 0; |
---|
241 | else |
---|
242 | "Component Molar Balance (Solid Phase)" |
---|
243 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
244 | end |
---|
245 | |
---|
246 | "Energy Balance" |
---|
247 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
248 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
249 | |
---|
250 | end |
---|
251 | |
---|
252 | Model mixer_mD |
---|
253 | |
---|
254 | ATTRIBUTES |
---|
255 | Pallete = true; |
---|
256 | Icon = "icon/currentR"; |
---|
257 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is unknown"; |
---|
258 | Info = |
---|
259 | "== ASSUMPTIONS == |
---|
260 | * Static; |
---|
261 | * Adiabatic. |
---|
262 | |
---|
263 | == SPEFICY == |
---|
264 | * The inlet streams |
---|
265 | * The inlet streams: |
---|
266 | flow rate |
---|
267 | temperature |
---|
268 | pressure |
---|
269 | stream composition. |
---|
270 | |
---|
271 | == SET == |
---|
272 | * Number of stream components(Ncomp/NcompS); |
---|
273 | "; |
---|
274 | |
---|
275 | #*------------------------------------------------------------------- |
---|
276 | * Declaracao de variaveis |
---|
277 | *--------------------------------------------------------------------*# |
---|
278 | |
---|
279 | VARIABLES |
---|
280 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.08, PosY=0.0, Symbol="_{inlet1}", Protected = false); |
---|
281 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.92, PosY=0.0, Symbol="_{inlet2}", Protected = false); |
---|
282 | out Outlet as main_stream_PH (Brief = "Outlet Stream", PosX=0.5, PosY=1.0, Symbol="_{outlet}"); |
---|
283 | |
---|
284 | #*------------------------------------------------------------------- |
---|
285 | #Parametros |
---|
286 | *--------------------------------------------------------------------*# |
---|
287 | |
---|
288 | PARAMETERS |
---|
289 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
290 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
291 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
292 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
293 | |
---|
294 | #*------------------------------------------------------------------- |
---|
295 | * Equacoes do modelo |
---|
296 | *--------------------------------------------------------------------*# |
---|
297 | |
---|
298 | EQUATIONS |
---|
299 | |
---|
300 | "Global Molar Balance (Fluid Phase)" |
---|
301 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
302 | |
---|
303 | "Global Molar Balance (Solid Phase)" |
---|
304 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
305 | |
---|
306 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
307 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
308 | |
---|
309 | "Component Molar Balance (Fluid Phase)" |
---|
310 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
311 | |
---|
312 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
313 | "Composition Outlet.Solid.z" |
---|
314 | Outlet.Solid.z(1) = 1; |
---|
315 | Outlet.Solid.z(2:NCompS) = 0; |
---|
316 | else |
---|
317 | "Component Molar Balance (Solid Phase)" |
---|
318 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
319 | end |
---|
320 | |
---|
321 | "Energy Balance" |
---|
322 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
323 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
324 | |
---|
325 | end |
---|
326 | |
---|
327 | Model mixer2_mR |
---|
328 | |
---|
329 | ATTRIBUTES |
---|
330 | Pallete = true; |
---|
331 | Icon = "icon/currentR"; |
---|
332 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is known"; |
---|
333 | Info = |
---|
334 | "== ASSUMPTIONS == |
---|
335 | * Static; |
---|
336 | * Adiabatic. |
---|
337 | |
---|
338 | == SPEFICY == |
---|
339 | * The inlet streams: |
---|
340 | flow rate |
---|
341 | temperature |
---|
342 | pressure |
---|
343 | stream composition. |
---|
344 | fraction of liquid |
---|
345 | fraction of solid |
---|
346 | fraction of vapour |
---|
347 | enthalpy ?????? |
---|
348 | |
---|
349 | == SET == |
---|
350 | * Number of stream components(Ncomp/NcompS); |
---|
351 | "; |
---|
352 | |
---|
353 | #*------------------------------------------------------------------- |
---|
354 | * Declaracao de variaveis |
---|
355 | *--------------------------------------------------------------------*# |
---|
356 | |
---|
357 | VARIABLES |
---|
358 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.08, Symbol="_{inlet1}", Protected = false); |
---|
359 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.92, Symbol="_{inlet2}", Protected = false); |
---|
360 | out Outlet as main_stream_eq (Brief = "Outlet Stream", PosX=1.0, PosY=0.50, Symbol="_{outlet}"); |
---|
361 | |
---|
362 | #*------------------------------------------------------------------- |
---|
363 | #Parametros |
---|
364 | *--------------------------------------------------------------------*# |
---|
365 | |
---|
366 | PARAMETERS |
---|
367 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
368 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
369 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
370 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
371 | |
---|
372 | |
---|
373 | #*------------------------------------------------------------------- |
---|
374 | * Equacoes do modelo |
---|
375 | *--------------------------------------------------------------------*# |
---|
376 | |
---|
377 | EQUATIONS |
---|
378 | |
---|
379 | "Global Molar Balance (Fluid Phase)" |
---|
380 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
381 | |
---|
382 | "Global Molar Balance (Solid Phase)" |
---|
383 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
384 | |
---|
385 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
386 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
387 | |
---|
388 | "Component Molar Balance (Fluid Phase)" |
---|
389 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
390 | |
---|
391 | if Outlet.Solid.F equal 0*'mol/s' then |
---|
392 | "Composition Outlet.Solid.z" |
---|
393 | Outlet.Solid.z(1) = 1; |
---|
394 | Outlet.Solid.z(2:NCompS) = 0; |
---|
395 | else |
---|
396 | "Component Molar Balance (Solid Phase)" |
---|
397 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
398 | end |
---|
399 | |
---|
400 | "Energy Balance" |
---|
401 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
402 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
403 | |
---|
404 | end |
---|
405 | |
---|
406 | Model mixer2_mL |
---|
407 | |
---|
408 | ATTRIBUTES |
---|
409 | Pallete = true; |
---|
410 | Icon = "icon/currentR"; |
---|
411 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is known"; |
---|
412 | Info = |
---|
413 | "== ASSUMPTIONS == |
---|
414 | * Static; |
---|
415 | * Adiabatic. |
---|
416 | |
---|
417 | == SPEFICY == |
---|
418 | * The inlet streams |
---|
419 | flow rate |
---|
420 | temperature |
---|
421 | pressure |
---|
422 | stream composition. |
---|
423 | fraction of liquid |
---|
424 | fraction of solid |
---|
425 | fraction of vapour |
---|
426 | enthalpy ?????? |
---|
427 | |
---|
428 | == SET == |
---|
429 | * Number of stream components(Ncomp/NcompS); |
---|
430 | "; |
---|
431 | |
---|
432 | |
---|
433 | #*------------------------------------------------------------------- |
---|
434 | * Declaracao de variaveis |
---|
435 | *--------------------------------------------------------------------*# |
---|
436 | |
---|
437 | VARIABLES |
---|
438 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=1.0, PosY=0.08, Symbol="_{inlet1}", Protected = false); |
---|
439 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=1.0, PosY=0.92, Symbol="_{inlet2}", Protected = false); |
---|
440 | out Outlet as main_stream_eq (Brief = "Outlet Stream",PosX=0.0, PosY=0.50, Symbol="_{outlet}"); |
---|
441 | |
---|
442 | #*------------------------------------------------------------------- |
---|
443 | #Parametros |
---|
444 | *--------------------------------------------------------------------*# |
---|
445 | |
---|
446 | PARAMETERS |
---|
447 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
448 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
449 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
450 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
451 | |
---|
452 | #*------------------------------------------------------------------- |
---|
453 | * Equacoes do modelo |
---|
454 | *--------------------------------------------------------------------*# |
---|
455 | |
---|
456 | EQUATIONS |
---|
457 | |
---|
458 | "Global Molar Balance (Fluid Phase)" |
---|
459 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
460 | |
---|
461 | "Global Molar Balance (Solid Phase)" |
---|
462 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
463 | |
---|
464 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
465 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
466 | |
---|
467 | "Component Molar Balance (Fluid Phase)" |
---|
468 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
469 | |
---|
470 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
471 | "Composition Outlet.Solid.z" |
---|
472 | Outlet.Solid.z(1) = 1; |
---|
473 | Outlet.Solid.z(2:NCompS) = 0; |
---|
474 | else |
---|
475 | "Component Molar Balance (Solid Phase)" |
---|
476 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
477 | end |
---|
478 | |
---|
479 | "Energy Balance" |
---|
480 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
481 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
482 | |
---|
483 | end |
---|
484 | |
---|
485 | Model mixer2_mU |
---|
486 | |
---|
487 | ATTRIBUTES |
---|
488 | Pallete = true; |
---|
489 | Icon = "icon/currentR"; |
---|
490 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is known"; |
---|
491 | Info = |
---|
492 | "== ASSUMPTIONS == |
---|
493 | * Static; |
---|
494 | * Adiabatic. |
---|
495 | |
---|
496 | == SPEFICY == |
---|
497 | * The inlet streams |
---|
498 | flow rate |
---|
499 | temperature |
---|
500 | pressure |
---|
501 | stream composition. |
---|
502 | fraction of liquid |
---|
503 | fraction of solid |
---|
504 | fraction of vapour |
---|
505 | enthalpy ?????? |
---|
506 | |
---|
507 | == SET == |
---|
508 | * Number of stream components(Ncomp/NcompS); |
---|
509 | "; |
---|
510 | |
---|
511 | |
---|
512 | #*------------------------------------------------------------------- |
---|
513 | * Declaracao de variaveis |
---|
514 | *--------------------------------------------------------------------*# |
---|
515 | |
---|
516 | VARIABLES |
---|
517 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.08, PosY=1.0, Symbol="_{inlet1}", Protected = false); |
---|
518 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.92, PosY=1.0, Symbol="_{inlet2}", Protected = false); |
---|
519 | out Outlet as main_stream_eq (Brief = "Outlet Stream", PosX=0.5, PosY=0.0, Symbol="_{outlet}"); |
---|
520 | |
---|
521 | #*------------------------------------------------------------------- |
---|
522 | #Parametros |
---|
523 | *--------------------------------------------------------------------*# |
---|
524 | |
---|
525 | PARAMETERS |
---|
526 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
527 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
528 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
529 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
530 | |
---|
531 | #*------------------------------------------------------------------- |
---|
532 | * Equacoes do modelo |
---|
533 | *--------------------------------------------------------------------*# |
---|
534 | |
---|
535 | EQUATIONS |
---|
536 | |
---|
537 | "Global Molar Balance (Fluid Phase)" |
---|
538 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
539 | |
---|
540 | "Global Molar Balance (Solid Phase)" |
---|
541 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
542 | |
---|
543 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
544 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
545 | |
---|
546 | "Component Molar Balance (Fluid Phase)" |
---|
547 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
548 | |
---|
549 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
550 | "Composition Outlet.Solid.z" |
---|
551 | Outlet.Solid.z(1) = 1; |
---|
552 | Outlet.Solid.z(2:NCompS) = 0; |
---|
553 | else |
---|
554 | "Component Molar Balance (Solid Phase)" |
---|
555 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
556 | end |
---|
557 | |
---|
558 | "Energy Balance" |
---|
559 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
560 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
561 | |
---|
562 | end |
---|
563 | |
---|
564 | Model mixer2_mD |
---|
565 | |
---|
566 | ATTRIBUTES |
---|
567 | Pallete = true; |
---|
568 | Icon = "icon/currentR"; |
---|
569 | Brief = "Model of a Mixer With 2 Inlets that the vapor fraction is known"; |
---|
570 | Info = |
---|
571 | "== ASSUMPTIONS == |
---|
572 | * Static; |
---|
573 | * Adiabatic. |
---|
574 | |
---|
575 | == SPEFICY == |
---|
576 | * The inlet streams |
---|
577 | flow rate |
---|
578 | temperature |
---|
579 | pressure |
---|
580 | stream composition. |
---|
581 | fraction of liquid |
---|
582 | fraction of solid |
---|
583 | fraction of vapour |
---|
584 | enthalpy ?????? |
---|
585 | |
---|
586 | == SET == |
---|
587 | * Number of stream components(Ncomp/NcompS); |
---|
588 | "; |
---|
589 | |
---|
590 | #*------------------------------------------------------------------- |
---|
591 | * Declaracao de variaveis |
---|
592 | *--------------------------------------------------------------------*# |
---|
593 | |
---|
594 | VARIABLES |
---|
595 | in Inlet1 as main_stream (Brief = "Inlet Stream", PosX=0.08, PosY=0.0, Symbol="_{inlet1}", Protected = false); |
---|
596 | in Inlet2 as main_stream (Brief = "Inlet Stream", PosX=0.92, PosY=0.0, Symbol="_{inlet2}", Protected = false); |
---|
597 | out Outlet as main_stream_eq (Brief = "Outlet Stream", PosX=0.5, PosY=1.0, Symbol="_{outlet}"); |
---|
598 | |
---|
599 | #*------------------------------------------------------------------- |
---|
600 | #Parametros |
---|
601 | *--------------------------------------------------------------------*# |
---|
602 | |
---|
603 | PARAMETERS |
---|
604 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
605 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
606 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
607 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
608 | |
---|
609 | #*------------------------------------------------------------------- |
---|
610 | * Equacoes do modelo |
---|
611 | *--------------------------------------------------------------------*# |
---|
612 | |
---|
613 | EQUATIONS |
---|
614 | |
---|
615 | "Global Molar Balance (Fluid Phase)" |
---|
616 | Inlet1.Fluid.F + Inlet2.Fluid.F = Outlet.Fluid.F; |
---|
617 | |
---|
618 | "Global Molar Balance (Solid Phase)" |
---|
619 | Inlet1.Solid.F + Inlet2.Solid.F = Outlet.Solid.F; |
---|
620 | |
---|
621 | "Outlet Pressure, array = [Inlet1.P, Inlet2.P]" |
---|
622 | Outlet.P = min([Inlet1.P, Inlet2.P]); |
---|
623 | |
---|
624 | "Component Molar Balance (Fluid Phase)" |
---|
625 | Inlet1.Fluid.F * Inlet1.Fluid.z + Inlet2.Fluid.F * Inlet2.Fluid.z = Outlet.Fluid.F * Outlet.Fluid.z; |
---|
626 | |
---|
627 | if Outlet.Solid.F equal 0 * 'mol/s' then |
---|
628 | "Composition Outlet.Solid.z" |
---|
629 | Outlet.Solid.z(1) = 1; |
---|
630 | Outlet.Solid.z(2:NCompS) = 0; |
---|
631 | else |
---|
632 | "Component Molar Balance (Solid Phase)" |
---|
633 | Inlet1.Solid.F * Inlet1.Solid.z + Inlet2.Solid.F * Inlet2.Solid.z = Outlet.Solid.F * Outlet.Solid.z; |
---|
634 | end |
---|
635 | |
---|
636 | "Energy Balance" |
---|
637 | Outlet.Fluid.F*Outlet.Fluid.h + Outlet.Solid.F*Outlet.Solid.h = |
---|
638 | Inlet1.Fluid.F*Inlet1.Fluid.h + Inlet2.Fluid.F*Inlet2.Fluid.h + Inlet1.Solid.F*Inlet1.Solid.h + Inlet2.Solid.F*Inlet2.Solid.h; |
---|
639 | |
---|
640 | end |
---|
641 | |
---|
642 | Model splitter_mR |
---|
643 | |
---|
644 | ATTRIBUTES |
---|
645 | Pallete = true; |
---|
646 | Icon = "icon/currentL"; |
---|
647 | Brief = "Model of a Splitter With 2 Outlets"; |
---|
648 | Info = |
---|
649 | "== ASSUMPTIONS == |
---|
650 | * Static; |
---|
651 | * Adiabatic. |
---|
652 | |
---|
653 | == SPEFICY == |
---|
654 | * The inlet stream: |
---|
655 | flow rate |
---|
656 | temperature |
---|
657 | pressure |
---|
658 | stream composition |
---|
659 | * The split fraction (Outlet1). |
---|
660 | |
---|
661 | == SET == |
---|
662 | * Number of stream components(Ncomp/NcompS); |
---|
663 | "; |
---|
664 | |
---|
665 | |
---|
666 | #*------------------------------------------------------------------- |
---|
667 | * Declaracao de variaveis |
---|
668 | *--------------------------------------------------------------------*# |
---|
669 | |
---|
670 | VARIABLES |
---|
671 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
672 | out Outlet1 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.08, Symbol="_{out1}", Protected = false); |
---|
673 | out Outlet2 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.92, Symbol="_{out2}", Protected = false ); |
---|
674 | frac as fraction (Brief = "fraction of molar outflow through the Outlet1"); |
---|
675 | |
---|
676 | #*------------------------------------------------------------------- |
---|
677 | #Parametros |
---|
678 | *--------------------------------------------------------------------*# |
---|
679 | |
---|
680 | PARAMETERS |
---|
681 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
682 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
683 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
684 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
685 | |
---|
686 | #*------------------------------------------------------------------- |
---|
687 | * Equacoes do modelo |
---|
688 | *--------------------------------------------------------------------*# |
---|
689 | |
---|
690 | EQUATIONS |
---|
691 | |
---|
692 | "Total Molar Balance (Fluid Phase)" |
---|
693 | Inlet.Fluid.F = Outlet1.Fluid.F + Outlet2.Fluid.F; |
---|
694 | |
---|
695 | "Total Molar Balance (Solid Phase)" |
---|
696 | Inlet.Solid.F = Outlet1.Solid.F + Outlet2.Solid.F; |
---|
697 | |
---|
698 | "Composition of Outlet1 (Fluid Phase)" |
---|
699 | Outlet1.Fluid.z = Inlet.Fluid.z; |
---|
700 | |
---|
701 | "Composition of Outlet2 (Fluid Phase)" |
---|
702 | Outlet2.Fluid.z = Inlet.Fluid.z; |
---|
703 | |
---|
704 | "Fraction of the Inlet in Outlet 1 in Mass (Fluid Phase)" |
---|
705 | Inlet.Fluid.Fw * frac = Outlet1.Fluid.Fw; |
---|
706 | |
---|
707 | "Fraction of the Inlet in Outlet 1 in Mass (Solid Phase)" |
---|
708 | Inlet.Solid.Fw * frac = Outlet1.Solid.Fw; |
---|
709 | |
---|
710 | "Composition of Outlet1 (Solid Phase)" |
---|
711 | Outlet1.Solid.z = Inlet.Solid.z; |
---|
712 | |
---|
713 | "Composition of Outlet2 (Solid Phase)" |
---|
714 | Outlet2.Solid.z = Inlet.Solid.z; |
---|
715 | |
---|
716 | "Molar Enthalpy of Outlet1 (Fluid Phase)" |
---|
717 | Outlet1.Fluid.h = Inlet.Fluid.h; |
---|
718 | |
---|
719 | "Molar Enthalpy of Outlet2 (Fluid Phase)" |
---|
720 | Outlet2.Fluid.h = Inlet.Fluid.h; |
---|
721 | |
---|
722 | "Molar Enthalpy of Outlet1 (Solid Phase)" |
---|
723 | Outlet1.Solid.h = Inlet.Solid.h; |
---|
724 | |
---|
725 | "Molar Enthalpy of Outlet2 (Solid Phase)" |
---|
726 | Outlet2.Solid.h = Inlet.Solid.h; |
---|
727 | |
---|
728 | "Outlet1 Temperature" |
---|
729 | Outlet1.T = Inlet.T; |
---|
730 | |
---|
731 | "Outlet2 Temperature" |
---|
732 | Outlet2.T = Inlet.T; |
---|
733 | |
---|
734 | "Outlet1 Vapour Fraction" |
---|
735 | Outlet1.v = Inlet.v; |
---|
736 | |
---|
737 | "Outlet2 Vapour Fraction" |
---|
738 | Outlet2.v = Inlet.v; |
---|
739 | |
---|
740 | "Outlet1 Pressure" |
---|
741 | Outlet1.P = Inlet.P; |
---|
742 | |
---|
743 | "Outlet2 Pressure" |
---|
744 | Outlet2.P = Inlet.P; |
---|
745 | |
---|
746 | end |
---|
747 | |
---|
748 | Model splitter_mL |
---|
749 | |
---|
750 | ATTRIBUTES |
---|
751 | Pallete = true; |
---|
752 | Icon = "icon/currentL"; |
---|
753 | Brief = "Model of a Splitter With 2 Outlets"; |
---|
754 | Info = |
---|
755 | "== ASSUMPTIONS == |
---|
756 | * Static; |
---|
757 | * Adiabatic. |
---|
758 | |
---|
759 | == SPEFICY == |
---|
760 | * The inlet stream |
---|
761 | flow rate |
---|
762 | temperature |
---|
763 | pressure |
---|
764 | stream composition |
---|
765 | * The split fraction (Outlet1). |
---|
766 | |
---|
767 | == SET == |
---|
768 | * Number of stream components(Ncomp/NcompS); |
---|
769 | "; |
---|
770 | |
---|
771 | #*------------------------------------------------------------------- |
---|
772 | * Declaracao de variaveis |
---|
773 | *--------------------------------------------------------------------*# |
---|
774 | |
---|
775 | VARIABLES |
---|
776 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
777 | out Outlet1 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.08, Symbol="_{out1}", Protected = false); |
---|
778 | out Outlet2 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.92, Symbol="_{out2}", Protected = false ); |
---|
779 | frac as fraction (Brief = "fraction of molar outflow through the Outlet1"); |
---|
780 | |
---|
781 | #*------------------------------------------------------------------- |
---|
782 | #Parametros |
---|
783 | *--------------------------------------------------------------------*# |
---|
784 | |
---|
785 | PARAMETERS |
---|
786 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
787 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
788 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
789 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
790 | |
---|
791 | #*------------------------------------------------------------------- |
---|
792 | * Equacoes do modelo |
---|
793 | *--------------------------------------------------------------------*# |
---|
794 | |
---|
795 | EQUATIONS |
---|
796 | |
---|
797 | "Total Molar Balance (Fluid Phase)" |
---|
798 | Inlet.Fluid.F = Outlet1.Fluid.F + Outlet2.Fluid.F; |
---|
799 | |
---|
800 | "Total Molar Balance (Solid Phase)" |
---|
801 | Inlet.Solid.F = Outlet1.Solid.F + Outlet2.Solid.F; |
---|
802 | |
---|
803 | "Composition of Outlet1 (Fluid Phase)" |
---|
804 | Outlet1.Fluid.z = Inlet.Fluid.z; |
---|
805 | |
---|
806 | "Composition of Outlet2 (Fluid Phase)" |
---|
807 | Outlet2.Fluid.z = Inlet.Fluid.z; |
---|
808 | |
---|
809 | "Fraction of the Inlet in Outlet 1 in Mass (Fluid Phase)" |
---|
810 | Inlet.Fluid.Fw * frac = Outlet1.Fluid.Fw; |
---|
811 | |
---|
812 | "Fraction of the Inlet in Outlet 1 in Mass (Solid Phase)" |
---|
813 | Inlet.Solid.Fw * frac = Outlet1.Solid.Fw; |
---|
814 | |
---|
815 | "Composition of Outlet1 (Solid Phase)" |
---|
816 | Outlet1.Solid.z = Inlet.Solid.z; |
---|
817 | |
---|
818 | "Composition of Outlet2 (Solid Phase)" |
---|
819 | Outlet2.Solid.z = Inlet.Solid.z; |
---|
820 | |
---|
821 | "Molar Enthalpy of Outlet1 (Fluid Phase)" |
---|
822 | Outlet1.Fluid.h = Inlet.Fluid.h; |
---|
823 | |
---|
824 | "Molar Enthalpy of Outlet2 (Fluid Phase)" |
---|
825 | Outlet2.Fluid.h = Inlet.Fluid.h; |
---|
826 | |
---|
827 | "Molar Enthalpy of Outlet1 (Solid Phase)" |
---|
828 | Outlet1.Solid.h = Inlet.Solid.h; |
---|
829 | |
---|
830 | "Molar Enthalpy of Outlet2 (Solid Phase)" |
---|
831 | Outlet2.Solid.h = Inlet.Solid.h; |
---|
832 | |
---|
833 | "Outlet1 Temperature" |
---|
834 | Outlet1.T = Inlet.T; |
---|
835 | |
---|
836 | "Outlet2 Temperature" |
---|
837 | Outlet2.T = Inlet.T; |
---|
838 | |
---|
839 | "Outlet1 Vapour Fraction" |
---|
840 | Outlet1.v = Inlet.v; |
---|
841 | |
---|
842 | "Outlet2 Vapour Fraction" |
---|
843 | Outlet2.v = Inlet.v; |
---|
844 | |
---|
845 | "Outlet1 Pressure" |
---|
846 | Outlet1.P = Inlet.P; |
---|
847 | |
---|
848 | "Outlet2 Pressure" |
---|
849 | Outlet2.P = Inlet.P; |
---|
850 | |
---|
851 | end |
---|
852 | |
---|
853 | Model splitter_m_U |
---|
854 | |
---|
855 | ATTRIBUTES |
---|
856 | Pallete = true; |
---|
857 | Icon = "icon/currentL"; |
---|
858 | Brief = "Model of a Splitter With 2 Outlets"; |
---|
859 | Info = |
---|
860 | "== ASSUMPTIONS == |
---|
861 | * Static; |
---|
862 | * Adiabatic. |
---|
863 | |
---|
864 | == SPEFICY == |
---|
865 | * The inlet stream; |
---|
866 | flow rate |
---|
867 | temperature |
---|
868 | pressure |
---|
869 | stream composition |
---|
870 | * The split fraction (Outlet1). |
---|
871 | |
---|
872 | == SET == |
---|
873 | * Number of stream components(Ncomp/NcompS); |
---|
874 | "; |
---|
875 | |
---|
876 | #*------------------------------------------------------------------- |
---|
877 | * Declaracao de variaveis |
---|
878 | *--------------------------------------------------------------------*# |
---|
879 | |
---|
880 | VARIABLES |
---|
881 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
882 | out Outlet1 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.08, Symbol="_{out1}", Protected = false); |
---|
883 | out Outlet2 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.92, Symbol="_{out2}", Protected = false ); |
---|
884 | frac as fraction (Brief = "fraction of molar outflow through the Outlet1"); |
---|
885 | |
---|
886 | #*------------------------------------------------------------------- |
---|
887 | #Parametros |
---|
888 | *--------------------------------------------------------------------*# |
---|
889 | |
---|
890 | PARAMETERS |
---|
891 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
892 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
893 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
894 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
895 | |
---|
896 | #*------------------------------------------------------------------- |
---|
897 | * Equacoes do modelo |
---|
898 | *--------------------------------------------------------------------*# |
---|
899 | |
---|
900 | EQUATIONS |
---|
901 | |
---|
902 | "Total Molar Balance (Fluid Phase)" |
---|
903 | Inlet.Fluid.F = Outlet1.Fluid.F + Outlet2.Fluid.F; |
---|
904 | |
---|
905 | "Total Molar Balance (Solid Phase)" |
---|
906 | Inlet.Solid.F = Outlet1.Solid.F + Outlet2.Solid.F; |
---|
907 | |
---|
908 | "Composition of Outlet1 (Fluid Phase)" |
---|
909 | Outlet1.Fluid.z = Inlet.Fluid.z; |
---|
910 | |
---|
911 | "Composition of Outlet2 (Fluid Phase)" |
---|
912 | Outlet2.Fluid.z = Inlet.Fluid.z; |
---|
913 | |
---|
914 | "Fraction of the Inlet in Outlet 1 in Mass (Fluid Phase)" |
---|
915 | Inlet.Fluid.Fw * frac = Outlet1.Fluid.Fw; |
---|
916 | |
---|
917 | "Fraction of the Inlet in Outlet 1 in Mass (Solid Phase)" |
---|
918 | Inlet.Solid.Fw * frac = Outlet1.Solid.Fw; |
---|
919 | |
---|
920 | "Composition of Outlet1 (Solid Phase)" |
---|
921 | Outlet1.Solid.z = Inlet.Solid.z; |
---|
922 | |
---|
923 | "Composition of Outlet2 (Solid Phase)" |
---|
924 | Outlet2.Solid.z = Inlet.Solid.z; |
---|
925 | |
---|
926 | "Molar Enthalpy of Outlet1 (Fluid Phase)" |
---|
927 | Outlet1.Fluid.h = Inlet.Fluid.h; |
---|
928 | |
---|
929 | "Molar Enthalpy of Outlet2 (Fluid Phase)" |
---|
930 | Outlet2.Fluid.h = Inlet.Fluid.h; |
---|
931 | |
---|
932 | "Molar Enthalpy of Outlet1 (Solid Phase)" |
---|
933 | Outlet1.Solid.h = Inlet.Solid.h; |
---|
934 | |
---|
935 | "Molar Enthalpy of Outlet2 (Solid Phase)" |
---|
936 | Outlet2.Solid.h = Inlet.Solid.h; |
---|
937 | |
---|
938 | "Outlet1 Temperature" |
---|
939 | Outlet1.T = Inlet.T; |
---|
940 | |
---|
941 | "Outlet2 Temperature" |
---|
942 | Outlet2.T = Inlet.T; |
---|
943 | |
---|
944 | "Outlet1 Vapour Fraction" |
---|
945 | Outlet1.v = Inlet.v; |
---|
946 | |
---|
947 | "Outlet2 Vapour Fraction" |
---|
948 | Outlet2.v = Inlet.v; |
---|
949 | |
---|
950 | "Outlet1 Pressure" |
---|
951 | Outlet1.P = Inlet.P; |
---|
952 | |
---|
953 | "Outlet2 Pressure" |
---|
954 | Outlet2.P = Inlet.P; |
---|
955 | |
---|
956 | end |
---|
957 | |
---|
958 | Model splitter_mD |
---|
959 | |
---|
960 | ATTRIBUTES |
---|
961 | Pallete = true; |
---|
962 | Icon = "icon/currentL"; |
---|
963 | Brief = "Model of a Splitter With 2 Outlets"; |
---|
964 | Info = |
---|
965 | "== ASSUMPTIONS == |
---|
966 | * Static; |
---|
967 | * Adiabatic. |
---|
968 | |
---|
969 | == SPEFICY == |
---|
970 | * The inlet stream; |
---|
971 | flow rate |
---|
972 | temperature |
---|
973 | pressure |
---|
974 | stream composition |
---|
975 | * The split fraction (Outlet1). |
---|
976 | |
---|
977 | == SET == |
---|
978 | * Number of stream components(Ncomp/NcompS); |
---|
979 | "; |
---|
980 | |
---|
981 | #*------------------------------------------------------------------- |
---|
982 | * Declaracao de variaveis |
---|
983 | *--------------------------------------------------------------------*# |
---|
984 | |
---|
985 | VARIABLES |
---|
986 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0.0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
987 | out Outlet1 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.08, Symbol="_{out1}", Protected = false); |
---|
988 | out Outlet2 as main_stream (Brief = "Outlet Stream", PosX=1.0, PosY=0.92, Symbol="_{out2}", Protected = false ); |
---|
989 | frac as fraction (Brief = "fraction of molar outflow through the Outlet1"); |
---|
990 | |
---|
991 | #*------------------------------------------------------------------- |
---|
992 | #Parametros |
---|
993 | *--------------------------------------------------------------------*# |
---|
994 | |
---|
995 | PARAMETERS |
---|
996 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
997 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
998 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
999 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
1000 | |
---|
1001 | #*------------------------------------------------------------------- |
---|
1002 | * Equacoes do modelo |
---|
1003 | *--------------------------------------------------------------------*# |
---|
1004 | |
---|
1005 | EQUATIONS |
---|
1006 | |
---|
1007 | "Total Molar Balance (Fluid Phase)" |
---|
1008 | Inlet.Fluid.F = Outlet1.Fluid.F + Outlet2.Fluid.F; |
---|
1009 | |
---|
1010 | "Total Molar Balance (Solid Phase)" |
---|
1011 | Inlet.Solid.F = Outlet1.Solid.F + Outlet2.Solid.F; |
---|
1012 | |
---|
1013 | "Composition of Outlet1 (Fluid Phase)" |
---|
1014 | Outlet1.Fluid.z = Inlet.Fluid.z; |
---|
1015 | |
---|
1016 | "Composition of Outlet2 (Fluid Phase)" |
---|
1017 | Outlet2.Fluid.z = Inlet.Fluid.z; |
---|
1018 | |
---|
1019 | "Fraction of the Inlet in Outlet 1 in Mass (Fluid Phase)" |
---|
1020 | Inlet.Fluid.Fw * frac = Outlet1.Fluid.Fw; |
---|
1021 | |
---|
1022 | "Fraction of the Inlet in Outlet 1 in Mass (Solid Phase)" |
---|
1023 | Inlet.Solid.Fw * frac = Outlet1.Solid.Fw; |
---|
1024 | |
---|
1025 | "Composition of Outlet1 (Solid Phase)" |
---|
1026 | Outlet1.Solid.z = Inlet.Solid.z; |
---|
1027 | |
---|
1028 | "Composition of Outlet2 (Solid Phase)" |
---|
1029 | Outlet2.Solid.z = Inlet.Solid.z; |
---|
1030 | |
---|
1031 | "Molar Enthalpy of Outlet1 (Fluid Phase)" |
---|
1032 | Outlet1.Fluid.h = Inlet.Fluid.h; |
---|
1033 | |
---|
1034 | "Molar Enthalpy of Outlet2 (Fluid Phase)" |
---|
1035 | Outlet2.Fluid.h = Inlet.Fluid.h; |
---|
1036 | |
---|
1037 | "Molar Enthalpy of Outlet1 (Solid Phase)" |
---|
1038 | Outlet1.Solid.h = Inlet.Solid.h; |
---|
1039 | |
---|
1040 | "Molar Enthalpy of Outlet2 (Solid Phase)" |
---|
1041 | Outlet2.Solid.h = Inlet.Solid.h; |
---|
1042 | |
---|
1043 | "Outlet1 Temperature" |
---|
1044 | Outlet1.T = Inlet.T; |
---|
1045 | |
---|
1046 | "Outlet2 Temperature" |
---|
1047 | Outlet2.T = Inlet.T; |
---|
1048 | |
---|
1049 | "Outlet1 Vapour Fraction" |
---|
1050 | Outlet1.v = Inlet.v; |
---|
1051 | |
---|
1052 | "Outlet2 Vapour Fraction" |
---|
1053 | Outlet2.v = Inlet.v; |
---|
1054 | |
---|
1055 | "Outlet1 Pressure" |
---|
1056 | Outlet1.P = Inlet.P; |
---|
1057 | |
---|
1058 | "Outlet2 Pressure" |
---|
1059 | Outlet2.P = Inlet.P; |
---|
1060 | |
---|
1061 | end |
---|
1062 | |
---|
1063 | FlowSheet teste1_mixer_and_splitter_m |
---|
1064 | |
---|
1065 | #*------------------------------------------------------------------- |
---|
1066 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
1067 | *--------------------------------------------------------------------*# |
---|
1068 | |
---|
1069 | DEVICES |
---|
1070 | splt as splitter_mR; |
---|
1071 | S101 as main_sourceR; |
---|
1072 | mix as mixer_mR; |
---|
1073 | |
---|
1074 | #*------------------------------------------------------------------- |
---|
1075 | * Especifica as conexoes entre os modelos |
---|
1076 | *--------------------------------------------------------------------*# |
---|
1077 | |
---|
1078 | CONNECTIONS |
---|
1079 | S101.Outlet to splt.Inlet; |
---|
1080 | splt.Outlet1 to mix.Inlet1; |
---|
1081 | splt.Outlet2 to mix.Inlet2; |
---|
1082 | |
---|
1083 | #*------------------------------------------------------------------- |
---|
1084 | #Parametros |
---|
1085 | *--------------------------------------------------------------------*# |
---|
1086 | |
---|
1087 | PARAMETERS |
---|
1088 | PP as Plugin (Brief = "External Physical Properties", |
---|
1089 | Type="PP", |
---|
1090 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
1091 | ); |
---|
1092 | PPS as Plugin (Brief = "External Physical Properties", |
---|
1093 | Type="PP", |
---|
1094 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
1095 | ); |
---|
1096 | |
---|
1097 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
1098 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
1099 | |
---|
1100 | #*------------------------------------------------------------------- |
---|
1101 | * Opcoes de Solver |
---|
1102 | *--------------------------------------------------------------------*# |
---|
1103 | |
---|
1104 | OPTIONS |
---|
1105 | Dynamic = false; |
---|
1106 | |
---|
1107 | #*------------------------------------------------------------------- |
---|
1108 | * Especifica variaveis definidas no modelo |
---|
1109 | *--------------------------------------------------------------------*# |
---|
1110 | |
---|
1111 | SPECIFY |
---|
1112 | S101.CompositionOfFluid(1:3) = [0.999, 0.0005, 0.0005]; |
---|
1113 | S101.CompositionOfFluid(4:NComp) = 0; |
---|
1114 | S101.CompositionOfSolid = [0.4, 0.3, 0.28, 0, 0.02, 0, 0, 0, 0]; |
---|
1115 | S101.Fluid.Fw = 50 * 'kg/h'; |
---|
1116 | S101.Solid.Fw = 0 * 'kg/h'; |
---|
1117 | S101.T = 300.318 * 'K'; |
---|
1118 | S101.P = 1 * 'atm'; |
---|
1119 | |
---|
1120 | splt.frac = 0.8; #fraction of molar outflow through the Outlet1 |
---|
1121 | #*------------------------------------------------------------------- |
---|
1122 | * Define o valor dos parametros declarados no modelo |
---|
1123 | *--------------------------------------------------------------------*# |
---|
1124 | |
---|
1125 | SET |
---|
1126 | NComp = PP.NumberOfComponents(); |
---|
1127 | NCompS = PPS.NumberOfComponents(); |
---|
1128 | |
---|
1129 | end |
---|
1130 | |
---|
1131 | FlowSheet teste2_mixer_m |
---|
1132 | |
---|
1133 | #*------------------------------------------------------------------- |
---|
1134 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
1135 | *--------------------------------------------------------------------*# |
---|
1136 | |
---|
1137 | DEVICES |
---|
1138 | S101 as main_sourceR; |
---|
1139 | S102 as main_sourceR; |
---|
1140 | mix as mixer_mR; |
---|
1141 | |
---|
1142 | #*------------------------------------------------------------------- |
---|
1143 | * Especifica as conexoes entre os modelos |
---|
1144 | *--------------------------------------------------------------------*# |
---|
1145 | |
---|
1146 | CONNECTIONS |
---|
1147 | S101.Outlet to mix.Inlet1; |
---|
1148 | S102.Outlet to mix.Inlet2; |
---|
1149 | |
---|
1150 | #*------------------------------------------------------------------- |
---|
1151 | #Parametros |
---|
1152 | *--------------------------------------------------------------------*# |
---|
1153 | |
---|
1154 | PARAMETERS |
---|
1155 | PP as Plugin (Brief = "External Physical Properties", |
---|
1156 | Type="PP", |
---|
1157 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
1158 | ); |
---|
1159 | PPS as Plugin (Brief = "External Physical Properties", |
---|
1160 | Type="PP", |
---|
1161 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
1162 | ); |
---|
1163 | |
---|
1164 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
1165 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
1166 | |
---|
1167 | SET |
---|
1168 | S101.CompositionBasis = "Molar"; |
---|
1169 | S102.CompositionBasis = "Molar"; |
---|
1170 | S101.ValidPhases = "Vapour-Only"; |
---|
1171 | S102.ValidPhases = "Vapour-Only"; |
---|
1172 | |
---|
1173 | #*------------------------------------------------------------------- |
---|
1174 | * Opcoes de Solver |
---|
1175 | *--------------------------------------------------------------------*# |
---|
1176 | |
---|
1177 | OPTIONS |
---|
1178 | Dynamic = false; |
---|
1179 | |
---|
1180 | #*------------------------------------------------------------------- |
---|
1181 | * Especifica variaveis definidas no modelo |
---|
1182 | *--------------------------------------------------------------------*# |
---|
1183 | |
---|
1184 | SPECIFY |
---|
1185 | S101.CompositionOfFluid(1) = 0.14; |
---|
1186 | S101.CompositionOfFluid(2:11) = 0; |
---|
1187 | S101.CompositionOfFluid(12:17) = [.13,.182,0,.342,.05,.156]; |
---|
1188 | S101.CompositionOfFluid(18:NComp) = 0; |
---|
1189 | S101.CompositionOfSolid = [1, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
1190 | S101.Fluid.F = 3985.4 * 'kmol/h'; |
---|
1191 | S101.Solid.F = 0 * 'kmol/h'; |
---|
1192 | S101.T = 1621 * 'K'; |
---|
1193 | S101.P = 18 * 'atm'; |
---|
1194 | |
---|
1195 | S102.CompositionOfFluid(1:13) = 0; |
---|
1196 | S102.CompositionOfFluid(14:15) = [.21,.79]; |
---|
1197 | S102.CompositionOfFluid(16:NComp) = 0; |
---|
1198 | S102.CompositionOfSolid = [1, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
1199 | S102.Fluid.F = 10500 * 'kmol/h'; |
---|
1200 | S102.Solid.F = 0 * 'kmol/h'; |
---|
1201 | S102.T = 734.6 * 'K'; |
---|
1202 | S102.P = 18 * 'atm'; |
---|
1203 | |
---|
1204 | #*------------------------------------------------------------------- |
---|
1205 | * Define o valor dos parametros declarados no modelo |
---|
1206 | *--------------------------------------------------------------------*# |
---|
1207 | |
---|
1208 | SET |
---|
1209 | NComp = PP.NumberOfComponents(); |
---|
1210 | NCompS = PPS.NumberOfComponents(); |
---|
1211 | |
---|
1212 | end |
---|
1213 | |
---|
1214 | FlowSheet teste1_properties |
---|
1215 | |
---|
1216 | #*------------------------------------------------------------------- |
---|
1217 | * Especifica variaveis definidas no modelo |
---|
1218 | *--------------------------------------------------------------------*# |
---|
1219 | |
---|
1220 | VARIABLES |
---|
1221 | v as fraction; |
---|
1222 | x(25) as fraction; |
---|
1223 | y(25) as fraction; |
---|
1224 | z(25) as fraction; |
---|
1225 | h as enth_mol; |
---|
1226 | hliq as enth_mol; |
---|
1227 | hvap as enth_mol; |
---|
1228 | P as pressure; |
---|
1229 | T as temperature; |
---|
1230 | |
---|
1231 | #*------------------------------------------------------------------- |
---|
1232 | * Equacoes do modelo |
---|
1233 | *--------------------------------------------------------------------*# |
---|
1234 | |
---|
1235 | EQUATIONS |
---|
1236 | [v, x, y] = PP.FlashPH(P, h, z); |
---|
1237 | |
---|
1238 | "Enthalpy" |
---|
1239 | h = (1-v)*hliq + v*hvap; |
---|
1240 | |
---|
1241 | hliq = PP.LiquidEnthalpy(T, P, x); |
---|
1242 | hvap = PP.VapourEnthalpy(T, P, y); |
---|
1243 | |
---|
1244 | #*------------------------------------------------------------------- |
---|
1245 | * Especifica variaveis definidas no modelo |
---|
1246 | *--------------------------------------------------------------------*# |
---|
1247 | |
---|
1248 | SPECIFY |
---|
1249 | h = 524.12 * 'kJ/kmol'; |
---|
1250 | P = 12.5 * 'atm'; |
---|
1251 | z(1:3) = [0.999, 0.0005, 0.0005]; |
---|
1252 | z(4:25) = 0; |
---|
1253 | |
---|
1254 | #*------------------------------------------------------------------- |
---|
1255 | #Parametros |
---|
1256 | *--------------------------------------------------------------------*# |
---|
1257 | |
---|
1258 | PARAMETERS |
---|
1259 | PP as Plugin (Brief = "External Physical Properties", |
---|
1260 | Type="PP", |
---|
1261 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
1262 | ); |
---|
1263 | |
---|
1264 | #*------------------------------------------------------------------- |
---|
1265 | * Opcoes de Solver e Condicoes Iniciais |
---|
1266 | *--------------------------------------------------------------------*# |
---|
1267 | |
---|
1268 | OPTIONS |
---|
1269 | Dynamic = false; |
---|
1270 | NLASolver( |
---|
1271 | # File = "nlasolver", |
---|
1272 | File = "sundials", |
---|
1273 | MaxIterations = 300 |
---|
1274 | ); |
---|
1275 | end |
---|
1276 | |
---|
1277 | FlowSheet teste2_properties |
---|
1278 | |
---|
1279 | #*------------------------------------------------------------------- |
---|
1280 | * Especifica variaveis definidas no modelo |
---|
1281 | *--------------------------------------------------------------------*# |
---|
1282 | |
---|
1283 | VARIABLES |
---|
1284 | v as fraction; |
---|
1285 | x(25) as fraction; |
---|
1286 | y(25) as fraction; |
---|
1287 | |
---|
1288 | #*------------------------------------------------------------------- |
---|
1289 | * Equacoes do modelo |
---|
1290 | *--------------------------------------------------------------------*# |
---|
1291 | |
---|
1292 | EQUATIONS |
---|
1293 | [v, x, y] = PP.FlashPH(12.5 * 'atm', 524.12 * 'kJ/kmol', [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]); |
---|
1294 | |
---|
1295 | #*------------------------------------------------------------------- |
---|
1296 | #Parametros |
---|
1297 | *--------------------------------------------------------------------*# |
---|
1298 | |
---|
1299 | PARAMETERS |
---|
1300 | PP as Plugin (Brief = "External Physical Properties", |
---|
1301 | Type="PP", |
---|
1302 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
1303 | ); |
---|
1304 | |
---|
1305 | #*------------------------------------------------------------------- |
---|
1306 | * Opcoes de Solver e Condicoes Iniciais |
---|
1307 | *--------------------------------------------------------------------*# |
---|
1308 | |
---|
1309 | OPTIONS |
---|
1310 | Dynamic = false; |
---|
1311 | |
---|
1312 | end |
---|
1313 | |
---|
1314 | |
---|
1315 | |
---|