source: trunk/eml/mixers_splitters/mixer.mso @ 370

Last change on this file since 370 was 370, checked in by Argimiro Resende Secchi, 15 years ago

fix port position of mixer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.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* Author: Maurício Carvalho Maciel
17* $Id: mixer.mso 370 2007-09-19 05:20:44Z arge $
18*--------------------------------------------------------------------*#
19
20using "stage_separators/flash";
21
22Model mixer
23        ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/mixer";
26        Brief           = "Model of a mixer";
27        Info            =
28"== Assumptions ==
29* static
30* adiabatic
31
32== Specify ==
33* the inlet streams";
34       
35        PARAMETERS
36outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
37          Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2);
38       
39        VARIABLES
40in  Inlet_mixer(Ninlet) as stream (Brief = "Inlet streams", PosX=0, PosY=0.5, Symbol="_{inMix}");
41out Outlet                      as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.5059, Symbol="_{out}");
42       
43        EQUATIONS
44       
45        "Flow"
46        Outlet.F = sum(Inlet_mixer.F);
47
48         for i in [1:NComp]
49       
50                "Composition"
51        Outlet.F*Outlet.z(i) = sum(Inlet_mixer.F*Inlet_mixer.z(i));
52    end
53
54        "Energy Balance"
55        Outlet.F*Outlet.h = sum(Inlet_mixer.F*Inlet_mixer.h);
56
57        "Pressure"
58        Outlet.P = min(Inlet_mixer.P);
59end
Note: See TracBrowser for help on using the repository browser.