def test_bk7(self): mat = dispersion.BK7(self.l1) data = [(.532e-6, 1.5195), (.6328e-6, 1.51502), (1.064e-6, 1.5066)] for d in data: w = 2 * np.pi * C.c / d[0] n = np.sqrt(1 + mat.chi(w / self.w1)) assert n == pytest.approx(d[1], 1e-4)
helper = input_tools.InputHelper(mks_length) mess = 'Processing input file...\n' # Setup pulse parameters theta = 0.0 # initial propagation angle a00 = 1.0 w00 = 1.0 r00 = 0.1 / mm # spot size of radiation rb = r00 * bundle_scale t00 = 500 / fs band = (0.9, 2.1) # Setup prism material = dispersion.BK7(mks_length) nrefr = np.sqrt(1 + material.chi(w00)[0]) prism_box = (1 / inch, 1 / inch, 0.75 / inch) refraction_angle = 30 / deg incidence_angle = np.arcsin(nrefr * np.sin(refraction_angle)) mess += 'TIR angle = ' + str(np.arcsin(1 / nrefr) * deg) + ' deg\n' # Set up dictionaries sim = {} wave = [] ray = [] optics = [] diagnostics = {} sim['mks_length'] = mks_length
bundle_scale = 1e-4 mm = 1000 * mks_length fs = 1e15 * mks_length / C.c helper = input_tools.InputHelper(mks_length) mess = 'Processing input file...\n' # Control parameters w00 = 1.0 theta = 0 # direction of propagation, 0 is +z lens_D = 100 / mm lens_R = 100 / mm lens_t = 30 / mm r00 = 10 / mm # spot size of radiation t_pulse = 100 / fs material = dispersion.BK7(mks_length) # Derived parameters nrefr = np.sqrt(1 + material.chi(w00)[0]) mess = mess + ' Lens refractive index at {:.0f} nm = {:.3f}\n'.format( 2 * np.pi * mks_length * 1e9, nrefr) f = 1 / (nrefr - 1) / (1 / lens_R + 1 / lens_R - (nrefr - 1) * lens_t / (nrefr * lens_R * lens_R)) mess = mess + ' thick lens focal length = {:.2f} meters\n'.format( f * mks_length) f_num = f / (2 * r00) t00, band = helper.TransformLimitedBandwidth(w00, t_pulse, 4) a00 = helper.InitialVectorPotential(w00, 1.0, f, f_num) rb = r00 * bundle_scale mess = mess + helper.ParaxialFocusMessage(w00, 1.0, f, f_num)
# Illustrates self focusing, self phase modulation, and group velocity dispersion in glass # Effects are most easily observed using the interactive viewer mks_length = 0.8e-6 / (2 * np.pi) sim = [] wave = [] ray = [] optics = [] diagnostics = [] mess = 'Processing input file...\n' # Preprocessing calculations helper = input_tools.InputHelper(mks_length) glass = dispersion.BK7(mks_length) # Suppress out of band frequencies glass.add_opacity_region(2000.0, 0.1e-6, 0.6e-6) glass.add_opacity_region(2000.0, 1.2e-6, 4e-6) w00 = 1.0 r00 = 100e-6 / mks_length a00 = helper.Wcm2_to_a0(6e12, 0.8e-6) chi3 = helper.mks_n2_to_chi3(1.5, 1e-20) mess = mess + ' a0 = ' + str(a00) + '\n' mess = mess + ' chi3 = ' + str(chi3) + '\n' # Setting the lower frequency bound to zero triggers carrier resolved treatment band = (0.0, 4.0) t00, pulse_band = helper.TransformLimitedBandwidth(w00, '15 fs', 1.0) # Work out the dispersion length
mks_length = 0.4e-6 / (2 * np.pi) bundle_scale = 1e-4 sim = [] wave = [] ray = [] optics = [] diagnostics = [] mess = 'Processing input file...\n' # Preprocessing calculations helper = input_tools.InputHelper(mks_length) w00 = 1.0 theta = 0 # direction of propagation, 0 is +z nrefr = np.sqrt(1 + dispersion.BK7(mks_length).chi(w00)[0]) mess = mess + ' BK7 Refractive index at {:.0f} nm = {:.3f}\n'.format( 2 * np.pi * mks_length * 1e9, nrefr) lens_D = 0.0024 / mks_length lens_R = 0.00142 / mks_length lens_t = 0.001 / mks_length f = 0.0025 / mks_length f_num = 8.0 r00 = 0.5 * f / f_num # spot size of radiation rb = r00 * bundle_scale t00, band = helper.TransformLimitedBandwidth(w00, '10 fs', 4) a00 = helper.InitialVectorPotential(w00, 1.0, f, f_num) mess = mess + helper.ParaxialFocusMessage(w00, 1.0, f, f_num) # Set up dictionaries
mks_length = 0.8e-6 / (2 * np.pi) sim = [] wave = [] ray = [] optics = [] diagnostics = [] mess = 'Processing input file...\n' # Preprocessing calculations helper = input_tools.InputHelper(mks_length) w00 = 1.0 theta = 0 # direction of propagation, 0 is +z nrefr = np.sqrt(1 + dispersion.BK7(mks_length).chi(w00)[0]) mess = mess + ' BK7 Refractive index at {:.0f} nm = {:.3f}\n'.format( 2 * np.pi * mks_length * 1e9, nrefr) lens_D = 0.1 / mks_length lens_R = 0.1 / mks_length lens_t = 0.03 / mks_length f = 1 / (nrefr - 1) / (1 / lens_R + 1 / lens_R - (nrefr - 1) * lens_t / (nrefr * lens_R * lens_R)) mess = mess + ' thick lens focal length = {:.2f} meters\n'.format( f * mks_length) r00 = .01 / mks_length # spot size of radiation f_num = f / (2 * r00) t00, band = helper.TransformLimitedBandwidth(w00, '100 fs', 4) a00 = helper.InitialVectorPotential(w00, 1.0, f, f_num) mess = mess + helper.ParaxialFocusMessage(w00, 1.0, f, f_num)
4.75 * inch + 0.5 * feet, -1.75 * inch + 3.5 * feet) SHG = (35 * cm, 10 * inch, 42 * inch - 1.75 * inch - 25 * cm) r0_mks = 0.005 # spot size at SHG crystal t0_mks = 10e-9 # pulse width U0_mks = 0.5 I0_mks = U0_mks / t0_mks / r0_mks**2 / (0.5 * np.pi)**1.5 w0_mks = C.c / mks_length eta0 = 1 / C.epsilon_0 / C.c E0_mks = np.sqrt(2 * eta0 * I0_mks) t00 = t0_mks * C.c / mks_length r00 = r0_mks / mks_length a00 = C.e * E0_mks / (C.m_e * w0_mks * C.c) nBK7 = np.sqrt(1 + dispersion.BK7(mks_length).chi(1.0)[0]) Rf100cm = (nBK7 - 1) / mks_length # radius of BK7 that gives f = 1 m mess += 'Laser intensity = {:.2g}'.format(I0_mks * 1e-4) + ' (W/cm^2)\n' mess += 'Normalized amplitude = {:.2g}'.format(a00) + '\n' # Set up dictionaries for i in range(1): sim.append({ 'mks_length': mks_length, 'mks_time': mks_length / C.c, 'message': mess })