Changeset 805 for branches/gui
- Timestamp:
- Jul 24, 2009, 2:03:40 PM (14 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/reboiler.mso
r794 r805 30 30 * perfect mixing of both phases; 31 31 * no thermodynamics equilibrium; 32 * no liquid entrainment in the vapour stream.33 32 34 33 == SET == … … 50 49 outer NComp as Integer (Brief="Number of Components"); 51 50 Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); 52 51 FlowConstant as Real (Brief = "Flow Constant"); 52 k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol^3/(kg*m^2)'); 53 54 SET 55 56 k = 1*'mol^3/(kg*m^2)'; 57 53 58 VARIABLES 54 59 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); 55 out OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}");60 out OutletVapour as streamPH (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); 56 61 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); 57 62 vV as volume_mol (Brief="Vapour Molar volume", Protected = true); … … 86 91 "Pressure indicator" 87 92 PI * 'atm' = OutletVapour.P; 93 94 "Flow through the reboiler" 95 OutletVapour.F^3 = FlowConstant*k*InletQ; 88 96 89 97 end 90 98 99 Model thermosyphon 100 101 ATTRIBUTES 102 Pallete = true; 103 Icon = "icon/Thermosyphon"; 104 Brief = "Model of a Steady State reboiler thermosyphon."; 105 Info = 106 "== ASSUMPTIONS == 107 * perfect mixing of both phases; 108 * no thermodynamics equilibrium; 109 110 == SET == 111 * the pressure drop in the reboiler; 112 113 == SPECIFY == 114 * the InletLiquid stream; 115 * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model) 116 OR the outlet temperature (OutletVapour.T); 117 118 == OPTIONAL == 119 * the reboiler model has two control ports 120 ** TI OutletVapour Temperature Indicator; 121 ** PI OutletVapour Pressure Indicator; 122 "; 123 124 PARAMETERS 125 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 126 outer NComp as Integer (Brief="Number of Components"); 127 Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); 128 FlowConstant as Real (Brief = "Flow Constant"); 129 k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol^3/(kg*m^2)'); 130 131 SET 132 133 k = 1*'mol^3/(kg*m^2)'; 134 135 VARIABLES 136 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.44, PosY=1, Symbol="_{inL}"); 137 out OutletVapour as streamPH (Brief="Vapour outlet stream", PosX=0, PosY=0.09, Symbol="_{outV}"); 138 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.77, Symbol="Q_{in}", Protected = true); 139 140 out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=1, PosY=0.57); 141 out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=1, PosY=0.35); 142 143 EQUATIONS 144 145 "Molar Flow Balance" 146 InletLiquid.F = OutletVapour.F; 147 148 "Molar Composition Balance" 149 InletLiquid.z = OutletVapour.z; 150 151 "Energy Balance" 152 InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; 153 154 "Pressure Drop" 155 OutletVapour.P = InletLiquid.P - Pdrop; 156 157 "Temperature indicator" 158 TI * 'K' = OutletVapour.T; 159 160 "Pressure indicator" 161 PI * 'atm' = OutletVapour.P; 162 163 "Flow through the thermosyphon reboiler" 164 OutletVapour.F^3 = FlowConstant*k*InletQ; 165 166 end 167 91 168 Model reboilerSteady_fakeH 169 92 170 ATTRIBUTES 93 171 Pallete = true; … … 113 191 VARIABLES 114 192 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); 115 out OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}");193 out OutletVapour as stream (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); 116 194 in InletQ as power (Brief="Heat Duty", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); 117 195 … … 131 209 132 210 "Fake Vapourisation Fraction" 133 OutletVapour.v = 1.0; 134 211 OutletVapour.v = 0.6; 135 212 "Fake output temperature" 136 213 OutletVapour.T = 300*'K'; 137 214 138 "Pressure Drop through the reboiler" 215 #OutletVapour.v = PP.VapourFraction(OutletVapour.T, OutletVapour.P, OutletVapour.z); 216 #OutletVapour.h = OutletVapor.v * PP.VapourEnthalpy(OutletVapour.T, OutletVapour.P, OutletVapour.z) 217 # + (1-OutletVapor.v) * PP.LiquidEnthalpy(OutletVapour.T, OutletVapour.P, OutletVapour.z) 218 219 "Flow through the reboiler" 139 220 OutletVapour.F = FlowConstant*k*InletQ; 140 221 -
branches/gui/eml/stage_separators/tank.mso
r800 r805 583 583 Pallete = true; 584 584 Icon = "icon/SumpTank"; 585 Brief = "Model of a Column Sump Tank.";585 Brief = "Model of a Tank With Thermodynamic Equilibrium."; 586 586 Info = 587 587 "== ASSUMPTIONS == 588 * liquid phase only; 588 * perfect mixing of both phases; 589 * thermodynamics equilibrium. 589 590 590 591 == 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); 592 *Orientation: vessel position - vertical or horizontal; 593 *Heads (bottom and top heads are identical) 594 **elliptical: 2:1 elliptical heads (25% of vessel diameter); 595 **hemispherical: hemispherical heads (50% of vessel diameter); 596 **flat: flat heads (0% of vessel diameter); 595 597 *Diameter: Vessel diameter; 596 598 *Lenght: Side length of the cylinder shell; … … 598 600 == SPECIFY == 599 601 * the Inlet stream; 600 * the OutletLiquid.F; 602 * the outlet flows: OutletVapour.F and OutletLiquid.F; 603 * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model). 601 604 602 605 == OPTIONAL == 603 * the SumpTank model has one control port 606 * the TankVL model has three control ports 607 ** TI OutletLiquid Temperature Indicator; 608 ** PI OutletLiquid Pressure Indicator; 604 609 ** LI Level Indicator; 605 610 … … 614 619 outer NComp as Integer (Brief = "Number of components", Lower = 1); 615 620 621 Mw(NComp) as molweight (Brief="Mol Weight", Hidden=true); 616 622 pi as positive (Brief="Pi value", Default=3.141593,Hidden=true, Symbol="\pi"); 617 Head as Switcher (Valid=["elliptical","hemispherical","flat"],Default="flat"); 623 624 Heads as Switcher (Valid=["elliptical","hemispherical","flat"],Default="flat"); 618 625 Diameter as length (Brief="Vessel diameter", Symbol="D_{i}"); 619 626 Lenght as length (Brief="Side length of the cylinder shell", Symbol="L_{vessel}"); … … 630 637 SET 631 638 632 Vhead_elliptical = (pi*Diameter^3)/24; 633 Vhead_hemispherical = (pi*Diameter^3)/12; 639 Mw=PP.MolecularWeight(); 640 641 Vhead_elliptical = (pi*Diameter^3)/12; 642 Vhead_hemispherical = (pi*Diameter^3)/6; 634 643 Vcylinder = 0.25*(pi*Diameter^2)*Lenght; 635 644 radius = 0.5*Diameter; … … 637 646 VARIABLES 638 647 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}"); 648 in InletLiquid as stream (Brief="Feed Stream", PosX=0.22, PosY=0, Symbol="_{in}"); 649 out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.50, PosY=1, Symbol="_{out}^{Liquid}"); 650 in InletVapour as stream (Brief="Vapour outlet stream", PosX=1, PosY=0.20, Symbol="_{out}^{Vapour}"); 651 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.68, PosY=0, Symbol="_{out}^{Vapour}"); 652 InletQ as power (Brief="Heat Duty", Protected =false,Symbol="Q_{in}"); 641 653 642 654 Vtotal as volume (Brief="Vessel total volume",Protected=true, Symbol="V_{total}"); … … 644 656 645 657 TotalHoldup(NComp) as mol (Brief="Molar Holdup in the Vessel", Protected=true); 658 LiquidHoldup as mol (Brief="Molar liquid holdup", Protected=true); 659 VapourHoldup as mol (Brief="Molar vapour holdup", Protected=true); 646 660 647 661 E as energy (Brief="Total Energy Holdup in the Vessel", Protected=true); 648 662 vL as volume_mol (Brief="Liquid Molar Volume", Protected=true); 663 vV as volume_mol (Brief="Vapour Molar volume", Protected=true); 649 664 Level as length (Brief="liquid height", Protected=true); 650 665 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); 666 #vfrac as positive (Brief="Vapourization fraction", Symbol="\phi", Protected=true); 667 #Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}", Protected=true); 668 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true); 669 670 out LI as control_signal (Brief="Level Indicator", PosX=1, PosY=0.6, Protected=true); 653 671 654 672 INITIAL … … 668 686 Across = 0.25*(pi*Diameter^2); 669 687 670 switch Head 688 switch Heads 671 689 672 690 case "elliptical": … … 715 733 716 734 "Component Molar Balance" 717 diff(TotalHoldup) =Inlet.F*Inlet.z - OutletLiquid.F*OutletLiquid.z;735 diff(TotalHoldup) = InletLiquid.F*InletLiquid.z + InletVapour.F*InletVapour.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; 718 736 719 737 "Energy Balance" 720 diff(E) = Inlet.F*Inlet.h - OutletLiquid.F*OutletLiquid.h; 721 738 diff(E) = InletLiquid.F*InletLiquid.h + InletVapour.F*InletVapour.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ; 739 740 "Molar Holdup" 741 TotalHoldup = LiquidHoldup*OutletLiquid.z + VapourHoldup*OutletVapour.z; 742 722 743 "Energy Holdup" 723 E = sum(TotalHoldup)*OutletLiquid.h; 724 725 "Mechanical Equilibrium" 726 Inlet.P = OutletLiquid.P; 744 E = LiquidHoldup*OutletLiquid.h + VapourHoldup*OutletVapour.h - OutletLiquid.P*Vtotal; 745 746 "Mol fraction normalisation" 747 sum(OutletLiquid.z)=1.0; 748 749 "Mol fraction normalisation" 750 sum(OutletLiquid.z)=sum(OutletVapour.z); 751 752 #"Vaporization Fraction" 753 #OutletVapour.F = (InletLiquid.F + InletVapour.F)* vfrac; 727 754 728 755 "Liquid Volume" 729 756 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); 730 757 731 "Molar Holdup" 732 TotalHoldup = OutletLiquid.z*sum(TotalHoldup); 733 734 "Liquid Level" 735 Vfilled = sum(TotalHoldup) * vL; 736 758 "Vapour Volume" 759 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); 760 761 "Chemical Equilibrium" 762 PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = 763 PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; 764 765 "Thermal Equilibrium" 766 OutletVapour.T = OutletLiquid.T; 767 768 "Mechanical Equilibrium" 769 OutletVapour.P = OutletLiquid.P; 770 771 "Pressure Drop" 772 #OutletLiquid.P = min([InletLiquid.P,InletVapour.P]) - Pdrop; 773 OutletLiquid.P = InletLiquid.P - Pdrop; 774 775 #"Pressure Ratio" 776 #OutletLiquid.P = InletLiquid.P * Pratio; 777 778 "Geometry Constraint" 779 Vtotal = LiquidHoldup * vL + VapourHoldup * vV; 780 737 781 "Level indicator" 738 782 LI*Vtotal= Vfilled; 783 784 "Liquid Level" 785 LiquidHoldup * vL = Vfilled; 739 786 740 787 end
Note: See TracChangeset
for help on using the changeset viewer.