[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 574 2008-07-25 14:18:50Z rafael $ |
---|
| 18 | *--------------------------------------------------------------------*# |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | using "streams"; |
---|
| 22 | |
---|
| 23 | Model splitter_n |
---|
[269] | 24 | ATTRIBUTES |
---|
| 25 | Pallete = true; |
---|
[304] | 26 | Icon = "icon/splitter_n"; |
---|
[269] | 27 | Brief = "Model of a splitter"; |
---|
[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] | 46 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5001, Symbol="_{in}"); |
---|
| 47 | out 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 | |
---|
| 75 | end |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | Model splitter |
---|
[269] | 79 | ATTRIBUTES |
---|
| 80 | Pallete = true; |
---|
[304] | 81 | Icon = "icon/splitter"; |
---|
[269] | 82 | Brief = "Splitter with 2 outlet streams"; |
---|
[354] | 83 | Info = |
---|
| 84 | "== Assumptions == |
---|
| 85 | * thermodynamics equilibrium |
---|
| 86 | * adiabatic |
---|
[269] | 87 | |
---|
[354] | 88 | == Specify == |
---|
| 89 | * the inlet stream |
---|
| 90 | * (Noutlet - 1) fraction of split of the outlet streams: |
---|
| 91 | |
---|
| 92 | frac(i) = (Mole Flow of the outlet stream i / |
---|
| 93 | Mole Flow of the inlet stream) |
---|
[269] | 94 | where i = 1, 2,...,Noutlet |
---|
[354] | 95 | "; |
---|
[269] | 96 | |
---|
[1] | 97 | VARIABLES |
---|
[351] | 98 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5069, Symbol="_{in}"); |
---|
| 99 | out Outlet1 as stream (Brief = "Outlet stream 1", PosX=1, PosY=0.3027, Symbol="_{out1}"); |
---|
| 100 | out Outlet2 as stream (Brief = "Outlet stream 2", PosX=1, PosY=0.7141, Symbol="_{out2}"); |
---|
| 101 | frac as fraction (Brief = "Fraction to Outlet 1", Symbol="\phi"); |
---|
[1] | 102 | |
---|
| 103 | EQUATIONS |
---|
| 104 | "Flow" |
---|
| 105 | Outlet1.F = Inlet.F * frac; |
---|
| 106 | Outlet1.F + Outlet2.F = Inlet.F; |
---|
| 107 | "Composition" |
---|
| 108 | Outlet1.z = Inlet.z; |
---|
| 109 | Outlet2.z = Inlet.z; |
---|
| 110 | "Pressure" |
---|
| 111 | Outlet1.P = Inlet.P; |
---|
| 112 | Outlet2.P = Inlet.P; |
---|
| 113 | "Enthalpy" |
---|
| 114 | Outlet1.h = Inlet.h; |
---|
| 115 | Outlet2.h = Inlet.h; |
---|
| 116 | "Temperature" |
---|
| 117 | Outlet1.T = Inlet.T; |
---|
| 118 | Outlet2.T = Inlet.T; |
---|
| 119 | "Vapourisation Fraction" |
---|
| 120 | Outlet1.v = Inlet.v; |
---|
| 121 | Outlet2.v = Inlet.v; |
---|
| 122 | end |
---|