Ignore:
Timestamp:
Jul 15, 2009, 5:28:09 PM (13 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r793 r794  
    2020using "streams";
    2121
    22 Model reboiler2
    23         ATTRIBUTES
    24         Pallete         = true;
    25         Icon            = "icon/Reboiler";
    26         Brief           = "Model of a dynamic reboiler - kettle.";
    27         Info            =
    28 "== Assumptions ==
    29 
    30 * perfect mixing of both phases;
    31 * thermodynamics equilibrium;
    32 * no liquid entrainment in the vapour stream.
    33        
    34 == Specify ==
    35 
    36 * the inlet stream;
    37 * the liquid inlet stream;
    38 * the outlet flows: OutletVapour.F and OutletLiquid.F;
    39 * the heat supply.
    40        
    41 == Initial Conditions ==
    42 
    43 * the reboiler temperature (OutletLiquid.T);
    44 * the reboiler liquid level (Level);
    45 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    46 ";     
    47        
    48 PARAMETERS
    49         outer PP                        as Plugin               (Brief = "External Physical Properties", Type="PP");
    50         outer NComp     as Integer;
    51         Across                          as area                         (Brief="Cross Section Area of reboiler");
    52         V                                               as volume       (Brief="Total volume of reboiler");
    53        
    54         Initial_Level                   as length                       (Brief="Initial Level of liquid phase");
    55         Initial_Temperature             as temperature                  (Brief="Initial Temperature of Reboiler");
    56         Initial_Composition(NComp)      as fraction                             (Brief="Initial Liquid Composition");
    57 
    58 VARIABLES
    59 
    60 in      InletLiquid                     as stream                               (Brief="Liquid inlet stream", PosX=0.15, PosY=1, Symbol="_{inL}");
    61 out     OutletLiquid    as liquid_stream                (Brief="Liquid outlet stream", PosX=0.40, PosY=1, Symbol="_{outL}");
    62 out     OutletVapour    as vapour_stream        (Brief="Vapour outlet stream", PosX=0.40, PosY=0, Symbol="_{outV}");
    63 in      InletQ                  as power                                (Brief="Heat supplied", PosX=1, PosY=0, Symbol="_{in}");
    64 
    65         M(NComp)        as mol                          (Brief="Molar Holdup in the tray");
    66         ML                              as mol                          (Brief="Molar liquid holdup");
    67         MV                              as mol                          (Brief="Molar vapour holdup");
    68         E                                       as energy                       (Brief="Total Energy Holdup on tray");
    69         vL                              as volume_mol   (Brief="Liquid Molar Volume");
    70         vV                              as volume_mol   (Brief="Vapour Molar volume");
    71         Level                   as length                       (Brief="Level of liquid phase");
    72         rhoV                    as dens_mass    (Brief="Vapour Density");
    73 
    74 INITIAL
    75 
    76         Level                                   = Initial_Level;
    77         OutletLiquid.T                          = Initial_Temperature;
    78         OutletLiquid.z(1:NComp-1)       = Initial_Composition(1:NComp-1)/sum(Initial_Composition);
    79 
    80 EQUATIONS
    81 "Component Molar Balance"
    82         diff(M)= InletLiquid.F*InletLiquid.z    - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z;
    83        
    84 "Energy Balance"
    85         diff(E) = InletLiquid.F*InletLiquid.h   - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ;
    86        
    87 "Molar Holdup"
    88         M = ML*OutletLiquid.z + MV*OutletVapour.z;
    89        
    90 "Energy Holdup"
    91         E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V;
    92        
    93 "Mol fraction normalisation"
    94         sum(OutletLiquid.z)=1.0;
    95         sum(OutletLiquid.z)=sum(OutletVapour.z);
    96 
    97 "Vapour Density"
    98         rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z);
    99 
    100 "Liquid Volume"
    101         vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
    102        
    103 "Vapour Volume"
    104         vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z);
    105        
    106 "Chemical Equilibrium"
    107         PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z;
    108 
    109 "Mechanical Equilibrium"
    110         OutletLiquid.P = OutletVapour.P;
    111        
    112 "Thermal Equilibrium"
    113         OutletLiquid.T = OutletVapour.T;
    114        
    115 "Geometry Constraint"
    116         V = ML*vL + MV*vV;
    117        
    118 "Level of liquid phase"
    119         Level = ML*vL/Across;
    120 
    121 end
    122 
    123 #*----------------------------------------------------------------------
    124 * Model of a  Steady State reboiler with no thermodynamics equilibrium
    125 *---------------------------------------------------------------------*#
    12622Model reboilerSteady
    127         ATTRIBUTES
     23
     24ATTRIBUTES
    12825        Pallete         = true;
    12926        Icon            = "icon/ReboilerSteady";
    13027        Brief           = "Model of a  Steady State reboiler with no thermodynamics equilibrium - thermosyphon.";
    13128        Info            =
    132 "== Assumptions ==
     29"== ASSUMPTIONS ==
    13330* perfect mixing of both phases;
    13431* no thermodynamics equilibrium;
    13532* no liquid entrainment in the vapour stream.
    136        
    137 == Specify ==
     33
     34== SET ==
     35* the pressure drop in the reboiler;
     36
     37== SPECIFY ==
    13838* the InletLiquid stream;
    139 * the heat supply OR the outlet temperature (OutletVapour.T);
     39* the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model)
     40OR the outlet temperature (OutletVapour.T);
     41
     42== OPTIONAL ==
     43* the reboiler model has two control ports
     44** TI OutletVapour Temperature Indicator;
     45** PI OutletVapour Pressure Indicator;
    14046";     
    14147
    14248PARAMETERS
    143         outer PP                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
    144         outer NComp     as Integer;
    145         Pdrop                                   as press_delta  (Brief="Pressure Drop in the reboiler");
     49        outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
     50        outer NComp     as Integer              (Brief="Number of Components");
     51        Pdrop                   as press_delta  (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P");
    14652
    14753VARIABLES
    148 in      InletLiquid                     as stream                                       (Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");
    149 out     OutletVapour    as vapour_stream                (Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");
    150 in      InletQ                  as power                                                        (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
    151         vV                              as volume_mol                           (Brief="Vapour Molar volume");
    152         rhoV                    as dens_mass                                    (Brief="Vapour Density");
     54        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}");
     56        in      InletQ                  as power                                (Brief="Heat supplied", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true);
     57        vV                              as volume_mol                   (Brief="Vapour Molar volume", Protected = true);
     58        rhoV                    as dens_mass                    (Brief="Vapour Density", Symbol = "\rho", Protected = true);
     59       
     60        out     TI as control_signal    (Brief="Temperature  Indicator of Reboiler", Protected = true, PosX=0.44, PosY=0);
     61        out     PI as control_signal    (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.35, PosY=0);
    15362
    15463EQUATIONS
     
    17281        OutletVapour.P = InletLiquid.P - Pdrop;
    17382
     83"Temperature indicator"
     84        TI * 'K' = OutletVapour.T;
     85
     86"Pressure indicator"
     87        PI * 'atm' = OutletVapour.P;
     88
    17489end
    17590
    176 #*----------------------------------------------------------------------
    177 * Model of a  Steady State reboiler with fake calculation of
    178 * vaporisation fraction and output temperature, but with a real
    179 * calculation of the output stream enthalpy
    180 *---------------------------------------------------------------------*#
    18191Model reboilerSteady_fakeH
    18292        ATTRIBUTES
     
    190100";
    191101       
    192         PARAMETERS
    193         outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     102PARAMETERS
     103        outer PP        as Plugin(Brief = "External Physical Properties", Type="PP");
    194104        outer NComp as Integer;
    195         DP as press_delta (Brief="Pressure Drop in the reboiler");
    196         k as Real (Brief = "Flow Constant", Unit='mol/J');
    197        
    198         VARIABLES
    199 in      InletLiquid as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");
    200 out     OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");
    201 in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
    202 
    203         EQUATIONS
    204         "Molar Balance"
     105        Pdrop           as press_delta  (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P");
     106        FlowConstant                    as Real (Brief = "Flow Constant");
     107        k                       as Real (Brief = "Flow Constant", Hidden = true, Unit='mol/J');
     108
     109SET
     110
     111        k = 1*'mol/J';
     112       
     113VARIABLES
     114        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}");
     116        in      InletQ                  as power                                (Brief="Heat Duty", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true);
     117
     118EQUATIONS
     119
     120"Molar Balance"
    205121        InletLiquid.F = OutletVapour.F;
     122       
     123"Composition Balance"
    206124        InletLiquid.z = OutletVapour.z;
    207125       
    208         "Energy Balance"
     126"Energy Balance"
    209127        InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h;
    210128       
    211         "Pressure"
    212         DP = InletLiquid.P - OutletVapour.P;
    213 
    214         "Fake Vapourisation Fraction"
     129"Pressure Drop"
     130        OutletVapour.P = InletLiquid.P - Pdrop ;
     131
     132"Fake Vapourisation Fraction"
    215133        OutletVapour.v = 1.0;
    216134       
    217         "Fake output temperature"
     135"Fake output temperature"
    218136        OutletVapour.T = 300*'K';
    219137       
    220         "Pressure Drop through the reboiler"
    221         OutletVapour.F = k*InletQ;
     138"Pressure Drop through the reboiler"
     139        OutletVapour.F = FlowConstant*k*InletQ;
     140
    222141end
    223142
    224 #*-------------------------------------------------------------------
    225 * Model of a dynamic reboiler with reaction
    226 *-------------------------------------------------------------------*#
    227143Model reboilerReact
    228144        ATTRIBUTES
Note: See TracChangeset for help on using the changeset viewer.