Changeset 800 for branches/gui
- Timestamp:
- Jul 18, 2009, 11:18:23 PM (14 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/tank.mso
r799 r800 578 578 end 579 579 580 Model SumpTank 581 582 ATTRIBUTES 583 Pallete = true; 584 Icon = "icon/SumpTank"; 585 Brief = "Model of a Column Sump Tank."; 586 Info = 587 "== ASSUMPTIONS == 588 * liquid phase only; 589 590 == SET == 591 *Head 592 **elliptical: 2:1 elliptical head (25% of vessel diameter); 593 **hemispherical: hemispherical head (50% of vessel diameter); 594 **flat: flat head (0% of vessel diameter); 595 *Diameter: Vessel diameter; 596 *Lenght: Side length of the cylinder shell; 597 598 == SPECIFY == 599 * the Inlet stream; 600 * the OutletLiquid.F; 601 602 == OPTIONAL == 603 * the SumpTank model has one control port 604 ** LI Level Indicator; 605 606 == INITIAL CONDITIONS == 607 * Initial_Temperature : the Tank temperature (OutletLiquid.T); 608 * Initial_Level : the Tank liquid level (Level); 609 * Initial_Composition : (NoComps) OutletLiquid compositions. 610 "; 611 612 PARAMETERS 613 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 614 outer NComp as Integer (Brief = "Number of components", Lower = 1); 615 616 pi as positive (Brief="Pi value", Default=3.141593,Hidden=true, Symbol="\pi"); 617 Head as Switcher (Valid=["elliptical","hemispherical","flat"],Default="flat"); 618 Diameter as length (Brief="Vessel diameter", Symbol="D_{i}"); 619 Lenght as length (Brief="Side length of the cylinder shell", Symbol="L_{vessel}"); 620 621 Vhead_elliptical as volume (Brief="Elliptical Head Total Volume",Hidden=true, Symbol="V_{head}^{elliptical}"); 622 Vhead_hemispherical as volume (Brief="Hemispherical Head Total Volume",Hidden=true, Symbol="V_{head}^{hemispherical}"); 623 Vcylinder as volume (Brief="Cylinder Total Volume",Hidden=true, Symbol="V_{cylinder}"); 624 radius as length (Brief="Vessel radius",Hidden=true, Symbol="R_{cylinder}"); 625 626 Levelpercent_Initial as positive (Brief="Initial liquid height in Percent", Default = 0.70); 627 Temperature_Initial as temperature (Brief="Initial Liquid Temperature", Default = 330); 628 Composition_Initial(NComp) as fraction (Brief="Initial Composition", Default = 0.10); 629 630 SET 631 632 Vhead_elliptical = (pi*Diameter^3)/24; 633 Vhead_hemispherical = (pi*Diameter^3)/12; 634 Vcylinder = 0.25*(pi*Diameter^2)*Lenght; 635 radius = 0.5*Diameter; 636 637 VARIABLES 638 639 in Inlet as stream (Brief="Feed Stream", PosX=0.5, PosY=0, Symbol="_{in}"); 640 out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.5, PosY=1, Symbol="_{out}^{Liquid}"); 641 642 Vtotal as volume (Brief="Vessel total volume",Protected=true, Symbol="V_{total}"); 643 Vfilled as volume (Brief="Vessel volume content",Protected=true, Symbol="V_{filled}"); 644 645 TotalHoldup(NComp) as mol (Brief="Molar Holdup in the Vessel", Protected=true); 646 647 E as energy (Brief="Total Energy Holdup in the Vessel", Protected=true); 648 vL as volume_mol (Brief="Liquid Molar Volume", Protected=true); 649 Level as length (Brief="liquid height", Protected=true); 650 Across as area (Brief="Vessel cylinder shell Cross section area", Hidden=true, Symbol="A_{cross}"); 651 652 out LI as control_signal (Brief="Level Indicator", PosX=1, PosY=0.4, Protected=true); 653 654 INITIAL 655 656 "Initial level Percent" 657 LI = Levelpercent_Initial; 658 659 "Initial Outlet Liquid Temperature" 660 OutletLiquid.T = Temperature_Initial; 661 662 "Initial Outlet Liquid Composition Normalized" 663 OutletLiquid.z(1:NComp - 1) = Composition_Initial(1:NComp - 1)/sum(Composition_Initial); 664 665 EQUATIONS 666 667 "Vessel Cross Section Area" 668 Across = 0.25*(pi*Diameter^2); 669 670 switch Head 671 672 case "elliptical": 673 674 "Vessel Total Volume" 675 Vtotal = Vhead_elliptical + Vcylinder; 676 677 if Level < 0.25*Diameter then 678 679 "Vessel Filled Volume" 680 Vfilled = 0.25*pi*(((Diameter*Level)/(0.25*Diameter))^2)*(0.25*Diameter-Level/3); 681 682 else 683 684 "Vessel Filled Volume" 685 Vfilled = 0.25*pi*(Diameter^2)*(Level - 0.25*Diameter/3); 686 687 end 688 689 case "hemispherical": 690 691 "Vessel Total Volume" 692 Vtotal = Vhead_hemispherical + Vcylinder; 693 694 if Level < 0.5*Diameter then 695 696 "Vessel Filled Volume" 697 Vfilled = 0.25*pi*(Level^2)*(2*Diameter-4*Level/3); 698 699 else 700 701 "Vessel Filled Volume" 702 Vfilled = 0.25*pi*((2/3)*((0.5*Diameter)^3) - (0.25*(Diameter)^3) + Level*Diameter^2); 703 704 end 705 706 case "flat": 707 708 "Vessel Total Volume" 709 Vtotal = Vcylinder; 710 711 "Vessel Filled Volume" 712 Vfilled = Across*Level; 713 714 end 715 716 "Component Molar Balance" 717 diff(TotalHoldup)=Inlet.F*Inlet.z - OutletLiquid.F*OutletLiquid.z; 718 719 "Energy Balance" 720 diff(E) = Inlet.F*Inlet.h - OutletLiquid.F*OutletLiquid.h; 721 722 "Energy Holdup" 723 E = sum(TotalHoldup)*OutletLiquid.h; 724 725 "Mechanical Equilibrium" 726 Inlet.P = OutletLiquid.P; 727 728 "Liquid Volume" 729 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); 730 731 "Molar Holdup" 732 TotalHoldup = OutletLiquid.z*sum(TotalHoldup); 733 734 "Liquid Level" 735 Vfilled = sum(TotalHoldup) * vL; 736 737 "Level indicator" 738 LI*Vtotal= Vfilled; 739 740 end 741 580 742 Model tank_feed 581 743 ATTRIBUTES 582 Pallete = true;744 Pallete = false; 583 745 Icon = "icon/Tank"; 584 746 Brief = "Model of a tank with feed stream.";
Note: See TracChangeset
for help on using the changeset viewer.