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 __init__(self): """ Load up the necessary sub-structures to be filled with the code that follows """ self.Compressor = CompressorClass() #Outdoor coil is a Condenser in cooling mode and evaporator in heating mode self.CoolingCoil = CoolingCoilClass() self.CoolingCoil.Fins = FinInputs() self.Pump = PumpClass() #Add both types of internal heat exchangers self.CoaxialIHX = CoaxialHXClass() self.PHEIHX = PHEHXClass() self.LineSetSupply = LineSetOptionClass() self.LineSetReturn = LineSetOptionClass() self.LineSetSuction = LineSetOptionClass() self.LineSetDischarge = LineSetOptionClass() self.LineSetLiquid = LineSetOptionClass() #Make IHX an empty class for holding parameters common to PHE and Coaxial IHX class struct: pass self.IHX = struct()
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 __init__(self): """ Load up the necessary sub-structures to be filled with the code that follows """ self.Compressor = CompressorClass() self.CoolingCoil = CoolingCoilClass() self.CoolingCoil.Fins = FinInputs() self.PHEHX = PHEHXClass() self.Pump = PumpClass()
def SampleGasCooler(AS): Fins = FinInputs() Fins.Tubes.NTubes_per_bank = 18 #number of tubes per bank or row Fins.Tubes.Nbank = 3 #number of banks or rows Fins.Tubes.Ncircuits = 1 #number of circuits Fins.Tubes.Ltube = 0.61 #one tube length Fins.Tubes.OD = 7.9 / 1000 Fins.Tubes.ID = 7.5 / 1000 Fins.Tubes.Pl = 19 / 1000 #distance between center of tubes in flow direction Fins.Tubes.Pt = 25 / 1000 #distance between center of tubes orthogonal to flow direction Fins.Tubes.kw = 237 #wall thermal conductivity (i.e pipe material) Fins.Fins.FPI = 1 / (1.5 / 1000 / 0.0254) #Number of fins per inch Fins.Fins.Pd = 0.001 #2* amplitude of wavy fin Fins.Fins.xf = 0.001 #1/2 period of fin Fins.Fins.t = 0.13 / 1000 #Thickness of fin material Fins.Fins.k_fin = 237 #Thermal conductivity of fin material 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 params = { 'AS': AS, 'mdot_r': 0.076, 'Tin_r': 110.6 + 273.15, 'psat_r': 11000000, 'Fins': Fins, 'FinsType': 'WavyLouveredFins', #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' 'Verbosity': 0, 'h_a_tuning': 1, 'h_r_tuning': 1, 'DP_tuning': 1, } Cond = GasCoolerClass(**params) Cond.Calculate() return Cond
def SampleCondenser(AS, T=41.37): Fins = FinInputs() Fins.Tubes.NTubes_per_bank = 41 #number of tubes per bank or row Fins.Tubes.Nbank = 1 #number of banks or rows Fins.Tubes.Ncircuits = 5 #number of circuits Fins.Tubes.Ltube = 2.286 #one tube length Fins.Tubes.OD = 0.007 Fins.Tubes.ID = 0.0063904 Fins.Tubes.Pl = 0.0191 #distance between center of tubes in flow direction Fins.Tubes.Pt = 0.0222 #distance between center of tubes orthogonal to flow direction Fins.Tubes.kw = 237 #Wall thermal conductivity Fins.Fins.FPI = 25 #Number of fins per inch Fins.Fins.Pd = 0.001 #2* amplitude of wavy fin Fins.Fins.xf = 0.001 #1/2 period of fin Fins.Fins.t = 0.00011 #Thickness of fin material Fins.Fins.k_fin = 237 #Thermal conductivity of fin material Fins.Air.Vdot_ha = 1.7934 #rated volumetric flowrate Fins.Air.Tmean = 308.15 Fins.Air.Tdb = 308.15 #Dry Bulb Temperature Fins.Air.p = 101325 #Air pressure in Pa Fins.Air.RH = 0.51 #Relative Humidity Fins.Air.RHmean = 0.51 Fins.Air.FanPower = 160 params = { 'AS': AS, #Abstract State 'mdot_r': 0.0708, 'Tin_r': T + 20 + 273.15, 'psat_r': 2500076.19, #PropsSI('P','T',T+273.15,'Q',1.0,'R410A') 'Fins': Fins, 'FinsType': 'HerringboneFins', #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' 'Verbosity': 0, 'h_a_tuning': 1, 'h_tp_tuning': 1, 'DP_tuning': 1, } Cond = CondenserClass(**params) Cond.Calculate() return Cond
def TestCase(AS_g): CC=CoolingCoilClass() FinsTubes=FinInputs() FinsTubes.Tubes.NTubes_per_bank=32 FinsTubes.Tubes.Nbank=3 FinsTubes.Tubes.Ncircuits=5 FinsTubes.Tubes.Ltube=0.452 FinsTubes.Tubes.OD=0.009525 FinsTubes.Tubes.ID=0.0089154 FinsTubes.Tubes.Pl=0.0254 FinsTubes.Tubes.Pt=0.0219964 FinsTubes.Tubes.kw=237 #wall thermal conductivity (i.e pipe material) FinsTubes.Fins.FPI=14.5 FinsTubes.Fins.Pd=0.001 FinsTubes.Fins.xf=0.001 FinsTubes.Fins.t=0.00011 FinsTubes.Fins.k_fin=237 FinsTubes.Air.Vdot_ha=0.5663 FinsTubes.Air.Tmean=299.8 FinsTubes.Air.Tdb= 299.8 FinsTubes.Air.p=101325 FinsTubes.Air.RH=0.51 FinsTubes.Air.RHmean=0.51 FinsTubes.Air.FanPower=438 CC.Fins = FinsTubes CC.FinsType = 'WavyLouveredFins' #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' CC.AS_g = AS_g CC.mdot_g = 0.15 CC.Tin_g = 278 CC.pin_g = 300000 CC.Verbosity = 3 CC.Calculate() print (CC.OutputList())
from __future__ import print_function from CoolProp.CoolProp import PropsSI from ACHP.Condenser import CondenserClass from ACHP.FinCorrelations import FinInputs Fins = FinInputs() Fins.Tubes.NTubes_per_bank = 41 #number of tubes per bank or row Fins.Tubes.Nbank = 1 #number of banks or rows Fins.Tubes.Ncircuits = 5 #number of circuits Fins.Tubes.Ltube = 2.286 #one tube length Fins.Tubes.OD = 0.007 Fins.Tubes.ID = 0.0063904 Fins.Tubes.Pl = 0.0191 #distance between center of tubes in flow direction Fins.Tubes.Pt = 0.0222 #distance between center of tubes orthogonal to flow direction Fins.Fins.FPI = 25 #Number of fins per inch Fins.Fins.Pd = 0.001 #2* amplitude of wavy fin Fins.Fins.xf = 0.001 #1/2 period of fin Fins.Fins.t = 0.00011 #Thickness of fin material Fins.Fins.k_fin = 237 #Thermal conductivity of fin material Fins.Air.Vdot_ha = 1.7934 #rated volumetric flowrate Fins.Air.Tdb = 308.15 #Dry Bulb Temperature Fins.Air.p = 101325 #Air pressure in Pa Fins.Air.RH = 0.51 #Relative Humidity Fins.Air.FanPower = 160 params = { 'Ref': 'R410A', 'mdot_r': 0.0708,
from __future__ import division, print_function, absolute_import from ACHP.FinCorrelations import FinInputs from ACHP.Evaporator import EvaporatorClass from ACHP.MultiCircuitEvaporator import MultiCircuitEvaporatorClass import CoolProp as CP from CoolProp.CoolProp import PropsSI import numpy as np FinsTubes = FinInputs() FinsTubes.Tubes.NTubes_per_bank = 32 FinsTubes.Tubes.Ncircuits = 5 FinsTubes.Tubes.Nbank = 3 FinsTubes.Tubes.Ltube = 0.452 FinsTubes.Tubes.OD = 0.009525 FinsTubes.Tubes.ID = 0.0089154 FinsTubes.Tubes.Pl = 0.0254 FinsTubes.Tubes.Pt = 0.0219964 FinsTubes.Tubes.kw = 237 #Wall thermal conductivity FinsTubes.Fins.FPI = 14.5 FinsTubes.Fins.Pd = 0.001 FinsTubes.Fins.xf = 0.001 FinsTubes.Fins.t = 0.00011 FinsTubes.Fins.k_fin = 237 FinsTubes.Air.Vdot_ha = 0.5663 FinsTubes.Air.Tmean = 299.8 FinsTubes.Air.Tdb = 299.8 FinsTubes.Air.p = 101325 FinsTubes.Air.RH = 0.51
from __future__ import division #Make integer 3/2 give 1.5 in python 2.x from CoolProp.CoolProp import PropsSI import numpy as np import pylab as pylab from math import pi #from PyACHP.Correlations import AccelPressureDrop, LockhartMartinelli from ACHP.FinCorrelations import WavyLouveredFins, HerringboneFins, FinInputs, PlainFins #example evaporator FinsTubes = FinInputs() FinsTubes.Tubes.NTubes_per_bank = 32 FinsTubes.Tubes.Ncircuits = 5 FinsTubes.Tubes.Nbank = 6 FinsTubes.Tubes.Ltube = 0.452 FinsTubes.Tubes.OD = 0.009525 FinsTubes.Tubes.ID = 0.0089154 FinsTubes.Tubes.Pl = 0.0254 FinsTubes.Tubes.Pt = 0.0219964 FinsTubes.Fins.FPI = 14.5 FinsTubes.Fins.Pd = 0.001 FinsTubes.Fins.xf = 0.001 FinsTubes.Fins.t = 0.00011 FinsTubes.Fins.k_fin = 237 FinsTubes.Air.Vdot_ha = 0.5663 FinsTubes.Air.Tmean = 299.8 FinsTubes.Air.Tdb = 299.8 FinsTubes.Air.p = 101325 FinsTubes.Air.RH = 0.51