Changeset 820


Ignore:
Timestamp:
Aug 10, 2009, 4:55:23 PM (13 years ago)
Author:
mamuller
Message:

Added the static head contribution to the liquid outlet pressure.

File:
1 edited

Legend:

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

    r807 r820  
    583583        Pallete         = true;
    584584        Icon            = "icon/SumpTank";
    585         Brief           = "Model of a Tank With Thermodynamic Equilibrium.";
     585        Brief           = "Model of a tank with 2 material inlet streams and with thermodynamic equilibrium.";
    586586        Info            =
    587587"== ASSUMPTIONS ==
     
    621621        Mw(NComp)               as molweight    (Brief="Mol Weight", Hidden=true);
    622622        pi                      as positive             (Brief="Pi value", Default=3.141593,Hidden=true, Symbol="\pi");
     623        g                               as acceleration         (Brief="Gravity Acceleration",Default=9.81,Hidden=true);
    623624       
    624625        Heads                   as Switcher     (Valid=["elliptical","hemispherical","flat"],Default="flat");
     
    639640        Mw=PP.MolecularWeight();
    640641
     642        g = 9.81 * 'm/(s^2)';
    641643        Vhead_elliptical        = (pi*Diameter^3)/12;
    642644        Vhead_hemispherical = (pi*Diameter^3)/6;
     
    666668        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true);
    667669
     670        Peq                     as pressure             (Brief="Equilibrium pressure on the liquid surface", Protected=true, DisplayUnit = 'kPa', Symbol="\Delta P_ª{eq}");
     671        Pstatic         as pressure             (Brief="Static head at the bottom of the tank", Protected = true, DisplayUnit = 'kPa', Symbol="P_{static}^{Liquid}");
     672
    668673out     LI as control_signal    (Brief="Level Indicator", PosX=1, PosY=0.7, Protected=true);
    669674out     TI as control_signal    (Brief="Temperature Indicator", PosX=1, PosY=0.6, Protected=true);
     
    750755
    751756"Liquid Volume"
    752         vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
     757        vL = PP.LiquidVolume(OutletLiquid.T, Peq, OutletLiquid.z);
    753758
    754759"Vapour Volume"
    755         vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z);
     760        vV = PP.VapourVolume(OutletVapour.T, Peq, OutletVapour.z);
    756761       
    757762"Chemical Equilibrium"
    758         PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z =
    759                 PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z;
     763        PP.LiquidFugacityCoefficient(OutletLiquid.T, Peq, OutletLiquid.z)*OutletLiquid.z =
     764                PP.VapourFugacityCoefficient(OutletVapour.T, Peq, OutletVapour.z)*OutletVapour.z;
    760765       
    761766"Thermal Equilibrium"
    762767        OutletVapour.T = OutletLiquid.T;
    763768       
    764 "Mechanical Equilibrium"
    765         OutletVapour.P = OutletLiquid.P;
     769"Mechanical Equilibrium for the Vapour Phase"
     770        OutletVapour.P = Peq;
     771       
     772"Static Head"   
     773        Pstatic = PP.LiquidDensity(OutletLiquid.T, Peq, OutletLiquid.z) * g * Level;
     774
     775"Mechanical Equilibrium for the Liquid Phase"
     776        OutletLiquid.P = Peq + Pstatic;
    766777
    767778"Pressure Drop"
    768         #OutletLiquid.P  = min([InletLiquid.P,InletVapour.P]) - Pdrop;
    769         OutletLiquid.P  = InletLiquid.P - Pdrop;
     779        Pdrop = min([InletLiquid.P,InletVapour.P]) - OutletLiquid.P;
     780        #OutletLiquid.P  = InletLiquid.P - Pdrop;
    770781
    771782"Geometry Constraint"
Note: See TracChangeset for help on using the changeset viewer.