Ignore:
Timestamp:
Jul 18, 2008, 4:01:13 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Updating the models to be usable by the gui

Location:
branches/gui/eml/stage_separators
Files:
4 edited

Legend:

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

    r353 r555  
    5151out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
    5252out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
    53 in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
     53in      InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
    5454
    5555        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    6868        "Energy Balance"
    6969        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
    70                                 - OutletV.F*OutletV.h + InletQ.Q;
     70                                - OutletV.F*OutletV.h + InletQ;
    7171
    7272        "Molar Holdup"
     
    129129in      InletV as stream(Brief="Vapour inlet stream", PosX=0.3431, PosY=0, Symbol="_{inV}");
    130130out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.34375, PosY=1, Symbol="_{outL}");
    131 in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.5974, Symbol="_{in}");
     131in      InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.5974, Symbol="_{in}");
    132132        DP as press_delta (Brief="Pressure Drop in the condenser");
    133133
     
    138138               
    139139        "Energy Balance"
    140         InletV.F*InletV.h = OutletL.F*OutletL.h + InletQ.Q;
     140        InletV.F*InletV.h = OutletL.F*OutletL.h + InletQ;
    141141       
    142142        "Pressure"
     
    184184out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
    185185out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
    186 in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
     186in      InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
    187187
    188188        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    210210        "Energy Balance"
    211211        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
    212                                 - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * ML*vL;
     212                                - OutletV.F*OutletV.h + InletQ + Hr * r3 * ML*vL;
    213213
    214214        "Molar Holdup"
  • branches/gui/eml/stage_separators/flash.mso

    r372 r555  
    4242outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
    4343        V as volume (Brief="Total Volume of the flash");
    44         Mw(NComp) as molweight;
     44        Mw(NComp) as molweight(Protected=true);
    4545        orientation as Switcher (Valid=["vertical","horizontal"],Default="vertical");
    4646        diameter as length (Brief="Vessel diameter");
     
    5353out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    5454out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    55 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    56 
    57         M(NComp) as mol (Brief="Molar Holdup in the tray");
    58         ML as mol (Brief="Molar liquid holdup");
    59         MV as mol (Brief="Molar vapour holdup");
    60         E as energy (Brief="Total Energy Holdup on tray");
    61         vL as volume_mol (Brief="Liquid Molar Volume");
    62         vV as volume_mol (Brief="Vapour Molar volume");
     55in      InletQ as power(Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
     56
     57        M(NComp) as mol (Brief="Molar Holdup in the tray", Protected=true);
     58        ML as mol (Brief="Molar liquid holdup", Protected=true);
     59        MV as mol (Brief="Molar vapour holdup", Protected=true);
     60        E as energy (Brief="Total Energy Holdup on tray", Protected=true);
     61        vL as volume_mol (Brief="Liquid Molar Volume", Protected=true);
     62        vV as volume_mol (Brief="Vapour Molar volume", Protected=true);
    6363        Level as length (Brief="liquid height");
    64         Across as area (Brief="Flash Cross section area");
     64        Across as area (Brief="Flash Cross section area", Protected=true);
    6565        vfrac as positive (Brief="Vapourization fraction", Symbol="\phi");
    6666        Pratio as positive      (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
    6767        Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
    6868
     69out     TI as control_signal(Brief="Temperature Indicator", PosX=1, PosY=0.2);
     70out     PI as control_signal(Brief="Pressure Indicator", PosX=1, PosY=0.3);
     71out     LI as control_signal(Brief="Level Indicator", PosX=1, PosY=0.4);
     72
    6973        EQUATIONS
    7074        "Component Molar Balance"
     
    7276       
    7377        "Energy Balance"
    74         diff(E) = Inlet.F*Inlet.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q;
     78        diff(E) = Inlet.F*Inlet.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ;
    7579       
    7680        "Molar Holdup"
     
    113117        "Geometry Constraint"
    114118        V = ML * vL + MV * vV;
     119
     120        "Temperature indicator"
     121        TI * 'K' = OutletL.T - 273.15;
     122        "Pressure indicator"
     123        PI * 'atm' = OutletL.P;
     124        "Level indicator"
     125        LI*V = Level*Across;
    115126
    116127        switch orientation
     
    121132        "Liquid Level"
    122133                ML * vL = Across * Level;
    123 
     134               
    124135        case "horizontal":
    125136        "Cylindrical Side Area"
     
    157168out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    158169out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    159 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
     170in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    160171        vfrac as fraction (Brief="Vapourization fraction", Symbol="\phi");
    161172        Pratio as positive      (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
     
    173184       
    174185        "Energy Balance"
    175         Inlet.F*Inlet.h  + InletQ.Q = OutletL.F*OutletL.h + OutletV.F*OutletV.h;
     186        Inlet.F*Inlet.h  + InletQ = OutletL.F*OutletL.h + OutletV.F*OutletV.h;
    176187       
    177188        "Thermal Equilibrium"
     
    216227out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    217228out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    218 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
     229in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    219230        vfrac as fraction(Brief="Vaporization fraction", Symbol="\phi");
    220231        h as enth_mol(Brief="Mixture enthalpy");
     
    232243
    233244        "Energy Balance"
    234         Inlet.F*(h - Inlet.h) = InletQ.Q;
     245        Inlet.F*(h - Inlet.h) = InletQ;
    235246        Inlet.F*h = Inlet.F*(1-vfrac)*OutletL.h + Inlet.F*vfrac*OutletV.h;
    236247
     
    282293out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    283294out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    284 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
     295in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    285296        vfrac as fraction(Brief="Vaporization fraction", Symbol="\phi");
    286297        vsat as Real(Lower=-0.1, Upper=1.1, Brief="Vaporization fraction if saturated", Symbol="\phi_{sat}");
     
    308319
    309320        "Energy Balance if saturated"
    310         Inlet.F*Inlet.h  + InletQ.Q =
     321        Inlet.F*Inlet.h  + InletQ =
    311322                Inlet.F*(1-vsat)*PP.LiquidEnthalpy(Tsat, OutletL.P, xsat) +
    312323                Inlet.F*vsat*PP.VapourEnthalpy(Tsat, OutletV.P, ysat);
    313324
    314325        "Real Energy Balance"
    315         Inlet.F*Inlet.h  + InletQ.Q =
     326        Inlet.F*Inlet.h  + InletQ =
    316327                Inlet.F*(1-vfrac)*OutletL.h + Inlet.F*vfrac*OutletV.h;
    317328
  • branches/gui/eml/stage_separators/reboiler.mso

    r353 r555  
    5757out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");
    5858out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");
    59 in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
     59in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
    6060
    6161        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    7575        "Energy Balance"
    7676        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
    77                 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q;
     77                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ;
    7878       
    7979        "Molar Holdup"
     
    140140in      InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");
    141141out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");
    142 in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
     142in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
    143143        vV as volume_mol (Brief="Vapour Molar volume");
    144144        rhoV as dens_mass (Brief="Vapour Density");
     
    156156
    157157        "Energy Balance"
    158         InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
     158        InletL.F*InletL.h + InletQ = OutletV.F*OutletV.h;
    159159       
    160160        "Pressure"
     
    187187in      InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");
    188188out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");
    189 in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
     189in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
    190190
    191191        EQUATIONS
     
    195195       
    196196        "Energy Balance"
    197         InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
     197        InletL.F*InletL.h + InletQ = OutletV.F*OutletV.h;
    198198       
    199199        "Pressure"
     
    207207       
    208208        "Pressure Drop through the reboiler"
    209         OutletV.F = k*InletQ.Q;
     209        OutletV.F = k*InletQ;
    210210end
    211211
     
    253253out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");
    254254out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");
    255 in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
     255in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
    256256
    257257        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    281281        "Energy Balance"
    282282        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
    283                 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * vL*ML;
     283                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML;
    284284       
    285285        "Molar Holdup"
  • branches/gui/eml/stage_separators/tank.mso

    r353 r555  
    6161in      Inlet  as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}");
    6262out     Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}");
    63 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}");
     63in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}");
    6464        Level    as length(Brief="Tank level");
    6565        M(NComp) as mol (Brief="Molar Holdup in the tank");
     
    7272       
    7373        "Energy balance"
    74         diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
     74        diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ;
    7575
    7676        "Energy Holdup"
     
    121121in      Inlet  as stream (Brief = "Inlet stream", PosX=0.1825, PosY=0, Symbol="_{in}");
    122122out     Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}");
    123 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.6160, Symbol="_{in}");
     123in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.6160, Symbol="_{in}");
    124124        Level    as length(Brief="Tank level");
    125125        Across as area (Brief="Tank cross section area", Default=2);
     
    133133       
    134134        "Energy balance"
    135         diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
     135        diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ;
    136136
    137137        "Energy Holdup"
     
    212212in      Inlet  as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}");
    213213out     Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}");
    214 in      InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}");
     214in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}");
    215215
    216216        Level    as length(Brief="Tank level");
     
    224224       
    225225        "Energy balance"
    226         diff(E) = Feed.F*Feed.h + Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
     226        diff(E) = Feed.F*Feed.h + Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ;
    227227
    228228        "Energy Holdup"
Note: See TracChangeset for help on using the changeset viewer.