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, Paula B. Staudt, Rafael P. Soares |
---|
17 | * $Id: splitter.mso 269 2007-06-16 18:50:11Z rafael $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | |
---|
21 | using "streams"; |
---|
22 | |
---|
23 | Model splitter_n |
---|
24 | ATTRIBUTES |
---|
25 | Pallete = true; |
---|
26 | Icon = "splitter_n"; |
---|
27 | Brief = "Model of a splitter"; |
---|
28 | Info = " |
---|
29 | Assumptions: |
---|
30 | * thermodynamics equilibrium |
---|
31 | * adiabatic |
---|
32 | |
---|
33 | Specify: |
---|
34 | * the inlet stream |
---|
35 | * (Noutlet - 1) fraction of split of the outlet streams: |
---|
36 | frac(i) = (Mole Flow of the outlet stream i / |
---|
37 | Mole Flow of the inlet stream) |
---|
38 | where i = 1, 2,...,Noutlet |
---|
39 | "; |
---|
40 | |
---|
41 | PARAMETERS |
---|
42 | NOutlet as Integer (Brief = "Number of Outlet Streams", Lower = 1); |
---|
43 | |
---|
44 | VARIABLES |
---|
45 | in Inlet as stream; |
---|
46 | out Outlet(NOutlet) as stream; |
---|
47 | frac(NOutlet) as fraction (Brief = "Distribution of Outlets", Default=0.5); |
---|
48 | |
---|
49 | EQUATIONS |
---|
50 | |
---|
51 | sum(frac) = 1; |
---|
52 | |
---|
53 | for i in [1:NOutlet] |
---|
54 | |
---|
55 | "Flow" |
---|
56 | Outlet(i).F = Inlet.F*frac(i); |
---|
57 | |
---|
58 | "Composition" |
---|
59 | Outlet(i).z = Inlet.z; |
---|
60 | |
---|
61 | "Pressure" |
---|
62 | Outlet(i).P = Inlet.P; |
---|
63 | |
---|
64 | "Enthalpy" |
---|
65 | Outlet(i).h = Inlet.h; |
---|
66 | |
---|
67 | "Temperature" |
---|
68 | Outlet(i).T = Inlet.T; |
---|
69 | |
---|
70 | "Vapourisation Fraction" |
---|
71 | Outlet(i).v = Inlet.v; |
---|
72 | end |
---|
73 | |
---|
74 | end |
---|
75 | |
---|
76 | |
---|
77 | Model splitter |
---|
78 | ATTRIBUTES |
---|
79 | Pallete = true; |
---|
80 | Icon = "splitter"; |
---|
81 | Brief = "Splitter with 2 outlet streams"; |
---|
82 | Info = " |
---|
83 | Assumptions: |
---|
84 | * thermodynamics equilibrium |
---|
85 | * adiabatic |
---|
86 | |
---|
87 | Specify: |
---|
88 | * the inlet stream |
---|
89 | * (Noutlet - 1) fraction of split of the outlet streams: |
---|
90 | frac(i) = (Mole Flow of the outlet stream i / |
---|
91 | Mole Flow of the inlet stream) |
---|
92 | where i = 1, 2,...,Noutlet |
---|
93 | "; |
---|
94 | |
---|
95 | VARIABLES |
---|
96 | in Inlet as stream; |
---|
97 | out Outlet1 as stream; |
---|
98 | out Outlet2 as stream; |
---|
99 | frac as fraction (Brief = "Fraction to Outlet 1"); |
---|
100 | |
---|
101 | EQUATIONS |
---|
102 | "Flow" |
---|
103 | Outlet1.F = Inlet.F * frac; |
---|
104 | Outlet1.F + Outlet2.F = Inlet.F; |
---|
105 | "Composition" |
---|
106 | Outlet1.z = Inlet.z; |
---|
107 | Outlet2.z = Inlet.z; |
---|
108 | "Pressure" |
---|
109 | Outlet1.P = Inlet.P; |
---|
110 | Outlet2.P = Inlet.P; |
---|
111 | "Enthalpy" |
---|
112 | Outlet1.h = Inlet.h; |
---|
113 | Outlet2.h = Inlet.h; |
---|
114 | "Temperature" |
---|
115 | Outlet1.T = Inlet.T; |
---|
116 | Outlet2.T = Inlet.T; |
---|
117 | "Vapourisation Fraction" |
---|
118 | Outlet1.v = Inlet.v; |
---|
119 | Outlet2.v = Inlet.v; |
---|
120 | end |
---|