Changeset 310


Ignore:
Timestamp:
Jul 13, 2007, 6:28:33 PM (15 years ago)
Author:
Argimiro Resende Secchi
Message:

Creating energy_stream and set its use.

Location:
trunk
Files:
7 added
4 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/stage_separators/condenser.mso

    r300 r310  
    5151out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    5252out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    53 in      Q as heat_rate (Brief="Heat supplied");
     53in      InletQ as energy_stream (Brief="Heat supplied");
    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 + Q;
     70                                - OutletV.F*OutletV.h + InletQ.Q;
    7171
    7272        "Molar Holdup"
     
    129129in      InletV as stream(Brief="Vapour inlet stream");
    130130out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    131 in      Q as heat_rate (Brief="Heat supplied");
     131in      InletQ as energy_stream (Brief="Heat supplied");
    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 + Q;
     140        InletV.F*InletV.h = OutletL.F*OutletL.h + InletQ.Q;
    141141       
    142142        "Pressure"
     
    184184out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    185185out     OutletV as vapour_stream(Brief="Vapour outlet stream");
     186in      InletQ as energy_stream (Brief="Heat supplied");
    186187
    187188        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    192193        vV as volume_mol (Brief="Vapour Molar volume");
    193194        Level as length (Brief="Level of liquid phase");
    194         Q as heat_rate (Brief="Heat supplied");
    195195        Vol as volume;
    196196        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
     
    210210        "Energy Balance"
    211211        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
    212                                 - OutletV.F*OutletV.h + Q + Hr * r3 * ML*vL;
     212                                - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * ML*vL;
    213213
    214214        "Molar Holdup"
  • trunk/eml/stage_separators/flash.mso

    r300 r310  
    5353        out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    5454        out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    55         in      Q as heat_rate (Brief="Rate of heat supply");
     55        in      InletQ as energy_stream (Brief="Rate of heat supply");
    5656
    5757        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    6969       
    7070        "Energy Balance"
    71         diff(E) = Inlet.F*Inlet.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q;
     71        diff(E) = Inlet.F*Inlet.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q;
    7272       
    7373        "Molar Holdup"
     
    143143        out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    144144        out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    145         in      Q as heat_rate (Brief="Rate of heat supply");
     145        in      InletQ as energy_stream (Brief="Rate of heat supply");
    146146        vfrac as fraction;
    147147
     
    156156       
    157157        "Energy Balance"
    158         Inlet.F*Inlet.h  + Q = OutletL.F*OutletL.h + OutletV.F*OutletV.h;
     158        Inlet.F*Inlet.h  + InletQ.Q = OutletL.F*OutletL.h + OutletV.F*OutletV.h;
    159159       
    160160        "Thermal Equilibrium"
  • trunk/eml/stage_separators/reboiler.mso

    r300 r310  
    6060out     OutletL as liquid_stream(Brief="Liquid outlet stream");
    6161out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    62 in      Q as heat_rate (Brief="Heat supplied");
     62in      InletQ as energy_stream (Brief="Heat supplied");
    6363
    6464        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    7878        "Energy Balance"
    7979        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
    80                 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q;
     80                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q;
    8181       
    8282        "Molar Holdup"
     
    143143in      InletL as stream(Brief="Liquid inlet stream");
    144144out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    145 in      Q as heat_rate (Brief="Heat supplied");
     145in      InletQ as energy_stream (Brief="Heat supplied");
    146146        vV as volume_mol (Brief="Vapour Molar volume");
    147147        rhoV as dens_mass (Brief="Vapour Density");
     
    159159
    160160        "Energy Balance"
    161         InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
     161        InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
    162162       
    163163        "Pressure"
     
    190190in      InletL as stream(Brief="Liquid inlet stream");
    191191out     OutletV as stream(Brief="Vapour outlet stream");
    192 in      Q as heat_rate (Brief="Heat supplied");
     192in      InletQ as energy_stream (Brief="Heat supplied");
    193193
    194194        EQUATIONS
     
    198198       
    199199        "Energy Balance"
    200         InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
     200        InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
    201201       
    202202        "Pressure"
     
    210210       
    211211        "Pressure Drop through the reboiler"
    212         OutletV.F = k*Q;
     212        OutletV.F = k*InletQ.Q;
    213213end
    214214
     
    257257out     OutletV as vapour_stream(Brief="Vapour outlet stream");
    258258
    259         Q as heat_rate (Brief="Heat supplied");
     259in      InletQ as energy_stream (Brief="Heat supplied");
    260260        M(NComp) as mol (Brief="Molar Holdup in the tray");
    261261        ML as mol (Brief="Molar liquid holdup");
     
    284284        "Energy Balance"
    285285        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
    286                 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q + Hr * r3 * vL*ML;
     286                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * vL*ML;
    287287       
    288288        "Molar Holdup"
  • trunk/eml/stage_separators/tank.mso

    r300 r310  
    6262out     Outlet as liquid_stream;
    6363
    64 in      Q as heat_rate (Brief="Rate of heat supply");
     64in      InletQ as energy_stream (Brief="Rate of heat supply");
    6565        Level    as length(Brief="Tank level");
    6666        M(NComp) as mol (Brief="Molar Holdup in the tank");
     
    7373       
    7474        "Energy balance"
    75         diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + Q;
     75        diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
    7676
    7777        "Energy Holdup"
     
    123123out     Outlet as liquid_stream;
    124124
    125 in      Q as heat_rate (Brief="Rate of heat supply");
     125in      InletQ as energy_stream (Brief="Rate of heat supply");
    126126        Level    as length(Brief="Tank level");
    127127        Across as area (Brief="Tank cross section area", Default=2);
     
    135135       
    136136        "Energy balance"
    137         diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + Q;
     137        diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
    138138
    139139        "Energy Holdup"
     
    187187out     Outlet as liquid_stream;
    188188
    189 in      Q as heat_rate (Brief="Rate of heat supply");
     189in      InletQ as energy_stream (Brief="Rate of heat supply");
    190190        Level    as length(Brief="Tank level");
    191191        M(NComp) as mol (Brief="Molar Holdup in the tank");
     
    198198       
    199199        "Energy balance"
    200         diff(E) = Feed.F*Feed.h + Inlet.F*Inlet.h - Outlet.F*Outlet.h + Q;
     200        diff(E) = Feed.F*Feed.h + Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ.Q;
    201201
    202202        "Energy Holdup"
  • trunk/eml/streams.mso

    r299 r310  
    114114Model source
    115115        ATTRIBUTES
    116         Icon = "Source";
     116        Icon = "icon/Source";
    117117        Brief = "Material stream source";
    118118        Info = "
     
    205205Model sink
    206206        ATTRIBUTES
    207         Icon = "Sink";
     207        Icon = "icon/Sink";
    208208        Brief = "Material stream sink";
    209209        Info = "
     
    278278end
    279279
     280Model energy_stream
     281        ATTRIBUTES
     282        Pallete = false;
     283        Brief = "General Energy Stream";
     284        Info =
     285        "This is the basic building block for the EML models.
     286        Every model should have input and output energy streams
     287        derived from this model.";
     288
     289        VARIABLES
     290        Q as heat_rate(Brief="Energy rate");
     291end
    280292
    281293Model energy_source
    282294        ATTRIBUTES
    283         Icon = "Source";
     295        Icon = "icon/energy_source";
    284296        Brief = "Enegry stream source";
    285297
    286298        VARIABLES
    287         out Outlet                      as heat_rate;
    288 end
     299        out Outlet                      as energy_stream;
     300end
  • trunk/sample/stage_separators/sample_column.mso

    r297 r310  
    201201       
    202202        VARIABLES
    203         Qc as heat_rate (Brief="Heat rate removed from condenser");
    204         Qr as heat_rate (Brief="Heat rate supplied to reboiler");
     203        Qc as energy_source (Brief="Heat rate removed from condenser");
     204        Qr as energy_source (Brief="Heat rate supplied to reboiler");
    205205       
    206206        SET
     
    217217        zero to col.trays([1:4]).Inlet;
    218218        zero to col.trays([6:col.NTrays]).Inlet;
    219         Qc to col.cond.Q;
    220         Qr to col.reb.Q;
     219        Qc.Outlet to col.cond.InletQ;
     220        Qr.Outlet to col.reb.InletQ;
    221221       
    222222        SPECIFY
     
    237237        col.sptop.frac = 0.444445;
    238238        col.cond.OutletV.F = 0 * 'kmol/h';
    239         Qr = 3.7743e6 * 'kJ/h';
    240         Qc = -3.71e6 * 'kJ/h';
     239        Qr.Outlet.Q = 3.7743e6 * 'kJ/h';
     240        Qc.Outlet.Q = -3.71e6 * 'kJ/h';
    241241        col.pump1.dP = 16 * 'kPa';
    242242        col.trays.Emv = 1;
     
    293293       
    294294        VARIABLES
    295         Qc as heat_rate (Brief="Heat rate removed from condenser");
    296         Qr as heat_rate (Brief="Heat rate supplied to reboiler");
    297         Qttop as heat_rate (Brief="Heat rate removed from condenser");
    298         Qtbottom as heat_rate (Brief="Heat rate supplied to reboiler");
     295        Qc as energy_source (Brief="Heat rate removed from condenser");
     296        Qr as energy_source (Brief="Heat rate supplied to reboiler");
     297        Qttop as energy_source (Brief="Heat rate removed from condenser");
     298        Qtbottom as energy_source (Brief="Heat rate supplied to reboiler");
    299299       
    300300        SET
     
    310310        zero to col.trays([1:4]).Inlet;
    311311        zero to col.trays([6:col.NTrays]).Inlet;
    312         Qttop to col.ttop.Q;
    313         Qtbottom to col.tbottom.Q;
    314         Qc to col.cond.Q;
    315         Qr to col.reb.Q;
     312        Qttop.Outlet to col.ttop.InletQ;
     313        Qtbottom.Outlet to col.tbottom.InletQ;
     314        Qc.Outlet to col.cond.InletQ;
     315        Qr.Outlet to col.reb.InletQ;
    316316       
    317317        SPECIFY
     
    332332        col.spbottom.Outlet1.F = 100 * 'kmol/h';
    333333       
    334         Qr = 3.7743e6 * 'kJ/h';
    335         Qc = -3.71e6 * 'kJ/h';
    336         Qttop = 0 * 'kJ/h';
    337         Qtbottom = 0 * 'kJ/h';
     334        Qr.Outlet.Q = 3.7743e6 * 'kJ/h';
     335        Qc.Outlet.Q = -3.71e6 * 'kJ/h';
     336        Qttop.Outlet.Q = 0 * 'kJ/h';
     337        Qtbottom.Outlet.Q = 0 * 'kJ/h';
    338338       
    339339        col.pump1.dP = 16 * 'kPa';
     
    407407
    408408        VARIABLES
    409         Qc as heat_rate (Brief="Heat rate removed from condenser");
    410         Qr as heat_rate (Brief="Heat rate supplied to reboiler");
     409        Qc as energy_source (Brief="Heat rate removed from condenser");
     410        Qr as energy_source (Brief="Heat rate supplied to reboiler");
    411411        Had_top as Real (Brief="Dimensionless condenser level");
    412412        Had_bot as Real (Brief="Dimensionless reboiler level");
     
    432432        zero to col.trays([1:4]).Inlet;
    433433        zero to col.trays([6:col.NTrays]).Inlet;
    434         Qc to col.cond.Q;
    435         Qr to col.reb.Q;
     434        Qc.Outlet to col.cond.InletQ;
     435        Qr.Outlet to col.reb.InletQ;
    436436
    437437        EQUATIONS
     
    452452        TCcond.Ports.input = Tad;
    453453        Tad = (col.cond.OutletL.T-Tmin)/(Tmax-Tmin);
    454         Qc = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output;   
     454        Qc.Outlet.Q = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output; 
    455455
    456456        "Pressure Controller"
     
    529529        zero.h = 0 * 'J/mol';
    530530       
    531         Qr = 3e6 * 'kJ/h';
     531        Qr.Outlet.Q = 3e6 * 'kJ/h';
    532532        col.pump1.dP = 16 * 'kPa';
    533533        col.trays.Emv = 1;
  • trunk/sample/stage_separators/sample_columnReact.mso

    r247 r310  
    4242        feed as source;
    4343        zero as stream;
    44         PIDLreb as PID_Ideal_AW;
    45         PIDLcond as PID_Ideal_AW;
    46         PIDTreb as PID_Ideal_AW;
    47         PIDTcond as PID_Ideal_AW;
     44        PIDLreb as PID;
     45        PIDLcond as PID;
     46        PIDTreb as PID;
     47        PIDTcond as PID;
    4848
    4949        VARIABLES
     50        Qc as energy_source(Brief="Condenser Heat supplied");
     51        Qr as energy_source(Brief="Reboiler Heat supplied");
    5052        Qcmin as heat_rate (Brief="Condenser Heat supplied");
    5153        Qcmax as heat_rate (Brief="Condenser Heat supplied");
     
    7577        zero to col.trays([1:4]).Inlet;
    7678        zero to col.trays([6:col.NTrays]).Inlet;
    77        
     79        Qc.Outlet to col.cond.InletQ;
     80        Qr.Outlet to col.reb.InletQ;
    7881       
    7982        EQUATIONS
     
    8891 
    8992        if col.reb.startup then
    90                 col.cond.Q = 0 * PIDTcond.Ports.output * 'kJ/s';
    91                 col.reb.Q = 0 * PIDTreb.Ports.output * 'kJ/s';
     93                Qc.Outlet.Q = 0 * PIDTcond.Ports.output * 'kJ/s';
     94                Qr.Outlet.Q = 0 * PIDTreb.Ports.output * 'kJ/s';
    9295               
    9396                PIDTreb.Ports.input = PIDTreb.Ports.setPoint;
    9497        else
    95                 col.cond.Q = Qcmin+(Qcmax-Qcmin)*PIDTcond.Ports.output;
    96                 col.reb.Q = Qrmin+(Qrmax-Qrmin)*PIDTreb.Ports.output;
     98                Qc.Outlet.Q = Qcmin+(Qcmax-Qcmin)*PIDTcond.Ports.output;
     99                Qr.Outlet.Q = Qrmin+(Qrmax-Qrmin)*PIDTreb.Ports.output;
    97100               
    98101                PIDTreb.Ports.input=Treb_ad;
     
    202205       
    203206        SET
     207        PIDLreb.PID_Select = "Ideal_AW";
     208        PIDLcond.PID_Select = "Ideal_AW";
     209        PIDTreb.PID_Select = "Ideal_AW";
     210        PIDTcond.PID_Select = "Ideal_AW";
     211
    204212        col.NTrays = 11;
    205213       
  • trunk/sample/stage_separators/sample_condenser.mso

    r213 r310  
    3838
    3939        VARIABLES
    40         Q       as heat_rate (Brief="Heat supplied");
     40        Q       as energy_source (Brief="Heat supplied");
    4141       
    4242        SET
     
    5151        s1.Outlet to c1.InletV;
    5252        c1.OutletL to sp.Inlet;
    53         Q to c1.Q;
     53        Q.Outlet to c1.InletQ;
    5454       
    5555        SPECIFY
     
    6363        c1.OutletL.F = 153 * 'kmol/h';
    6464
    65         Q = -3.71e6 * 'kJ/h';
     65        Q.Outlet.Q = -3.71e6 * 'kJ/h';
    6666
    6767        SET
     
    9090
    9191        VARIABLES
    92         Q       as heat_rate (Brief="Heat supplied");
     92        Q       as energy_source (Brief="Heat supplied");
    9393       
    9494        SET
     
    101101        CONNECTIONS
    102102        s1.Outlet to c1.InletV;
    103         Q to c1.Q;
     103        Q.Outlet to c1.InletQ;
    104104       
    105105        SPECIFY
     
    109109        s1.Outlet.z = [0.664, 0.336];
    110110
    111         Q = 3.71e6 * 'kJ/h';
     111        Q.Outlet.Q = 3.71e6 * 'kJ/h';
    112112        c1.DP = 100 * 'kPa';
    113113
  • trunk/sample/stage_separators/sample_flash.mso

    r247 r310  
    3838
    3939        VARIABLES
    40         Q       as heat_rate (Brief="Heat supplied");
     40        Q       as energy_source (Brief="Heat supplied");
    4141       
    4242        SET
     
    4949        CONNECTIONS
    5050        s1.Outlet to fl.Inlet;
    51         Q to fl.Q;
     51        Q.Outlet to fl.InletQ;
    5252       
    5353        EQUATIONS
     
    6262
    6363        fl.OutletV.F = 68.5 * 'kmol/h';
    64         Q = 0 * 'kJ/h';
     64        Q.Outlet.Q = 0 * 'kJ/h';
    6565       
    6666        SET
     
    100100
    101101        VARIABLES
    102         Q       as heat_rate (Brief="Heat supplied");
     102        Q       as energy_source (Brief="Heat supplied");
    103103       
    104104        SET
     
    111111        CONNECTIONS
    112112        s1.Outlet to fl.Inlet;
    113         Q to fl.Q;
     113        Q.Outlet to fl.InletQ;
    114114       
    115115        SPECIFY
     
    122122        fl.OutletL.P = 2.5 * 'atm';
    123123
    124         #Q = 0 * 'kJ/h';
     124        #Q.Outlet = 0 * 'kJ/h';
    125125        fl.OutletL.T = 315.06 * 'K';
    126126       
  • trunk/sample/stage_separators/sample_reboiler.mso

    r247 r310  
    3636
    3737        VARIABLES
    38         Q       as heat_rate (Brief="Heat supplied");
     38        Q       as energy_source (Brief="Heat supplied");
    3939
    4040        SET
     
    4949        feed to r1.Inlet;
    5050        s1.Outlet to r1.InletL;
    51         Q to r1.Q;
     51        Q.Outlet to r1.InletQ;
    5252       
    5353        SPECIFY
     
    6767        r1.OutletV.F = 111.6 * 'kmol/h';
    6868
    69         Q = 3.7743e6 * 'kJ/h';
     69        Q.Outlet.Q = 3.7743e6 * 'kJ/h';
    7070
    7171        SET
     
    9595
    9696        VARIABLES
    97         Q       as heat_rate (Brief="Heat supplied");
     97        Q       as energy_source (Brief="Heat supplied");
    9898
    9999        SET
     
    106106        CONNECTIONS
    107107        s1.Outlet to r1.InletL;
    108         Q to r1.Q;
     108        Q.Outlet to r1.InletQ;
    109109       
    110110        SPECIFY
     
    114114        s1.Outlet.z = [0.006061, 0.9939];
    115115       
    116 #       Q = 3.7743e6 * 'kJ/h';
     116#       Q.Outlet.Q = 3.7743e6 * 'kJ/h';
    117117        r1.OutletV.T = 350 * 'K';
    118118
  • trunk/sample/stage_separators/sample_tank.mso

    r247 r310  
    3838       
    3939        VARIABLES
    40         Qtank as heat_rate (Brief="Heat rate supplied to tank");
     40        Qtank as energy_source (Brief="Heat rate supplied to tank");
    4141       
    4242        DEVICES
     
    4646        CONNECTIONS
    4747        s.Outlet to t.Inlet;
    48         Qtank to t.Q;
     48        Qtank.Outlet to t.InletQ;
    4949       
    5050        SPECIFY
     
    5555#       s.v = 0.698;
    5656       
    57         Qtank = 0 * 'J/s';
     57        Qtank.Outlet.Q = 0 * 'J/s';
    5858        t.Outlet.F = 179 * 'kmol/h';
    5959       
     
    8484
    8585        VARIABLES
    86         Qtank as heat_rate (Brief="Heat rate supplied to tank");
     86        Qtank as energy_source (Brief="Heat rate supplied to tank");
    8787       
    8888        DEVICES
     
    9292        CONNECTIONS
    9393        s.Outlet to t.Inlet;
    94         Qtank to t.Q;
     94        Qtank.Outlet to t.InletQ;
    9595       
    9696        SPECIFY
     
    101101        #s.v = 0.368;
    102102
    103         Qtank = 0 * 'J/s';
     103        Qtank.Outlet.Q = 0 * 'J/s';
    104104        t.Outlet.F = 490 * 'kmol/h';
    105105       
Note: See TracChangeset for help on using the changeset viewer.