'''This code is for Direct Expansion in Heating Mode''' from __future__ import division, absolute_import, print_function from ACHP.Cycle import DXCycleClass from ACHP.convert_units import F2K #Instantiate the class Cycle = DXCycleClass() #-------------------------------------- # Cycle parameters #-------------------------------------- Cycle.Verbosity = 0 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' #or it could be 'Charge' Cycle.DT_sc_target = 7.0 #Cycle.Charge_target = 3.3 #uncomment for use with imposed charge Cycle.Mode = 'HP' Cycle.Ref = 'R410A' Cycle.Backend = 'TTSE&HEOS' #Backend for refrigerant properties calculation: 'HEOS','TTSE&HEOS','BICUBIC&HEOS','REFPROP','SRK','PR' Cycle.Oil = 'POE32' Cycle.shell_pressure = 'low-pressure' Cycle.EvapSolver = 'Moving-Boundary' #choose the type of Evaporator solver scheme ('Moving-Boundary' or 'Finite-Element') Cycle.EvapType = 'Fin-tube' #if EvapSolver = 'Moving-Boundary', choose the type of evaporator ('Fin-tube' or 'Micro-channel') Cycle.CondSolver = 'Moving-Boundary' #choose the type of Condenser solver scheme ('Moving-Boundary' or 'Finite-Element') Cycle.CondType = 'Fin-tube' #if CondSolver = 'Moving-Boundary', choose the type of condenser ('Fin-tube' or 'Micro-channel') Cycle.Update() #-------------------------------------- # Charge correction parameters (activate by setting Cycle.ImposedVariable to 'Charge' and Cycle.ChargeMethod to either 'One-point' or 'Two-point') #-------------------------------------- Cycle.C = 0 #[kg] Cycle.K = 0 #[kg]
def SampleDXHPSystem(): ######################################################################### ###################### CYCLE INITIALIZATION ###################### ######################################################################### ## Here we load parameters that are not a function of operating conditions ## They are primarily geometric parameters Cycle = DXCycleClass() #-------------------------------------- #-------------------------------------- # Cycle parameters #-------------------------------------- #-------------------------------------- Cycle.Verbosity = 5 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' Cycle.DT_sc_target = 7.0 Cycle.Charge_target = 3.3 Cycle.Mode = 'HP' Cycle.Ref = 'R410A' Cycle.EvapSolver = 'Moving-Boundary' #choose the type of Evaporator solver scheme (for now only 'Moving-Boundary') Cycle.EvapType = 'Fin-tube' #if EvapSolver = 'Moving-Boundary', choose the type of evaporator (for now only 'Fin-tube') Cycle.CondSolver = 'Moving-Boundary' #choose the type of Condenser solver scheme (for now only 'Moving-Boundary') Cycle.CondType = 'Fin-tube' #if CondSolver = 'Moving-Boundary', choose the type of condenser ('Fin-tube' or 'Micro-channel') Cycle.Update() #-------------------------------------- #-------------------------------------- # Compressor parameters #-------------------------------------- #-------------------------------------- #A few 3 ton cooling capacity compressor maps if Cycle.Ref == 'R410A': M = [ 217.3163128, 5.094492028, -0.593170311, 4.38E-02, -2.14E-02, 1.04E-02, 7.90E-05, -5.73E-05, 1.79E-04, -8.08E-05 ] #compressor map coefficients P = [ -561.3615705, -15.62601841, 46.92506685, -0.217949552, 0.435062616, -0.442400826, 2.25E-04, 2.37E-03, -3.32E-03, 2.50E-03 ] params = { 'M': M, 'P': P, 'Ref': Cycle.Ref, #refrigerant 'fp': 0.0, #Fraction of electrical power lost as heat to ambient #shell heat loss 'Vdot_ratio': 1.0, #Displacement Scale factor #up- or downsize compressor (1=original) 'Verbosity': 0, # How verbose should the debugging statements be [0 to 10] 'DT_sh': 5. #Superheat at inlet to compressor [K] } Cycle.Compressor.Update(**params) #-------------------------------------- #-------------------------------------- # Condenser parameters # -> see GUI for illustration/units #-------------------------------------- #-------------------------------------- Cycle.Condenser.Fins.Tubes.NTubes_per_bank = 32 Cycle.Condenser.Fins.Tubes.Nbank = 3 Cycle.Condenser.Fins.Tubes.Ncircuits = 6 Cycle.Condenser.Fins.Tubes.Ltube = 0.452 Cycle.Condenser.Fins.Tubes.OD = 0.009525 Cycle.Condenser.Fins.Tubes.ID = 0.0089154 Cycle.Condenser.Fins.Tubes.Pl = 0.0254 Cycle.Condenser.Fins.Tubes.Pt = 0.0219964 Cycle.Condenser.Fins.Tubes.kw = 237 #wall thermal conductivity (i.e pipe material) Cycle.Condenser.Fins.Fins.FPI = 14.5 Cycle.Condenser.Fins.Fins.Pd = 0.001 Cycle.Condenser.Fins.Fins.xf = 0.001 Cycle.Condenser.Fins.Fins.t = 0.00011 Cycle.Condenser.Fins.Fins.k_fin = 237 Cycle.Condenser.Fins.Air.Vdot_ha = 0.5663 Cycle.Condenser.Fins.Air.Tmean = F2K(70) Cycle.Condenser.Fins.Air.Tdb = F2K(70) Cycle.Condenser.Fins.Air.p = 101325 Cycle.Condenser.Fins.Air.RH = 0.51 Cycle.Condenser.Fins.Air.RHmean = 0.51 Cycle.Condenser.Fins.Air.FanPower = 438 params = { 'Verbosity': 0, 'FinsType': 'WavyLouveredFins' #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' } Cycle.Condenser.Update(**params) #-------------------------------------- #-------------------------------------- # Evaporator # -> see Condenser and GUI for explanations #-------------------------------------- #-------------------------------------- Cycle.Evaporator.Fins.Tubes.NTubes_per_bank = 41 #number of tubes per bank=row Cycle.Evaporator.Fins.Tubes.Nbank = 1 #number of banks/rows Cycle.Evaporator.Fins.Tubes.Ncircuits = 5 Cycle.Evaporator.Fins.Tubes.Ltube = 2.286 Cycle.Evaporator.Fins.Tubes.OD = 0.007 Cycle.Evaporator.Fins.Tubes.ID = 0.0063904 Cycle.Evaporator.Fins.Tubes.Pl = 0.0191 #distance between center of tubes in flow direction Cycle.Evaporator.Fins.Tubes.Pt = 0.0222 #distance between center of tubes orthogonal to flow direction Cycle.Evaporator.Fins.Fins.FPI = 25 #Number of fins per inch Cycle.Evaporator.Fins.Fins.Pd = 0.001 #2* amplitude of wavy fin Cycle.Evaporator.Fins.Fins.xf = 0.001 #1/2 period of fin Cycle.Evaporator.Fins.Fins.t = 0.00011 #Thickness of fin material Cycle.Evaporator.Fins.Fins.k_fin = 237 #Thermal conductivity of fin material Cycle.Evaporator.Fins.Air.Vdot_ha = 1.7934 #rated volumetric flowrate Cycle.Evaporator.Fins.Air.Tmean = F2K(47) Cycle.Evaporator.Fins.Air.Tdb = F2K(47) #Dry Bulb Temperature Cycle.Evaporator.Fins.Air.p = 101325 #Air pressure in Pa Cycle.Evaporator.Fins.Air.RH = 0.51 #Relative Humidity Cycle.Evaporator.Fins.Air.FanPower = 160 Cycle.Evaporator.Fins.Air.RHmean = 0.51 params = { 'Ref': Cycle.Ref, 'Verbosity': 0, 'DT_sh': 5, 'FinsType': 'WavyLouveredFins' #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' } Cycle.Evaporator.Update(**params) params = { 'L': 7.6, 'k_tube': 0.19, 't_insul': 0.02, 'k_insul': 0.036, 'T_air': 297, 'Ref': Cycle.Ref, 'h_air': 6, 'LineSetOption': 'Off' } Cycle.LineSetSupply.Update(**params) Cycle.LineSetReturn.Update(**params) Cycle.LineSetSupply.OD = 0.01905 Cycle.LineSetSupply.ID = 0.017526 Cycle.LineSetReturn.OD = 0.009525 Cycle.LineSetReturn.ID = 0.007986 #Now solve Cycle.PreconditionedSolve()
from ACHP.Cycle import DXCycleClass #Instantiate the cycle class Cycle=DXCycleClass() #-------------------------------------- # Cycle parameters #-------------------------------------- Cycle.Verbosity = 0 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' Cycle.DT_sc_target = 7.0 Cycle.Mode='AC' Cycle.Ref='R410A' #-------------------------------------- # Compressor parameters #-------------------------------------- #A 3 ton cooling capacity compressor map M=[217.3163128,5.094492028,-0.593170311,4.38E-02,-2.14E-02, 1.04E-02,7.90E-05,-5.73E-05,1.79E-04,-8.08E-05] P=[-561.3615705,-15.62601841,46.92506685,-0.217949552, 0.435062616,-0.442400826,2.25E-04,2.37E-03,-3.32E-03,2.50E-03] params={ 'M':M, 'P':P, 'Ref':Cycle.Ref, #Refrigerant 'fp':0.0, #Fraction of electrical power lost as heat to ambient 'Vdot_ratio': 1.0, #Displacement Scale factor 'Verbosity': 0, # How verbose should the debugging be [0-10] }
def SampleDXACSystem(Calculate=True): """ A sample DX Air Conditioning system. This is based on the work of Bo Shen. """ ######################################################################### ###################### CYCLE INITIALIZATION ###################### ######################################################################### ## Here we load parameters that are not a function of operating conditions ## They are primarily geometric parameters Cycle = DXCycleClass() #-------------------------------------- #-------------------------------------- # Cycle parameters #-------------------------------------- #-------------------------------------- Cycle.Verbosity = 10 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' Cycle.DT_sc_target = 7.0 Cycle.Charge_target = 2.8 Cycle.Mode = 'AC' Cycle.Ref = 'R410A' Cycle.Backend = 'HEOS' #Backend for refrigerant properties calculation: 'HEOS','TTSE&HEOS','BICUBIC&HEOS','REFPROP','SRK','PR' Cycle.Oil = 'POE32' Cycle.shell_pressure = 'low-pressure' Cycle.TestName = 'DXAC-0014' #this and the two next lines can be used to specify exact test conditions Cycle.TestDescription = 'shows application of DXAC system' Cycle.TestDetails = 'This is the sample cycle for the DXAC system which can be modified for other systems' Cycle.EvapSolver = 'Moving-Boundary' #choose the type of Evaporator solver scheme (for now only 'Moving-Boundary'') Cycle.EvapType = 'Fin-tube' #if EvapSolver = 'Moving-Boundary', choose the type of evaporator (for now only 'Fin-tube') Cycle.CondSolver = 'Moving-Boundary' #choose the type of Condenser solver scheme (for now only 'Moving-Boundary') Cycle.CondType = 'Fin-tube' #if CondSolver = 'Moving-Boundary', choose the type of condenser ('Fin-tube' or 'Micro-channel') Cycle.Update() #-------------------------------------- #-------------------------------------- # Compressor parameters #-------------------------------------- #-------------------------------------- #A few 3 ton cooling capacity compressor maps if Cycle.Ref == 'R410A': M = [ 217.3163128, 5.094492028, -0.593170311, 4.38E-02, -2.14E-02, 1.04E-02, 7.90E-05, -5.73E-05, 1.79E-04, -8.08E-05 ] #compressor map coefficients P = [ -561.3615705, -15.62601841, 46.92506685, -0.217949552, 0.435062616, -0.442400826, 2.25E-04, 2.37E-03, -3.32E-03, 2.50E-03 ] params = { 'M': M, 'P': P, 'Ref': Cycle.Ref, #refrigerant 'Oil': Cycle.Oil, #Compressor lubricant oil 'V_oil_sump': 0, #Volume of oil in the sump 'shell_pressure': Cycle.shell_pressure, #Compressor shell pressure 'fp': 0.0, #Fraction of electrical power lost as heat to ambient #shell heat loss 'Vdot_ratio': 1.0, #Displacement Scale factor #up- or downsize compressor (1=original) 'Verbosity': 0, # How verbose should the debugging statements be [0 to 10] } Cycle.Compressor.Update(**params) #-------------------------------------- #-------------------------------------- # Condenser parameters # -> see GUI for illustration/units #-------------------------------------- #-------------------------------------- Cycle.Condenser.Fins.Tubes.NTubes_per_bank = 24 #number of tubes per bank=row Cycle.Condenser.Fins.Tubes.Nbank = 1 #number of banks/rows Cycle.Condenser.Fins.Tubes.Ncircuits = 3 Cycle.Condenser.Fins.Tubes.Ltube = 2.252 Cycle.Condenser.Fins.Tubes.OD = 0.00913 Cycle.Condenser.Fins.Tubes.ID = 0.00849 Cycle.Condenser.Fins.Tubes.Pl = 0.0191 #distance between center of tubes in flow direction Cycle.Condenser.Fins.Tubes.Pt = 0.0254 #distance between center of tubes orthogonal to flow direction Cycle.Condenser.Fins.Tubes.kw = 237 #wall thermal conductivity (i.e pipe material) Cycle.Condenser.Fins.Fins.FPI = 25 #Number of fins per inch Cycle.Condenser.Fins.Fins.Pd = 0.001 #2* amplitude of wavy fin Cycle.Condenser.Fins.Fins.xf = 0.001 #1/2 period of fin Cycle.Condenser.Fins.Fins.t = 0.00011 #Thickness of fin material Cycle.Condenser.Fins.Fins.k_fin = 237 #Thermal conductivity of fin material Cycle.Condenser.Fins.Air.Vdot_ha = 1.7934 #rated volumetric flowrate Cycle.Condenser.Fins.Air.Tmean = 308.15 Cycle.Condenser.Fins.Air.Tdb = Cycle.Condenser.Fins.Air.Tmean #Dry Bulb Temperature Cycle.Condenser.Fins.Air.p = 101325 #Air pressure in Pa Cycle.Condenser.Fins.Air.RH = 0.51 #Relative Humidity Cycle.Condenser.Fins.Air.RHmean = 0.51 Cycle.Condenser.Fins.Air.FanPower = 260 params = { 'Verbosity': 0, 'FinsType': 'WavyLouveredFins' #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' } Cycle.Condenser.Update(**params) # ---------------------------------- # Expanison device Parameters # ---------------------------------- params = { 'ExpType': 'Ideal', #expansion device type } Cycle.ExpDev.Update(**params) #-------------------------------------- #-------------------------------------- # Evaporator # -> see Condenser and GUI for explanations #-------------------------------------- #-------------------------------------- if hasattr(Cycle, 'TestName'): #update parameters for output list, if applicable Cycle.Evaporator.TestName = Cycle.TestName if hasattr(Cycle, 'TestDescription'): Cycle.Evaporator.TestDescription = Cycle.TestDescription if hasattr(Cycle, 'TestDetails'): Cycle.Evaporator.TestDetails = Cycle.TestDetails Cycle.Evaporator.Fins.Tubes.NTubes_per_bank = 32 #dimensional parameters Cycle.Evaporator.Fins.Tubes.Nbank = 3 Cycle.Evaporator.Fins.Tubes.Ltube = 0.452 Cycle.Evaporator.Fins.Tubes.OD = 0.00913 Cycle.Evaporator.Fins.Tubes.ID = 0.00849 Cycle.Evaporator.Fins.Tubes.Pl = 0.0191 Cycle.Evaporator.Fins.Tubes.Pt = 0.0254 Cycle.Evaporator.Fins.Tubes.Ncircuits = 5 Cycle.Evaporator.Fins.Tubes.kw = 237 #wall thermal conductivity (i.e pipe material) Cycle.Evaporator.Fins.Fins.FPI = 14.5 Cycle.Evaporator.Fins.Fins.Pd = 0.001 Cycle.Evaporator.Fins.Fins.xf = 0.001 Cycle.Evaporator.Fins.Fins.t = 0.00011 Cycle.Evaporator.Fins.Fins.k_fin = 237 Cycle.Evaporator.Fins.Air.Vdot_ha = 0.56319 Cycle.Evaporator.Fins.Air.Tmean = 297.039 Cycle.Evaporator.Fins.Air.Tdb = 297.039 Cycle.Evaporator.Fins.Air.p = 101325 Cycle.Evaporator.Fins.Air.RH = 0.5 Cycle.Evaporator.Fins.Air.RHmean = 0.5 Cycle.Evaporator.Fins.Air.FanPower = 438 params = { 'Ref': Cycle.Ref, 'Verbosity': 0, 'DT_sh': 5, 'FinsType': 'WavyLouveredFins' #Choose fin Type: 'WavyLouveredFins' or 'HerringboneFins'or 'PlainFins' } Cycle.Evaporator.Update(**params) params = { 'L': 7.6, 'k_tube': 0.19, 't_insul': 0.02, 'k_insul': 0.036, 'T_air': 297, 'Ref': Cycle.Ref, 'h_air': 0.0000000001 } Cycle.LineSetLiquid.Update(**params) Cycle.LineSetSuction.Update(**params) Cycle.LineSetLiquid.OD = 0.009525 Cycle.LineSetLiquid.ID = 0.007986 Cycle.LineSetSuction.OD = 0.01905 Cycle.LineSetSuction.ID = 0.017526 # ---------------------------------- # ---------------------------------- # Line Set Discharge Parameters # ---------------------------------- # ---------------------------------- params = { 'L': 0.3, #tube length in m 'k_tube': 0.19, 't_insul': 0, #no insulation 'k_insul': 0.036, 'T_air': 297, 'Ref': Cycle.Ref, 'h_air': 0.0000000001, 'LineSetOption': 'Off' } Cycle.LineSetDischarge.Update(**params) Cycle.LineSetDischarge.OD = 0.009525 Cycle.LineSetDischarge.ID = 0.007986 #Now solve if Calculate has not been set to False if Calculate == True: Cycle.PreconditionedSolve() return Cycle
from __future__ import print_function from ACHP.Cycle import DXCycleClass #Instantiate the cycle class Cycle = DXCycleClass() #-------------------------------------- # Cycle parameters #-------------------------------------- Cycle.Verbosity = 0 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' Cycle.DT_sc_target = 7.0 Cycle.Mode = 'AC' Cycle.Ref = 'R410A' Cycle.Backend = 'TTSE&HEOS' #Backend for refrigerant properties calculation: 'HEOS','TTSE&HEOS','BICUBIC&HEOS','REFPROP','SRK','PR' #-------------------------------------- # Compressor parameters #-------------------------------------- #A 3 ton cooling capacity compressor map M = [ 217.3163128, 5.094492028, -0.593170311, 4.38E-02, -2.14E-02, 1.04E-02, 7.90E-05, -5.73E-05, 1.79E-04, -8.08E-05 ] P = [ -561.3615705, -15.62601841, 46.92506685, -0.217949552, 0.435062616, -0.442400826, 2.25E-04, 2.37E-03, -3.32E-03, 2.50E-03 ] params = {
from ACHP.Cycle import DXCycleClass, F2K #Instantiate the class Cycle = DXCycleClass() #-------------------------------------- # Cycle parameters #-------------------------------------- Cycle.Verbosity = 0 #the idea here is to have different levels of debug output Cycle.ImposedVariable = 'Subcooling' #or it could be 'Charge' Cycle.DT_sc_target = 7.0 #Cycle.Charge_target = 3.3 #uncomment for use with imposed charge Cycle.Mode = 'HP' Cycle.Ref = 'R410A' #-------------------------------------- # Compressor parameters #-------------------------------------- #A few 3 ton cooling capacity compressor maps M = [ 217.3163128, 5.094492028, -0.593170311, 4.38E-02, -2.14E-02, 1.04E-02, 7.90E-05, -5.73E-05, 1.79E-04, -8.08E-05 ] P = [ -561.3615705, -15.62601841, 46.92506685, -0.217949552, 0.435062616, -0.442400826, 2.25E-04, 2.37E-03, -3.32E-03, 2.50E-03 ] params = { 'M': M, 'P': P,
def GUI2DXCycleInputs(GUI): #Create the basic structure of the DXCycle Cycle = DXCycleClass() M = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] #Empty list M[0] = float(GUI.txtCompM1.GetValue()) M[1] = float(GUI.txtCompM2.GetValue()) M[2] = float(GUI.txtCompM3.GetValue()) M[3] = float(GUI.txtCompM4.GetValue()) M[4] = float(GUI.txtCompM5.GetValue()) M[5] = float(GUI.txtCompM6.GetValue()) M[6] = float(GUI.txtCompM7.GetValue()) M[7] = float(GUI.txtCompM8.GetValue()) M[8] = float(GUI.txtCompM9.GetValue()) M[9] = float(GUI.txtCompM10.GetValue()) P = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] #Empty list P[0] = float(GUI.txtCompP1.GetValue()) P[1] = float(GUI.txtCompP2.GetValue()) P[2] = float(GUI.txtCompP3.GetValue()) P[3] = float(GUI.txtCompP4.GetValue()) P[4] = float(GUI.txtCompP5.GetValue()) P[5] = float(GUI.txtCompP6.GetValue()) P[6] = float(GUI.txtCompP7.GetValue()) P[7] = float(GUI.txtCompP8.GetValue()) P[8] = float(GUI.txtCompP9.GetValue()) P[9] = float(GUI.txtCompP10.GetValue()) Cycle.Compressor.M = M Cycle.Compressor.P = P Cycle.Compressor.fp = float(GUI.txtCompfp.GetValue()) Cycle.Compressor.Vdot_ratio = float(GUI.txtCompVdot_ratio.GetValue()) Cycle.Evaporator.DT_sh = float(GUI.txtCycleDTsh.GetValue()) if GUI.radCycleMode.GetStringSelection() == 'Cooling Mode': Cycle.Condenser.Fins.Air.Vdot_ha = float( GUI.txtCondenserAirVdot.GetValue()) Cycle.Condenser.Fins.Air.Tdb = float(GUI.txtCondenserAirTdb.GetValue()) Cycle.Condenser.Fins.Air.p = float(GUI.txtCondenserAirp.GetValue()) Cycle.Condenser.Fins.Air.RH = float(GUI.txtCondenserAirRH.GetValue()) Cycle.Condenser.Fins.Air.Tmean = float( GUI.txtCondenserAirTdb.GetValue()) Cycle.Condenser.Fins.Air.RHmean = float( GUI.txtCondenserAirRH.GetValue()) Cycle.Condenser.Fins.Tubes.NTubes_per_bank = int( GUI.txtCondenserTubesNtubes.GetValue()) Cycle.Condenser.Fins.Tubes.Nbank = int( GUI.txtCondenserTubesNbank.GetValue()) Cycle.Condenser.Fins.Tubes.Ltube = float( GUI.txtCondenserTubesL.GetValue()) Cycle.Condenser.Fins.Tubes.OD = float( GUI.txtCondenserTubesOD.GetValue()) Cycle.Condenser.Fins.Tubes.ID = float( GUI.txtCondenserTubesID.GetValue()) Cycle.Condenser.Fins.Tubes.Pl = float( GUI.txtCondenserTubesPl.GetValue()) Cycle.Condenser.Fins.Tubes.Pt = float( GUI.txtCondenserTubesPt.GetValue()) Cycle.Condenser.Fins.Tubes.Ncircuits = int( GUI.txtCondenserTubesNcircuit.GetValue()) Cycle.Condenser.Fins.Fins.FPI = float( GUI.txtCondenserFinFPI.GetValue()) Cycle.Condenser.Fins.Fins.Pd = float(GUI.txtCondenserFinpd.GetValue()) Cycle.Condenser.Fins.Fins.xf = float(GUI.txtCondenserFinxf.GetValue()) Cycle.Condenser.Fins.Fins.t = float(GUI.txtCondenserFint.GetValue()) Cycle.Condenser.Fins.Fins.k_fin = float( GUI.txtCondenserFink.GetValue()) Cycle.Condenser.Fins.Air.FanPower = float( GUI.txtCondenserPower.GetValue()) Cycle.Condenser.Verbosity = 0 Cycle.Evaporator.Fins.Air.Vdot_ha = float( GUI.txtCoolingCoilAirVdot.GetValue()) Cycle.Evaporator.Fins.Air.Tdb = float( GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.p = float(GUI.txtCoolingCoilAirp.GetValue()) Cycle.Evaporator.Fins.Air.RH = float( GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Evaporator.Fins.Air.Tmean = float( GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.RHmean = float( GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Evaporator.Fins.Tubes.NTubes_per_bank = float( GUI.txtCoolingCoilTubesNtubes.GetValue()) Cycle.Evaporator.Fins.Tubes.Nbank = float( GUI.txtCoolingCoilTubesNbank.GetValue()) Cycle.Evaporator.Fins.Tubes.Ltube = float( GUI.txtCoolingCoilTubesL.GetValue()) Cycle.Evaporator.Fins.Tubes.OD = float( GUI.txtCoolingCoilTubesOD.GetValue()) Cycle.Evaporator.Fins.Tubes.ID = float( GUI.txtCoolingCoilTubesID.GetValue()) Cycle.Evaporator.Fins.Tubes.Pl = float( GUI.txtCoolingCoilTubesPl.GetValue()) Cycle.Evaporator.Fins.Tubes.Pt = float( GUI.txtCoolingCoilTubesPt.GetValue()) Cycle.Evaporator.Fins.Tubes.Ncircuits = float( GUI.txtCoolingCoilTubesNcircuit.GetValue()) Cycle.Evaporator.Fins.Fins.FPI = float( GUI.txtCoolingCoilFinFPI.GetValue()) Cycle.Evaporator.Fins.Fins.Pd = float( GUI.txtCoolingCoilFinpd.GetValue()) Cycle.Evaporator.Fins.Fins.xf = float( GUI.txtCoolingCoilFinxf.GetValue()) Cycle.Evaporator.Fins.Fins.t = float(GUI.txtCoolingCoilFint.GetValue()) Cycle.Evaporator.Fins.Fins.k_fin = float( GUI.txtCoolingCoilFink.GetValue()) Cycle.Evaporator.Fins.Air.FanPower = float( GUI.txtCoolingCoilPower.GetValue()) Cycle.Evaporator.DT_sh = float(GUI.txtCycleDTsh.GetValue()) Cycle.Evaporator.Verbosity = 0 elif GUI.radCycleMode.GetStringSelection() == 'Heating Mode': Cycle.Evaporator.Fins.Air.Vdot_ha = float( GUI.txtCondenserAirVdot.GetValue()) Cycle.Evaporator.Fins.Air.Tdb = float( GUI.txtCondenserAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.p = float(GUI.txtCondenserAirp.GetValue()) Cycle.Evaporator.Fins.Air.RH = float(GUI.txtCondenserAirRH.GetValue()) Cycle.Evaporator.Fins.Air.Tmean = float( GUI.txtCondenserAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.RHmean = float( GUI.txtCondenserAirRH.GetValue()) Cycle.Evaporator.Fins.Tubes.NTubes_per_bank = int( GUI.txtCondenserTubesNtubes.GetValue()) Cycle.Evaporator.Fins.Tubes.Nbank = int( GUI.txtCondenserTubesNbank.GetValue()) Cycle.Evaporator.Fins.Tubes.Ltube = float( GUI.txtCondenserTubesL.GetValue()) Cycle.Evaporator.Fins.Tubes.OD = float( GUI.txtCondenserTubesOD.GetValue()) Cycle.Evaporator.Fins.Tubes.ID = float( GUI.txtCondenserTubesID.GetValue()) Cycle.Evaporator.Fins.Tubes.Pl = float( GUI.txtCondenserTubesPl.GetValue()) Cycle.Evaporator.Fins.Tubes.Pt = float( GUI.txtCondenserTubesPt.GetValue()) Cycle.Evaporator.Fins.Tubes.Ncircuits = int( GUI.txtCondenserTubesNcircuit.GetValue()) Cycle.Evaporator.Fins.Fins.FPI = float( GUI.txtCondenserFinFPI.GetValue()) Cycle.Evaporator.Fins.Fins.Pd = float(GUI.txtCondenserFinpd.GetValue()) Cycle.Evaporator.Fins.Fins.xf = float(GUI.txtCondenserFinxf.GetValue()) Cycle.Evaporator.Fins.Fins.t = float(GUI.txtCondenserFint.GetValue()) Cycle.Evaporator.Fins.Fins.k_fin = float( GUI.txtCondenserFink.GetValue()) Cycle.Evaporator.Fins.Air.FanPower = float( GUI.txtCondenserPower.GetValue()) Cycle.Evaporator.Verbosity = 0 Cycle.Condenser.Fins.Air.Vdot_ha = float( GUI.txtCoolingCoilAirVdot.GetValue()) Cycle.Condenser.Fins.Air.Tdb = float( GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Condenser.Fins.Air.p = float(GUI.txtCoolingCoilAirp.GetValue()) Cycle.Condenser.Fins.Air.RH = float(GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Condenser.Fins.Air.Tmean = float( GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Condenser.Fins.Air.RHmean = float( GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Condenser.Fins.Tubes.NTubes_per_bank = float( GUI.txtCoolingCoilTubesNtubes.GetValue()) Cycle.Condenser.Fins.Tubes.Nbank = float( GUI.txtCoolingCoilTubesNbank.GetValue()) Cycle.Condenser.Fins.Tubes.Ltube = float( GUI.txtCoolingCoilTubesL.GetValue()) Cycle.Condenser.Fins.Tubes.OD = float( GUI.txtCoolingCoilTubesOD.GetValue()) Cycle.Condenser.Fins.Tubes.ID = float( GUI.txtCoolingCoilTubesID.GetValue()) Cycle.Condenser.Fins.Tubes.Pl = float( GUI.txtCoolingCoilTubesPl.GetValue()) Cycle.Condenser.Fins.Tubes.Pt = float( GUI.txtCoolingCoilTubesPt.GetValue()) Cycle.Condenser.Fins.Tubes.Ncircuits = float( GUI.txtCoolingCoilTubesNcircuit.GetValue()) Cycle.Condenser.Fins.Fins.FPI = float( GUI.txtCoolingCoilFinFPI.GetValue()) Cycle.Condenser.Fins.Fins.Pd = float( GUI.txtCoolingCoilFinpd.GetValue()) Cycle.Condenser.Fins.Fins.xf = float( GUI.txtCoolingCoilFinxf.GetValue()) Cycle.Condenser.Fins.Fins.t = float(GUI.txtCoolingCoilFint.GetValue()) Cycle.Condenser.Fins.Fins.k_fin = float( GUI.txtCoolingCoilFink.GetValue()) Cycle.Condenser.Fins.Air.FanPower = float( GUI.txtCoolingCoilPower.GetValue()) Cycle.Condenser.Verbosity = 0 Cycle.LineSetSupply.L = float(GUI.txtLineSetL.GetValue()) Cycle.LineSetSupply.OD = float(GUI.txtLineSetOD_supply.GetValue()) Cycle.LineSetSupply.ID = float(GUI.txtLineSetID_supply.GetValue()) Cycle.LineSetSupply.t_insul = float(GUI.txtLineSetInsult.GetValue()) Cycle.LineSetSupply.k_tube = float(GUI.txtLineSetTubek.GetValue()) Cycle.LineSetSupply.k_insul = float(GUI.txtLineSetInsulk.GetValue()) Cycle.LineSetSupply.h_air = float(GUI.txtLineSeth_air.GetValue()) Cycle.LineSetSupply.T_air = float(GUI.txtLineSetT_air.GetValue()) Cycle.LineSetReturn.L = float(GUI.txtLineSetL.GetValue()) Cycle.LineSetReturn.OD = float(GUI.txtLineSetOD_return.GetValue()) Cycle.LineSetReturn.ID = float(GUI.txtLineSetID_return.GetValue()) Cycle.LineSetReturn.t_insul = float(GUI.txtLineSetInsult.GetValue()) Cycle.LineSetReturn.k_tube = float(GUI.txtLineSetTubek.GetValue()) Cycle.LineSetReturn.k_insul = float(GUI.txtLineSetInsulk.GetValue()) Cycle.LineSetReturn.h_air = float(GUI.txtLineSeth_air.GetValue()) Cycle.LineSetReturn.T_air = float(GUI.txtLineSetT_air.GetValue()) Cycle.Charge_target = float(GUI.txtCycleCharge.GetValue()) Cycle.DT_sc_target = float(GUI.txtCycleSubcooling.GetValue()) Cycle.Mode = 'AC' Cycle.Ref = str(GUI.cmbRefrigerant.GetValue()) Cycle.Verbosity = 10 Cycle.ParaPath = GUI.txtParaPath.GetValue() return Cycle
def GUI2DXCycleInputs(GUI): #Create the basic structure of the DXCycle Cycle=DXCycleClass() M=[0,0,0,0,0,0,0,0,0,0] #Empty list M[0]=float(GUI.txtCompM1.GetValue()) M[1]=float(GUI.txtCompM2.GetValue()) M[2]=float(GUI.txtCompM3.GetValue()) M[3]=float(GUI.txtCompM4.GetValue()) M[4]=float(GUI.txtCompM5.GetValue()) M[5]=float(GUI.txtCompM6.GetValue()) M[6]=float(GUI.txtCompM7.GetValue()) M[7]=float(GUI.txtCompM8.GetValue()) M[8]=float(GUI.txtCompM9.GetValue()) M[9]=float(GUI.txtCompM10.GetValue()) P=[0,0,0,0,0,0,0,0,0,0] #Empty list P[0]=float(GUI.txtCompP1.GetValue()) P[1]=float(GUI.txtCompP2.GetValue()) P[2]=float(GUI.txtCompP3.GetValue()) P[3]=float(GUI.txtCompP4.GetValue()) P[4]=float(GUI.txtCompP5.GetValue()) P[5]=float(GUI.txtCompP6.GetValue()) P[6]=float(GUI.txtCompP7.GetValue()) P[7]=float(GUI.txtCompP8.GetValue()) P[8]=float(GUI.txtCompP9.GetValue()) P[9]=float(GUI.txtCompP10.GetValue()) Cycle.Compressor.M=M Cycle.Compressor.P=P Cycle.Compressor.fp =float(GUI.txtCompfp.GetValue()) Cycle.Compressor.Vdot_ratio =float(GUI.txtCompVdot_ratio.GetValue()) Cycle.Evaporator.DT_sh =float(GUI.txtCycleDTsh.GetValue()) if GUI.radCycleMode.GetStringSelection()=='Cooling Mode': Cycle.Condenser.Fins.Air.Vdot_ha =float(GUI.txtCondenserAirVdot.GetValue()) Cycle.Condenser.Fins.Air.Tdb =float(GUI.txtCondenserAirTdb.GetValue()) Cycle.Condenser.Fins.Air.p =float(GUI.txtCondenserAirp.GetValue()) Cycle.Condenser.Fins.Air.RH =float(GUI.txtCondenserAirRH.GetValue()) Cycle.Condenser.Fins.Air.Tmean =float(GUI.txtCondenserAirTdb.GetValue()) Cycle.Condenser.Fins.Air.RHmean =float(GUI.txtCondenserAirRH.GetValue()) Cycle.Condenser.Fins.Tubes.NTubes_per_bank =int(GUI.txtCondenserTubesNtubes.GetValue()) Cycle.Condenser.Fins.Tubes.Nbank =int(GUI.txtCondenserTubesNbank.GetValue()) Cycle.Condenser.Fins.Tubes.Ltube =float(GUI.txtCondenserTubesL.GetValue()) Cycle.Condenser.Fins.Tubes.OD =float(GUI.txtCondenserTubesOD.GetValue()) Cycle.Condenser.Fins.Tubes.ID =float(GUI.txtCondenserTubesID.GetValue()) Cycle.Condenser.Fins.Tubes.Pl =float(GUI.txtCondenserTubesPl.GetValue()) Cycle.Condenser.Fins.Tubes.Pt =float(GUI.txtCondenserTubesPt.GetValue()) Cycle.Condenser.Fins.Tubes.Ncircuits =int(GUI.txtCondenserTubesNcircuit.GetValue()) Cycle.Condenser.Fins.Fins.FPI =float(GUI.txtCondenserFinFPI.GetValue()) Cycle.Condenser.Fins.Fins.Pd =float(GUI.txtCondenserFinpd.GetValue()) Cycle.Condenser.Fins.Fins.xf =float(GUI.txtCondenserFinxf.GetValue()) Cycle.Condenser.Fins.Fins.t =float(GUI.txtCondenserFint.GetValue()) Cycle.Condenser.Fins.Fins.k_fin =float(GUI.txtCondenserFink.GetValue()) Cycle.Condenser.Fins.Air.FanPower =float(GUI.txtCondenserPower.GetValue()) Cycle.Condenser.Verbosity =0 Cycle.Evaporator.Fins.Air.Vdot_ha =float(GUI.txtCoolingCoilAirVdot.GetValue()) Cycle.Evaporator.Fins.Air.Tdb =float(GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.p =float(GUI.txtCoolingCoilAirp.GetValue()) Cycle.Evaporator.Fins.Air.RH =float(GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Evaporator.Fins.Air.Tmean =float(GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.RHmean =float(GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Evaporator.Fins.Tubes.NTubes_per_bank =float(GUI.txtCoolingCoilTubesNtubes.GetValue()) Cycle.Evaporator.Fins.Tubes.Nbank =float(GUI.txtCoolingCoilTubesNbank.GetValue()) Cycle.Evaporator.Fins.Tubes.Ltube =float(GUI.txtCoolingCoilTubesL.GetValue()) Cycle.Evaporator.Fins.Tubes.OD =float(GUI.txtCoolingCoilTubesOD.GetValue()) Cycle.Evaporator.Fins.Tubes.ID =float(GUI.txtCoolingCoilTubesID.GetValue()) Cycle.Evaporator.Fins.Tubes.Pl =float(GUI.txtCoolingCoilTubesPl.GetValue()) Cycle.Evaporator.Fins.Tubes.Pt =float(GUI.txtCoolingCoilTubesPt.GetValue()) Cycle.Evaporator.Fins.Tubes.Ncircuits=float(GUI.txtCoolingCoilTubesNcircuit.GetValue()) Cycle.Evaporator.Fins.Fins.FPI =float(GUI.txtCoolingCoilFinFPI.GetValue()) Cycle.Evaporator.Fins.Fins.Pd =float(GUI.txtCoolingCoilFinpd.GetValue()) Cycle.Evaporator.Fins.Fins.xf =float(GUI.txtCoolingCoilFinxf.GetValue()) Cycle.Evaporator.Fins.Fins.t =float(GUI.txtCoolingCoilFint.GetValue()) Cycle.Evaporator.Fins.Fins.k_fin =float(GUI.txtCoolingCoilFink.GetValue()) Cycle.Evaporator.Fins.Air.FanPower =float(GUI.txtCoolingCoilPower.GetValue()) Cycle.Evaporator.DT_sh =float(GUI.txtCycleDTsh.GetValue()) Cycle.Evaporator.Verbosity =0 elif GUI.radCycleMode.GetStringSelection()=='Heating Mode': Cycle.Evaporator.Fins.Air.Vdot_ha =float(GUI.txtCondenserAirVdot.GetValue()) Cycle.Evaporator.Fins.Air.Tdb =float(GUI.txtCondenserAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.p =float(GUI.txtCondenserAirp.GetValue()) Cycle.Evaporator.Fins.Air.RH =float(GUI.txtCondenserAirRH.GetValue()) Cycle.Evaporator.Fins.Air.Tmean =float(GUI.txtCondenserAirTdb.GetValue()) Cycle.Evaporator.Fins.Air.RHmean =float(GUI.txtCondenserAirRH.GetValue()) Cycle.Evaporator.Fins.Tubes.NTubes_per_bank =int(GUI.txtCondenserTubesNtubes.GetValue()) Cycle.Evaporator.Fins.Tubes.Nbank =int(GUI.txtCondenserTubesNbank.GetValue()) Cycle.Evaporator.Fins.Tubes.Ltube =float(GUI.txtCondenserTubesL.GetValue()) Cycle.Evaporator.Fins.Tubes.OD =float(GUI.txtCondenserTubesOD.GetValue()) Cycle.Evaporator.Fins.Tubes.ID =float(GUI.txtCondenserTubesID.GetValue()) Cycle.Evaporator.Fins.Tubes.Pl =float(GUI.txtCondenserTubesPl.GetValue()) Cycle.Evaporator.Fins.Tubes.Pt =float(GUI.txtCondenserTubesPt.GetValue()) Cycle.Evaporator.Fins.Tubes.Ncircuits =int(GUI.txtCondenserTubesNcircuit.GetValue()) Cycle.Evaporator.Fins.Fins.FPI =float(GUI.txtCondenserFinFPI.GetValue()) Cycle.Evaporator.Fins.Fins.Pd =float(GUI.txtCondenserFinpd.GetValue()) Cycle.Evaporator.Fins.Fins.xf =float(GUI.txtCondenserFinxf.GetValue()) Cycle.Evaporator.Fins.Fins.t =float(GUI.txtCondenserFint.GetValue()) Cycle.Evaporator.Fins.Fins.k_fin =float(GUI.txtCondenserFink.GetValue()) Cycle.Evaporator.Fins.Air.FanPower =float(GUI.txtCondenserPower.GetValue()) Cycle.Evaporator.Verbosity =0 Cycle.Condenser.Fins.Air.Vdot_ha =float(GUI.txtCoolingCoilAirVdot.GetValue()) Cycle.Condenser.Fins.Air.Tdb =float(GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Condenser.Fins.Air.p =float(GUI.txtCoolingCoilAirp.GetValue()) Cycle.Condenser.Fins.Air.RH =float(GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Condenser.Fins.Air.Tmean =float(GUI.txtCoolingCoilAirTdb.GetValue()) Cycle.Condenser.Fins.Air.RHmean =float(GUI.txtCoolingCoilAirRH.GetValue()) Cycle.Condenser.Fins.Tubes.NTubes_per_bank =float(GUI.txtCoolingCoilTubesNtubes.GetValue()) Cycle.Condenser.Fins.Tubes.Nbank =float(GUI.txtCoolingCoilTubesNbank.GetValue()) Cycle.Condenser.Fins.Tubes.Ltube =float(GUI.txtCoolingCoilTubesL.GetValue()) Cycle.Condenser.Fins.Tubes.OD =float(GUI.txtCoolingCoilTubesOD.GetValue()) Cycle.Condenser.Fins.Tubes.ID =float(GUI.txtCoolingCoilTubesID.GetValue()) Cycle.Condenser.Fins.Tubes.Pl =float(GUI.txtCoolingCoilTubesPl.GetValue()) Cycle.Condenser.Fins.Tubes.Pt =float(GUI.txtCoolingCoilTubesPt.GetValue()) Cycle.Condenser.Fins.Tubes.Ncircuits=float(GUI.txtCoolingCoilTubesNcircuit.GetValue()) Cycle.Condenser.Fins.Fins.FPI =float(GUI.txtCoolingCoilFinFPI.GetValue()) Cycle.Condenser.Fins.Fins.Pd =float(GUI.txtCoolingCoilFinpd.GetValue()) Cycle.Condenser.Fins.Fins.xf =float(GUI.txtCoolingCoilFinxf.GetValue()) Cycle.Condenser.Fins.Fins.t =float(GUI.txtCoolingCoilFint.GetValue()) Cycle.Condenser.Fins.Fins.k_fin =float(GUI.txtCoolingCoilFink.GetValue()) Cycle.Condenser.Fins.Air.FanPower =float(GUI.txtCoolingCoilPower.GetValue()) Cycle.Condenser.Verbosity =0 Cycle.LineSetSupply.L =float(GUI.txtLineSetL.GetValue()) Cycle.LineSetSupply.OD =float(GUI.txtLineSetOD_supply.GetValue()) Cycle.LineSetSupply.ID =float(GUI.txtLineSetID_supply.GetValue()) Cycle.LineSetSupply.t_insul =float(GUI.txtLineSetInsult.GetValue()) Cycle.LineSetSupply.k_tube =float(GUI.txtLineSetTubek.GetValue()) Cycle.LineSetSupply.k_insul =float(GUI.txtLineSetInsulk.GetValue()) Cycle.LineSetSupply.h_air =float(GUI.txtLineSeth_air.GetValue()) Cycle.LineSetSupply.T_air =float(GUI.txtLineSetT_air.GetValue()) Cycle.LineSetReturn.L =float(GUI.txtLineSetL.GetValue()) Cycle.LineSetReturn.OD =float(GUI.txtLineSetOD_return.GetValue()) Cycle.LineSetReturn.ID =float(GUI.txtLineSetID_return.GetValue()) Cycle.LineSetReturn.t_insul =float(GUI.txtLineSetInsult.GetValue()) Cycle.LineSetReturn.k_tube =float(GUI.txtLineSetTubek.GetValue()) Cycle.LineSetReturn.k_insul =float(GUI.txtLineSetInsulk.GetValue()) Cycle.LineSetReturn.h_air =float(GUI.txtLineSeth_air.GetValue()) Cycle.LineSetReturn.T_air =float(GUI.txtLineSetT_air.GetValue()) Cycle.Charge_target=float(GUI.txtCycleCharge.GetValue()) Cycle.DT_sc_target=float(GUI.txtCycleSubcooling.GetValue()) Cycle.Mode='AC' Cycle.Ref=str(GUI.cmbRefrigerant.GetValue()) Cycle.Verbosity = 10 Cycle.ParaPath = GUI.txtParaPath.GetValue() return Cycle