Ignore:
Timestamp:
Feb 25, 2009, 7:51:53 PM (13 years ago)
Author:
gerson bicca
Message:

updates (tank/reboiler/condenser/column)

File:
1 edited

Legend:

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

    r719 r721  
    162162Model condenserReact
    163163        ATTRIBUTES
    164         Pallete         = true;
     164        Pallete         = false;
    165165        Icon            = "icon/Condenser";
    166166        Brief           = "Model of a Condenser with reaction in liquid phase.";
     
    183183";
    184184       
    185         PARAMETERS
    186         outer PP as Plugin(Type="PP");
     185PARAMETERS
     186        outer PP        as Plugin(Type="PP");
    187187        outer NComp as Integer;
    188         V as volume (Brief="Condenser total volume");
    189         Across as area (Brief="Cross Section Area of reboiler");
    190 
    191         stoic(NComp) as Real(Brief="Stoichiometric matrix");
    192         Hr as energy_mol;
    193 
    194         VARIABLES
    195 in      InletV as stream(Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}");
    196 out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
    197 out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
    198         InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
    199 
    200         M(NComp) as mol (Brief="Molar Holdup in the tray");
    201         ML as mol (Brief="Molar liquid holdup");
    202         MV as mol (Brief="Molar vapour holdup");
    203         E as energy (Brief="Total Energy Holdup on tray");
    204         vL as volume_mol (Brief="Liquid Molar Volume");
    205         vV as volume_mol (Brief="Vapour Molar volume");
    206         Level as length (Brief="Level of liquid phase");
    207         Vol as volume;
    208         r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
    209         C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
    210 
    211         EQUATIONS
    212         "Molar Concentration"
     188       
     189        V               as volume (Brief="Condenser total volume");
     190        Across  as area         (Brief="Cross Section Area of reboiler");
     191
     192        stoic(NComp)    as Real                 (Brief="Stoichiometric matrix");
     193        Hr                              as energy_mol;
     194        Initial_Level                           as length                       (Brief="Initial Level of liquid phase");
     195        Initial_Temperature                     as temperature          (Brief="Initial Temperature of Condenser");
     196        Initial_Composition(NComp)      as fraction             (Brief="Initial Liquid Composition");
     197       
     198VARIABLES
     199
     200in      InletV          as stream                       (Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}");
     201out     OutletL         as liquid_stream        (Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
     202out     OutletV         as vapour_stream        (Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
     203        InletQ          as power                        (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
     204
     205        M(NComp)        as mol                  (Brief="Molar Holdup in the tray");
     206        ML                      as mol                  (Brief="Molar liquid holdup");
     207        MV                      as mol                  (Brief="Molar vapour holdup");
     208        E                       as energy               (Brief="Total Energy Holdup on tray");
     209        vL                      as volume_mol   (Brief="Liquid Molar Volume");
     210        vV                      as volume_mol   (Brief="Vapour Molar volume");
     211        Level           as length               (Brief="Level of liquid phase");
     212        Vol             as volume;
     213        r3                      as reaction_mol (Brief="Reaction Rates", DisplayUnit = 'mol/l/s');
     214        C(NComp)        as conc_mol     (Brief="Molar concentration", Lower = -1);
     215
     216INITIAL
     217
     218        Level                                   = Initial_Level;
     219        OutletL.T                               = Initial_Temperature;
     220        OutletL.z(1:NComp-1)    = Initial_Composition(1:NComp-1)/sum(Initial_Composition);
     221
     222EQUATIONS
     223"Molar Concentration"
    213224        OutletL.z = vL * C;
    214225       
    215         "Reaction"
     226"Reaction"
    216227        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';
    217228       
    218         "Component Molar Balance"
    219         diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
    220                                 - OutletV.F*OutletV.z + stoic*r3*ML*vL;
    221 
    222         "Energy Balance"
    223         diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
    224                                 - OutletV.F*OutletV.h + InletQ + Hr * r3 * ML*vL;
    225 
    226         "Molar Holdup"
     229"Component Molar Balance"
     230        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
     231
     232"Energy Balance"
     233        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h- OutletV.F*OutletV.h + InletQ + Hr * r3 * ML*vL;
     234
     235"Molar Holdup"
    227236        M = ML*OutletL.z + MV*OutletV.z;
    228237       
    229         "Energy Holdup"
     238"Energy Holdup"
    230239        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
    231240       
    232         "Mol fraction normalisation"
     241"Mol fraction normalisation"
    233242        sum(OutletL.z)=1.0;
    234243
    235         "Liquid Volume"
     244"Liquid Volume"
    236245        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
    237         "Vapour Volume"
     246
     247"Vapour Volume"
    238248        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
    239249
    240         "Thermal Equilibrium"
     250"Thermal Equilibrium"
    241251        OutletL.T = OutletV.T;
    242252
    243         "Mechanical Equilibrium"
     253"Mechanical Equilibrium"
    244254        OutletV.P = OutletL.P;
    245255
    246         "Geometry Constraint"
     256"Geometry Constraint"
    247257        V = ML*vL + MV*vV;
    248258
    249259        Vol = ML*vL;
    250260       
    251         "Level of liquid phase"
     261"Level of liquid phase"
    252262        Level = ML*vL/Across;
    253263       
    254         "Chemical Equilibrium"
     264"Chemical Equilibrium"
    255265        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
    256266        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
Note: See TracChangeset for help on using the changeset viewer.