Changeset 436 for branches/packed/eml
 Timestamp:
 Dec 19, 2007, 2:06:02 PM (15 years ago)
 Location:
 branches/packed
 Files:

 1 edited
 1 copied
Legend:
 Unmodified
 Added
 Removed

branches/packed/eml/stage_separators/tray.mso
r398 r436 323 323 V = ML* vL + MV*vV; 324 324 end 325 326 Model packedStage1 as trayBasic 327 #it's not working....initialization problems. 328 PARAMETERS 329 PPwater as Plugin(Brief="Physical Properties", 330 Type="PP", 331 Components = [ "water" ], 332 LiquidModel = "PR", 333 VapourModel = "PR" 334 ); 335 336 PackingType as Switcher(Valid = ["random", "structured"], Default = "randon"); 337 PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl"); 338 339 a as Real (Brief="Constant used in Leva equation", Unit='1/m', Default=873.55); 340 b as Real (Brief="Constant used in Leva equation", Unit='m^2*s/kg', Default=0.058); 341 Fp as Real (Brief="Packing factor", Default = 300); 342 e as fraction (Brief="Packing Porosity", Default=0.84); 343 dp as length (Brief="Packing Dimension", Default=0.013); 344 C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994); 345 346 S as length (Brief="Structured packing parameter", Default=0.009); 347 teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45); 348 C3 as Real (Brief="Structured packing parameter", Default=3.38); 349 350 Across as area (Brief="Tower cross section area"); 351 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 352 g as acceleration (Default=9.81); 353 354 SET 355 Mw = PP.MolecularWeight(); 356 357 VARIABLES 358 rhoL as dens_mass (Brief="Liquid density"); 359 rhoV as dens_mass (Brief="Vapor density"); 360 viscL as viscosity (Brief="Liquid Viscosity"); 361 viscV as viscosity (Brief="Vapor Viscosity"); 362 rhow as dens_mass (Brief="Water density"); 363 visclw as viscosity (Brief="Water viscosity"); 364 365 L as flux_mass (Brief="Liquid mass flux"); 366 G as flux_mass (Brief="Liquid mass flux"); 367 Llin as flux_mass (Brief="Water contribution on liquid mass flux"); 368 X as Real (Brief="Term in Prahl correlation"); 369 Y as Real (Brief="Term in Prahl correlation"); 370 Reg as Real (Brief="Packing Reynolds"); 371 Ge as velocity (Brief="Temporay variable"); 372 Fr as Real (Brief="Froud number"); 373 phiL as Real (Brief="Liquid holdup in packed towers"); 374 375 EQUATIONS 376 "If the liquid is not water  mass flux correction" 377 Llin = L * rhow/rhoL; 378 379 "Base unit conversion" 380 L = OutletL.F*sum(Mw)/Across; 381 G = OutletV.F*sum(Mw)/Across; 382 383 "X in Prahl correlation" 384 X * G = L * (rhoV/rhoL)^0.5; 385 386 "Y in Prahl correlation" 387 Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ; 388 389 "Water Liquid Viscosity" 390 visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1); 391 "Water Liquid Density" 392 rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1); 393 "Liquid Viscosity" 394 viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); 395 "Vapor Viscosity" 396 viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z); 397 "Liquid Density" 398 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); 399 "Vapour Density" 400 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); 401 402 "Froud number" 403 Fr = (L/rhoL)^2 / S/g; 404 "Reynolds number" 405 Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV; 406 "Temporary variable" 407 Ge = G/rhoV /(e*sin(teta)); 408 "Conversion from ML to phiL" 409 phiL = ML*vL / V; 410 411 switch PackingType 412 case "random": 413 switch PressureDropModel 414 case "Leva": 415 (InletV.P  OutletV.P) = (V/Across) * a * 10^(b*Llin) * G^2/rhoV; 416 case "Prahl": 417 (InletV.P  OutletV.P)/'0.101972*Pa' = (V/Across)/'m' * Y*(1116*X+500)/(1Y*(35*X+3)); 418 end 419 phiL = (1.53e4 + 2.9e5 * e * (dp * L/viscL/e)^0.66 * (viscL/visclw)^0.75) * (dp/'m')^(1.2); 420 421 case "structured": 422 (InletV.P  OutletV.P) = (V/Across) * (0.171 + 92.7/Reg)*(rhoV*(Ge)^2 / S) 423 * (1/(1C3 * Fr^0.5))^5; 424 425 phiL = C3 * Fr^0.5; 426 end 427 428 # OutletL.F = 220 * 'kmol/h'; 429 # OutletV.F = 150 * 'kmol/h'; 430 end 431 432 Model packedStage2 as trayBasic 433 PARAMETERS 434 PPwater as Plugin(Brief="Physical Properties", 435 Type="PP", 436 Components = [ "water" ], 437 LiquidModel = "PR", 438 VapourModel = "PR" 439 ); 440 441 PackingType as Switcher(Valid = ["random", "structured"], Default = "randon"); 442 PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl"); 443 444 a as Real (Brief="Constant used in Leva equation", Default=873.55); 445 b as Real (Brief="Constant used in Leva equation", Default=0.058); 446 Fp as Real (Brief="Packing factor", Default = 300); 447 e as fraction (Brief="Packing Porosity", Default=0.84); 448 dp as length (Brief="Packing Dimension", Default=0.013); 449 C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994); 450 451 S as length (Brief="Structured packing parameter", Default=0.009); 452 teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45); 453 C3 as Real (Brief="Structured packing parameter", Default=3.38); 454 455 Across as area (Brief="Tower cross section area"); 456 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 457 g as acceleration (Default=9.81); 458 459 SET 460 Mw = PP.MolecularWeight(); 461 462 VARIABLES 463 rhoL as dens_mass (Brief="Liquid density"); 464 rhoV as dens_mass (Brief="Vapor density"); 465 viscL as viscosity (Brief="Liquid Viscosity"); 466 viscV as viscosity (Brief="Vapor Viscosity"); 467 rhow as dens_mass (Brief="Water density"); 468 visclw as viscosity (Brief="Water viscosity"); 469 470 L as flux_mass (Brief="Liquid mass flux"); 471 G as flux_mass (Brief="Liquid mass flux"); 472 Llin as flux_mass (Brief="Water contribution on liquid mass flux"); 473 X as Real (Brief="Term in Prahl correlation"); 474 Y as Real (Brief="Term in Prahl correlation"); 475 Reg as Real (Brief="Packing Reynolds"); 476 Ge as velocity (Brief="Temporay variable"); 477 Fr as Real (Brief="Froud number"); 478 phiL as Real (Brief="Liquid holdup in packed towers"); 479 480 deltaP_z as Real (Unit = 'inH2O/ft'); 481 482 EQUATIONS 483 deltaP_z = (InletV.P  OutletV.P) / (V/Across); 484 485 "If the liquid is not water  mass flux correction" 486 Llin = L * rhow/rhoL; 487 488 "Base unit conversion (mol > mass)" 489 L = OutletL.F*sum(Mw*OutletL.z)/Across; 490 G = OutletV.F*sum(Mw*OutletV.z)/Across; 491 492 "X in Prahl correlation" 493 X * G = L * (rhoV/rhoL)^0.5; 494 495 "Y in Prahl correlation" 496 Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ; 497 498 "Water Liquid Viscosity" 499 visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1); 500 "Water Liquid Density" 501 rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1); 502 "Liquid Viscosity" 503 viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); 504 "Vapor Viscosity" 505 viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z); 506 "Liquid Density" 507 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); 508 "Vapour Density" 509 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); 510 511 "Froud number" 512 Fr = (L/rhoL)^2 / S/g; 513 "Reynolds number" 514 Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV; 515 "Temporary variable" 516 Ge = G/rhoV /(e*sin(teta)); 517 "Conversion from ML to phiL" 518 phiL = ML*vL / V; 519 520 switch PackingType 521 case "random": 522 switch PressureDropModel 523 case "Leva": 524 #(InletV.P  OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3')); 525 (InletV.P  OutletV.P) / (V/(Across) ) = a * 10^(b*Llin) * (G)^2/(rhoV); 526 case "Prahl": 527 (InletV.P  OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1Y*(35*X+3)); 528 end 529 phiL = (1.53e4 + (2.9e5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(1.2); 530 531 case "structured": 532 (InletV.P  OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) ) 533 * (1/(1C3 * sqrt(Fr) ))^5; 534 535 phiL = C3 * sqrt(Fr); 536 end 537 538 539 end
Note: See TracChangeset
for help on using the changeset viewer.