1 | #*------------------------------------------------------------------- |
---|
2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
3 | * |
---|
4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
6 | * http://www.enq.ufrgs.br/alsoc. |
---|
7 | * |
---|
8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
14 | * |
---|
15 | *------------------------------------------------------------------- |
---|
16 | * Author: Maurício Carvalho Maciel |
---|
17 | * $Id: mixer.mso 269 2007-06-16 18:50:11Z rafael $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "stage_separators/flash"; |
---|
21 | |
---|
22 | Model mixer as flash_steady |
---|
23 | ATTRIBUTES |
---|
24 | Pallete = true; |
---|
25 | Icon = "mixer"; |
---|
26 | Brief = "Model of a mixer"; |
---|
27 | Info = " |
---|
28 | Assumptions: |
---|
29 | * thermodynamics equilibrium |
---|
30 | * adiabatic |
---|
31 | |
---|
32 | Specify: |
---|
33 | * the inlet streams"; |
---|
34 | |
---|
35 | PARAMETERS |
---|
36 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
37 | Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2); |
---|
38 | |
---|
39 | VARIABLES |
---|
40 | in Inlet_mixer(Ninlet) as stream (Brief = "Inlet streams"); |
---|
41 | out Outlet as stream (Brief = "Outlet stream"); |
---|
42 | out Out_int as stream (Brief = "Intermediate Outlet stream"); |
---|
43 | zeroQ as heat_rate (Brief="No Heat rate supplied"); |
---|
44 | |
---|
45 | CONNECTIONS |
---|
46 | |
---|
47 | Out_int to Inlet; |
---|
48 | zeroQ to Q; |
---|
49 | |
---|
50 | EQUATIONS |
---|
51 | |
---|
52 | "Flow" |
---|
53 | Out_int.F = sum(Inlet_mixer.F); |
---|
54 | |
---|
55 | for i in [1:NComp] |
---|
56 | |
---|
57 | "Composition" |
---|
58 | Out_int.F*Out_int.z(i) = sum(Inlet_mixer.F*Inlet_mixer.z(i)); |
---|
59 | end |
---|
60 | |
---|
61 | "Energy Balance" |
---|
62 | Out_int.F*Out_int.h = sum(Inlet_mixer.F*Inlet_mixer.h); |
---|
63 | |
---|
64 | "Pressure" |
---|
65 | Out_int.P = min(Inlet_mixer.P); |
---|
66 | Out_int.P = OutletV.P; |
---|
67 | |
---|
68 | "Temperature" |
---|
69 | Out_int.T = OutletV.T; |
---|
70 | |
---|
71 | "Vapourisation Fraction" |
---|
72 | Out_int.v = vfrac; |
---|
73 | |
---|
74 | Outlet.F = Inlet.F; |
---|
75 | Outlet.z = Inlet.z; |
---|
76 | Outlet.v = Inlet.v; |
---|
77 | Outlet.T = Inlet.T; |
---|
78 | Outlet.h = Inlet.h; |
---|
79 | Outlet.P = Inlet.P; |
---|
80 | |
---|
81 | zeroQ = 0*'kW'; |
---|
82 | |
---|
83 | end |
---|
84 | |
---|