Changeset 210


Ignore:
Timestamp:
Mar 15, 2007, 9:52:28 AM (15 years ago)
Author:
Argimiro Resende Secchi
Message:

Remove convergence problems of some samples.

Location:
branches/newlanguage
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/pressure_changers/compressor.mso

    r196 r210  
    3333outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
    3434outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
    35         Effs            as positive     (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 1);
    3635        R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K');
    3736        Mw(NComp)       as molweight    (Brief = "Molar Weight");
    38        
     37
    3938        VARIABLES
    40         n                       as positive             (Brief = "Politropic Coefficient");
    41         k                       as positive     (Brief = "Isentropic Coefficient");
     39        n                       as positive             (Brief = "Politropic Coefficient", Lower=0);
     40        k                       as positive     (Brief = "Isentropic Coefficient", Lower=0);
    4241        Cp              as cp_mol               (Brief = "Heat Capacity");
    4342        Cv                      as cv_mol               (Brief = "Heat Capacity");
     
    4746        Ws                      as energy_mol   (Brief = "Isentropic Head");
    4847        Tiso            as temperature  (Brief = "Isentropic Temperature");
    49         Effp            as positive     (Brief = "Politropic efficiency", Lower = 0, Upper = 1);
     48        Effp            as efficiency   (Brief = "Politropic efficiency");
     49        Effs            as efficiency   (Brief = "Isentropic efficiency");
    5050        FPower          as power                (Brief = "Fluid Power");
    5151        Mwm                     as molweight    (Brief = "Mixture Molar Weight");
    52        
     52
    5353        SET
    5454        Mw = PP.MolecularWeight();
     
    5757       
    5858        "Calculate Mwm for Inlet Mixture"
    59         Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
     59        Mwm = sum(Mw*Inlet.z);
    6060
    6161        "Calculate Outlet Stream Pressure"
     
    7272       
    7373        "Calculate Isentropic Coeficient"
    74         k = Cp/Cv;
     74        k * Cv = Cp;
    7575       
    7676        "Calculate Isentropic Head"
     
    8787       
    8888        "Calculate Politropic Efficiency"
    89         Effp = (n/(n-1))/(k/(k-1));
     89        Effp * (n-1) * k = n * (k-1);
    9090       
    9191        "Calculate Politropic Head"
     
    9999       
    100100        Outlet.z = Inlet.z;
    101 
    102 
    103101end
  • branches/newlanguage/eml/pressure_changers/turbine.mso

    r196 r210  
    3737outer PP                as Plugin                       (Brief = "External Physical Properties", Type="PP");
    3838        Mw(NComp)       as molweight            (Brief = "Molar Weight");
    39         Eff     as positive                     (Default = 0.72, Brief = "Pump efficiency");
    40         Meff    as positive                     (Default = 1.0, Brief = "Brake efficiency");
    41         Beta    as positive                     (Default = 0, Brief = "Volumetric expansivity", Unit = '1/K');
    42        
    4339       
    4440        VARIABLES
     41        Eff     as efficiency           (Brief = "Pump efficiency");
     42        Meff    as efficiency           (Brief = "Brake efficiency");
     43        Beta    as positive             (Brief = "Volumetric expansivity", Unit = '1/K');
    4544        Head    as head                         (Brief = "Head Developed");
    4645        FPower  as power                        (Brief = "Fluid Power");
     
    5958        #Mixtures Properties
    6059        "Calculate Mwm for Inlet Mixture"
    61         Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
    62        
     60        Mwm = sum(Mw*Inlet.z);
     61
    6362        "Calculate rho using a External Physical Properties Routine"
    6463        rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
     
    7877       
    7978        "Calculate Fluid Power"
    80         FPower = Pdiff * Inlet.F / (rho/Mwm);
     79        FPower * rho = Pdiff * Inlet.F * Mwm;
    8180       
    8281        "Calculate Brake Power"
     
    8786       
    8887        "Calculate Outlet Temperature"
    89         (Outlet.T - Inlet.T)*Cp = (Outlet.h - Inlet.h) -  Pdiff /(rho/Mwm) * (1-Beta*Inlet.T);
     88        (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho
     89        -  Pdiff * Mwm * (1-Beta*Inlet.T);
    9090       
    9191        "Calculate Outlet Enthalpy"
    92         Outlet.h - Inlet.h =  Pdiff / (rho/Mwm);
     92        (Outlet.h - Inlet.h) * rho =  Pdiff * Mwm;
    9393       
    9494        "Molar Balance"
     
    9999
    100100        "Calculate Head"
    101         Head = Pdiff/rho;
    102 
     101        Head * rho = Pdiff;
    103102end
  • branches/newlanguage/eml/stage_separators/column.mso

    r176 r210  
    4646Model Section_Column
    4747        PARAMETERS
    48         outer PP as Plugin;
     48        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    4949        outer NComp as Integer;
    5050        NTrays as Integer(Brief="Number of trays", Default=2);
     
    8686Model Distillation_kettle_cond
    8787        PARAMETERS
    88         outer PP as Plugin;
     88        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    8989        outer NComp as Integer;
    9090        NTrays as Integer(Brief="Number of trays", Default=2);
     
    157157Model Distillation_thermosyphon_subcooling
    158158        PARAMETERS
    159         outer PP as Plugin;
     159        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    160160        outer NComp as Integer;
    161161        NTrays as Integer(Brief="Number of trays", Default=2);
     
    233233Model Distillation_thermosyphon_cond
    234234        PARAMETERS
    235         outer PP as Plugin;
     235        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    236236        outer NComp as Integer;
    237237        NTrays as Integer(Brief="Number of trays", Default=2);
     
    305305Model Distillation_kettle_subcooling
    306306        PARAMETERS
    307         outer PP as Plugin;
     307        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    308308        outer NComp as Integer;
    309309        NTrays as Integer(Brief="Number of trays", Default=2);
     
    372372Model Rectifier
    373373        PARAMETERS
    374         outer PP as Plugin;
     374        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    375375        outer NComp as Integer;
    376376        NTrays as Integer(Brief="Number of trays", Default=2);
     
    428428Model Rectifier_subcooling
    429429        PARAMETERS
    430         outer PP as Plugin;
     430        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    431431        outer NComp as Integer;
    432432        NTrays as Integer(Brief="Number of trays", Default=2);
     
    483483Model Refluxed_Stripping
    484484        PARAMETERS
    485         outer PP as Plugin;
     485        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    486486        outer NComp as Integer;
    487487        NTrays as Integer(Brief="Number of trays", Default=2);
     
    539539Model Refluxed_Stripping_subcooling
    540540        PARAMETERS
    541         outer PP as Plugin;
     541        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    542542        outer NComp as Integer;
    543543        NTrays as Integer(Brief="Number of trays", Default=2);
     
    594594Model Refluxed_Absorption
    595595        PARAMETERS
    596         outer PP as Plugin;
     596        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    597597        outer NComp as Integer;
    598598        NTrays as Integer(Brief="Number of trays", Default=2);
     
    651651Model Refluxed_Absorption_subcooling
    652652        PARAMETERS
    653         outer PP as Plugin;
     653        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    654654        outer NComp as Integer;
    655655        NTrays as Integer(Brief="Number of trays", Default=2);
     
    706706Model Reboiled_Stripping_kettle
    707707        PARAMETERS
    708         outer PP as Plugin;
     708        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    709709        outer NComp as Integer;
    710710        NTrays as Integer(Brief="Number of trays", Default=2);
     
    762762Model Reboiled_Stripping_thermosyphon
    763763        PARAMETERS
    764         outer PP as Plugin;
     764        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    765765        outer NComp as Integer;
    766766        NTrays as Integer(Brief="Number of trays", Default=2);
     
    820820Model Reboiled_Absorption_kettle
    821821        PARAMETERS
    822         outer PP as Plugin;
     822        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    823823        outer NComp as Integer;
    824824        NTrays as Integer(Brief="Number of trays", Default=2);
     
    876876Model Reboiled_Absorption_thermosyphon
    877877        PARAMETERS
    878         outer PP as Plugin;
     878        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    879879        outer NComp as Integer;
    880880        NTrays as Integer(Brief="Number of trays", Default=2);
     
    930930Model ReactiveDistillation
    931931        PARAMETERS
    932         outer PP as Plugin;
     932        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    933933        outer NComp as Integer;
    934934        NTrays as Integer(Brief="Number of trays", Default=2);
  • branches/newlanguage/eml/stage_separators/condenser.mso

    r209 r210  
    4343Model condenser
    4444        PARAMETERS
    45         outer PP as Plugin(Type="PP");
     45        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    4646        outer NComp as Integer;
    4747        V as volume (Brief="Condenser total volume");
     
    109109Model condenserSteady
    110110        PARAMETERS
    111         outer PP as Plugin;
     111        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    112112        outer NComp as Integer;
    113113
     
    135135Model condenserReact
    136136        PARAMETERS
    137         outer PP as Plugin(Type="PP");
     137        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    138138        outer NComp as Integer;
    139139        V as volume (Brief="Condenser total volume");
  • branches/newlanguage/eml/stage_separators/flashPH.mso

    r209 r210  
    3838Model FlashPHSteady
    3939        PARAMETERS
    40 outer PP as Plugin(Type="PP");
     40outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    4141outer NComp as Integer;
    4242        B as Real(Default=1000, Brief="Regularization Factor");
  • branches/newlanguage/eml/stage_separators/reboiler.mso

    r209 r210  
    4848Model reboiler
    4949        PARAMETERS
    50         outer PP as Plugin(Type="PP");
     50        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    5151        outer NComp as Integer;
    5252        Across as area (Brief="Cross Section Area of reboiler");
     
    119119Model reboilerSteady
    120120        PARAMETERS
    121         outer PP as Plugin(Type="PP");
     121        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    122122        outer NComp as Integer;
    123123        DP as press_delta (Brief="Pressure Drop in the reboiler");
     
    155155Model reboilerSteady_fakeH
    156156        PARAMETERS
    157         outer PP as Plugin(Type="PP");
     157        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    158158        outer NComp as Integer;
    159159        DP as press_delta (Brief="Pressure Drop in the reboiler");
     
    191191Model reboilerReact
    192192        PARAMETERS
    193         outer PP as Plugin(Type="PP");
     193        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    194194        outer NComp as Integer;
    195195        Across as area (Brief="Cross Section Area of reboiler");
  • branches/newlanguage/eml/stage_separators/tank.mso

    r209 r210  
    3939
    4040        PARAMETERS
    41         outer PP as Plugin(Type="PP");
     41        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    4242        outer NComp as Integer;
    4343        Across as area (Brief="Tank cross section area", Default=2);
     
    8484
    8585        PARAMETERS
    86         outer PP as Plugin(Type="PP");
     86        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    8787        outer NComp as Integer;
    8888        radius as length(Brief="Tank radius");
     
    148148
    149149        PARAMETERS
    150         outer PP as Plugin(Type="PP");
     150        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    151151        outer NComp as Integer;
    152152        Across as area (Brief="Tank cross section area", Default=2);
  • branches/newlanguage/eml/stage_separators/tray.mso

    r209 r210  
    5656
    5757        PARAMETERS
    58         outer PP as Plugin(Type="PP");
     58        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    5959        outer NComp as Integer;
    6060        V as volume(Brief="Total Volume of the tray");
     
    159159
    160160        PARAMETERS
    161         outer PP as Plugin(Type="PP");
     161        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    162162        outer NComp as Integer;
    163163        V as volume(Brief="Total Volume of the tray");
     
    232232        OutletV.P = OutletL.P;
    233233       
    234         "vaporization fraction "
    235         OutletV.v = 1.0;
    236         OutletL.v = 0.0;
    237        
    238234        "Level of clear liquid over the weir"
    239235        Level = ML*vL/Ap;
     
    258254        OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/'Pa'))/2 *
    259255                Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * 'atm') / (alfa*rhoV) );
    260        
    261256
    262257        "Chemical Equilibrium"
  • branches/newlanguage/eml/types.mso

    r193 r210  
    3434percent as Real (Brief = "Percent", Default=50, final Lower=0, final Upper=100);
    3535control_signal as Real (Brief = "Control Signal", Default=1, Lower=-1e9, Upper=1e9);
     36efficiency as Real (Brief = "Efficiency", Default=0.5, final Lower=0, final Upper=1);
    3637
    3738# Pressure
  • branches/newlanguage/sample/pressure_changers/sample_compressor.mso

    r196 r210  
    4444        PP.VapourModel = "Ideal";
    4545        NComp = PP.NumberOfComponents;
    46         C1.Effs = 0.75;
    4746        PP.Derivatives = 0;
    48        
    4947
    5048        SPECIFY
     49        C1.Effs = 0.75;
    5150        S1.Outlet.F = 41.05             * 'kmol/h';
    5251        S1.Outlet.P = 1                 * 'atm';
  • branches/newlanguage/sample/pressure_changers/sample_turbine.mso

    r196 r210  
    4646        PP.Derivatives = 0;
    4747        NComp = PP.NumberOfComponents;
     48       
     49        SPECIFY
    4850        HT1.Beta = 425e-6 / 'K';
    4951        HT1.Meff = 0.95;
    5052        HT1.Eff = 0.72;
    51        
    52         SPECIFY
    5353        S1.Outlet.F = 1000                      * 'kmol/h';
    5454        S1.Outlet.P = 5                         * 'atm' ;
Note: See TracChangeset for help on using the changeset viewer.