It is finally my pleasure to announce my very first Julia package, which was written with a ton of feedback from this community, so thank you everyone! I hope I can get some feedback on this package, my very first line of Julia code ever was in writing this, so it’s definitely not as well written as it could be. I still have much to learn from everyone here.
julia> ]add NonlinearSchrodinger
NonlinearSchrodinger.jl is a suite of tools for studying Nonlinear Schrodinger equations. The purpose of this package is to encourage the use of open source software in studying these equations, as most if not all works in this field rely on closed-source codes. This allows for easier reproduction of results, lowers the barrier to entry for new researchers, and alleviates the need to reinvent the wheel.
- Solving the cubic Nonlinear Schrodinger equation using 32 algorithms of order up to 8. Symplectic and RKN integrators are available.
- Solving the Hirota and Sasa-Satsuma equations using a combined split-step-finite-difference approach using a few different integrators. This is a preliminary feature and is not yet fully supported.
- Computing the integrals of motion (energy, momentum, and norm) and their errors.
- Computing the Darboux Transformation to study complicated analytical solutions. We currently support the breather and soliton seeds for extended nonlinear Schrodinger equations of order up to 5 (including cubic NLS, Hirota, LPD, Quintic, and arbitrary combinations thereof). We also support the cn and dn seeds for the cubic NLS.
- Easy visualization through Plots.jl recipes.
- A very simple interface that allows one to compute very complicated solutions via only a few lines of code.
- Many utilities for studying maximal intensity breather families on uniform and dnoidal backgrounds, pruning for Nonlinear talbot carpets, and breather to soliton conversion in extended NLSEs.
The numerical integration algorithms currently only support the cubic Nonlinear Schrodinger equation
Note that we use the confusing notation where x and t are flipped compared to the usual notation, we integrate in x and t is the transverse variable. This is in accordance with the literature in the field. We additionally have very preliminary support for the Hirota and Sasa-Satsuma equations, even though this is still under heavy development.
The Darboux Transformation scheme for studying analytical solutions supports the following extended nonlinear Schrodinger equation:
Special cases include the cubic nonlinear Schrodinger equation (\alpha = \gamma = \delta = 0), the Hirota equation (\alpha \neq 0, \gamma = \delta = 0), the Lakshmanan-Porsezian-Daniel (LPD) equation, (\gamma \neq 0, \alpha = \delta = 0) and the Quintic nonlinear Schrodinger equation (QNLSE) (\delta \neq 0, \alpha = \gamma = 0). The full equation with \alpha \neq 0, \gamma \neq 0, \delta \neq 0 is also sometimes called the QNLSE.
See the documentation, I don’t want to make this announcement longer than it already is.
using NonlinearSchrodinger using Plots, LaTeXStrings xᵣ = -10=>10 T = 20 seed = "0" box = Box(xᵣ, T, Nₓ=500, Nₜ = 500) λ = [-0.45 + 0.775im, -0.35 + 0.8im, -0.25 + 0.825im, 0.85im, 0.25 + 0.875im, 0.35 + 0.9im, 0.45 + 0.925im] xₛ = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] tₛ = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] calc = Calc(λ, tₛ, xₛ, seed, box) solve!(calc) heatmap(calc)
The paper will soon be made available on arXiv and submitted for publication.