gpe.exact_solutions#
This file contains a set of exact solutions useful for testing.
Classes#
Modified 1D harmonic oscillator potential with analytic solution. |
|
Modified 2D harmonic oscillator potential with analytic solution. |
|
Analytic moving bright soliton (for attractive interactions). |
|
Analytic traveling wave solutions for the GPE without a |
|
State with HO potential for backward compatibility. |
Functions#
Module Contents#
- class HarmonicOscillator(Nx=46, Lx=17.0, sigma=1.0, g=1.0, n0=1.0, **kw)[source]#
Bases:
gpe.bec.StateBaseModified 1D harmonic oscillator potential with analytic solution.
Here we add a piece to the harmonic oscillator potential to ensure that a Gaussian is an eigenstate, even in the presence of interactions.
- class HarmonicOscillators(Nxyz=(46, 46), Lxyz=(17.0, 17.0), sigmas=(1.0, 1.0), g=1.0, n0=1.0, **kw)[source]#
Bases:
gpe.bec.StateBaseModified 2D harmonic oscillator potential with analytic solution.
Here we add a piece to the harmonic oscillator potential to ensure that a Gaussian is an eigenstate, even in the presence of interactions.
- class BrightSoliton(Nx=2**4 * 3**3, Lx=58.0, sigma=1.0, g=None, n0=1.0, v=0.0, **kw)[source]#
Bases:
gpe.bec.StateTwist_xAnalytic moving bright soliton (for attractive interactions).
- class TravellingWaves(Nx=64, Lx=10.0, n0=0.1, n1=1.0, m=1.0, g=1.0, hbar=1.0, v_p=0.0, v_x=None, twist=None, **kw)[source]#
Bases:
gpe.bec.StateTwist_xAnalytic traveling wave solutions for the GPE without a potential.
The solutions are characterized by the following parameters:
- n0, n1float
Minimum and maximum density of the soliton. The amplitude is a=n1-n0.
- Lxfloat
The period of the wave, and the length of our box. This is specified in terms of Lx = 2lK(m_), where m_=al^2.
- v_pfloat
Phase velocity.
- v_xfloat
Velocity of the frame. If None, this is set to be the phase velocity so that the solution should be stationary.
- twistfloat
Twisted boundary condition. If None, this is computed by integrating the continuity equation.