Changeset 311


Ignore:
Timestamp:
Jul 13, 2007, 9:17:11 PM (15 years ago)
Author:
Argimiro Resende Secchi
Message:

Creating simple source and sink devices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/streams.mso

    r310 r311  
    203203end
    204204
     205Model simple_source
     206        ATTRIBUTES
     207        Icon = "icon/Source";
     208        Brief = "Simple material stream source";
     209        Info = "
     210        This model should be used for boundary streams.
     211        Usually these streams are known and come from another process
     212        units.
     213
     214        The user should specify:
     215         * Total molar flow
     216         * Temperature
     217         * Pressure
     218         * Molar composition
     219        ";
     220
     221        PARAMETERS
     222        outer PP                        as Plugin               (Brief = "External Physical Properties", Type="PP");
     223        outer NComp             as Integer              (Brief = "Number of chemical components", Lower = 1);
     224       
     225        VARIABLES
     226        out Outlet                      as stream;
     227        x(NComp)                        as fraction                     (Brief = "Liquid Molar Fraction");
     228        y(NComp)                        as fraction                     (Brief = "Vapour Molar Fraction");
     229        hl                                      as enth_mol;
     230        hv                                      as enth_mol;
     231       
     232        EQUATIONS
     233        "Flash Calculation"
     234        [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z);
     235       
     236        "Overall Enthalpy"
     237        Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +
     238                Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
     239
     240        hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);
     241        hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
     242end
     243
    205244Model sink
    206245        ATTRIBUTES
     
    278317end
    279318
     319Model simple_sink
     320        ATTRIBUTES
     321        Icon = "icon/Sink";
     322        Brief = "Simple material stream sink";
     323        Info = "
     324        This model should be used for boundary streams when no additional
     325        information about the stream is desired.
     326        ";
     327       
     328        VARIABLES
     329        in Inlet                as stream;
     330end
     331
    280332Model energy_stream
    281333        ATTRIBUTES
Note: See TracChangeset for help on using the changeset viewer.