Ejemplo n.º 1
0
    # Simulation
    ###########################################################################
    # Type of dyspersion operator: build from Taylor expansion
    setup.dispersion = gnlse.DispersionFiberFromTaylor(loss, betas)
    solver = gnlse.GNLSE(setup)
    solution = solver.run()

    # Visualization
    ###########################################################################
    plt.figure(figsize=(10, 8))

    plt.subplot(2, 2, 1)
    plt.title("Results for Taylor expansion")
    gnlse.plot_wavelength_vs_distance(solution, WL_range=[400, 1400])
    plt.subplot(2, 2, 3)
    gnlse.plot_delay_vs_distance(solution, time_range=[-.5, 5])

    # read mat file for neffs
    mat = gnlse.read_mat('../data/neff_pcf.mat')
    # neffs
    neff = mat['neff'][:, 1]
    # wavelengths in nm
    lambdas = mat['neff'][:, 0] * 1e9

    # Type of dyspersion operator: build from interpolation of given neffs
    setup.dispersion = gnlse.DispersionFiberFromInterpolation(
        loss, neff, lambdas, setup.wavelength)
    solver = gnlse.GNLSE(setup)
    solution = solver.run()

    # Visualization
Ejemplo n.º 2
0
    setup.self_steepening = False

    # Simulation
    ###########################################################################
    solver = gnlse.gnlse.GNLSE(setup)
    solution = solver.run()

    # Visualization
    ###########################################################################
    plt.figure(figsize=(15, 7))

    plt.subplot(2, 3, 1)
    plt.title("3rd order soliton")
    gnlse.plot_wavelength_vs_distance(solution, WL_range=[400, 1400])
    plt.subplot(2, 3, 4)
    gnlse.plot_delay_vs_distance(solution, time_range=[-.25, .25])

    # Type of Ramman scattering function: None (default)
    # Selftepening: accounted
    setup.self_steepening = True
    # Simulation
    ###########################################################################
    solver = gnlse.gnlse.GNLSE(setup)
    solution = solver.run()
    # Visualization
    ###########################################################################
    plt.subplot(2, 3, 2)
    plt.title("3rd order soliton\nwith self-steepening")
    gnlse.plot_wavelength_vs_distance(solution, WL_range=[400, 1400])
    plt.subplot(2, 3, 5)
    gnlse.plot_delay_vs_distance(solution, time_range=[-.25, .25])