Integration

This part of the module is its core, and it implements the split-step Fourier method to solve the Generalized Nonlinear Schrodiner Equation (GNLSE), which in time domain can be written as

\[\begin{split}\frac{\partial A(z,T)}{\partial z} = & -\frac{\alpha}{2}A(z,T) - \sum_{k\geq 2} \left(\frac{i^{k-1}}{k!}\beta_k \frac{\partial^k A(z,T)}{\partial T^k} \right) + \\ & + i\gamma\left(1 + \frac{i}{\omega_c} \frac{\partial}{\partial T} \right) \left( A(z,T) \int_{-\infty}^{+\infty} R(T') |A(z,T-T')|^2 dT' \right),\end{split}\]

where \(\alpha\) is the attenuation constant, and \(\beta_k\) are the higher order dispersion coefficients obtained by a Taylor series expansion of the propagation constant \(\beta(\omega)\) around the center frequency \(\omega_c\). The term in second line describes the nonlinear effects - temporal derivative in this term is responsible for self-steepening and optical shock formation, whereas the convolution integral describes the delayed Raman response \(R(T')\) [H07]. This form of the GNLSE is commonly employed for numerical simulations of propagation of pulses in a nonlinear medium such as optical fiber.

This solver is efficient, thanks to an adaptive-step-size implementation of the fourth-order Runge-Kutta in the Interaction Picture method (RK4IP), adapted from [H07]. Our Python code is partially based on MATLAB code, published in [DT10], available at http://scgbook.info/. The toolbox prepares integration using SCIPYs ode solver, while the transitions between time and frequency domains are accomplished using the FFT and iFFT from pyfftw library.

The solver is divided into three parts: specific model setup (gnlse.GNLSESetup), the framework for preparing split-step Fourier alghoritm (gnlse.GNLSE), and class for managing the solution (gnlse.Solution).

class gnlse.GNLSESetup

Model inputs for the GNLSE class.

Attributes
resolutionint

Number of points on the computational grid. Determines time resolution and bandwidth. Avoid numbers with large prime factors.

time_windowfloat [ps]

Width of the time window.

wavelengthfloat [nm]

Central wavelength of the input pulse.

fiber_lengthfloat [m]

Length of the simulated optical fiber.

z_savesint

Number of snapshots to save along the fiber. Larger numbers require more memory to store the result.

nonlinearityfloat [1/W/m]

Effective nonlinearity.

pulse_modelEnvelope

Input pulse envelope model.

dispersion_modelDispersion, optional

Fiber dispersion model or None to model a dispersionless fiber.

raman_modelfunction, optional

Raman scattering model or None if the effect is to be neglected.

self_steepningbool, optional

Whether to include the effect of self-steepening. Disabled by default.

rtolfloat, optional

Relative tolerance passed to the ODE solver.

atolfloat, optional

Absolute tolerance passed to the ODE solver.

methodstr, optional

Integration method passed to the ODE solver.

class gnlse.GNLSE(setup)

Models propagation of an optical pulse in a fiber by integrating the generalized non-linear Schrödinger equation.

Attributes
setupGNLSESetup

Model inputs in the form of a GNLSESetup object.

class gnlse.Solution(t=None, W=None, w_0=None, Z=None, At=None, AW=None, Aty=None, AWy=None)

Represents a solution to a GNLSE problem.

Attributes
tndarray, (n,)

Time domain grid.

Wndarray, (n,)

Absolute angular frequency grid.

Zndarray (m,)

Points at which intermediate steps were saved.

Atndarray, (n, m)

Intermediate steps in the time domain.

AWndarray, (n, m)

Intermediate steps in the frequency domain.