def test_raised_exception_method_selection_02(): """Test if an exception is raised if unknown method name is passed.""" with pytest.raises(ValueError): ac.calc_heat_flux(ddts=25, coef_s=0.42, coef_r=0.9, method='shaken_not_stirred')
def test_calc_heat_flux_generator(): """Test calculation of driving heat for chiller 'Broad_02'.""" Q_dots_gen = ac.calc_heat_flux(ddts=[110], coef_s=10.807, coef_r=-603.85, method='kuehn_and_ziegler') assert Q_dots_gen == [584.92]
def test_calc_heat_flux_evaporator(): """Test calculation of cooling capacity for chiller 'Broad_01'.""" Q_dots_evap = ac.calc_heat_flux(ddts=[50], coef_s=24.121, coef_r=-553.194, method='kuehn_and_ziegler') assert Q_dots_evap == [652.856]
'data/characteristic_parameters.csv') charpara = pd.read_csv(filename) chiller_name = 'Kuehn' t_cooling = [23, 25, 27, 29, 31, 33, 35, 36, 37, 38, 39, 40] ddt_75 = abs_hp_chiller.calc_characteristic_temp( t_hot=[75], t_cool=t_cooling, t_chill=[15], coef_a=charpara[(charpara['name'] == chiller_name)]['a'].values[0], coef_e=charpara[(charpara['name'] == chiller_name)]['e'].values[0], method='kuehn_and_ziegler') Q_dots_evap_75 = abs_hp_chiller.calc_heat_flux( ddts=ddt_75, coef_s=charpara[(charpara['name'] == chiller_name)]['s_E'].values[0], coef_r=charpara[(charpara['name'] == chiller_name)]['r_E'].values[0], method='kuehn_and_ziegler') Q_dots_gen_75 = abs_hp_chiller.calc_heat_flux( ddts=ddt_75, coef_s=charpara[(charpara['name'] == chiller_name)]['s_G'].values[0], coef_r=charpara[(charpara['name'] == chiller_name)]['r_G'].values[0], method='kuehn_and_ziegler') COPs_75 = [Qevap / Qgen for Qgen, Qevap in zip(Q_dots_gen_75, Q_dots_evap_75)] ddt_80 = abs_hp_chiller.calc_characteristic_temp( t_hot=[80], t_cool=t_cooling, t_chill=[15], coef_a=charpara[(charpara['name'] == chiller_name)]['a'].values[0], coef_e=charpara[(charpara['name'] == chiller_name)]['e'].values[0],