Ignore:
Timestamp:
Jul 24, 2009, 2:03:40 PM (13 years ago)
Author:
gerson bicca
Message:

updates - added thermosyphon reboiler / fixed sump tank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/stage_separators/tank.mso

    r800 r805  
    583583        Pallete         = true;
    584584        Icon            = "icon/SumpTank";
    585         Brief           = "Model of a Column Sump Tank.";
     585        Brief           = "Model of a Tank With Thermodynamic Equilibrium.";
    586586        Info            =
    587587"== ASSUMPTIONS ==
    588 * liquid phase only;
     588* perfect mixing of both phases;
     589* thermodynamics equilibrium.
    589590
    590591== 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);
    595597*Diameter: Vessel diameter;
    596598*Lenght: Side length of the cylinder shell;
     
    598600== SPECIFY ==
    599601* 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).
    601604
    602605== 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;
    604609** LI Level Indicator;
    605610
     
    614619outer NComp     as Integer      (Brief = "Number of components", Lower = 1);
    615620
     621        Mw(NComp)               as molweight    (Brief="Mol Weight", Hidden=true);
    616622        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");
    618625        Diameter                as length               (Brief="Vessel diameter", Symbol="D_{i}");
    619626        Lenght                  as length               (Brief="Side length of the cylinder shell", Symbol="L_{vessel}");
     
    630637SET
    631638
    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;
    634643        Vcylinder = 0.25*(pi*Diameter^2)*Lenght;
    635644        radius = 0.5*Diameter;
     
    637646VARIABLES
    638647
    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}");
     648in      InletLiquid     as stream                       (Brief="Feed Stream", PosX=0.22, PosY=0, Symbol="_{in}");
     649out     OutletLiquid    as liquid_stream        (Brief="Liquid outlet stream", PosX=0.50, PosY=1, Symbol="_{out}^{Liquid}");
     650in      InletVapour     as stream                       (Brief="Vapour outlet stream", PosX=1, PosY=0.20, Symbol="_{out}^{Vapour}");
     651out     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}");
    641653
    642654        Vtotal                  as volume                       (Brief="Vessel total volume",Protected=true, Symbol="V_{total}");
     
    644656
    645657        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);
    646660       
    647661        E                       as energy               (Brief="Total Energy Holdup in the Vessel", Protected=true);
    648662        vL                      as volume_mol   (Brief="Liquid Molar Volume", Protected=true);
     663        vV                      as volume_mol   (Brief="Vapour Molar volume", Protected=true);
    649664        Level           as length               (Brief="liquid height", Protected=true);
    650665        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
     670out     LI as control_signal    (Brief="Level Indicator", PosX=1, PosY=0.6, Protected=true);
    653671
    654672INITIAL
     
    668686        Across = 0.25*(pi*Diameter^2);
    669687
    670 switch Head
     688switch Heads
    671689
    672690case "elliptical":
     
    715733
    716734"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;
    718736       
    719737"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       
    722743"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;
    727754
    728755"Liquid Volume"
    729756        vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
    730757
    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
    737781"Level indicator"
    738782        LI*Vtotal= Vfilled;
     783
     784"Liquid Level"
     785        LiquidHoldup * vL = Vfilled;
    739786
    740787end
Note: See TracChangeset for help on using the changeset viewer.