1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: separator.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: separador |
---|
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 separador de correntes que sera empregado |
---|
17 | *na biorrefinaria |
---|
18 | *-------------------------------------------------------------------- |
---|
19 | |
---|
20 | *-------------------------------------------------------------------- |
---|
21 | *Notas: Foi feito o flowsheet teste para averiguar o modelo e dois |
---|
22 | * flowsheets para averiguar o calculo de |
---|
23 | * propriedades termodinamicas |
---|
24 | *As siglas R, L, U, D sao indicativos da posisao da corrente de saida |
---|
25 | *sendo R=right, L=legth, U=up e D=down |
---|
26 | *--------------------------------------------------------------------*# |
---|
27 | |
---|
28 | using "main_stream"; |
---|
29 | using "mixers_and_splitters/mixer_and_splitter_m"; |
---|
30 | using "assumptions"; |
---|
31 | |
---|
32 | Model sepR |
---|
33 | |
---|
34 | ATTRIBUTES |
---|
35 | Pallete = true; |
---|
36 | Icon = "icon/sepL"; |
---|
37 | Brief = "Model of a Separator with Solid and Fluid Streams"; |
---|
38 | Info = |
---|
39 | "== GENERAL == |
---|
40 | Model of a generic separator with Solid and Fluid |
---|
41 | streams. |
---|
42 | |
---|
43 | == ASSUMPTIONS == |
---|
44 | * Steady-state; |
---|
45 | * Adiabatic. |
---|
46 | |
---|
47 | == SPECIFY == |
---|
48 | * The inlet stream: |
---|
49 | flow rate |
---|
50 | temperature |
---|
51 | pressure |
---|
52 | stream composition; |
---|
53 | * The split fractions for the fluid and solid phases. |
---|
54 | |
---|
55 | == SET == |
---|
56 | * Number of stream components(Ncomp/NcompS). |
---|
57 | "; |
---|
58 | |
---|
59 | #*------------------------------------------------------------------- |
---|
60 | * Declaracao de variaveis |
---|
61 | *--------------------------------------------------------------------*# |
---|
62 | |
---|
63 | VARIABLES |
---|
64 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
65 | out OutletS as main_stream (Brief = "Solids-Rich Stream", PosX=1.0, PosY=0.08, Symbol="_{outS}", Protected = false); |
---|
66 | out OutletL as main_stream (Brief = "Liquid-Rich Stream", PosX=1.0, PosY=0.92, Symbol="_{outL}", Protected = false ); |
---|
67 | frac_sol as fraction (Brief = "Solids Separation Efficiency", Symbol = "f_{sol}"); |
---|
68 | frac_liq as fraction (Brief = "Liquid Separation Efficiency", Symbol = "f_{liq}"); |
---|
69 | humidity as fraction (Brief = "Fraction of water in the solid"); |
---|
70 | impurity as fraction (Brief = "Fraction of solids in the liquid"); |
---|
71 | |
---|
72 | #*------------------------------------------------------------------- |
---|
73 | #Parametros |
---|
74 | *--------------------------------------------------------------------*# |
---|
75 | |
---|
76 | PARAMETERS |
---|
77 | |
---|
78 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
79 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
80 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
81 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
82 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
83 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
84 | outer flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
85 | |
---|
86 | #*------------------------------------------------------------------- |
---|
87 | * Define o valor dos parametros declarados no modelo |
---|
88 | *--------------------------------------------------------------------*# |
---|
89 | |
---|
90 | SET |
---|
91 | |
---|
92 | M = PP.MolecularWeight(); |
---|
93 | MS = PPS.MolecularWeight(); |
---|
94 | |
---|
95 | #*------------------------------------------------------------------- |
---|
96 | * Equacoes do modelo |
---|
97 | *--------------------------------------------------------------------*# |
---|
98 | |
---|
99 | EQUATIONS |
---|
100 | "Global Molar Balance (Fluid Phase)" |
---|
101 | Inlet.Fluid.F = OutletS.Fluid.F + OutletL.Fluid.F; |
---|
102 | |
---|
103 | "Liquid Separation Efficiency" |
---|
104 | OutletL.Fluid.Fw = Inlet.Fluid.Fw * frac_liq; |
---|
105 | |
---|
106 | "Liquid Stream Composition (Fluid Phase)" |
---|
107 | OutletL.Fluid.z = Inlet.Fluid.z; |
---|
108 | |
---|
109 | "Solid Stream Composition (Fluid Phase)" |
---|
110 | OutletS.Fluid.z = Inlet.Fluid.z; |
---|
111 | |
---|
112 | "Global Molar Balance (Solid Phase)" |
---|
113 | Inlet.Solid.F = OutletS.Solid.F + OutletL.Solid.F; |
---|
114 | |
---|
115 | "Solid Separation Efficiency" |
---|
116 | OutletS.Solid.Fw = Inlet.Solid.Fw * frac_sol; |
---|
117 | |
---|
118 | "Liquid Stream Composition (Solid Phase)" |
---|
119 | OutletS.Solid.z = Inlet.Solid.z; |
---|
120 | |
---|
121 | "Solid Stream Composition (Solid Phase)" |
---|
122 | OutletL.Solid.z = Inlet.Solid.z; |
---|
123 | |
---|
124 | "Solid Humidity" |
---|
125 | OutletS.Total.zw(flu.Water) = humidity; |
---|
126 | |
---|
127 | "Liquid Stream Impurities" |
---|
128 | OutletL.Solid.Fw = impurity * (OutletL.Fluid.Fw + OutletL.Solid.Fw); |
---|
129 | |
---|
130 | "Solid Stream Enthalpy (Fluid Phase)" |
---|
131 | OutletS.Fluid.h = Inlet.Fluid.h; |
---|
132 | |
---|
133 | "Liquid Stream Enthalpy (Fluid Phase)" |
---|
134 | OutletL.Fluid.h = Inlet.Fluid.h; |
---|
135 | |
---|
136 | "Solid Stream Enthalpy (Solid Phase)" |
---|
137 | OutletS.Solid.h = Inlet.Solid.h; |
---|
138 | |
---|
139 | "Liquid Stream Enthalpy (Solid Phase)" |
---|
140 | OutletL.Solid.h = Inlet.Solid.h; |
---|
141 | |
---|
142 | "Thermal Equilibrium 1" |
---|
143 | OutletS.T = Inlet.T; |
---|
144 | |
---|
145 | "Thermal Equilibrium 2" |
---|
146 | OutletL.T = Inlet.T; |
---|
147 | |
---|
148 | "Solid Stream Vapour Fraction" |
---|
149 | OutletS.Fluid.v = Inlet.Fluid.v; |
---|
150 | |
---|
151 | "Liquid Stream Vapour Fraction" |
---|
152 | OutletL.Fluid.v = Inlet.Fluid.v; |
---|
153 | |
---|
154 | "Mechanical Equilibrium 1" |
---|
155 | OutletS.P = Inlet.P; |
---|
156 | |
---|
157 | "Mechanical Equilibrium 2" |
---|
158 | OutletL.P = Inlet.P; |
---|
159 | |
---|
160 | end |
---|
161 | |
---|
162 | Model sepL |
---|
163 | |
---|
164 | ATTRIBUTES |
---|
165 | Pallete = true; |
---|
166 | Icon = "icon/sepR"; |
---|
167 | Brief = "Model of a Separator with a Solid and a Liquid Streams"; |
---|
168 | Info = |
---|
169 | "== GENERAL == |
---|
170 | Model of a generic separator with a Solid and a Liquid |
---|
171 | streams. |
---|
172 | |
---|
173 | == ASSUMPTIONS == |
---|
174 | * Steady-state; |
---|
175 | * Adiabatic. |
---|
176 | |
---|
177 | == SPECIFY == |
---|
178 | * The inlet stream: |
---|
179 | flow rate |
---|
180 | temperature |
---|
181 | pressure |
---|
182 | stream composition; |
---|
183 | * The split fractions for the fluid and solid phases. |
---|
184 | |
---|
185 | == SET == |
---|
186 | * Number of stream components(Ncomp/NcompS). |
---|
187 | "; |
---|
188 | |
---|
189 | #*------------------------------------------------------------------- |
---|
190 | * Declaracao de variaveis |
---|
191 | *--------------------------------------------------------------------*# |
---|
192 | |
---|
193 | VARIABLES |
---|
194 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
195 | out OutletS as main_stream (Brief = "Solids-Rich Stream", PosX=1.0, PosY=0.08, Symbol="_{outS}", Protected = false); |
---|
196 | out OutletL as main_stream (Brief = "Liquid-Rich Stream", PosX=1.0, PosY=0.92, Symbol="_{outL}", Protected = false ); |
---|
197 | frac_sol as fraction (Brief = "Solids Separation Efficiency", Symbol = "f_{sol}"); |
---|
198 | frac_liq as fraction (Brief = "Liquid Separation Efficiency", Symbol = "f_{liq}"); |
---|
199 | humidity as fraction (Brief = "Fraction of water in the solid"); |
---|
200 | impurity as fraction (Brief = "Fraction of solids in the liquid"); |
---|
201 | |
---|
202 | |
---|
203 | #*------------------------------------------------------------------- |
---|
204 | #Parametros |
---|
205 | *--------------------------------------------------------------------*# |
---|
206 | |
---|
207 | PARAMETERS |
---|
208 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
209 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
210 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
211 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
212 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
213 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
214 | |
---|
215 | #*------------------------------------------------------------------- |
---|
216 | * Define o valor dos parametros declarados no modelo |
---|
217 | *--------------------------------------------------------------------*# |
---|
218 | |
---|
219 | SET |
---|
220 | |
---|
221 | M = PP.MolecularWeight(); |
---|
222 | MS = PPS.MolecularWeight(); |
---|
223 | |
---|
224 | #*------------------------------------------------------------------- |
---|
225 | * Equacoes do modelo |
---|
226 | *--------------------------------------------------------------------*# |
---|
227 | |
---|
228 | EQUATIONS |
---|
229 | "Global Molar Balance (Fluid Phase)" |
---|
230 | Inlet.Fluid.F = OutletS.Fluid.F + OutletL.Fluid.F; |
---|
231 | |
---|
232 | "Liquid Separation Efficiency" |
---|
233 | OutletL.Fluid.Fw = Inlet.Fluid.Fw * frac_liq; |
---|
234 | |
---|
235 | "Liquid Stream Composition (Fluid Phase)" |
---|
236 | OutletL.Fluid.z = Inlet.Fluid.z; |
---|
237 | |
---|
238 | "Solid Stream Composition (Fluid Phase)" |
---|
239 | OutletS.Fluid.z = Inlet.Fluid.z; |
---|
240 | |
---|
241 | "Global Molar Balance (Solid Phase)" |
---|
242 | Inlet.Solid.F = OutletS.Solid.F + OutletL.Solid.F; |
---|
243 | |
---|
244 | "Solid Separation Efficiency" |
---|
245 | OutletS.Solid.Fw = Inlet.Solid.Fw * frac_sol; |
---|
246 | |
---|
247 | "Liquid Stream Composition (Solid Phase)" |
---|
248 | OutletS.Solid.z = Inlet.Solid.z; |
---|
249 | |
---|
250 | "Solid Stream Composition (Solid Phase)" |
---|
251 | OutletL.Solid.z = Inlet.Solid.z; |
---|
252 | |
---|
253 | "Solid Humidity" |
---|
254 | OutletS.Fluid.Fw = humidity * (OutletS.Fluid.Fw + OutletS.Solid.Fw); |
---|
255 | |
---|
256 | "Liquid Stream Impurities" |
---|
257 | OutletL.Solid.Fw = impurity * (OutletL.Fluid.Fw + OutletL.Solid.Fw); |
---|
258 | |
---|
259 | "Solid Stream Enthalpy (Fluid Phase)" |
---|
260 | OutletS.Fluid.h = Inlet.Fluid.h; |
---|
261 | |
---|
262 | "Liquid Stream Enthalpy (Fluid Phase)" |
---|
263 | OutletL.Fluid.h = Inlet.Fluid.h; |
---|
264 | |
---|
265 | "Solid Stream Enthalpy (Solid Phase)" |
---|
266 | OutletS.Solid.h = Inlet.Solid.h; |
---|
267 | |
---|
268 | "Liquid Stream Enthalpy (Solid Phase)" |
---|
269 | OutletL.Solid.h = Inlet.Solid.h; |
---|
270 | |
---|
271 | "Thermal Equilibrium 1" |
---|
272 | OutletS.T = Inlet.T; |
---|
273 | |
---|
274 | "Thermal Equilibrium 2" |
---|
275 | OutletL.T = Inlet.T; |
---|
276 | |
---|
277 | "Solid Stream Vapour Fraction" |
---|
278 | OutletS.Fluid.v = Inlet.Fluid.v; |
---|
279 | |
---|
280 | "Liquid Stream Vapour Fraction" |
---|
281 | OutletL.Fluid.v = Inlet.Fluid.v; |
---|
282 | |
---|
283 | "Mechanical Equilibrium 1" |
---|
284 | OutletS.P = Inlet.P; |
---|
285 | |
---|
286 | "Mechanical Equilibrium 2" |
---|
287 | OutletL.P = Inlet.P; |
---|
288 | |
---|
289 | end |
---|
290 | |
---|
291 | Model sepU |
---|
292 | |
---|
293 | ATTRIBUTES |
---|
294 | Pallete = true; |
---|
295 | Icon = "icon/sepD"; |
---|
296 | Brief = "Model of a Separator with a Solid and a Liquid Streams"; |
---|
297 | Info = |
---|
298 | "== GENERAL == |
---|
299 | Model of a generic separator with a Solid and a Liquid |
---|
300 | streams. |
---|
301 | |
---|
302 | == ASSUMPTIONS == |
---|
303 | * Steady-state; |
---|
304 | * Adiabatic. |
---|
305 | |
---|
306 | == SPECIFY == |
---|
307 | * The inlet stream: |
---|
308 | flow rate |
---|
309 | temperature |
---|
310 | pressure |
---|
311 | stream composition; |
---|
312 | * The split fractions for the fluid and solid phases. |
---|
313 | |
---|
314 | == SET == |
---|
315 | * Number of stream components(Ncomp/NcompS). |
---|
316 | "; |
---|
317 | |
---|
318 | #*------------------------------------------------------------------- |
---|
319 | * Declaracao de variaveis |
---|
320 | *--------------------------------------------------------------------*# |
---|
321 | |
---|
322 | VARIABLES |
---|
323 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
324 | out OutletS as main_stream (Brief = "Solids-Rich Stream", PosX=1.0, PosY=0.08, Symbol="_{outS}", Protected = false); |
---|
325 | out OutletL as main_stream (Brief = "Liquid-Rich Stream", PosX=1.0, PosY=0.92, Symbol="_{outL}", Protected = false ); |
---|
326 | frac_sol as fraction (Brief = "Solids Separation Efficiency", Symbol = "f_{sol}"); |
---|
327 | frac_liq as fraction (Brief = "Liquid Separation Efficiency", Symbol = "f_{liq}"); |
---|
328 | humidity as fraction (Brief = "Fraction of water in the solid"); |
---|
329 | impurity as fraction (Brief = "Fraction of solids in the liquid"); |
---|
330 | |
---|
331 | #*------------------------------------------------------------------- |
---|
332 | #Parametros |
---|
333 | *--------------------------------------------------------------------*# |
---|
334 | |
---|
335 | PARAMETERS |
---|
336 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
337 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
338 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
339 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
340 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
341 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
342 | |
---|
343 | #*------------------------------------------------------------------- |
---|
344 | * Define o valor dos parametros declarados no modelo |
---|
345 | *--------------------------------------------------------------------*# |
---|
346 | |
---|
347 | SET |
---|
348 | |
---|
349 | M = PP.MolecularWeight(); |
---|
350 | MS = PPS.MolecularWeight(); |
---|
351 | |
---|
352 | #*------------------------------------------------------------------- |
---|
353 | * Equacoes do modelo |
---|
354 | *--------------------------------------------------------------------*# |
---|
355 | |
---|
356 | EQUATIONS |
---|
357 | "Global Molar Balance (Fluid Phase)" |
---|
358 | Inlet.Fluid.F = OutletS.Fluid.F + OutletL.Fluid.F; |
---|
359 | |
---|
360 | "Liquid Separation Efficiency" |
---|
361 | OutletL.Fluid.Fw = Inlet.Fluid.Fw * frac_liq; |
---|
362 | |
---|
363 | "Liquid Stream Composition (Fluid Phase)" |
---|
364 | OutletL.Fluid.z = Inlet.Fluid.z; |
---|
365 | |
---|
366 | "Solid Stream Composition (Fluid Phase)" |
---|
367 | OutletS.Fluid.z = Inlet.Fluid.z; |
---|
368 | |
---|
369 | "Global Molar Balance (Solid Phase)" |
---|
370 | Inlet.Solid.F = OutletS.Solid.F + OutletL.Solid.F; |
---|
371 | |
---|
372 | "Solid Separation Efficiency" |
---|
373 | OutletS.Solid.Fw = Inlet.Solid.Fw * frac_sol; |
---|
374 | |
---|
375 | "Liquid Stream Composition (Solid Phase)" |
---|
376 | OutletS.Solid.z = Inlet.Solid.z; |
---|
377 | |
---|
378 | "Solid Stream Composition (Solid Phase)" |
---|
379 | OutletL.Solid.z = Inlet.Solid.z; |
---|
380 | |
---|
381 | "Solid Humidity" |
---|
382 | OutletS.Fluid.Fw = humidity * (OutletS.Fluid.Fw + OutletS.Solid.Fw); |
---|
383 | |
---|
384 | "Liquid Stream Impurities" |
---|
385 | OutletL.Solid.Fw = impurity * (OutletL.Fluid.Fw + OutletL.Solid.Fw); |
---|
386 | |
---|
387 | "Solid Stream Enthalpy (Fluid Phase)" |
---|
388 | OutletS.Fluid.h = Inlet.Fluid.h; |
---|
389 | |
---|
390 | "Liquid Stream Enthalpy (Fluid Phase)" |
---|
391 | OutletL.Fluid.h = Inlet.Fluid.h; |
---|
392 | |
---|
393 | "Solid Stream Enthalpy (Solid Phase)" |
---|
394 | OutletS.Solid.h = Inlet.Solid.h; |
---|
395 | |
---|
396 | "Liquid Stream Enthalpy (Solid Phase)" |
---|
397 | OutletL.Solid.h = Inlet.Solid.h; |
---|
398 | |
---|
399 | "Thermal Equilibrium 1" |
---|
400 | OutletS.T = Inlet.T; |
---|
401 | |
---|
402 | "Thermal Equilibrium 2" |
---|
403 | OutletL.T = Inlet.T; |
---|
404 | |
---|
405 | "Solid Stream Vapour Fraction" |
---|
406 | OutletS.Fluid.v = Inlet.Fluid.v; |
---|
407 | |
---|
408 | "Liquid Stream Vapour Fraction" |
---|
409 | OutletL.Fluid.v = Inlet.Fluid.v; |
---|
410 | |
---|
411 | "Mechanical Equilibrium 1" |
---|
412 | OutletS.P = Inlet.P; |
---|
413 | |
---|
414 | "Mechanical Equilibrium 2" |
---|
415 | OutletL.P = Inlet.P; |
---|
416 | |
---|
417 | end |
---|
418 | |
---|
419 | Model sepD |
---|
420 | |
---|
421 | ATTRIBUTES |
---|
422 | Pallete = true; |
---|
423 | Icon = "icon/sepU"; |
---|
424 | Brief = "Model of a Separator with a Solid and a Liquid Streams"; |
---|
425 | Info = |
---|
426 | "== GENERAL == |
---|
427 | Model of a generic separator with a Solid and a Liquid |
---|
428 | streams. |
---|
429 | |
---|
430 | == ASSUMPTIONS == |
---|
431 | * Steady-state; |
---|
432 | * Adiabatic. |
---|
433 | |
---|
434 | == SPECIFY == |
---|
435 | * The inlet stream: |
---|
436 | flow rate |
---|
437 | temperature |
---|
438 | pressure |
---|
439 | stream composition; |
---|
440 | * The split fractions for the fluid and solid phases. |
---|
441 | |
---|
442 | == SET == |
---|
443 | * Number of stream components(Ncomp/NcompS). |
---|
444 | "; |
---|
445 | |
---|
446 | #*------------------------------------------------------------------- |
---|
447 | * Declaracao de variaveis |
---|
448 | *--------------------------------------------------------------------*# |
---|
449 | |
---|
450 | VARIABLES |
---|
451 | in Inlet as main_stream (Brief = "Inlet Stream", PosX=0, PosY=0.50, Symbol="_{in}", Protected = false); |
---|
452 | out OutletS as main_stream (Brief = "Solids-Rich Stream", PosX=1.0, PosY=0.08, Symbol="_{outS}", Protected = false); |
---|
453 | out OutletL as main_stream (Brief = "Liquid-Rich Stream", PosX=1.0, PosY=0.92, Symbol="_{outL}", Protected = false ); |
---|
454 | frac_sol as fraction (Brief = "Solids Separation Efficiency", Symbol = "f_{sol}"); |
---|
455 | frac_liq as fraction (Brief = "Liquid Separation Efficiency", Symbol = "f_{liq}"); |
---|
456 | humidity as fraction (Brief = "Fraction of water in the solid"); |
---|
457 | impurity as fraction (Brief = "Fraction of solids in the liquid"); |
---|
458 | |
---|
459 | |
---|
460 | #*------------------------------------------------------------------- |
---|
461 | #Parametros |
---|
462 | *--------------------------------------------------------------------*# |
---|
463 | |
---|
464 | PARAMETERS |
---|
465 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
466 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
467 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
468 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
469 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
470 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
471 | |
---|
472 | #*------------------------------------------------------------------- |
---|
473 | * Define o valor dos parametros declarados no modelo |
---|
474 | *--------------------------------------------------------------------*# |
---|
475 | |
---|
476 | SET |
---|
477 | |
---|
478 | M = PP.MolecularWeight(); |
---|
479 | MS = PPS.MolecularWeight(); |
---|
480 | |
---|
481 | #*------------------------------------------------------------------- |
---|
482 | * Equacoes do modelo |
---|
483 | *--------------------------------------------------------------------*# |
---|
484 | |
---|
485 | EQUATIONS |
---|
486 | "Global Molar Balance (Fluid Phase)" |
---|
487 | Inlet.Fluid.F = OutletS.Fluid.F + OutletL.Fluid.F; |
---|
488 | |
---|
489 | "Liquid Separation Efficiency" |
---|
490 | OutletL.Fluid.Fw = Inlet.Fluid.Fw * frac_liq; |
---|
491 | |
---|
492 | "Liquid Stream Composition (Fluid Phase)" |
---|
493 | OutletL.Fluid.z = Inlet.Fluid.z; |
---|
494 | |
---|
495 | "Solid Stream Composition (Fluid Phase)" |
---|
496 | OutletS.Fluid.z = Inlet.Fluid.z; |
---|
497 | |
---|
498 | "Global Molar Balance (Solid Phase)" |
---|
499 | Inlet.Solid.F = OutletS.Solid.F + OutletL.Solid.F; |
---|
500 | |
---|
501 | "Solid Separation Efficiency" |
---|
502 | OutletS.Solid.Fw = Inlet.Solid.Fw * frac_sol; |
---|
503 | |
---|
504 | "Liquid Stream Composition (Solid Phase)" |
---|
505 | OutletS.Solid.z = Inlet.Solid.z; |
---|
506 | |
---|
507 | "Solid Stream Composition (Solid Phase)" |
---|
508 | OutletL.Solid.z = Inlet.Solid.z; |
---|
509 | |
---|
510 | "Solid Humidity" |
---|
511 | OutletS.Fluid.Fw = humidity * (OutletS.Fluid.Fw + OutletS.Solid.Fw); |
---|
512 | |
---|
513 | "Liquid Stream Impurities" |
---|
514 | OutletL.Solid.Fw = impurity * (OutletL.Fluid.Fw + OutletL.Solid.Fw); |
---|
515 | |
---|
516 | "Solid Stream Enthalpy (Fluid Phase)" |
---|
517 | OutletS.Fluid.h = Inlet.Fluid.h; |
---|
518 | |
---|
519 | "Liquid Stream Enthalpy (Fluid Phase)" |
---|
520 | OutletL.Fluid.h = Inlet.Fluid.h; |
---|
521 | |
---|
522 | "Solid Stream Enthalpy (Solid Phase)" |
---|
523 | OutletS.Solid.h = Inlet.Solid.h; |
---|
524 | |
---|
525 | "Liquid Stream Enthalpy (Solid Phase)" |
---|
526 | OutletL.Solid.h = Inlet.Solid.h; |
---|
527 | |
---|
528 | "Thermal Equilibrium 1" |
---|
529 | OutletS.T = Inlet.T; |
---|
530 | |
---|
531 | "Thermal Equilibrium 2" |
---|
532 | OutletL.T = Inlet.T; |
---|
533 | |
---|
534 | "Solid Stream Vapour Fraction" |
---|
535 | OutletS.Fluid.v = Inlet.Fluid.v; |
---|
536 | |
---|
537 | "Liquid Stream Vapour Fraction" |
---|
538 | OutletL.Fluid.v = Inlet.Fluid.v; |
---|
539 | |
---|
540 | "Mechanical Equilibrium 1" |
---|
541 | OutletS.P = Inlet.P; |
---|
542 | |
---|
543 | "Mechanical Equilibrium 2" |
---|
544 | OutletL.P = Inlet.P; |
---|
545 | |
---|
546 | end |
---|
547 | |
---|
548 | FlowSheet teste_sep |
---|
549 | |
---|
550 | #*------------------------------------------------------------------- |
---|
551 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
552 | *--------------------------------------------------------------------*# |
---|
553 | |
---|
554 | DEVICES |
---|
555 | splt as sepR; |
---|
556 | S101 as main_sourceR; |
---|
557 | |
---|
558 | |
---|
559 | #*------------------------------------------------------------------- |
---|
560 | * Especifica as conexoes entre os modelos |
---|
561 | *--------------------------------------------------------------------*# |
---|
562 | |
---|
563 | CONNECTIONS |
---|
564 | S101.Outlet to splt.Inlet; |
---|
565 | |
---|
566 | |
---|
567 | #*------------------------------------------------------------------- |
---|
568 | #Parametros |
---|
569 | *--------------------------------------------------------------------*# |
---|
570 | |
---|
571 | PARAMETERS |
---|
572 | PP as Plugin (Brief = "External Physical Properties", |
---|
573 | Type="PP", |
---|
574 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
575 | ); |
---|
576 | PPS as Plugin (Brief = "External Physical Properties", |
---|
577 | Type="PP", |
---|
578 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
579 | ); |
---|
580 | |
---|
581 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
582 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
583 | flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
584 | sol as ConstituentSolid(Symbol = " ", Protected = true); |
---|
585 | |
---|
586 | |
---|
587 | #*------------------------------------------------------------------- |
---|
588 | * Especifica variaveis definidas no modelo |
---|
589 | *--------------------------------------------------------------------*# |
---|
590 | |
---|
591 | SPECIFY |
---|
592 | S101.CompositionOfFluid = [0.999, 0.0005, 0.0005, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
593 | S101.CompositionOfSolid = [0.4, 0.3, 0.28, 0, 0.02, 0, 0 , 0, 0]; |
---|
594 | S101.Fluid.Fw = 50 * 'kg/h'; |
---|
595 | S101.Solid.Fw = 70 * 'kg/h'; |
---|
596 | S101.T = 300.318 * 'K'; |
---|
597 | S101.P = 1 * 'atm'; |
---|
598 | |
---|
599 | splt.frac_liq = 0.5; |
---|
600 | splt.frac_sol = 0.5; |
---|
601 | |
---|
602 | #*------------------------------------------------------------------- |
---|
603 | * Define o valor dos parametros declarados no modelo |
---|
604 | *--------------------------------------------------------------------*# |
---|
605 | |
---|
606 | SET |
---|
607 | NComp = PP.NumberOfComponents(); |
---|
608 | NCompS = PPS.NumberOfComponents(); |
---|
609 | |
---|
610 | #*------------------------------------------------------------------- |
---|
611 | * Opcoes de Solver |
---|
612 | *--------------------------------------------------------------------*# |
---|
613 | |
---|
614 | OPTIONS |
---|
615 | Dynamic = false; |
---|
616 | |
---|
617 | end |
---|
618 | |
---|
619 | FlowSheet teste1_properties |
---|
620 | |
---|
621 | #*------------------------------------------------------------------- |
---|
622 | * Especifica variaveis definidas no modelo |
---|
623 | *--------------------------------------------------------------------*# |
---|
624 | |
---|
625 | VARIABLES |
---|
626 | v as fraction; |
---|
627 | x(25) as fraction; |
---|
628 | y(25) as fraction; |
---|
629 | z(25) as fraction; |
---|
630 | h as enth_mol; |
---|
631 | hliq as enth_mol; |
---|
632 | hvap as enth_mol; |
---|
633 | P as pressure; |
---|
634 | T as temperature; |
---|
635 | |
---|
636 | #*------------------------------------------------------------------- |
---|
637 | * Equacoes do modelo |
---|
638 | *--------------------------------------------------------------------*# |
---|
639 | |
---|
640 | EQUATIONS |
---|
641 | [v, x, y] = PP.FlashPH(P, h, z); |
---|
642 | |
---|
643 | "Enthalpy" |
---|
644 | h = (1-v)*hliq + v*hvap; |
---|
645 | |
---|
646 | hliq = PP.LiquidEnthalpy(T, P, x); |
---|
647 | hvap = PP.VapourEnthalpy(T, P, y); |
---|
648 | |
---|
649 | #*------------------------------------------------------------------- |
---|
650 | * Especifica variaveis definidas no modelo |
---|
651 | *--------------------------------------------------------------------*# |
---|
652 | |
---|
653 | SPECIFY |
---|
654 | h = 524.12 * 'kJ/kmol'; |
---|
655 | P = 12.5 * 'atm'; |
---|
656 | z = [0.999, 0.0005, 0.0005, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
657 | |
---|
658 | #*------------------------------------------------------------------- |
---|
659 | #Parametros |
---|
660 | *--------------------------------------------------------------------*# |
---|
661 | |
---|
662 | PARAMETERS |
---|
663 | PP as Plugin (Brief = "External Physical Properties", |
---|
664 | Type="PP", |
---|
665 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
666 | ); |
---|
667 | |
---|
668 | #*------------------------------------------------------------------- |
---|
669 | * Opcoes de Solver |
---|
670 | *--------------------------------------------------------------------*# |
---|
671 | |
---|
672 | OPTIONS |
---|
673 | Dynamic = false; |
---|
674 | NLASolver( |
---|
675 | # File = "nlasolver", |
---|
676 | File = "sundials", |
---|
677 | MaxIterations = 300 |
---|
678 | ); |
---|
679 | end |
---|
680 | |
---|
681 | FlowSheet teste2_properties |
---|
682 | |
---|
683 | #*------------------------------------------------------------------- |
---|
684 | * Especifica variaveis definidas no modelo |
---|
685 | *--------------------------------------------------------------------*# |
---|
686 | |
---|
687 | VARIABLES |
---|
688 | v as fraction; |
---|
689 | x(25) as fraction; |
---|
690 | y(25) as fraction; |
---|
691 | |
---|
692 | #*------------------------------------------------------------------- |
---|
693 | * Equacoes do modelo |
---|
694 | *--------------------------------------------------------------------*# |
---|
695 | |
---|
696 | EQUATIONS |
---|
697 | [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]); |
---|
698 | |
---|
699 | #*------------------------------------------------------------------- |
---|
700 | #Parametros |
---|
701 | *--------------------------------------------------------------------*# |
---|
702 | |
---|
703 | PARAMETERS |
---|
704 | |
---|
705 | PP as Plugin (Brief = "External Physical Properties", |
---|
706 | Type="PP", |
---|
707 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
708 | ); |
---|
709 | |
---|
710 | #*------------------------------------------------------------------- |
---|
711 | * Opcoes de Solver |
---|
712 | *--------------------------------------------------------------------*# |
---|
713 | |
---|
714 | OPTIONS |
---|
715 | Dynamic = false; |
---|
716 | |
---|
717 | end |
---|