Ignore:
Timestamp:
Jan 25, 2007, 6:00:26 PM (15 years ago)
Author:
gerson bicca
Message:

updated models and samples for the new language

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/heat_exchangers/Mheatex.mso

    r131 r135  
    3434
    3535Model Inlet_Main_Stream         
    36 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    37 #       Inlet Streams
    38 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
     36
     37ATTRIBUTES
     38        Pallete = false;
     39        Brief = "Inlet material streams for Hot and Cold side";
     40        Info =
     41        "write some information";
     42       
    3943PARAMETERS
    4044
     
    4448VARIABLES
    4549
    46         Hot  (Nhot)     as stream;# Inlet Hot Streams
    47         Cold (Ncold)    as stream;# Inlet Cold Streams
     50        Hot  (Nhot)     as stream (Brief="Inlet Hot Streams");
     51        Cold (Ncold)    as stream (Brief="Inlet Cold Streams");
    4852       
    4953end
    5054
    5155Model Outlet_Main_Stream       
    52 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    53 #       Outlet Streams
    54 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
     56
     57ATTRIBUTES
     58        Pallete = false;
     59        Brief = "Outlet material streams for Hot and Cold side";
     60        Info =
     61        "write some information";
     62       
    5563PARAMETERS
    5664
    57         Ncold   as Integer      (Brief="Number of Inlet Cold Streams",Lower=1);
    58         Nhot    as Integer      (Brief="Number of Inlet Hot Streams",Lower=1);
     65        Ncold   as Integer      (Brief="Number of Outlet Cold Streams",Lower=1);
     66        Nhot    as Integer      (Brief="Number of Outlet Hot Streams",Lower=1);
    5967       
    6068VARIABLES
    61 
    62         Hot  (Nhot)     as liquid_stream;# Outlet Hot Streams
    63         Cold (Ncold)    as liquid_stream;# Outlet Cold Streams
     69# Must be streamPH
     70        Hot  (Nhot)     as liquid_stream (Brief="Outlet Hot Streams");
     71        Cold (Ncold)    as liquid_stream (Brief="Outlet Cold Streams");
    6472       
    6573end
    6674
    6775Model Mheatex
    68 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    69 #       Multistream Heat Exchanger Basic Calculation
    70 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
     76       
     77ATTRIBUTES
     78        Pallete = false;
     79        Brief = "Multistream heat exchangers";
     80        Info =
     81        "Heat Transfer between multiple hot and cold streams";
     82       
    7183PARAMETERS
    7284
    7385outer PP                as Plugin       (Brief="Physical Properties");
    74 outer   NComp   as Integer              (Brief="Number of Components");
    75 #       HE              as Plugin       (Brief="Cold Box Calculations",File="heatex");
    76         Side    as Integer              (Brief="Flow Direction",Lower=0,Upper=1);
    77         Ncold   as Integer              (Brief="Number of Inlet Cold Streams",Lower=1);
    78         Nhot    as Integer              (Brief="Number of Inlet Hot Streams",Lower=1);
     86outer   NComp   as Integer      (Brief="Number of Components");
     87        HE                      as Plugin       (Brief="Cold Box Calculations",File="heatex");
     88        Side                    as Integer      (Brief="Flow Direction",Lower=0,Upper=1);
     89        Ncold                   as Integer      (Brief="Number of Inlet Cold Streams",Lower=1);
     90        Nhot                    as Integer      (Brief="Number of Inlet Hot Streams",Lower=1);
    7991       
    8092VARIABLES
    8193
    82 in  Inlet       as Inlet_Main_Stream;           # Inlet Hot Streams
    83 out Outlet      as Outlet_Main_Stream;          # Outlet Hot Streams
     94in      Inlet   as Inlet_Main_Stream    (Brief="Inlet Streams");               
     95out     Outlet  as Outlet_Main_Stream (Brief="Outlet Streams");
    8496
    85         Q       as power                (Brief="Heat Transfer");
    86         LMTD    as temp_delta   (Brief="Logarithmic Mean Temperature Difference");
    87         UA      as positive     (Unit="W/K");
    88         DT0     as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1);
     97        Q               as power                (Brief="Heat Transfer");
     98        LMTD            as temp_delta   (Brief="Logarithmic Mean Temperature Difference");
     99        UA              as positive             (Brief="UA product",Unit="W/K");
     100        DT0             as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1);
    89101        DTL             as temp_delta   (Brief="Temperature Difference at Outlet",Lower=1);
    90102       
     
    92104
    93105# Flow Direction
    94 #       Side = HE.FlowDir();
     106        Side = HE.FlowDir();
    95107
    96108# Inlet Ncold Parameters
     
    120132        Outlet.Cold.z = Inlet.Cold.z;
    121133       
    122 
    123 
    124 for i in [1:Nhot]
    125 
    126 "Vapourisation Fraction Hot Stream"
    127         Outlet.Hot(i).v = PP.VapourFraction(Outlet.Hot(i).T,Outlet.Hot(i).P,Outlet.Hot(i).z);           
    128        
    129 end     
    130 
    131 
    132 for j in [1:Ncold]
    133        
    134 "Vapourisation Fraction Cold Stream"
    135         Outlet.Cold(j).v = PP.VapourFraction(Outlet.Cold(j).T,Outlet.Cold(j).P,Outlet.Cold(j).z);
    136        
    137 end
    138        
    139 
    140134"Heat Duty Hot Stream"
    141135        Q =  sum(Inlet.Hot.F*(Inlet.Hot.h- Outlet.Hot.h));
Note: See TracChangeset for help on using the changeset viewer.