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

Last change on this file since 1 was 1, checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library

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