Changeset 498 for trunk/eml/stage_separators/tray.mso
 Timestamp:
 Apr 11, 2008, 3:21:24 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/eml/stage_separators/tray.mso
r398 r498 323 323 V = ML* vL + MV*vV; 324 324 end 325 326 #* 327 * Model of a packed column stage 328 *# 329 Model packedStage 330 ATTRIBUTES 331 Pallete = false; 332 Icon = "icon/Tray"; 333 Brief = "Complete model of a packed column stage."; 334 Info = 335 "== Specify == 336 * the Feed stream 337 * the Liquid inlet stream 338 * the Vapour inlet stream 339 * the stage pressure drop (deltaP) 340 341 == Initial == 342 * the plate temperature (OutletL.T) 343 * the liquid molar holdup ML 344 * (NoComps  1) OutletL compositions 345 "; 346 347 PARAMETERS 348 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 349 outer NComp as Integer; 350 PPwater as Plugin(Brief="Physical Properties", 351 Type="PP", 352 Components = [ "water" ], 353 LiquidModel = "PR", 354 VapourModel = "PR" 355 ); 356 357 V as volume(Brief="Total Volume of the tray"); 358 Q as heat_rate (Brief="Rate of heat supply"); 359 d as length (Brief="Column diameter"); 360 361 a as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 362 g as acceleration; 363 e as Real (Brief="Void fraction of packing, m^3/m^3"); 364 Cpo as Real (Brief="Constant for resitance equation"); # Billet and Schultes, 1999. 365 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 366 hs as length (Brief="Height of the packing stage"); 367 Qsil as positive (Brief="Resistance coefficient on the liquid load", Default=1); 368 369 VARIABLES 370 in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}"); 371 in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); 372 in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); 373 out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); 374 out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); 375 376 M(NComp) as mol (Brief="Molar Holdup in the tray", Default=0.01, Lower=0, Upper=100); 377 ML as mol (Brief="Molar liquid holdup", Default=0.01, Lower=0, Upper=100); 378 MV as mol (Brief="Molar vapour holdup", Default=0.01, Lower=0, Upper=100); 379 E as energy (Brief="Total Energy Holdup on tray", Default=500); 380 vL as volume_mol (Brief="Liquid Molar Volume"); 381 vV as volume_mol (Brief="Vapour Molar volume"); 382 383 miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s'); 384 miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s'); 385 rhoL as dens_mass; 386 rhoV as dens_mass; 387 388 deltaP as pressure; 389 390 uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=10, Upper=100); 391 uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=10, Upper=100); 392 dp as length (Brief="Particle diameter", Default=1e3, Lower=0, Upper=10); 393 invK as positive (Brief="Wall factor", Default=1, Upper=10); 394 Rev as Real (Brief="Reynolds number of the vapor stream", Default=4000); 395 Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=1); 396 hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10); 397 398 SET 399 Mw = PP.MolecularWeight(); 400 401 EQUATIONS 402 "Component Molar Balance" 403 diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z 404  OutletL.F*OutletL.z  OutletV.F*OutletV.z; 405 406 "Energy Balance" 407 diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h 408  OutletL.F*OutletL.h  OutletV.F*OutletV.h + Q ); 409 410 "Molar Holdup" 411 M = ML*OutletL.z + MV*OutletV.z; 412 413 "Energy Holdup" 414 E = ML*OutletL.h + MV*OutletV.h  OutletL.P*V; 415 416 "Mol fraction normalisation" 417 sum(OutletL.z)= 1.0; 418 419 "Liquid Volume" 420 vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); 421 "Vapour Volume" 422 vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 423 424 "Chemical Equilibrium" 425 PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = 426 PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; 427 428 "Thermal Equilibrium" 429 OutletV.T = OutletL.T; 430 431 "Mechanical Equilibrium" 432 OutletL.P = OutletV.P; 433 434 "Geometry Constraint" 435 V*e = ML*vL + MV*vV; 436 437 "Liquid Density" 438 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); 439 "Vapour Density" 440 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); 441 "Liquid viscosity" 442 miL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); 443 "Vapour viscosity" 444 miV = PP.VapourViscosity(InletV.T, InletV.P, InletV.z); 445 446 "Area occupied by the liquid" 447 Al = ML*vL/hs; 448 449 "Volume flow rate of liquid, m^3/m^2/s" 450 uL * Al = OutletL.F * vL; 451 "Volume flow rate of vapor, m^3/m^2/s" 452 uV * ((d^2*3.14159/4)*e  Al) = OutletV.F * vV; 453 454 "Liquid holdup" 455 hl = ML*vL/V/e; 456 457 "Particle diameter" 458 dp = 6 * (1e)/a; 459 460 "Wall Factor" 461 invK = (1 + (2*dp/(3*d*(1e)))); 462 463 "Reynolds number of the vapor stream" 464 Rev*invK = dp*uV*rhoV / (miV*(1e)); 465 466 deltaP = InletV.P  OutletV.P; 467 468 "Pressure drop and Vapor flow" 469 deltaP/hs = Qsil*a*uV^2*rhoV*invK / (2*(ehl)^3); 470 471 "Liquid holdup" 472 hl = (12*miL*a^2*uL/rhoL/g)^1/3; 473 end
Note: See TracChangeset
for help on using the changeset viewer.