Changeset 123 for branches


Ignore:
Timestamp:
Jan 19, 2007, 12:03:14 PM (16 years ago)
Author:
Rafael de Pelegrini Soares
Message:

More stream and flash updates

Location:
branches/newlanguage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/streams.mso

    r117 r123  
    2626        Pallete = false;
    2727        Brief = "General Material Stream";
    28         Documentation =
     28        Info =
    2929        "This is the basic building block for the EML models.
    3030        Every model should have input and output streams derived
     
    4747        Pallete = false;
    4848        Brief = "Liquid Material Stream";
    49         Documentation =
     49        Info =
    5050        "Model for liquid material streams.
    5151        This model should be used only when the phase of the stream
     
    6666        Pallete = false;
    6767        Brief = "Vapour Material Stream";
    68         Documentation =
     68        Info =
    6969        "Model for vapour material streams.
    7070        This model should be used only when the phase of the stream
     
    8383Model source
    8484        ATTRIBUTES
    85         Documentation =
     85        Info =
    8686        "Material stream source.
    8787        This model should be used for boundary streams.
     
    9797        x(NComp) as fraction(Brief = "Liquid Molar Fraction");
    9898        y(NComp) as fraction(Brief = "Vapour Molar Fraction");
     99        hl as enth_mol;
     100        hv as enth_mol;
    99101       
    100102        EQUATIONS
     
    104106        Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +
    105107                Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
     108       
     109        hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);
     110        hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
     111end
     112
     113Model sink2
     114        VARIABLES
     115        in Inlet as stream;
    106116end
    107117
    108118Model sink
    109119        ATTRIBUTES
    110         Documentation =
     120        Info =
    111121        "Material stream sink.
    112122        This model should be used for boundary streams.";
     
    124134        EQUATIONS
    125135        "Flash Calculation"
    126         [v, x, y] = PP.PHFlash(Inlet.P, Inlet.h, Inlet.z);
     136        [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z);
    127137end
  • branches/newlanguage/sample/stage_separators/sample_flash.mso

    r121 r123  
    5555        s1.Outlet.T = 338 * "K";
    5656        s1.Outlet.P = 507.1 * "kPa";
    57         #s1.v = 0.1380;
     57        #s1.Outlet.v = 0.1380;
    5858        s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283];
    5959
    6060        fl.OutletV.F = 68.5 * "kmol/h";
    61         Q = 1 * "kJ/h";
     61        Q = 0 * "kJ/h";
    6262       
    6363        SET
     
    6666       
    6767        INITIAL
    68         fl.OutletL.T = 330 *"K";
     68        fl.OutletL.T = 338 *"K";
    6969        fl.Level = 1 * "m";
    7070        fl.OutletL.z(1) = 0.1;
     
    7575       
    7676        OPTIONS
    77         RelativeAccuracy = 1e-7;
    78         AbsoluteAccuracy = 1e-9;
     77        RelativeAccuracy = 1e-4;
     78        AbsoluteAccuracy = 1e-8;
    7979        Dynamic = true;
    8080        TimeStep = 0.1;
  • branches/newlanguage/sample/stage_separators/sample_stream.mso

    r121 r123  
    3939        DEVICES
    4040        s1 as source;
     41        s2 as sink2;
     42       
     43        CONNECTIONS
     44        s1.Outlet to s2.Inlet;
    4145       
    4246        SPECIFY
    4347        s1.Outlet.F = 496.3 * "kmol/h";
    4448        s1.Outlet.T = 338 * "K";
    45         s1.Outlet.P = 507.1 * "kPa";
    46         #s1.v = 0.1380;
     49        #s1.Outlet.P = 507.1 * "kPa";
     50        s1.Outlet.v = 0.12;
    4751        s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283];
    4852
     
    5054        RelativeAccuracy = 1e-7;
    5155        AbsoluteAccuracy = 1e-9;
    52         Dynamic = true;
     56        Dynamic = false;
    5357        TimeStep = 0.1;
    5458        TimeEnd = 20;
Note: See TracChangeset for help on using the changeset viewer.