source: branches/newlanguage/eml/mixers_splitters/mixer.mso @ 123

Last change on this file since 123 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.2 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 mixer
17*--------------------------------------------------------------------
18*
19*       Streams:
20*               * "Ninlet" inlet streams
21*               * a outlet stream
22*
23*       Assumptions:
24*               * thermodynamics equilibrium
25*               * adiabatic
26*                       
27*       Specify:
28*               * the inlet streams
29*
30*----------------------------------------------------------------------
31* Author: Maurício Carvalho Maciel
32* $Id: mixer.mso 76 2006-12-08 19:05:33Z paula $
33*--------------------------------------------------------------------*#
34
35using "stage_separators/flash";
36
37Model mixer as flash_Steady
38        PARAMETERS
39ext     NComp as Integer (Brief = "Number of chemical components", Lower = 1);
40        Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2);
41       
42        VARIABLES
43in  Inlet_mixer(Ninlet) as stream;      #(Brief = "Inlet streams", Lower = 1);
44out Outlet                      as stream;      #(Brief = "Outlet stream", Default = 1, Lower = 1, Upper = 1);
45out Out_int                             as stream;  #(Brief = "Intermediate Outlet stream", Default = 1, Lower = 1, Upper = 1);
46        zeroQ as heat_rate (Brief="No Heat rate supplied");
47       
48        CONNECTIONS
49       
50        Out_int to Inlet;
51        zeroQ to Q;
52
53        EQUATIONS
54       
55        "Flow"
56        Out_int.F = sum(Inlet_mixer.F);
57               
58         for i in [1:NComp]
59       
60                "Composition"
61        Out_int.F*Out_int.z(i) = sum(Inlet_mixer.F*Inlet_mixer.z(i));
62    end
63
64        "Energy Balance"
65        Out_int.F*Out_int.h = sum(Inlet_mixer.F*Inlet_mixer.h);
66       
67        "Pressure"
68        Out_int.P = min(Inlet_mixer.P);
69        Out_int.P = OutletV.P;
70       
71        "Temperature"
72        Out_int.T = OutletV.T;
73       
74        "Vapourisation Fraction"
75        Out_int.v = vfrac;
76       
77        Outlet.F = Inlet.F;
78        Outlet.z = Inlet.z;
79        Outlet.v = Inlet.v;
80        Outlet.T = Inlet.T;
81        Outlet.h = Inlet.h;
82        Outlet.P = Inlet.P;
83       
84        zeroQ = 0*"kW";
85       
86end
87
Note: See TracBrowser for help on using the repository browser.