[86] | 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 column model |
---|
| 17 | *-------------------------------------------------------------------- |
---|
| 18 | * |
---|
[88] | 19 | * This sample file needs VRTherm DEMO(www.vrtech.com.br) to run |
---|
| 20 | * SectionColumn_Test and needs VRTherm full to run the distillation |
---|
| 21 | * column flowsheet. |
---|
[86] | 22 | * |
---|
| 23 | *---------------------------------------------------------------------- |
---|
| 24 | * Author: Paula B. Staudt |
---|
| 25 | * $Id: sample_column.mso 237 2007-04-12 22:32:54Z arge $ |
---|
| 26 | *--------------------------------------------------------------------*# |
---|
| 27 | |
---|
[1] | 28 | using "stage_separators/column"; |
---|
[111] | 29 | using "controllers/PIDIncr"; |
---|
[1] | 30 | |
---|
| 31 | # column section with 2 trays |
---|
| 32 | FlowSheet SectionColumn_Test_with2tray |
---|
| 33 | PARAMETERS |
---|
[213] | 34 | PP as Plugin(Brief="Physical Properties", |
---|
| 35 | Type="PP", |
---|
| 36 | Components = [ "isobutane", "benzene"], |
---|
| 37 | LiquidModel = "PR", |
---|
| 38 | VapourModel = "PR" |
---|
| 39 | ); |
---|
[1] | 40 | NComp as Integer; |
---|
| 41 | |
---|
| 42 | SET |
---|
| 43 | NComp = PP.NumberOfComponents; |
---|
| 44 | |
---|
| 45 | DEVICES |
---|
| 46 | sec as Section_Column; |
---|
[125] | 47 | feed as liquid_stream; |
---|
| 48 | reb as vapour_stream; |
---|
| 49 | cond as liquid_stream; |
---|
[1] | 50 | zero as stream; |
---|
| 51 | |
---|
| 52 | CONNECTIONS |
---|
| 53 | feed to sec.trays(2).Inlet; |
---|
| 54 | zero to sec.trays(1).Inlet; |
---|
| 55 | reb to sec.trays(2).InletV; |
---|
| 56 | cond to sec.trays(1).InletL; |
---|
| 57 | |
---|
| 58 | SPECIFY |
---|
[187] | 59 | feed.F = 113.4 * 'kmol/h'; |
---|
| 60 | feed.T = 291 * 'K'; |
---|
| 61 | feed.P = 168.3 * 'kPa'; |
---|
[1] | 62 | feed.z = [0.5, 0.5]; |
---|
| 63 | |
---|
[187] | 64 | zero.F = 0 * 'kmol/h'; |
---|
| 65 | zero.T = 300 * 'K'; |
---|
| 66 | zero.P = 1 * 'atm'; |
---|
[1] | 67 | zero.z = [0.5, 0.5]; |
---|
| 68 | zero.v = 0; |
---|
[187] | 69 | zero.h = 0 * 'J/mol'; |
---|
[1] | 70 | |
---|
[187] | 71 | cond.F = 68 * 'kmol/h'; |
---|
| 72 | cond.P = 150 * 'kPa'; |
---|
| 73 | cond.T = 281.75 * 'K'; |
---|
[1] | 74 | cond.z = [0.6664, 0.3336]; |
---|
| 75 | |
---|
[187] | 76 | reb.F = 153 * 'kmol/h'; |
---|
| 77 | reb.P = 185 * 'kPa'; |
---|
| 78 | reb.T = 328.12 * 'K'; |
---|
[1] | 79 | reb.z = [0.001848, 0.9982]; |
---|
| 80 | |
---|
| 81 | sec.trays.Emv = 1; |
---|
| 82 | |
---|
| 83 | SET |
---|
| 84 | sec.NTrays = 2; |
---|
| 85 | #COLUMN |
---|
[187] | 86 | sec.trays.V = 4 * 'ft^3'; |
---|
| 87 | sec.trays.Ah = 0.394 * 'ft^2'; |
---|
| 88 | sec.trays.lw = 20.94 * 'in'; |
---|
| 89 | sec.trays.hw = 0.125 * 'ft'; |
---|
| 90 | sec.trays.Q = 0 * 'kW'; |
---|
[1] | 91 | sec.trays.beta = 0.6; |
---|
| 92 | sec.trays.alfa = 4; |
---|
[187] | 93 | sec.trays.Ap = 3.94 * 'ft^2'; |
---|
[1] | 94 | |
---|
| 95 | INITIAL |
---|
[187] | 96 | sec.trays.OutletL.T = 290 *'K'; |
---|
[1] | 97 | sec.trays.Level = 0.9 * sec.trays.hw; |
---|
| 98 | sec.trays.OutletL.z(1) = 0.5; |
---|
| 99 | |
---|
| 100 | OPTIONS |
---|
[128] | 101 | #RelativeAccuracy = 1e-3; |
---|
[46] | 102 | NLASolver = "sundials"; |
---|
[125] | 103 | TimeStep = 10; |
---|
| 104 | TimeEnd = 1000; |
---|
[111] | 105 | |
---|
| 106 | # After running few seconds of transient the steady-state |
---|
| 107 | # can be obtained by using the results from that transient: |
---|
| 108 | |
---|
[208] | 109 | #GuessFile="SectionColumn_Test_with2tray.rlt"; |
---|
| 110 | #Dynamic = false; |
---|
[1] | 111 | end |
---|
| 112 | |
---|
| 113 | # column section with 8 trays |
---|
| 114 | FlowSheet SectionColumn_Test_with8tray |
---|
| 115 | PARAMETERS |
---|
[213] | 116 | PP as Plugin(Brief="Physical Properties", |
---|
| 117 | Type="PP", |
---|
| 118 | Components = [ "isobutane", "benzene"], |
---|
| 119 | LiquidModel = "PR", |
---|
| 120 | VapourModel = "PR" |
---|
| 121 | ); |
---|
[1] | 122 | NComp as Integer; |
---|
| 123 | |
---|
| 124 | SET |
---|
| 125 | NComp = PP.NumberOfComponents; |
---|
| 126 | |
---|
| 127 | DEVICES |
---|
| 128 | sec as Section_Column; |
---|
[125] | 129 | feed as liquid_stream; |
---|
| 130 | reb as vapour_stream; |
---|
| 131 | cond as liquid_stream; |
---|
[1] | 132 | zero as stream; |
---|
| 133 | |
---|
| 134 | CONNECTIONS |
---|
| 135 | feed to sec.trays(5).Inlet; |
---|
| 136 | |
---|
| 137 | zero to sec.trays([1:4]).Inlet; |
---|
| 138 | zero to sec.trays([6:8]).Inlet; |
---|
| 139 | |
---|
| 140 | reb to sec.trays(8).InletV; |
---|
| 141 | cond to sec.trays(1).InletL; |
---|
| 142 | |
---|
| 143 | SPECIFY |
---|
[187] | 144 | feed.F = 113.4 * 'kmol/h'; |
---|
| 145 | feed.T = 291 * 'K'; |
---|
| 146 | feed.P = 168.3 * 'kPa'; |
---|
[1] | 147 | feed.z = [0.5, 0.5]; |
---|
| 148 | |
---|
[187] | 149 | zero.F = 0 * 'kmol/h'; |
---|
| 150 | zero.T = 300 * 'K'; |
---|
| 151 | zero.P = 1 * 'atm'; |
---|
[1] | 152 | zero.z = [0.5, 0.5]; |
---|
| 153 | zero.v = 0; |
---|
[187] | 154 | zero.h = 0 * 'J/mol'; |
---|
[1] | 155 | |
---|
[187] | 156 | cond.F = 68 * 'kmol/h'; |
---|
| 157 | cond.P = 150 * 'kPa'; |
---|
| 158 | cond.T = 281.75 * 'K'; |
---|
[1] | 159 | cond.z = [0.6664, 0.3336]; |
---|
| 160 | |
---|
[187] | 161 | reb.F = 153 * 'kmol/h'; |
---|
| 162 | reb.P = 185 * 'kPa'; |
---|
| 163 | reb.T = 328.12 * 'K'; |
---|
[1] | 164 | reb.z = [0.001848, 0.9982]; |
---|
| 165 | |
---|
| 166 | sec.trays.Emv = 1; |
---|
| 167 | |
---|
| 168 | SET |
---|
| 169 | sec.NTrays = 8; |
---|
| 170 | #COLUMN |
---|
[187] | 171 | sec.trays.V = 4 * 'ft^3'; |
---|
| 172 | sec.trays.Ah = 0.394 * 'ft^2'; |
---|
| 173 | sec.trays.lw = 20.94 * 'in'; |
---|
| 174 | sec.trays.hw = 0.125 * 'ft'; |
---|
| 175 | sec.trays.Q = 0 * 'kW'; |
---|
[1] | 176 | sec.trays.beta = 0.6; |
---|
| 177 | sec.trays.alfa = 4; |
---|
[187] | 178 | sec.trays.Ap = 3.94 * 'ft^2'; |
---|
[1] | 179 | |
---|
| 180 | INITIAL |
---|
[187] | 181 | sec.trays.OutletL.T = [290:(330-290)/(sec.NTrays-1):330] *'K'; |
---|
[1] | 182 | sec.trays.Level = 0.3 * sec.trays.hw; |
---|
| 183 | sec.trays.OutletL.z(1) = 0.5; |
---|
| 184 | |
---|
| 185 | OPTIONS |
---|
[125] | 186 | RelativeAccuracy = 1e-5; |
---|
| 187 | TimeStep = 1; |
---|
| 188 | TimeEnd = 100; |
---|
[208] | 189 | #GuessFile="SectionColumn_Test_with8tray.rlt"; |
---|
| 190 | #Dynamic = false; |
---|
[1] | 191 | end |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | FlowSheet Distillation_kettle_cond_Test |
---|
| 195 | PARAMETERS |
---|
[213] | 196 | PP as Plugin(Brief="Physical Properties", |
---|
| 197 | Type="PP", |
---|
[218] | 198 | Components = [ "isobutane", "n-pentane", "propylene", |
---|
| 199 | "benzene", "isobutene" ], |
---|
[213] | 200 | LiquidModel = "PR", |
---|
| 201 | VapourModel = "PR" |
---|
| 202 | ); |
---|
[1] | 203 | NComp as Integer; |
---|
| 204 | |
---|
| 205 | VARIABLES |
---|
| 206 | Qc as heat_rate (Brief="Heat rate removed from condenser"); |
---|
| 207 | Qr as heat_rate (Brief="Heat rate supplied to reboiler"); |
---|
| 208 | |
---|
| 209 | SET |
---|
| 210 | NComp = PP.NumberOfComponents; |
---|
| 211 | |
---|
| 212 | DEVICES |
---|
| 213 | col as Distillation_kettle_cond; |
---|
[125] | 214 | feed as source; |
---|
[1] | 215 | zero as stream; |
---|
| 216 | |
---|
| 217 | CONNECTIONS |
---|
[187] | 218 | feed.Outlet to col.trays(5).Inlet; |
---|
[1] | 219 | zero to col.reb.Inlet; |
---|
| 220 | zero to col.trays([1:4]).Inlet; |
---|
| 221 | zero to col.trays([6:col.NTrays]).Inlet; |
---|
| 222 | Qc to col.cond.Q; |
---|
| 223 | Qr to col.reb.Q; |
---|
| 224 | |
---|
| 225 | SPECIFY |
---|
[187] | 226 | feed.Outlet.F = 113.4 * 'kmol/h'; |
---|
| 227 | feed.Outlet.T = 291 * 'K'; |
---|
| 228 | feed.Outlet.P = 168.3 * 'kPa'; |
---|
[125] | 229 | feed.Outlet.z = 1/NComp; |
---|
[1] | 230 | |
---|
[187] | 231 | zero.F = 0 * 'kmol/h'; |
---|
| 232 | zero.T = 300 * 'K'; |
---|
| 233 | zero.P = 1 * 'atm'; |
---|
[1] | 234 | zero.z = 1/NComp; |
---|
| 235 | zero.v = 0; |
---|
[187] | 236 | zero.h = 0 * 'J/mol'; |
---|
[1] | 237 | |
---|
[187] | 238 | col.sptop.Outlet2.F = 85 * 'kmol/h'; |
---|
| 239 | col.reb.OutletL.F = 28.4 * 'kmol/h'; |
---|
[19] | 240 | col.sptop.frac = 0.444445; |
---|
[187] | 241 | col.cond.OutletV.F = 0 * 'kmol/h'; |
---|
| 242 | Qr = 3.7743e6 * 'kJ/h'; |
---|
| 243 | Qc = -3.71e6 * 'kJ/h'; |
---|
| 244 | col.pump1.dP = 16 * 'kPa'; |
---|
[1] | 245 | col.trays.Emv = 1; |
---|
| 246 | |
---|
| 247 | SET |
---|
| 248 | col.NTrays = 8; |
---|
[187] | 249 | col.cond.V = 2 * 'm^3'; |
---|
| 250 | col.cond.Across = 1 * 'm^2'; |
---|
| 251 | col.trays.V = 4 * 'ft^3'; |
---|
| 252 | col.trays.Ah = 0.394 * 'ft^2'; |
---|
| 253 | col.trays.lw = 20.94 * 'in'; |
---|
| 254 | col.trays.hw = 0.125 * 'ft'; |
---|
| 255 | col.trays.Q = 0 * 'kW'; |
---|
[1] | 256 | col.trays.beta = 0.6; |
---|
| 257 | col.trays.alfa = 4; |
---|
[187] | 258 | col.trays.Ap = 3.94 * 'ft^2'; |
---|
| 259 | col.reb.V = 2 * 'm^3'; |
---|
| 260 | col.reb.Across = 1 * 'm^2'; |
---|
[1] | 261 | |
---|
| 262 | INITIAL |
---|
| 263 | # condenser |
---|
[187] | 264 | col.cond.OutletL.T = 260 *'K'; |
---|
| 265 | col.cond.Level = 1 * 'm'; |
---|
[1] | 266 | col.cond.OutletL.z([1:4]) = [0.65, 0.05, 0.01, 0.01]; |
---|
| 267 | |
---|
| 268 | # reboiler |
---|
[187] | 269 | col.reb.OutletL.T = 330 *'K'; |
---|
| 270 | col.reb.Level = 1 * 'm'; |
---|
[1] | 271 | col.reb.OutletL.z([1:4]) = [0.1, 0.7, 0.01, 0.01]; |
---|
| 272 | |
---|
| 273 | # column trays |
---|
[187] | 274 | col.trays.OutletL.T = [290:(330-290)/(col.NTrays-1):330] * 'K'; |
---|
[19] | 275 | col.trays.Level = 1.2 * col.trays.hw; |
---|
[1] | 276 | col.trays.OutletL.z([1:4]) = [0.5, 0.05, 0.01, 0.01]; |
---|
| 277 | |
---|
| 278 | OPTIONS |
---|
[125] | 279 | RelativeAccuracy = 1e-3; |
---|
[187] | 280 | TimeStep = 0.1; |
---|
[125] | 281 | TimeEnd = 50; |
---|
| 282 | #time = [0:0.01:1, 2:50]; |
---|
[208] | 283 | #GuessFile="Distillation_kettle_cond_Test.rlt"; |
---|
| 284 | #Dynamic = false; |
---|
[1] | 285 | end |
---|
[111] | 286 | |
---|
| 287 | FlowSheet Column_ctrl |
---|
| 288 | PARAMETERS |
---|
[213] | 289 | PP as Plugin(Brief="Physical Properties", |
---|
| 290 | Type="PP", |
---|
| 291 | Components = [ "isobutane", "n-pentane", "propylene", |
---|
| 292 | "benzene", "isobutene" ], |
---|
| 293 | LiquidModel = "PR", |
---|
| 294 | VapourModel = "PR" |
---|
| 295 | ); |
---|
[111] | 296 | NComp as Integer; |
---|
| 297 | |
---|
| 298 | Qcmin as heat_rate (Brief="Minimum Condenser Heat supplied"); |
---|
| 299 | Qcmax as heat_rate (Brief="Maximum Condenser Heat supplied"); |
---|
| 300 | Qrmin as heat_rate (Brief="Minimum Reboiler Heat supplied"); |
---|
| 301 | Qrmax as heat_rate (Brief="Maximum Reboiler Heat supplied"); |
---|
| 302 | Frmin as flow_mol (Brief="Minimum bottom flow rate"); |
---|
| 303 | Frmax as flow_mol (Brief="Maximum bottom flow rate"); |
---|
| 304 | Fcmin as flow_mol (Brief="Minimum reflux flow rate"); |
---|
| 305 | Fcmax as flow_mol (Brief="Maximum reflux flow rate"); |
---|
| 306 | Hmint as length (Brief="Minimum liquid level in top tank"); |
---|
| 307 | Hmaxt as length (Brief="Maximum liquid level in top tank"); |
---|
| 308 | Hminb as length (Brief="Minimum liquid level in reboiler"); |
---|
| 309 | Hmaxb as length (Brief="Maximum liquid level in reboiler"); |
---|
| 310 | Pmax as pressure (Brief="Maximum column pressure"); |
---|
| 311 | Pmin as pressure (Brief="Minimum column pressure"); |
---|
| 312 | Tmax as temperature (Brief="Maximum column temperature"); |
---|
| 313 | Tmin as temperature (Brief="Minimum column temperature"); |
---|
| 314 | |
---|
| 315 | VARIABLES |
---|
| 316 | Qc as heat_rate (Brief="Heat rate removed from condenser"); |
---|
| 317 | Qr as heat_rate (Brief="Heat rate supplied to reboiler"); |
---|
| 318 | Had_top as Real (Brief="Dimensionless condenser level"); |
---|
| 319 | Had_bot as Real (Brief="Dimensionless reboiler level"); |
---|
| 320 | Pad as Real (Brief="Dimensionless pressure"); |
---|
| 321 | Tad as Real (Brief="Dimensionless temperature"); |
---|
[112] | 322 | RR as positive (Brief="Reflux ratio"); |
---|
| 323 | |
---|
[111] | 324 | SET |
---|
| 325 | NComp = PP.NumberOfComponents; |
---|
| 326 | |
---|
| 327 | DEVICES |
---|
| 328 | col as Distillation_kettle_cond; |
---|
[125] | 329 | feed as source; |
---|
[111] | 330 | zero as stream; |
---|
| 331 | TCcond as PIDIncr_Ideal_AW; |
---|
| 332 | LCtop as PIDIncr_Ideal_AW; |
---|
| 333 | LCbot as PIDIncr_Ideal_AW; |
---|
| 334 | PC as PIDIncr_Ideal_AW; |
---|
| 335 | |
---|
| 336 | CONNECTIONS |
---|
[134] | 337 | feed.Outlet to col.trays(5).Inlet; |
---|
[111] | 338 | zero to col.reb.Inlet; |
---|
| 339 | zero to col.trays([1:4]).Inlet; |
---|
| 340 | zero to col.trays([6:col.NTrays]).Inlet; |
---|
| 341 | Qc to col.cond.Q; |
---|
| 342 | Qr to col.reb.Q; |
---|
| 343 | |
---|
| 344 | EQUATIONS |
---|
| 345 | "Temperature Controller" |
---|
[177] | 346 | TCcond.Parameters.tau = 0*'s'; |
---|
| 347 | TCcond.Parameters.tauSet = 0*'s'; |
---|
[111] | 348 | TCcond.Parameters.alpha = 0.3; |
---|
| 349 | TCcond.Parameters.bias = 0.5; |
---|
| 350 | TCcond.Parameters.gamma = 1; |
---|
| 351 | TCcond.Parameters.beta = 1; |
---|
| 352 | TCcond.Options.action = 1; |
---|
| 353 | TCcond.Options.clip = 1; |
---|
| 354 | TCcond.Options.autoMan = 0; |
---|
[177] | 355 | TCcond.Parameters.intTime = 60*'s'; |
---|
[111] | 356 | TCcond.Parameters.gain = 0.6; |
---|
[177] | 357 | TCcond.Parameters.derivTime = 1*'s'; |
---|
| 358 | TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin); |
---|
[111] | 359 | TCcond.Ports.input = Tad; |
---|
| 360 | Tad = (col.cond.OutletL.T-Tmin)/(Tmax-Tmin); |
---|
| 361 | Qc = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output; |
---|
| 362 | |
---|
| 363 | "Pressure Controller" |
---|
[177] | 364 | PC.Parameters.tau = 0*'s'; |
---|
| 365 | PC.Parameters.tauSet = 0*'s'; |
---|
[111] | 366 | PC.Parameters.alpha = 0.3; |
---|
| 367 | PC.Parameters.bias = 0; |
---|
| 368 | PC.Parameters.gamma = 1; |
---|
| 369 | PC.Parameters.beta = 1; |
---|
| 370 | PC.Options.action = -1; |
---|
| 371 | PC.Options.clip = 1; |
---|
| 372 | PC.Options.autoMan = 0; |
---|
[177] | 373 | PC.Parameters.intTime = 50*'s'; |
---|
[111] | 374 | PC.Parameters.gain = 0.5; |
---|
[177] | 375 | PC.Parameters.derivTime = 1*'s'; |
---|
| 376 | PC.Ports.setPoint = (2.0*'bar'-Pmin)/(Pmax-Pmin); |
---|
[111] | 377 | PC.Ports.input = Pad; |
---|
| 378 | Pad = (col.cond.OutletV.P-Pmin)/(Pmax-Pmin); |
---|
| 379 | col.cond.OutletV.F = (Fcmin+(Fcmax-Fcmin)*PC.Ports.output); |
---|
| 380 | |
---|
| 381 | "Ttop Level Controller" |
---|
[177] | 382 | LCtop.Parameters.tau = 0*'s'; |
---|
| 383 | LCtop.Parameters.tauSet = 0*'s'; |
---|
[111] | 384 | LCtop.Parameters.alpha = 0.3; |
---|
| 385 | LCtop.Parameters.bias = 0.5; |
---|
| 386 | LCtop.Parameters.gamma = 1; |
---|
| 387 | LCtop.Parameters.beta = 1; |
---|
| 388 | LCtop.Options.action = -1; |
---|
| 389 | LCtop.Options.clip = 1; |
---|
| 390 | LCtop.Options.autoMan = 0; |
---|
[177] | 391 | LCtop.Parameters.intTime = 10*'s'; |
---|
[111] | 392 | LCtop.Parameters.gain = 1; |
---|
[218] | 393 | LCtop.Parameters.derivTime = 0*'s'; |
---|
[177] | 394 | LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint); |
---|
[111] | 395 | LCtop.Ports.input = Had_top; |
---|
| 396 | Had_top = (col.cond.Level-Hmint)/(Hmaxt-Hmint); |
---|
| 397 | col.sptop.Outlet1.F = Fcmin + (Fcmax-Fcmin) * LCtop.Ports.output; |
---|
| 398 | |
---|
| 399 | "Tbottom Level Controller" |
---|
[177] | 400 | LCbot.Parameters.tau = 0*'s'; |
---|
| 401 | LCbot.Parameters.tauSet = 0*'s'; |
---|
[111] | 402 | LCbot.Parameters.alpha = 0.3; |
---|
| 403 | LCbot.Parameters.bias = 0.5; |
---|
| 404 | LCbot.Parameters.gamma = 1; |
---|
| 405 | LCbot.Parameters.beta = 1; |
---|
| 406 | LCbot.Options.action = -1; |
---|
| 407 | LCbot.Options.clip = 1; |
---|
| 408 | LCbot.Options.autoMan = 0; |
---|
[177] | 409 | LCbot.Parameters.intTime = 100*'s'; |
---|
[111] | 410 | LCbot.Parameters.gain = 1; |
---|
[218] | 411 | LCbot.Parameters.derivTime = 0*'s'; |
---|
[177] | 412 | LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb); |
---|
[111] | 413 | LCbot.Ports.input = Had_bot; |
---|
| 414 | Had_bot = (col.reb.Level-Hminb)/(Hmaxb-Hminb); |
---|
| 415 | col.reb.OutletL.F = Frmin + (Frmax-Frmin) * LCbot.Ports.output; |
---|
| 416 | |
---|
[112] | 417 | RR * (col.cond.OutletV.F + col.sptop.Outlet1.F) = col.sptop.Outlet2.F; |
---|
| 418 | |
---|
[177] | 419 | if time < 1 * 'h' then |
---|
[237] | 420 | col.sptop.Outlet2.F = 75 * 'kmol/h'; # reflux |
---|
[112] | 421 | else |
---|
[177] | 422 | col.sptop.Outlet2.F = 85 * 'kmol/h'; # reflux |
---|
[112] | 423 | end |
---|
| 424 | |
---|
[111] | 425 | SPECIFY |
---|
[177] | 426 | feed.Outlet.F = 113.4 * 'kmol/h'; |
---|
| 427 | feed.Outlet.T = 291 * 'K'; |
---|
| 428 | feed.Outlet.P = 168.3 * 'kPa'; |
---|
[125] | 429 | feed.Outlet.z = 1/NComp; |
---|
[111] | 430 | |
---|
[177] | 431 | zero.F = 0 * 'kmol/h'; |
---|
| 432 | zero.T = 300 * 'K'; |
---|
| 433 | zero.P = 1 * 'atm'; |
---|
[111] | 434 | zero.z = 1/NComp; |
---|
| 435 | zero.v = 0; |
---|
[177] | 436 | zero.h = 0 * 'J/mol'; |
---|
[111] | 437 | |
---|
[177] | 438 | Qr = 3e6 * 'kJ/h'; |
---|
| 439 | col.pump1.dP = 16 * 'kPa'; |
---|
[111] | 440 | col.trays.Emv = 1; |
---|
| 441 | |
---|
| 442 | SET |
---|
| 443 | col.NTrays = 8; |
---|
[177] | 444 | col.cond.V = 2 * 'm^3'; |
---|
| 445 | col.cond.Across = 1 * 'm^2'; |
---|
| 446 | col.trays.V = 4 * 'ft^3'; |
---|
| 447 | col.trays.Ah = 0.394 * 'ft^2'; |
---|
| 448 | col.trays.lw = 20.94 * 'in'; |
---|
| 449 | col.trays.hw = 0.125 * 'ft'; |
---|
| 450 | col.trays.Q = 0 * 'kW'; |
---|
[111] | 451 | col.trays.beta = 0.6; |
---|
| 452 | col.trays.alfa = 4; |
---|
[177] | 453 | col.trays.Ap = 3.94 * 'ft^2'; |
---|
| 454 | col.reb.V = 2 * 'm^3'; |
---|
| 455 | col.reb.Across = 1 * 'm^2'; |
---|
[111] | 456 | |
---|
[177] | 457 | Qrmax = 5e6 * 'kJ/h'; |
---|
| 458 | Qrmin = 1e6 * 'kJ/h'; |
---|
| 459 | Frmin = 0 * 'kmol/h'; |
---|
| 460 | Frmax = 60 * 'kmol/h'; |
---|
| 461 | Fcmin = 0 * 'kmol/h'; |
---|
| 462 | Fcmax = 120 * 'kmol/h'; |
---|
| 463 | Hmint = 0 * 'm'; |
---|
| 464 | Hmaxt = 2 * 'm'; |
---|
| 465 | Hminb = 0 * 'm'; |
---|
| 466 | Hmaxb = 2 * 'm'; |
---|
| 467 | Pmin = 0.5 * 'bar'; |
---|
| 468 | Pmax = 4 * 'bar'; |
---|
| 469 | Qcmax = -5e5 * 'kJ/h'; |
---|
| 470 | Qcmin = -5e6 * 'kJ/h'; |
---|
| 471 | Tmax = (30+273.15) * 'K'; |
---|
| 472 | Tmin = (-20+273.15) * 'K'; |
---|
[111] | 473 | |
---|
| 474 | INITIAL |
---|
| 475 | # condenser |
---|
[177] | 476 | col.cond.OutletL.T = 260 *'K'; |
---|
| 477 | col.cond.Level = 1 * 'm'; |
---|
[111] | 478 | col.cond.OutletL.z([1:4]) = [0.2, 0.2, 0.4, 0.05]; |
---|
| 479 | |
---|
| 480 | # reboiler |
---|
[177] | 481 | col.reb.OutletL.T = 350 *'K'; |
---|
| 482 | col.reb.Level = 1 * 'm'; |
---|
[111] | 483 | col.reb.OutletL.z([1:4]) = [0.1, 0.4, 0.1, 0.3]; |
---|
[218] | 484 | |
---|
[111] | 485 | # column trays |
---|
[177] | 486 | col.trays.OutletL.T = [290:(330-290)/(col.NTrays-1):330] * 'K'; |
---|
[111] | 487 | col.trays.Level = 1.2 * col.trays.hw; |
---|
| 488 | col.trays.OutletL.z([1:4]) = [0.15, 0.3, 0.25, 0.2]; |
---|
| 489 | |
---|
| 490 | OPTIONS |
---|
[218] | 491 | TimeStep = 0.1; |
---|
| 492 | TimeEnd = 5; |
---|
[177] | 493 | TimeUnit = 'h'; |
---|
[218] | 494 | InitialFile = "Column_ctrl.rlt"; |
---|
[208] | 495 | #GuessFile = "Column_ctrl.rlt"; |
---|
| 496 | #Dynamic = false; |
---|
[111] | 497 | end |
---|
| 498 | |
---|