# ------------------- wb_rms_r = 0.012 * lambda_pe # [m] RMS radius wb_rms_z = 0.036 * lambda_pe # [m] RMS length wb_tot_q = 0.100e-9 # [C] total charge of 100 pC wb_gamma = 100 # relativistic gamma factor wb_trail = 0.900 * lambda_pe # [m] trailing distance behind center of drive beam # ----------------- # Excercise some of the methods #------------------ print() print("*******") print("Calculate the maximum radius of the plasma bubble:") rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) print(" rb_max = ", rs_sigfig(rb_max*1.e6,3), " [microns]") print() print("*******") print("Calculate the 1st 'strong bubble' validity condition...") print("(bubble radius) / (plasma skin depth); it must be large:") strong_check_1 = rb_max*k_pe print(" 1st validity ratio = ", rs_sigfig(strong_check_1,3)) print() print("*******") print("Calculate the 2nd 'strong bubble' validity condition...") print("(scaled beam dens) / (plasma dens); it must be large:") strong_check_2 = beam_num_ptcl/n_pe/beam_tot_z**3 print(" 2nd validity ratio = ", rs_sigfig(strong_check_2,3))
def test_lbn_06(): rb = 0.4 * lambda_pe rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) drb_dxi_nb = lbn_wake.calc_drb_dxi_no_beam(rb, rb_max) assert rs_sigfig(drb_dxi_nb, 3) == rs_sigfig(1.32, 3)
def test_lbn_07(): rb = 0.4 * lambda_pe rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) Ez_nb = lbn_wake.calc_Ez_on_axis_no_beam(n_pe, rb, rb_max) assert rs_sigfig(Ez_nb * 1.e-9, 3) == rs_sigfig(-31.9, 3)
def test_lbn_04(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) p_beam_plasma = lbn_wake.calc_power_beam_plasma(n_pe, rb_max) assert rs_sigfig(p_beam_plasma, 3) == rs_sigfig(2.19e+20, 3)
def test_lbn_05(): rb = 0.4 * lambda_pe drb_dxi = 2.73861278753 Ez = lbn_wake.calc_Ez_on_axis(n_pe, rb, drb_dxi) assert rs_sigfig(Ez * 1.e-9, 3) == rs_sigfig(-66.2, 3)
def test_lbn_02(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) strong_check_1 = rb_max * k_pe assert rs_sigfig(strong_check_1, 3) == rs_sigfig(3.66, 3)
def test_lbn_03(): strong_check_2 = beam_num_ptcl / n_pe / beam_tot_z**3 assert rs_sigfig(strong_check_2, 3) == rs_sigfig(3.12, 3)
def test_lbn_01(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) assert rs_sigfig(rb_max * 1.e6, 3) == rs_sigfig(97.2, 3)
def test_lbn_11(): E_decel = lbn_wake.calc_E_decel_along_beam(n_pe, beam_tot_z, beam_num_ptcl) assert rs_sigfig(E_decel * 1.e-9, 3) == rs_sigfig(19.1, 3)
def test_lbn_10(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) xi_b = lbn_wake.calc_bubble_halfwidth(rb_max) rb = lbn_wake.calc_local_bubble_radius(xi_b, rb_max) assert rs_sigfig(rb * 1.e6, 3) == rs_sigfig(97.2, 3)
def test_lbn_09(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) xi_b = lbn_wake.calc_bubble_halfwidth(rb_max) xi = 0.3 * xi_b rb = lbn_wake.calc_local_bubble_radius(xi, rb_max) assert rs_sigfig(rb * 1.e6, 3) == rs_sigfig(77.7, 3)
def test_lbn_08(): rb_max = lbn_wake.calc_rb_max(n_pe, beam_tot_z, beam_num_ptcl) xi_b = lbn_wake.calc_bubble_halfwidth(rb_max) assert rs_sigfig(xi_b * 1.e6, 3) == rs_sigfig(82.3, 3)