Changeset 561


Ignore:
Timestamp:
Jul 23, 2008, 7:52:54 PM (14 years ago)
Author:
gerson bicca
Message:

some modifications on heat exchangers models (new gui)

Location:
branches/gui/eml/heat_exchangers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/heat_exchangers/HEX_Engine.mso

    r529 r561  
    227227VARIABLES
    228228
    229 Ch   as positive        (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
    230 Cc   as positive        (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
    231 Cr      as positive     (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6);
    232 Cmin  as positive       (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
    233 Cmax as positive        (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
    234 NTU     as positive     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10);
    235 Eft     as positive  (Brief="Effectiveness",Default=0.5,Lower=1e-8,Upper=1, Symbol ="\varepsilon");
    236 Eft1    as positive  (Brief="Effectiveness Correction",Lower=1e-8,Default=0.5, Symbol ="\hat {\varepsilon}");
     229Ch              as positive     (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K',Protected=true);
     230Cc              as positive     (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K',Protected=true);
     231Cr              as positive     (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6,Protected=true);
     232Cmin    as positive     (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K',Protected=true);
     233Cmax    as positive     (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K',Protected=true);
     234NTU             as positive     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10,Protected=true);
     235Eft             as positive     (Brief="Effectiveness",Default=0.5,Lower=1e-8,Upper=1, Symbol ="\varepsilon",Protected=true);
     236Eft1            as positive     (Brief="Effectiveness Correction",Lower=1e-8,Default=0.5, Symbol ="\hat {\varepsilon}",Protected=true);
    237237
    238238end
     
    244244        Brief = "Log Mean Temperature Difference Method.";
    245245        Info =
    246         "to be documented";
    247        
    248 VARIABLES
    249 
    250 DT0             as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1e-6, Symbol ="\Delta T_0");
    251 DTL             as temp_delta   (Brief="Temperature Difference at Outlet",Lower=1e-6, Symbol ="\Delta T_L");
    252 LMTD            as temp_delta   (Brief="Logarithmic Mean Temperature Difference",Lower=1e-6);
    253 Fc                      as positive             (Brief="LMTD Correction Factor",Lower=0.1);
     246        "This model should be used as submodel when the LMTD needs to be calculating";
     247       
     248VARIABLES
     249
     250DT0             as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1e-6, Symbol ="\Delta T_0",Protected=true);
     251DTL             as temp_delta   (Brief="Temperature Difference at Outlet",Lower=1e-6, Symbol ="\Delta T_L",Protected=true);
     252LMTD    as temp_delta   (Brief="Logarithmic Mean Temperature Difference",Lower=1e-6,Protected=true);
     253Fc                      as positive             (Brief="LMTD Correction Factor",Lower=0.1,Protected=true);
    254254
    255255EQUATIONS
  • branches/gui/eml/heat_exchangers/Heatex.mso

    r529 r561  
    1515*--------------------------------------------------------------------
    1616* Author: Gerson Balbueno Bicca
    17 * $  $
     17* $Id$
    1818*--------------------------------------------------------------------*#
    1919
    2020using "heat_exchangers/HEX_Engine";
    21 
    22 Model Basic_Pdrop
    23        
    24 ATTRIBUTES
    25         Pallete = false;
    26         Brief = "to be documented";
    27         Info =
    28         "to be documented";
    29        
    30 VARIABLES
    31 
    32 Pdrop           as press_delta  (Brief="Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P");
    33 FPdrop  as Real                         (Brief="Pressure Drop : Fraction of Inlet",Lower=0,Upper=0.8);
    34 
    35 end
    36 
    37 Model Main_Simplified
    38        
    39 ATTRIBUTES
    40         Pallete = false;
    41         Brief = "to be documented";
    42         Info =
    43         "to be documented";
    44        
    45 VARIABLES
    46 
    47 PressureDrop    as Basic_Pdrop                          (Brief="Pressure Drop", Symbol=" ");
    48 Properties              as Physical_Properties_Heatex           (Brief="Physical Properties", Symbol=" ");
    49 
    50 end
    5121
    5222Model Heatex_Basic
     
    5424ATTRIBUTES
    5525        Pallete         = false;
    56         Brief           = "Basic Model for Simplified Heat Exchangers";
     26        Brief   = "Basic Model for Simplified Heat Exchangers";
    5727        Info            =
    58         "to be documented.";
     28"Model of a simplified heat exchanger.
     29This model perform only material and heat balance.
     30
     31== Assumptions ==
     32* Steady-State operation;
     33* No heat loss to the surroundings.
     34
     35== Specify ==
     36* The Inlet streams: Hot and Cold;
     37";
    5938       
    6039PARAMETERS
    61 outer PP            as Plugin   (Brief="External Physical Properties", Type="PP");
     40outer PP                as Plugin       (Brief="External Physical Properties", Type="PP");
    6241outer NComp     as Integer  (Brief="Number of Components");
    6342       
     
    6645VARIABLES
    6746
    68 in  InletHot    as stream               (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915, Symbol="^{inHot}");
     47in  InletHot            as stream                       (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915, Symbol="^{inHot}");
    6948out OutletHot   as streamPH     (Brief="Outlet Hot Stream", PosX=1, PosY=0.4915, Symbol="^{outHot}");
    70 in  InletCold   as stream               (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1, Symbol="^{inCold}");
     49in  InletCold           as stream                       (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1, Symbol="^{inCold}");
    7150out OutletCold  as streamPH     (Brief="Outlet Cold Stream", PosX=0.5237, PosY=0, Symbol="^{outCold}");
    7251
    73         xh(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Hot Side",Hidden=true);
    74         yh(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Hot Side",Hidden=true);
    75         vh                      as fraction             (Brief = "Vapour Fraction in Hot Side",Hidden=true);
    76        
    77         xc(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Cold Side",Hidden=true);
    78         yc(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Cold Side",Hidden=true);
    79         vc                      as fraction             (Brief = "Vapour Fraction in Cold Side",Hidden=true);
    80 
    81         Details     as Details_Main     (Brief="Heat Exchanger Details", Symbol=" ");
    82         HotSide         as Main_Simplified      (Brief="Heat Exchanger Hot Side", Symbol="_{hot}");
    83         ColdSide        as Main_Simplified      (Brief="Heat Exchanger Cold Side", Symbol="_{cold}");
     52        A               as area                                         (Brief="Exchange Surface Area");
     53        Q               as power                                        (Brief="Duty", Default=7000, Lower=1e-6, Upper=1e10);
     54        U               as heat_trans_coeff     (Brief="Overall Heat Transfer Coefficient",Default=1,Lower=1e-6,Upper=1e10);
     55       
     56        PdropHotSide    as press_delta  (Brief="Pressure Drop Hot Side",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P_{hot}");
     57        PdropColdSide   as press_delta  (Brief="Pressure Drop Cold Side",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P_{cold}");
    8458
    8559SET
     
    9064EQUATIONS
    9165
    92 "Flash Calculation in Hot Side"
    93         [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z);
    94 
    95 "Flash Calculation in Cold Side"
    96         [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z);
    97 
    98 "Hot Stream Average Molecular Weight"
    99         HotSide.Properties.Mw = sum(M*InletHot.z);
    100 
    101 "Cold Stream Average Molecular Weight"
    102         ColdSide.Properties.Mw = sum(M*InletCold.z);
    103 
    104 "Cold Stream Average Heat Capacity"
    105         ColdSide.Properties.Cp  =       (1-InletCold.v)*PP.LiquidCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,xc)+
    106                 InletCold.v*PP.VapourCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,yc);
    107        
    108 "Cold Stream Inlet Mass Density"
    109         ColdSide.Properties.Inlet.rho   =       (1-InletCold.v)*PP.LiquidDensity(InletCold.T,InletCold.P,xc)+
    110                 InletCold.v*PP.VapourDensity(InletCold.T,InletCold.P,yc);
    111 
    112 "Cold Stream Outlet Mass Density"
    113         ColdSide.Properties.Outlet.rho  =       (1-OutletCold.v)*PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.x)+
    114                 OutletCold.v*PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.y);
    115 
    116 "Hot Stream Average Heat Capacity"
    117         HotSide.Properties.Cp   =       (1-InletHot.v)*PP.LiquidCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,xh)+
    118                 InletHot.v*PP.VapourCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,yh);
    119        
    120 "Hot Stream Inlet Mass Density"
    121         HotSide.Properties.Inlet.rho    =       (1-InletHot.v)*PP.LiquidDensity(InletHot.T,InletHot.P,xc)+
    122                 InletHot.v*PP.VapourDensity(InletHot.T,InletHot.P,yc);
    123 
    124 "Hot Stream Outlet Mass Density"
    125         HotSide.Properties.Outlet.rho   =       (1-OutletHot.v)*PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.x)+
    126                 OutletHot.v*PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.y);
    127 
    12866"Energy Balance Hot Stream"
    129         Details.Q = InletHot.F*(InletHot.h-OutletHot.h);
     67        Q = InletHot.F*(InletHot.h-OutletHot.h);
    13068
    13169"Energy Balance Cold Stream"
    132         Details.Q =-InletCold.F*(InletCold.h-OutletCold.h);
    133 
    134 "Flow Mass Inlet Cold Stream"
    135         ColdSide.Properties.Inlet.Fw    =  sum(M*InletCold.z)*InletCold.F;
    136 
    137 "Flow Mass Outlet Cold Stream"
    138         ColdSide.Properties.Outlet.Fw   =  sum(M*OutletCold.z)*OutletCold.F;
    139 
    140 "Flow Mass Inlet Hot Stream"
    141         HotSide.Properties.Inlet.Fw             =  sum(M*InletHot.z)*InletHot.F;
    142 
    143 "Flow Mass Outlet Hot Stream"   
    144         HotSide.Properties.Outlet.Fw    =  sum(M*OutletHot.z)*OutletHot.F;
     70        Q =-InletCold.F*(InletCold.h-OutletCold.h);
    14571
    14672"Molar Balance Hot Stream"
     
    15177
    15278"Hot Stream Molar Fraction Constraint"
    153         OutletHot.z             =       InletHot.z;
     79        OutletHot.z     =       InletHot.z;
    15480       
    15581"Cold Stream Molar Fraction Constraint"
     
    15783       
    15884"Pressure Drop Hot Stream"
    159         OutletHot.P  = InletHot.P - HotSide.PressureDrop.Pdrop;
     85        OutletHot.P  = InletHot.P - PdropHotSide;
    16086       
    16187"Pressure Drop Cold Stream"
    162         OutletCold.P  = InletCold.P - ColdSide.PressureDrop.Pdrop;
    163        
    164 "Fraction of Inlet Pressure : Hot Stream"
    165         HotSide.PressureDrop.Pdrop  = InletHot.P*HotSide.PressureDrop.FPdrop;
    166        
    167 "Fraction of Inlet Pressure : Cold Stream"
    168         ColdSide.PressureDrop.Pdrop  = InletCold.P*ColdSide.PressureDrop.FPdrop;
    169        
    170 end
    171 
    172 Model Heatex_LMTD       as Heatex_Basic
     88        OutletCold.P  = InletCold.P - PdropColdSide;
     89       
     90end
     91
     92Model Heatex_LMTD  as Heatex_Basic
    17393
    17494ATTRIBUTES
    17595        Pallete         = true;
    17696        Icon            = "icon/HeatExchanger_LMTD";   
    177         Brief           = "Simplified model for Heat Exchangers";
     97        Brief   = "Simplified model for Heat Exchangers";
    17898        Info            =
    179         "to be documented.";
     99"This model perform material and heat balance using the Log Mean Temperature Difference Approach.
     100This shortcut calculation does not require exchanger configuration or geometry data.
     101
     102== Assumptions ==
     103* Steady-State operation;
     104* No heat loss to the surroundings.
     105
     106== Specify ==
     107* The Inlet streams: Hot and Cold.
     108
     109== References ==
     110[1] E.A.D. Saunders, Heat Exchangers: Selection, Design and
     111 Construction, Longman, Harlow, 1988.
     112
     113[2] Taborek, J., Shell-and-tube heat exchangers, in Heat Exchanger Design Handbook, Vol. 3
     114 Hemisphere Publishing Corp., New York, 1988.
     115
     116[3] Fakheri, A. , Alternative approach for determining log mean temperature difference correction factor
     117 and number of shells of shell and tube heat exchangers, Journal of Enhanced Heat Transfer, v. 10, p. 407- 420, 2003.
     118";
    180119       
    181120PARAMETERS
     
    186125VARIABLES
    187126
    188         Method  as LMTD_Basic   (Brief="LMTD Method of Calculation", Symbol =" ");
     127        Method  as LMTD_Basic           (Brief="LMTD Method of Calculation", Symbol =" ");
    189128        R                               as positive                     (Brief="Capacity Ratio for LMTD Correction Fator",Lower=1e-6,Hidden=true);
    190129        P                               as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator ",Lower=1e-6,Hidden=true);
    191         Rho             as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e-6,Hidden=true);
     130        Rho                     as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e-6,Hidden=true);
    192131        Phi             as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e-6, Symbol ="\phi",Hidden=true);
    193132
     
    195134
    196135"Duty"
    197         Details.Q = Details.Ud*Details.A*Method.LMTD*Method.Fc;
     136        Q = U*A*Method.LMTD*Method.Fc;
    198137
    199138switch ExchangerType
     
    317256end
    318257
    319 Model Heatex_NTU                as Heatex_Basic
     258Model Heatex_NTU        as Heatex_Basic
    320259
    321260ATTRIBUTES
    322261        Pallete         = true;
    323262        Icon            = "icon/HeatExchanger_NTU";     
    324         Brief           = "Simplified model for Heat Exchangers";
     263        Brief   = "Simplified model for Heat Exchangers";
    325264        Info            =
    326         "to be documented.";
     265"This model perform material and heat balance using the NTU-Effectiveness Approach.
     266This shortcut calculation does not require exchanger configuration or geometry data.
     267
     268== Assumptions ==
     269* Steady-State operation;
     270* No heat loss to the surroundings.
     271
     272== Specify ==
     273* The Inlet streams: Hot and Cold.
     274
     275== References ==
     276[1] E.A.D. Saunders, Heat Exchangers: Selection, Design and
     277 Construction, Longman, Harlow, 1988.
     278
     279";
    327280       
    328281PARAMETERS
     
    334287Method  as NTU_Basic    (Brief="NTU Method of Calculation", Symbol =" ");
    335288
     289        xh(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Hot Side",Hidden=true);
     290        yh(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Hot Side",Hidden=true);
     291        vh                              as fraction             (Brief = "Vapour Fraction in Hot Side",Hidden=true);
     292       
     293        xc(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Cold Side",Hidden=true);
     294        yc(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Cold Side",Hidden=true);
     295        vc                              as fraction             (Brief = "Vapour Fraction in Cold Side",Hidden=true);
     296
    336297EQUATIONS
    337298
     299"Flash Calculation in Hot Side"
     300        [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z);
     301
     302"Flash Calculation in Cold Side"
     303        [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z);
     304
    338305"Number of Units Transference"
    339         Method.NTU*Method.Cmin = Details.Ud*Details.A;
     306        Method.NTU*Method.Cmin = U*A;
    340307       
    341308"Minimum Heat Capacity"
     
    349316
    350317"Duty"
    351         Details.Q       = Method.Eft*Method.Cmin*(InletHot.T-InletCold.T);
    352 
    353 "Hot Stream Heat Capacity"
    354         Method.Ch  = InletHot.F*HotSide.Properties.Cp;
    355        
    356 "Cold Stream Heat Capacity"
    357         Method.Cc = InletCold.F*ColdSide.Properties.Cp;
     318        Q       = Method.Eft*Method.Cmin*(InletHot.T-InletCold.T);
     319
     320"Hot Stream Average Heat Capacity"
     321        Method.Ch       = InletHot.F*((1-InletHot.v)*PP.LiquidCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,xh)+
     322                InletHot.v*PP.VapourCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,yh));
     323       
     324"Cold Stream Average Heat Capacity"
     325        Method.Cc       =       InletCold.F*((1-InletCold.v)*PP.LiquidCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,xc)+
     326                InletCold.v*PP.VapourCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,yc));
    358327       
    359328"Effectiveness Correction"
     
    401370
    402371end
    403  
  • branches/gui/eml/heat_exchangers/heater.mso

    r546 r561  
    102102 VARIABLES
    103103
    104 in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
     104in  Heat                as power        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
    105105
    106106 EQUATIONS
    107107 "Net Duty"
    108         InletQ.Q = QDuty;
     108        Heat = QDuty;
    109109
    110110end
     
    129129 VARIABLES
    130130
    131 in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
     131in  Heat                as power        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
    132132
    133133 EQUATIONS
    134134 "Net Duty"
    135         InletQ.Q = -QDuty;
     135        Heat = -QDuty;
    136136
    137137end
Note: See TracChangeset for help on using the changeset viewer.