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

Last change on this file since 993 was 910, checked in by Argimiro Resende Secchi, 13 years ago

Checking new EML.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 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 910 2010-02-20 03:24:41Z arge $
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;
[835]80        Icon            = "icon/splitter_column";
[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
[835]97in  Inlet   as stream (Brief = "Inlet stream", PosX=0.5, PosY=0, Symbol="_{in}");
98out Outlet1 as stream (Brief = "Outlet stream 1", PosX=0.25, PosY=1, Symbol="_{out1}");
99out Outlet2 as stream (Brief = "Outlet stream 2", PosX=0.75, PosY=1, 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
[835]223
224ATTRIBUTES
[757]225        Pallete         = true;
226        Icon            = "icon/splitter_column";
227        Brief           = "Splitter with 2 outlet streams to be used with column section model";
228        Info            =
229"== Assumptions ==
230*Thermodynamics equilibrium
231*Adiabatic
[835]232
[757]233== Specify ==
234* The inlet stream
[835]235* One Split Flow of the outlet stream:
236**SplitFlow_RefluxStream: split of the outlet Reflux stream
237**SplitFlow_DistillateStream: split of the outlet Distillate stream
[757]238
[835]239OR
240
241* The inlet stream and the RefluxRatio
[757]242";
243
244VARIABLES
[835]245        in  Inlet       as stream (Brief = "Inlet stream", PosX=0.5, PosY=0, Symbol="_{in}");
246        out Reflux              as stream (Brief = "Reflux stream", PosX=0.25, PosY=1, Symbol="_{reflux}");
247        out Distillate  as stream (Brief = "Distillate stream", PosX=0.75, PosY=1, Symbol="_{distillate}");
[757]248
[835]249        SplitFlow_RefluxStream  as fraction     (Brief = "split of the outlet Reflux stream", Default=0.33);
250        SplitFlow_DistillateStream      as fraction     (Brief = "split of the outlet Distillate stream", Default=0.33);
[910]251        RefluxRatio             as positive     (Brief = "Reflux Ratio", Default=10, Lower = 0.05);
[835]252
[757]253EQUATIONS
254
[835]255"Reflux Ratio" 
[838]256        #Reflux.F*RefluxRatio = SplitFlow_RefluxStream*(Reflux.F*RefluxRatio + Reflux.F);
257        SplitFlow_RefluxStream*(1 + RefluxRatio) = RefluxRatio;
[835]258       
[757]259"Normalize Flow Ratios"
[835]260        SplitFlow_RefluxStream + SplitFlow_DistillateStream = 1;
[757]261       
262"Flow"
[835]263        Reflux.F = Inlet.F * SplitFlow_RefluxStream;
[757]264        Inlet.F = Reflux.F + Distillate.F;
265
266"Composition"
267        Reflux.z = Inlet.z;
268        Distillate.z = Inlet.z;
269
270"Pressure"
271        Reflux.P = Inlet.P;
272        Distillate.P = Inlet.P;
273
274"Enthalpy"
275        Reflux.h = Inlet.h;
276        Distillate.h = Inlet.h;
277
278"Temperature"
279        Reflux.T = Inlet.T;
280        Distillate.T = Inlet.T;
281
282"Vapourisation Fraction"
283        Reflux.v = Inlet.v;
284        Distillate.v = Inlet.v;
285
286end
Note: See TracBrowser for help on using the repository browser.