[804] | 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 | * Sample file for model flash and flashSteady |
---|
| 17 | *-------------------------------------------------------------------- |
---|
| 18 | * |
---|
| 19 | * This sample file needs VRTherm (www.vrtech.com.br) to run. |
---|
| 20 | * |
---|
| 21 | *---------------------------------------------------------------------- |
---|
| 22 | * Author: Paula B. Staudt |
---|
| 23 | * $Id: sample_flash.mso 633 2008-09-24 00:26:30Z bicca $ |
---|
| 24 | *--------------------------------------------------------------------*# |
---|
| 25 | using "stage_separators/flash"; |
---|
| 26 | |
---|
| 27 | # exemplo baseado nos dados do artigo do Gani 1985. |
---|
| 28 | FlowSheet flash_Test |
---|
| 29 | PARAMETERS |
---|
| 30 | PP as Plugin(Brief="Physical Properties", |
---|
| 31 | Type="PP", |
---|
| 32 | Components = ["1,3-butadiene", "isobutene", "n-pentane", |
---|
| 33 | "1-pentene", "1-hexene", "benzene"], |
---|
| 34 | LiquidModel = "PR", |
---|
| 35 | VapourModel = "PR" |
---|
| 36 | ); |
---|
| 37 | NComp as Integer; |
---|
| 38 | |
---|
| 39 | VARIABLES |
---|
| 40 | Q as energy_source (Brief="Heat supplied"); |
---|
| 41 | |
---|
| 42 | SET |
---|
| 43 | NComp = PP.NumberOfComponents; |
---|
| 44 | |
---|
| 45 | DEVICES |
---|
| 46 | fl as flash; |
---|
| 47 | s1 as source; |
---|
| 48 | |
---|
| 49 | CONNECTIONS |
---|
| 50 | s1.Outlet to fl.Inlet; |
---|
| 51 | Q.OutletQ to fl.InletQ; |
---|
| 52 | |
---|
| 53 | EQUATIONS |
---|
[911] | 54 | fl.OutletLiquid.F = 400*sqrt(fl.Geometry.Level/'m') * 'kmol/h'; |
---|
[804] | 55 | |
---|
| 56 | SPECIFY |
---|
| 57 | s1.F = 496.3 * 'kmol/h'; |
---|
| 58 | s1.T = 338 * 'K'; |
---|
| 59 | s1.P = 507.1 * 'kPa'; |
---|
| 60 | s1.Composition = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283]; |
---|
| 61 | |
---|
[911] | 62 | fl.OutletVapour.F = 68.5 * 'kmol/h'; |
---|
| 63 | Q.OutletQ = 0 * 'kJ/h'; |
---|
[804] | 64 | |
---|
| 65 | SET |
---|
[911] | 66 | fl.Geometry.Lenght = 10 * 'm'; |
---|
| 67 | fl.Geometry.Diameter = 2 * 'm'; |
---|
| 68 | fl.Geometry.Orientation = "vertical"; |
---|
| 69 | # fl.Geometry.Orientation = "horizontal"; |
---|
[804] | 70 | |
---|
| 71 | INITIAL |
---|
[911] | 72 | fl.OutletLiquid.T = 338 * 'K'; |
---|
| 73 | fl.Geometry.Level = 0.4 * 'm'; |
---|
| 74 | fl.OutletLiquid.z([1:5]) = 0.1; |
---|
[804] | 75 | |
---|
| 76 | OPTIONS |
---|
| 77 | Dynamic = true; |
---|
| 78 | TimeStep = 0.1; |
---|
| 79 | TimeEnd = 5; |
---|
| 80 | TimeUnit = 'h'; |
---|
| 81 | end |
---|
| 82 | |
---|
| 83 | # exemplo baseado nos dados do artigo do Gani 1985. |
---|
| 84 | FlowSheet flashSteady_Test |
---|
| 85 | PARAMETERS |
---|
| 86 | PP as Plugin(Brief="Physical Properties", |
---|
| 87 | Type="PP", |
---|
| 88 | Components = ["1,3-butadiene", "isobutene", "n-pentane", |
---|
| 89 | "1-pentene", "1-hexene", "benzene"], |
---|
| 90 | LiquidModel = "PR", |
---|
| 91 | VapourModel = "PR" |
---|
| 92 | ); |
---|
| 93 | NComp as Integer; |
---|
| 94 | |
---|
| 95 | VARIABLES |
---|
| 96 | Q as energy_source (Brief="Heat supplied"); |
---|
| 97 | |
---|
| 98 | SET |
---|
| 99 | NComp = PP.NumberOfComponents; |
---|
| 100 | |
---|
| 101 | DEVICES |
---|
| 102 | fl as flash_steady; |
---|
| 103 | s1 as source; |
---|
| 104 | |
---|
| 105 | CONNECTIONS |
---|
| 106 | s1.Outlet to fl.Inlet; |
---|
| 107 | Q.OutletQ to fl.InletQ; |
---|
| 108 | |
---|
| 109 | SPECIFY |
---|
| 110 | s1.F = 496.3 * 'kmol/h'; |
---|
| 111 | s1.T = 338 * 'K'; |
---|
| 112 | s1.P = 507.1 * 'kPa'; |
---|
| 113 | s1.Composition = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283]; |
---|
| 114 | |
---|
[911] | 115 | fl.OutletLiquid.P = 2.5 * 'atm'; |
---|
[804] | 116 | |
---|
[911] | 117 | #Q.OutletQ = 0 * 'kJ/h'; |
---|
| 118 | fl.OutletLiquid.T = 315.06 * 'K'; |
---|
[804] | 119 | |
---|
| 120 | OPTIONS |
---|
| 121 | Dynamic = false; |
---|
| 122 | end |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | CaseStudy caseFlash as flashSteady_Test |
---|
| 126 | |
---|
| 127 | VARY |
---|
| 128 | |
---|
| 129 | s1.F = [496.3, 496.31]*'kmol/h'; |
---|
| 130 | |
---|
| 131 | RESPONSE |
---|
| 132 | |
---|
| 133 | |
---|
[911] | 134 | fl.OutletVapour.F'kmol/h'; |
---|
[804] | 135 | |
---|
| 136 | end |
---|
| 137 | |
---|
| 138 | CaseStudy caseFlash2 as flashSteady_Test |
---|
| 139 | |
---|
| 140 | VARY |
---|
| 141 | |
---|
| 142 | s1.Composition(1) = [ 0.2379, 0.3 , 0.35]; |
---|
| 143 | s1.F = [496.3, 496.31]*'kmol/h'; |
---|
| 144 | |
---|
| 145 | RESPONSE |
---|
| 146 | |
---|
[911] | 147 | fl.OutletVapour.z(1); |
---|
| 148 | fl.OutletVapour.F'kmol/h'; |
---|
[804] | 149 | |
---|
| 150 | end |
---|
| 151 | |
---|