Exemplo n.º 1
0
T_cracker_list = [2400, 2200, 2000, 1800, 1000, 500, 300, 0]

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 = [
Exemplo n.º 2
0
#plt.show()

# Calculate heat flow over time
x_lst = [
    1000 * ((i + 0.5) * wire.l_segment - (wire.l_wire / 2))
    for i in range(wire.n_wire_elements)
]

t_lst = wire.record_dict["time"]
f_el_arr = np.zeros((record_steps + 1, wire.n_wire_elements))
f_conduction_arr = np.zeros((record_steps + 1, wire.n_wire_elements))
f_rad_arr = np.zeros((record_steps + 1, wire.n_wire_elements))
f_beam_arr = np.zeros((record_steps + 1, wire.n_wire_elements))
for i, time in enumerate(wire.record_dict["time"]):
    wire.T_distribution = wire.record_dict["T_distribution"][i]
    f_el_arr[i] = [wire.f_el(j) for j in range(wire.n_wire_elements)]
    f_conduction_arr[i] = [
        wire.f_conduction(j) for j in range(wire.n_wire_elements)
    ]
    f_rad_arr[i] = [wire.f_rad(j) for j in range(wire.n_wire_elements)]
    f_beam_arr[i] = [wire.f_beam(j) for j in range(wire.n_wire_elements)]

#Heat flow in ohmic heating lead up
t_lst_0 = wire_no_beam.record_dict["time"]
f_el_arr_0 = np.zeros((record_steps + 1, wire.n_wire_elements))
f_conduction_arr_0 = np.zeros((record_steps + 1, wire.n_wire_elements))
f_rad_arr_0 = np.zeros((record_steps + 1, wire.n_wire_elements))
f_beam_arr_0 = np.zeros((record_steps + 1, wire.n_wire_elements))
for i, time in enumerate(wire_no_beam.record_dict["time"]):
    wire_no_beam.T_distribution = wire_no_beam.record_dict["T_distribution"][i]
    f_el_arr_0[i] = [wire_no_beam.f_el(j) for j in range(wire.n_wire_elements)]
Exemplo n.º 3
0
            U_delta = U_arr[n_d, n_p] = U_beam_on - U_beam_off
            signal = signal_arr[n_d, n_p] = U_delta / U_beam_off

            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}$")
Exemplo n.º 4
0

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