Ignore:
Timestamp:
Nov 29, 2007, 10:05:51 AM (16 years ago)
Author:
Rodolfo Rodrigues
Message:

Added symbols

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/reactors/tank_basic.mso

    r403 r421  
    1717*----------------------------------------------------------------------
    1818*
     19*   Description:
     20*       Generic model for a dynamic tank.
    1921*
     22*   Assumptions:
     23*               * single- and two-phases involved
     24*       * dynamic
    2025*
    2126*----------------------------------------------------------------------
     
    2833
    2934Model tank_basic
     35        ATTRIBUTES
     36        Brief   = "Basic model for a dynamic tank";
     37       
    3038        PARAMETERS
    31 outer PP                as Plugin (Brief="External physical properties", Type="PP");
    32 outer   NComp   as Integer (Brief="Number of components", Default=1);
     39outer PP        as Plugin       (Brief="External physical properties", Type="PP");
     40outer NComp as Integer  (Brief="Number of components", Default=1);
    3341       
    3442        VARIABLES
    35 in      Inlet   as stream;              # Inlet stream
    36 out     Outletm as stream;              # Intermediary outlet stream
     43in      Inlet   as stream       (Brief="Inlet stream", PosX=0, PosY=0, Symbol="_{in}");
     44out     Outletm as stream       (Brief="Intermediary outlet stream", Symbol="_{outm}");
    3745
    3846        M(NComp)as mol          (Brief="Component molar holdup");
    3947        Mt              as mol          (Brief="Total component molar holdup");
    40         V               as volume       (Brief="Volume of reactional mixture");
     48        Vr              as volume       (Brief="Volume of reactional mixture");
    4149        E               as energy       (Brief="Internal energy");
    4250        Q               as heat_rate(Brief="Reactor duty", Default=0);
     
    5361       
    5462        "Mole fraction normalisation"
    55         sum(Outletm.z) = 1.0;
     63        sum(Outletm.z) = 1;
    5664       
    5765        "Energy balance"
     
    5967       
    6068        "Geometry"
    61         V = Across*Level;
    62 end
    63 
    64 
    65 #*---------------------------------------------------------------------
    66 *       only liquid phase
    67 *--------------------------------------------------------------------*#
    68 
    69 Model tank_liq as tank_basic
    70         EQUATIONS
    71         "Vapourisation fraction"
    72         Outletm.v = 0.0;
    73 
    74         "Liquid Enthalpy"
    75         Outletm.h = PP.LiquidEnthalpy(Outletm.T,Outletm.P,Outletm.z);
    76        
    77         "Volume constraint"
    78         V = Mt*PP.LiquidVolume(Outletm.T,Outletm.P,Outletm.z);
    79        
    80         "Total internal energy"
    81         E = Mt*Outletm.h - Outletm.P*V;
     69        Vr = Across*Level;
    8270end
    8371
     
    8674*       only vapour phase
    8775*--------------------------------------------------------------------*#
    88 
    8976Model tank_vap as tank_basic
     77        ATTRIBUTES
     78        Brief   = "Model of a generic vapour-phase tank";
     79       
    9080        EQUATIONS
    9181        "Vapourisation fraction"
    92         Outletm.v = 1.0;
     82        Outletm.v = 1;
    9383
    9484        "Vapour Enthalpy"
     
    9686
    9787        "Volume constraint"
    98         V = Mt*PP.VapourVolume(Outletm.T,Outletm.P,Outletm.z);
     88        Vr = Mt*PP.VapourVolume(Outletm.T,Outletm.P,Outletm.z);
    9989
    10090        "Total internal energy"
     
    10494
    10595#*---------------------------------------------------------------------
     96*       only liquid phase
     97*--------------------------------------------------------------------*#
     98Model tank_liq as tank_basic
     99        ATTRIBUTES
     100        Brief   = "Model of a generic liquid-phase tank";
     101       
     102        EQUATIONS
     103        "Vapourisation fraction"
     104        Outletm.v = 0;
     105
     106        "Liquid Enthalpy"
     107        Outletm.h = PP.LiquidEnthalpy(Outletm.T,Outletm.P,Outletm.z);
     108       
     109        "Volume constraint"
     110        Vr = Mt*PP.LiquidVolume(Outletm.T,Outletm.P,Outletm.z);
     111       
     112        "Total internal energy"
     113        E = Mt*Outletm.h - Outletm.P*Vr;
     114end
     115
     116
     117#*---------------------------------------------------------------------
    106118*       liquid and vapour phases
    107119*--------------------------------------------------------------------*#
    108 
    109120Model tank_liqvap
     121        ATTRIBUTES
     122        Brief   = "Model of a generic two-phase tank";
     123       
    110124        PARAMETERS
    111125outer PP                as Plugin(Brief="External physical properties", Type="PP");
     
    113127
    114128        VARIABLES
    115 in      Inlet    as stream;                     # Inlet stream
    116 out     OutletmL as liquid_stream;      # Intermediary liquid outlet stream
    117 out     OutletV  as vapour_stream;      # Outlet vapour stream
     129in      Inlet    as stream                      (Brief="Inlet stream", PosX=0, PosY=0, Symbol="_{in}");
     130out     OutletmL as liquid_stream       (Brief="Intermediary liquid outlet stream", Symbol="_{outmL}");
     131out     OutletV  as vapour_stream       (Brief="Outlet vapour stream", Symbol="_{outV}");
    118132
    119133        M(NComp)as mol                  (Brief="Component molar holdup");
    120134        ML              as mol                  (Brief="Molar liquid holdup");
    121135        MV              as mol                  (Brief="Molar vapour holdup");
    122         V               as volume               (Brief="Volume of reactional mixture");
     136        Vr              as volume               (Brief="Volume of reactional mixture");
    123137        E               as energy               (Brief="Internal energy");
    124138        Q               as heat_rate    (Brief="Reactor duty", Default=0);
     
    137151       
    138152        "Mole fraction normalisation"
    139         sum(OutletmL.z) = 1.0;
     153        sum(OutletmL.z) = 1;
    140154       
    141155        "Mole fraction normalisation"
     
    144158       
    145159        "Vapourisation fraction"
    146         OutletV.v = 1.0;
     160        OutletV.v = 1;
    147161       
    148162        "Vapourisation fraction"
    149         OutletmL.v = 0.0;
     163        OutletmL.v = 0;
    150164       
    151165       
     
    157171       
    158172        "Geometry constraint"
    159         V = ML*vL + MV*PP.VapourVolume(OutletV.T,OutletV.P,OutletV.z);
     173        Vr = ML*vL + MV*PP.VapourVolume(OutletV.T,OutletV.P,OutletV.z);
    160174       
    161175       
Note: See TracChangeset for help on using the changeset viewer.