source: branches/gui/eml/mixers_splitters/splitter.mso @ 808

Last change on this file since 808 was 757, checked in by gerson bicca, 14 years ago

some adaption in models

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.0 KB
RevLine 
[1]1#*-------------------------------------------------------------------
[76]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*
[1]15*----------------------------------------------------------------------
[269]16* Author: Maurício Carvalho Maciel, Paula B. Staudt, Rafael P. Soares
[1]17* $Id: splitter.mso 757 2009-06-03 20:07:22Z bicca $
18*--------------------------------------------------------------------*#
19
20
21using "streams";
22
23Model splitter_n
[269]24        ATTRIBUTES
[739]25        Pallete         = false;
[304]26        Icon            = "icon/splitter_n";
[739]27        Brief           = "Model of a splitter (NOT Handled by the GUI)";
[354]28        Info            =
29"== Assumptions ==
30* thermodynamics equilibrium
31* adiabatic
[269]32                       
[354]33== Specify ==
34* the inlet stream
35* (Noutlet - 1) fraction of split of the outlet streams:
36
37        frac(i) = (Mole Flow of the outlet stream i /
38                                Mole Flow of the inlet stream)
[269]39                                where i = 1, 2,...,Noutlet
[354]40";
[269]41       
[1]42        PARAMETERS
43        NOutlet as Integer (Brief = "Number of Outlet Streams", Lower = 1);
44       
45        VARIABLES
[351]46in      Inlet   as stream (Brief = "Inlet stream", PosX=0, PosY=0.5001, Symbol="_{in}");
47out Outlet(NOutlet)  as stream (Brief = "Outlet streams", PosX=1, PosY=0.5, Symbol="_{out}");
48        frac(NOutlet) as fraction (Brief = "Distribution of Outlets", Default=0.5, Symbol="\phi");
[1]49
50        EQUATIONS
51       
52        sum(frac) = 1;
53       
[574]54        for i in [1:NOutlet] do
[1]55               
56                "Flow"
57                Outlet(i).F = Inlet.F*frac(i);
58               
59                "Composition"
60                Outlet(i).z = Inlet.z;
61       
62                "Pressure"
63                Outlet(i).P = Inlet.P;
64       
65                "Enthalpy"
66                Outlet(i).h = Inlet.h;
67       
68                "Temperature"   
69                Outlet(i).T = Inlet.T;
70         
71                "Vapourisation Fraction"
72                Outlet(i).v = Inlet.v;
73        end
74
75end
76
[739]77Model splitter2
[269]78        ATTRIBUTES
79        Pallete         = true;
[304]80        Icon            = "icon/splitter";
[269]81        Brief           = "Splitter with 2 outlet streams";
[354]82        Info            =
83"== Assumptions ==
[739]84*Thermodynamics equilibrium
85*Adiabatic
[269]86                       
[354]87== Specify ==
[739]88* The inlet stream
89* One FlowRatios of split of the outlet streams:
[354]90
[739]91        FlowRatios(i) = (Mole Flow of the outlet stream i /
[354]92                                Mole Flow of the inlet stream)
[739]93                                where i = 1, 2
[354]94";
[269]95
[739]96VARIABLES
[351]97in  Inlet   as stream (Brief = "Inlet stream", PosX=0, PosY=0.5069, Symbol="_{in}");
98out Outlet1 as stream (Brief = "Outlet stream 1", PosX=1, PosY=0.3027, Symbol="_{out1}");
99out Outlet2 as stream (Brief = "Outlet stream 2", PosX=1, PosY=0.7141, Symbol="_{out2}");
[739]100        FlowRatios(2)   as fraction     (Brief = "Distribution of Outlets", Default=0.33, Symbol="\phi");
[1]101
[739]102EQUATIONS
103
104"Normalize Flow Ratios"
105        sum(FlowRatios) = 1;
106       
107"Flow"
108        Outlet1.F = Inlet.F * FlowRatios(1);
[1]109        Outlet1.F + Outlet2.F = Inlet.F;
[739]110
111"Composition"
[1]112        Outlet1.z = Inlet.z;
113        Outlet2.z = Inlet.z;
[739]114
115"Pressure"
[1]116        Outlet1.P = Inlet.P;
117        Outlet2.P = Inlet.P;
[739]118
119"Enthalpy"
[1]120        Outlet1.h = Inlet.h;
121        Outlet2.h = Inlet.h;
[739]122
123"Temperature"
[1]124        Outlet1.T = Inlet.T;
125        Outlet2.T = Inlet.T;
[739]126
127"Vapourisation Fraction"
[1]128        Outlet1.v = Inlet.v;
129        Outlet2.v = Inlet.v;
[739]130
[1]131end
[739]132
133Model splitter3
134        ATTRIBUTES
135        Pallete         = true;
136        Icon            = "icon/splitter";
137        Brief           = "Model of a splitter with 3 outlet streams";
138        Info            =
139"== Assumptions ==
140* Thermodynamics equilibrium
141* Adiabatic
142                       
143== Specify ==
144*The inlet stream
145*Two FlowRatios of split of the outlet streams:
146
147        FlowRatios(i) = (Mole Flow of the outlet stream i /
148                                Mole Flow of the inlet stream)
149                                where i = 1, 2, 3
150";
151       
152VARIABLES
153
154in      Inlet                           as stream       (Brief = "Inlet stream", PosX=0, PosY=0.5001, Symbol="_{in}");
155out  Outlet1    as stream       (Brief = "Outlet stream 1", PosX=1, PosY=0.25, Symbol="_{Out1}");
156out  Outlet2    as stream       (Brief = "Outlet stream 2", PosX=1, PosY=0.5059, Symbol="_{Out2}");
157out  Outlet3    as stream       (Brief = "Outlet stream 3", PosX=1, PosY=0.75, Symbol="_{Out3}");
158
159        FlowRatios(3)   as fraction     (Brief = "Distribution of Outlets", Default=0.33, Symbol="\phi");
160
161EQUATIONS
162       
163"Normalize Flow Ratios"
164        sum(FlowRatios) = 1;
165       
166"Outlet1 Flow"
167        Outlet1.F = Inlet.F*FlowRatios(1);
168       
169"Outlet2 Flow"
170        Outlet2.F = Inlet.F*FlowRatios(2);
171       
172"Outlet3 Flow"
173        Outlet3.F = Inlet.F*FlowRatios(3);
174       
175"Outlet1 Composition"
176        Outlet1.z = Inlet.z;
177
178"Outlet2 Composition"
179        Outlet2.z = Inlet.z;
180
181"Outlet3 Composition"
182        Outlet3.z = Inlet.z;
183
184"Outlet1 Pressure"
185        Outlet1.P = Inlet.P;
186
187"Outlet2 Pressure"
188        Outlet2.P = Inlet.P;
189
190"Outlet3 Pressure"
191        Outlet3.P = Inlet.P;
192
193"Outlet1 Enthalpy"
194        Outlet1.h = Inlet.h;
195
196"Outlet2 Enthalpy"
197        Outlet2.h = Inlet.h;
198
199"Outlet3 Enthalpy"
200        Outlet3.h = Inlet.h;
201       
202"Outlet1 Temperature"   
203        Outlet1.T = Inlet.T;
204
205"Outlet2 Temperature"   
206        Outlet2.T = Inlet.T;
207
208"Outlet3 Temperature"   
209        Outlet3.T = Inlet.T;
210
211"Outlet1 Vapourisation Fraction"
212        Outlet1.v = Inlet.v;
213
214"Outlet2 Vapourisation Fraction"
215        Outlet2.v = Inlet.v;
216       
217"Outlet3 Vapourisation Fraction"
218        Outlet3.v = Inlet.v;
219
220end
[757]221
222Model splitter_column
223        ATTRIBUTES
224        Pallete         = true;
225        Icon            = "icon/splitter_column";
226        Brief           = "Splitter with 2 outlet streams to be used with column section model";
227        Info            =
228"== Assumptions ==
229*Thermodynamics equilibrium
230*Adiabatic
231                       
232== Specify ==
233* The inlet stream
234* One FlowRatios of split of the outlet streams:
235
236        FlowRatios(i) = (Mole Flow of the outlet stream i /
237                                Mole Flow of the inlet stream)
238                                where i = 1, 2
239";
240
241VARIABLES
242in  Inlet   as stream (Brief = "Inlet stream", PosX=0.5, PosY=0, Symbol="_{in}");
243out Reflux as stream (Brief = "Reflux stream", PosX=0.25, PosY=1, Symbol="_{reflux}");
244out Distillate as stream (Brief = "Distillate stream", PosX=0.75, PosY=1, Symbol="_{distillate}");
245        FlowRatios(2)   as fraction     (Brief = "Distribution of Outlets", Default=0.33, Symbol="\phi");
246
247EQUATIONS
248
249"Normalize Flow Ratios"
250        sum(FlowRatios) = 1;
251       
252"Flow"
253        Reflux.F = Inlet.F * FlowRatios(1);
254        Inlet.F = Reflux.F + Distillate.F;
255
256"Composition"
257        Reflux.z = Inlet.z;
258        Distillate.z = Inlet.z;
259
260"Pressure"
261        Reflux.P = Inlet.P;
262        Distillate.P = Inlet.P;
263
264"Enthalpy"
265        Reflux.h = Inlet.h;
266        Distillate.h = Inlet.h;
267
268"Temperature"
269        Reflux.T = Inlet.T;
270        Distillate.T = Inlet.T;
271
272"Vapourisation Fraction"
273        Reflux.v = Inlet.v;
274        Distillate.v = Inlet.v;
275
276end
Note: See TracBrowser for help on using the repository browser.