def Update(self): ''' Update cycle class with selected HX type Update cycle class with Abstract State ''' if self.EvapSolver == 'Moving-Boundary': if self.EvapType == 'Fin-tube': self.Evaporator = EvaporatorClass() self.Evaporator.Fins = FinInputs() elif self.EvapType == 'Micro-channel': raise else: raise elif self.EvapSolver == 'Finite-Element': raise else: raise if self.CondSolver == 'Moving-Boundary': if self.CondType == 'Fin-tube': self.Condenser = CondenserClass() self.Condenser.Fins = FinInputs() elif self.CondType == 'Micro-channel': self.Condenser = MicroCondenserClass() self.Condenser.Fins = MicroFinInputs() else: raise elif self.CondSolver == 'Finite-Element': raise else: raise #Abstract State self.AS = CP.AbstractState(self.Backend, self.Ref)
def Update(self): ''' Update cycle class with selected HX type Update cyle class with Abstract State ''' if self.EvapSolver == 'Moving-Boundary': if self.EvapType == 'Fin-tube': self.Evaporator = EvaporatorClass() self.Evaporator.Fins = FinInputs() elif self.EvapType == 'Micro-channel': self.Evaporator = MicroChannelEvaporatorClass() self.Evaporator.Fins = MicroFinInputs() else: raise elif self.EvapSolver == 'Finite-Element': self.Evaporator = DiscretizeEvaporatorClass() else: raise if self.CondSolver == 'Moving-Boundary': if self.CondType == 'Fin-tube': self.Condenser = CondenserClass() self.Condenser.Fins = FinInputs() elif self.CondType == 'Micro-channel': self.Condenser = MicroCondenserClass() self.Condenser.Fins = MicroFinInputs() else: raise elif self.CondSolver == 'Finite-Element': self.Condenser = DiscretizeCondenserClass() else: raise #Abstract State self.AS = CP.AbstractState(self.Backend, self.Ref) if hasattr(self, 'MassFrac'): self.AS.set_mass_fractions([self.MassFrac]) elif hasattr(self, 'VoluFrac'): self.AS.set_volu_fractions([self.VoluFrac]) #Abstract State for SecLoopFluid self.AS_SLF = CP.AbstractState(self.Backend_SLF, self.SecLoopFluid) if hasattr(self, 'MassFrac_SLF'): self.AS_SLF.set_mass_fractions([self.MassFrac_SLF]) elif hasattr(self, 'VoluFrac_SLF'): self.AS_SLF.set_volu_fractions([self.VoluFrac_SLF])
def SampleMicroChannelGasCooler(): Fins = MicroFinInputs() Fins.Tubes.NTubes = 61.354 #Number of tubes (per bank for now!) Fins.Tubes.Nbank = 1 #Number of banks (set to 1 for now!) Fins.Tubes.Npass = 3 #Number of passes (per bank-averaged) Fins.Tubes.Nports = 1 #Number of rectangular ports Fins.Tubes.Ltube = 0.30213 #length of a single tube Fins.Tubes.Td = 0.0333 #Tube outside width (depth) Fins.Tubes.Ht = 0.002 #Tube outside height (major diameter) Fins.Tubes.b = 0.00635 #Tube spacing Fins.Tubes.tw = 0.0003 #Tube wall thickness Fins.Tubes.twp = 0.0003 #Port (channel) wall thickness Fins.Tubes.beta = 1 #Port (channel) aspect ratio (=width/height) Fins.Tubes.kw = 117 #wall thermal conductivity Fins.Fins.FPI = 11.0998 #Fin per inch Fins.Fins.Lf = 0.0333 #Fin length Fins.Fins.t = 0.000152 #Fin thickness Fins.Fins.k_fin = 117 #Fin thermal conductivity Fins.Air.Vdot_ha = 0.281 #rated volumetric flowrate (m^3/s) Fins.Air.Tmean = 29.4 + 273.15 Fins.Air.Tdb = 29.4 + 273.15 #Dry Bulb Temperature Fins.Air.p = 101325 #Air pressure in Pa Fins.Air.RH = 0.5 #Relative Humidity Fins.Air.RHmean = 0.5 Fins.Air.FanPower = 160 Fins.Louvers.Lalpha = 20 #Louver angle, in degree Fins.Louvers.lp = 0.001 #Louver pitch Fins.Louvers.Llouv = 0.005737 #Louver cut length #Abstract State Ref = 'R744' Backend = 'HEOS' #choose between: 'HEOS','TTSE&HEOS','BICUBIC&HEOS','REFPROP','SRK','PR' AS = CP.AbstractState(Backend, Ref) params = { 'AS': AS, 'mdot_r': 0.076, 'Tin_r': 110.6 + 273.15, 'psat_r': 11000000, 'Fins': Fins, 'FinsType': 'MultiLouveredMicroFins', 'Verbosity': 0, 'h_a_tuning': 1, 'h_r_tuning': 1, 'DP_tuning': 1, } GasCool = MicroChannelGasCoolerClass(**params) GasCool.Calculate() return GasCool
def SampleMicroCondenser(AS, T=95): Fins = MicroFinInputs() Fins.Tubes.NTubes = 61.354 #Number of tubes (per bank for now!) Fins.Tubes.Nbank = 1 #Number of banks (set to 1 for now!) Fins.Tubes.Npass = 3 #Number of passes (per bank-averaged) Fins.Tubes.Nports = 1 #Number of rectangular ports Fins.Tubes.Ltube = 0.30213 #length of a single tube Fins.Tubes.Td = 0.0333 #Tube outside width (depth) Fins.Tubes.Ht = 0.002 #Tube outside height (major diameter) Fins.Tubes.b = 0.00635 #Tube spacing Fins.Tubes.tw = 0.0003 #Tube wall thickness Fins.Tubes.twp = 0.0003 #Port (channel) wall thickness Fins.Tubes.beta = 1 #Port (channel) aspect ratio (=width/height) Fins.Tubes.kw = 117 #wall thermal conductivity Fins.Fins.FPI = 11.0998 #Fin per inch Fins.Fins.Lf = 0.0333 #Fin length Fins.Fins.t = 0.000152 #Fin thickness Fins.Fins.k_fin = 117 #Fin thermal conductivity Fins.Air.Vdot_ha = 1.05 #Air volume flow rate in m^3/s Fins.Air.Tmean = 298 Fins.Air.Tdb = 298 #Air inlet temperature, K Fins.Air.p = 100000 #Air pressure in Pa Fins.Air.RHmean = 0.5 Fins.Air.RH = 0.5 #Air inlet relative humidity Fins.Air.FanPower = 854.9 #Fan power, Watts Fins.Louvers.Lalpha = 20 #Louver angle, in degree Fins.Louvers.lp = 0.001 #Louver pitch Fins.Louvers.Llouv = 0.005737 #Louver cut length params = { 'AS': AS, 'mdot_r': 0.0683, 'Tin_r': T + 273.15, 'psat_r': 3500000, 'Fins': Fins, 'FinsType': 'MultiLouveredMicroFins', 'Verbosity': 0, 'h_a_tuning': 1, 'h_tp_tuning': 1, 'DP_tuning': 1 } MicroCond = MicroCondenserClass(**params) MicroCond.Calculate() return MicroCond
from __future__ import division, print_function, absolute_import import CoolProp as CP from CoolProp.CoolProp import PropsSI from ACHP.MicroChannelCondenser import MicroCondenserClass from ACHP.MicroFinCorrelations import MicroFinInputs from ACHP.convert_units import in2m, mm2m, cfm2cms, F2K, kPa2Pa, C2K Fins = MicroFinInputs() Fins.Tubes.NTubes = 30 #Number of tubes (per bank for now!) Fins.Tubes.Nbank = 2 #Number of banks (set to 1 for now!) Fins.Tubes.Npass = 2 #Number of passes (per bank) #averaged if not even Fins.Tubes.Nports = 11 #Number of rectangular ports Fins.Tubes.Ltube = in2m(18.24) #length of a single tube Fins.Tubes.Td = in2m(1) #Tube outside width (depth) Fins.Tubes.Ht = in2m(0.072) #Tube outside height (major diameter) Fins.Tubes.b = in2m(0.488) #Tube spacing Fins.Tubes.tw = in2m(0.015) #Tube wall thickness Fins.Tubes.twp = in2m(0.016) #Port (channel) wall thickness Fins.Tubes.beta = 1.7675 #Port (channel) aspect ratio (=width/height) Fins.Tubes.kw = 237 #Wall thermal conductivity Fins.Fins.FPI = 13 #Fin per inch Fins.Fins.Lf = in2m(1) #Fin length = tube outside width in this HX Fins.Fins.t = in2m(0.0045) ##measured## #Fin thickness Fins.Fins.k_fin = 117 #Fin thermal conductivity for pure Aluminum Fins.Air.Vdot_ha = cfm2cms(1500) #Air volume flow rate in m^3/s Fins.Air.Tdb = F2K(125) #Air inlet temperature, K Fins.Air.p = 101325 #Air inlet pressure in Pa Fins.Air.RH = 0.199 #Air inlet relative humidity Fins.Air.FanPower = 855 #Fan power, Watts
if __name__=='__main__': #Example usage for a parametric study from CoolProp.CoolProp import PropsSI import pylab num_points= 101 T_dews= np.linspace(265,292,num_points) TT= np.empty(num_points) Q_2p= np.empty(num_points) w_2p= np.empty(num_points) w_sh= np.empty(num_points) Q_tot= np.empty(num_points) h_2p= np.empty(num_points) h_sh= np.empty(num_points) FinsTubes=MicroFinInputs() FinsTubes.Tubes.NTubes=61.354 #Number of tubes (per bank for now!) FinsTubes.Tubes.Nbank=1 #Number of banks (set to 1 for now!) FinsTubes.Tubes.Npass=3 #Number of passes (per bank-averaged) FinsTubes.Tubes.Nports=1 #Number of rectangular ports FinsTubes.Tubes.Ltube=0.30213 #length of a single tube FinsTubes.Tubes.Td=0.0333 #Tube outside width (depth) FinsTubes.Tubes.Ht= 0.002 #Tube outside height (major diameter) FinsTubes.Tubes.b=0.00635 #Tube spacing FinsTubes.Tubes.tw=0.0003 #Tube wall thickness FinsTubes.Tubes.twp=0.0003 #Port (channel) wall thickness FinsTubes.Tubes.beta=1 #Port (channel) aspect ratio (=width/height) FinsTubes.Tubes.kw=117 #wall thermal conductivity FinsTubes.Fins.FPI=11.0998 #Fin per inch