def ORCSystem_Kortrijk(Inputs, run): """ The example refers to the ORC installation at UGent Campus Kortrijk. The ORC system includes: - three identical SWEP PHEX (evaporator, condenser, regenerator) - one Calpeda multi-stage centrifugal pump - a single-screw expander - a liquid receiver - linesets are used to calculate the refrigerant charge only """ #-------------------------------------- #-------------------------------------- # Expander parameters #-------------------------------------- #-------------------------------------- Cycle=ORCClass() exp_params = struct() exp_params.a_0 =-1.93529023e-03 exp_params.a_1 = -1.25256170e-02 exp_params.a_2 = -1.17292542e-01 exp_params.a_3 = -4.73874764e-02 exp_params.a_4 = 7.80410436e+00 exp_params.a_5 = 6.36530295e-04 exp_params.a_6 = 5.78187315e-01 exp_params.xi = 1.23877317e+00 exp_params.r_p_0_n = 3.07600000e+00 exp_params.delta_n = 7.08651674e-01 exp_params.r_p_max_n = 5.99558088e+00 exp_params.y_max_n = 5.19000000e-01 exp_params.N_rot_n = 3547 exp_params.N_ref = 3500 exp_params.N_FF_ref = 3000 exp_params.P_ref = 1000 exp_params.rp_ref = 6 exp_params.k_1 = 1.489 exp_params.k_2 = 0.3427 exp_params.k_3 = 0.8187 exp_params.k_4 = 0.1435 exp_params.k_5 = 0.0 Cycle.Expander.params = exp_params params={ 'N':Inputs['N_exp'], 'Ref':Inputs['Ref'], 'r_v_built':Inputs['r_v_built'], 'V_disp_compressor':Inputs['V_disp_compressor'], } Cycle.Expander.Update(**params) #-------------------------------------- #-------------------------------------- # Regenerator parameters #-------------------------------------- #-------------------------------------- params={ 'Ref_c':Inputs['Ref'], 'Ref_h':Inputs['Ref'], #Geometric parameters 11 kW Kortrijk: 3xSWEP B200T SC-M 'Bp' : 0.1635, 'Lp' : 0.4485, #Center-to-center distance between ports 'Nplates' : 150, 'PlateAmplitude' : 0.00102, #[m] 'PlateThickness' : 0.0003, #[m] 'PlateWavelength' : 0.0066, #[m] 'InclinationAngle' : pi/3,#[rad] 'PlateConductivity' : 15.0, #[W/m-K] 'MoreChannels' : 'Hot', #Which stream gets the extra channel, 'Hot' or 'Cold' 'Verbosity':0 #1 } Cycle.Regenerator.Update(**params) #-------------------------------------- #-------------------------------------- # Condenser parameters #-------------------------------------- #-------------------------------------- params={ 'Ref_c':Inputs['Ref_c'], 'Tin_c': Inputs['Tin_c'], 'pin_c': Inputs['pin_c'], 'Ref_h': Inputs['Ref'], #Geometric parameters 11 kW Kortrijk: 3xSWEP B200T SC-M 'Bp' : 0.1635, 'Lp' : 0.4485, #Center-to-center distance between ports 'Nplates' : 150, 'PlateAmplitude' : 0.00102, #[m] 'PlateThickness' : 0.0003, #[m] 'PlateWavelength' : 0.0066, #[m] 'InclinationAngle' : pi/3,#[rad] 'PlateConductivity' : 15.0, #[W/m-K] 'MoreChannels' : 'Hot', #Which stream gets the extra channel, 'Hot' or 'Cold' 'Verbosity':0 } Cycle.Condenser.Update(**params) #-------------------------------------- #-------------------------------------- # Evaporator #-------------------------------------- #-------------------------------------- params={ 'Ref_h':Inputs['Ref_h'], 'mdot_h':Inputs['mdot_h'], 'Tin_h':Inputs['Tin_h'], 'pin_h': Inputs['pin_h'], 'Ref_c':Inputs['Ref'], #Geometric parameters 11 kW Kortrijk: 3xSWEP B200T SC-M 'Bp' : 0.1635, 'Lp' : 0.4485, #Center-to-center distance between ports 'Nplates' : 150, 'PlateAmplitude' : 0.00102, #[m] 'PlateThickness' : 0.0003, #[m] 'PlateWavelength' : 0.0066, #[m] 'InclinationAngle' : pi/3,#[rad] 'PlateConductivity' : 15.0, #[W/m-K] 'MoreChannels' : 'Hot', #Which stream gets the extra channel, 'Hot' or 'Cold' 'Verbosity':0 } Cycle.Evaporator.Update(**params) #-------------------------------------- #-------------------------------------- # Pump #-------------------------------------- #-------------------------------------- #M are regression coefficients to compute the mass flow rate. #'eta' are regression coefficients to compute the isentropic efficiency. params={ 'eta':[-1.94559985e+03,2.61004607e+03,-2.24868329e+02,-1.31580710e+03, -3.41646308e+03,-6.16059114e+02,1.70061718e+03,-6.12847688e+03,-3.08159095e+03,-2.13581139e+02,1.12347642e+04, -1.91028124e+04,7.30201901e+03,2.57633083e+03,-5.00775452e+03,2.25464045e+02,-3.98897093e+02,-1.43095042e+04, 1.71628057e+04,4.38898501e+03,-3.82497930e+00,3.71939847e+02,1.77508114e+02,-5.73292533e+03,8.45941415e+03, 1.69904379e+03,5.55650945e+02,1.99756918e+04,-2.62485094e+04,-7.59467705e+02,-2.56645354e+02, -2.15969687e+01,-5.61487624e+03,2.84386468e+04,-3.23592011e+04,8.93600159e+03,-4.52678170e+03], 'M':[3.05754838e-01,-1.37732305e-03,-4.26385445e-07,-2.68106448e-02,1.98497578e-03], 'Ref': Inputs['Ref'], 'f_pp':Inputs['f_pp'], } Cycle.Pump.Update(**params) #-------------------------------------- #-------------------------------------- # Liquid Receiver #-------------------------------------- #-------------------------------------- params={ 'Ref': Inputs['Ref'], } Cycle.LiquidReceiver.Update(**params) #Select the cycle mode if Inputs['Regen'] == 'withoutRegen': Cycle.PreconditionedSolve(Inputs) elif Inputs['Regen'] == 'withRegen': Cycle.PreconditionedSolve_ORCRegen(Inputs) Cycle.ConvergencePlot() Cycle.BaselineTs_Celsius(Inputs) Write2CSV(Cycle,'ORC_Cycle.csv', append=run>0) print Cycle.OutputList()
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() if __name__ == '__main__': cycle = SampleDXACSystem() #Write the outputs to file Write2CSV(cycle.Evaporator, open('Evaporator.csv', 'w'), append=False) Write2CSV(cycle, open('Cycle.csv', 'w'), append=False) #append a second run with different temperauture new_outdoor_temp = 290 params = { 'Tin_a': new_outdoor_temp, } cycle.Condenser.Update(**params) cycle.Condenser.Fins.Air.Tdb = new_outdoor_temp cycle.TestName = 'DXAC-0018' #this and the two next lines can be used to specify exact test conditions cycle.TestDescription = 'another point' cycle.TestDetails = 'Here we changed the air temperature' cycle.Calculate( 5, 7.0) #Calculate(DT_evap,DT_cond), as defined in the DXCycleClass Write2CSV(cycle.Evaporator, open('Evaporator.csv', 'a'), append=True) Write2CSV(cycle, open('Cycle.csv', 'a'), append=True)
} MCE = MultiCircuitEvaporatorClass(**kwargs) MCE.Update(**kwargs) MCE.Calculate() print 'Q_standard_evap = ' + str(Evap.Q) + ' W' print 'Q_MCE = ' + str(MCE.Q) + ' W' print 'Heat transfer reduction due to maldisribution' + str( (MCE.Q - Evap.Q) * 100. / Evap.Q) + ' %' print "demonstrating output list\n", '=' * 20, '\n' print MCE.OutputList(), '\n', '=' * 20 csv_file = "Evaporator_MCE.csv" print "\n demonstrating write to csv", csv_file, '\n' Write2CSV(MCE, open(csv_file, 'w'), append=False) print "check MCE capacity summation", MCE.hin_r * MCE.mdot_r[-1], print np.sum([ MCE.Evaps[i].hin_r * MCE.Evaps[i].mdot_r for i in range(MCE.Fins.Tubes.Ncircuits) ]) # plot maldistribution h = np.array([MCE.Evaps[i].hout_r for i in range(len(MCE.Evaps))]) p = MCE.psat_r * (1 + 0 * h) plot = PropertyPlot('HEOS::R410A', 'PH', unit_system='KSI') plot.calc_isolines(CoolProp.iQ, num=2) plot.axis.plot(MCE.hin_r / 1000, MCE.psat_r / 1000, '>', label='Inlet') plot.axis.plot(h / 1000, p / 1000, 'x', label='Individual circuit exits') plot.axis.plot(MCE.hout_r / 1000,
'mdot_v_coeffs':[0.2,0.2,0.2,0.2,0.2], #Quality distribution at distributor 'Vdot_ha_coeffs':[0.2,0.2,0.2,0.2,0.2], #airside flow distribution 'psat_r': Props('P','T',Tdew,'Q',1.0,'R410A'), 'Fins': FinsTubes, 'hin_r':Props('H','T',Tdew,'Q',0,'R410A')*1000, 'Verbosity':0, 'TestName':'MCE-0014', #this and the two next lines can be used to specify exact test conditions 'TestDescription':'shows application of MCE', 'TestDetails':'This is the sample multi circuited evaporator' } MCE=MultiCircuitEvaporatorClass(**kwargs) MCE.Update(**kwargs) MCE.Calculate() print MCE.OutputList() Write2CSV(MCE,open('Evaporator_MCE.csv','w'),append=False) """ print 'Q='+str(MCE.Q)+' W' print MCE.hin_r*MCE.mdot_r[-1] print np.sum([MCE.Evaps[i].hin_r*MCE.Evaps[i].mdot_r for i in range(MCE.Fins.Tubes.Ncircuits)]) h=np.array([MCE.Evaps[i].hout_r for i in range(len(MCE.Evaps))]) p=MCE.psat_r*(1+0*h) # plott maldistribution Ph('R410A') pylab.plot(h/1000,p,'o') pylab.plot(MCE.hout_r/1000,MCE.psat_r,'o') pylab.show() print [MCE.Evaps[i].hout_r for i in range(len(MCE.Evaps))], MCE.hout_r, Props('H','T',MCE.Evaps[-1].Tdew_r,'Q',1,MCE.Evaps[-1].Ref)*1000 print [MCE.Evaps[i].DT_sh_calc for i in range(len(MCE.Evaps))] """