#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. *-------------------------------------------------------------------- * Author: Gerson Balbueno Bicca * $Id: HEX_Engine.mso 442 2008-01-08 17:56:24Z bicca $ *--------------------------------------------------------------------*# using "streams"; Model Properties_Average ATTRIBUTES Pallete = false; Brief = "Average physical properties of the streams."; Info = "to be documented."; VARIABLES Mw as molweight (Brief="Average Mol Weight",Default=75, Lower=1, Upper=1e8); T as temperature (Brief="Average Temperature",Lower=50); P as pressure (Brief="Average Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa'); rho as dens_mass (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho"); Mu as viscosity (Brief="Stream Viscosity",Lower=0.0001, Symbol = "\mu"); Cp as cp_mol (Brief="Stream Molar Heat Capacity", Upper=1e10); K as conductivity (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500); end Model Properties_In_Out ATTRIBUTES Pallete = false; Brief = "Inlet and outlet physical properties of the streams."; Info = "to be documented."; VARIABLES Fw as flow_mass (Brief="Stream Mass Flow"); rho as dens_mass (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho"); end Model Properties_Wall ATTRIBUTES Pallete = false; Brief = "Physical properties of the streams at wall temperature."; Info = "to be documented."; VARIABLES Mu as viscosity (Brief="Stream Viscosity",Default=1, Lower=1e-5, Upper=1e5, Symbol = "\mu"); Twall as temperature (Brief="Wall Temperature",Lower=50); end Model Physical_Properties ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Inlet as Properties_In_Out (Brief="Properties at Inlet Stream", Symbol = "^{in}"); Average as Properties_Average (Brief="Properties at Average Temperature", Symbol = "^{avg}"); Outlet as Properties_In_Out (Brief="Properties at Outlet Stream", Symbol = "^{out}"); Wall as Properties_Wall (Brief="Properties at Wall Temperature", Symbol = "^{wall}"); end Model Tube_Pdrop ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES PdTube as press_delta (Brief="Tube Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa'); Pdtotal as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa'); Pdnozzle_in as press_delta (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); Pdnozzle_out as press_delta (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); Vnozzle_in as velocity (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); Vnozzle_out as velocity (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); EQUATIONS "Total Pressure Drop" Pdtotal = PdTube + Pdnozzle_in + Pdnozzle_out; end Model Tube_Heat_Transfer ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Re as positive (Brief="Tube Side Reynolds Number",Default=1000,Lower=1); Nu as positive (Brief="Nusselt Number",Default=0.5,Lower=1e-8); htube as heat_trans_coeff (Brief="Tube Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); PR as positive (Brief="Tube Side Prandtl Number",Default=0.5,Lower=1e-8); Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); Vtube as velocity (Brief="Tube Side Velocity",Lower=1e-8); end Model Shell_Pdrop ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Pideal as press_delta (Brief="Ideal Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); PdCross as press_delta (Brief="Cross Flow Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); PdEndZones as press_delta (Brief="End Zones Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); Pdwindow as press_delta (Brief="Window Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa'); Pdtotal as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); Pdnozzle_in as press_delta (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); Pdnozzle_out as press_delta (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa'); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); Vnozzle_in as velocity (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); Vnozzle_out as velocity (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); RVsquare_out as positive (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m'); RVsquare_in as positive (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m'); EQUATIONS "Shell Side Total Pressure Drop" Pdtotal = PdCross + PdEndZones + Pdnozzle_in + Pdnozzle_out + Pdwindow; end Model Shell_Heat_Transfer ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Re as positive (Brief="Shell Side Reynolds Number",Default=100,Lower=1); PR as positive (Brief="Shell Side Prandtl Number",Default=0.7,Lower=1e-6); hshell as heat_trans_coeff (Brief="Shell Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); Ji as constant (Brief="Shell Side Ji Factor",Default=0.05); Jr as positive (Brief="Shell Side Jr Factor",Lower=10e-6); Jl as positive (Brief="Shell Side Jl Factor",Lower=10e-6); Jb as positive (Brief="Shell Side Jb Factor",Lower=10e-6); Jc as positive (Brief="Shell Side Jc Factor",Lower=10e-6); Js as positive (Brief="Shell Side Js Factor",Lower=10e-6); Jtotal as positive (Brief="Shell Side Jtotal Factor",Lower=10e-6); Sm as area (Brief="Shell Side Cross Flow Area",Default=0.05,Lower=10e-6); end Model Baffles_Main ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Ls as length (Brief="Central Baffle Spacing",Lower=1e-8); Lsi as length (Brief="Inlet Baffle Spacing",Lower=1e-8); Lso as length (Brief="Outlet Baffle Spacing",Lower=1e-8); end Model NTU_Basic ATTRIBUTES Pallete = false; Brief = "Number of Units Transference Method."; Info = "to be documented"; VARIABLES Ch as positive (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K'); Cc as positive (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K'); Cr as positive (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6); Cmin as positive (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K'); Cmax as positive (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K'); NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e-10); Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e-8,Upper=1, Symbol ="\varepsilon"); Eft1 as positive (Brief="Effectiveness Correction",Lower=1e-8,Default=0.5, Symbol ="\hat {\varepsilon}"); end Model LMTD_Basic ATTRIBUTES Pallete = false; Brief = "Log Mean Temperature Difference Method."; Info = "to be documented"; VARIABLES DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1e-6, Symbol ="\Delta T_0"); DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1e-6, Symbol ="\Delta T_L"); LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1e-6); Fc as positive (Brief="LMTD Correction Factor",Lower=0.1); EQUATIONS if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL])) then "Log Mean Temperature Difference" LMTD= (DT0-DTL)/ln(DT0/DTL); else if DT0*DTL equal 0 then "Log Mean Temperature Difference" LMTD = 0.5*(DT0+DTL); else "Log Mean Temperature Difference" LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12); end end end Model Details_Main ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES A as area (Brief="Exchange Surface Area"); Q as power (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10); Uc as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10); Ud as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10); end Model Tube_Side_Main ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES PressureDrop as Tube_Pdrop (Brief="Tube Side Pressure Drop"); HeatTransfer as Tube_Heat_Transfer (Brief="Tube Side Heat Transfer"); Properties as Physical_Properties (Brief="Tube Side Properties"); end Model Shell_Side_Main ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES PressureDrop as Shell_Pdrop (Brief="Shell Side Pressure Drop"); HeatTransfer as Shell_Heat_Transfer (Brief= "Shell Side Heat Transfer"); Properties as Physical_Properties (Brief="ShellSide Properties"); end Model Basic_Pdrop ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Pdrop as press_delta (Brief="Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P"); FPdrop as Real (Brief="Pressure Drop : Fraction of Inlet",Lower=0,Upper=0.8); end Model DoublePipe_HeatTransfer ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; PARAMETERS As as area (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8); Dh as length (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8); VARIABLES Re as positive (Brief="Reynolds Number",Default=100,Lower=1); hcoeff as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); Nu as positive (Brief="Nusselt Number",Default=0.5,Lower=1e-8); PR as positive (Brief="Prandtl Number",Default=0.5,Lower=1e-8); Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); Vmean as velocity (Brief="Tube Velocity",Lower=1e-8); end Model DoublePipe_PressureDrop ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; PARAMETERS Dh as length (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6); VARIABLES Pdrop as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P"); Pd_fric as press_delta (Brief="Pressure Drop for friction",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P_{fric}"); Pd_ret as press_delta (Brief="Pressure Drop due to return",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{return}"); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); Re as positive (Brief="Reynolds Number",Default=100,Lower=1); end Model Main_DoublePipe ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES HeatTransfer as DoublePipe_HeatTransfer (Brief="Double Pipe Heat Transfer",Symbol=" "); PressureDrop as DoublePipe_PressureDrop (Brief="Double Pipe Pressure Drop", Symbol=" "); Properties as Physical_Properties (Brief="Double Pipe Properties",Symbol=" " ); end Model Main_Simplified ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES PressureDrop as Basic_Pdrop (Brief="Pressure Drop", Symbol=" "); Properties as Physical_Properties (Brief="Physical Properties", Symbol=" "); end Model PHE_HeatTransfer ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Re as positive (Brief="Reynolds Number",Default=100,Lower=1); PR as positive (Brief="Prandtl Number",Default=0.5,Lower=1e-8); NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e-10); WCp as positive (Brief="Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K'); hcoeff as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); Gchannel as flux_mass (Brief ="Channel Mass Flux", Default=1, Lower=1e-6, Symbol ="G^{channel}"); Gports as flux_mass (Brief ="Ports Mass Flux", Default=1, Lower=1e-6, Symbol ="G^{ports}"); Phi as positive (Brief="Viscosity Correction",Default=1,Lower=1e-6, Symbol="\phi"); end Model PHE_PressureDrop ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES DPchannel as press_delta (Brief="Channel Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P^{channel}"); DPports as press_delta (Brief="Ports Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P^{ports}"); Pdrop as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P"); fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); Vchannel as velocity (Brief="Stream Velocity in Channel",Lower=1e-8, Symbol ="V^{channel}"); Vports as velocity (Brief="Stream Velocity in Ports",Lower=1e-8, Symbol ="V^{ports}"); Npassage as Real (Brief="Number of Channels per Pass", Symbol ="N^{passage}"); end Model Main_PHE ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES HeatTransfer as PHE_HeatTransfer (Brief="PHE Heat Transfer", Symbol = " "); PressureDrop as PHE_PressureDrop (Brief="PHE Pressure Drop", Symbol = " "); Properties as Physical_Properties (Brief="PHE Properties", Symbol = " "); end Model Thermal_PHE ATTRIBUTES Pallete = false; Brief = "to be documented"; Info = "to be documented"; VARIABLES Cr as positive (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6); Cmin as positive (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K'); Cmax as positive (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K'); NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e-10); Eft as positive (Brief="Effectiveness",Default=0.5,Lower=0.4,Upper=1, Symbol = "\varepsilon"); Q as power (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10); Uc as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10); Ud as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10); end