Exemplo n.º 1
0
                    d_wire = d * 10**-6,
                    emissivity = 0.3, l_wire=l_wire*10**-2,
                    beam_shape="Flat", l_beam = l_beam* 10**-2, 

                    T_cracker = T_cracker,T_atoms = T_cracker,

                    phi_beam= (A_beam/ 10**-4) * 10**phi_exp, # Normalized to cm**2
                    T_base=wire_no_beam.record_dict["T_distribution"][-1]
                    )

                wire.simulate(n_steps=n_steps, record_steps=record_steps,
                            time_step=time_step)

                run_name = "lw_{}_phi_{}_Tc_{}".format(l_wire,phi_exp,
                            T_cracker)
                os.makedirs(plot_dir + "signal/", exist_ok=True)
                os.makedirs(plot_dir + "R_over_t/", exist_ok=True)
                wire.plot_signal(plot_dir + "signal/{}".format(run_name))
                wire.plot_R_over_t(plot_dir + "R_over_t/{}".format(run_name))
                os.makedirs(plot_dir + "heat_flow/", exist_ok=True)
                wire.plot_heat_flow(plot_dir + "heat_flow/{}".format(run_name))

                wire.save(results_dir + "{}".format(run_name))

                time_after = time()
                run_time = time_after - time_before
                print("finished run: " + run_name + "time required: " 
                        +  "{0:.2f} minutes".format(run_time/60))
                print("total time elapsed: {0:.2f} minutes".format(
                        (time() - start_time)/60.0))
Exemplo n.º 2
0
        phi_beam=0,
        T_base=None
        ###
    )

    # Run the Simulation
    n_steps = 20000
    record_steps = 1000
    time_step = 0.001
    wire_no_beam.simulate(n_steps=n_steps,
                          record_steps=record_steps,
                          time_step=time_step)

    # simulate with beam on
    wire = Wire(n_wire_elements=100,
                k_heat_conductivity=174,
                i_current=(d / 5)**2 * i_current,
                d_wire=d * 10**-6,
                emissivity=0.3,
                l_wire=5.45 * 10**-2,
                beam_shape="Gaussian",
                sigma_beam=6 * 10**-3,
                phi_beam=10**16,
                T_base=wire_no_beam.record_dict["T_distribution"][-1])

    wire.simulate(n_steps=n_steps,
                  record_steps=record_steps,
                  time_step=time_step)
    wire.plot_signal(top_dir + "plots/d_wire_{}".format(d))
    wire.plot_R_over_t(top_dir + "plots/R_over_t_{}um".format(d))
    wire.save(top_dir + "d_wire_{}".format(d))