Exemplo n.º 1
0
heat_flow_dir = top_dir + "heat_flow/"

l_wire_list = [  #5,
    2.7
]  # in cm
exp_list = [14, 15, 16, 17]
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
Exemplo n.º 2
0
fig = plt.figure(0, figsize=(8,6.5))
ax1=plt.gca()
top_dir_list = ["20um_phi_beam_sweep_taylor/", "20um_phi_beam_sweep/"]
#top_dir_list = ["10um_phi_beam_sweep_taylor/", "10um_phi_beam_sweep/"]
#top_dir_list = ["5um_phi_beam_sweep_taylor/", "5um_phi_beam_sweep/"]
label_list = [r"$F_{rad}$ Taylored", r"$F_{rad} \propto T^4$"]
exp_list = np.linspace(15,20,num = 21)
# Initialize Arrays
U_arr = np.zeros((len(top_dir_list), len(exp_list)))
T_max_arr = np.zeros((len(top_dir_list), len(exp_list)))
signal_arr = np.zeros((len(top_dir_list), len(exp_list)))
for j, top_dir in enumerate(top_dir_list):
    for i, phi_exp in enumerate(exp_list):
        wire = Wire()
        wire = wire.load(top_dir + "phi_to_{}".format(phi_exp))

        U_beam_off = wire.U_wire(0)
        U_beam_on = wire.U_wire(-1)
        
        U_delta = U_arr[j, i] = U_beam_on - U_beam_off
        signal = signal_arr[j, i] = U_delta / U_beam_off

        T_max = T_max_arr[j, i] = np.amax(wire.record_dict["T_distribution"]
                                          [-1])

    phi_list = 10**exp_list

# Plot delta U vs Phi in atoms/s
fig = plt.figure(0, figsize=(8,6.5))
ax1=plt.gca()
Exemplo n.º 3
0
U_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
signal_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
for n_lw, l_wire in enumerate(l_wire_list):
    # Initialize Arrays
    U_arr = np.zeros((len(i_current_list)))
    T_max_arr = np.zeros((len(i_current_list)))
    T_avg_arr = np.zeros((len(i_current_list)))
    signal_arr = np.zeros((len(i_current_list)))
    R_arr = np.zeros((len(i_current_list)))
    for n_i, i_current in enumerate(i_current_list):
        run_name = "lw_{}_i_{}".format(l_wire, i_current)
        #TODO Include enumerates, output plots for every i_current
        wire = Wire()
        #wire = wire.load(top_dir + "0.02mbar_air\\" + "results\\" + run_name)
        wire = wire.load(top_dir + "0.02mbar_air_em_{}\\".format(emissivity) +
                         "results\\" + run_name)
        #l_beam = wire.l_beam

        U_beam_off = wire.U_wire(0)
        U_beam_on = wire.U_wire(-1)

        U_delta = U_arr[n_i] = U_beam_on - U_beam_off
        signal = signal_arr[n_i] = U_delta / U_beam_off

        T_max = T_max_arr[n_i] = np.amax(
            wire.record_dict["T_distribution"][-1])
        T_avg = T_avg_arr[n_i] = np.average(
            wire.record_dict["T_distribution"][-1])

        R_arr[n_i] = wire.resistance_total()
    U_arr_full[n_lw] = U_arr
Exemplo n.º 4
0
]  # in cm

U_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
signal_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
for n_lw, l_wire in enumerate(l_wire_list):
    # Initialize Arrays
    U_arr = np.zeros((len(i_current_list)))
    T_max_arr = np.zeros((len(i_current_list)))
    T_avg_arr = np.zeros((len(i_current_list)))
    signal_arr = np.zeros((len(i_current_list)))
    R_arr = np.zeros((len(i_current_list)))
    for n_i, i_current in enumerate(i_current_list):
        run_name = "lw_{}_i_{}".format(l_wire, i_current)
        #TODO Include enumerates, output plots for every i_current
        wire = Wire()
        wire = wire.load(top_dir + "0.02mbar_air\\" + "results\\" + run_name)
        #l_beam = wire.l_beam

        U_beam_off = wire.U_wire(0)
        U_beam_on = wire.U_wire(-1)

        U_delta = U_arr[n_i] = U_beam_on - U_beam_off
        signal = signal_arr[n_i] = U_delta / U_beam_off

        T_max = T_max_arr[n_i] = np.amax(
            wire.record_dict["T_distribution"][-1])
        T_avg = T_avg_arr[n_i] = np.average(
            wire.record_dict["T_distribution"][-1])

        R_arr[n_i] = wire.resistance_total()
    U_arr_full[n_lw] = U_arr
Exemplo n.º 5
0
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import matplotlib.patches as mpatches
import os
import dill
from Wire_detector import Wire

top_dir = os.path.dirname(os.path.abspath(__file__)) + "\\"

wire = Wire()
wire = wire.load("10um_phi_beam_sweep/" + "phi_to_17.0")
wire.taylor_f_rad = False
animate_dir = top_dir + "animate\\"
os.makedirs(animate_dir, exist_ok=True)

n_steps = 15000
record_steps = 150
time_step = 0.001
# ####### reproduce ohmic heating procedure
# wire_no_beam = wire
# wire_no_beam.T_base = None
# wire_no_beam.phi_beam = 0
# wire_no_beam.taylor_f_rad = False

# wire_no_beam.simulate(n_steps=n_steps, record_steps=record_steps,
#                      time_step=time_step)
# wire_no_beam.save(animate_dir + "base_heating")
# #######
wire_no_beam = Wire()
Exemplo n.º 6
0
U_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
signal_arr_full = np.zeros((len(l_wire_list), len(i_current_list)))
for n_lw, l_wire in enumerate(l_wire_list):
    # Initialize Arrays
    U_arr = np.zeros((len(i_current_list)))
    T_max_arr = np.zeros((len(i_current_list)))
    T_avg_arr = np.zeros((len(i_current_list)))
    signal_arr = np.zeros((len(i_current_list)))
    R_arr = np.zeros((len(i_current_list)))
    for n_i, i_current in enumerate(i_current_list):
        run_name = "lw_{}_i_{}".format(l_wire, i_current)
        #TODO Include enumerates, output plots for every i_current
        wire = Wire()
        #wire = wire.load(top_dir + "0.02mbar_air\\" + "results\\" + run_name)
        wire = wire.load(top_dir +
                         "{}mbar_air_em_{}\\".format(pressure, emissivity) +
                         "results\\" + run_name)
        wire.gen_k_heat_cond_function()
        #l_beam = wire.l_beam

        U_beam_off = wire.U_wire(0)
        U_beam_on = wire.U_wire(-1)

        U_delta = U_arr[n_i] = U_beam_on - U_beam_off
        signal = signal_arr[n_i] = U_delta / U_beam_off

        T_max = T_max_arr[n_i] = np.amax(
            wire.record_dict["T_distribution"][-1])
        T_avg = T_avg_arr[n_i] = np.average(
            wire.record_dict["T_distribution"][-1])