Changeset 561 for branches/gui
 Timestamp:
 Jul 23, 2008, 7:52:54 PM (15 years ago)
 Location:
 branches/gui/eml/heat_exchangers
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/gui/eml/heat_exchangers/HEX_Engine.mso
r529 r561 227 227 VARIABLES 228 228 229 Ch as positive (Brief="Hot Stream Heat Capacity",Lower=1e3,Default=1e3,Unit='W/K');230 Cc as positive (Brief="Cold Stream Heat Capacity",Lower=1e3,Default=1e3,Unit='W/K');231 Cr as positive (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e6);232 Cmin as positive (Brief="Minimum Heat Capacity",Lower=1e10,Default=1e3,Unit='W/K');233 Cmax as positive (Brief="Maximum Heat Capacity",Lower=1e10,Default=1e3,Unit='W/K');234 NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e10);235 Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e8,Upper=1, Symbol ="\varepsilon");236 Eft1 as positive (Brief="Effectiveness Correction",Lower=1e8,Default=0.5, Symbol ="\hat {\varepsilon}");229 Ch as positive (Brief="Hot Stream Heat Capacity",Lower=1e3,Default=1e3,Unit='W/K',Protected=true); 230 Cc as positive (Brief="Cold Stream Heat Capacity",Lower=1e3,Default=1e3,Unit='W/K',Protected=true); 231 Cr as positive (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e6,Protected=true); 232 Cmin as positive (Brief="Minimum Heat Capacity",Lower=1e10,Default=1e3,Unit='W/K',Protected=true); 233 Cmax as positive (Brief="Maximum Heat Capacity",Lower=1e10,Default=1e3,Unit='W/K',Protected=true); 234 NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e10,Protected=true); 235 Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e8,Upper=1, Symbol ="\varepsilon",Protected=true); 236 Eft1 as positive (Brief="Effectiveness Correction",Lower=1e8,Default=0.5, Symbol ="\hat {\varepsilon}",Protected=true); 237 237 238 238 end … … 244 244 Brief = "Log Mean Temperature Difference Method."; 245 245 Info = 246 " to be documented";247 248 VARIABLES 249 250 DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1e6, Symbol ="\Delta T_0" );251 DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1e6, Symbol ="\Delta T_L" );252 LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1e6);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 248 VARIABLES 249 250 DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1e6, Symbol ="\Delta T_0",Protected=true); 251 DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1e6, Symbol ="\Delta T_L",Protected=true); 252 LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1e6,Protected=true); 253 Fc as positive (Brief="LMTD Correction Factor",Lower=0.1,Protected=true); 254 254 255 255 EQUATIONS 
branches/gui/eml/heat_exchangers/Heatex.mso
r529 r561 15 15 * 16 16 * Author: Gerson Balbueno Bicca 17 * $ 17 * $Id$ 18 18 **# 19 19 20 20 using "heat_exchangers/HEX_Engine"; 21 22 Model Basic_Pdrop23 24 ATTRIBUTES25 Pallete = false;26 Brief = "to be documented";27 Info =28 "to be documented";29 30 VARIABLES31 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 end36 37 Model Main_Simplified38 39 ATTRIBUTES40 Pallete = false;41 Brief = "to be documented";42 Info =43 "to be documented";44 45 VARIABLES46 47 PressureDrop as Basic_Pdrop (Brief="Pressure Drop", Symbol=" ");48 Properties as Physical_Properties_Heatex (Brief="Physical Properties", Symbol=" ");49 50 end51 21 52 22 Model Heatex_Basic … … 54 24 ATTRIBUTES 55 25 Pallete = false; 56 Brief 26 Brief = "Basic Model for Simplified Heat Exchangers"; 57 27 Info = 58 "to be documented."; 28 "Model of a simplified heat exchanger. 29 This model perform only material and heat balance. 30 31 == Assumptions == 32 * SteadyState operation; 33 * No heat loss to the surroundings. 34 35 == Specify == 36 * The Inlet streams: Hot and Cold; 37 "; 59 38 60 39 PARAMETERS 61 outer PP as Plugin (Brief="External Physical Properties", Type="PP");40 outer PP as Plugin (Brief="External Physical Properties", Type="PP"); 62 41 outer NComp as Integer (Brief="Number of Components"); 63 42 … … 66 45 VARIABLES 67 46 68 in InletHot as stream(Brief="Inlet Hot Stream", PosX=0, PosY=0.4915, Symbol="^{inHot}");47 in InletHot as stream (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915, Symbol="^{inHot}"); 69 48 out 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}");49 in InletCold as stream (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1, Symbol="^{inCold}"); 71 50 out OutletCold as streamPH (Brief="Outlet Cold Stream", PosX=0.5237, PosY=0, Symbol="^{outCold}"); 72 51 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=1e6, Upper=1e10); 54 U as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient",Default=1,Lower=1e6,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}"); 84 58 85 59 SET … … 90 64 EQUATIONS 91 65 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 = (1InletCold.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 = (1InletCold.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 = (1OutletCold.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 = (1InletHot.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 = (1InletHot.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 = (1OutletHot.v)*PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.x)+126 OutletHot.v*PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.y);127 128 66 "Energy Balance Hot Stream" 129 Details.Q = InletHot.F*(InletHot.hOutletHot.h);67 Q = InletHot.F*(InletHot.hOutletHot.h); 130 68 131 69 "Energy Balance Cold Stream" 132 Details.Q =InletCold.F*(InletCold.hOutletCold.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.hOutletCold.h); 145 71 146 72 "Molar Balance Hot Stream" … … 151 77 152 78 "Hot Stream Molar Fraction Constraint" 153 OutletHot.z 79 OutletHot.z = InletHot.z; 154 80 155 81 "Cold Stream Molar Fraction Constraint" … … 157 83 158 84 "Pressure Drop Hot Stream" 159 OutletHot.P = InletHot.P  HotSide.PressureDrop.Pdrop;85 OutletHot.P = InletHot.P  PdropHotSide; 160 86 161 87 "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 90 end 91 92 Model Heatex_LMTD as Heatex_Basic 173 93 174 94 ATTRIBUTES 175 95 Pallete = true; 176 96 Icon = "icon/HeatExchanger_LMTD"; 177 Brief 97 Brief = "Simplified model for Heat Exchangers"; 178 98 Info = 179 "to be documented."; 99 "This model perform material and heat balance using the Log Mean Temperature Difference Approach. 100 This shortcut calculation does not require exchanger configuration or geometry data. 101 102 == Assumptions == 103 * SteadyState 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., Shellandtube 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 "; 180 119 181 120 PARAMETERS … … 186 125 VARIABLES 187 126 188 Method as LMTD_Basic (Brief="LMTD Method of Calculation", Symbol =" ");127 Method as LMTD_Basic (Brief="LMTD Method of Calculation", Symbol =" "); 189 128 R as positive (Brief="Capacity Ratio for LMTD Correction Fator",Lower=1e6,Hidden=true); 190 129 P as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator ",Lower=1e6,Hidden=true); 191 Rho as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e6,Hidden=true);130 Rho as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e6,Hidden=true); 192 131 Phi as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e6, Symbol ="\phi",Hidden=true); 193 132 … … 195 134 196 135 "Duty" 197 Details.Q = Details.Ud*Details.A*Method.LMTD*Method.Fc;136 Q = U*A*Method.LMTD*Method.Fc; 198 137 199 138 switch ExchangerType … … 317 256 end 318 257 319 Model Heatex_NTU 258 Model Heatex_NTU as Heatex_Basic 320 259 321 260 ATTRIBUTES 322 261 Pallete = true; 323 262 Icon = "icon/HeatExchanger_NTU"; 324 Brief 263 Brief = "Simplified model for Heat Exchangers"; 325 264 Info = 326 "to be documented."; 265 "This model perform material and heat balance using the NTUEffectiveness Approach. 266 This shortcut calculation does not require exchanger configuration or geometry data. 267 268 == Assumptions == 269 * SteadyState 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 "; 327 280 328 281 PARAMETERS … … 334 287 Method as NTU_Basic (Brief="NTU Method of Calculation", Symbol =" "); 335 288 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 336 297 EQUATIONS 337 298 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 338 305 "Number of Units Transference" 339 Method.NTU*Method.Cmin = Details.Ud*Details.A;306 Method.NTU*Method.Cmin = U*A; 340 307 341 308 "Minimum Heat Capacity" … … 349 316 350 317 "Duty" 351 Details.Q = Method.Eft*Method.Cmin*(InletHot.TInletCold.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.TInletCold.T); 319 320 "Hot Stream Average Heat Capacity" 321 Method.Ch = InletHot.F*((1InletHot.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*((1InletCold.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)); 358 327 359 328 "Effectiveness Correction" … … 401 370 402 371 end 403 
branches/gui/eml/heat_exchangers/heater.mso
r546 r561 102 102 VARIABLES 103 103 104 in InletQ as energy_stream(Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");104 in Heat as power (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}"); 105 105 106 106 EQUATIONS 107 107 "Net Duty" 108 InletQ.Q= QDuty;108 Heat = QDuty; 109 109 110 110 end … … 129 129 VARIABLES 130 130 131 in InletQ as energy_stream(Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");131 in Heat as power (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}"); 132 132 133 133 EQUATIONS 134 134 "Net Duty" 135 InletQ.Q= QDuty;135 Heat = QDuty; 136 136 137 137 end
Note: See TracChangeset
for help on using the changeset viewer.