Changeset 124


Ignore:
Timestamp:
Jan 19, 2007, 3:54:55 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Updated some models using if conditions

Location:
branches/newlanguage
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/stage_separators/tray.mso

    r103 r124  
    5656
    5757        PARAMETERS
    58 ext PP as CalcObject;
    59 ext NComp as Integer;
     58        outer PP as Plugin;
     59        outer NComp as Integer;
    6060        V as volume(Brief="Total Volume of the tray");
    6161        Q as heat_rate (Brief="Rate of heat supply");
     
    6666in      InletL as stream;
    6767in      InletV as stream;
    68 out     OutletL as stream_therm;
    69 out     OutletV as stream_therm;
     68out     OutletL as liquid_stream;
     69out     OutletV as vapour_stream;
    7070
    7171        M(NComp) as mol (Brief="Molar Holdup in the tray");
     
    119119        V = ML* vL + MV*vV;
    120120       
    121         "vaporization fraction "
    122         OutletV.v = 1.0;
    123         OutletL.v = 0.0;
    124        
    125121        "Level of clear liquid over the weir"
    126122        Level = ML*vL/Ap;
     
    147143        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
    148144
    149         if (Level > (beta * hw)) then
     145        if Level > (beta * hw) then
    150146                "Francis Equation"
    151147                OutletL.F = 1.84*"m^0.5/s"*lw*((Level-(beta*hw))/(beta))^2/vL;
     
    163159
    164160        PARAMETERS
    165 ext PP as CalcObject;
    166 ext NComp as Integer;
     161        outer PP as Plugin;
     162        outer NComp as Integer;
    167163        V as volume(Brief="Total Volume of the tray");
    168164        Q as power (Brief="Rate of heat supply");
     
    184180in      InletL as stream;
    185181in      InletV as stream;
    186 out     OutletL as stream_therm;
    187 out     OutletV as stream_therm;
     182out     OutletL as liquid_stream;
     183out     OutletV as vapour_stream;
    188184
    189185        yideal(NComp) as fraction;
     
    250246        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
    251247
    252         if (Level > (beta * hw)) then
     248        if Level > (beta * hw) then
    253249                "Francis Equation"
    254250                OutletL.F = (1.84*"1/s"*lw*((Level-(beta*hw))/(beta))^2/vL);
  • branches/newlanguage/eml/streams.mso

    r123 r124  
    111111end
    112112
    113 Model sink2
    114         VARIABLES
    115         in Inlet as stream;
    116 end
    117 
    118113Model sink
    119114        ATTRIBUTES
  • branches/newlanguage/sample/miscellaneous/sample_if.mso

    r83 r124  
    4545        y = 0;
    4646       
    47         OPTIONS
    48         time = [0:0.01:10];
    4947end
    5048
  • branches/newlanguage/sample/stage_separators/sample_flash.mso

    r123 r124  
    6868        fl.OutletL.T = 338 *"K";
    6969        fl.Level = 1 * "m";
     70
    7071        fl.OutletL.z(1) = 0.1;
    7172        fl.OutletL.z(2) = 0.1;
  • branches/newlanguage/sample/stage_separators/sample_stream.mso

    r123 r124  
    3939        DEVICES
    4040        s1 as source;
    41         s2 as sink2;
     41        s2 as sink;
    4242       
    4343        CONNECTIONS
     
    5252
    5353        OPTIONS
    54         RelativeAccuracy = 1e-7;
    55         AbsoluteAccuracy = 1e-9;
     54        RelativeAccuracy = 1e-4;
     55        AbsoluteAccuracy = 1e-8;
    5656        Dynamic = false;
    5757        TimeStep = 0.1;
Note: See TracChangeset for help on using the changeset viewer.