T_max = T_max_arr[n_d, n_p] = np.amax( wire.record_dict["T_distribution"][-1]) T_avg = T_avg_arr[n_d, n_p] = np.average( wire.record_dict["T_distribution"][-1]) if True: # Calculate endstate of heat flow x_lst = [ 1000 * ((i + 0.5) * wire.l_segment - (wire.l_wire / 2)) for i in range(wire.n_wire_elements) ] wire.T_distribution = wire.record_dict["T_distribution"][-1] f_el_arr = [wire.f_el(j) for j in range(wire.n_wire_elements)] f_conduction_arr = [ wire.f_conduction(j) for j in range(wire.n_wire_elements) ] f_rad_arr = [ wire.f_rad(j) for j in range(wire.n_wire_elements) ] f_beam_arr = [ wire.f_beam(j) for j in range(wire.n_wire_elements) ] # Plot endstate of heat flow fig = plt.figure(0, figsize=(8, 6.5)) ax1 = plt.gca() ax1.plot(x_lst, f_el_arr, "-", label=r"$F_{el}$") ax1.plot(x_lst, f_conduction_arr,
f_arr_full = np.zeros( (len(l_wire_list), len(exp_list), len(T_cracker_list), 6)) for n_lw, l_wire in enumerate(l_wire_list): for n_phi, phi_exp in enumerate(exp_list): for n_T, T_cracker in enumerate(T_cracker_list): run_name = "lw_{}_phi_{}_Tc_{}".format(l_wire, phi_exp, T_cracker) wire = Wire() wire = wire.load(top_dir + "results\\" + run_name) wire.plot_heat_flow(top_dir + "plots\\" + "heat_flow/log_{}".format(run_name), log_y=True) i = wire.n_wire_elements // 2 elem = [ wire.f_el(i), wire.f_conduction(i), wire.f_rad(i), wire.f_beam(i), wire.f_beam_gas(i), wire.f_bb(i) ] f_arr_full[n_lw, n_phi, n_T] = elem # Plot scaling of Heat flow with temperature with various if True: for n_lw, l_wire in enumerate(l_wire_list): for n_phi, phi_exp in enumerate(exp_list): fig = plt.figure(0, figsize=(8, 6.5)) ax1 = plt.gca() label_list = [ r"$F_{el}$", r"$F_{conduction}$", r"$F_{rad}$", r"$F_{beam}$",
f_arr_full = np.zeros((len(l_wire_list), len(exp_list), len(T_cracker_list) , 6 )) for n_lw, l_wire in enumerate(l_wire_list): for n_phi, phi_exp in enumerate(exp_list): for n_T, T_cracker in enumerate(T_cracker_list): run_name = "lw_{}_phi_{}_Tc_{}".format(l_wire,phi_exp, T_cracker) wire = Wire() wire = wire.load(top_dir + "results\\" + run_name) wire.plot_heat_flow(top_dir + "plots\\" + "heat_flow/log_{}".format(run_name) , log_y = True) i = wire.n_wire_elements // 2 elem = [wire.f_el(i), wire.f_conduction(i), wire.f_rad(i) , wire.f_beam(i), wire.f_beam_gas(i), wire.f_bb(i)] f_arr_full[n_lw, n_phi, n_T] = elem # Plot scaling of Heat flow with temperature with various if True: for n_lw, l_wire in enumerate(l_wire_list): for n_phi, phi_exp in enumerate(exp_list): fig = plt.figure(0, figsize=(8,6.5)) ax1=plt.gca() label_list = [r"$F_{el}$", r"$F_{conduction}$", r"$F_{rad}$" , r"$F_{beam}$", r"$F_{beam gas}$" , r"$F_{bb cracker}$"] color_list = ["C0", "C1", "C2", "C3", "C4", "C5"] for n_f in [3,4,5]: # f_beam, f_beam_gas, f_bb T_lst = T_cracker_list