Skip to content

omelchert/SWtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SWtools

Python License: MIT arXiv

SWtools is a Python package containing data structures and algorithms that allow a user to conveniently calculate solitary-wave solutions for a general nonlinear Schrödinger-type wave equation.

It provides an extendible framework for iterative methods that allow a user to solve two variants of the associated nonlinear eigenvalue problem (NEVP):

  • A bare version of the NEVP, where a solution with given eigenvalue is computed;
  • A constraint version of the NEVP with a priori unknown eigenvalue, where a solution with given norm is computed.

To facilitate progress of science, we include many examples and workflows that can help a user to quickly go from an idea to numerical experimentation to results. We also provide a verification test based on a known analytical solution for a higher order nonlinear Schrödinger equation, studied in the literature (see the reference manual below).

The examples provided with SWtools include: Bose-Einstein condensate (BEC) solutions for a Gross-Pitaevskii equation (GPE), traveling solitary wave solutions of a higher-order nonlinear Schrödinger equation (HONSE), nonlinear bound-states in a nonlinear Schrödinger equation (NSE) with periodic nonlinear microstructure, excited-states for a GPE, solitary waves in a cubic-quintic NSE, solitons in a saturable NSE, and solitary waves in a two-dimensional NSE. It further includes functions determining the linearized eigenspectrum of the solitary-waves for selected models, aimed at unveiling the existence and properties of their internal modes.

Installation

SWtools is developed under python3 (version 3.9.7) and requires

  • numpy (1.21.2)
  • scipy (1.7.0)
  • matplotlib (3.4.3)

The software can be installed by cloning the repository as

$ git clone https://github.com/omelchert/SWtools

Within a Python script, add the path to your Python path and import SWtools:

import sys; sys.path.append('/path/to/SWtools-package')
import SWtools

As an alternative, working on the commandline, add the path by amending .bash_profile by the line

export PYTHONPATH="${PYTHONPATH}:/path/to/SWtools-package"

Module description

Below we provide a list of all SWtools modules along with a short description and a link to the respective source code and online-documentation.

Module Description Links
SWtools_base.py base classes and methods for 1D solitary waves src, doc
SWtools_ext_SRM2D.py 2D spectral renormalization method src, doc
SWtools_ext_LE.py functions for calculating linear eigenspectra src, doc

Further information

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

This work received funding from the Deutsche Forschungsgemeinschaft (DFG) under Germany’s Excellence Strategy within the Cluster of Excellence PhoenixD (Photonics, Optics, and Engineering – Innovation Across Disciplines) (EXC 2122, projectID 390833453).

About

Iterative solvers for solitary wave solutions of nonlinear Schrödinger-type equations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published