Changeset 208 for branches


Ignore:
Timestamp:
Mar 15, 2007, 2:18:39 AM (16 years ago)
Author:
Argimiro Resende Secchi
Message:

Fix more sample problems to new language.

Location:
branches/newlanguage
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/reactors/cstr.mso

    r169 r208  
    4848EQUATIONS
    4949
     50"Molar Concentration"
     51        Outlet.z * M = C * Vr;
     52
    5053"Molar fraction"
    51         Outlet.z * M = C * Vr;
    52        
    53 "Vapourisation Fraction"
    54         Outlet.v = Inlet.v;
    55 
     54    sum(Outlet.z) = 1;
    5655end
    5756
     
    8584        Info            =
    8685        "write some information";
    87        
     86
    8887VARIABLES
    8988       
     
    9796
    9897"Reactor Energy Balance"
    99         diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h +sum(Hr*sum(stoic*r))*Vr - q;
     98        diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h +sum(Hr*sum(stoic*r))*Vr - q; #FIXME sum(sum())
    10099
    101100end
  • branches/newlanguage/eml/stage_separators/condenser.mso

    r200 r208  
    128128        "Pressure"
    129129        DP = InletV.P - OutletL.P;
    130 
    131         "Vapourisation Fraction"
    132         OutletL.v = 0.0;
    133130end
    134131
  • branches/newlanguage/eml/stage_separators/flashPH.mso

    r176 r208  
    4949        vfrac as fraction(Brief="Real vaporization fraction");
    5050        vsat as Real(Lower=-5, Upper=5, Brief="Vaporization fraction if saturated");
    51         Tsat as temperature(Lower=173, Upper=473, Brief="Temperature if saturated");
     51        Tsat as temperature(Lower=173, Upper=1473, Brief="Temperature if saturated");
    5252        xsat(NComp) as Real(Lower=-5, Upper=5, Brief="Liquid composition if saturated");
    5353        ysat(NComp) as Real(Lower=-5, Upper=5, Brief="Vapour composition if saturated");
  • branches/newlanguage/sample/heat_exchangers/Sample_Heater.mso

    r179 r208  
    5858        streamcold1.Outlet.F            = 100   * 'kmol/h';
    5959        streamcold1.Outlet.P            = 1     * 'atm';
    60         streamcold1.Outlet.T            = 100   * 'K';
     60        streamcold1.Outlet.T            = 300   * 'K';
    6161    streamcold1.Outlet.z                = [1,0];
    6262
    6363        streamcold2.Outlet.F            = 20*'kmol/h';
    6464        streamcold2.Outlet.P            = 1     * 'atm';
    65         streamcold2.Outlet.T            = 100   * 'K';
     65        streamcold2.Outlet.T            = 300   * 'K';
    6666    streamcold2.Outlet.z                = [0,1];
    6767       
    68         Heater.Outlet.T         = 70*'K';
     68        Heater.Outlet.T         = 330*'K';
    6969        Heater.Outlet.P   = 1 * 'atm';
    7070
  • branches/newlanguage/sample/mixers_splitters/sample_mixer.mso

    r202 r208  
    4646       
    4747        CONNECTIONS
    48         stream1 to mixer1.Inlet_mixer(1);
    49         stream2 to mixer1.Inlet_mixer(2);
     48        stream1.Outlet to mixer1.Inlet_mixer(1);
     49        stream2.Outlet to mixer1.Inlet_mixer(2);
    5050       
    5151        SPECIFY
  • branches/newlanguage/sample/reactors/sample_cstr.mso

    r169 r208  
    3939SET
    4040
    41         PP.Components   = ["1,2-propylene oxide", "methanol","water","sulfuric acid", "1,2-propylene glycol" ];
     41        PP.Components   = ["1,2-propylene oxide", "methanol","water","1,2-propylene glycol" ];
    4242        PP.LiquidModel  = "PR";
    4343        PP.VapourModel  = "PR";
     
    4545        NComp                   = PP.NumberOfComponents;
    4646        Reac.NReac      = 1;
    47         Reac.stoic              = [-1, 0, -1, 0, 1];
     47        Reac.stoic              = [-1, 0, -1, 1];
    4848       
    4949EQUATIONS
    5050
    51 #       Reac.Hr = -36400 * "Btu/lbmol" - 7 * "Btu/lbmol/degR" * (Reac.Fout.T - 528 * "degR");
    52 #       Reac.r = 16.96e12 / "h" * exp(- 32400 * "Btu/lbmol"/R/Reac.Fout.T)
    53 #               * Reac.C(1);
    54         Reac.Hr = 0 * 'Btu/lbmol';
    55         Reac.r  = 0 * 'mol/l/s';
     51        Reac.Hr = -36400 * 'Btu/lbmol' - 7 * 'Btu/lbmol/degR' * (Reac.Outlet.T - 528 * 'degR');
     52        Reac.r = 16.96e12 / 'h' * exp(- 32400 * 'Btu/lbmol'/R/Reac.Outlet.T)
     53                * Reac.C(1);
    5654
    57         SPECIFY
     55SPECIFY
    5856        s1.Outlet.F = 52126 * 'mol/h';
    5957        s1.Outlet.P = 1     * 'atm';
    6058        s1.Outlet.T = 534.67* 'degR';
    61         s1.Outlet.z = [0.0468, 0.0783, 0.874, 0.0009, 0];
    62         s1.Outlet.v = 0.0;
     59        s1.Outlet.z = [0.0468, 0.0783, 0.8749, 0];
    6360
    6461        Reac.Vr                 = 300   * 'gal';
    6562        Reac.Outlet.F   = Reac.Inlet.F;
    6663
    67 "Adiabatic"
     64        "Adiabatic"
    6865        Reac.q                  = 0     * 'J/s';
    6966        Reac.Outlet.P   = 1     * 'atm';
     
    7572INITIAL
    7673
    77         Reac.Outlet.T = Reac.Inlet.T;
    78         Reac.Outlet.z = Reac.Inlet.z;
     74        Reac.Outlet.T = 530 * 'degR';
     75        Reac.M = 100 * 'kmol';
     76        Reac.Outlet.z(1:3) = [0.0468, 0.0783, 0.874];
    7977
    8078OPTIONS
  • branches/newlanguage/sample/stage_separators/sample_column.mso

    r187 r208  
    105105# can be obtained by using the results from that transient:
    106106
    107         #guessFile="SectionColumn_Test_with2tray.rlt";
    108         #mode = "steady";
     107        #GuessFile="SectionColumn_Test_with2tray.rlt";
     108        #Dynamic = false;
    109109end
    110110
     
    184184        TimeStep = 1;
    185185        TimeEnd = 100;
    186         #guessFile="SectionColumn_Test_with8tray.rlt";
    187         #mode = "steady";
     186        #GuessFile="SectionColumn_Test_with8tray.rlt";
     187        #Dynamic = false;
    188188end
    189189
     
    277277        TimeEnd = 50;
    278278        #time = [0:0.01:1, 2:50];
    279         #guessFile="Distillation_kettle_cond_Test.rlt";
    280         #mode = "steady";       
     279        #GuessFile="Distillation_kettle_cond_Test.rlt";
     280        #Dynamic = false;       
    281281end
    282282
     
    488488        TimeEnd = 2;
    489489        TimeUnit = 'h';
    490         #time = [0:0.01:0.1, 0.11:0.01:2]*"h";
    491         #initialFile = "Column_ctrl.rlt";
    492         #guessFile = "Column_ctrl.rlt";
    493         #mode = "steady";
     490        #InitialFile = "Column_ctrl.rlt";
     491        #GuessFile = "Column_ctrl.rlt";
     492        #Dynamic = false;
    494493end
    495494
  • branches/newlanguage/sample/stage_separators/sample_columnReact.mso

    r202 r208  
    6262
    6363        CONNECTIONS
    64         feed to col.trays(5).Inlet;
     64        feed.Outlet to col.trays(5).Inlet;
    6565        zero to col.reb.Inlet;
    6666        zero to col.trays([1:4]).Inlet;
  • branches/newlanguage/sample/stage_separators/sample_condenser.mso

    r202 r208  
    4747       
    4848        CONNECTIONS
    49         s1 to c1.InletV;
     49        s1.Outlet to c1.InletV;
    5050        c1.OutletL to sp.Inlet;
    5151        Q to c1.Q;
     
    9696       
    9797        CONNECTIONS
    98         s1 to c1.InletV;
     98        s1.Outlet to c1.InletV;
    9999        Q to c1.Q;
    100100       
  • branches/newlanguage/sample/stage_separators/sample_flashPH.mso

    r202 r208  
    4444       
    4545        CONNECTIONS
    46         s1 to fl.Inlet;
     46        s1.Outlet to fl.Inlet;
    4747        Q to fl.Q;
    4848       
  • branches/newlanguage/sample/stage_separators/sample_reboiler.mso

    r202 r208  
    4646        CONNECTIONS
    4747        feed to r1.Inlet;
    48         s1 to r1.InletL;
     48        s1.Outlet to r1.InletL;
    4949        Q to r1.Q;
    5050       
     
    102102
    103103        CONNECTIONS
    104         s1 to r1.InletL;
     104        s1.Outlet to r1.InletL;
    105105        Q to r1.Q;
    106106       
  • branches/newlanguage/sample/stage_separators/sample_tray.mso

    r202 r208  
    4343       
    4444        CONNECTIONS
    45         feed to t1.Inlet;
     45        feed.Outlet to t1.Inlet;
    4646        inL to t1.InletL;
    4747        inV to t1.InletV;
Note: See TracChangeset for help on using the changeset viewer.