source: mso/eml/mixers_splitters/splitter.mso @ 78

Last change on this file since 78 was 76, checked in by Paula Bettio Staudt, 16 years ago

Updated mixers_splitters files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
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* Model of a splitter
17*--------------------------------------------------------------------
18*
19*       Streams:
20*               * a inlet stream
21*               * "Noutlet" outlet streams
22*
23*       Assumptions:
24*               * thermodynamics equilibrium
25*               * adiabatic
26*                       
27*       Specify:
28*               * the inlet stream
29*               * (Noutlet - 1) fraction of split of the outlet streams:
30*                               frac(i) = (Mole Flow of the outlet stream "i" /
31*                                                                       Mole Flow of the inlet stream)
32*                               where i = 1, 2,...,Noutlet
33*
34*----------------------------------------------------------------------
35* Author: Maurício Carvalho Maciel
36* $Id: splitter.mso 76 2006-12-08 19:05:33Z paula $
37*--------------------------------------------------------------------*#
38
39
40using "streams";
41
42Model splitter_n
43        PARAMETERS
44        NOutlet as Integer (Brief = "Number of Outlet Streams", Lower = 1);
45       
46        VARIABLES
47in      Inlet   as stream;
48out Outlet(NOutlet)  as stream;
49        frac(NOutlet) as fraction (Brief = "Distribution of Outlets", Default=0.5);
50
51        EQUATIONS
52       
53        sum(frac) = 1;
54       
55        for i in [1:NOutlet]
56               
57                "Flow"
58                Outlet(i).F = Inlet.F*frac(i);
59               
60                "Composition"
61                Outlet(i).z = Inlet.z;
62       
63                "Pressure"
64                Outlet(i).P = Inlet.P;
65       
66                "Enthalpy"
67                Outlet(i).h = Inlet.h;
68       
69                "Temperature"   
70                Outlet(i).T = Inlet.T;
71         
72                "Vapourisation Fraction"
73                Outlet(i).v = Inlet.v;
74        end
75
76end
77
78
79#*-----------------------------------------------------------------
80* Splitter with 2 outlet streams
81*------------------------------------------------------------------
82*Author: Paula B. Staudt, Rafael P. Soares
83*----------------------------------------------------------------*#
84Model splitter
85       
86        VARIABLES
87in  Inlet   as stream;
88out Outlet1 as stream;
89out Outlet2 as stream;
90        frac as fraction (Brief = "Fraction to Outlet 1");
91
92        EQUATIONS
93        "Flow"
94        Outlet1.F = Inlet.F * frac;
95        Outlet1.F + Outlet2.F = Inlet.F;
96        "Composition"
97        Outlet1.z = Inlet.z;
98        Outlet2.z = Inlet.z;
99        "Pressure"
100        Outlet1.P = Inlet.P;
101        Outlet2.P = Inlet.P;
102        "Enthalpy"
103        Outlet1.h = Inlet.h;
104        Outlet2.h = Inlet.h;
105        "Temperature"
106        Outlet1.T = Inlet.T;
107        Outlet2.T = Inlet.T;
108        "Vapourisation Fraction"
109        Outlet1.v = Inlet.v;
110        Outlet2.v = Inlet.v;
111end
Note: See TracBrowser for help on using the repository browser.