Ignore:
Timestamp:
Jul 18, 2007, 3:50:58 PM (16 years ago)
Author:
gerson bicca
Message:

modified heater/cooler model: included energy stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/heat_exchangers/heater.mso

    r307 r316  
    1919using "streams.mso";
    2020
    21 Model Heater_Cooler_Basic
     21Model heater
    2222
    2323ATTRIBUTES
    24         Pallete         = false;
    25         Brief           = "Heater or Cooler Basic Equations";
     24        Pallete         = true;
     25        Icon            = "icon/heater";       
     26        Brief   = "Heater or Cooler";
    2627        Info            =
    27         "Determines thermal and phase conditions of outlet stream";
     28        "Determines thermal and phase conditions of an outlet stream";
    2829       
    2930PARAMETERS
    30         outer PP                as Plugin               (Brief="Physical Properties", Type="PP");
    31         outer   NComp   as Integer              (Brief="Number of Components");
    32         Ninlet                          as Integer              (Brief="Number of Inlet Streams",Lower=1);
     31        outer PP                        as Plugin               (Brief="Physical Properties", Type="PP");
     32        outer NComp     as Integer      (Brief="Number of Components");
     33                        Ninlet          as Integer      (Brief="Number of Inlet Streams");
    3334       
     35SUBMODELS
     36        in  Inlet(Ninlet )  as stream                           (Brief="Inlet Streams");
     37        out Outlet              as streamPH                             (Brief="Outlet Stream");
     38        in InletHeat            as energy_stream                (Brief ="Inlet Heat Stream");
     39        out OutletHeat  as energy_stream                (Brief ="Outlet Heat Stream");
     40
    3441VARIABLES
    35         in  Inlet(Ninlet)       as stream                       (Brief="Inlet Streams");
    36         out Outlet              as streamPH             (Brief="Outlet Stream");
    37         Q                                       as power                        (Brief = "Heat Transfer");
    38         Vfrac                                   as fraction                     (Brief = "Vapor fraction Outlet Stream");
    39         Lfrac                                   as fraction                     (Brief = "Liquid fraction Outlet Stream");
     42        QDuty                                   as power                        (Brief = "Actual Duty");
     43        Vfrac                                   as fraction             (Brief = "Vapor fraction Outlet Stream");
     44        Lfrac                                           as fraction             (Brief = "Liquid fraction Outlet Stream");
     45        Kvalue(NComp)   as Real                         (Brief = "Phase Equilibrium K-values");
    4046       
    4147EQUATIONS
     
    4349"Flow"
    4450        Outlet.F = sum(Inlet.F);       
    45        
     51
    4652for j in [1 : NComp]
    4753       
     
    5662"Liquid fraction Outlet Stream"
    5763        Lfrac = 1-Vfrac;
    58        
     64
     65"Heat Duty"
     66        QDuty = Outlet.F*Outlet.h - sum(Inlet.F*Inlet.h);
     67
     68"Net Duty"
     69        OutletHeat.Q = InletHeat.Q - QDuty;
     70
     71"Phase Equilibrium"
     72        Kvalue*(Outlet.x) = Outlet.y;
     73
    5974end
    6075
    61 Model heater            as Heater_Cooler_Basic
    62 
    63 ATTRIBUTES
    64         Pallete         = true;
    65         Icon = "icon/heater";   
    66         Brief           = "Model of a Heater";
    67         Info            =
    68         "This model determines thermal and phase conditions of outlet stream";
    69        
    70 EQUATIONS
    71 
    72 "Heat Duty"
    73         Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
    74        
    75 end
    76 
    77 Model cooler            as Heater_Cooler_Basic
    78        
    79 ATTRIBUTES
    80         Pallete         = true;
    81         Icon = "icon/cooler";   
    82         Brief           = "Model of a Cooler";
    83         Info            =
    84         "This model determines thermal and phase conditions of outlet stream";
    85        
    86 EQUATIONS
    87 
    88 "Heat Duty"
    89         Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
    90        
    91 end
Note: See TracChangeset for help on using the changeset viewer.