Changeset 111
 Timestamp:
 Jan 13, 2007, 1:28:33 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

mso/sample/stage_separators/sample_column.mso
r88 r111 27 27 28 28 using "stage_separators/column"; 29 using "controllers/PIDIncr"; 29 30 30 31 # column section with 2 trays … … 102 103 NLASolver = "sundials"; 103 104 time = [0:10:1000]; 105 106 # After running few seconds of transient the steadystate 107 # can be obtained by using the results from that transient: 108 109 #guessFile="SectionColumn_Test_with2tray.rlt"; 110 #mode = "steady"; 104 111 end 105 112 … … 181 188 relativeAccuracy = 1e5; 182 189 time = [0:1:100]; 190 #guessFile="SectionColumn_Test_with8tray.rlt"; 191 #mode = "steady"; 183 192 end 184 193 … … 270 279 relativeAccuracy = 1e3; 271 280 time = [0:0.01:1, 2:50]; 281 #guessFile="Distillation_kettle_cond_Test.rlt"; 282 #mode = "steady"; 272 283 end 284 285 FlowSheet Column_ctrl 286 PARAMETERS 287 PP as CalcObject(Brief="Physical Properties",File="vrpp"); 288 NComp as Integer; 289 290 Qcmin as heat_rate (Brief="Minimum Condenser Heat supplied"); 291 Qcmax as heat_rate (Brief="Maximum Condenser Heat supplied"); 292 Qrmin as heat_rate (Brief="Minimum Reboiler Heat supplied"); 293 Qrmax as heat_rate (Brief="Maximum Reboiler Heat supplied"); 294 Frmin as flow_mol (Brief="Minimum bottom flow rate"); 295 Frmax as flow_mol (Brief="Maximum bottom flow rate"); 296 Fcmin as flow_mol (Brief="Minimum reflux flow rate"); 297 Fcmax as flow_mol (Brief="Maximum reflux flow rate"); 298 Hmint as length (Brief="Minimum liquid level in top tank"); 299 Hmaxt as length (Brief="Maximum liquid level in top tank"); 300 Hminb as length (Brief="Minimum liquid level in reboiler"); 301 Hmaxb as length (Brief="Maximum liquid level in reboiler"); 302 Pmax as pressure (Brief="Maximum column pressure"); 303 Pmin as pressure (Brief="Minimum column pressure"); 304 Tmax as temperature (Brief="Maximum column temperature"); 305 Tmin as temperature (Brief="Minimum column temperature"); 306 307 VARIABLES 308 Qc as heat_rate (Brief="Heat rate removed from condenser"); 309 Qr as heat_rate (Brief="Heat rate supplied to reboiler"); 310 Had_top as Real (Brief="Dimensionless condenser level"); 311 Had_bot as Real (Brief="Dimensionless reboiler level"); 312 Pad as Real (Brief="Dimensionless pressure"); 313 Tad as Real (Brief="Dimensionless temperature"); 314 315 SET 316 PP.Components = [ "isobutane", "npentane", "propylene", 317 "benzene", "isobutene" ]; 318 PP.LiquidModel = "PR"; 319 PP.VapourModel = "PR"; 320 PP.Derivatives = 1; 321 NComp = PP.NumberOfComponents; 322 323 DEVICES 324 col as Distillation_kettle_cond; 325 feed as streamTP; 326 zero as stream; 327 TCcond as PIDIncr_Ideal_AW; 328 LCtop as PIDIncr_Ideal_AW; 329 LCbot as PIDIncr_Ideal_AW; 330 PC as PIDIncr_Ideal_AW; 331 332 CONNECTIONS 333 feed to col.trays(5).Inlet; 334 zero to col.reb.Inlet; 335 zero to col.trays([1:4]).Inlet; 336 zero to col.trays([6:col.NTrays]).Inlet; 337 Qc to col.cond.Q; 338 Qr to col.reb.Q; 339 340 EQUATIONS 341 "Temperature Controller" 342 TCcond.Parameters.tau = 0*"s"; 343 TCcond.Parameters.tauSet = 0*"s"; 344 TCcond.Parameters.alpha = 0.3; 345 TCcond.Parameters.bias = 0.5; 346 TCcond.Parameters.gamma = 1; 347 TCcond.Parameters.beta = 1; 348 TCcond.Options.action = 1; 349 TCcond.Options.clip = 1; 350 TCcond.Options.autoMan = 0; 351 TCcond.Parameters.intTime = 60*"s"; 352 TCcond.Parameters.gain = 0.6; 353 TCcond.Parameters.derivTime = 1*"s"; 354 TCcond.Ports.setPoint = ((15+273.15) * "K"  Tmin)/(TmaxTmin); 355 TCcond.Ports.input = Tad; 356 Tad = (col.cond.OutletL.TTmin)/(TmaxTmin); 357 Qc = Qcmin+(QcmaxQcmin)*TCcond.Ports.output; 358 359 "Pressure Controller" 360 PC.Parameters.tau = 0*"s"; 361 PC.Parameters.tauSet = 0*"s"; 362 PC.Parameters.alpha = 0.3; 363 PC.Parameters.bias = 0; 364 PC.Parameters.gamma = 1; 365 PC.Parameters.beta = 1; 366 PC.Options.action = 1; 367 PC.Options.clip = 1; 368 PC.Options.autoMan = 0; 369 PC.Parameters.intTime = 6*"s"; 370 PC.Parameters.gain = 0.5; 371 PC.Parameters.derivTime = 1*"s"; 372 PC.Ports.setPoint = (2.0*"bar"Pmin)/(PmaxPmin); 373 PC.Ports.input = Pad; 374 Pad = (col.cond.OutletV.PPmin)/(PmaxPmin); 375 col.cond.OutletV.F = (Fcmin+(FcmaxFcmin)*PC.Ports.output); 376 377 "Ttop Level Controller" 378 LCtop.Parameters.tau = 0*"s"; 379 LCtop.Parameters.tauSet = 0*"s"; 380 LCtop.Parameters.alpha = 0.3; 381 LCtop.Parameters.bias = 0.5; 382 LCtop.Parameters.gamma = 1; 383 LCtop.Parameters.beta = 1; 384 LCtop.Options.action = 1; 385 LCtop.Options.clip = 1; 386 LCtop.Options.autoMan = 0; 387 LCtop.Parameters.intTime = 10*"s"; 388 LCtop.Parameters.gain = 1; 389 LCtop.Parameters.derivTime = 1*"s"; 390 LCtop.Ports.setPoint = (1.0 * "m"  Hmint)/(HmaxtHmint); 391 LCtop.Ports.input = Had_top; 392 Had_top = (col.cond.LevelHmint)/(HmaxtHmint); 393 col.sptop.Outlet1.F = Fcmin + (FcmaxFcmin) * LCtop.Ports.output; 394 395 "Tbottom Level Controller" 396 LCbot.Parameters.tau = 0*"s"; 397 LCbot.Parameters.tauSet = 0*"s"; 398 LCbot.Parameters.alpha = 0.3; 399 LCbot.Parameters.bias = 0.5; 400 LCbot.Parameters.gamma = 1; 401 LCbot.Parameters.beta = 1; 402 LCbot.Options.action = 1; 403 LCbot.Options.clip = 1; 404 LCbot.Options.autoMan = 0; 405 LCbot.Parameters.intTime = 100*"s"; 406 LCbot.Parameters.gain = 1; 407 LCbot.Parameters.derivTime = 1*"s"; 408 LCbot.Ports.setPoint = (1.0 * "m"  Hminb)/(HmaxbHminb); 409 LCbot.Ports.input = Had_bot; 410 Had_bot = (col.reb.LevelHminb)/(HmaxbHminb); 411 col.reb.OutletL.F = Frmin + (FrmaxFrmin) * LCbot.Ports.output; 412 413 SPECIFY 414 feed.F = 113.4 * "kmol/h"; 415 feed.T = 291 * "K"; 416 feed.P = 168.3 * "kPa"; 417 feed.z = 1/NComp; 418 419 zero.F = 0 * "kmol/h"; 420 zero.T = 300 * "K"; 421 zero.P = 1 * "atm"; 422 zero.z = 1/NComp; 423 zero.v = 0; 424 zero.h = 0 * "J/mol"; 425 426 col.sptop.Outlet2.F = 85 * "kmol/h"; # reflux 427 Qr = 3e6 * "kJ/h"; 428 col.pump1.dP = 16 * "kPa"; 429 col.trays.Emv = 1; 430 431 SET 432 col.NTrays = 8; 433 col.cond.V = 2 * "m^3"; 434 col.cond.Across = 1 * "m^2"; 435 col.trays.V = 4 * "ft^3"; 436 col.trays.Ah = 0.394 * "ft^2"; 437 col.trays.lw = 20.94 * "in"; 438 col.trays.hw = 0.125 * "ft"; 439 col.trays.Q = 0 * "kW"; 440 col.trays.beta = 0.6; 441 col.trays.alfa = 4; 442 col.trays.Ap = 3.94 * "ft^2"; 443 col.reb.V = 2 * "m^3"; 444 col.reb.Across = 1 * "m^2"; 445 446 Qrmax = 5e6 * "kJ/h"; 447 Qrmin = 1e6 * "kJ/h"; 448 Frmin = 0 * "kmol/h"; 449 Frmax = 60 * "kmol/h"; 450 Fcmin = 0 * "kmol/h"; 451 Fcmax = 120 * "kmol/h"; 452 Hmint = 0 * "m"; 453 Hmaxt = 2 * "m"; 454 Hminb = 0 * "m"; 455 Hmaxb = 2 * "m"; 456 Pmin = 0.5 * "bar"; 457 Pmax = 4 * "bar"; 458 Qcmax = 5e5 * "kJ/h"; 459 Qcmin = 5e6 * "kJ/h"; 460 Tmax = (30+273.15) * "K"; 461 Tmin = (20+273.15) * "K"; 462 463 INITIAL 464 # condenser 465 col.cond.OutletL.T = 260 *"K"; 466 col.cond.Level = 1 * "m"; 467 col.cond.OutletL.z([1:4]) = [0.2, 0.2, 0.4, 0.05]; 468 469 # reboiler 470 col.reb.OutletL.T = 350 *"K"; 471 col.reb.Level = 1 * "m"; 472 col.reb.OutletL.z([1:4]) = [0.1, 0.4, 0.1, 0.3]; 473 474 # column trays 475 col.trays.OutletL.T = [290:(330290)/(col.NTrays1):330] * "K"; 476 col.trays.Level = 1.2 * col.trays.hw; 477 col.trays.OutletL.z([1:4]) = [0.15, 0.3, 0.25, 0.2]; 478 479 OPTIONS 480 relativeAccuracy = 1e3; 481 time = [0:0.01:0.1, 0.11:0.01:2]*"h"; 482 #initialFile = "Column_ctrl.rlt"; 483 #guessFile = "Column_ctrl.rlt"; 484 #mode = "steady"; 485 end 486
Note: See TracChangeset
for help on using the changeset viewer.