Changeset 805


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

updates - added thermosyphon reboiler / fixed sump tank

Location:
branches/gui/eml/stage_separators
Files:
2 added
2 edited

Legend:

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

    r794 r805  
    3030* perfect mixing of both phases;
    3131* no thermodynamics equilibrium;
    32 * no liquid entrainment in the vapour stream.
    3332
    3433== SET ==
     
    5049        outer NComp     as Integer              (Brief="Number of Components");
    5150        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
     54SET
     55
     56        k = 1*'mol^3/(kg*m^2)';
     57       
    5358VARIABLES
    5459        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}");
    5661        in      InletQ                  as power                                (Brief="Heat supplied", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true);
    5762        vV                              as volume_mol                   (Brief="Vapour Molar volume", Protected = true);
     
    8691"Pressure indicator"
    8792        PI * 'atm' = OutletVapour.P;
     93       
     94"Flow through the reboiler"
     95        OutletVapour.F^3 = FlowConstant*k*InletQ;
    8896
    8997end
    9098
     99Model thermosyphon
     100
     101ATTRIBUTES
     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)
     116OR 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
     124PARAMETERS
     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
     131SET
     132
     133        k = 1*'mol^3/(kg*m^2)';
     134       
     135VARIABLES
     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
     143EQUATIONS
     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
     166end
     167
    91168Model reboilerSteady_fakeH
     169
    92170        ATTRIBUTES
    93171        Pallete         = true;
     
    113191VARIABLES
    114192        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}");
    116194        in      InletQ                  as power                                (Brief="Heat Duty", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true);
    117195
     
    131209
    132210"Fake Vapourisation Fraction"
    133         OutletVapour.v = 1.0;
    134        
     211        OutletVapour.v = 0.6;
    135212"Fake output temperature"
    136213        OutletVapour.T = 300*'K';
    137214       
    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"
    139220        OutletVapour.F = FlowConstant*k*InletQ;
    140221
  • 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.