import mmf_setup
mmf_setup.nbinit()
This cell adds /home/docs/checkouts/readthedocs.org/user_builds/gpe/checkouts/latest/src to your path, and contains some definitions for equations and some CSS for styling the notebook. If things look a bit strange, please try the following:
- Choose "Trust Notebook" from the "File" menu.
- Re-execute this cell.
- Reload the notebook.
%pylab inline --no-import-all
from IPython.display import display, clear_output
from mmfutils.contexts import NoInterrupt
from pytimeode.evolvers import EvolverABM, EvolverSplit
from gpe.minimize import MinimizeState
import gpe.soc_soliton
reload(gpe.soc_soliton)
from gpe import utils
from gpe.soc_soliton import u
experiment = gpe.soc_soliton.Experiment()
###################
class State(gpe.soc_soliton.State2tube):
def __init__(self, experiment=experiment, Nx=4800 / 2, Lx=320 * u.micron):
self.U0 = 39 * u.nK
self.Us = -6 * u.nK
self.mu = 8.0 * u.nK
self.v_s = 0.21 * u.mm / u.s
self.x0 = -100 * u.micron
self.w0 = 5 * u.micron
self.lam = 812 * u.nm
gpe.soc_soliton.State2tube.__init__(
self, experiment=experiment, Nxyz=(Nx,), Lxyz=(Lx,)
)
@property
def x_s(self):
return self.x0 + self.t * self.v_s
def get_Vtrap(self):
x = self.xyz[0]
x0 = np.pi * self.w0**2 / self.lam
w = self.w0 * np.sqrt(1 + (x / x0) ** 2)
d_x = 1 * u.micron
V_s = self.Us * np.vectorize(utils.step)(self.x_s - x - d_x / 2, d_x)
V_a = V_b = self.U0 * (1 - (self.w0 / w) ** 2) + V_s - self.mu
return V_a, V_b
###################
# Plotting
s0 = State()
m = MinimizeState(s0, fix_N=False)
assert m.check()
s = m.minimize()
s.plot()
%pylab is deprecated, use %matplotlib inline and import the required libraries.
Populating the interactive namespace from numpy and matplotlib
[I 03:36:33 numexpr.utils] NumExpr defaulting to 2 threads.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[3], line 7
3 from mmfutils.contexts import NoInterrupt
4 from pytimeode.evolvers import EvolverABM, EvolverSplit
5 from gpe.minimize import MinimizeState
6
----> 7 import gpe.soc_soliton
8
9 reload(gpe.soc_soliton)
10 from gpe import utils
ModuleNotFoundError: No module named 'gpe.soc_soliton'
Dumbhole#
From soc_soliton, create a new experiment for dumbhole, with SOC
%pylab inline --no-import-all
from IPython.display import display, clear_output
from mmfutils.contexts import NoInterrupt
from pytimeode.evolvers import EvolverABM, EvolverSplit
from gpe.minimize import MinimizeState
import gpe.soc_soliton
reload(gpe.soc_soliton)
from gpe import utils
from gpe.soc_soliton import u
experiment = gpe.soc_soliton.Experiment()
%pylab is deprecated, use %matplotlib inline and import the required libraries.
Populating the interactive namespace from numpy and matplotlib
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[4], line 7
3 from mmfutils.contexts import NoInterrupt
4 from pytimeode.evolvers import EvolverABM, EvolverSplit
5 from gpe.minimize import MinimizeState
6
----> 7 import gpe.soc_soliton
8
9 reload(gpe.soc_soliton)
10 from gpe import utils
ModuleNotFoundError: No module named 'gpe.soc_soliton'