Changeset 176


Ignore:
Timestamp:
Mar 4, 2007, 1:56:54 AM (15 years ago)
Author:
Argimiro Resende Secchi
Message:

Fix some new language syntax.

Location:
branches/newlanguage
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/controllers/PIDIncr.mso

    r74 r176  
    7171        VARIABLES
    7272
    73         dderivTerm    as control_signal (Brief="Derivative term",Unit="1/s", Default=0);
    74         dFilt         as control_signal (Brief="Derivative term filtered", Default=0.5,Unit="1/s");
    75         error         as control_signal (Brief="Error definition for proportional term",Unit="1/s");
    76         errorD        as control_signal (Brief="Error definition for derivative term",Unit="1/s");
     73        dderivTerm    as control_signal (Brief="Derivative term",Unit='1/s', Default=0);
     74        dFilt         as control_signal (Brief="Derivative term filtered", Default=0.5,Unit='1/s');
     75        error         as control_signal (Brief="Error definition for proportional term",Unit='1/s');
     76        errorD        as control_signal (Brief="Error definition for derivative term",Unit='1/s');
    7777        errorI        as control_signal (Brief="Error definition for integral term");
    7878        inputFilt     as control_signal (Brief="Filtered input");
    79         dintTerm      as control_signal (Brief="Integral term", Default=0,Unit="1/s");
    80         doutp         as control_signal (Brief="Sum of proportional, integral and derivative terms",Unit="1/s");
     79        dintTerm      as control_signal (Brief="Integral term", Default=0,Unit='1/s');
     80        doutp         as control_signal (Brief="Sum of proportional, integral and derivative terms",Unit='1/s');
    8181        outps         as control_signal (Brief="Variable outp scaled between -1 and 1");
    8282        outp          as control_signal (Brief="Variable outp");
    83         dpropTerm     as control_signal (Brief="Proportional term", Default=0,Unit="1/s");
     83        dpropTerm     as control_signal (Brief="Proportional term", Default=0,Unit='1/s');
    8484        setPointFilt  as control_signal (Brief="Filtered setPoint", Default=0);
    8585
     
    163163        INITIAL
    164164        Ports.output = Parameters.bias;
    165         diff(Internal.dFilt) = 0*"1/s^2";
    166         diff(Internal.inputFilt)=0*"1/s";
    167         diff(Internal.setPointFilt)=0*"1/s";
     165        diff(Internal.dFilt) = 0/'s^2';
     166        diff(Internal.inputFilt)=0/'s';
     167        diff(Internal.setPointFilt)=0/'s';
    168168end
    169169
     
    200200       
    201201        "Sum of proportional, integral and derivative terms"
    202         Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1*"1/s" + Internal.dderivTerm)*"s");
     202        Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1/'s' + Internal.dderivTerm)*'s');
    203203       
    204204end
     
    236236
    237237        "Sum of proportional, integral and derivative terms"
    238         Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1*"1/s" + Internal.dderivTerm)*"s");
     238        Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1/'s' + Internal.dderivTerm)*'s');
    239239
    240240end
     
    298298       
    299299        "Sum of proportional, integral and derivative terms"
    300         Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1*"1/s" + Internal.dderivTerm)*"s");
     300        Internal.doutp = Options.action*(Parameters.gain*(Internal.dpropTerm + Internal.dintTerm)*(1/'s' + Internal.dderivTerm)*'s');
    301301       
    302302        if abs(Internal.outps)>1 and (Options.action*sign(Internal.outps)*Internal.errorI)>0 then
  • branches/newlanguage/eml/controllers/PIDs.mso

    r74 r176  
    159159        INITIAL
    160160        Internal.intTerm = 0;
    161         diff(Internal.dFilt) = 0*"1/s";
    162         diff(Internal.inputFilt) = 0*"1/s";
    163         diff(Internal.setPointFilt) = 0*"1/s";
     161        diff(Internal.dFilt) = 0/'s';
     162        diff(Internal.inputFilt) = 0/'s';
     163        diff(Internal.setPointFilt) = 0/'s';
    164164end
    165165
  • branches/newlanguage/eml/controllers/iae.mso

    r74 r176  
    3636        VARIABLES
    3737        input    as Real (Brief="input signal");
    38         output   as Real (Brief="output signal", Unit="s");
     38        output   as Real (Brief="output signal", Unit='s');
    3939        setPoint as Real (Brief="setpoint");
    4040        absError as Real (Brief="absolute error");
     
    4949       
    5050        INITIAL
    51         output=0*"s";
     51        output=0*'s';
    5252
    5353end
  • branches/newlanguage/eml/controllers/ise.mso

    r74 r176  
    3535        VARIABLES
    3636        input    as Real (Brief="input signal");
    37         output   as Real (Brief="output signal", Unit="s");
     37        output   as Real (Brief="output signal", Unit='s');
    3838        setPoint as Real (Brief="setpoint");
    3939        sqError  as Real (Brief="error^2");
     
    4848       
    4949        INITIAL
    50         output=0*"s";
     50        output=0*'s';
    5151
    5252end
  • branches/newlanguage/eml/controllers/lag_1.mso

    r74 r176  
    3434        PARAMETERS
    3535        gain as positive (Brief="model gain");
    36         tau  as positive (Brief="model time constant", Unit="s");
     36        tau  as positive (Brief="model time constant", Unit='s');
    3737       
    3838        VARIABLES
     
    4646       
    4747        INITIAL
    48         diff(output)=0*"1/s";
     48        diff(output)=0/'s';
    4949       
    5050end
  • branches/newlanguage/eml/controllers/lead_lag.mso

    r74 r176  
    3535        PARAMETERS
    3636    gain  as positive (Brief="model gain");
    37         beta  as positive (Brief="lead time constant", Unit="s");
    38         alpha as positive (Brief="lag time constant", Unit="s");
     37        beta  as positive (Brief="lead time constant", Unit='s');
     38        alpha as positive (Brief="lag time constant", Unit='s');
    3939       
    4040        VARIABLES
     
    5252
    5353        INITIAL
    54         diff(aux)= 0 * "1/s";
     54        diff(aux)= 0/'s';
    5555       
    5656end
  • branches/newlanguage/eml/heat_exchangers/DoublePipe.mso

    r168 r176  
    3030PARAMETERS
    3131
    32 outer PP                        as Plugin               (Brief="External Physical Properties");
     32outer PP                        as Plugin               (Brief="External Physical Properties", Type="PP");
    3333outer NComp             as Integer      (Brief="Number of Components");
    3434       
  • branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

    r168 r176  
    2929       
    3030PARAMETERS
    31 outer PP                as Plugin               (Brief="External Physical Properties");
     31outer PP                as Plugin               (Brief="External Physical Properties", Type="PP");
    3232outer NComp     as Integer      (Brief="Number of Components");
    3333       
  • branches/newlanguage/eml/heat_exchangers/Mheatex.mso

    r168 r176  
    4343PARAMETERS
    4444
    45 outer PP                                        as Plugin       (Brief="Physical Properties");
     45outer PP                                        as Plugin       (Brief="Physical Properties", Type="PP");
    4646outer   NComp                           as Integer      (Brief="Number of Components");
    4747        FlowDirection                   as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
  • branches/newlanguage/eml/heat_exchangers/heater.mso

    r168 r176  
    3939       
    4040PARAMETERS
    41         outer PP                as Plugin               (Brief="Physical Properties");
     41        outer PP                as Plugin               (Brief="Physical Properties", Type="PP");
    4242        outer   NComp   as Integer              (Brief="Number of Components");
    4343        Ninlet                          as Integer              (Brief="Number of Inlet Streams",Lower=1);
  • branches/newlanguage/eml/mixers_splitters/mixer.mso

    r76 r176  
    3535using "stage_separators/flash";
    3636
    37 Model mixer as flash_Steady
     37Model mixer as flash_steady
    3838        PARAMETERS
    39 ext     NComp as Integer (Brief = "Number of chemical components", Lower = 1);
    40         Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2);
     39outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
     40          Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2);
    4141       
    4242        VARIABLES
    43 in  Inlet_mixer(Ninlet) as stream;      #(Brief = "Inlet streams", Lower = 1);
    44 out Outlet                      as stream;      #(Brief = "Outlet stream", Default = 1, Lower = 1, Upper = 1);
    45 out Out_int                             as stream;  #(Brief = "Intermediate Outlet stream", Default = 1, Lower = 1, Upper = 1);
     43in  Inlet_mixer(Ninlet) as stream (Brief = "Inlet streams");
     44out Outlet                      as stream (Brief = "Outlet stream");
     45out Out_int                             as stream (Brief = "Intermediate Outlet stream");
    4646        zeroQ as heat_rate (Brief="No Heat rate supplied");
    4747       
     
    8282        Outlet.P = Inlet.P;
    8383       
    84         zeroQ = 0*"kW";
     84        zeroQ = 0*'kW';
    8585       
    8686end
  • branches/newlanguage/eml/mixers_splitters/sepComp.mso

    r175 r176  
    5454PARAMETERS
    5555
    56 outer PP                        as Plugin       (Brief = "External Physical Properties");
     56outer PP                        as Plugin       (Brief = "External Physical Properties", Type="PP");
    5757outer   NComp           as Integer      (Brief = "Number of chemical components", Lower = 1);
    5858                NOutlet                 as Integer      (Brief = "Number of Outlet Streams", Lower = 1);
     
    119119PARAMETERS
    120120
    121 outer PP                        as Plugin       (Brief = "External Physical Properties");
     121outer PP                        as Plugin       (Brief = "External Physical Properties", Type="PP");
    122122outer   NComp           as Integer      (Brief = "Number of chemical components", Lower = 1);
    123123                mainComp        as Integer      (Brief = "Component specified", Default = 1, Lower = 1);
  • branches/newlanguage/eml/pressure_changers/compressor.mso

    r77 r176  
    2828using "pressure_changers/flux_machine_basic";
    2929
    30 Model centrifugal_compressor as flux_machine_basic_TP
     30Model centrifugal_compressor as flux_machine_basic_PH
    3131       
    3232        PARAMETERS
    33 ext PP                  as CalcObject   (Brief = "External Physical Properties");
    34 ext NComp       as Integer              (Brief = "Number of chemical components", Lower = 1);
     33outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
     34outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
    3535        Effs            as positive     (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 1);
    36         R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= "kJ/kmol/K");
     36        R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K');
    3737        Mw(NComp)       as molweight    (Brief = "Molar Weight");
    3838       
     
    4040        n                       as positive             (Brief = "Politropic Coefficient");
    4141        k                       as positive     (Brief = "Isentropic Coefficient");
    42         Cp              as cp_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");
    43         Cv                      as cv_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");       
    44         Pdiff           as press_delta  (Brief = "Pressure Increase", Unit="kPa");
     42        Cp              as cp_mol               (Brief = "Heat Capacity", Unit = 'kJ/(kmol*K)');
     43        Cv                      as cv_mol               (Brief = "Heat Capacity", Unit = 'kJ/(kmol*K)');       
     44        Pdiff           as press_delta  (Brief = "Pressure Increase", Unit='kPa');
    4545        Pratio          as positive             (Brief = "Pressure Ratio");     
    46         Wp                      as energy_mol   (Brief = "Politropic Head", Unit = "kJ/kmol");
    47         Ws                      as energy_mol   (Brief = "Isentropic Head", Unit = "kJ/kmol");
     46        Wp                      as energy_mol   (Brief = "Politropic Head", Unit = 'kJ/kmol');
     47        Ws                      as energy_mol   (Brief = "Isentropic Head", Unit = 'kJ/kmol');
    4848        Tiso            as temperature  (Brief = "Isentropic Temperature");
    4949        Effp            as positive     (Brief = "Politropic efficiency", Lower = 0, Upper = 1);
    50         FPower          as power                (Brief = "Fluid Power", Unit="kW");
     50        FPower          as power                (Brief = "Fluid Power", Unit='kW');
    5151        Mwm                     as molweight    (Brief = "Mixture Molar Weight");
    5252       
  • branches/newlanguage/eml/pressure_changers/flux_machine_basic.mso

    r77 r176  
    3535end
    3636
    37 Model flux_machine_basic_TP
     37Model flux_machine_basic_PH
    3838        VARIABLES
    3939in      Inlet as stream;
    40 out     Outlet as streamTP;
     40out     Outlet as streamPH;
    4141
    4242end
  • branches/newlanguage/eml/pressure_changers/pump.mso

    r125 r176  
    3333       
    3434        PARAMETERS
    35         outer PP        as Plugin                       (Brief = "External Physical Properties");
     35        outer PP        as Plugin                       (Brief = "External Physical Properties", Type="PP");
    3636        outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
    3737        Mw(NComp)       as molweight            (Brief = "Molar Weight");
    3838        Eff             as positive             (Default = 0.72, Brief = "Pump Efficiency");
    3939        Meff            as positive             (Default = 0.95, Brief = "Brake Efficiency");
    40         Beta            as positive             (Default = 0, Brief = "Volumetric Expansivity", Unit = "1/K");
     40        Beta            as positive             (Default = 0, Brief = "Volumetric Expansivity", Unit = '1/K');
    4141        g                       as acceleration         (Brief = "Gravity Acceleration", Default = 9.81);
    4242        N                       as vel_angular          (Brief = "Rotation", Default = 100);
     
    4444       
    4545        VARIABLES
    46         rho               as dens_mass          (Brief = "Specific Mass", Unit="kg/m^3");
    47         Cp        as cp_mol                     (Brief = "Heat Capacity", Unit="kJ/kmol/K");
    48         FPower    as power                      (Brief = "Fluid Power", Unit="kW");
    49         BPower    as power                      (Brief = "Brake Power",Unit="kW");
    50         EPower    as power                      (Brief = "Eletrical Potency", Unit="kW");
    51         Pdiff     as press_delta        (Brief = "Pressure Increase", Unit="kPa");
     46        rho               as dens_mass          (Brief = "Specific Mass", Unit='kg/m^3');
     47        Cp        as cp_mol                     (Brief = "Heat Capacity", Unit='kJ/kmol/K');
     48        FPower    as power                      (Brief = "Fluid Power", Unit='kW');
     49        BPower    as power                      (Brief = "Brake Power",Unit='kW');
     50        EPower    as power                      (Brief = "Eletrical Potency", Unit='kW');
     51        Pdiff     as press_delta        (Brief = "Pressure Increase", Unit='kPa');
    5252        Pratio    as positive           (Brief = "Pressure Ratio");     
    53         Head      as head                       (Brief = "Head Developed", Unit="kJ/kmol");
    54         Head_is   as head                       (Brief = "Isoentripic Head", Unit="kJ/kmol");
     53        Head      as head                       (Brief = "Head Developed", Unit='kJ/kmol');
     54        Head_is   as head                       (Brief = "Isoentripic Head", Unit='kJ/kmol');
    5555        Mwm       as molweight          (Brief = "Mixture Molar Weight");
    56         pvm               as pressure           (Brief = "Mixture Vapour Pressure", Unit = "kPa");                     
     56        pvm               as pressure           (Brief = "Mixture Vapour Pressure", Unit = 'kPa');                     
    5757        NPSHa     as length                     (Brief = "Available Net Positive Suction Head");
    58         NS                as positive           (Brief = "Specific Speed", Unit = "(rpm*(gal/min)^0.5)/(m^3/4)");
     58        NS                as positive           (Brief = "Specific Speed", Unit = '(rpm*(gal/min)^0.5)/(m^3/4)');
    5959        Q                 as flow_vol           (Brief = "Volumetric Flow Rate");
    60         vm                as vol_mol            (Brief = "Mixture Molar Volume", Unit = "m^3/kmol");
     60        vm                as vol_mol            (Brief = "Mixture Molar Volume", Unit = 'm^3/kmol');
    6161       
    6262        SET
     
    147147Model pump
    148148        PARAMETERS
    149         outer PP as Plugin;
    150         outer NComp as Integer;
     149outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
     150outer NComp as Integer;
    151151       
    152152        VARIABLES
  • branches/newlanguage/eml/pressure_changers/turbine.mso

    r77 r176  
    3434
    3535        PARAMETERS
    36 ext NComp       as Integer                      (Brief = "Number of chemical components", Lower = 1);
    37 ext PP                  as CalcObject           (Brief = "External Physical Properties");
     36outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
     37outer PP                as Plugin                       (Brief = "External Physical Properties", Type="PP");
    3838        Mw(NComp)       as molweight            (Brief = "Molar Weight");
    3939        Eff     as positive                     (Default = 0.72, Brief = "Pump efficiency");
    4040        Meff    as positive                     (Default = 1.0, Brief = "Brake efficiency");
    41         Beta    as positive                     (Default = 0, Brief = "Volumetric expansivity", Unit = "1/K");
     41        Beta    as positive                     (Default = 0, Brief = "Volumetric expansivity", Unit = '1/K');
    4242       
    4343       
     
    5050        Pratio  as positive                     (Brief = "Pressure Ratio");     
    5151        Mwm     as molweight            (Brief = "Mixture Molar Weight");
    52         rho             as dens_mass            (Brief = "Specific Mass", Unit="kg/m^3");
     52        rho             as dens_mass            (Brief = "Specific Mass", Unit='kg/m^3');
    5353        Cp              as cp_mol                       (Brief = "Heat Capacity");
    5454       
  • branches/newlanguage/eml/pressure_changers/valve.mso

    r109 r176  
    3737       
    3838
    39 Model valve_basic as flux_machine_basic_TP
    40        
    41         PARAMETERS
    42 ext PP                  as CalcObject   (Brief = "External Physical Properties", File = "vrpp");
    43 ext NComp       as Integer              (Brief = "Number of chemical components", Lower = 1);
     39Model valve_basic as flux_machine_basic_PH
     40       
     41        PARAMETERS
     42outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
     43outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
    4444        rho60F  as dens_mass;
    4545
    4646        VARIABLES
    47         Pdiff   as press_delta          (Brief = "Pressure Increase", Unit = "kPa");
     47        Pdiff   as press_delta          (Brief = "Pressure Increase", Unit = 'kPa');
    4848        Qv              as flow_vol                     (Brief = "Volumetric Flow");
    4949        fc              as positive                     (Brief = "Opening Function");
    50         cv              as positive                     (Brief = "Valve Coefficient", Unit = "m^3/h/kPa^0.5");
     50        cv              as positive                     (Brief = "Valve Coefficient", Unit = 'm^3/h/kPa^0.5');
    5151        Gf              as positive                     (Brief = "Specific Gravity");
    5252        rho     as dens_mass;   
    53         vm              as vol_mol                      (Brief = "Mixture Molar Volume", Unit = "m^3/kmol");   
     53        vm              as vol_mol                      (Brief = "Mixture Molar Volume", Unit = 'm^3/kmol');   
    5454       
    5555        SET
    56         rho60F = 999.2  * "kg/m^3";
     56        rho60F = 999.2  * 'kg/m^3';
    5757       
    5858        EQUATIONS
     
    7474        else
    7575                "Valve Equation - Closed"
    76                 Qv = 0 * "m^3/h";
     76                Qv = 0 * 'm^3/h';
    7777        end
    7878       
     
    178178Model valve
    179179        PARAMETERS
    180 ext PP as CalcObject;
    181 ext NComp as Integer;
     180outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
     181outer NComp as Integer;
    182182       
    183183        VARIABLES
    184184in      Inlet as stream;
    185 out     Outlet as stream_therm;
     185out     Outlet as streamPH;
    186186        x as fraction (Brief="Plug Position");
    187187        rho as dens_mass (Brief="Fluid Density", Default=1e3);
     
    190190        PARAMETERS
    191191        rho_ref as dens_mass (Brief="Reference Density", Default=1e4);
    192         k as Real (Brief="Valve Constant", Unit="gal/min/psi^0.5");
     192        k as Real (Brief="Valve Constant", Unit='gal/min/psi^0.5');
    193193
    194194        EQUATIONS
     
    200200        Inlet.h = Outlet.h;
    201201
    202         "Vapourisation Fraction"
    203         Outlet.v = Inlet.v;
     202#       "Vapourisation Fraction"
     203#       Outlet.v = Inlet.v;
    204204       
    205205        "Density"
     
    216216        else
    217217                "Closed"
    218                 Outlet.F = 0 * "kmol/h";
     218                Outlet.F = 0 * 'kmol/h';
    219219        end
    220220end
  • branches/newlanguage/eml/reactors/pfr.mso

    r170 r176  
    3939PARAMETERS
    4040
    41 outer PP                                                        as Plugin               (Brief = "External Physical Properties");
     41outer PP                                                        as Plugin               (Brief = "External Physical Properties", Type="PP");
    4242outer   NComp                                           as Integer              (Brief="Number of components");
    4343                NReac                                           as Integer              (Brief="Number of reactions");
  • branches/newlanguage/eml/stage_separators/batch_dist.mso

    r72 r176  
    4848       
    4949        PARAMETERS
    50 ext PP          as CalcObject   (Brief = "External Physical Properties");
    51 ext NComp       as Integer              (Brief = "Number of chemical components", Lower = 1);
     50outer PP                as Plugin       (Brief = "External Physical Properties", Type="PP");
     51outer NComp     as Integer      (Brief = "Number of chemical components", Lower = 1);
    5252        Across  as area                 (Brief="Cross Section Area");
    5353        V               as volume               (Brief="Total volume");
    5454       
    5555        VARIABLES
    56 in      Inlet   as stream;              #(Brief="Feed stream");
    57 in      InletL  as stream;              #(Brief="Liquid inlet stream");
    58 out     OutletV as stream_therm; #(Brief="Vapour outlet stream");
     56in      Inlet   as stream (Brief="Feed stream");
     57in      InletL  as stream (Brief="Liquid inlet stream");
     58out     OutletV as vapour_stream (Brief="Vapour outlet stream");
    5959
    6060        M(NComp)        as mol                  (Brief="Molar Holdup in the distillator");
     
    111111        Level = ML*volL/Across;
    112112       
    113         "vaporization fraction "
    114         OutletV.v = 1.0;
    115        
    116113        "Enthalpy"
    117114        h = PP.LiquidEnthalpy(T, P, x);
  • branches/newlanguage/eml/stage_separators/column.mso

    r125 r176  
    6464        trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    6565            (trays([top:topdown:bot]).OutletV.P -
    66             trays([top:topdown:bot]).InletL.P)/"Pa"))/2 *
     66            trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    6767            trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    6868            sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    69                 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") /
     69                trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    7070            (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    7171
     
    111111        else
    112112                "No flow in reboiler"
    113                 reb.OutletV.F = 0.0 * "mol/s";
     113                reb.OutletV.F = 0.0 * 'mol/s';
    114114        end
    115115
    116116        "Pressure Drop through the tray"
    117         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 *
     117        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    118118                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    119                 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     119                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    120120               
    121121        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    122122            (trays([top+topdown:topdown:bot]).OutletV.P -
    123             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     123            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    124124            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    125125            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    126                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     126                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    127127            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    128128
     
    185185        else
    186186                "No flow in reboiler"
    187                 reb.OutletV.F = 0.0 * "mol/s";
     187                reb.OutletV.F = 0.0 * 'mol/s';
    188188        end     
    189189       
    190190        "Pressure Drop through the tray"
    191         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 *
     191        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    192192                trays(top).Ah/trays(top).vV /2* sqrt(2*(trays(top).OutletV.P -
    193                 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     193                ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    194194               
    195195        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    196196            (trays([top+topdown:topdown:bot]).OutletV.P -
    197             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     197            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    198198            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV /2*
    199199            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    200                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     200                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    201201            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    202202       
     
    260260        else
    261261                "No flow in reboiler"
    262                 reb.OutletV.F = 0.0 * "mol/s";
     262                reb.OutletV.F = 0.0 * 'mol/s';
    263263        end
    264264
    265265        "Pressure Drop through the tray"
    266         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 *
     266        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    267267                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    268                 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     268                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    269269               
    270270        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    271271            (trays([top+topdown:topdown:bot]).OutletV.P -
    272             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     272            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    273273            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    274274            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    275                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     275                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    276276            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    277277                       
     
    331331        else
    332332                "No flow in reboiler"
    333                 reb.OutletV.F = 0.0 * "mol/s";
     333                reb.OutletV.F = 0.0 * 'mol/s';
    334334        end
    335335
    336336        "Pressure Drop through the tray"
    337         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 *
     337        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    338338                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    339                 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     339                ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    340340               
    341341        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    342342            (trays([top+topdown:topdown:bot]).OutletV.P -
    343             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     343            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    344344            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    345345            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    346                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     346                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    347347            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    348348       
     
    391391        EQUATIONS
    392392        "Pressure Drop through the tray"
    393         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 *
     393        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    394394                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    395                 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     395                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    396396               
    397397        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    398398            (trays([top+topdown:topdown:bot]).OutletV.P -
    399             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     399            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    400400            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    401401            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    402                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     402                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    403403            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    404404       
     
    448448        EQUATIONS
    449449        "Pressure Drop through the tray"
    450         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 *
     450        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    451451                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    452                 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     452                ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    453453               
    454454        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    455455            (trays([top+topdown:topdown:bot]).OutletV.P -
    456             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     456            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    457457            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    458458            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    459                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     459                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    460460            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    461461       
     
    502502        EQUATIONS
    503503        "Pressure Drop through the tray"
    504         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 *
     504        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    505505                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    506                 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     506                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    507507               
    508508        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    509509            (trays([top+topdown:topdown:bot]).OutletV.P -
    510             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     510            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    511511            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    512512            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    513                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     513                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    514514            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    515515       
     
    559559        EQUATIONS
    560560        "Pressure Drop through the tray"
    561         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 *
     561        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    562562                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    563                 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     563                ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    564564               
    565565        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    566566            (trays([top+topdown:topdown:bot]).OutletV.P -
    567             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     567            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    568568            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    569569            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    570                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     570                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    571571            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    572572       
     
    613613        EQUATIONS
    614614        "Pressure Drop through the tray"
    615         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 *
     615        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    616616                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    617                 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     617                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    618618               
    619619        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    620620            (trays([top+topdown:topdown:bot]).OutletV.P -
    621             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     621            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    622622            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    623623            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    624                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     624                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    625625            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    626626       
     
    671671        EQUATIONS
    672672        "Pressure Drop through the tray"
    673         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 *
     673        trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    674674                trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    675                 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV));
     675                ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    676676               
    677677        trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    678678            (trays([top+topdown:topdown:bot]).OutletV.P -
    679             trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 *
     679            trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    680680            trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    681681            sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    682                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") /
     682                trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    683683            (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    684684       
     
    728728        else
    729729                "Prato selado"
    730                 reb.OutletV.F = 0.0 * "mol/s";
     730                reb.OutletV.F = 0.0 * 'mol/s';
    731731        end
    732732
     
    734734        trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    735735            (trays([top:topdown:bot]).OutletV.P -
    736             trays([top:topdown:bot]).InletL.P)/"Pa"))/2 *
     736            trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    737737            trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    738738            sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    739                 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") /
     739                trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    740740            (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    741741       
     
    786786        else
    787787                "Prato selado"
    788                 reb.OutletV.F = 0.0 * "mol/s";
     788                reb.OutletV.F = 0.0 * 'mol/s';
    789789        end
    790790
     
    792792        trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    793793            (trays([top:topdown:bot]).OutletV.P -
    794             trays([top:topdown:bot]).InletL.P)/"Pa"))/2 *
     794            trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    795795            trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    796796            sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    797                 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") /
     797                trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    798798            (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    799799       
     
    842842        else
    843843                "Prato selado"
    844                 reb.OutletV.F = 0.0 * "mol/s";
     844                reb.OutletV.F = 0.0 * 'mol/s';
    845845        end
    846846
     
    848848        trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    849849            (trays([top:topdown:bot]).OutletV.P -
    850             trays([top:topdown:bot]).InletL.P)/"Pa"))/2 *
     850            trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    851851            trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    852852            sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    853                 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") /
     853                trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    854854            (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    855855       
     
    900900        else
    901901                "Prato selado"
    902                 reb.OutletV.F = 0.0 * "mol/s";
     902                reb.OutletV.F = 0.0 * 'mol/s';
    903903        end
    904904
     
    906906        trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    907907            (trays([top:topdown:bot]).OutletV.P -
    908             trays([top:topdown:bot]).InletL.P)/"Pa"))/2 *
     908            trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    909909            trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    910910            sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    911                 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") /
     911                trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    912912            (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    913913       
     
    942942       
    943943        EQUATIONS
    944         if ( reb.OutletV.P > 1 * "atm" ) then
     944        if ( reb.OutletV.P > 1 * 'atm' ) then
    945945                "Pressure Drop through the tray"
    946                 reb.OutletV.F = trays(1).Ah/reb.vV * sqrt((reb.OutletV.P - 1*"atm") / (0.15*reb.rhoV) );
     946                reb.OutletV.F = trays(1).Ah/reb.vV * sqrt((reb.OutletV.P - 1*'atm') / (0.15*reb.rhoV) );
    947947        else
    948948                "Prato selado"
    949                 reb.OutletV.F = 0.0 * "mol/s";
     949                reb.OutletV.F = 0.0 * 'mol/s';
    950950        end
    951951       
  • branches/newlanguage/eml/stage_separators/condenser.mso

    r125 r176  
    161161        Q as heat_rate (Brief="Heat supplied");
    162162        Vol as volume;
    163         r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s");
     163        r as reaction_mol (Brief = "Reaction rate", Unit = 'mol/l/s');
    164164        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
    165165
  • branches/newlanguage/eml/stage_separators/flashPH.mso

    r101 r176  
    3838Model FlashPHSteady
    3939        PARAMETERS
    40 ext PP as CalcObject;
    41 ext NComp as Integer;
     40outer PP as Plugin;
     41outer NComp as Integer;
    4242        B as Real(Default=1000, Brief="Regularization Factor");
    43        
     43
    4444        VARIABLES
    45 in      Inlet as stream; #(Brief="Feed Stream");
    46 out     OutletL as stream_therm; #(Brief="Liquid outlet stream");
    47 out     OutletV as stream_therm; #(Brief="Vapour outlet stream");
     45in      Inlet as stream (Brief="Feed Stream");
     46out     OutletL as liquid_stream (Brief="Liquid outlet stream");
     47out     OutletV as vapour_stream (Brief="Vapour outlet stream");
    4848in      Q as heat_rate (Brief="Rate of heat supply");
    4949        vfrac as fraction(Brief="Real vaporization fraction");
     
    8484        OutletV.P = OutletL.P;
    8585       
    86         "vaporization fraction "
    87         OutletV.v = 1.0;
    88         "vaporization fraction "
    89         OutletL.v = 0.0;
    90        
    9186        # regularization functions
    9287        zero_one = (1 + tanh(B * vsat))/2;
  • branches/newlanguage/eml/stage_separators/reboiler.mso

    r125 r176  
    158158        outer NComp as Integer;
    159159        DP as press_delta (Brief="Pressure Drop in the reboiler");
    160         k as Real (Brief = "Flow Constant", Unit="mol/J");
     160        k as Real (Brief = "Flow Constant", Unit='mol/J');
    161161       
    162162        VARIABLES
     
    180180       
    181181        "Fake output temperature"
    182         OutletV.T = 300*"K";
     182        OutletV.T = 300*'K';
    183183       
    184184        "Pressure Drop through the reboiler"
     
    217217        startup as Real;
    218218        rhoV as dens_mass;
    219         r as reaction_mol (Brief = "Reaction resulting ethyl acetate", Unit = "mol/l/s");
     219        r as reaction_mol (Brief = "Reaction resulting ethyl acetate", Unit = 'mol/l/s');
    220220        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
    221221
  • branches/newlanguage/eml/stage_separators/tray.mso

    r124 r176  
    197197        rhoL as dens_mass;
    198198        rhoV as dens_mass;
    199         r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s");
     199        r as reaction_mol (Brief = "Reaction rate", Unit = 'mol/l/s');
    200200        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
    201201       
     
    248248        if Level > (beta * hw) then
    249249                "Francis Equation"
    250                 OutletL.F = (1.84*"1/s"*lw*((Level-(beta*hw))/(beta))^2/vL);
     250                OutletL.F = (1.84/'s'*lw*((Level-(beta*hw))/(beta))^2/vL);
    251251        else
    252252                "Low level"
    253                 OutletL.F = 0 * "mol/h";
     253                OutletL.F = 0 * 'mol/h';
    254254        end
    255255
    256256               
    257257        "Pressure Drop through the tray"
    258         OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/"Pa"))/2 *
    259                 Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * "atm") / (alfa*rhoV) );
     258        OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/'Pa'))/2 *
     259                Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * 'atm') / (alfa*rhoV) );
    260260       
    261261
  • branches/newlanguage/sample/miscellaneous/sample_arrays.mso

    r125 r176  
    3131        EQUATIONS
    3232        for i in [1 : Dimension]
    33                 diff(Var1(1,i)) = Var2(1,i)/"s";
     33                diff(Var1(1,i)) = Var2(1,i)/'s';
    3434        end
    3535
    36         diff(Var1(2:Dimension,:)) * "s" = Scalar*Var2(2:Dimension,:);
     36        diff(Var1(2:Dimension,:)) * 's' = Scalar*Var2(2:Dimension,:);
    3737
    38         exp(Scalar)*Var2 = sin(time * "180*grad/s");
     38        exp(Scalar)*Var2 = sin(time * '180*grad/s');
    3939end
    4040
  • branches/newlanguage/sample/miscellaneous/sample_arrays2.mso

    r83 r176  
    3030        EQUATIONS
    3131
    32         diff(Var1(1,1))*"s" = Var2(1,2);
     32        diff(Var1(1,1))*'s' = Var2(1,2);
    3333       
    3434        for i in [2 : Dimension-1]
    35                 diff(Var1(1,i))*"s" = Var2(1,i-1)+Var2(1,i+1);
     35                diff(Var1(1,i))*'s' = Var2(1,i-1)+Var2(1,i+1);
    3636        end
    3737
    38         diff(Var1(1,Dimension))*"s" = Var2(1,Dimension);
    39         diff(Var1(2:Dimension,:))*"s" = Scalar*Var2(2:Dimension,:);
     38        diff(Var1(1,Dimension))*'s' = Var2(1,Dimension);
     39        diff(Var1(2:Dimension,:))*'s' = Scalar*Var2(2:Dimension,:);
    4040
    41         exp(Scalar)*Var2 = sin(time/"s");
     41        exp(Scalar)*Var2 = sin(time*'rad/s');
    4242end
    4343
     
    5151
    5252        OPTIONS
    53         time = [0:0.1:2*3.1415];
     53        TimeStep = 0.1;
     54        TimeEnd = 2*3.1415;
    5455end
  • branches/newlanguage/sample/miscellaneous/sample_bc.mso

    r83 r176  
    4747        EQUATIONS
    4848                "Balanço no Prato 0"
    49                 diff(H0)*"s" = -V/(R+1);
    50                 diff(x1(1))*"s" = V/H0 * (x1(1)-y1(1) + R * ((x1(2) - x1(1))/(R+1)));
     49                diff(H0)*'s' = -V/(R+1);
     50                diff(x1(1))*'s' = V/H0 * (x1(1)-y1(1) + R * ((x1(2) - x1(1))/(R+1)));
    5151       
    5252                "Balanço demais pratos"
    53                 diff(x1(2:Np))*"s" = V/Hi * (y1(1:Np-1) - y1(2:Np) + (R * ( x1(3:Np+1) - x1(2:Np) ) / (R+1)));
     53                diff(x1(2:Np))*'s' = V/Hi * (y1(1:Np-1) - y1(2:Np) + (R * ( x1(3:Np+1) - x1(2:Np) ) / (R+1)));
    5454
    5555                "Balanço último prato"
    56                 diff(x1(Np+1))*"s" = V * ( y1(Np) - x1(Np+1) )/Hi;
     56                diff(x1(Np+1))*'s' = V * ( y1(Np) - x1(Np+1) )/Hi;
    5757
    5858                x1  = 1 - x2;
     
    8686
    8787        OPTIONS
    88                 time = [0:0.01:0.1, 0.2:0.1:2.1];
    89                 integration = "index0"; #original, index0 or index 1
    90                 relativeAccuracy = 1e-6;
    91                 absoluteAccuracy = 1e-8;
     88                #time = [0:0.01:0.1, 0.2:0.1:2.1];
     89                TimeStep = 0.01;
     90                TimeEnd = 2.1;
     91                #integration = "index0"; #original, index0 or index 1
     92                RelativeAccuracy = 1e-6;
     93                AbsoluteAccuracy = 1e-8;
    9294                DAESolver = "dasslc"; # "mebdf"
    9395end
  • branches/newlanguage/sample/miscellaneous/sample_calc_object.mso

    r83 r176  
    2828Model CalcBasic
    2929        PARAMETERS
    30 ext NoComps as Integer;
     30outer NoComps as Integer;
    3131        VARIABLES
    3232        T    as temperature;
     
    3434        z(NoComps) as fraction;
    3535       
    36         r1 as Real(Unit="K*K");
    37         r2 as Real(Unit="atm*K");
     36        r1 as Real(Unit='K*K');
     37        r2 as Real(Unit='atm*K');
    3838        r3 as Real;
    3939end
     
    4545Model Calc as CalcBasic
    4646        PARAMETERS
    47 ext     obj as CalcObject;
     47outer obj as Plugin;
    4848
    4949        EQUATIONS
     
    7676FlowSheet CalcTest
    7777        PARAMETERS
    78         obj     as CalcObject(File = "calcsample");
     78        obj     as Plugin(File = "calcsample");
    7979        NoComps as Integer(Default = 5);
    8080       
     
    8484       
    8585        SPECIFY
    86         #calc1.T = 100 * "K";
    87         #calc1.P = 100 * "Pa";
     86        #calc1.T = 100 * 'K';
     87        #calc1.P = 100 * 'Pa';
    8888        calc1.z(1:NoComps-1) = 1/NoComps;
    89         calc1.r1 = 20000 * "K*K";
    90         calc1.r2 = 10000 * "Pa*K";
     89        calc1.r1 = 20000 * 'K*K';
     90        calc1.r2 = 10000 * 'Pa*K';
    9191        calc1.r3 = 1;
    9292       
    93         #calc2.T = 100 * "K";
    94         #calc2.P = 100 * "Pa";
     93        #calc2.T = 100 * 'K';
     94        #calc2.P = 100 * 'Pa';
    9595        calc2.z(1:NoComps-1) = 1/NoComps;
    96         calc2.r1 = 20000 * "K*K";
    97         calc2.r2 = 10000 * "Pa*K";
     96        calc2.r1 = 20000 * 'K*K';
     97        calc2.r2 = 10000 * 'Pa*K';
    9898        calc2.r3 = 1;
    9999
    100100        OPTIONS
    101         relativeAccuracy = 1e-6;
     101        RelativeAccuracy = 1e-6;
    102102        #mode = "steady";
    103103end
     
    116116       
    117117        SPECIFY
    118         #calc2.T = 100 * "K";
    119         #calc2.P = 100 * "Pa";
     118        #calc2.T = 100 * 'K';
     119        #calc2.P = 100 * 'Pa';
    120120        calc2.z(1:NoComps-1) = 1/NoComps;
    121         calc2.r1 = 20000 * "K*K";
    122         calc2.r2 = 10000 * "Pa*K";
     121        calc2.r1 = 20000 * 'K*K';
     122        calc2.r2 = 10000 * 'Pa*K';
    123123        calc2.r3 = 1;
    124124       
    125125        OPTIONS
    126         relativeAccuracy = 1e-6;
    127         mode = "steady";
     126        RelativeAccuracy = 1e-6;
     127        Dynamic = false;
    128128end
    129 
  • branches/newlanguage/sample/miscellaneous/sample_car.mso

    r83 r176  
    8383       
    8484        OPTIONS
    85         time = [0:0.01:3];
    86         integration = "index0"; # "original";
     85        TimeStart = 0;
     86        TimeStep = 0.01;
     87        TimeEnd = 3;
     88        #integration = "index0"; # "original";
    8789        #DAESolver = "mebdf";
    8890
    89         relativeAccuracy = 1e-5;
    90         absoluteAccuracy = 1e-5;
    91         indVarAccuracy = 1e-3;
     91        RelativeAccuracy = 1e-5;
     92        AbsoluteAccuracy = 1e-5;
     93        #indVarAccuracy = 1e-3;
    9294end
  • branches/newlanguage/sample/miscellaneous/sample_cstr_simple.mso

    r83 r176  
    3636        k0 as frequency;
    3737        Ea as energy_mol (Brief = "Energia de Ativação");
    38         R  as energy_mol;
     38        R  as entr_mol;
    3939       
    4040        VARIABLES
     
    4848        rA as reaction_mol;
    4949        rB as reaction_mol;
    50         Cps as cp_mol; # (Unit="cal/mol/K");
     50        Cps as cp_mol; # (Unit='cal/mol/K');
    5151        T0 as temperature;
    5252       
     
    5757       
    5858        "Constante de Reação"
    59         k=k0*exp(Ea/R*(1/436.15 - 1*"K"/T));
     59        k=k0*exp(Ea/R*(1/(436.15*'K') - 1/T));
    6060       
    6161        "Taxas de Reação"
     
    6464       
    6565        "Calor de Reação"
    66         HR=-(80*250)*"cal/mol";
     66        HR=-(80*250)*'cal/mol';
    6767       
    6868        "Cp da mistura"
    69         Cps=(0.5*250)*3;# *"cal/mol/K";
     69        Cps=(0.5*250)*3*'J/mol/K';
    7070       
    7171        "Balanço de Energia"
     
    8282       
    8383        "Temperatura da corrente de alimentação"
    84         T0= (40 + 273.15 + time*200/1000/"s") * "K";
     84        T0= (40 + 273.15 + time*200/1000/'s') * 'K';
    8585       
    8686        SET
    87         Fin = 0.125997903*"m^3/h";
    88         Fout = 0.125997903*"m^3/h";
    89         CA0=9.3652352*"mol/m^3";
    90         CB0=0*"mol/m^3";
     87        Fin = 0.125997903*'m^3/h';
     88        Fout = 0.125997903*'m^3/h';
     89        CA0=9.3652352*'mol/m^3';
     90        CB0=0*'mol/m^3';
    9191        FA0 = Fin*CA0;
    9292        FB0 = Fin*CB0;
    93         Tw = (140+273)*"K";
    94         k0=0.8*"1/h"; #constante para T=436.15 K
    95         Ea=28960*"cal/mol";
    96         R=1.98*"cal/mol/K";
    97         U = 0 *"cal/m^2/K/s";#isolado
    98         A = 1*"m^2";
     93        Tw = (140+273)*'K';
     94        k0=0.8*'1/h'; #constante para T=436.15 K
     95        Ea=28960*'cal/mol';
     96        R=1.98*'cal/mol/K';
     97        U = 0 *'cal/m^2/K/s';#isolado
     98        A = 1*'m^2';
    9999       
    100100        INITIAL
    101         T = (140 + 273) * "K";
    102         V = 0.9*6*"m^3";
    103         CA = 2*"mol/m^3";
    104         CB = 6*"mol/m^3";
     101        T = (140 + 273) * 'K';
     102        V = 0.9*6*'m^3';
     103        CA = 2*'mol/m^3';
     104        CB = 6*'mol/m^3';
    105105       
    106106        OPTIONS
    107         time = [0:10:1200];
     107        TimeStep = 10;
     108        TimeEnd = 1200;
    108109end
  • branches/newlanguage/sample/stage_separators/sample_flash.mso

    r124 r176  
    4949       
    5050        EQUATIONS
    51         fl.OutletL.F = 400*sqrt(fl.Level/"m") * "kmol/h";
     51        fl.OutletL.F = 400*sqrt(fl.Level/'m') * 'kmol/h';
    5252       
    5353        SPECIFY
    54         s1.Outlet.F = 496.3 * "kmol/h";
    55         s1.Outlet.T = 338 * "K";
    56         s1.Outlet.P = 507.1 * "kPa";
     54        s1.Outlet.F = 496.3 * 'kmol/h';
     55        s1.Outlet.T = 338 * 'K';
     56        s1.Outlet.P = 507.1 * 'kPa';
    5757        #s1.Outlet.v = 0.1380;
    5858        s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283];
    5959
    60         fl.OutletV.F = 68.5 * "kmol/h";
    61         Q = 0 * "kJ/h";
     60        fl.OutletV.F = 68.5 * 'kmol/h';
     61        Q = 0 * 'kJ/h';
    6262       
    6363        SET
    64         fl.V = 2000 * "m^3";
    65         fl.Across = 1 * "m^2";
     64        fl.V = 2000 * 'm^3';
     65        fl.Across = 1 * 'm^2';
    6666       
    6767        INITIAL
    68         fl.OutletL.T = 338 *"K";
    69         fl.Level = 1 * "m";
     68        fl.OutletL.T = 338 * 'K';
     69        fl.Level = 1 * 'm';
    7070
    7171        fl.OutletL.z(1) = 0.1;
     
    8181        TimeStep = 0.1;
    8282        TimeEnd = 20;
    83         TimeUnit = "h";
     83        TimeUnit = 'h';
    8484end
    8585
     
    108108       
    109109        SPECIFY
    110         s1.Outlet.F = 496.3 * "kmol/h";
    111         s1.Outlet.T = 338 * "K";
    112         s1.Outlet.P = 507.1 * "kPa";
     110        s1.Outlet.F = 496.3 * 'kmol/h';
     111        s1.Outlet.T = 338 * 'K';
     112        s1.Outlet.P = 507.1 * 'kPa';
    113113        #s1.Outlet.v = 0.1380;
    114114        s1.Outlet.z = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
    115115       
    116         fl.OutletL.P = 2.5 * "atm";
     116        fl.OutletL.P = 2.5 * 'atm';
    117117
    118         #Q = 0 * "kJ/h";
    119         fl.OutletL.T = 315.06 * "K";
     118        #Q = 0 * 'kJ/h';
     119        fl.OutletL.T = 315.06 * 'K';
    120120       
    121121        OPTIONS
Note: See TracChangeset for help on using the changeset viewer.