Ignore:
Timestamp:
Feb 16, 2009, 5:23:57 PM (14 years ago)
Author:
gerson bicca
Message:

updated flash model/icon

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

Legend:

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

    r711 r714  
    2727        Info            =
    2828"== Assumptions ==
    29 * both phases are perfectly mixed.
     29* Both phases are perfectly mixed.
    3030       
    3131== Specify ==
    32 * the feed stream;
    33 * the outlet flows: OutletV.F and OutletL.F.
     32* The feed stream;
     33* The outlet flows: OutletVapour.F and OutletLiquid.F.
    3434
    3535== Initial Conditions ==
     
    8383INITIAL
    8484
    85 # initial level Percent
     85# Initial level Percent
    8686        LI = Levelpercent_Initial;
    8787       
    88 # initial Outlet Liquid Temperature
     88# Initial Outlet Liquid Temperature
    8989        OutletLiquid.T = Temperature_Initial;
    9090       
    91 # initial Outlet Liquid Composition Normalized
     91# Initial Outlet Liquid Composition Normalized
    9292        OutletLiquid.z(1:NComp - 1) = Composition_Initial(1:NComp - 1)/sum(Composition_Initial);
    9393
     
    140140        VesselVolume = LiquidHoldup * vL + VapourHoldup * vV;
    141141
    142 "Temperature indicator Celsius Degree"
     142"Temperature indicator in Celsius Degree"
    143143        TI * 'K' = OutletLiquid.T - 273.15*'K';
    144144
     
    169169
    170170#*----------------------------------------------------------------------
    171 * Model of a  Steady State flash
     171* Model of a steady-state flash.
    172172*---------------------------------------------------------------------*#
    173173Model flash_steady
    174         ATTRIBUTES
    175         Pallete         = true;
    176         Icon            = "icon/Flash";
    177         Brief           = "Model of a Steady State flash.";
    178         Info            =
    179 "== Assumptions ==
    180 * both phases are perfectly mixed.
    181        
    182 == Specify ==
    183 * the feed stream;
    184 * the outlet pressure (OutletV.P);
    185 * the outlet temperature OR the heat supplied.
    186 ";
    187        
    188         PARAMETERS
    189 outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    190        
    191         VARIABLES
    192 in      Inlet as stream(Brief="Feed Stream", PosX=0, PosY=0.5421, Symbol="_{in}");
    193 out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    194 out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    195 in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    196         vfrac as fraction (Brief="Vapourization fraction", Symbol="\phi");
    197         Pratio as positive      (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
    198         Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
    199 
    200         EQUATIONS
    201         "The flash calculation"
    202         [vfrac, OutletL.z, OutletV.z] = PP.Flash(OutletV.T, OutletV.P, Inlet.z);
    203        
    204         "Global Molar Balance"
    205         Inlet.F = OutletV.F + OutletL.F;
    206        
    207         "Vaporization Fraction"
    208         OutletV.F = Inlet.F * vfrac;
    209        
    210         "Energy Balance"
    211         Inlet.F*Inlet.h  + InletQ = OutletL.F*OutletL.h + OutletV.F*OutletV.h;
    212        
    213         "Thermal Equilibrium"
    214         OutletV.T = OutletL.T;
    215        
    216         "Mechanical Equilibrium"
    217         OutletV.P = OutletL.P;
    218 
    219         "Pressure Drop"
    220         OutletL.P  = Inlet.P - Pdrop;
    221 
    222         "Pressure Ratio"
    223         OutletL.P = Inlet.P * Pratio;
    224 end
    225 
    226 #*----------------------------------------------------------------------
    227 * Model of a steady-state PH flash.
    228 *---------------------------------------------------------------------*#
    229 Model FlashPHSteady
    230         ATTRIBUTES
     174
     175ATTRIBUTES
    231176        Pallete         = true;
    232177        Icon            = "icon/Flash";
     
    239184
    240185== Specify ==
    241 * the feed stream;
    242 * the heat duty;
    243 * the outlet pressure.
     186* The feed stream;
     187* The heat duty;
     188* The outlet pressure.
    244189";     
    245190
    246         PARAMETERS
    247 outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    248 outer NComp as Integer;
    249 
    250         VARIABLES
    251 in      Inlet as stream(Brief="Feed Stream", PosX=0, PosY=0.5421, Symbol="_{in}");
    252 out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
    253 out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
    254 in      InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
    255         vfrac as fraction(Brief="Vaporization fraction", Symbol="\phi");
    256         h as enth_mol(Brief="Mixture enthalpy");
    257         Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}");     
    258         Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
    259 
    260         EQUATIONS
    261 
    262         "Chemical equilibrium"
    263         [vfrac,OutletL.z,OutletV.z]=PP.FlashPH(OutletL.P,h,Inlet.z);
    264 
    265         "Global Molar Balance"
    266         Inlet.F = OutletV.F + OutletL.F;
    267         OutletV.F = Inlet.F * vfrac;
    268 
    269         "Energy Balance"
     191PARAMETERS
     192
     193outer PP                        as Plugin(Brief = "External Physical Properties", Type="PP");
     194outer NComp     as Integer;
     195
     196VARIABLES
     197
     198in      Inlet                                           as stream                               (Brief="Feed Stream", PosX=0, PosY=0.5421, Symbol="_{in}");
     199out     OutletLiquid            as liquid_stream                (Brief="Liquid outlet stream", PosX=0.4790, PosY=1, Symbol="_{outL}");
     200out     OutletVapour            as vapour_stream        (Brief="Vapour outlet stream", PosX=0.4877, PosY=0, Symbol="_{outV}");
     201in      InletQ                                          as power                                (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}");
     202
     203        vfrac           as fraction                     (Brief="Vaporization fraction", Symbol="\phi");
     204        h                               as enth_mol             (Brief="Mixture enthalpy");
     205        Pratio          as positive                     (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
     206        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
     207
     208EQUATIONS
     209
     210if vfrac > 0 and vfrac <1
     211
     212then
     213"The flash calculation"
     214        [vfrac, OutletLiquid.z, OutletVapour.z] = PP.Flash(OutletVapour.T, OutletVapour.P, Inlet.z);
     215
     216else
     217"Chemical equilibrium"
     218        [vfrac,OutletLiquid.z,OutletVapour.z]=PP.FlashPH(OutletLiquid.P,h,Inlet.z);
     219
     220end
     221
     222"Global Molar Balance"
     223        Inlet.F = OutletVapour.F + OutletLiquid.F;
     224
     225"Vapour Fraction"
     226        OutletVapour.F = Inlet.F * vfrac;
     227
     228"Energy Balance"
    270229        Inlet.F*(h - Inlet.h) = InletQ;
    271         Inlet.F*h = Inlet.F*(1-vfrac)*OutletL.h + Inlet.F*vfrac*OutletV.h;
    272 
    273         "Thermal Equilibrium"
    274         OutletV.T = OutletL.T;
    275        
    276         "Mechanical Equilibrium"
    277         OutletV.P = OutletL.P;
    278 
    279         "Pressure Drop"
    280         OutletL.P  = Inlet.P - Pdrop;
    281 
    282         "Pressure Ratio"
    283         OutletL.P = Inlet.P * Pratio;
     230        Inlet.F*h = Inlet.F*(1-vfrac)*OutletLiquid.h + Inlet.F*vfrac*OutletVapour.h;
     231
     232"Thermal Equilibrium"
     233        OutletVapour.T = OutletLiquid.T;
     234       
     235"Mechanical Equilibrium"
     236        OutletVapour.P = OutletLiquid.P;
     237
     238"Pressure Drop"
     239        OutletLiquid.P  = Inlet.P - Pdrop;
     240
     241"Pressure Ratio"
     242        OutletLiquid.P = Inlet.P * Pratio;
     243
    284244end
    285245
     
    288248* It is recommended to use [v,x,y]=PP.FlashPH(P,h,z) instead of.
    289249*---------------------------------------------------------------------*#
    290 Model FlashPHSteadyA
     250Model FlashPHSteady
    291251        ATTRIBUTES
    292252        Pallete         = true;
Note: See TracChangeset for help on using the changeset viewer.