# The dispersion model is built from a Taylor expansion with coefficients # given below. loss = 0 betas = np.array([ -0.024948815481502, 8.875391917212998e-05, -9.247462376518329e-08, 1.508210856829677e-10 ]) setup.dispersion_model = gnlse.DispersionFiberFromTaylor(loss, betas) # Input impulse parameters power = 10000 # pulse duration [ps] tfwhm = 0.05 # hyperbolic secant setup.impulse_model = gnlse.SechEnvelope(power, tfwhm) # 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])
setup = gnlse.GNLSESetup() # Numerical parameters setup.resolution = 2**14 setup.time_window = 12.5 # ps setup.z_saves = 400 # Input impulse parameters peak_power = 10000 # W duration = 0.050284 # ps # Physical parameters setup.wavelength = 835 # nm setup.fiber_length = 0.15 # m setup.nonlinearity = 0.11 # 1/W/m setup.impulse_model = gnlse.SechEnvelope(peak_power, duration) setup.self_steepening = True # The dispersion model is built from a Taylor expansion with coefficients # given below. loss = 0 betas = np.array([ -11.830e-3, 8.1038e-5, -9.5205e-8, 2.0737e-10, -5.3943e-13, 1.3486e-15, -2.5495e-18, 3.0524e-21, -1.7140e-24 ]) setup.dispersion_model = gnlse.DispersionFiberFromTaylor(loss, betas) # This example extends the original code with additional simulations for # three types of models of Raman response and no raman scattering case raman_models = { 'Blow-Wood': gnlse.raman_blowwood,
# The dispersion model is built from a Taylor expansion with coefficients # given below. loss = 0 betas = np.array([ -11.830e-3, 8.1038e-5, -9.5205e-8, 2.0737e-10, -5.3943e-13, 1.3486e-15, -2.5495e-18, 3.0524e-21, -1.7140e-24 ]) setup.dispersion_model = gnlse.DispersionFiberFromTaylor(loss, betas) # Input pulse parameters peak_power = 10000 # W duration = 0.050 # ps # This example extends the original code with additional simulations for pulse_models = [ gnlse.SechEnvelope(peak_power, duration), gnlse.GaussianEnvelope(peak_power, duration), gnlse.LorentzianEnvelope(peak_power, duration) ] count = len(pulse_models) plt.figure(figsize=(14, 8), facecolor='w', edgecolor='k') for i, pulse_model in enumerate(pulse_models): print('%s...' % pulse_model.name) setup.pulse_model = pulse_model solver = gnlse.GNLSE(setup) solution = solver.run() plt.subplot(2, count, i + 1) plt.title(pulse_model.name)
t0 = tFWHM / 2 / np.log(1 + np.sqrt(2)) # 3rd order soliton conditions ########################################################################### # Dispersive length LD = t0 ** 2 / np.abs(betas[0]) # Non-linear length for 3rd order soliton LNL = LD / (3 ** 2) # Input pulse: peak power [W] power = 1 / (LNL * setup.nonlinearity) # Length of soliton, in which it break dispersive characteristic Z0 = np.pi * LD / 2 # Fiber length [m] setup.fiber_length = .5 # Type of impulse: hyperbolic secant setup.impulse_model = gnlse.SechEnvelope(power, 0.050) # Loss coefficient [dB/m] loss = 0 # Type of dyspersion operator: build from Taylor expansion setup.dispersion_model = gnlse.DispersionFiberFromTaylor(loss, betas) # Type of Ramman scattering function: None (default) # Selftepening: not accounted setup.self_steepening = False # Simulation ########################################################################### solver = gnlse.gnlse.GNLSE(setup) solution = solver.run() # Visualization
import matplotlib.pyplot as plt import gnlse if __name__ == '__main__': # time full with half maximum of impulse FWHM = 2 # Time grid [ps] T = np.linspace(-2 * FWHM, 2 * FWHM, 1000 * FWHM) # peak power [W] Pmax = 100 # Amplitude envelope of gaussina impulse A1 = gnlse.GaussianEnvelope(Pmax, FWHM).A(T) # Amplitude envelope of hiperbolic secans impulse A2 = gnlse.SechEnvelope(Pmax, FWHM).A(T) # Amplitude envelope of lorentzian impulse A3 = gnlse.LorentzianEnvelope(Pmax, FWHM).A(T) plt.figure(figsize=(12, 8)) plt.subplot(1, 2, 1) plt.plot(T, A1, label='gauss') plt.plot(T, A2, label='sech') plt.plot(T, A3, label='lorentz') plt.xlabel("Time [ps]") plt.ylabel("Amplitude [sqrt(W)]") plt.legend() plt.subplot(1, 2, 2) plt.plot(T, A1**2, label='gauss') plt.plot(T, A2**2, label='sech')