Changeset 310 for trunk/sample


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

Creating energy_stream and set its use.

Location:
trunk/sample/stage_separators
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 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.