#*--------------------------------------------------------------------* * * * * * * * * * * *---------------------------------------------------------------------- * Author: Gerson Balbueno Bicca * $Id: HeatExchangerSimplified.mso 1 2006-06-20 17:33:53Z rafael $ *--------------------------------------------------------------------*# using "HEX_Engine"; #===================================================================== # Basic Models for Simplified Heat Exchangers #===================================================================== Model HeatExchangerSimplified_Basic PARAMETERS ext PP as CalcObject(Brief="External Physical Properties"); ext HE as CalcObject(Brief="STHE Calculations",File="heatex.dll"); ext NComp as Integer (Brief="Number of Components"); M(NComp) as molweight (Brief="Component Mol Weight"); VARIABLES in Inlet as Inlet_Main_Stream; # Hot and Cold Inlets out Outlet as Outlet_Main_Stream; # Hot and Cold Outlets Properties as Main_Properties; # Hot and Cold Properties Details as Details_Main; PressureDrop as Main_Pdrop; SET M = PP.MolecularWeight(); EQUATIONS "Hot Stream Average Temperature" Properties.Hot.Average.T = 0.5*Inlet.Hot.T + 0.5*Outlet.Hot.T; "Cold Stream Average Temperature" Properties.Cold.Average.T = 0.5*Inlet.Cold.T + 0.5*Outlet.Cold.T; "Hot Stream Average Pressure" Properties.Hot.Average.P = 0.5*Inlet.Hot.P+0.5*Outlet.Hot.P; "Cold Stream Average Pressure" Properties.Cold.Average.P = 0.5*Inlet.Cold.P+0.5*Outlet.Cold.P; "Cold Stream Wall Temperature" Properties.Cold.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; "Hot Stream Wall Temperature" Properties.Hot.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; "Hot Stream Average Molecular Weight" Properties.Hot.Average.Mw = sum(M*Inlet.Hot.z); "Cold Stream Average Molecular Weight" Properties.Cold.Average.Mw = sum(M*Inlet.Cold.z); if Inlet.Cold.v equal 0 then "Heat Capacity Cold Stream" Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Mass Density Cold Stream" Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Viscosity Cold Stream" Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Conductivity Cold Stream" Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Heat Capacity Cold Stream" Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); "Viscosity Cold Stream" Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); "Conductivity Cold Stream" Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); else "Heat Capacity Cold Stream" Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Mass Density Cold Stream" Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Viscosity Cold Stream" Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Conductivity Cold Stream" Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); "Heat Capacity Cold Stream" Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); "Viscosity Cold Stream" Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); "Conductivity Cold Stream" Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); end if Inlet.Hot.v equal 0 then "Heat Capacity Hot Stream" Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Mass Density Hot Stream" Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Viscosity Hot Stream" Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Conductivity Hot Stream" Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Heat Capacity Hot Stream" Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); "Viscosity Hot Stream" Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); "Conductivity Hot Stream" Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); else "Heat Capacity Hot Stream" Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Mass Density Hot Stream" Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Viscosity Hot Stream" Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Conductivity Hot Stream" Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); "Heat Capacity Hot Stream" Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); "Viscosity Hot Stream" Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); "Conductivity Hot Stream" Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); end #===================================================================== # Thermal Details #===================================================================== "Hot Stream Heat Capacity" Details.Ch =Inlet.Hot.F*Properties.Hot.Average.Cp; "Cold Stream Heat Capacity" Details.Cc =Inlet.Cold.F*Properties.Cold.Average.Cp; "Heat Capacity Ratio" [Details.Cmin,Details.Cmax,Details.Cr] = HE.HeatCapacityRatio(Details.Ch,Details.Cc); #===================================================================== # Energy Balance #===================================================================== "Energy Balance Hot Stream" Details.Q = Inlet.Hot.F*(Inlet.Hot.h-Outlet.Hot.h); "Energy Balance Cold Stream" Details.Q =-Inlet.Cold.F*(Inlet.Cold.h-Outlet.Cold.h); #===================================================================== # Material Balance #===================================================================== "Flow Mass Inlet Cold Stream" Properties.Cold.Inlet.Fw = sum(M*Inlet.Cold.z)*Inlet.Cold.F; "Flow Mass Outlet Cold Stream" Properties.Cold.Outlet.Fw = sum(M*Outlet.Cold.z)*Outlet.Cold.F; "Flow Mass Inlet Hot Stream" Properties.Hot.Inlet.Fw = sum(M*Inlet.Hot.z)*Inlet.Hot.F; "Flow Mass Outlet Hot Stream" Properties.Hot.Outlet.Fw = sum(M*Outlet.Hot.z)*Outlet.Hot.F; "Molar Balance Hot Stream" Inlet.Hot.F = Outlet.Hot.F; "Molar Balance Cold Stream" Inlet.Cold.F = Outlet.Cold.F; #====================================== # Constraints #====================================== "Hot Stream Molar Fraction Constraint" Outlet.Hot.z=Inlet.Hot.z; "Cold Stream Molar Fraction Constraint" Outlet.Cold.z=Inlet.Cold.z; "No Phase Change In Cold Stream" Inlet.Cold.v=Outlet.Cold.v; "No Phase Change In Hot Stream" Inlet.Hot.v=Outlet.Hot.v; #====================================== # Pressure Drop #====================================== "Pressure Drop Hot Stream" Outlet.Hot.P = Inlet.Hot.P - PressureDrop.Hot.Pdrop; "Pressure Drop Cold Stream" Outlet.Cold.P = Inlet.Cold.P - PressureDrop.Cold.Pdrop; "Fraction of Inlet Pressure : Hot Stream" PressureDrop.Hot.Pdrop = Inlet.Hot.P*PressureDrop.Hot.FPdrop; "Fraction of Inlet Pressure : Cold Stream" PressureDrop.Cold.Pdrop = Inlet.Cold.P*PressureDrop.Cold.FPdrop; end Model Heatex_Basic_NTU as HeatExchangerSimplified_Basic #===================================================================== # Basic Model for Heat Exchangers - NTU Method #===================================================================== VARIABLES Eft as positive (Brief="Effectiveness",Default=0.05,Lower=1e-8); EQUATIONS "Energy Balance" Details.Q = Eft*Details.Cmin*(Inlet.Hot.T-Inlet.Cold.T); end Model Heatex_Basic_LMTD as HeatExchangerSimplified_Basic #===================================================================== # Basic Model for Heat Exchangers - LMTD Method #===================================================================== VARIABLES LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference"); Fc as positive (Brief="LMTD Correction Factor",Lower=0.75); MTD as temp_delta (Brief="Mean Temperature Difference"); EQUATIONS "Exchange Surface Area" Details.Q = Details.U*Details.A*Fc*LMTD; "Mean Temperature Difference" MTD = Fc*LMTD; end #===================================================================== # Concrete Models for Simplified Heat Exchangers #===================================================================== #===================================================================== # LMTD Method #===================================================================== Model HeatExchanger_LMTD as Heatex_Basic_LMTD EQUATIONS "Cocurrent Flow LMTD" LMTD = HE.LogMeanTemperature(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); end Model E_Shell_LMTD as Heatex_Basic_LMTD #===================================================================== # Shell and Tubes Heat Exchanger with 1 shell pass - LMTD Method #===================================================================== EQUATIONS "Counter Flow LMTD" LMTD = HE.CounterLMTD(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); "LMTD Correction Factor" Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); end Model F_Shell_LMTD as Heatex_Basic_LMTD #===================================================================== # Shell and Tubes Heat Exchanger with 2 shell passes - LMTD Method #===================================================================== EQUATIONS "Counter Flow LMTD" LMTD = HE.CounterLMTD(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); "LMTD Correction Factor" Fc = HE.FshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); end Model Multipass_LMTD as Heatex_Basic_LMTD #============================================================================ # Shell and Tubes Heat Exchanger In Series with 1 shell pass - LMTD Method #============================================================================ PARAMETERS Nshell as Integer (Brief="N Shell in Series",Lower=2); EQUATIONS "Counter Flow LMTD" LMTD = HE.CounterLMTD(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); "LMTD Correction Factor" Fc = HE.MpassCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T,Nshell); end #===================================================================== # NTU Method #===================================================================== Model HeatExchanger_NTU as Heatex_Basic_NTU EQUATIONS "Effectiveness" Eft=HE.Effectiveness(Details.Cr,Details.NTU); end Model E_Shell_NTU as Heatex_Basic_NTU #===================================================================== # Shell and Tubes Heat Exchanger with 1 shell pass - NTU Method #===================================================================== EQUATIONS "TEMA E Shell Effectiveness" Eft = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; end Model F_Shell_NTU as Heatex_Basic_NTU #===================================================================== # Shell and Tubes Heat Exchanger with 2 shell passes - NTU Method #===================================================================== VARIABLES Eft1 as positive (Brief="Effectiveness Correction",Lower=0.01,Upper=1,Default=0.5); EQUATIONS "Effectiveness Correction" Eft1 = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; "TEMA F Shell Effectiveness" Eft = ( ((1-Eft1*Details.Cr)/(1-Eft1))^2 -1 )*( ((1-Eft1*Details.Cr)/(1-Eft1))^2 - Details.Cr )^-1; end